7 changed files with 826 additions and 9 deletions
@ -0,0 +1,53 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 查询 风险隐患台账列表
|
||||
|
export function listLedger(query) { |
||||
|
return request({ |
||||
|
url: '/build/ledger/list', |
||||
|
method: 'post', |
||||
|
data: query |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 查询 风险隐患台账详细
|
||||
|
export function getLedger(id) { |
||||
|
return request({ |
||||
|
url: '/build/ledger/' + id, |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 新增 风险隐患台账
|
||||
|
export function addLedger(data) { |
||||
|
return request({ |
||||
|
url: '/build/ledger', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 修改 风险隐患台账
|
||||
|
export function updateLedger(data) { |
||||
|
return request({ |
||||
|
url: '/build/ledger', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 删除 风险隐患台账
|
||||
|
export function delLedger(id) { |
||||
|
return request({ |
||||
|
url: '/build/ledger/' + id, |
||||
|
method: 'delete' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 导出 风险隐患台账
|
||||
|
export function exportLedger(query) { |
||||
|
return request({ |
||||
|
url: '/build/ledger/export', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
@ -0,0 +1,53 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 查询隐患整改台账列表
|
||||
|
export function listRectification(query) { |
||||
|
return request({ |
||||
|
url: '/build/rectification/list', |
||||
|
method: 'post', |
||||
|
data: query |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 查询隐患整改台账详细
|
||||
|
export function getRectification(id) { |
||||
|
return request({ |
||||
|
url: '/build/rectification/' + id, |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 新增隐患整改台账
|
||||
|
export function addRectification(data) { |
||||
|
return request({ |
||||
|
url: '/build/rectification', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 修改隐患整改台账
|
||||
|
export function updateRectification(data) { |
||||
|
return request({ |
||||
|
url: '/build/rectification', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 删除隐患整改台账
|
||||
|
export function delRectification(id) { |
||||
|
return request({ |
||||
|
url: '/build/rectification/' + id, |
||||
|
method: 'delete' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 导出隐患整改台账
|
||||
|
export function exportRectification(query) { |
||||
|
return request({ |
||||
|
url: '/build/rectification/export', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<riskAndHiddenDangerLedger :proNo="proNo" :proCode="proCode" /> |
||||
|
<hiddenDangerRectificationLedger :proNo="proNo" :proCode="proCode" /> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import riskAndHiddenDangerLedger from "./riskAndHiddenDangerLedger.vue"; |
||||
|
import hiddenDangerRectificationLedger from "./hiddenDangerRectificationLedger.vue"; |
||||
|
|
||||
|
export default { |
||||
|
name: "DangerLedger", |
||||
|
props: ["proNo", "proCode"], |
||||
|
components: { riskAndHiddenDangerLedger, hiddenDangerRectificationLedger }, |
||||
|
data() { |
||||
|
return {}; |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
@ -0,0 +1,348 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div class="listTitle"> |
||||
|
<span>隐患整改台账</span> |
||||
|
<span class="addBtn" @click="handleAdd(2)"> |
||||
|
<i class="el-icon-plus"></i> |
||||
|
添加 |
||||
|
</span> |
||||
|
</div> |
||||
|
<el-table v-loading="loading" :data="filingsList"> |
||||
|
<el-table-column label="序号" type="index" width="50" align="center" /> |
||||
|
<el-table-column |
||||
|
label="整改状态" |
||||
|
align="center" |
||||
|
prop="rectificationStatus" |
||||
|
min-width="120" |
||||
|
/> |
||||
|
<el-table-column |
||||
|
label="隐患描述" |
||||
|
align="center" |
||||
|
prop="hazardDescription" |
||||
|
min-width="120" |
||||
|
/> |
||||
|
<el-table-column |
||||
|
label="整改措施" |
||||
|
align="center" |
||||
|
prop="rectificationMeasures" |
||||
|
min-width="120" |
||||
|
/> |
||||
|
<el-table-column |
||||
|
label="所在工区" |
||||
|
align="center" |
||||
|
prop="hazardLocationArea" |
||||
|
min-width="120" |
||||
|
/> |
||||
|
|
||||
|
<el-table-column |
||||
|
label="整改日期" |
||||
|
align="center" |
||||
|
prop="rectificationDate" |
||||
|
min-width="120" |
||||
|
/> |
||||
|
|
||||
|
<el-table-column |
||||
|
label="整改后审核意见" |
||||
|
align="center" |
||||
|
prop="reviewOpinionsAfterRectification" |
||||
|
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-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
>修改</el-button |
||||
|
> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleDelete(scope.row)" |
||||
|
>删除</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="closeDialog" |
||||
|
:close-on-click-modal="false" |
||||
|
> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px"> |
||||
|
<el-form-item label="整改状态" prop="rectificationStatus"> |
||||
|
<el-input |
||||
|
v-model="form.rectificationStatus" |
||||
|
type="textarea" |
||||
|
placeholder="请输入整改状态" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="隐患描述" prop="hazardDescription"> |
||||
|
<el-input |
||||
|
v-model="form.hazardDescription" |
||||
|
type="textarea" |
||||
|
placeholder="请输入隐患描述" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="整改措施" prop="rectificationMeasures"> |
||||
|
<el-input |
||||
|
v-model="form.rectificationMeasures" |
||||
|
type="textarea" |
||||
|
placeholder="请输入整改措施" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="所在工区" prop="hazardLocationArea"> |
||||
|
<el-input |
||||
|
v-model="form.hazardLocationArea" |
||||
|
type="textarea" |
||||
|
placeholder="请输入所在工区" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="整改日期" prop="rectificationDate"> |
||||
|
<el-date-picker |
||||
|
v-model="form.rectificationDate" |
||||
|
type="year" |
||||
|
placeholder="请选择整改日期" |
||||
|
style="width: 100%" |
||||
|
value-format="yyyy" |
||||
|
> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item |
||||
|
label="整改后审核意见" |
||||
|
prop="reviewOpinionsAfterRectification" |
||||
|
> |
||||
|
<el-input |
||||
|
v-model="form.reviewOpinionsAfterRectification" |
||||
|
type="textarea" |
||||
|
placeholder="请输入整改后审核意见" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<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 { |
||||
|
listRectification, |
||||
|
getRectification, |
||||
|
addRectification, |
||||
|
updateRectification, |
||||
|
delRectification, |
||||
|
exportRectification, |
||||
|
} from "@/api/build/rectification"; |
||||
|
|
||||
|
export default { |
||||
|
name: "Filings", |
||||
|
props: ["proNo", "proCode"], |
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
ids: null, |
||||
|
data: {}, |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: {}, |
||||
|
|
||||
|
filingsList: [], |
||||
|
}; |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList(); |
||||
|
}, |
||||
|
methods: { |
||||
|
closeDialog() {}, |
||||
|
/** 查询安全备案列表 */ |
||||
|
getList() { |
||||
|
this.loading = true; |
||||
|
this.queryParams.data.proNo = this.proNo; |
||||
|
this.queryParams.data.proCode = this.proCode; |
||||
|
listRectification(this.queryParams).then((response) => { |
||||
|
this.filingsList = response.records; |
||||
|
this.total = response.total; |
||||
|
this.loading = false; |
||||
|
}); |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false; |
||||
|
this.reset(); |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
id: null, |
||||
|
}; |
||||
|
this.resetForm("form"); |
||||
|
}, |
||||
|
// 查询表单重置 |
||||
|
resetQueryForm() { |
||||
|
this.queryParams = { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
data: {}, |
||||
|
}; |
||||
|
this.resetForm("form"); |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1; |
||||
|
this.getList(); |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetQueryForm(); |
||||
|
this.handleQuery(); |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map((item) => item.id); |
||||
|
this.single = selection.length !== 1; |
||||
|
this.multiple = !selection.length; |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd(type) { |
||||
|
this.reset(); |
||||
|
this.open = true; |
||||
|
this.form.type = type; |
||||
|
if (this.form.type == 1) { |
||||
|
this.title = "添加整体措施方案"; |
||||
|
} else { |
||||
|
this.title = "添加度汛方案"; |
||||
|
} |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset(); |
||||
|
const id = row.id || this.ids; |
||||
|
getRectification(id).then((response) => { |
||||
|
this.form = response.data; |
||||
|
this.open = true; |
||||
|
}); |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.form.proNo = this.proNo; |
||||
|
this.form.proCode = this.proCode; |
||||
|
if (this.form.id != null) { |
||||
|
updateRectification(this.form).then((response) => { |
||||
|
if (response.code === 200) { |
||||
|
this.msgSuccess("修改成功"); |
||||
|
this.open = false; |
||||
|
this.getList(); |
||||
|
} |
||||
|
}); |
||||
|
} else { |
||||
|
addRectification(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 delRectification(ids); |
||||
|
}) |
||||
|
.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: 10vh !important; |
||||
|
// } |
||||
|
// } |
||||
|
.listTitle { |
||||
|
font-size: 14px; |
||||
|
padding-left: 10px; |
||||
|
padding-right: 30px; |
||||
|
margin: 20px 0; |
||||
|
border-left: 2px solid #36b29e; |
||||
|
display: flex; |
||||
|
justify-content: space-between; |
||||
|
span:nth-child(1) { |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
.addBtn { |
||||
|
color: #36b29e; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
.addBtn:hover { |
||||
|
color: #31a08e; |
||||
|
} |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,345 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div class="listTitle"> |
||||
|
<span>风险隐患台账列表</span> |
||||
|
<span class="addBtn" @click="handleAdd(2)"> |
||||
|
<i class="el-icon-plus"></i> |
||||
|
添加 |
||||
|
</span> |
||||
|
</div> |
||||
|
<el-table v-loading="loading" :data="filingsList"> |
||||
|
<el-table-column label="序号" type="index" width="50" align="center" /> |
||||
|
<el-table-column |
||||
|
label="整改状态" |
||||
|
align="center" |
||||
|
prop="rectificationStatus" |
||||
|
min-width="120" |
||||
|
/> |
||||
|
<el-table-column |
||||
|
label="隐患描述" |
||||
|
align="center" |
||||
|
prop="hazardDescription" |
||||
|
min-width="120" |
||||
|
/> |
||||
|
<el-table-column |
||||
|
label="整改措施" |
||||
|
align="center" |
||||
|
prop="rectificationMeasures" |
||||
|
min-width="120" |
||||
|
/> |
||||
|
<el-table-column |
||||
|
label="所在工区" |
||||
|
align="center" |
||||
|
prop="hazardLocationArea" |
||||
|
min-width="120" |
||||
|
/> |
||||
|
|
||||
|
<el-table-column |
||||
|
label="检查日期" |
||||
|
align="center" |
||||
|
prop="inspectionDate" |
||||
|
min-width="120" |
||||
|
/> |
||||
|
|
||||
|
<el-table-column |
||||
|
label="其他隐患详情信息" |
||||
|
align="center" |
||||
|
prop="hazardDetailsInformation" |
||||
|
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-edit" |
||||
|
@click="handleUpdate(scope.row)" |
||||
|
>修改</el-button |
||||
|
> |
||||
|
<el-button |
||||
|
size="mini" |
||||
|
type="text" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleDelete(scope.row)" |
||||
|
>删除</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="closeDialog" |
||||
|
:close-on-click-modal="false" |
||||
|
> |
||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px"> |
||||
|
<el-form-item label="整改状态" prop="rectificationStatus"> |
||||
|
<el-input |
||||
|
v-model="form.rectificationStatus" |
||||
|
type="textarea" |
||||
|
placeholder="请输入整改状态" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item label="隐患描述" prop="hazardDescription"> |
||||
|
<el-input |
||||
|
v-model="form.hazardDescription" |
||||
|
type="textarea" |
||||
|
placeholder="请输入隐患描述" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="整改措施" prop="rectificationMeasures"> |
||||
|
<el-input |
||||
|
v-model="form.rectificationMeasures" |
||||
|
type="textarea" |
||||
|
placeholder="请输入整改措施" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="所在工区" prop="hazardLocationArea"> |
||||
|
<el-input |
||||
|
v-model="form.hazardLocationArea" |
||||
|
type="textarea" |
||||
|
placeholder="请输入所在工区" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="检查日期" prop="inspectionDate"> |
||||
|
<el-date-picker |
||||
|
v-model="form.inspectionDate" |
||||
|
type="year" |
||||
|
placeholder="请选择检查日期" |
||||
|
style="width: 100%" |
||||
|
value-format="yyyy" |
||||
|
> |
||||
|
</el-date-picker> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="其他隐患详情信息" prop="hazardDetailsInformation"> |
||||
|
<el-input |
||||
|
v-model="form.hazardDetailsInformation" |
||||
|
type="textarea" |
||||
|
placeholder="请输入所在工区" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<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 { |
||||
|
listLedger, |
||||
|
getLedger, |
||||
|
addLedger, |
||||
|
updateLedger, |
||||
|
delLedger, |
||||
|
exportLedger, |
||||
|
} from "@/api/build/ledger"; |
||||
|
|
||||
|
export default { |
||||
|
name: "Filings", |
||||
|
props: ["proNo", "proCode"], |
||||
|
data() { |
||||
|
return { |
||||
|
// 遮罩层 |
||||
|
loading: true, |
||||
|
// 选中数组 |
||||
|
ids: [], |
||||
|
// 非单个禁用 |
||||
|
single: true, |
||||
|
// 非多个禁用 |
||||
|
multiple: true, |
||||
|
// 显示搜索条件 |
||||
|
showSearch: true, |
||||
|
// 总条数 |
||||
|
total: 0, |
||||
|
// 弹出层标题 |
||||
|
title: "", |
||||
|
// 是否显示弹出层 |
||||
|
open: false, |
||||
|
// 查询参数 |
||||
|
queryParams: { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
ids: null, |
||||
|
data: {}, |
||||
|
}, |
||||
|
// 表单参数 |
||||
|
form: {}, |
||||
|
// 表单校验 |
||||
|
rules: {}, |
||||
|
|
||||
|
filingsList: [], |
||||
|
}; |
||||
|
}, |
||||
|
created() { |
||||
|
this.getList(); |
||||
|
}, |
||||
|
methods: { |
||||
|
closeDialog() {}, |
||||
|
/** 查询安全备案列表 */ |
||||
|
getList() { |
||||
|
this.loading = true; |
||||
|
this.queryParams.data.proNo = this.proNo; |
||||
|
this.queryParams.data.proCode = this.proCode; |
||||
|
listLedger(this.queryParams).then((response) => { |
||||
|
this.filingsList = response.records; |
||||
|
this.total = response.total; |
||||
|
this.loading = false; |
||||
|
}); |
||||
|
}, |
||||
|
// 取消按钮 |
||||
|
cancel() { |
||||
|
this.open = false; |
||||
|
this.reset(); |
||||
|
}, |
||||
|
// 表单重置 |
||||
|
reset() { |
||||
|
this.form = { |
||||
|
id: null, |
||||
|
}; |
||||
|
this.resetForm("form"); |
||||
|
}, |
||||
|
// 查询表单重置 |
||||
|
resetQueryForm() { |
||||
|
this.queryParams = { |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
data: {}, |
||||
|
}; |
||||
|
this.resetForm("form"); |
||||
|
}, |
||||
|
/** 搜索按钮操作 */ |
||||
|
handleQuery() { |
||||
|
this.queryParams.pageNum = 1; |
||||
|
this.getList(); |
||||
|
}, |
||||
|
/** 重置按钮操作 */ |
||||
|
resetQuery() { |
||||
|
this.resetQueryForm(); |
||||
|
this.handleQuery(); |
||||
|
}, |
||||
|
// 多选框选中数据 |
||||
|
handleSelectionChange(selection) { |
||||
|
this.ids = selection.map((item) => item.id); |
||||
|
this.single = selection.length !== 1; |
||||
|
this.multiple = !selection.length; |
||||
|
}, |
||||
|
/** 新增按钮操作 */ |
||||
|
handleAdd(type) { |
||||
|
this.reset(); |
||||
|
this.open = true; |
||||
|
this.form.type = type; |
||||
|
if (this.form.type == 1) { |
||||
|
this.title = "添加整体措施方案"; |
||||
|
} else { |
||||
|
this.title = "添加度汛方案"; |
||||
|
} |
||||
|
}, |
||||
|
/** 修改按钮操作 */ |
||||
|
handleUpdate(row) { |
||||
|
this.reset(); |
||||
|
const id = row.id || this.ids; |
||||
|
getLedger(id).then((response) => { |
||||
|
this.form = response.data; |
||||
|
this.open = true; |
||||
|
}); |
||||
|
}, |
||||
|
/** 提交按钮 */ |
||||
|
submitForm() { |
||||
|
this.$refs["form"].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.form.proNo = this.proNo; |
||||
|
this.form.proCode = this.proCode; |
||||
|
if (this.form.id != null) { |
||||
|
updateLedger(this.form).then((response) => { |
||||
|
if (response.code === 200) { |
||||
|
this.msgSuccess("修改成功"); |
||||
|
this.open = false; |
||||
|
this.getList(); |
||||
|
} |
||||
|
}); |
||||
|
} else { |
||||
|
addLedger(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 delLedger(ids); |
||||
|
}) |
||||
|
.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: 10vh !important; |
||||
|
// } |
||||
|
// } |
||||
|
.listTitle { |
||||
|
font-size: 14px; |
||||
|
padding-left: 10px; |
||||
|
padding-right: 30px; |
||||
|
margin: 20px 0; |
||||
|
border-left: 2px solid #36b29e; |
||||
|
display: flex; |
||||
|
justify-content: space-between; |
||||
|
span:nth-child(1) { |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
.addBtn { |
||||
|
color: #36b29e; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
.addBtn:hover { |
||||
|
color: #31a08e; |
||||
|
} |
||||
|
} |
||||
|
</style> |
Loading…
Reference in new issue