| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- <template>
- <div>
- <el-container :style="{'height':this.tableHeight+'px'}" >
- <el-main style="border:1px solid #d5d5ff;margin-left:5px;padding:0px;overflow-x: hidden;">
- <el-table
- v-loading="loading"
- ref="multipleTable"
- :data="problemList"
- :height="tableHeight1"
- style="width: 100%">
- <el-table-column align="center" type="index" label="序号" min-width="70">
- <template slot-scope="scope">
- {{ (currentPage - 1) * pageSize + (scope.$index + 1) }}
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="140"
- prop="inspPblmsName"
- label="督查水库问题类别"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="checkPoint"
- label="检查项目"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="inspPblmName"
- label="详细描述"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- prop="collTime"
- label="上报时间"
- :formatter="timestampToTime"
- sortable
- align="center"
- min-width="100"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- align="center"
- prop
- min-width="80"
- label="操作"
- show-overflow-tooltip
- fixed="right">
- <template slot-scope="scope">
- <el-button icon="el-icon-view" title="查看详情"type="text" @click="showDetails(scope.row.pblmId)"></el-button>
- </template>
- </el-table-column>
- </el-table>
- </el-main>
- </el-container>
- <!-- 分页 -->
- <div class="paginationWarpper">
- <el-pagination
- class="paginationCenter"
- background
- @size-change="handleSizeChange"
- @current-change="search"
- :current-page.sync="currentPage"
- :page-sizes="[10, 20, 50, 100]"
- :page-size="pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total">
- </el-pagination>
- </div>
- <!-- 详情组件-->
- <el-dialog
- class="custom_dialog"
- title="问题详情"
- width="60%"
- append-to-body
- :visible.sync="supervisionDetailsVisible">
- <supervision-details ref="xianqing" :problemId="currentProblemId"></supervision-details>
- <span slot="footer">
- <el-button style="margin-top:5px;" @click="supervisionDetailsVisible = false">返回</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import {formatDateTimeD} from '@util/gw_date.js'
- import request from '@util/gw_ajax_request.js'
- export default {
- props: ['currentObjectId','currentObjectName','currentObjectRgstrId','isJiangXi'],
- data(){
- return{
- tableHeight: window.innerHeight * 0.5,
- tableHeight1: window.innerHeight * 0.5 -2,
- problemList:[],
- loading: false,
- currentPage: 1,
- pageSize: 10,
- pageNum: 1,
- total: 0,
- supervisionDetailsVisible:false,
- currentProblemId: '',
- problemDeleteVisible: false,
- deleteId: '',
- editId: '',
- changeSupervisionVisible: false,
- showAddProblemDialog: false,
- rsvrRules: null,
- probId: '',
- }
- },
- components:{
- //详情页
- supervisionDetails: resolve => {
- require(["../../../duChaWenTi/supervisionDetails_shuiku.vue"], resolve);
- },
- },
- computed:{
- persId() {
- return localStorage.getItem("userid") ? localStorage.getItem("userid") : "1098101939614724096";
- }
- },
- created(){
- this.findItemByType()
- },
- mounted(){
- this.getProblemList()
- },
- methods:{
- getProblemList(){
- let problemForm = {}
- problemForm.objId = this.currentObjectId;
- problemForm.objType = '1';
- problemForm.pageNum = this.currentPage;
- problemForm.pageSize = this.pageSize;
- problemForm.presId = this.persId;
- if(this.isJiangXi){
- problemForm['repeat'] = '0'
- }
- this.loading = true;
- request.post(`/dc/insp/pblm/list/${this.persId}`, problemForm).then(res => {
- if (res.success) {
- this.problemList = res.data.list;
- this.total = res.data.total;
- this.loading = false;
- }
- }).catch(err=>{
- this.$message.error(err)
- this.loading = false;
- });
- },
- showDetails(pblmId){
- this.currentProblemId = pblmId
- this.supervisionDetailsVisible = true
- },
- changeSup(pblmId){
- this.editId = pblmId
- this.changeSupervisionVisible = true
- },
- removeSuperviseOne(pblmId){
- this.deleteId = pblmId
- this.problemDeleteVisible = true
- },
- deleteSuccess() {
- this.problemDeleteVisible = false;
- this.getProblemList();
- },
- search(val){
- this.currentPage = val
- this.getProblemList()
- },
- handleSizeChange(){},
- timestampToTime(row, column) {
- var date = new Date(row.collTime);
- var Y = date.getFullYear() + "-";
- var M =
- (date.getMonth() + 1 < 10
- ? "0" + (date.getMonth() + 1)
- : "0" + date.getMonth() + 1) + "-";
- var D =
- (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
- var h =
- (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
- var m =
- date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
- return Y + M + D + h + m;
- },
- closeEditDialog(){
- this.changeSupervisionVisible = false
- },
- findItemByType(){
- const obj ={
- tname: "BIS_INSP_BASE_PRES_EXT"
- }
- request.post("/bis/insp/item/ques/info/findItemByType",obj).then(res =>{
- this.rsvrRules = res.data;
- })
- },
- addProblem(item){
- let rest = this.rsvrRules
- this.probId = rest[0].id;
- this.showAddProblemDialog = true
- },
- closePlDialog(val) {
- this.showAddProblemDialog = false;
- this.getProblemList()
- }
- }
- }
- </script>
- <style scoped>
- </style>
|