|
|
@ -4,12 +4,14 @@ import { |
|
|
|
putDFMaintenancePlan, |
|
|
|
deleteDFMaintenancePlan, |
|
|
|
postDFMaintenancePlan, |
|
|
|
postDFMaintenancePlanList, |
|
|
|
getDFMaintenancePlan, |
|
|
|
listUser, |
|
|
|
getDFPreventionControlPlan, |
|
|
|
postDFPreventionControlPlanList, |
|
|
|
} from "@/api/management"; |
|
|
|
|
|
|
|
import { getDikeAnimalRecordsList } from "@/api/dike"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "InspectionItems", |
|
|
|
data() { |
|
|
@ -25,6 +27,7 @@ export default { |
|
|
|
planList: [], //计划列表 |
|
|
|
personnelList: [], // 人员列表 |
|
|
|
controlType: [], |
|
|
|
patrolType: [], |
|
|
|
statusList: [ |
|
|
|
{ |
|
|
|
dictLabel: "已确认", |
|
|
@ -35,24 +38,10 @@ export default { |
|
|
|
dictValue: "0", |
|
|
|
}, |
|
|
|
], |
|
|
|
monthsList: [], // 月份字典 |
|
|
|
tableData: [], // 检查列表 |
|
|
|
workTable: [ |
|
|
|
{ |
|
|
|
id: 1, |
|
|
|
content: |
|
|
|
"对堤坝进行巡查,对发现的红火蚁巢穴、鼠洞及时处理并对鼠洞进行回填。", |
|
|
|
date: "11月1日-11月30日", |
|
|
|
weekday: "1", |
|
|
|
}, |
|
|
|
], // 工作内容表格 |
|
|
|
drugTable: [ |
|
|
|
{ |
|
|
|
id: 1, |
|
|
|
name: "杀虫剂", |
|
|
|
concentration: "80%", |
|
|
|
dose: "1瓶", |
|
|
|
}, |
|
|
|
], |
|
|
|
workTable: [], // 工作内容表格 |
|
|
|
drugTable: [], |
|
|
|
pageData: { |
|
|
|
pageNum: 1, // 当前页 |
|
|
|
pageSize: 10, // 请求数量 |
|
|
@ -66,9 +55,9 @@ export default { |
|
|
|
type: "", |
|
|
|
name: "", |
|
|
|
instruction: "", |
|
|
|
workMonth: "1月", |
|
|
|
month: "", |
|
|
|
reminderCycle: "", |
|
|
|
selectDate: 1, |
|
|
|
cycleType: null, |
|
|
|
selectUser: [], |
|
|
|
messageReminder: false, |
|
|
|
week: 1, |
|
|
@ -83,22 +72,12 @@ export default { |
|
|
|
notes: "", |
|
|
|
}, |
|
|
|
planRules: { |
|
|
|
planId: [{ required: true, message: "请选择计划", trigger: "blur" }], |
|
|
|
dikeCode: [ |
|
|
|
{ required: true, message: "请选择堤防名称", trigger: "blur" }, |
|
|
|
], |
|
|
|
name: [ |
|
|
|
{ required: true, message: "请输入维养计划名称", trigger: "blur" }, |
|
|
|
{ max: 100, message: "名称最长为100个字符", trigger: "blur" }, |
|
|
|
], |
|
|
|
planTime: [ |
|
|
|
{ required: true, message: "请选择计划名称", trigger: "change" }, |
|
|
|
], |
|
|
|
instruction: [ |
|
|
|
{ required: true, message: "请输入资金", trigger: "change" }, |
|
|
|
], |
|
|
|
workMonth: [ |
|
|
|
{ required: true, message: "请输入资金", trigger: "change" }, |
|
|
|
], |
|
|
|
type: [{ required: true, message: "请选择计划", trigger: "change" }], |
|
|
|
month: [{ required: true, message: "请选择月份", trigger: "change" }], |
|
|
|
reminderCycle: [ |
|
|
|
{ required: true, message: "请选择提醒日期", trigger: "change" }, |
|
|
|
], |
|
|
@ -169,7 +148,7 @@ export default { |
|
|
|
getDFMaintenancePlan(row.id).then((res) => { |
|
|
|
console.log("🚀res🚀", res); |
|
|
|
this.planForm = res.data; |
|
|
|
this.planForm.reminderCycle = res.data.instruction + res.data.workMonth; |
|
|
|
// this.planForm.reminderCycle = res.data.instruction + res.data.month; // ?????? |
|
|
|
this.dialogVisible = true; |
|
|
|
}); |
|
|
|
}, |
|
|
@ -226,9 +205,8 @@ export default { |
|
|
|
name: "", |
|
|
|
planTime: "", |
|
|
|
instruction: "", |
|
|
|
workMonth: 0, |
|
|
|
month: 0, |
|
|
|
location: "", |
|
|
|
reminderCycle: 0, |
|
|
|
content: "", |
|
|
|
}; |
|
|
|
}, |
|
|
@ -243,7 +221,7 @@ export default { |
|
|
|
}, |
|
|
|
// 获取数据 |
|
|
|
getTableData() { |
|
|
|
postDFMaintenancePlanList({ |
|
|
|
getDikeAnimalRecordsList({ |
|
|
|
data: { |
|
|
|
timeView: { |
|
|
|
timeField: "create_time", |
|
|
@ -292,12 +270,17 @@ export default { |
|
|
|
if (planId) { |
|
|
|
getDFPreventionControlPlan(planId).then((res) => { |
|
|
|
console.log("res >>>>> ", res); |
|
|
|
if (res) { |
|
|
|
this.planForm.dikeCode = res.dikeCode; |
|
|
|
this.planForm.dikeName = res.dikeName || res.dikeCode; |
|
|
|
if (res?.data) { |
|
|
|
const { data } = res; |
|
|
|
this.planForm.dikeCode = data.dikeCode; |
|
|
|
this.planForm.dikeName = data.dikeName || data.dikeCode; |
|
|
|
this.planForm.planId = planId; |
|
|
|
this.planForm.planName = res.name; |
|
|
|
this.planForm.instruction = res.instruction; |
|
|
|
this.planForm.planName = data.name; |
|
|
|
this.planForm.type = data.type; |
|
|
|
this.planForm.instruction = data.instruction; |
|
|
|
this.planForm.details = data.details; |
|
|
|
this.planForm.frequency = data.frequency; |
|
|
|
this.planForm.cycleType = data.cycleType; |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
@ -307,6 +290,12 @@ export default { |
|
|
|
this.getDicts("dh_jh_type").then((res) => { |
|
|
|
this.controlType = res.data; |
|
|
|
}); |
|
|
|
this.getDicts("xc_w_month").then((res) => { |
|
|
|
this.monthsList = res.data; |
|
|
|
}); |
|
|
|
this.getDicts("xs_cycle_type").then((res) => { |
|
|
|
this.patrolType = res.data; |
|
|
|
}); |
|
|
|
// 获取列表数据 |
|
|
|
this.getTableData(); |
|
|
|
}, |
|
|
@ -338,15 +327,16 @@ export default { |
|
|
|
>搜索</el-button |
|
|
|
> |
|
|
|
<el-button @click="resetSearch()">重置</el-button> |
|
|
|
|
|
|
|
<el-button |
|
|
|
class="search-btn" |
|
|
|
style="margin-right: 16px; margin-bottom: 8px; float: right" |
|
|
|
type="success" |
|
|
|
@click="dialogVisible = true" |
|
|
|
>添加</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
<el-button |
|
|
|
class="search-btn" |
|
|
|
style="margin-right: 16px; margin-bottom: 8px; float: right" |
|
|
|
type="success" |
|
|
|
@click="dialogVisible = true" |
|
|
|
>添加</el-button |
|
|
|
> |
|
|
|
<el-table class="table" height="590" :data="tableData" border> |
|
|
|
<el-table class="table" height="640" :data="tableData" border> |
|
|
|
<el-table-column type="index" align="center" label="序号" width="100" /> |
|
|
|
<el-table-column prop="name" align="center" label="防治计划名称" /> |
|
|
|
<el-table-column prop="" align="center" label="防治堤防" /> |
|
|
@ -419,7 +409,7 @@ export default { |
|
|
|
title="新增/编辑防治记录" |
|
|
|
@close="closeDialog" |
|
|
|
:visible.sync="dialogVisible" |
|
|
|
width="50%" |
|
|
|
width="720" |
|
|
|
> |
|
|
|
<div style="display: flex; margin-bottom: 16px"> |
|
|
|
<div |
|
|
@ -436,7 +426,7 @@ export default { |
|
|
|
:model="planForm" |
|
|
|
:rules="planRules" |
|
|
|
ref="planForm" |
|
|
|
label-width="100px" |
|
|
|
label-width="80px" |
|
|
|
> |
|
|
|
<el-form-item label-width="120px" label="防治计划名称" prop="planId"> |
|
|
|
<el-select |
|
|
@ -463,7 +453,7 @@ export default { |
|
|
|
> |
|
|
|
</el-form-item> |
|
|
|
<div style="display: flex"> |
|
|
|
<el-form-item label-width="120px" label="防治堤防" prop="dikeName"> |
|
|
|
<el-form-item label-width="120px" label="防治堤防" prop="dikeCode"> |
|
|
|
<el-input |
|
|
|
style="width: 202px" |
|
|
|
v-model="planForm.dikeName" |
|
|
@ -471,7 +461,7 @@ export default { |
|
|
|
disabled |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label-width="120px" label="防治类型" prop="planTime"> |
|
|
|
<el-form-item label-width="120px" label="防治类型" prop="type"> |
|
|
|
<el-select v-model="planForm.type" placeholder="请输入" disabled> |
|
|
|
<el-option |
|
|
|
v-for="item in controlType" |
|
|
@ -502,20 +492,20 @@ export default { |
|
|
|
></div> |
|
|
|
<span style="font-weight: 600">工作内容</span> |
|
|
|
</div> |
|
|
|
<el-form-item label-width="120px" label="工作月份" prop="workMonth"> |
|
|
|
<el-select v-model="planForm.workMonth" placeholder="请输入" disabled> |
|
|
|
<el-form-item label-width="120px" label="工作月份" prop="month"> |
|
|
|
<el-select v-model="planForm.month" placeholder="请输入" disabled> |
|
|
|
<el-option |
|
|
|
v-for="(item, index) in 12" |
|
|
|
:label="index + 1 + '月'" |
|
|
|
:value="item" |
|
|
|
:key="item" |
|
|
|
v-for="(item, index) in monthsList" |
|
|
|
:label="item.dictLabel" |
|
|
|
:value="item.dictValue" |
|
|
|
:key="index" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-table |
|
|
|
style="margin-bottom: 22px" |
|
|
|
max-height="330" |
|
|
|
:data="workTable" |
|
|
|
:data="planForm.details" |
|
|
|
border |
|
|
|
> |
|
|
|
<el-table-column |
|
|
@ -524,33 +514,37 @@ export default { |
|
|
|
label="序号" |
|
|
|
width="50" |
|
|
|
/> |
|
|
|
<el-table-column prop="content" align="center" label="工作内容"> |
|
|
|
<el-table-column prop="jobContent" align="center" label="工作内容"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input |
|
|
|
v-model="scope.row.content" |
|
|
|
v-model="scope.row.jobContent" |
|
|
|
placeholder="请输入工作内容" |
|
|
|
disabled |
|
|
|
/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="date" align="center" label="施工日期"> |
|
|
|
<el-table-column |
|
|
|
prop="constructionDate" |
|
|
|
align="center" |
|
|
|
label="施工日期" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input |
|
|
|
v-model="scope.row.date" |
|
|
|
v-model="scope.row.constructionDate" |
|
|
|
placeholder="请输入施工日期" |
|
|
|
disabled |
|
|
|
/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="weekday" |
|
|
|
prop="planDays" |
|
|
|
align="center" |
|
|
|
label="计划工日" |
|
|
|
width="80" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input |
|
|
|
v-model="scope.row.weekday" |
|
|
|
v-model="scope.row.planDays" |
|
|
|
placeholder="请输入计划工日" |
|
|
|
disabled |
|
|
|
/> |
|
|
@ -588,26 +582,25 @@ export default { |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<div style="display: flex"> |
|
|
|
<el-form-item |
|
|
|
label-width="120px" |
|
|
|
label="提醒周期" |
|
|
|
prop="reminderCycle" |
|
|
|
> |
|
|
|
<el-form-item label-width="120px" label="提醒周期" prop="frequency"> |
|
|
|
<el-input |
|
|
|
style="width: 80px" |
|
|
|
v-model="planForm.reminderCycle" |
|
|
|
v-model="planForm.frequency" |
|
|
|
disabled |
|
|
|
/> |
|
|
|
/次 |
|
|
|
<el-select |
|
|
|
style="width: 80px" |
|
|
|
v-model="planForm.selectDate" |
|
|
|
v-model="planForm.cycleType" |
|
|
|
placeholder="请选择日期" |
|
|
|
disabled |
|
|
|
> |
|
|
|
<el-option label="天" :value="0" /> |
|
|
|
<el-option label="周" :value="1" /> |
|
|
|
<el-option label="月" :value="2" /> |
|
|
|
<el-option |
|
|
|
v-for="item in patrolType" |
|
|
|
:label="item.dictLabel" |
|
|
|
:value="item.dictValue" |
|
|
|
:key="item.dictValue" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
/日期 |
|
|
|
</el-form-item> |
|
|
@ -654,7 +647,7 @@ export default { |
|
|
|
prop="reminderTime" |
|
|
|
> |
|
|
|
<el-radio-group |
|
|
|
v-if="planForm.selectDate == 1" |
|
|
|
v-if="planForm.cycleType == 1" |
|
|
|
style="margin-bottom: 16px" |
|
|
|
v-model="planForm.week" |
|
|
|
disabled |
|
|
@ -667,7 +660,7 @@ export default { |
|
|
|
<el-radio :label="6">星期六</el-radio> |
|
|
|
<el-radio :label="7">星期日</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
<div v-if="planForm.selectDate == 2" style="margin-bottom: 16px"> |
|
|
|
<div v-if="planForm.cycleType == 2" style="margin-bottom: 16px"> |
|
|
|
每月<el-input style="width: 202px" v-model="planForm.date" />号 |
|
|
|
</div> |
|
|
|
<el-time-picker |
|
|
@ -826,7 +819,7 @@ export default { |
|
|
|
<el-form-item label-width="120px" label="备注" prop="notes"> |
|
|
|
<el-input |
|
|
|
type="textarea" |
|
|
|
:rows="2" |
|
|
|
:rows="3" |
|
|
|
placeholder="请输入" |
|
|
|
v-model="recordForm.notes" |
|
|
|
> |
|
|
@ -871,11 +864,6 @@ export default { |
|
|
|
background-color: white; |
|
|
|
|
|
|
|
.top-search { |
|
|
|
display: flex; |
|
|
|
flex-wrap: wrap; |
|
|
|
align-content: space-between; |
|
|
|
height: 85px; |
|
|
|
width: 75%; |
|
|
|
margin-bottom: 8px; |
|
|
|
|
|
|
|
.search-input { |
|
|
|