diff --git a/src/api/dike/index.js b/src/api/dike/index.js index b40a67c..1a696db 100644 --- a/src/api/dike/index.js +++ b/src/api/dike/index.js @@ -27,7 +27,16 @@ export function postProjectChecking(data) { }) } -// 海堤动物防治--获取海堤上报记录详情 +// 害堤动物防治--堤防列表 +export function getDikeAnimalProList(data) { + return request({ + url: `/run/df/animal/project/list`, + method: 'post', + data + }) +} + +// 害堤动物防治--获取海堤上报记录详情 export function getDikeAnimalRecordDetails(id) { return request({ url: `/run/df/animal/record/${id}`, diff --git a/src/api/system/dict/data.js b/src/api/system/dict/data.js index 5735481..fa7daf9 100644 --- a/src/api/system/dict/data.js +++ b/src/api/system/dict/data.js @@ -1,5 +1,14 @@ import request from '@/utils/request' +// 查询字典数据map +export function Data(query) { + return request({ + url: '/system/dict/data/map', + method: 'post', + data: query + }) +} + // 查询字典数据列表 export function listData(query) { return request({ diff --git a/src/views/dike/runManage/pestAnimalControl/controlManage/index.vue b/src/views/dike/runManage/pestAnimalControl/controlManage/index.vue new file mode 100644 index 0000000..741743a --- /dev/null +++ b/src/views/dike/runManage/pestAnimalControl/controlManage/index.vue @@ -0,0 +1,355 @@ + + + + diff --git a/src/views/dike/runManage/pestAnimalControl/governanceRecords/index.vue b/src/views/dike/runManage/pestAnimalControl/governanceRecords/index.vue index 4f06f43..82ec136 100644 --- a/src/views/dike/runManage/pestAnimalControl/governanceRecords/index.vue +++ b/src/views/dike/runManage/pestAnimalControl/governanceRecords/index.vue @@ -7,9 +7,9 @@ import { postDFMaintenancePlanList, getDFMaintenancePlan, listUser, + getDFPreventionControlPlan, postDFPreventionControlPlanList, } from "@/api/management"; -import { getDikeAnimalRecordDetails } from "@/api/dike"; export default { name: "InspectionItems", data() { @@ -60,10 +60,12 @@ export default { total: 0, // 总数量 }, planForm: { + planId: "", + planName: "", dikeCode: "", + type: "", name: "", - planTime: 0, - nationalSupplement: "", + instruction: "", workMonth: "1月", reminderCycle: "", selectDate: 1, @@ -91,7 +93,7 @@ export default { planTime: [ { required: true, message: "请选择计划名称", trigger: "change" }, ], - nationalSupplement: [ + instruction: [ { required: true, message: "请输入资金", trigger: "change" }, ], workMonth: [ @@ -167,8 +169,7 @@ export default { getDFMaintenancePlan(row.id).then((res) => { console.log("🚀res🚀", res); this.planForm = res.data; - this.planForm.reminderCycle = - res.data.nationalSupplement + res.data.workMonth; + this.planForm.reminderCycle = res.data.instruction + res.data.workMonth; this.dialogVisible = true; }); }, @@ -224,7 +225,7 @@ export default { dikeCode: "", name: "", planTime: "", - nationalSupplement: 0, + instruction: "", workMonth: 0, location: "", reminderCycle: 0, @@ -257,7 +258,6 @@ export default { this.tableData = res.records; this.pageData.total = res.total; } - console.log("🚀表格数据🚀", res); }); }, // 重置搜索 @@ -289,10 +289,16 @@ export default { }, // 选中某个计划 changeDikePlan(planId) { - console.log("planId >>>>> ", planId); if (planId) { - getDFMaintenancePlan(planId).then((res) => { - console.log("getDikeAnimalRecordDetails >>>>> ", res); + getDFPreventionControlPlan(planId).then((res) => { + console.log("res >>>>> ", res); + if (res) { + this.planForm.dikeCode = res.dikeCode; + this.planForm.dikeName = res.dikeName || res.dikeCode; + this.planForm.planId = planId; + this.planForm.planName = res.name; + this.planForm.instruction = res.instruction; + } }); } }, @@ -346,11 +352,7 @@ export default { - + - + - + { - this.ruleForm = res.data; - this.ruleForm.reminderCycle = res.data.instruction + res.data.month; this.dialogVisible = true; + setTimeout(() => { + this.ruleForm = res.data; + this.ruleForm.reminderCycle = res.data.instruction + res.data.month; + }, 30); }); }, changeOtherConfigSelectUser(idsArr) { @@ -205,8 +208,6 @@ export default { this.ruleForm.cycleType = parseFloat(this.ruleForm.cycleType); this.ruleForm.frequency = parseFloat(this.ruleForm.frequency); this.ruleForm.month = parseFloat(this.ruleForm.month); - this.ruleForm.type = parseFloat(this.ruleForm.type); - this.dialogVisible = false; if (this.ruleForm.id) { putDFPreventionControlPlan(this.ruleForm).then(() => { this.getTableData(); @@ -239,18 +240,25 @@ export default { this.dialogVisible = false; }, // 关闭dialog - closeDialog(ruleForm = "ruleForm") { + handleClose(ruleForm = "ruleForm") { + console.log("关闭"); this.$refs[ruleForm].resetFields(); this.ruleForm = { dikeCode: "", + dikeName: "", name: "", - type: 0, + type: "", instruction: "", month: "", details: [], cycleType: "", isReminder: true, selectUser: [], + otherConfig: { + selectUser: [], + week: "", + day: "", + }, week: 1, date: 1, reminderTime: "", @@ -328,8 +336,11 @@ export default { }); }, handleChangeDike(value) { + console.log("value >>>>> ", value); this.ruleForm.name = this.ruleForm.dikeCode; - // let res = this.embankmentList.find(v=> v.dikeCode === value) + let res = this.embankmentList.find((v) => v.dikeCode === value); + console.log("res >>>>> ", res); + this.ruleForm.dikeName = res?.dikeName; // this.dikeDetailsDialog.id = res?.id || '' }, }, @@ -363,22 +374,6 @@ export default { v-model="paramsData.name" placeholder="请输入" /> - 防治堤防: - - 堤防级别: - - - - 防治类型: @@ -399,37 +394,21 @@ export default { style="margin-right: 16px; margin-bottom: 8px; float: right" type="success" @click="openAddDialog()" - >添加新增 - - - - - - - + - @@ -481,7 +457,7 @@ export default {