From f9df497d028eb3eafbbc2f93368249bdb5edb25c Mon Sep 17 00:00:00 2001 From: liao hh Date: Wed, 26 Mar 2025 18:09:06 +0800 Subject: [PATCH] update --- src/api/yg/criteria.js | 53 ++++++++++++++++++ .../listPage/index.vue | 44 ++++++++++++--- .../listPage/index.vue | 54 ++++++++++++++++--- 3 files changed, 137 insertions(+), 14 deletions(-) create mode 100644 src/api/yg/criteria.js diff --git a/src/api/yg/criteria.js b/src/api/yg/criteria.js new file mode 100644 index 0000000..15aa878 --- /dev/null +++ b/src/api/yg/criteria.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询奖惩管理列表 +export function listCriteria(query) { + return request({ + url: '/system/criteria/list', + method: 'post', + data: query + }) +} + +// 查询奖惩管理详细 +export function getCriteria(id) { + return request({ + url: '/system/criteria/' + id, + method: 'get' + }) +} + +// 新增奖惩管理 +export function addCriteria(data) { + return request({ + url: '/system/criteria', + method: 'post', + data: data + }) +} + +// 修改奖惩管理 +export function updateCriteria(data) { + return request({ + url: '/system/criteria', + method: 'put', + data: data + }) +} + +// 删除奖惩管理 +export function delCriteria(id) { + return request({ + url: '/system/criteria/' + id, + method: 'delete' + }) +} + +// 导出奖惩管理 +export function exportCriteria(query) { + return request({ + url: '/system/criteria/export', + method: 'get', + params: query + }) +} diff --git a/src/views/dike/managementGuarantee/standardizationConstruction/listPage/index.vue b/src/views/dike/managementGuarantee/standardizationConstruction/listPage/index.vue index 654190b..bd52bc0 100644 --- a/src/views/dike/managementGuarantee/standardizationConstruction/listPage/index.vue +++ b/src/views/dike/managementGuarantee/standardizationConstruction/listPage/index.vue @@ -672,7 +672,7 @@
-
广东省司价标准
+
广东省评价标准
(一: 900 分以上, 前四类 85%; 二: 800 分以上,前四类 75%; 三: 700 分以上,前四类 65%; 不达标 700 分以下, 前四类 65%) @@ -690,7 +690,7 @@
奖励机制
@@ -698,7 +698,7 @@
惩处措施
@@ -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){