| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187 |
- <template>
- <div style="height:100%;">
- <el-card class="box-card" style="height:100%;">
- <div class="search_wrapper">
- <el-form :inline="true" :model="problemSearch" class="demo-form-inline">
- <el-form-item label="问题类别">
- <!-- <el-select v-model="problemSearch.inspPblmName" clearable style="width: 100px">-->
- <!-- <el-option :label="item.pblmType" :value="item.pblmType" v-for="(item,index) in problemType" :key="index"></el-option>-->
- <!-- </el-select>-->
- <el-input v-model="problemSearch.inspPblmName" style="width: 100px"></el-input>
- </el-form-item>
- <el-form-item label="严重程度">
- <el-select v-model="problemSearch.inspPblmCate" clearable style="width: 100px">
- <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') && showAddBtn">新增问题</el-button>
- </div>
- <!-- 工程批量导入弹窗 -->
- <wen-ti-tian-bao-pl v-if="showWenTiTianBaoPl" @closePlDialog="closePlDialog"
- :objId="problemForm.objId"
- :regId="problemSearch.regId"
- ></wen-ti-tian-bao-pl>
- </div>
- <el-table
- @select="handleSelectionChange"
- :data="tableData"
- border
- :height="tableHeight"
- v-loading="loading"
- style="width: 100%">
- <el-table-column
- type="selection"
- width="40">
- </el-table-column>
- <el-table-column
- prop="nm"
- show-overflow-tooltip
- label="工程名称"
- width="180">
- </el-table-column>
- <el-table-column
- v-if="!unitLevel"
- prop="unitNm"
- label="责任单位"
- show-overflow-tooltip
- width="180">
- </el-table-column>
- <el-table-column
- prop="inspPblmName"
- show-overflow-tooltip
- label="问题类别"
- width="180">
- </el-table-column>
- <el-table-column
- show-overflow-tooltip
- prop="inspPblmDesc"
- label="质量问题信息"
- width="150">
- </el-table-column>
- <el-table-column
- prop="inspPblmCate"
- label="严重程度"
- width="90">
- <template slot-scope="scope">
- {{scope.row.inspPblmCate | inspPblmCate}}
- </template>
- </el-table-column>
- <el-table-column
- prop="ifCasePblm"
- label="是否典型"
- width="90">
- <template slot-scope="scope">
- {{scope.row.ifCasePblm == '1' ? '典型' : scope.row.ifCasePblm == '0' ? '非典型' : ''}}
- </template>
- </el-table-column>
- <el-table-column
- prop="collTime"
- label="发现时间"
- width="150">
- <template slot-scope="scope">
- {{scope.row.collTime ? formatDateTime(scope.row.collTime) : ''}}
- </template>
- </el-table-column>
- <el-table-column
- prop="hasVedio"
- label="有无多媒体"
- 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
- v-if="!canEdit"
- fixed="right"
- label="操作"
- min-width="130">
- <template slot-scope="scope">
- <el-button type="text" size="small" v-if="ownPriv('manage') && isDateRange" @click="toEditProblem(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') && isDateRange">删除</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>
- <addPblmForm v-if="add_dialogVisible_sxzzgbm" :pType="this.objType" :objId="currentRow.objId" :objName="unitProblemInfo.nm" :currentObjectRgstrId="unitProblemInfo.id" @closeDialog="closeDialog"></addPblmForm>
- <el-dialog
- :title="dialogType + '问题'"
- width="60%"
- :visible.sync="add_dialogVisible" @close="closeAddPblm">
- <el-form ref="form" :model="problemForm" label-width="120px">
- <el-form-item label="问题类别">
- <el-select v-model="problemForm.problemType" @change="problemTypeChange" clearable>
- <el-option :label="item.pblmType" :value="item.pblmType" v-for="(item,index) in problemType" :key="index"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="问题描述" required>
- <el-input type="textarea" clearable v-model="problemForm.inspPblmDesc"></el-input>
- </el-form-item>
- <p class="slide-line"></p>
- <p style="margin-top: 10px; margin-bottom: 10px;color:#999"><i class="el-icon-caret-right"></i><span style="width: 120px; padding-left: 6px;">对应标准</span><span class="hrs"></span></p>
- <el-form-item :label="weigui.pblmPoint" v-show="weigui.pblmRelDics.length">
- <el-select v-model="problemForm.weigui" @change="selectWeiguiChange(weigui,problemForm.weigui,'违规')">
- <el-option :label="attach.pblmAttachName" :value="attach.pblmAttach" v-for="(attach,index) in weigui.pblmRelDics" :key="index"></el-option>
- </el-select>
- <div style="width: 380px;float:right">
- <span>问题序号</span>
- <el-input type="text" style="width: 100px;" @focus="showPblmList(weigui,problemForm.weigui,'违规')" v-model="weigui.pblmSn"></el-input>
- <!-- <my-cascader :pblmDescList="pblmDescList" v-if="chooseWeiguiProblem" @sendPblmsTypeIdWeigui="sendPblmsTypeIdWeigui"></my-cascader> -->
- <my-cascader v-if="add_flage" :pblmDescList="pblmDescList" @sendPblmsTypeIdWeigui="sendPblmsTypeIdWeigui"></my-cascader>
- </div>
- </el-form-item>
- <!-- -->
- <el-form-item :label="hetong.pblmPoint" v-show="hetong.pblmRelDics.length">
- <el-select v-model="problemForm.hetong" @change="selectHetongChange(hetong,problemForm.hetong,'合同')">
- <el-option :label="attach.pblmAttachName" :value="attach.pblmAttach" v-for="(attach,index) in hetong.pblmRelDics" :key="index"></el-option>
- </el-select>
- <div style="width: 380px;float:right">
- <span>问题序号</span>
- <el-input type="text" style="width: 100px;" readonly @focus="showPblmList(hetong,problemForm.hetong,'合同')" v-model="hetong.pblmSn"></el-input>
- <!-- <my-cascader-hetong :pblmDescList="pblmDescListHetong" v-if="chooseHeTongProblem" @sendPblmsTypeIdHetong="sendPblmsTypeIdHetong"></my-cascader-hetong> -->
- <my-cascader-hetong v-if="add_flage" :pblmDescList="pblmDescListHetong" @sendPblmsTypeIdHetong="sendPblmsTypeIdHetong"></my-cascader-hetong>
- </div>
- </el-form-item>
- <!-- -->
- <!-- -->
- <el-form-item :label="gongdi.pblmPoint" v-show="gongdi.pblmRelDics.length">
- <el-select v-model="problemForm.gongdi" @change="selectGongdiChange(gongdi,problemForm.gongdi,'工地')">
- <el-option :label="attach.pblmAttachName" :value="attach.pblmAttach" v-for="(attach,index) in gongdi.pblmRelDics" :key="index"></el-option>
- </el-select>
- <div style="width: 380px;float:right">
- <span>问题序号</span>
- <el-input type="text" style="width: 100px;" readonly @focus="showPblmList(gongdi,problemForm.gongdi,'工地')" v-model="gongdi.pblmSn"></el-input>
- <!-- <my-cascader-gongdi :pblmDescList="pblmDescListGongdi" v-if="chooseGongdiProblem" @sendPblmsTypeIdGongdi="sendPblmsTypeIdGongdi"></my-cascader-gongdi> -->
- <my-cascader-gongdi v-if="add_flage" :pblmDescList="pblmDescListGongdi" @sendPblmsTypeIdGongdi="sendPblmsTypeIdGongdi"></my-cascader-gongdi>
- </div>
- </el-form-item>
- <!-- -->
- <el-form-item :label="quanlity.pblmPoint" v-show="quanlity.pblmRelDics.length">
- <el-select v-model="problemForm.quanlity" @change="selectQuanlityChange(quanlity,problemForm.quanlity,'质量')">
- <el-option :label="attach.pblmAttachName" :value="attach.pblmAttach" v-for="(attach,index) in quanlity.pblmRelDics" :key="index"></el-option>
- </el-select>
- <div style="width: 380px;float:right">
- <span>问题序号</span>
- <el-input type="text" style="width: 100px;" readonly @focus="showPblmList(quanlity,problemForm.quanlity,'质量')" v-model="quanlity.pblmSn"></el-input>
- <!-- <my-cascader :pblmDescList="pblmDescList" v-if="chooseQuanlityProblem" @sendPblmsTypeIdQuanlity="sendPblmsTypeIdQuanlity"></my-cascader> -->
- <my-cascader v-if="add_flage" :pblmDescList="pblmDescList" @sendPblmsTypeIdQuanlity="sendPblmsTypeIdQuanlity"></my-cascader>
- </div>
- </el-form-item>
- <!-- -->
- <el-form-item :label="gongcheng.pblmPoint" v-show="gongcheng.pblmRelDics.length">
- <el-select v-model="problemForm.gongcheng" @change="selectGongchengChange(gongcheng,problemForm.gongcheng,'工程')">
- <el-option :label="attach.pblmAttachName" :value="attach.pblmAttach" v-for="(attach,index) in gongcheng.pblmRelDics" :key="index"></el-option>
- </el-select>
- <div style="width: 380px;float:right">
- <span>问题序号</span>
- <el-input type="text" style="width: 100px;" readonly @focus="showPblmList(gongcheng,problemForm.gongcheng,'工程')" v-model="gongcheng.pblmSn"></el-input>
- <!-- <span style="color:blue;cursor:pointer;font-size:12px;" v-if="!chooseGongchengProblem" @click="chooseGongchengProblem = true"> 选择</span> -->
- <!-- <my-cascader :pblmDescList="pblmDescList" :showThreeLevel="true" v-if="chooseGongchengProblem" @sendPblmsTypeIdGongcheng="sendPblmsTypeIdGongcheng"></my-cascader> -->
- <my-cascader v-if="add_flage" :pblmDescList="pblmDescList" :showThreeLevel="true" @sendPblmsTypeIdGongcheng="sendPblmsTypeIdGongcheng"></my-cascader>
- </div>
- </el-form-item>
- <p class="slide-line"></p>
- <el-form-item label="严重性">
- <span>{{cater}}</span>
- </el-form-item>
- <el-form-item label="列为典型问题" style="text-align:left">
- <el-checkbox v-model="checked"></el-checkbox>
- </el-form-item>
- <el-form-item label="相关文件">
- <upload ref="uploadFile" :url="`/pdcApi/file/insert?bizId=`" @uploadOver="removeNewSupervision"></upload>
- </el-form-item>
- <el-form-item style="margin-top: 50px">
- <el-button type="primary" @click="onSubmit" style="width: 100px;float:right">保存</el-button>
- </el-form-item>
- </el-form>
- </el-dialog>
- <el-dialog
- :title="'整改情况'"
- width="50%"
- :visible.sync="recheck_dialogVisible">
- <el-form ref="form" :model="rectifyForm" label-width="120px">
- <el-form-item label="整改情况">
- <el-select v-model="rectifyForm.rectConc">
- <el-option :label="item.name" :value="item.value" v-for="(item,index) in rectifyStatus" :key="index"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="整改时间">
- <el-date-picker
- v-model="rectifyForm.collTime"
- type="date"
- value-format="yyyy-MM-dd">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="整改详细情况">
- <el-input type="textarea" v-model="rectifyForm.rectMeas"></el-input>
- </el-form-item>
- <el-form-item label="相关文件">
- <upload ref="uploadFile" :url="`/pdcApi/file/insert?bizId=`" @uploadOver="removeNewSupervision"></upload>
- </el-form-item>
- <el-form-item style="margin-top: 50px">
- <el-button type="primary" @click="rectifySubmit" style="width: 100px;float:right">保存</el-button>
- </el-form-item>
- </el-form>
- </el-dialog>
- <el-dialog class="outerDialog custom_dialog detail_dialog" width="60%" @close="closePblmDetail" title="" :visible.sync="supervisionDetailsVisible" v-if="supervisionDetailsVisible">
- <el-tabs v-model="activeName" @tab-click="handleDetailClick">
- <el-tab-pane label="问题详情" name="problem-detail" v-if="isNature!='8'">
- <problem-detail :problemId="problemId" :projectType="projectType"></problem-detail>
- </el-tab-pane>
- <el-tab-pane label="问题详情" name="problem-detail" v-if="isNature=='8'">
- <problem-detail1 :problemId="problemId" :projectType="projectType"></problem-detail1>
- </el-tab-pane>
- </el-tabs>
- <span slot="footer">
- <el-button style="margin-top:5px;" @click="supervisionDetailsVisible = false">返回</el-button>
- </span>
- </el-dialog>
- <problem-modify :problemId="problemId" :projectType="projectType" :villType="objType" :unitProblemInfo="problemInfo" :unitLevel="unitLevel" v-if="edit_dialogVisible" @closeEditDialog="closeEditDialog"></problem-modify>
- <problem-modify1 :editId="problemId" :projectType="projectType" :pType="objType" :unitProblemInfo="problemInfo" :unitLevel="unitLevel" v-if="edit_dialogVisible1" @closeEditDialog="closeEditDialog"></problem-modify1>
- <rectify-modify :problemId="problemId" :projectType="projectType" :villType="objType" :rectifyProblemInfo="rectifyProblemInfo" v-if="recheck_edit_dialogVisible" @closeEditDialog="closeRectifyEditDialog"></rectify-modify>
- </div>
- </template>
- <script>
- import {formatDateTime2} from '../../../utils/gw_date.js'
- import request from '../../../utils/gw_ajax_request.js'
- import myCascader from './problemList1.vue'
- import myCascaderHetong from './problemList1.vue'
- import myCascaderGongdi from './problemList1.vue'
- import problemDetail from './problemDetailsNew.vue'
- import problemDetail1 from './supervisionDetails.vue'
- import rectifyDetail from './rectifyDetails.vue'
- import problemModify from './problemModifyNew.vue'
- import problemModify1 from './problemModify2.vue'
- import rectifyModify from './rectifyModify.vue'
- import WenTiTianBaoPl from '../../duChaDuiXiang/reportTb/gongchengwenti-tianbao-piliang.vue'
- import addPblmForm from './addPblmForm'
- export default {
- props: ['unitProblemInfo','currentRow','objType','unitLevel','showAddBtn','canEdit','canReview','tabType','isDateRange'],
- data(){
- return{
- tableHeight: window.innerHeight - 280,
- tableData:[
- {
- date: '',
- name: '',
- province: '',
- city: '',
- address: '',
- zip: ''
- }
- ],
- add_flage: false,
- problemSearch:{
- inspPblmName: '',
- inspPblmCate: '',
- regid: '',
- regId: '',
- pType: '',
- pageSize: '10',
- pageNum: 1
- },
- problemForm:{
- objId: '',
- objType: '',
- problemType: '',
- inspPblmDesc: '',
- gongdiBzId: '',
- pblmsTypeId: '',
- qualityTypeId: '',
- pblmsId: '',
- defectTypeId: '',
- ifCasePblm: '',
- inspPblmCate: '',
- weigui: '',
- hetong: '',
- gongdi: '',
- quanlity: '',
- gongcheng: '',
- gwComFiles: []
- },
- rectifyForm: {
- rectConc: '',
- rectMeas: '',
- collTime: '',
- gwComFiles: [{
- id: "",
- filePath: "",
- bizId: ""
- }]
- },
- weigui: {
- pblmRelDics: [],
- pblmSn: ''
- },
- gongdi: {
- pblmRelDics: [],
- pblmSn: ''
- },
- hetong: {
- pblmRelDics: [],
- pblmSn: ''
- },
- quanlity: {
- pblmRelDics: [],
- pblmSn: ''
- },
- gongcheng: {
- pblmRelDics: [],
- pblmSn: ''
- },
- pblmPointNum: '',
- pblmDescList: '',
- pblmDescListHetong: '',
- pblmDescListGongdi: '',
- pblmAttach: [],
- pblmsTypeId: '',
- pblmId: '',
- imgList: [],
- videoList:[],
- audioList: [],
- pblmStat: '',
- gwComFiles: [],
- problemType: [
- {name: '违规行为',value:'1'},
- {name: '质量缺陷',value:'2'},
- {name: '合同问题',value:'3'}
- ],
- problemStatus: [
- {name: '已复查',value:'2'},
- {name: '未复查',value:'1'},
- {name: '新问题',value:'0'}
- ],
- rectifyStatus: [
- {name: '未整改',value:'0'},
- {name: '整改中',value:'1'},
- {name: '已整改',value:'2'}
- ],
- severity:[
- {name: '一般',value:'0'},
- {name: '较重',value:'1'},
- {name: '严重',value:'2'},
- {name: '非常严重',value:'3'}
- ],
- dialogType: '添加',
- dialogVisible: true,
- add_dialogVisible: false,
- add_dialogVisible_sxzzgbm: false,
- recheck_dialogVisible: false,
- chooseWeiguiProblem: false,
- chooseHeTongProblem: false,
- chooseGongdiProblem: false,
- chooseQuanlityProblem: false,
- chooseGongchengProblem: false,
- checked: false,
- problemId: '',
- isNature:'',
- 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,
- edit_dialogVisible1: false,
- recheck_edit_dialogVisible: false,
- multipleSelection: [],
- qusListsSelet: [],
- maxNumber: {
- strictA: '',
- strictB: '',
- strictC: '',
- strictD: '',
- strictE: ''
- },
- cater: ''
- }
- },
- computed: {
- persId() {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- },
- formatDateTime(){
- return formatDateTime2
- },
- },
- components: {
- upload: resolve => {
- require(["../../../widgets/uploadFile.vue"], resolve);
- },
- myCascader: myCascader,
- myCascaderHetong: myCascaderHetong,
- myCascaderGongdi: myCascaderGongdi,
- problemDetail: problemDetail,
- rectifyDetail: rectifyDetail,
- problemModify: problemModify,
- rectifyModify: rectifyModify,
- WenTiTianBaoPl: WenTiTianBaoPl,
- addPblmForm:addPblmForm,
- problemDetail1:problemDetail1,
- problemModify1:problemModify1
- },
- mounted(){
- this.search()
- this.listPblmType()
- },
- activated(){
- this.search()
- },
- methods:{
- closeAddPblm(){
- this.add_dialogVisible = false;
- this.maxNumber = {
- strictA: '',
- strictB: '',
- strictC: '',
- strictD: '',
- strictE: ''
- };
- this.cater = "";
- },
- closePblmDetail(){
- this.supervisionDetailsVisible = false;
- },
- closeDialog(){
- this.add_dialogVisible_sxzzgbm = false;
- this.searchList();
- },
- handleSelectionChange(selection,row) {
- var _self = this;
- this.canEdit = true;
- _self.multipleSelection.push({
- "ifCasePblm": row.ifCasePblm,
- "pblmId": row.pblmId,
- "pblmNm": row.nm,
- "pblmPasi": row.inspPblmCate
- })
- },
- search(){
- this.searchList()
- },
- searchList(){
- this.loading = false
- this.problemSearch.persId = this.persId
- this.problemSearch.pType = this.objType
- this.problemSearch['objId'] = this.unitProblemInfo.codes //工程code过滤
- this.problemSearch['secId'] = this.unitProblemInfo.secId //标段code过滤
- this.problemSearch.regid = this.unitProblemInfo.id //管理单位唯一标识
- this.problemSearch.regId = this.unitProblemInfo.id //管理单位唯一标识
- this.problemSearch.pageSize = this.pageSize
- this.problemSearch.pageNum = this.pageIndex
- this.problemSearch.tabType = this.tabType;
- console.log(this.findTime)
- if(this.findTime && this.findTime.length){
- this.problemSearch['startTime'] = this.findTime[0]
- this.problemSearch['endTime'] = this.findTime[1]
- }else{
- this.problemSearch['startTime'] = ''
- this.problemSearch['endTime'] = ''
- }
- request.post(`/dc/insp/pblm/page/keyReg`, this.problemSearch).then(res => {
- if (res.success) {
- this.tableData = res.data.list;
- this.total = res.data.total;
- }
- this.loading = false
- });
- },
- listPblmType(){
- let paramObj = {}
- if(this.unitProblemInfo.nature){
- if(this.unitProblemInfo.nature=="8"){
- return;
- }
- paramObj = {
- orgType: this.unitProblemInfo.nature,
- proType: this.objType
- }
- }
- request.post(`/obj/key/pblm/listPblmType`, paramObj).then(res => {
- if (res.success) {
- this.problemType = res.data;
- this.problemForm.problemType = this.problemType[0].pblmType
- }
- });
- },
- // 标准 附件 序号
- convertGroup(){
- let paramObj = {
- orgType: this.unitProblemInfo.nature,
- proType: this.objType,
- pblmType: this.problemForm.problemType
- }
- this.hetong.pblmRelDics = []
- this.weigui.pblmRelDics = []
- this.gongdi.pblmRelDics = []
- this.quanlity.pblmRelDics = []
- this.gongcheng.pblmRelDics = []
- request.post(`/obj/key/pblm/convertGroup`, paramObj).then(res => {
- if (res.success) {
- this.pblmPointNum = res.data;
- this.pblmPointNum.forEach(ele=>{
- ele.pblmAttach = ele.pblmAttach.split(',')
- if(ele.pblmPoint.indexOf('合同') > -1){
- this.hetong = ele
- }
- if(ele.pblmPoint.indexOf('违规') > -1){
- this.weigui = ele
- }
- if(ele.pblmPoint.indexOf('工地') > -1){
- this.gongdi = ele
- }
- if(ele.pblmPoint.indexOf('质量') > -1){
- this.quanlity = ele
- }
- if(ele.pblmPoint.indexOf('工程') > -1){
- this.gongcheng = ele
- }
- })
- if(this.dialogType == '添加'){
- this.weigui.pblmSn = ''
- this.gongdi.pblmSn = ''
- this.hetong.pblmSn = ''
- this.quanlity.pblmSn = ''
- this.gongcheng.pblmSn = ''
- }else{
- if(this.weigui.pblmRelDics.length){
- this.weigui.pblmRelDics.forEach(ele=>{
- if(ele.pblmAttach == this.problemForm.weigui){
- this.weigui.pblmSn = ele.pblmSn
- }
- })
- }
- if(this.gongdi.pblmRelDics.length){
- this.gongdi.pblmRelDics.forEach(ele=>{
- if(ele.pblmAttach == this.problemForm.gongdi){
- this.gongdi.pblmSn = ele.pblmSn
- }
- })
- }
- if(this.hetong.pblmRelDics.length){
- this.hetong.pblmRelDics.forEach(ele=>{
- if(ele.pblmAttach == this.problemForm.hetong){
- this.hetong.pblmSn = ele.pblmSn
- }
- })
- }
- if(this.quanlity.pblmRelDics.length){
- this.quanlity.pblmRelDics.forEach(ele=>{
- if(ele.pblmAttach == this.problemForm.quanlity){
- this.quanlity.pblmSn = ele.pblmSn
- }
- })
- }
- if(this.gongcheng.pblmRelDics.length){
- this.gongcheng.pblmRelDics.forEach(ele=>{
- if(ele.pblmAttach == this.problemForm.gongcheng){
- this.gongcheng.pblmSn = ele.pblmSn
- }
- })
- }
- }
- }
- });
- },
- //具体问题描述列表
- showPblmList(obj,attach,type){
- type == '违规' ? this.chooseWeiguiProblem = true : type == '合同' ? this.chooseHeTongProblem = true : type == '工地' ? this.chooseGongdiProblem = true : type == '工程' ? this.chooseGongchengProblem = true : this.chooseQuanlityProblem = true
- let paramObj = {}
- if(this.unitProblemInfo.nature){
- paramObj = {
- pblmType: obj.pblmPoint,
- sheetName: obj.pblmPoint,
- attachType: obj.proType,
- attach: attach,
- sn: obj.pblmSn
- }
- }else{
- paramObj = {
- pblmType: obj.pblmPoint,
- sheetName: obj.pblmPoint,
- attachType: obj.proType,
- attach: attach,
- sn: obj.pblmSn,
- version: ''
- }
- if(obj.pblmPoint == '工程缺陷'){
- paramObj.version = "v3"
- }
- }
- request.post(`/obj/key/pblm/pblmsList`, paramObj).then(res => {
- if (res.success) {
- if(type == '合同'){
- this.pblmDescListHetong = res.data;
- }else if(type == '工地'){
- this.pblmDescListGongdi = res.data;
- }else{
- this.pblmDescList = res.data;
- }
- }
- });
- },
- sendPblmsTypeIdWeigui(val){
- this.problemForm.pblmsTypeId = val.id
- this.problemForm.inspPblmCate = val.inspPblmCate
- this.maxNumber['strictA'] = val.inspPblmCate
- },
- sendPblmsTypeIdHetong(val){
- this.problemForm.pblmsId = val.id
- this.problemForm.inspPblmCate = val.inspPblmCate
- this.maxNumber['strictB'] = val.inspPblmCate
- },
- sendPblmsTypeIdGongdi(val){
- this.problemForm.gongdiBzId = val.id
- this.problemForm.inspPblmCate = val.inspPblmCate
- this.maxNumber['strictC'] = val.inspPblmCate
- },
- sendPblmsTypeIdQuanlity(val){
- this.problemForm.qualityTypeId = val.id
- this.problemForm.inspPblmCate = val.inspPblmCate
- this.maxNumber['strictD'] = val.inspPblmCate
- },
- sendPblmsTypeIdGongcheng(val){
- this.problemForm.defectTypeId = val.id
- this.problemForm.inspPblmCate = val.inspPblmCate
- this.maxNumber['strictE'] = val.inspPblmCate
- },
- toAddProblem(){
- this.dialogType = '添加'
- this.problemForm = {
- objId: '',
- objType: '',
- problemType: '',
- inspPblmDesc: '',
- pblmsTypeId: '',
- qualityTypeId: '',
- pblmsId: '',
- gongdiBzId: '',
- defectTypeId: '',
- ifCasePblm: '',
- inspPblmCate: '',
- weigui: '',
- gongdi: '',
- hetong: '',
- quanlity: '',
- gongcheng: '',
- gwComFiles: []
- },
- this.problemForm.problemType = this.problemType[0].pblmType
- this.chooseQuanlityProblem = false
- this.chooseHeTongProblem = false
- this.chooseGongdiProblem = false
- this.chooseWeiguiProblem = false
- this.chooseGongchengProblem = false
- this.add_flage = true
- this.cater = ''
- if(this.unitProblemInfo.nature=="8"){
- this.add_dialogVisible_sxzzgbm = true
- }else{
- this.add_dialogVisible = true
- }
- },
- toEditProblem(row){
- this.dialogType = '修改'
- this.problemId = row.pblmId
- this.problemInfo = row
- this.projectType = row.villType
- if(row.nature=="8"){
- this.edit_dialogVisible1 = true
- }else{
- this.edit_dialogVisible = true
- }
- },
- formatCate(val){
- if(val == '一般'){
- return "0";
- }else if(val == '较重'){
- return "1";
- }else if(val == '严重'){
- return "2";
- }else if(val == '非常严重'){
- return "3";
- }else{
- return "";
- }
- },
- onSubmit(){
- if(!this.problemForm.inspPblmDesc){
- this.$message.warning("请输入问题描述")
- return;
- }
- this.isRectify = false
- this.problemForm.ifCasePblm = this.checked ? '1' : '0'
- this.problemForm.inspPblmName = this.problemForm.problemType
- this.problemForm.inspPblmCate = this.formatCate(this.cater)
- this.problemForm.recPers = this.persId
- if((this.gongdi.pblmRelDics.length && !this.problemForm.gongdiBzId) && (this.weigui.pblmRelDics.length && !this.problemForm.pblmsTypeId)){
- this.$message.warning('违规附件对应问题及工地标准化附件对应问题必须选一个')
- return
- }else if(!this.gongdi.pblmRelDics.length){
- this.problemForm.gongdiBzId = ''
- }else if(!this.weigui.pblmRelDics.length){
- this.problemForm.pblmsTypeId = ''
- }
- // if(this.weigui.pblmRelDics.length && !this.problemForm.pblmsTypeId){
- // this.$message.warning('请选择违规附件对应问题')
- // return
- // }else if(!this.weigui.pblmRelDics.length){
- // this.problemForm.pblmsTypeId = ''
- // }
- if(this.hetong.pblmRelDics.length && !this.problemForm.pblmsId && !this.weigui.pblmRelDics.length){
- this.$message.warning('请选择合同管理附件对应问题')
- return
- }else if(!this.hetong.pblmRelDics.length){
- this.problemForm.pblmsId = ''
- }
- if(this.quanlity.pblmRelDics.length && !this.problemForm.qualityTypeId){
- this.$message.warning('请选择质量缺陷附件对应问题')
- return
- }else if(!this.quanlity.pblmRelDics.length){
- this.problemForm.qualityTypeId = ''
- }
- if(this.gongcheng.pblmRelDics.length && !this.problemForm.defectTypeId){
- this.$message.warning('请选择工程缺陷附件对应问题')
- return
- }else if(!this.gongcheng.pblmRelDics.length){
- this.problemForm.defectTypeId = ''
- }
- if(this.dialogType == '添加'){
- this.problemForm.regid = this.unitProblemInfo.id //管理单位唯一标识
- this.problemForm.regId = this.unitProblemInfo.id //管理单位唯一标识
- this.problemForm.objId = this.currentRow.objId;
- this.problemForm.objType = this.objType
- this.problemForm.villType = this.objType
- this.problemForm.pblmStat = "0";
- delete this.problemForm.weigui
- delete this.problemForm.hetong
- delete this.problemForm.quanlity
- delete this.problemForm.gongcheng
- request.post('/dc/insp/pblm',this.problemForm).then(res=>{
- if (res.success) {
- this.pblmId = res.data.pblmId;
- this.gwComFiles = [];
- this.pblmStat = res.data.pblmStat;
- this.add_flage = false
- this.add_dialogVisible = false
- this.searchList()
- if (this.$refs.uploadFile.submitUpload(res.data.pblmId)) {
- this.removeNewSupervision();
- }
- }
- })
- }else{
- request.post('/dc/insp/pblm/update',this.problemForm).then(res=>{
- if (res.success) {
- this.pblmId = res.data.pblmId;
- this.gwComFiles = [];
- this.pblmStat = res.data.pblmStat;
- this.add_flage = false
- this.add_dialogVisible = false
- this.searchList()
- if (this.$refs.uploadFile.submitUpload(res.data.pblmId)) {
- this.removeNewSupervision();
- }
- }
- })
- }
- },
- // 复查
- toRecheckProblem(row){
- this.dialogType = row.reviConc == '1' ? '添加' : row.reviConc == '2' ? '修改' : '添加'
- this.rectifyForm.rectConc = row.rectConc
- this.rectifyForm.rectMeas = row.rectMeas
- Object.assign(this.rectifyRow,row)
- if(this.dialogType == '添加'){
- this.rectifyForm.collTime = ''
- this.recheck_dialogVisible = true
- }else{
- this.rectifyProblemInfo = row
- this.problemId = row.pblmId
- this.projectType = row.villType
- this.rectifyForm.collTime = this.formatDateTime(row.collTime)
- this.recheck_edit_dialogVisible = true
- }
- },
- rectifySubmit(){
- this.isRectify = true
- this.rectifyForm['recPers'] = this.persId
- if(this.dialogType == '添加'){
- this.rectifyForm['pblmId'] = this.rectifyRow.pblmId
- this.rectifyForm['orgGuid'] = this.rectifyRow.regid
- request.post('/dc/insp/rectFdbk',this.rectifyForm).then(res=>{
- if (res.success) {
- // this.pblmId = res.data.pblmId;
- this.pblmId = this.rectifyRow.pblmId
- this.gwComFiles = [];
- this.pblmStat = res.data.pblmStat;
- this.recheck_dialogVisible = false
- this.searchList()
- if (this.$refs.uploadFile.submitUpload(res.data.guid)) {
- this.removeNewSupervision();
- }
- }
- })
- }else{
- // this.rectifyForm['guid'] = this.rectifyRow.guid
- this.rectifyForm['pblmId'] = this.rectifyRow.pblmId
- this.rectifyForm['orgGuid'] = this.rectifyRow.regid
- this.rectifyForm['id'] = this.rectifyRow.guid
- delete this.rectifyForm.collTime
- request.post('/dc/insp/rectFdbk',this.rectifyForm).then(res=>{
- if (res.success) {
- this.pblmId = res.data.guid;
- // this.pblmId = this.rectifyRow.pblmId
- this.gwComFiles = [];
- this.pblmStat = res.data.pblmStat;
- this.recheck_dialogVisible = false
- this.searchList()
- if (this.$refs.uploadFile.submitUpload(res.data.guid)) {
- this.removeNewSupervision();
- }
- }
- })
- }
- },
- // 查看详情
- toShowDetail(row){
- this.problemId = row.pblmId
- this.rectifyId = row.guid
- this.projectType = row.villType
- this.supervisionDetailsVisible = true
- this.isNature = row.nature;
- },
- 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();
- },
- handleClose(){
- this.$emit('dialogClose')
- },
- selectHetongChange(obj,val,type){
- this.$forceUpdate()
- let _this = this
- this.chooseHeTongProblem = false
- this.hetong.pblmRelDics.forEach(ele=>{
- if(ele.pblmAttach == val){
- _this.hetong.pblmSn = ele.pblmSn
- }
- })
- this.showPblmList(obj,val,type)
- },
- selectGongdiChange(obj,val,type){
- this.$forceUpdate()
- let _this = this
- this.chooseGongdiProblem = false
- this.gongdi.pblmRelDics.forEach(ele=>{
- if(ele.pblmAttach == val){
- _this.gongdi.pblmSn = ele.pblmSn
- }
- })
- this.showPblmList(obj,val,type)
- },
- selectWeiguiChange(obj,val,type){
- this.$forceUpdate()
- let _this = this
- this.chooseWeiguiProblem = false
- this.weigui.pblmRelDics.forEach(ele=>{
- if(ele.pblmAttach == val){
- _this.weigui.pblmSn = ele.pblmSn
- }
- })
- this.showPblmList(obj,val,type)
- },
- selectQuanlityChange(obj,val,type){
- this.$forceUpdate()
- let _this = this
- this.chooseQuanlityProblem = false
- this.quanlity.pblmRelDics.forEach(ele=>{
- if(ele.pblmAttach == val){
- _this.quanlity.pblmSn = ele.pblmSn
- }
- })
- this.showPblmList(obj,val,type)
- },
- selectGongchengChange(obj,val,type){
- this.$forceUpdate()
- let _this = this
- this.chooseGongchengProblem = false
- this.gongcheng.pblmRelDics.forEach(ele=>{
- if(ele.pblmAttach == val){
- _this.gongcheng.pblmSn = ele.pblmSn
- }
- })
- this.showPblmList(obj,val,type)
- },
- handleDetailClick(tab, event) {
- console.log(tab, event);
- },
- problemTypeChange(val){
- // alert(val)
- this.weigui.pblmSn = ''
- this.hetong.pblmSn = ''
- this.quanlity.pblmSn = ''
- this.gongcheng.pblmSn = ''
- this.gongdi.pblmSn = ''
- this.problemForm.weigui = ''
- this.problemForm.hetong = ''
- this.problemForm.gongdi = ''
- this.problemForm.quanlity = ''
- this.problemForm.gongcheng = ''
- this.chooseHeTongProblem = false
- this.chooseGongdiProblem = false
- this.chooseWeiguiProblem = false
- this.chooseQuanlityProblem = false
- this.chooseGongchengProblem = false
- },
- 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.edit_dialogVisible1 = false
- this.searchList()
- },
- closeRectifyEditDialog(){
- this.recheck_edit_dialogVisible = false
- this.searchList()
- },
- },
- watch:{
- tabType(val){
- if(val){
- this.searchList();
- }
- },
- 'maxNumber':{
- deep: true,
- handler(newVal,oldVal){
- let arr = [];
- if(this.maxNumber['strictA']){
- arr.push(parseInt(this.maxNumber['strictA']))
- }
- if(this.maxNumber['strictB']){
- arr.push(parseInt(this.maxNumber['strictB']))
- }
- if(this.maxNumber['strictC']){
- arr.push(parseInt(this.maxNumber['strictC']))
- }
- if(this.maxNumber['strictD']){
- arr.push(parseInt(this.maxNumber['strictD']))
- }
- if(this.maxNumber['strictE']){
- arr.push(parseInt(this.maxNumber['strictE']))
- }
- let value = Math.max(...arr);
- if(value == '0'){
- this.cater = '一般';
- }else if(value == '1'){
- this.cater = '较重'
- }else if(value == '2'){
- this.cater = '严重'
- }else if(value == '3'){
- this.cater = '非常严重'
- }else{
- this.cater = ''
- }
- }
- },
- 'problemForm.problemType':{
- deep: true,
- handler(newVal,oldVal){
- this.convertGroup()
- }
- },
- 'unitProblemInfo.id':{
- deep: true,
- handler(newVal,oldVal){
- this.searchList()
- this.listPblmType()
- }
- },
- 'unitProblemInfo.codes':{
- deep: true,
- handler(newVal,oldVal){
- this.searchList()
- }
- },
- 'unitProblemInfo.secId':{
- deep: true,
- handler(newVal,oldVal){
- this.searchList()
- }
- },
- 'add_dialogVisible':{
- deep: true,
- handler(newVal,oldVal){
- if(!newVal){
- this.add_flage = false
- }
- }
- }
- // 'weigui.pblmSn':{
- // deep: true,
- // handler(val){
- // this.showPblmList(this.weigui,this.problemForm.weigui,'违规')
- // }
- // },
- // 'hetong.pblmSn':{
- // deep: true,
- // handler(val){
- // this.showPblmList(this.hetong,this.problemForm.hetong,'合同')
- // }
- // },
- // 'quanlity.pblmSn':{
- // deep: true,
- // handler(val){
- // this.showPblmList(this.quanlity,this.problemForm.quanlity,'质量')
- // }
- // },
- // 'gongcheng.pblmSn':{
- // deep: true,
- // handler(val){
- // this.showPblmList(this.gongcheng,this.problemForm.gongcheng,'工程')
- // }
- // }
- },
- filters:{
- inspPblmCate(value){
- if(!value || value == ''){
- return ''
- }
- if(value == '0'){
- return '一般'
- }else if(value == '1'){
- return '较重'
- }else if(value == '2'){
- return '严重'
- }else if(value == '3'){
- return '非常严重'
- }else{
- return value
- }
- },
- }
- }
- </script>
- <style lang="scss">
- .search_wrapper{
- display: flex;
- justify-content: space-between;
- div:last-child{
- min-width: 152px !important;
- }
- }
- .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>
|