| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230 |
- <template>
- <div :style="{'height': tableHeight1 + 'px'}">
- <el-table
- v-loading="loading"
- border
- ref="multipleTable"
- :data="problemList"
- :height="tableHeight"
- tooltip-effect="dark"
- style="width: 100%">
- <el-table-column align="center" type="index" label="序号" min-width="50">
- <template slot-scope="scope">
- {{ (currentPage - 1) * pageSize + (scope.$index + 1) }}
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="120"
- prop="inspPblmName"
- 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="inspPblmDesc"
- label="详细描述"
- show-overflow-tooltip>
- </el-table-column>
- <!-- <el-table-column
- header-align="center"
- align="center"
- prop="inspPblmCate"
- label="严重程度"
- min-width="90">
- <template slot-scope="scope">
- {{scope.row.inspPblmCate | inspPblmCate}}
- </template>
- </el-table-column> -->
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="ifCasePblm"
- label="是否典型"
- show-overflow-tooltip>
- <template slot-scope="scope">
- <span>{{scope.row.ifCasePblm == '1' ? '是' : scope.row.ifCasePblm == '0' ? '否' : ''}}</span>
- </template>
- </el-table-column>
- <el-table-column
- align="center"
- prop
- min-width="100"
- label="操作"
- show-overflow-tooltip>
- <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>
- <!-- 分页 -->
- <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'
- import {dateFormat} from "@util/gw_date";
- export default {
- props: ['currentObjectId','currentObjectName','currentObjectRgstrId'],
- data(){
- return{
- tableHeight: window.innerHeight * .45,
- tableHeight1: window.innerHeight * .55,
- 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(["../../../../duChaTianBao/yongshuidw/problemDetail.vue"], resolve);
- }
- },
- computed:{
- persId() {
- return localStorage.getItem("userid") ? localStorage.getItem("userid") : "1098101939614724096";
- }
- },
- created(){
- // this.findItemByType()
- },
- mounted(){
- this.getProblemList()
- },
- methods:{
- getProblemList(){
- let problemForm = {}
- problemForm.regid = this.currentObjectRgstrId;
- problemForm.pageNum = this.currentPage;
- problemForm.pageSize = this.pageSize;
- problemForm.presId = this.persId;
- problemForm['objType'] = '16';
- this.loading = true;
- request.post(`/dc/insp/pblm/page`,problemForm).then(res => {
- if (res.success) {
- res.data.list.forEach((item)=>{
- if(item.fdTm){
- item.findTime = typeof(item.fdTm) == 'string' ? item.fdTm : dateFormat(item.fdTm,'yyyy-MM-dd')
- }
- })
- 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(){},
- closeEditDialog(){
- this.getProblemList()
- this.changeSupervisionVisible = false
- },
- addProblem(item){
- // let rest = this.rsvrRules;
- // this.probId = rest[0].id;
- this.showAddProblemDialog = true;
- },
- closePlDialog(val) {
- this.showAddProblemDialog = false;
- this.getProblemList()
- }
- },
- watch:{
- },
- filters:{
- inspPblmCate(val){
- if(!val || val == ''){
- return ''
- }
- if(val == '0'){
- return '一般'
- }else if(val == '1'){
- return '较重'
- }else if(val == '2'){
- return '严重'
- }else{
- return val
- }
- },
- }
- }
- </script>
- <style scoped>
- </style>
|