|
|
@@ -0,0 +1,379 @@ |
|
|
|
<template> |
|
|
|
<div class="problem-container"> |
|
|
|
<el-form :inline="true" :model="searchParam" class="demo-form-inline"> |
|
|
|
<el-form-item label="问题单号"> |
|
|
|
<el-input |
|
|
|
clearable |
|
|
|
v-model="searchParam.questionNo" |
|
|
|
size="small" |
|
|
|
placeholder="请输入问题单号" |
|
|
|
style="width: 150px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="区划"> |
|
|
|
<driverAreaSelect v-model="searchParam.driverArea"></driverAreaSelect> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="河湖名称"> |
|
|
|
<el-input |
|
|
|
clearable |
|
|
|
v-model="searchParam.driverName" |
|
|
|
size="small" |
|
|
|
placeholder="请输入河道名称" |
|
|
|
style="width: 150px" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="日期"> |
|
|
|
<el-date-picker |
|
|
|
style="width: 220px" |
|
|
|
placeholder="日期" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
v-model="searchParam.inspectTime" |
|
|
|
type="daterange" |
|
|
|
range-separator="至" |
|
|
|
start-placeholder="开始日期" |
|
|
|
end-placeholder="结束日期" |
|
|
|
></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button |
|
|
|
:loading="tableLoading" |
|
|
|
@click="search" |
|
|
|
size="small" |
|
|
|
icon="el-icon-search" |
|
|
|
type="primary" |
|
|
|
>搜索 |
|
|
|
</el-button> |
|
|
|
<el-button |
|
|
|
@click="initSearchParam();search()" |
|
|
|
icon="el-icon-refresh-right" |
|
|
|
type="primary" |
|
|
|
size="small" |
|
|
|
style="background-color: #fff; border: 1px solid #ccc ; color: #666" |
|
|
|
>清空 |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<div> |
|
|
|
<el-button v-if="btnRule.inspectquestion_assign&&(status==1||status==='0')" |
|
|
|
:disabled="multipleSelection.length>0?false:true" size="small" type="primary">批量指派 |
|
|
|
</el-button> |
|
|
|
<el-button v-if="btnRule.inspectquestion_finished&&(status==1||status==='0'||status==2)" |
|
|
|
:disabled="multipleSelection.length>0?false:true" size="small" type="success">批量标记完成 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
<el-table |
|
|
|
style="margin-top: 15px" |
|
|
|
stripe |
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
ref="table" |
|
|
|
:height="tableHeight" |
|
|
|
v-loading="tableLoading" |
|
|
|
:data="dataList" |
|
|
|
size="medium" |
|
|
|
border |
|
|
|
> |
|
|
|
<el-table-column |
|
|
|
:selectable="filterSelectable" |
|
|
|
type="selection" |
|
|
|
width="55"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column :index="indexMethod" label="序号" type="index" width="80" align="center"/> |
|
|
|
<el-table-column |
|
|
|
show-overflow-tooltip |
|
|
|
prop="name" |
|
|
|
label="问题单号" |
|
|
|
align="center" |
|
|
|
min-width="120" |
|
|
|
> |
|
|
|
<template slot-scope="scoped"> |
|
|
|
<a |
|
|
|
v-if="btnRule.inspectquestion_detail" |
|
|
|
href="javascript:void(0);" |
|
|
|
@click="handleEdit(scoped.row,1)" |
|
|
|
>{{scoped.row.questionNo}}</a> |
|
|
|
<span v-else>{{scoped.row.questionNo}}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column show-overflow-tooltip label="问题图片" align="center" min-width="80"> |
|
|
|
<template slot-scope="{row}"> |
|
|
|
<img style="width:20px;height:20px" :src="row.fileSrc"/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
show-overflow-tooltip |
|
|
|
prop="driverAreaName" |
|
|
|
label="区划" |
|
|
|
align="center" |
|
|
|
min-width="80" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
show-overflow-tooltip |
|
|
|
prop="driverName" |
|
|
|
label="河湖名称" |
|
|
|
align="center" |
|
|
|
min-width="100" |
|
|
|
></el-table-column> |
|
|
|
<el-table-column |
|
|
|
show-overflow-tooltip |
|
|
|
prop="inspectTime" |
|
|
|
label="巡检时间" |
|
|
|
min-width="120" |
|
|
|
align="center" |
|
|
|
/> |
|
|
|
<el-table-column show-overflow-tooltip prop="questionType" label="问题类型" align="center"/> |
|
|
|
<el-table-column show-overflow-tooltip prop="statusName" label="问题状态" align="center"/> |
|
|
|
<el-table-column label="操作" align="left" width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button v-if="btnRule.inspectquestion_assign&&scope.row.status==1" type="primary" size="mini" |
|
|
|
icon="el-icon-s-operation" @click="assign(scope.row)">指派 |
|
|
|
</el-button> |
|
|
|
<el-button v-if="btnRule.inspectquestion_dealWith&&scope.row.status==2&&scope.row.assignUser==info.id" type="primary" size="mini" |
|
|
|
icon="el-icon-monitor" @click="handleAddRole(scope.row)">处理 |
|
|
|
</el-button> |
|
|
|
<el-button v-if="btnRule.inspectquestion_finished&&(scope.row.status==1||scope.row.status==2)" type="success" |
|
|
|
size="mini" icon="el-icon-finished" @click="handleAddRole(scope.row)">标记完成 |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<!-- 分页 --> |
|
|
|
<div class="page-current"> |
|
|
|
<el-pagination |
|
|
|
background |
|
|
|
:current-page="currentPage" |
|
|
|
:page-size="pageSize" |
|
|
|
prev-text="上一页" |
|
|
|
next-text="下一页" |
|
|
|
layout="total, prev, pager, next, jumper" |
|
|
|
style="display: inline-block;" |
|
|
|
@current-change="handleCurrentChange" |
|
|
|
:total="count" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<el-drawer |
|
|
|
class="detail-diaog" |
|
|
|
title="问题详情" |
|
|
|
:visible.sync="visible" |
|
|
|
:direction="direction" |
|
|
|
:size="drawerWidth" |
|
|
|
:before-close="beforeClose" |
|
|
|
> |
|
|
|
<detailDialog @handleClose="visible=false" :visible="visible" v-if="visible" :id="id"></detailDialog> |
|
|
|
<div style="width: 100%;text-align: center;margin-top: 20px;margin-bottom: 20px"> |
|
|
|
<el-button size="medium" icon="el-icon-back" @click="visible=false">返回</el-button> |
|
|
|
</div> |
|
|
|
</el-drawer> |
|
|
|
<el-dialog v-if="assignVisible" :close-on-press-escape="false" :close-on-click-modal="false" ref="assignDialog" |
|
|
|
top="5vh" center title="指派" |
|
|
|
class="assign-dialog" :visible.sync="assignVisible"> |
|
|
|
<el-form ref="ruleForm" :model="ruleForm" size="small" label-width="100px" |
|
|
|
class="form"> |
|
|
|
<el-form-item label="责任人" prop="assignUser" |
|
|
|
:rules="{ |
|
|
|
required: true, message: '责任人不能为空', trigger: 'change' |
|
|
|
}"> |
|
|
|
<el-select @change="assignUserClick" clearable filterable v-model="ruleForm.assignUser"> |
|
|
|
<el-option :key="index" :value="item.id" :label="item.realname" v-for="(item,index) in userList"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="联系方式" prop="assignContact"> |
|
|
|
<el-input :disabled="true" v-model="ruleForm.assignContact"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="备注" prop="assignNote"> |
|
|
|
<el-input |
|
|
|
rows="4" |
|
|
|
type="textarea" |
|
|
|
placeholder="备注" |
|
|
|
v-model="ruleForm.assignNote" |
|
|
|
maxlength="99" |
|
|
|
show-word-limit |
|
|
|
> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer no-print"> |
|
|
|
<el-button :loading="submitLoading" @click="assignSubmit('ruleForm')" type="primary" size="medium" |
|
|
|
icon="el-icon-printer">指派</el-button> |
|
|
|
<el-button size="medium" icon="el-icon-back" |
|
|
|
@click="assignVisible = false">返回 |
|
|
|
</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import api from "@/api/question/list"; |
|
|
|
import adminApi from '@/api/permission/admin' |
|
|
|
import driverAreaSelect from "@/components/driverAreaSelect"; |
|
|
|
import detailDialog from "./detailDialog"; |
|
|
|
import {mapGetters} from "vuex"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "problem-container", |
|
|
|
data() { |
|
|
|
return { |
|
|
|
submitLoading:false, |
|
|
|
assignVisible: false, |
|
|
|
drawerWidth: document.body.clientWidth - 190 + "px", |
|
|
|
direction: "rtl", |
|
|
|
id: "", |
|
|
|
visible: false, |
|
|
|
typeList: { |
|
|
|
1: "待指派", |
|
|
|
2: "处理中", |
|
|
|
3: "已完成" |
|
|
|
}, |
|
|
|
searchParam: { |
|
|
|
questionNo: "", |
|
|
|
driverName: "", |
|
|
|
inspectTime: "", |
|
|
|
driverArea: "" |
|
|
|
}, |
|
|
|
ruleForm:{}, |
|
|
|
dataList: [], |
|
|
|
currentPage: 1, |
|
|
|
pageSize: parseInt((document.body.clientHeight - 365 - 43) / 47), |
|
|
|
count: 0, |
|
|
|
tableLoading: false, |
|
|
|
tableHeight: document.body.clientHeight - 365, |
|
|
|
multipleSelection: [], |
|
|
|
userList: [], |
|
|
|
ids:'' |
|
|
|
}; |
|
|
|
}, |
|
|
|
components: {driverAreaSelect, detailDialog}, |
|
|
|
computed: { |
|
|
|
...mapGetters(["btnRule", "info"]) |
|
|
|
}, |
|
|
|
props: { |
|
|
|
status: { |
|
|
|
type: String, |
|
|
|
default() { |
|
|
|
return '' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
// console.log(this.info.id) |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.tableLoading = true; |
|
|
|
let me = this; |
|
|
|
this.getUserAdminList() |
|
|
|
me.getAllList(); |
|
|
|
}, |
|
|
|
watch: {}, |
|
|
|
methods: { |
|
|
|
assignSubmit(formName){ |
|
|
|
this.$refs[formName].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
assignUserClick(){ |
|
|
|
let ruleForm=JSON.parse(JSON.stringify(this.ruleForm)) |
|
|
|
if(ruleForm.assignUser){ |
|
|
|
let child = this.userList.find(item=>item.id==ruleForm.assignUser) |
|
|
|
if(child){ |
|
|
|
ruleForm.assignContact=child.mobile |
|
|
|
} |
|
|
|
}else{ |
|
|
|
ruleForm.assignContact='' |
|
|
|
} |
|
|
|
this.ruleForm=Object.assign({},ruleForm) |
|
|
|
}, |
|
|
|
assign(row){ |
|
|
|
this.ruleForm={ |
|
|
|
id:row.id, |
|
|
|
assignUser:'', |
|
|
|
assignContact:'', |
|
|
|
assignNote:'' |
|
|
|
} |
|
|
|
this.assignVisible=true |
|
|
|
}, |
|
|
|
getUserAdminList() { |
|
|
|
adminApi.getUserAdminList().then(res => { |
|
|
|
this.userList = res.data ? res.data : [] |
|
|
|
}).catch(err => { |
|
|
|
this.userList = [] |
|
|
|
}); |
|
|
|
}, |
|
|
|
handleSelectionChange(val) { |
|
|
|
this.multipleSelection = val; |
|
|
|
}, |
|
|
|
filterSelectable(row, index) { |
|
|
|
return true |
|
|
|
}, |
|
|
|
beforeClose() { |
|
|
|
this.visible = false |
|
|
|
}, |
|
|
|
handleEdit(row) { |
|
|
|
this.id = row.id; |
|
|
|
this.visible = true; |
|
|
|
}, |
|
|
|
indexMethod(index) { |
|
|
|
return index + 1 + (this.currentPage - 1) * this.pageSize; |
|
|
|
}, |
|
|
|
getAllList() { |
|
|
|
let searchParam = JSON.parse(JSON.stringify(this.searchParam)); |
|
|
|
searchParam.page = this.currentPage; |
|
|
|
searchParam.pageSize = this.pageSize; |
|
|
|
if (searchParam.inspectTime && searchParam.inspectTime.length > 0) { |
|
|
|
searchParam.inspectTime = searchParam.inspectTime[0] + '~' + searchParam.inspectTime[1]; |
|
|
|
} else { |
|
|
|
searchParam.inspectTime = '' |
|
|
|
} |
|
|
|
this.$refs.table.clearSelection(); |
|
|
|
this.multipleSelection = [] |
|
|
|
searchParam.status = this.status === '0' ? '' : this.status |
|
|
|
api.getList(searchParam).then(res => { |
|
|
|
this.count = res.data.total; |
|
|
|
this.dataList = res.data.records; |
|
|
|
this.tableLoading = false; |
|
|
|
}).catch(err => { |
|
|
|
this.dataList = []; |
|
|
|
this.tableLoading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
search() { |
|
|
|
this.currentPage = 1; |
|
|
|
this.tableLoading = true; |
|
|
|
this.$refs.table.bodyWrapper.scrollTop = 0; |
|
|
|
this.getAllList(); |
|
|
|
}, |
|
|
|
handleCurrentChange(val) { |
|
|
|
this.currentPage = val; |
|
|
|
this.tableLoading = true; |
|
|
|
this.$refs.table.bodyWrapper.scrollTop = 0; |
|
|
|
this.getAllList(); |
|
|
|
}, |
|
|
|
initSearchParam() { |
|
|
|
this.searchParam = { |
|
|
|
questionNo: "", |
|
|
|
driverName: "", |
|
|
|
inspectTime: "", |
|
|
|
driverArea: "" |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="less"> |
|
|
|
.problem-container { |
|
|
|
|
|
|
|
.el-input.is-disabled .el-input__inner { |
|
|
|
background-color: #fff !important; |
|
|
|
color: #333 !important; |
|
|
|
} |
|
|
|
|
|
|
|
.detail-dialog { |
|
|
|
.assign-dialog { |
|
|
|
width: 400px !important; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |