|
@ -1,6 +1,6 @@ |
|
|
<!-- 巡查计划管理-堤防 --> |
|
|
<!-- 巡查计划管理-堤防 --> |
|
|
<script> |
|
|
<script> |
|
|
import { getDictionaryList, postEmbankmentInspectionChecklist, postEmbankmentInspection, putEmbankmentInspection, deleteEmbankmentInspection } from '@/api/management' |
|
|
import { getDictionaryList, postInspectionPlanlist, postEmbankmentInspection, putEmbankmentInspection, deleteEmbankmentInspection } from '@/api/management' |
|
|
export default { |
|
|
export default { |
|
|
name: 'InspectionItems', |
|
|
name: 'InspectionItems', |
|
|
data() { |
|
|
data() { |
|
@ -40,7 +40,7 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
// 编辑巡查项 |
|
|
// 编辑巡查项目 |
|
|
editTableItem(row) { |
|
|
editTableItem(row) { |
|
|
putEmbankmentInspection({ id: row.id }).then((res) => { |
|
|
putEmbankmentInspection({ id: row.id }).then((res) => { |
|
|
console.log('🚀res🚀', res) |
|
|
console.log('🚀res🚀', res) |
|
@ -50,7 +50,7 @@ export default { |
|
|
console.log(this.examType); |
|
|
console.log(this.examType); |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// 删除对应巡查项 |
|
|
// 删除对应巡查项目 |
|
|
deleteTableItem(row) { |
|
|
deleteTableItem(row) { |
|
|
deleteEmbankmentInspection(row.id).then((res) => { |
|
|
deleteEmbankmentInspection(row.id).then((res) => { |
|
|
console.log('🚀res🚀', res) |
|
|
console.log('🚀res🚀', res) |
|
@ -66,7 +66,7 @@ export default { |
|
|
} |
|
|
} |
|
|
) |
|
|
) |
|
|
}, |
|
|
}, |
|
|
// 新增巡查项 |
|
|
// 新增巡查项目 |
|
|
newInspectionItems() { |
|
|
newInspectionItems() { |
|
|
this.dialogVisible = true |
|
|
this.dialogVisible = true |
|
|
this.ruleForm = { |
|
|
this.ruleForm = { |
|
@ -113,7 +113,7 @@ export default { |
|
|
row.content = value |
|
|
row.content = value |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 保存巡查项 |
|
|
// 保存巡查项目 |
|
|
submitForm(formName) { |
|
|
submitForm(formName) { |
|
|
this.$refs[formName].validate((valid) => { |
|
|
this.$refs[formName].validate((valid) => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
@ -132,12 +132,12 @@ export default { |
|
|
this.$refs[formName].resetFields(); |
|
|
this.$refs[formName].resetFields(); |
|
|
this.dialogVisible = false |
|
|
this.dialogVisible = false |
|
|
}, |
|
|
}, |
|
|
// 添加巡查项 |
|
|
// 添加巡查项目 |
|
|
addInspectionItems() { |
|
|
addInspectionItems() { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
getTableData() { |
|
|
getTableData() { |
|
|
postEmbankmentInspectionChecklist({ |
|
|
postInspectionPlanlist({ |
|
|
data: { |
|
|
data: { |
|
|
timeView: { |
|
|
timeView: { |
|
|
timeField: "create_time" |
|
|
timeField: "create_time" |
|
@ -145,8 +145,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
cv: { |
|
|
cv: { |
|
|
name: "name", |
|
|
name: "name", |
|
|
type: "like", |
|
|
type: "like" |
|
|
value: this.searchInput |
|
|
|
|
|
}, |
|
|
}, |
|
|
pageSize: this.pageData.pageSize, |
|
|
pageSize: this.pageData.pageSize, |
|
|
pageNum: this.pageData.pageNum |
|
|
pageNum: this.pageData.pageNum |
|
@ -177,7 +176,7 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
// 获取列表数据 |
|
|
// 获取列表数据 |
|
|
postEmbankmentInspectionChecklist({ |
|
|
postInspectionPlanlist({ |
|
|
data: { |
|
|
data: { |
|
|
timeView: { |
|
|
timeView: { |
|
|
timeField: "create_time" |
|
|
timeField: "create_time" |
|
@ -249,7 +248,7 @@ export default { |
|
|
:total="pageData.total" @size-change="getTableData()"> |
|
|
:total="pageData.total" @size-change="getTableData()"> |
|
|
</el-pagination> |
|
|
</el-pagination> |
|
|
</div> |
|
|
</div> |
|
|
<el-dialog title="新增/编辑巡查项" :visible.sync="dialogVisible" width="50%"> |
|
|
<el-dialog title="新增/编辑巡查项目" :visible.sync="dialogVisible" width="50%"> |
|
|
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> |
|
|
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> |
|
|
<el-form-item label-width="120px" label="计划名称" prop="name"> |
|
|
<el-form-item label-width="120px" label="计划名称" prop="name"> |
|
|
<el-input style="width: 202px;" v-model="ruleForm.name"></el-input> |
|
|
<el-input style="width: 202px;" v-model="ruleForm.name"></el-input> |
|
@ -260,7 +259,7 @@ export default { |
|
|
:key="item.id"></el-option> |
|
|
:key="item.id"></el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label-width="120px" label="巡查项目名称" prop="checkContentType"> |
|
|
<el-form-item label-width="120px" label="巡查项目目名称" prop="checkContentType"> |
|
|
<el-select v-model="ruleForm.checkContentType" @change="changeContentType(ruleForm.checkContentType)" |
|
|
<el-select v-model="ruleForm.checkContentType" @change="changeContentType(ruleForm.checkContentType)" |
|
|
placeholder="请选择巡视检查内容"> |
|
|
placeholder="请选择巡视检查内容"> |
|
|
<el-option v-for="item in firstType" :label="item.dictLabel" :value="item.dictValue" |
|
|
<el-option v-for="item in firstType" :label="item.dictLabel" :value="item.dictValue" |
|
|