9 changed files with 2296 additions and 9 deletions
@ -0,0 +1,53 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 查询出险记录列表
|
|||
export function listCxjl(query) { |
|||
return request({ |
|||
url: '/sz/cxjl/list', |
|||
method: 'post', |
|||
data: query |
|||
}) |
|||
} |
|||
|
|||
// 查询出险记录详细
|
|||
export function getCxjl(wagaCode) { |
|||
return request({ |
|||
url: '/sz/cxjl/' + wagaCode, |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 新增出险记录
|
|||
export function addCxjl(data) { |
|||
return request({ |
|||
url: '/sz/cxjl', |
|||
method: 'post', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 修改出险记录
|
|||
export function updateCxjl(data) { |
|||
return request({ |
|||
url: '/sz/cxjl', |
|||
method: 'put', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 删除出险记录
|
|||
export function delCxjl(wagaCode) { |
|||
return request({ |
|||
url: '/sz/cxjl/' + wagaCode, |
|||
method: 'delete' |
|||
}) |
|||
} |
|||
|
|||
// 导出出险记录
|
|||
export function exportCxjl(query) { |
|||
return request({ |
|||
url: '/sz/cxjl/export', |
|||
method: 'get', |
|||
params: query |
|||
}) |
|||
} |
@ -0,0 +1,53 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 查询工程结构列表
|
|||
export function listGcjg(query) { |
|||
return request({ |
|||
url: '/sz/gcjg/list', |
|||
method: 'post', |
|||
data: query |
|||
}) |
|||
} |
|||
|
|||
// 查询工程结构详细
|
|||
export function getGcjg(wagaCode) { |
|||
return request({ |
|||
url: '/sz/gcjg/' + wagaCode, |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 新增工程结构
|
|||
export function addGcjg(data) { |
|||
return request({ |
|||
url: '/sz/gcjg', |
|||
method: 'post', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 修改工程结构
|
|||
export function updateGcjg(data) { |
|||
return request({ |
|||
url: '/sz/gcjg', |
|||
method: 'put', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 删除工程结构
|
|||
export function delGcjg(wagaCode) { |
|||
return request({ |
|||
url: '/sz/gcjg/' + wagaCode, |
|||
method: 'delete' |
|||
}) |
|||
} |
|||
|
|||
// 导出工程结构
|
|||
export function exportGcjg(query) { |
|||
return request({ |
|||
url: '/sz/gcjg/export', |
|||
method: 'get', |
|||
params: query |
|||
}) |
|||
} |
@ -0,0 +1,53 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 查询工程特性列表
|
|||
export function listGctx(query) { |
|||
return request({ |
|||
url: '/sz/gctx/list', |
|||
method: 'post', |
|||
data: query |
|||
}) |
|||
} |
|||
|
|||
// 查询工程特性详细
|
|||
export function getGctx(wagaCode) { |
|||
return request({ |
|||
url: '/sz/gctx/' + wagaCode, |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 新增工程特性
|
|||
export function addGctx(data) { |
|||
return request({ |
|||
url: '/sz/gctx', |
|||
method: 'post', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 修改工程特性
|
|||
export function updateGctx(data) { |
|||
return request({ |
|||
url: '/sz/gctx', |
|||
method: 'put', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 删除工程特性
|
|||
export function delGctx(wagaCode) { |
|||
return request({ |
|||
url: '/sz/gctx/' + wagaCode, |
|||
method: 'delete' |
|||
}) |
|||
} |
|||
|
|||
// 导出工程特性
|
|||
export function exportGctx(query) { |
|||
return request({ |
|||
url: '/sz/gctx/export', |
|||
method: 'get', |
|||
params: query |
|||
}) |
|||
} |
@ -0,0 +1,527 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-form |
|||
:model="queryParams" |
|||
ref="queryForm" |
|||
:inline="true" |
|||
v-show="showSearch" |
|||
label-width="68px" |
|||
> |
|||
<el-form-item label="险情级别" prop="dnstgr"> |
|||
<el-input |
|||
v-model="queryParams.data.dnstgr" |
|||
placeholder="请输入险情级别" |
|||
clearable |
|||
size="small" |
|||
@keyup.enter.native="handleQuery" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="险情名称" prop="dnsttm"> |
|||
<el-input |
|||
v-model="queryParams.data.dnsttm" |
|||
placeholder="请输入险情名称" |
|||
clearable |
|||
size="small" |
|||
@keyup.enter.native="handleQuery" |
|||
> |
|||
<el-button |
|||
type="primary" |
|||
slot="append" |
|||
icon="el-icon-search" |
|||
size="small" |
|||
@click="handleQuery" |
|||
></el-button> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item> |
|||
<!-- <el-button |
|||
type="cyan" |
|||
icon="el-icon-search" |
|||
size="mini" |
|||
@click="handleQuery" |
|||
>搜索</el-button |
|||
> --> |
|||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
|||
>重置</el-button |
|||
> |
|||
</el-form-item> |
|||
</el-form> |
|||
|
|||
<el-row :gutter="10" class="mb8"> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="primary" |
|||
icon="el-icon-plus" |
|||
size="mini" |
|||
@click="handleAdd" |
|||
v-hasPermi="['sz:cxjl:add']" |
|||
>新增</el-button |
|||
> |
|||
</el-col> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="success" |
|||
icon="el-icon-edit" |
|||
size="mini" |
|||
:disabled="single" |
|||
@click="handleUpdate" |
|||
v-hasPermi="['sz:cxjl:edit']" |
|||
>修改</el-button |
|||
> |
|||
</el-col> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="danger" |
|||
icon="el-icon-delete" |
|||
size="mini" |
|||
:disabled="multiple" |
|||
@click="handleDelete" |
|||
v-hasPermi="['sz:cxjl:remove']" |
|||
>删除</el-button |
|||
> |
|||
</el-col> |
|||
|
|||
<right-toolbar |
|||
:showSearch.sync="showSearch" |
|||
@queryTable="getList" |
|||
></right-toolbar> |
|||
</el-row> |
|||
|
|||
<el-table |
|||
v-loading="loading" |
|||
:data="cxjlList" |
|||
@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="fntm" |
|||
min-width="120" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<span>{{ parseTime(scope.row.fntm, "{y}-{m}-{d}") }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
label="险情级别" |
|||
align="center" |
|||
prop="dnstgr" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="险情名称" |
|||
align="center" |
|||
prop="dnsttm" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="险情部位" |
|||
align="center" |
|||
prop="dnstps" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="险情描述" |
|||
align="center" |
|||
prop="dnstov" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="除险措施" |
|||
align="center" |
|||
prop="rhms" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="备注" |
|||
align="center" |
|||
prop="note" |
|||
min-width="120" |
|||
/> |
|||
<!-- <el-table-column |
|||
label="记录生效时间" |
|||
align="center" |
|||
prop="effDate" |
|||
min-width="120" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<span>{{ parseTime(scope.row.effDate, "{y}-{m}-{d}") }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
label="记录失效时间" |
|||
align="center" |
|||
prop="exprDate" |
|||
min-width="120" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<span>{{ parseTime(scope.row.exprDate, "{y}-{m}-{d}") }}</span> |
|||
</template> |
|||
</el-table-column> --> |
|||
|
|||
<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-edit" |
|||
@click="handleUpdate(scope.row)" |
|||
v-hasPermi="['sz:cxjl:edit']" |
|||
>修改</el-button |
|||
> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-delete" |
|||
@click="handleDelete(scope.row)" |
|||
v-hasPermi="['sz:cxjl:remove']" |
|||
>删除</el-button |
|||
> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<pagination |
|||
v-show="total > 0" |
|||
:total="total" |
|||
:page.sync="queryParams.pageNum" |
|||
:limit.sync="queryParams.pageSize" |
|||
@pagination="getList" |
|||
/> |
|||
|
|||
<!-- 添加或修改出险记录对话框 --> |
|||
<el-dialog |
|||
:title="title" |
|||
:visible.sync="open" |
|||
width="1200px" |
|||
append-to-body |
|||
:close-on-click-modal="false" |
|||
> |
|||
<el-row :gutter="15"> |
|||
<el-form ref="form" :model="form" :rules="rules" label-width="110px"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="发现时间" prop="fntm"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="form.fntm" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择发现时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="险情级别" prop="dnstgr"> |
|||
<el-input v-model="form.dnstgr" placeholder="请输入险情级别" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="险情名称" prop="dnsttm"> |
|||
<el-input v-model="form.dnsttm" placeholder="请输入险情名称" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="险情部位" prop="dnstps"> |
|||
<el-input v-model="form.dnstps" placeholder="请输入险情部位" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="险情描述" prop="dnstov"> |
|||
<el-input v-model="form.dnstov" placeholder="请输入险情描述" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="除险措施" prop="rhms"> |
|||
<el-input v-model="form.rhms" placeholder="请输入除险措施" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="备注" prop="note"> |
|||
<el-input v-model="form.note" placeholder="请输入备注" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<!-- <el-col :span="12"> |
|||
<el-form-item |
|||
label="记录生效时间" |
|||
prop="effDate" |
|||
> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="form.effDate" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择记录生效时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item |
|||
label="记录失效时间" |
|||
prop="exprDate" |
|||
> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="form.exprDate" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择记录失效时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> --> |
|||
</el-form> |
|||
</el-row> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click="submitForm">确 定</el-button> |
|||
<el-button @click="cancel">取 消</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
listCxjl, |
|||
getCxjl, |
|||
delCxjl, |
|||
addCxjl, |
|||
updateCxjl, |
|||
exportCxjl, |
|||
} from "@/api/yg/cxjl"; |
|||
|
|||
export default { |
|||
name: "Cxjl", |
|||
data() { |
|||
return { |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 选中数组 |
|||
ids: [], |
|||
// 非单个禁用 |
|||
single: true, |
|||
// 非多个禁用 |
|||
multiple: true, |
|||
// 显示搜索条件 |
|||
showSearch: true, |
|||
// 总条数 |
|||
total: 0, |
|||
// 出险记录表格数据 |
|||
cxjlList: [], |
|||
// 弹出层标题 |
|||
title: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
ids: null, |
|||
data: { |
|||
fntm: null, |
|||
dnstgr: null, |
|||
dnsttm: null, |
|||
dnstps: null, |
|||
dnstov: null, |
|||
rhms: null, |
|||
note: null, |
|||
effDate: null, |
|||
exprDate: null, |
|||
createUid: null, |
|||
updateUid: null, |
|||
owerDept: null, |
|||
relation: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sort: "desc", |
|||
}, |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: {}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
}, |
|||
methods: { |
|||
/** 查询出险记录列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
listCxjl(this.queryParams).then((response) => { |
|||
this.cxjlList = response.records; |
|||
this.total = response.total; |
|||
this.loading = false; |
|||
}); |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.open = false; |
|||
this.reset(); |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
wagaCode: null, |
|||
fntm: null, |
|||
dnstgr: null, |
|||
dnsttm: null, |
|||
dnstps: null, |
|||
dnstov: null, |
|||
rhms: null, |
|||
note: null, |
|||
effDate: null, |
|||
exprDate: null, |
|||
createUid: null, |
|||
updateUid: null, |
|||
createTime: null, |
|||
updateTime: null, |
|||
owerDept: null, |
|||
remark: null, |
|||
relation: null, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
// 查询表单重置 |
|||
resetQueryForm() { |
|||
this.queryParams = { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
data: { |
|||
wagaCode: null, |
|||
fntm: null, |
|||
dnstgr: null, |
|||
dnsttm: null, |
|||
dnstps: null, |
|||
dnstov: null, |
|||
rhms: null, |
|||
note: null, |
|||
effDate: null, |
|||
exprDate: null, |
|||
createUid: null, |
|||
updateUid: null, |
|||
createTime: null, |
|||
updateTime: null, |
|||
owerDept: null, |
|||
remark: null, |
|||
relation: null, |
|||
}, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
/** 搜索按钮操作 */ |
|||
handleQuery() { |
|||
this.queryParams.pageNum = 1; |
|||
this.getList(); |
|||
}, |
|||
/** 重置按钮操作 */ |
|||
resetQuery() { |
|||
this.resetQueryForm(); |
|||
this.handleQuery(); |
|||
}, |
|||
// 多选框选中数据 |
|||
handleSelectionChange(selection) { |
|||
this.ids = selection.map((item) => item.wagaCode); |
|||
this.single = selection.length !== 1; |
|||
this.multiple = !selection.length; |
|||
}, |
|||
/** 新增按钮操作 */ |
|||
handleAdd() { |
|||
this.reset(); |
|||
this.open = true; |
|||
this.title = "添加出险记录"; |
|||
}, |
|||
/** 修改按钮操作 */ |
|||
handleUpdate(row) { |
|||
this.reset(); |
|||
const wagaCode = row.wagaCode || this.ids; |
|||
getCxjl(wagaCode).then((response) => { |
|||
this.form = response.data; |
|||
this.open = true; |
|||
this.title = "修改出险记录"; |
|||
}); |
|||
}, |
|||
/** 提交按钮 */ |
|||
submitForm() { |
|||
this.$refs["form"].validate((valid) => { |
|||
if (valid) { |
|||
if (this.form.wagaCode != null) { |
|||
updateCxjl(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("修改成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} else { |
|||
addCxjl(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("新增成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
/** 删除按钮操作 */ |
|||
handleDelete(row) { |
|||
const ids = row.id || this.ids; |
|||
if (ids) { |
|||
this.$confirm("是否删除选中的数据?", "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return delCxjl(wagaCodes); |
|||
}) |
|||
.then(() => { |
|||
this.getList(); |
|||
this.msgSuccess("删除成功"); |
|||
}) |
|||
.catch(function () {}); |
|||
} else { |
|||
this.$message.warning("请选择要删除的数据!!"); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "@/assets/css/dialog.scss"; |
|||
// ::v-deep { |
|||
// .el-dialog { |
|||
// margin-top: 2vh !important; |
|||
// } |
|||
// } |
|||
</style> |
@ -0,0 +1,399 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-row :gutter="15"> |
|||
<el-form ref="form" :model="form" :rules="rules" label-width="110px"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="设计重现期" prop="dsrcin"> |
|||
<el-input v-model="form.dsrcin" placeholder="请输入设计重现期"> |
|||
<template slot="append">年一遇</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="校核重现期" prop="chrcin"> |
|||
<el-input v-model="form.chrcin" placeholder="请输入校核重现期"> |
|||
<template slot="append">年一遇</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="设计闸上水位" prop="dsuswl"> |
|||
<el-input v-model="form.dsuswl" placeholder="请输入设计闸上水位"> |
|||
<template slot="append">m</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="设计闸下水位" prop="dsdswl"> |
|||
<el-input v-model="form.dsdswl" placeholder="请输入设计闸下水位"> |
|||
<template slot="append">m</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="设计过闸流量" prop="dslcfl"> |
|||
<el-input v-model="form.dslcfl" placeholder="请输入设计过闸流量"> |
|||
<template slot="append">m³/s</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="校核闸上水位" prop="chuswl"> |
|||
<el-input v-model="form.chuswl" placeholder="请输入校核闸上水位"> |
|||
<template slot="append">m</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="校核闸下水位" prop="chdswl"> |
|||
<el-input v-model="form.chdswl" placeholder="请输入校核闸下水位"> |
|||
<template slot="append">m</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="校核过闸流量" prop="chlcfl"> |
|||
<el-input v-model="form.chlcfl" placeholder="请输入校核过闸流量"> |
|||
<template slot="append">m³/s</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="备注" prop="note"> |
|||
<el-input v-model="form.note" placeholder="请输入备注" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<!-- <el-col :span="12"> |
|||
<el-form-item label="记录生效时间" prop="effDate"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="form.effDate" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择记录生效时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="记录失效时间" prop="exprDate"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="form.exprDate" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择记录失效时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> --> |
|||
</el-form> |
|||
</el-row> |
|||
<div class="btnList"> |
|||
<el-button type="primary" @click="submitForm">保 存</el-button> |
|||
<el-button @click="cancel">取 消</el-button> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
listSjcs, |
|||
getSjcs, |
|||
delSjcs, |
|||
addSjcs, |
|||
updateSjcs, |
|||
exportSjcs, |
|||
} from "@/api/yg/sjcs"; |
|||
|
|||
export default { |
|||
name: "Sjcs", |
|||
data() { |
|||
return { |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 选中数组 |
|||
ids: [], |
|||
// 非单个禁用 |
|||
single: true, |
|||
// 非多个禁用 |
|||
multiple: true, |
|||
// 显示搜索条件 |
|||
showSearch: true, |
|||
// 总条数 |
|||
total: 0, |
|||
// 设计参数表格数据 |
|||
sjcsList: [], |
|||
// 弹出层标题 |
|||
title: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
ids: null, |
|||
data: { |
|||
createUid: null, |
|||
updateUid: null, |
|||
proCode: null, |
|||
proNo: null, |
|||
owerDept: null, |
|||
relation: null, |
|||
dsrcin: null, |
|||
chrcin: null, |
|||
dsuswl: null, |
|||
dsdswl: null, |
|||
dslcfl: null, |
|||
chuswl: null, |
|||
chdswl: null, |
|||
chlcfl: null, |
|||
note: null, |
|||
effDate: null, |
|||
exprDate: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sort: "desc", |
|||
}, |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: { |
|||
dsrcin: [ |
|||
{ |
|||
pattern: /^[1-9]\d*$/, |
|||
message: "请输入正整数,不包含0", |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
chrcin: [ |
|||
{ |
|||
pattern: /^[1-9]\d*$/, |
|||
message: "请输入正整数,不包含0", |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
dsuswl: [ |
|||
{ |
|||
pattern: |
|||
/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, |
|||
message: "请输入数字,可保留两位小数", |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
dsdswl: [ |
|||
{ |
|||
pattern: |
|||
/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, |
|||
message: "请输入数字,可保留两位小数", |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
dslcfl: [ |
|||
{ |
|||
pattern: |
|||
/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, |
|||
message: "请输入数字,可保留两位小数", |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
chuswl: [ |
|||
{ |
|||
pattern: |
|||
/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, |
|||
message: "请输入数字,可保留两位小数", |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
chdswl: [ |
|||
{ |
|||
pattern: |
|||
/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, |
|||
message: "请输入数字,可保留两位小数", |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
chlcfl: [ |
|||
{ |
|||
pattern: |
|||
/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/, |
|||
message: "请输入数字,可保留两位小数", |
|||
trigger: "blur", |
|||
}, |
|||
], |
|||
}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
}, |
|||
methods: { |
|||
/** 查询设计参数列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
listSjcs(this.queryParams).then((response) => { |
|||
this.sjcsList = response.records; |
|||
this.total = response.total; |
|||
this.loading = false; |
|||
}); |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.open = false; |
|||
this.reset(); |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
wagaCode: null, |
|||
createUid: null, |
|||
updateUid: null, |
|||
createTime: null, |
|||
updateTime: null, |
|||
proCode: null, |
|||
proNo: null, |
|||
owerDept: null, |
|||
remark: null, |
|||
relation: null, |
|||
dsrcin: null, |
|||
chrcin: null, |
|||
dsuswl: null, |
|||
dsdswl: null, |
|||
dslcfl: null, |
|||
chuswl: null, |
|||
chdswl: null, |
|||
chlcfl: null, |
|||
note: null, |
|||
effDate: null, |
|||
exprDate: null, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
// 查询表单重置 |
|||
resetQueryForm() { |
|||
this.queryParams = { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
data: { |
|||
wagaCode: null, |
|||
createUid: null, |
|||
updateUid: null, |
|||
createTime: null, |
|||
updateTime: null, |
|||
proCode: null, |
|||
proNo: null, |
|||
owerDept: null, |
|||
remark: null, |
|||
relation: null, |
|||
dsrcin: null, |
|||
chrcin: null, |
|||
dsuswl: null, |
|||
dsdswl: null, |
|||
dslcfl: null, |
|||
chuswl: null, |
|||
chdswl: null, |
|||
chlcfl: null, |
|||
note: null, |
|||
effDate: null, |
|||
exprDate: null, |
|||
}, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
/** 搜索按钮操作 */ |
|||
handleQuery() { |
|||
this.queryParams.pageNum = 1; |
|||
this.getList(); |
|||
}, |
|||
/** 重置按钮操作 */ |
|||
resetQuery() { |
|||
this.resetQueryForm(); |
|||
this.handleQuery(); |
|||
}, |
|||
// 多选框选中数据 |
|||
handleSelectionChange(selection) { |
|||
this.ids = selection.map((item) => item.wagaCode); |
|||
this.single = selection.length !== 1; |
|||
this.multiple = !selection.length; |
|||
}, |
|||
/** 新增按钮操作 */ |
|||
handleAdd() { |
|||
this.reset(); |
|||
this.open = true; |
|||
this.title = "添加设计参数"; |
|||
}, |
|||
/** 修改按钮操作 */ |
|||
handleUpdate(row) { |
|||
this.reset(); |
|||
const wagaCode = row.wagaCode || this.ids; |
|||
getSjcs(wagaCode).then((response) => { |
|||
this.form = response.data; |
|||
this.open = true; |
|||
this.title = "修改设计参数"; |
|||
}); |
|||
}, |
|||
/** 提交按钮 */ |
|||
submitForm() { |
|||
this.$refs["form"].validate((valid) => { |
|||
if (valid) { |
|||
if (this.form.wagaCode != null) { |
|||
updateSjcs(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("修改成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} else { |
|||
addSjcs(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("新增成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
/** 删除按钮操作 */ |
|||
handleDelete(row) { |
|||
const ids = row.id || this.ids; |
|||
if (ids) { |
|||
this.$confirm("是否删除选中的数据?", "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return delSjcs(wagaCodes); |
|||
}) |
|||
.then(() => { |
|||
this.getList(); |
|||
this.msgSuccess("删除成功"); |
|||
}) |
|||
.catch(function () {}); |
|||
} else { |
|||
this.$message.warning("请选择要删除的数据!!"); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
.btnList { |
|||
position: fixed; |
|||
bottom: 20px; |
|||
right: 20px; |
|||
z-index: 1; |
|||
} |
|||
</style> |
@ -0,0 +1,337 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-row :gutter="15"> |
|||
<el-form ref="form" :model="form" :rules="rules" label-width="96px"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="闸上水位" prop="uswl"> |
|||
<el-input v-model="form.uswl" placeholder="请输入闸上水位" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="闸下水位" prop="dswl"> |
|||
<el-input v-model="form.dswl" placeholder="请输入闸下水位" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="过闸总流量" prop="ttfl"> |
|||
<el-input v-model="form.ttfl" placeholder="请输入过闸总流量" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="过闸总流量" prop="createUid"> |
|||
<el-input v-model="form.createUid" placeholder="请输入过闸总流量" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="过闸总流量" prop="updateUid"> |
|||
<el-input v-model="form.updateUid" placeholder="请输入过闸总流量" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="过闸总流量" prop="proCode"> |
|||
<el-input v-model="form.proCode" placeholder="请输入过闸总流量" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="过闸总流量" prop="proNo"> |
|||
<el-input v-model="form.proNo" placeholder="请输入过闸总流量" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="过闸总流量" prop="owerDept"> |
|||
<el-input v-model="form.owerDept" placeholder="请输入过闸总流量" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="过闸总流量" prop="remark"> |
|||
<el-input v-model="form.remark" placeholder="请输入过闸总流量" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="过闸总流量" prop="relation"> |
|||
<el-input v-model="form.relation" placeholder="请输入过闸总流量" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="备注" prop="note"> |
|||
<el-input v-model="form.note" placeholder="请输入备注" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<!-- <el-col :span="12"> |
|||
<el-form-item label="记录生效时间" prop="effDate"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="form.effDate" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择记录生效时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="记录失效时间" prop="exprDate"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="form.exprDate" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择记录失效时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> --> |
|||
</el-form> |
|||
</el-row> |
|||
<div class="btnList"> |
|||
<el-button type="primary" @click="submitForm">保 存</el-button> |
|||
<el-button @click="cancel">取 消</el-button> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
listXlnl, |
|||
getXlnl, |
|||
delXlnl, |
|||
addXlnl, |
|||
updateXlnl, |
|||
exportXlnl, |
|||
} from "@/api/yg/xlnl"; |
|||
|
|||
export default { |
|||
name: "Xlnl", |
|||
data() { |
|||
return { |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 选中数组 |
|||
ids: [], |
|||
// 非单个禁用 |
|||
single: true, |
|||
// 非多个禁用 |
|||
multiple: true, |
|||
// 显示搜索条件 |
|||
showSearch: true, |
|||
// 总条数 |
|||
total: 0, |
|||
// 泄流能力表格数据 |
|||
xlnlList: [], |
|||
// 弹出层标题 |
|||
title: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
ids: null, |
|||
data: { |
|||
uswl: null, |
|||
dswl: null, |
|||
ttfl: null, |
|||
createUid: null, |
|||
updateUid: null, |
|||
proCode: null, |
|||
proNo: null, |
|||
owerDept: null, |
|||
relation: null, |
|||
note: null, |
|||
effDate: null, |
|||
exprDate: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sort: "desc", |
|||
}, |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: {}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
}, |
|||
methods: { |
|||
/** 查询泄流能力列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
listXlnl(this.queryParams).then((response) => { |
|||
this.xlnlList = response.records; |
|||
this.total = response.total; |
|||
this.loading = false; |
|||
}); |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.open = false; |
|||
this.reset(); |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
wagaCode: null, |
|||
uswl: null, |
|||
dswl: null, |
|||
ttfl: null, |
|||
createUid: null, |
|||
updateUid: null, |
|||
createTime: null, |
|||
updateTime: null, |
|||
proCode: null, |
|||
proNo: null, |
|||
owerDept: null, |
|||
remark: null, |
|||
relation: null, |
|||
note: null, |
|||
effDate: null, |
|||
exprDate: null, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
// 查询表单重置 |
|||
resetQueryForm() { |
|||
this.queryParams = { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
data: { |
|||
wagaCode: null, |
|||
uswl: null, |
|||
dswl: null, |
|||
ttfl: null, |
|||
createUid: null, |
|||
updateUid: null, |
|||
createTime: null, |
|||
updateTime: null, |
|||
proCode: null, |
|||
proNo: null, |
|||
owerDept: null, |
|||
remark: null, |
|||
relation: null, |
|||
note: null, |
|||
effDate: null, |
|||
exprDate: null, |
|||
}, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
/** 搜索按钮操作 */ |
|||
handleQuery() { |
|||
this.queryParams.pageNum = 1; |
|||
this.getList(); |
|||
}, |
|||
/** 重置按钮操作 */ |
|||
resetQuery() { |
|||
this.resetQueryForm(); |
|||
this.handleQuery(); |
|||
}, |
|||
// 多选框选中数据 |
|||
handleSelectionChange(selection) { |
|||
this.ids = selection.map((item) => item.wagaCode); |
|||
this.single = selection.length !== 1; |
|||
this.multiple = !selection.length; |
|||
}, |
|||
/** 新增按钮操作 */ |
|||
handleAdd() { |
|||
this.reset(); |
|||
this.open = true; |
|||
this.title = "添加泄流能力"; |
|||
}, |
|||
/** 修改按钮操作 */ |
|||
handleUpdate(row) { |
|||
this.reset(); |
|||
const wagaCode = row.wagaCode || this.ids; |
|||
getXlnl(wagaCode).then((response) => { |
|||
this.form = response.data; |
|||
this.open = true; |
|||
this.title = "修改泄流能力"; |
|||
}); |
|||
}, |
|||
/** 提交按钮 */ |
|||
submitForm() { |
|||
this.$refs["form"].validate((valid) => { |
|||
if (valid) { |
|||
if (this.form.wagaCode != null) { |
|||
updateXlnl(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("修改成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} else { |
|||
addXlnl(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("新增成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
/** 删除按钮操作 */ |
|||
handleDelete(row) { |
|||
const ids = row.id || this.ids; |
|||
if (ids) { |
|||
this.$confirm("是否删除选中的数据?", "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return delXlnl(wagaCodes); |
|||
}) |
|||
.then(() => { |
|||
this.getList(); |
|||
this.msgSuccess("删除成功"); |
|||
}) |
|||
.catch(function () {}); |
|||
} else { |
|||
this.$message.warning("请选择要删除的数据!!"); |
|||
} |
|||
}, |
|||
/** 导出按钮操作 */ |
|||
handleExport() { |
|||
const queryParams = this.queryParams; |
|||
let message = "是否确认导出所有的数据项?"; |
|||
if (this.ids) { |
|||
message = "是否确认导出选中的数据项?"; |
|||
queryParams.ids = this.ids; |
|||
} |
|||
this.$confirm(message, "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return exportXlnl(queryParams); |
|||
}) |
|||
.then((response) => { |
|||
this.downloadFile(response, true, response.msg); |
|||
// this.download(response.msg); |
|||
}) |
|||
.catch(function () {}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
.btnList { |
|||
position: fixed; |
|||
bottom: 20px; |
|||
right: 20px; |
|||
z-index: 1; |
|||
} |
|||
</style> |
@ -0,0 +1,367 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-row :gutter="15"> |
|||
<el-form ref="form" :model="form" :rules="rules" label-width="124px"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="枢纽组成简介" prop="hfBrf"> |
|||
<el-input v-model="form.hfBrf" placeholder="请输入枢纽组成简介" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="运用原则" prop="opPr"> |
|||
<el-input v-model="form.opPr" placeholder="请输入运用原则" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="闸基地质条件" prop="slbsglcn"> |
|||
<el-input |
|||
v-model="form.slbsglcn" |
|||
placeholder="请输入闸基地质条件" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="地震基本烈度" prop="bsssin"> |
|||
<el-input v-model="form.bsssin" placeholder="请输入地震基本烈度" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="设防地震烈度" prop="freqin"> |
|||
<el-input v-model="form.freqin" placeholder="请输入设防地震烈度" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="是否穿堤建筑物" prop="leStruFlag"> |
|||
<el-input |
|||
v-model="form.leStruFlag" |
|||
placeholder="请输入是否穿堤建筑物" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="闸上游堤顶高程" prop="gubTel"> |
|||
<el-input |
|||
v-model="form.gubTel" |
|||
placeholder="请输入闸上游堤顶高程" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="闸下游堤顶高程" prop="gdbTel"> |
|||
<el-input |
|||
v-model="form.gdbTel" |
|||
placeholder="请输入闸下游堤顶高程" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="闸门全开需要时间" prop="gtfloptm"> |
|||
<el-input |
|||
v-model="form.gtfloptm" |
|||
placeholder="请输入闸门全开需要时间" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="存在问题" prop="existQa"> |
|||
<el-input v-model="form.existQa" placeholder="请输入存在问题" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="备注" prop="note"> |
|||
<el-input v-model="form.note" placeholder="请输入备注" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<!-- <el-col :span="12"> |
|||
<el-form-item label="记录生效时间" prop="effDate"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="form.effDate" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择记录生效时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="记录失效时间" prop="exprDate"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="form.exprDate" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择记录失效时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> --> |
|||
</el-form> |
|||
</el-row> |
|||
<div class="btnList"> |
|||
<el-button type="primary" @click="submitForm">保 存</el-button> |
|||
<el-button @click="cancel">取 消</el-button> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
listGctx, |
|||
getGctx, |
|||
delGctx, |
|||
addGctx, |
|||
updateGctx, |
|||
exportGctx, |
|||
} from "@/api/yg/gctx"; |
|||
|
|||
export default { |
|||
name: "Gctx", |
|||
data() { |
|||
return { |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 选中数组 |
|||
ids: [], |
|||
// 非单个禁用 |
|||
single: true, |
|||
// 非多个禁用 |
|||
multiple: true, |
|||
// 显示搜索条件 |
|||
showSearch: true, |
|||
// 总条数 |
|||
total: 0, |
|||
// 工程特性表格数据 |
|||
gctxList: [], |
|||
// 弹出层标题 |
|||
title: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
ids: null, |
|||
data: { |
|||
hfBrf: null, |
|||
opPr: null, |
|||
slbsglcn: null, |
|||
bsssin: null, |
|||
freqin: null, |
|||
leStruFlag: null, |
|||
gubTel: null, |
|||
gdbTel: null, |
|||
gtfloptm: null, |
|||
existQa: null, |
|||
note: null, |
|||
effDate: null, |
|||
exprDate: null, |
|||
createUid: null, |
|||
updateUid: null, |
|||
owerDept: null, |
|||
relation: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sort: "desc", |
|||
}, |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: {}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
}, |
|||
methods: { |
|||
/** 查询工程特性列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
listGctx(this.queryParams).then((response) => { |
|||
this.gctxList = response.records; |
|||
this.total = response.total; |
|||
this.loading = false; |
|||
}); |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.open = false; |
|||
this.reset(); |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
wagaCode: null, |
|||
hfBrf: null, |
|||
opPr: null, |
|||
slbsglcn: null, |
|||
bsssin: null, |
|||
freqin: null, |
|||
leStruFlag: null, |
|||
gubTel: null, |
|||
gdbTel: null, |
|||
gtfloptm: null, |
|||
existQa: null, |
|||
note: null, |
|||
effDate: null, |
|||
exprDate: null, |
|||
createUid: null, |
|||
updateUid: null, |
|||
createTime: null, |
|||
updateTime: null, |
|||
owerDept: null, |
|||
remark: null, |
|||
relation: null, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
// 查询表单重置 |
|||
resetQueryForm() { |
|||
this.queryParams = { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
data: { |
|||
wagaCode: null, |
|||
hfBrf: null, |
|||
opPr: null, |
|||
slbsglcn: null, |
|||
bsssin: null, |
|||
freqin: null, |
|||
leStruFlag: null, |
|||
gubTel: null, |
|||
gdbTel: null, |
|||
gtfloptm: null, |
|||
existQa: null, |
|||
note: null, |
|||
effDate: null, |
|||
exprDate: null, |
|||
createUid: null, |
|||
updateUid: null, |
|||
createTime: null, |
|||
updateTime: null, |
|||
owerDept: null, |
|||
remark: null, |
|||
relation: null, |
|||
}, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
/** 搜索按钮操作 */ |
|||
handleQuery() { |
|||
this.queryParams.pageNum = 1; |
|||
this.getList(); |
|||
}, |
|||
/** 重置按钮操作 */ |
|||
resetQuery() { |
|||
this.resetQueryForm(); |
|||
this.handleQuery(); |
|||
}, |
|||
// 多选框选中数据 |
|||
handleSelectionChange(selection) { |
|||
this.ids = selection.map((item) => item.wagaCode); |
|||
this.single = selection.length !== 1; |
|||
this.multiple = !selection.length; |
|||
}, |
|||
/** 新增按钮操作 */ |
|||
handleAdd() { |
|||
this.reset(); |
|||
this.open = true; |
|||
this.title = "添加工程特性"; |
|||
}, |
|||
/** 修改按钮操作 */ |
|||
handleUpdate(row) { |
|||
this.reset(); |
|||
const wagaCode = row.wagaCode || this.ids; |
|||
getGctx(wagaCode).then((response) => { |
|||
this.form = response.data; |
|||
this.open = true; |
|||
this.title = "修改工程特性"; |
|||
}); |
|||
}, |
|||
/** 提交按钮 */ |
|||
submitForm() { |
|||
this.$refs["form"].validate((valid) => { |
|||
if (valid) { |
|||
if (this.form.wagaCode != null) { |
|||
updateGctx(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("修改成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} else { |
|||
addGctx(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("新增成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
/** 删除按钮操作 */ |
|||
handleDelete(row) { |
|||
const ids = row.id || this.ids; |
|||
if (ids) { |
|||
this.$confirm("是否删除选中的数据?", "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return delGctx(wagaCodes); |
|||
}) |
|||
.then(() => { |
|||
this.getList(); |
|||
this.msgSuccess("删除成功"); |
|||
}) |
|||
.catch(function () {}); |
|||
} else { |
|||
this.$message.warning("请选择要删除的数据!!"); |
|||
} |
|||
}, |
|||
/** 导出按钮操作 */ |
|||
handleExport() { |
|||
const queryParams = this.queryParams; |
|||
let message = "是否确认导出所有的数据项?"; |
|||
if (this.ids) { |
|||
message = "是否确认导出选中的数据项?"; |
|||
queryParams.ids = this.ids; |
|||
} |
|||
this.$confirm(message, "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return exportGctx(queryParams); |
|||
}) |
|||
.then((response) => { |
|||
this.downloadFile(response, true, response.msg); |
|||
// this.download(response.msg); |
|||
}) |
|||
.catch(function () {}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
.btnList { |
|||
position: fixed; |
|||
bottom: 20px; |
|||
right: 20px; |
|||
z-index: 1; |
|||
} |
|||
</style> |
@ -0,0 +1,438 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-row :gutter="15"> |
|||
<el-form ref="form" :model="form" :rules="rules" label-width="110px"> |
|||
<el-col :span="12"> |
|||
<el-form-item label="近闸边坡稳定性" prop="nrgtslst"> |
|||
<el-input |
|||
v-model="form.nrgtslst" |
|||
placeholder="请输入近闸边坡稳定性" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="水闸堰型" prop="slwrst"> |
|||
<el-input v-model="form.slwrst" placeholder="请输入水闸堰型" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="闸孔净高" prop="gthlnthg"> |
|||
<el-input v-model="form.gthlnthg" placeholder="请输入闸孔净高" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="闸孔净宽" prop="gthlntwd"> |
|||
<el-input v-model="form.gthlntwd" placeholder="请输入闸孔净宽" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="闸身总宽" prop="gtttwd"> |
|||
<el-input v-model="form.gtttwd" placeholder="请输入闸身总宽" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="闸身总长" prop="gtttlen"> |
|||
<el-input v-model="form.gtttlen" placeholder="请输入闸身总长" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="闸门顶高程" prop="gttpel"> |
|||
<el-input v-model="form.gttpel" placeholder="请输入闸门顶高程" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="闸底板高程" prop="gtflel"> |
|||
<el-input v-model="form.gtflel" placeholder="请输入闸底板高程" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="消能型式" prop="endsst"> |
|||
<el-input v-model="form.endsst" placeholder="请输入消能型式" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="闸门型式" prop="gtst"> |
|||
<el-input v-model="form.gtst" placeholder="请输入闸门型式" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="闸门尺寸" prop="gtsz"> |
|||
<el-input v-model="form.gtsz" placeholder="请输入闸门尺寸" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="闸门自重" prop="gtddld"> |
|||
<el-input v-model="form.gtddld" placeholder="请输入闸门自重" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="闸基防渗措施" prop="gtbsasms"> |
|||
<el-input |
|||
v-model="form.gtbsasms" |
|||
placeholder="请输入闸基防渗措施" |
|||
/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="工作桥面宽度" prop="srbrwd"> |
|||
<el-input v-model="form.srbrwd" placeholder="请输入工作桥面宽度" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="工作桥面高程" prop="srbrel"> |
|||
<el-input v-model="form.srbrel" placeholder="请输入工作桥面高程" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="检修桥面宽度" prop="embrwd"> |
|||
<el-input v-model="form.embrwd" placeholder="请输入检修桥面宽度" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="检修桥面高程" prop="embrel"> |
|||
<el-input v-model="form.embrel" placeholder="请输入检修桥面高程" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="交通桥标准" prop="acbrst"> |
|||
<el-input v-model="form.acbrst" placeholder="请输入交通桥标准" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="交通桥面宽度" prop="acbrwd"> |
|||
<el-input v-model="form.acbrwd" placeholder="请输入交通桥面宽度" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="交通桥面高程" prop="acbrel"> |
|||
<el-input v-model="form.acbrel" placeholder="请输入交通桥面高程" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="备注" prop="note"> |
|||
<el-input v-model="form.note" placeholder="请输入备注" /> |
|||
</el-form-item> |
|||
</el-col> |
|||
<!-- <el-col :span="12"> |
|||
<el-form-item label="记录生效时间" prop="effDate"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="form.effDate" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择记录生效时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="记录失效时间" prop="exprDate"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="form.exprDate" |
|||
type="date" |
|||
value-format="yyyy-MM-dd" |
|||
placeholder="选择记录失效时间" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> --> |
|||
</el-form> |
|||
</el-row> |
|||
<div class="btnList"> |
|||
<el-button type="primary" @click="submitForm">保 存</el-button> |
|||
<el-button @click="cancel">取 消</el-button> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
listGcjg, |
|||
getGcjg, |
|||
delGcjg, |
|||
addGcjg, |
|||
updateGcjg, |
|||
exportGcjg, |
|||
} from "@/api/yg/gcjg"; |
|||
|
|||
export default { |
|||
name: "Gcjg", |
|||
data() { |
|||
return { |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 选中数组 |
|||
ids: [], |
|||
// 非单个禁用 |
|||
single: true, |
|||
// 非多个禁用 |
|||
multiple: true, |
|||
// 显示搜索条件 |
|||
showSearch: true, |
|||
// 总条数 |
|||
total: 0, |
|||
// 工程结构表格数据 |
|||
gcjgList: [], |
|||
// 弹出层标题 |
|||
title: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
ids: null, |
|||
data: { |
|||
nrgtslst: null, |
|||
slwrst: null, |
|||
gthlnthg: null, |
|||
gthlntwd: null, |
|||
gtttwd: null, |
|||
gtttlen: null, |
|||
gttpel: null, |
|||
gtflel: null, |
|||
endsst: null, |
|||
gtst: null, |
|||
gtsz: null, |
|||
gtddld: null, |
|||
gtbsasms: null, |
|||
srbrwd: null, |
|||
srbrel: null, |
|||
embrwd: null, |
|||
embrel: null, |
|||
acbrst: null, |
|||
acbrwd: null, |
|||
acbrel: null, |
|||
note: null, |
|||
effDate: null, |
|||
exprDate: null, |
|||
createUid: null, |
|||
updateUid: null, |
|||
owerDept: null, |
|||
relation: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sort: "desc", |
|||
}, |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: {}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
}, |
|||
methods: { |
|||
/** 查询工程结构列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
listGcjg(this.queryParams).then((response) => { |
|||
this.gcjgList = response.records; |
|||
this.total = response.total; |
|||
this.loading = false; |
|||
}); |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.open = false; |
|||
this.reset(); |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
wagaCode: null, |
|||
nrgtslst: null, |
|||
slwrst: null, |
|||
gthlnthg: null, |
|||
gthlntwd: null, |
|||
gtttwd: null, |
|||
gtttlen: null, |
|||
gttpel: null, |
|||
gtflel: null, |
|||
endsst: null, |
|||
gtst: null, |
|||
gtsz: null, |
|||
gtddld: null, |
|||
gtbsasms: null, |
|||
srbrwd: null, |
|||
srbrel: null, |
|||
embrwd: null, |
|||
embrel: null, |
|||
acbrst: null, |
|||
acbrwd: null, |
|||
acbrel: null, |
|||
note: null, |
|||
effDate: null, |
|||
exprDate: null, |
|||
createUid: null, |
|||
updateUid: null, |
|||
createTime: null, |
|||
updateTime: null, |
|||
owerDept: null, |
|||
remark: null, |
|||
relation: null, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
// 查询表单重置 |
|||
resetQueryForm() { |
|||
this.queryParams = { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
data: { |
|||
wagaCode: null, |
|||
nrgtslst: null, |
|||
slwrst: null, |
|||
gthlnthg: null, |
|||
gthlntwd: null, |
|||
gtttwd: null, |
|||
gtttlen: null, |
|||
gttpel: null, |
|||
gtflel: null, |
|||
endsst: null, |
|||
gtst: null, |
|||
gtsz: null, |
|||
gtddld: null, |
|||
gtbsasms: null, |
|||
srbrwd: null, |
|||
srbrel: null, |
|||
embrwd: null, |
|||
embrel: null, |
|||
acbrst: null, |
|||
acbrwd: null, |
|||
acbrel: null, |
|||
note: null, |
|||
effDate: null, |
|||
exprDate: null, |
|||
createUid: null, |
|||
updateUid: null, |
|||
createTime: null, |
|||
updateTime: null, |
|||
owerDept: null, |
|||
remark: null, |
|||
relation: null, |
|||
}, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
/** 搜索按钮操作 */ |
|||
handleQuery() { |
|||
this.queryParams.pageNum = 1; |
|||
this.getList(); |
|||
}, |
|||
/** 重置按钮操作 */ |
|||
resetQuery() { |
|||
this.resetQueryForm(); |
|||
this.handleQuery(); |
|||
}, |
|||
// 多选框选中数据 |
|||
handleSelectionChange(selection) { |
|||
this.ids = selection.map((item) => item.wagaCode); |
|||
this.single = selection.length !== 1; |
|||
this.multiple = !selection.length; |
|||
}, |
|||
/** 新增按钮操作 */ |
|||
handleAdd() { |
|||
this.reset(); |
|||
this.open = true; |
|||
this.title = "添加工程结构"; |
|||
}, |
|||
/** 修改按钮操作 */ |
|||
handleUpdate(row) { |
|||
this.reset(); |
|||
const wagaCode = row.wagaCode || this.ids; |
|||
getGcjg(wagaCode).then((response) => { |
|||
this.form = response.data; |
|||
this.open = true; |
|||
this.title = "修改工程结构"; |
|||
}); |
|||
}, |
|||
/** 提交按钮 */ |
|||
submitForm() { |
|||
this.$refs["form"].validate((valid) => { |
|||
if (valid) { |
|||
if (this.form.wagaCode != null) { |
|||
updateGcjg(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("修改成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} else { |
|||
addGcjg(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("新增成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
/** 删除按钮操作 */ |
|||
handleDelete(row) { |
|||
const ids = row.id || this.ids; |
|||
if (ids) { |
|||
this.$confirm("是否删除选中的数据?", "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return delGcjg(wagaCodes); |
|||
}) |
|||
.then(() => { |
|||
this.getList(); |
|||
this.msgSuccess("删除成功"); |
|||
}) |
|||
.catch(function () {}); |
|||
} else { |
|||
this.$message.warning("请选择要删除的数据!!"); |
|||
} |
|||
}, |
|||
/** 导出按钮操作 */ |
|||
handleExport() { |
|||
const queryParams = this.queryParams; |
|||
let message = "是否确认导出所有的数据项?"; |
|||
if (this.ids) { |
|||
message = "是否确认导出选中的数据项?"; |
|||
queryParams.ids = this.ids; |
|||
} |
|||
this.$confirm(message, "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return exportGcjg(queryParams); |
|||
}) |
|||
.then((response) => { |
|||
this.downloadFile(response, true, response.msg); |
|||
// this.download(response.msg); |
|||
}) |
|||
.catch(function () {}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
.btnList { |
|||
position: fixed; |
|||
bottom: 20px; |
|||
right: 20px; |
|||
z-index: 1; |
|||
} |
|||
</style> |
Loading…
Reference in new issue