| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595 |
- <template>
- <div>
- <el-card class="box-card">
- <div class="search_wrapper">
- <el-form :inline="true" :model="problemSearch" class="demo-form-inline">
- <el-form-item label="工程名称">
- <el-input v-model="problemSearch.nm" clearable></el-input>
- </el-form-item>
- <el-form-item label="问题类别">
- <el-select v-model="problemSearch.inspPblmName" clearable>
- <el-option :label="item.inspPblmsName" :value="item.inspPblmsName" v-for="(item,index) in problemType" :key="index"></el-option>
- </el-select>
- </el-form-item>
- <!--<el-form-item label="问题状态">-->
- <!--<el-select v-model="problemSearch.reviConc" clearable>-->
- <!--<el-option :label="item.name" :value="item.value" v-for="(item,index) in problemStatus" :key="index"></el-option>-->
- <!--</el-select>-->
- <!--</el-form-item>-->
- <el-form-item label="是否典型">
- <el-select v-model="problemSearch.ifCasePblm" clearable placeholder="请选择">
- <el-option
- v-for="item in supervision"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="严重程度">
- <el-select v-model="problemSearch.inspPblmCate" clearable>
- <el-option :label="item.name" :value="item.value" v-for="(item,index) in severity" :key="index"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="发现时间">
- <el-date-picker
- v-model="findTime"
- type="daterange"
- value-format="yyyy-MM-dd"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期">
- </el-date-picker>
- </el-form-item>
- </el-form>
- <div>
- <el-button type="primary" @click="search">查询</el-button>
- <el-button type="primary" @click="toAddProblem" v-if="ownPriv('manage')">新增问题</el-button>
- </div>
- </div>
- <el-table
- :data="tableData"
- border
- :height="tableHeight"
- v-loading="loading"
- style="width: 100%">
- <el-table-column
- fixed
- prop="nm"
- show-overflow-tooltip
- label="工程名称"
- min-width="180">
- </el-table-column>
- <el-table-column
- min-width="140"
- prop="inspPblmsName"
- label="问题类别"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- show-overflow-tooltip
- prop="inspPblmDesc"
- label="督查问题描述"
- min-width="150">
- </el-table-column>
- <el-table-column
- prop="inspPblmCate"
- label="严重程度"
- min-width="90">
- <template slot-scope="scope">
- {{scope.row.inspPblmCate | inspPblmCate}}
- </template>
- </el-table-column>
- <el-table-column
- prop="ifCasePblm"
- label="是否典型"
- min-width="90">
- <template slot-scope="scope">
- {{scope.row.ifCasePblm == '1' ? '典型' : scope.row.ifCasePblm == '0' ? '非典型' : ''}}
- </template>
- </el-table-column>
- <el-table-column
- prop="collTime"
- label="发现时间"
- min-width="150">
- <template slot-scope="scope">
- {{scope.row.collTime ? formatDateTime(scope.row.collTime) : ''}}
- </template>
- </el-table-column>
- <!--<el-table-column-->
- <!--prop="reviConc"-->
- <!--label="问题状态"-->
- <!--min-width="90">-->
- <!--<template slot-scope="scope">-->
- <!--<p v-if="scope.row.reviConc == 0">新问题</p>-->
- <!--<p v-if="scope.row.reviConc == 1">未复查</p>-->
- <!--<p v-if="scope.row.reviConc == 2">已复查</p>-->
- <!--</template>-->
- <!--</el-table-column>-->
- <!-- <el-table-column
- prop="zip"
- label="复查时间"
- width="120">
- </el-table-column> -->
- <!--<el-table-column-->
- <!--prop="hasVedio"-->
- <!--label="有无多媒体"-->
- <!--min-width="100">-->
- <!--<template slot-scope="scope">-->
- <!--<p v-if="scope.row.hasVedio == 1">是</p>-->
- <!--<p v-if="scope.row.hasVedio == 0">否</p>-->
- <!--</template>-->
- <!--</el-table-column>-->
- <el-table-column
- fixed="right"
- label="操作"
- min-width="130">
- <template slot-scope="scope">
- <el-button type="text" size="small" v-if="ownPriv('manage') && (!scope.row.reviConc || scope.row.reviConc =='0')" @click="toEditProblem(scope.row)">编辑</el-button>
- <el-button type="text" size="small" v-if="ownPriv('manage') && (scope.row.reviConc == '1' || scope.row.reviConc =='2')" @click="toRecheckProblem(scope.row)">复查</el-button>
- <el-button type="text" size="small" @click="toShowDetail(scope.row)">详情</el-button>
- <el-button type="text" size="small" title="删除问题" @click="deteleProblem(scope.row)" v-if="ownPriv('manage')">删除</el-button>
- </template>
- </el-table-column>
- </el-table>
- <el-pagination :pager-count="5" :current-page="pageIndex"
- :page-size="pageSize" layout="total, prev, pager, next" :total="total"
- @current-change="pageIndexChange" @size-change="handleSizeChange"
- ></el-pagination>
- </el-card>
- <!-- 修改组件 -->
- <problem-edit :editId="problemId" @closeEditDialog="closeEditDialog" v-if="edit_dialogVisible"></problem-edit>
- <!-- 详情组件-->
- <el-dialog
- class="custom_dialog"
- title="问题详情"
- width="60%"
- append-to-body
- :visible.sync="supervisionDetailsVisible">
- <supervision-details ref="xianqing" :problemId="problemId"></supervision-details>
- <span slot="footer">
- <el-button style="margin-top:5px;" @click="supervisionDetailsVisible = false">返回</el-button>
- </span>
- </el-dialog>
- <problemDialog
- v-if="showAddProblemDialog"
- :objId="currentRow.objId"
- objName="淤地坝"
- @closeDialog="closePlDialog"
- :currentObjectRgstrId="currentRow.id"
- :showAddProblemDialog="showAddProblemDialog">
- </problemDialog>
- </div>
- </template>
- <script>
- import {formatDateTime2} from '../../../utils/gw_date.js'
- import request from '../../../utils/gw_ajax_request.js'
- import problemDialog from "../../duChaWenTi/addProblem/yudiba_problem_dialog.vue";
- export default {
- props: ['unitProblemInfo','currentRow','villType','unitLevel','tabType'],
- data(){
- return{
- tableHeight: window.innerHeight - 330,
- tableData:[
- {
- date: '',
- name: '',
- province: '',
- city: '',
- address: '',
- zip: ''
- }
- ],
- problemSearch:{
- inspPblmName: '',
- inspPblmCate: '',
- reviConc: '',
- pType: '',
- pageSize: '10',
- pageNum: 1
- },
- problemForm:{
- objId: '',
- objType: '',
- problemType: '',
- inspPblmDesc: '',
- pblmsTypeId: '',
- qualityTypeId: '',
- pblmsId: '',
- defectTypeId: '',
- ifCasePblm: '',
- inspPblmCate: '',
- weigui: '',
- hetong: '',
- quanlity: '',
- gongcheng: '',
- gwComFiles: []
- },
- rectifyForm: {
- rectConc: '',
- rectMeas: '',
- collTime: '',
- gwComFiles: [{
- id: "",
- filePath: "",
- bizId: ""
- }]
- },
- weigui: {
- pblmRelDics: [],
- pblmSn: ''
- },
- hetong: {
- pblmRelDics: [],
- pblmSn: ''
- },
- quanlity: {
- pblmRelDics: [],
- pblmSn: ''
- },
- gongcheng: {
- pblmRelDics: [],
- pblmSn: ''
- },
- pblmPointNum: '',
- pblmDescList: '',
- pblmDescListHetong: '',
- pblmAttach: [],
- pblmsTypeId: '',
- pblmId: '',
- imgList: [],
- videoList:[],
- audioList: [],
- pblmStat: '',
- gwComFiles: [],
- problemType: [],
- problemStatus: [],
- severity:[
- {name: '一般',value:'0'},
- {name: '较重',value:'1'},
- {name: '严重',value:'2'},
- // {name: '非常严重',value:'3'}
- ],
- dialogType: '添加',
- dialogVisible: true,
- add_dialogVisible: false,
- recheck_dialogVisible: false,
- chooseWeiguiProblem: false,
- chooseHeTongProblem: false,
- chooseQuanlityProblem: false,
- chooseGongchengProblem: false,
- checked: false,
- problemId: '',
- supervisionDetailsVisible:false,
- projectType: '',
- reviConc: '',
- findTime: [],
- rectifyRow: {},
- isRectify: false,
- rectifyId: '',
- activeName: 'problem-detail',
- pageIndex: 1,
- pageSize: 20,
- total: 0,
- loading: false,
- showWenTiTianBaoPl: false,
- //问题修改弹窗
- problemInfo: null,
- rectifyProblemInfo: null,
- edit_dialogVisible: false,
- recheck_edit_dialogVisible: false,
- showAddProblemDialog: false,
- supervision: [
- {
- value: "1",
- label: "是"
- },
- {
- value: "0",
- label: "否"
- }
- ]
- }
- },
- computed: {
- persId() {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- },
- formatDateTime(){
- return formatDateTime2
- }
- },
- components: {
- upload: resolve => {
- require(["../../../widgets/uploadFile.vue"], resolve);
- },
- // 修改问题
- problemEdit: resolve => {
- require(["../../duChaWenTi/yuDiBaProblemModify.vue"], resolve);
- },
- //详情页
- supervisionDetails: resolve => {
- require(["../../duChaWenTi/supervisionDetails_yudiba.vue"], resolve);
- },
- problemDialog: problemDialog
- },
- mounted(){
- this.getproblemSmallType();
- },
- activated(){
- this.search()
- },
- methods:{
- search(){
- this.searchList()
- },
- closePlDialog(val) {
- this.showAddProblemDialog = false;
- this.search()
- },
- searchList(){
- console.log(this.currentRow);
- this.loading = true
- this.problemSearch.persId = this.persId
- this.problemSearch.pType = this.villType
- this.problemSearch.pageSize = this.pageSize
- this.problemSearch.pageNum = this.pageIndex
- console.log(this.findTime)
- if(this.findTime && this.findTime.length){
- this.problemSearch['startTime'] = this.findTime[0]
- this.problemSearch['endTime'] = this.findTime[1]
- this.problemSearch.reviConc = this.problemSearch.reviConc || "0"
- }else{
- this.problemSearch['startTime'] = ''
- this.problemSearch['endTime'] = ''
- }
- // if(this.currentRow.code){
- if(this.currentRow.objId){
- delete this.problemSearch.orgId;
- this.problemSearch.objId = this.currentRow.objId;
- }else{
- delete this.problemSearch.objId;
- this.problemSearch.orgId = this.currentRow.id;
- }
- this.problemSearch.tabType = this.tabType;
- request.post(`/dc/insp/pblm/page/sdPblm`, this.problemSearch).then(res => {
- if (res.success) {
- this.tableData = res.data.list;
- this.total = res.data.total;
- }
- this.loading = false
- });
- },
- toAddProblem(){
- if(this.problemSearch.objId){
- this.showAddProblemDialog = true
- }else{
- this.$message.error("请选择左侧工程");
- }
- },
- toEditProblem(row){
- this.dialogType = '修改'
- this.problemId = row.pblmId
- this.problemInfo = row
- this.projectType = row.objType
- this.edit_dialogVisible = true
- },
- // 查看详情
- toShowDetail(row){
- this.problemId = row.pblmId
- this.supervisionDetailsVisible = true
- },
- deteleProblem(row){
- this.$confirm('确认删除当前问题吗?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- request.get(`/dc/insp/pblm/delete/${row.pblmId}/${this.persId}`).then(res=>{
- if(res.success){
- this.$message.success('删除成功')
- this.searchList()
- }else{
- this.$message.error(res.message)
- }
- })
- }).catch(() => {
- });
- },
- // 文件上传
- submitUpload() {
- this.$refs.upload.submit();
- },
- updatefilelist(arg) {
- if(this.isRectify){
- request.post('/dc/insp/rectFdbk',{
- id: this.pblmId,
- gwComFiles: arg
- }).then(res => {
- this.removeNewSupervision()
- });
- }else{
- if(this.dialogType == '修改'){
- this.problemForm.gwComFiles = this.problemForm.gwComFiles.concat(arg)
- }else{
- this.problemForm.gwComFiles = arg
- }
- request.post('/dc/insp/pblm/update',{
- pblmId: this.pblmId,
- gwComFiles: this.problemForm.gwComFiles,
- pblmStat: this.pblmStat
- }).then(res => {
- this.searchList()
- this.removeNewSupervision()
- });
- }
- },
- removeNewSupervision(arg){
- if (arg) {
- console.log(arg);
- var args = this.gwComFiles.concat(arg);
- this.updatefilelist(args);
- }
- this.$message.success('保存成功')
- this.$emit('closeDialog')
- this.gwComFiles = [];
- this.$refs.uploadFile.init();
- },
- handleDetailClick(tab, event) {
- console.log(tab, event);
- },
- pageIndexChange(val) {
- this.pageIndex = val;
- this.searchList();
- },
- handleSizeChange(val) {
- this.pageSize = val;
- this.searchList();
- },
- showPlDialog() {
- this.showWenTiTianBaoPl = true;
- },
- // closePlDialog(val) {
- // this.showWenTiTianBaoPl = false;
- // },
- // 控制修改弹窗
- closeEditDialog(){
- this.edit_dialogVisible = false
- this.problemId = "";
- this.searchList()
- },
- getproblemSmallType() {
- let result = [];
- request.get('/dc/insp/pblms/getPblmType', {
- params: {
- type: '11',
- pguid: '11000000000000000000000000000000'
- }
- }).then(res => {
- if (res.success) {
- res.data.forEach((ele) => {
- let haveinspPblmsName = false;
- result.forEach((inspPblm) => {
- if (inspPblm['inspPblmsName'] == ele.inspPblmsName) {
- //
- let havechekPoint = false;
- inspPblm['checkPoints'].forEach((chekPoint) => {
- if (chekPoint['checkPointName'] == ele.checkPoint) {
- //
- chekPoint['pblmDescs'].push({
- pblmDesc: ele.pblmDesc,
- sn: ele.sn,
- guid: ele.guid,
- });
- havechekPoint = true;
- }
- });
- if (!havechekPoint) {
- let newCheckPoint = {};
- newCheckPoint['checkPointName'] = ele.checkPoint;
- newCheckPoint['sort2'] = ele.sort2;
- newCheckPoint['pblmDescs'] = [{
- pblmDesc: ele.pblmDesc,
- sn: ele.sn,
- guid: ele.guid,
- }]
- inspPblm['checkPoints'].push(newCheckPoint);
- }
- haveinspPblmsName = true;
- }
- });
- if (!haveinspPblmsName) {
- let haveinspPblmsObj = {};
- haveinspPblmsObj['inspPblmsName'] = ele.inspPblmsName;
- haveinspPblmsObj['sort1'] = ele.sort1;
- haveinspPblmsObj['checkPoints'] = [{
- checkPointName: ele.checkPoint,
- sort2: ele.sort2,
- pblmDescs: [{
- pblmDesc: ele.pblmDesc,
- sn: ele.sn,
- guid: ele.guid,
- }]
- }];
- result.push(haveinspPblmsObj);
- }
- })
- this.problemType = result;
- console.log(this.problemType);
- }
- })
- },
- },
- watch:{
- tabType(val){
- if(val){
- this.searchList();
- }
- },
- 'currentRow.id':{
- deep: true,
- handler(newVal,oldVal){
- this.searchList()
- }
- },
- 'problemForm.problemType':{
- deep: true,
- handler(newVal,oldVal){
- this.convertGroup()
- }
- },
- 'unitProblemInfo.id':{
- deep: true,
- handler(newVal,oldVal){
- this.searchList()
- }
- }
- },
- filters:{
- inspPblmCate(val){
- if(!val || val == ''){
- return ''
- }
- if(val == '0'){
- return '一般'
- }else if(val == '1'){
- return '较重'
- }else if(val == '2'){
- return '严重'
- }
- // else if(val == '3'){
- // return '非常严重'
- // }
- else{
- return val
- }
- },
- }
- }
- </script>
- <style lang="scss">
- .search_wrapper{
- display: flex;
- justify-content: space-between;
- div:last-child{
- min-width: 160px;
- }
- }
- .slide-line{
- width: 96%;
- margin-left: 3%;
- height: 1px;
- margin-bottom: 10px;
- border-bottom: dashed 1px #DCDFE6;
- }
- .detail_dialog .el-dialog__body{
- padding: 0 20px 30px;
- }
- </style>
|