@@ -726,6 +726,7 @@ import {
updateBzhjs,
exportBzhjs,
} from "@/api/yg/dike/bzhjs";
+import {listCriteria,addCriteria,updateCriteria} from "@/api/yg/criteria"
import { listJbxx } from "@/api/yg/dike/jbxx";
import { getToken } from "@/utils/auth";
import { getFileStream } from "@/api/system/upload";
@@ -752,7 +753,9 @@ export default {
total: 0,
// 堤防标准化建设表格数据
bzhjsList: [],
- jlForm:{},
+ jlForm:{
+ type: '2',
+ },
// 弹出层标题
title: "",
// 是否显示弹出层
@@ -784,6 +787,13 @@ export default {
sortBy: "desc",
},
},
+ criteriaQueryParams:{
+ pageNum: 1,
+ pageSize: 10,
+ data: {
+ type: '2',
+ }
+ },
// 表单参数
form: {
// status: "0", //新增
@@ -833,9 +843,29 @@ export default {
});
},
methods: {
+ handleQueryCriteria(){
+ listCriteria(this.criteriaQueryParams).then(res =>{
+ if (res.records.length){
+ this.jlForm = res.records[0];
+ }
+ })
+ },
handleSubmit(){
- this.dialogVisible = false;
- this.jlForm = {};
+ if (this.jlForm.id != null){
+ updateCriteria(this.jlForm).then(res =>{
+ if (res.code === 200) {
+ this.msgSuccess("修改成功");
+ this.dialogVisible = false;
+ }
+ })
+ }else {
+ addCriteria(this.jlForm).then(res =>{
+ if (res.code === 200) {
+ this.msgSuccess("新增成功");
+ this.dialogVisible = false;
+ }
+ })
+ }
},
handleClose(){
@@ -867,7 +897,7 @@ export default {
return '一级'
},
handleIncentive(){
- console.log(111)
+ this.handleQueryCriteria();
this.dialogVisible = true;
},
diff --git a/src/views/sluice/managementGuarantee/standardizationConstruction/listPage/index.vue b/src/views/sluice/managementGuarantee/standardizationConstruction/listPage/index.vue
index 014c310..13ae622 100644
--- a/src/views/sluice/managementGuarantee/standardizationConstruction/listPage/index.vue
+++ b/src/views/sluice/managementGuarantee/standardizationConstruction/listPage/index.vue
@@ -206,12 +206,12 @@
width="600px"
center
:close-on-click-modal="false"
- :close-on-press-escape="false"
+ @close="handleClose"
>
-
+
(一: 900 分以上, 前四类 85%; 二: 800 分以上,前四类 75%; 三: 700 分以上,前四类 65%;
不达标 700 分以下, 前四类 65%)
@@ -229,7 +229,7 @@
@@ -237,7 +237,7 @@
@@ -247,7 +247,7 @@
@@ -728,6 +728,7 @@ import { listJbxx } from "@/api/yg/jbxx";
import { getToken } from "@/utils/auth";
import { getFileStream } from "@/api/system/upload";
import linkSluice from "@/components/linkNameSelect/linkSluice.vue";
+import {addCriteria, listCriteria, updateCriteria} from "@/api/yg/criteria";
export default {
name: "Bzhjs",
@@ -747,7 +748,9 @@ export default {
multiple: true,
// 显示搜索条件
showSearch: true,
- jlForm:{},
+ jlForm:{
+ type: '1',
+ },
// 总条数
total: 0,
// 水闸标准化建设表格数据
@@ -810,6 +813,13 @@ export default {
3: "审核通过",
4: "已备案",
},
+ criteriaQueryParams:{
+ pageNum: 1,
+ pageSize: 10,
+ data: {
+ type: '1'
+ }
+ },
};
},
created() {
@@ -828,8 +838,38 @@ export default {
});
},
methods: {
+ handleQueryCriteria(){
+ listCriteria(this.criteriaQueryParams).then(res =>{
+ if (res.records.length){
+ this.jlForm = res.records[0];
+ }
+ })
+ },
+ handleSubmit(){
+ if (this.jlForm.id != null){
+ updateCriteria(this.jlForm).then(res =>{
+ if (res.code === 200) {
+ this.msgSuccess("修改成功");
+ this.dialogVisible = false;
+ }
+ })
+ }else {
+ addCriteria(this.jlForm).then(res =>{
+ if (res.code === 200) {
+ this.msgSuccess("新增成功");
+ this.dialogVisible = false;
+ }
+ })
+ }
+ },
+
+ handleClose(){
+ this.dialogVisible = false;
+ this.jlForm = {};
+ },
+
handleIncentive(){
- console.log(111)
+ this.handleQueryCriteria();
this.dialogVisible = true;
},
getScore(row){