| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043 |
- <template>
- <div>
- <el-container>
- <el-aside
- width="318px"
- style="border-right:2px solid #d5d5ff;float:left;height:calc(100vh - 100px);text-align: center;">
- <span style="display: flex;justify-content: center;align-items: center;border-bottom: 1px solid #ebeef5;">
- <el-button size="mini" :class="tabType==1 ? 'skactive' : 'sknormal'" @click="tabChange('1')">当前数据</el-button>
- <!-- <el-button size="mini" :class="tabType==2 ? 'skactive' : 'sknormal'" @click="tabChange('2')">历史数据</el-button>-->
- <el-button size="mini" :class="tabType==0 ? 'skactive' : 'sknormal'" @click="tabChange('0')">全部数据</el-button>
- </span>
- <div class="tree" style="height: calc(100% - 54px);width: 100%;overflow: auto;display: inline-flex;">
- <el-tree
- :highlight-current="true"
- style="height:100%;"
- :data="treeData"
- node-key="id"
- show-checkbox
- @check-change="handleCheckChange"
- ref="jigou_tree">
- <div class="custom-tree-node" slot-scope="{ node, data }">
- <span style="float:left;">
- {{ data.pnm}}
- </span>
- <div style="float:right;display: flex;justify-content: flex-end;align-items: center;width:50%;">
- <span style="color:blue;width:80px;"></span>
- </div>
- </div>
- </el-tree>
- </div>
- </el-aside>
- <el-main style="margin:0px;padding:10px;overflow-y:hidden;" class="shuiku" v-loading="exportLoading">
- <div class="search_wrapper">
- <el-form :inline="true" :model="problemSearch" class="demo-form-inline">
- <el-form-item label="问题类别">
- <el-select v-model="problemSearch.problemType" clearable>
- <el-option :label="item.pblmType" :value="item.value" 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.region" clearable :disabled="problemSearch.reviConc !== '2'">
- <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-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-item label="复查时间">
- <el-date-picker
- v-model="problemSearch.recheckDate"
- type="daterange"
- value-format="yyyy-MM-dd"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期">
- </el-date-picker>
- </el-form-item> -->
- <el-form-item label="问题督查状态:">
- <el-select v-model="problemSearch.state" clearable placeholder="请选择">
- <el-option
- v-for="item in stateList"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item style="display: flex;justify-content: right;">
- <el-button style="color:rgba(255,255,255,1);"
- type="success"
- icon="el-icon-download"
- @click="exportExcel">导出EXCEL
- </el-button>
- <!-- <el-button style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-bottom:5px;"-->
- <!-- type="success"-->
- <!-- icon="el-icon-download"-->
- <!-- @click="exportWord">导出WORD-->
- <!-- </el-button>-->
- <el-button style="color:rgba(255,255,255,1);"
- type="primary"
- icon="el-icon-search"
- @click="search"> 查 询
- </el-button>
- <el-button
- style="color:rgba(255,255,255,1);"
- type="success"
- @click="submitBtn"
- >问题提交
- </el-button>
- <el-button
- v-if="isGd"
- style="color:rgba(255,255,255,1);"
- type="success"
- icon="el-icon-download"
- @click="toForm"
- >导出一表一单
- </el-button>
- </el-form-item>
- </el-form>
- </div>
- <el-table
- v-loading="loading"
- :data="tableData"
- border
- @row-click="openDetails"
- @selection-change="handleSelectionChange"
- :height="tableHeight"
- style="width: 100%">
- <el-table-column
- type="selection"
- min-width="55">
- </el-table-column>
- <el-table-column
- prop="nm"
- align="center"
- show-overflow-tooltip
- label="工程名称"
- min-width="100">
- </el-table-column>
- <el-table-column
- show-overflow-tooltip
- prop="inspPblmName"
- align="center"
- label="问题类别"
- min-width="100">
- </el-table-column>
- <el-table-column
- prop="reviOrg"
- label="责任单位"
- align="center"
- show-overflow-tooltip
- min-width="100">
- </el-table-column>
- <!-- <el-table-column
- v-if="unitLevel"
- label="单位名称"
- width="180">
- <template slot-scope="scope">
- {{ scope.row.firstName ? scope.row.firstName : scope.row.secondName ? scope.row.secondName : scope.row.thirdName}}
- </template>
- </el-table-column> -->
- <!-- <el-table-column-->
- <!-- show-overflow-tooltip-->
- <!-- prop="inspPblmDesc"-->
- <!-- align="center"-->
- <!-- label="质量问题信息"-->
- <!-- width="120">-->
- <!-- </el-table-column>-->
- <el-table-column
- prop="inspPblmCate"
- align="center"
- label="严重程度"
- min-width="80">
- <template slot-scope="scope">
- <p v-if="scope.row.inspPblmCate == 0"><span class="inspPblmCate" style="background: #27C19F;">一般</span></p>
- <p v-if="scope.row.inspPblmCate == 1"><span class="inspPblmCate" style="background: #E6A23C;" >较重</span></p>
- <p v-if="scope.row.inspPblmCate == 2"><span class="inspPblmCate" style="background: #F56C6C;" >严重</span></p>
- <p v-if="scope.row.inspPblmCate == 3"><span class="inspPblmCate" style="background: #795548;">特别严重</span></p>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="120"
- prop="state"
- label="问题督查状态">
- <template slot-scope="scope">
- <p v-if="Number(scope.row.state) === 0"><span class="inspPblmCate"
- style="background: #F56C6C;">未提交</span>
- </p>
- <p v-if="scope.row.state == 2"><span class="inspPblmCate"
- style="background: #409EFF;">已提交</span>
- </p>
- <p v-if="scope.row.state == 3"><span class="inspPblmCate"
- style="background: #67C23A;">已发布</span>
- </p>
- </template>
- </el-table-column>
- <el-table-column
- prop="ifCasePblm"
- label="是否典型"
- align="center"
- min-width="80">
- <template slot-scope="scope">
- {{scope.row.ifCasePblm == '1' ? '典型' : scope.row.ifCasePblm == '0' ? '非典型' : ''}}
- </template>
- </el-table-column>
- <!-- <el-table-column-->
- <!-- show-overflow-tooltip-->
- <!-- prop="attachWgName"-->
- <!-- label="违规行为附件"-->
- <!-- align="center"-->
- <!-- width="80">-->
- <!-- </el-table-column>-->
- <!-- <el-table-column-->
- <!-- show-overflow-tooltip-->
- <!-- prop="attachWgSn"-->
- <!-- label="违规行为序号"-->
- <!-- align="center"-->
- <!-- width="80">-->
- <!-- </el-table-column>-->
- <!-- <el-table-column-->
- <!-- show-overflow-tooltip-->
- <!-- prop="attachHetongName"-->
- <!-- align="center"-->
- <!-- label="合同管理附件"-->
- <!-- width="80">-->
- <!-- </el-table-column>-->
- <!-- <el-table-column-->
- <!-- show-overflow-tooltip-->
- <!-- prop="attachHetongSn"-->
- <!-- label="合同管理序号"-->
- <!-- align="center"-->
- <!-- width="80">-->
- <!-- </el-table-column>-->
- <!-- <el-table-column-->
- <!-- show-overflow-tooltip-->
- <!-- prop="attachQuaName"-->
- <!-- align="center"-->
- <!-- label="质量缺陷附件"-->
- <!-- width="80">-->
- <!-- </el-table-column>-->
- <!-- <el-table-column-->
- <!-- show-overflow-tooltip-->
- <!-- prop="attachQuaSn"-->
- <!-- align="center"-->
- <!-- label="质量缺陷序号"-->
- <!-- width="80">-->
- <!-- </el-table-column>-->
- <!-- <el-table-column-->
- <!-- show-overflow-tooltip-->
- <!-- prop="attachGongdiName"-->
- <!-- align="center"-->
- <!-- label="工地标准化附件"-->
- <!-- width="80">-->
- <!-- </el-table-column>-->
- <!-- <el-table-column-->
- <!-- show-overflow-tooltip-->
- <!-- prop="attachGongdiSn"-->
- <!-- align="center"-->
- <!-- label="工地标准化序号"-->
- <!-- width="80">-->
- <!-- </el-table-column>-->
- <el-table-column
- show-overflow-tooltip
- prop="persName"
- align="center"
- label="上报人"
- min-width="80">
- </el-table-column>
- <el-table-column
- show-overflow-tooltip
- prop="orgNm"
- align="center"
- label="所在组"
- min-width="100">
- </el-table-column>
- <el-table-column
- prop="collTime"
- label="发现时间"
- align="center"
- min-width="100">
- <template slot-scope="scope">
- {{scope.row.collTime ? formatDateTime(scope.row.collTime) : ''}}
- </template>
- </el-table-column>
- <!-- <el-table-column
- prop="reviConc"
- label="问题状态"
- 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="有无多媒体"
- align="center"
- 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="100">
- <template slot-scope="scope">
- <el-button icon="el-icon-edit" title="修改问题" type="text" v-if="ownPriv('manage') && (!scope.row.reviConc || scope.row.reviConc =='0')" @click.native.stop="toEditProblem(scope.row)"></el-button>
- <el-button icon="el-icon-edit" title="修改问题" type="text" v-if="ownPriv('manage') && (scope.row.reviConc == '1' || scope.row.reviConc =='2')" @click.native.stop="toRecheckProblem(scope.row)"></el-button>
- <el-button icon="el-icon-view" title="查看详情"type="text" @click.native.stop="toShowDetail(scope.row)"></el-button>
- <el-button icon="el-icon-delete" type="text" title="删除问题" @click.native.stop="deteleProblem(scope.row)" v-if="ownPriv('manage')"></el-button>
- </template>
- </el-table-column>
- </el-table>
- <el-pagination :pager-count="5" :current-page="pageIndex" background
- :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"
- :page-sizes="[10, 20, 50, 100]"
- @current-change="pageIndexChange" @size-change="handleSizeChange"
- ></el-pagination>
- </el-main>
- </el-container>
- <problem-modify :problemId="problemId" :projectType="projectType" :villType="'8'" :unitProblemInfo="unitProblemInfo" v-if="add_dialogVisible" @closeEditDialog="closeEditDialog"></problem-modify>
- <rectify-modify :problemId="problemId" :projectType="projectType" :villType="'8'" :rectifyProblemInfo="rectifyProblemInfo" v-if="recheck_dialogVisible" @closeEditDialog="closeRectifyEditDialog"></rectify-modify>
- <el-dialog class="outerDialog custom_dialog detail_dialog" width="60%" title="" v-if="supervisionDetailsVisible" :visible.sync="supervisionDetailsVisible">
- <el-tabs v-model="activeName" @tab-click="handleDetailClick">
- <el-tab-pane label="问题详情" name="problem-detail">
- <problem-detail :problemId="problemId" :projectType="projectType" :reviConc="reviConc"></problem-detail>
- </el-tab-pane>
- <el-tab-pane label="整改详情" name="rectify-detail" v-if="reviConc == '2'">
- <rectify-detail :rectifyId="rectifyId"></rectify-detail>
- </el-tab-pane>
- </el-tabs>
- <span slot="footer">
- <el-button style="margin-top:5px;" @click="supervisionDetailsVisible = false">返回</el-button>
- </span>
- </el-dialog>
- <el-dialog
- class="outerDialog custom_dialog"
- title="类型"
- width="20%"
- :visible.sync="isToFormVisible">
- <span>
- <p style="display: flex;align-items: center;">
- 类型 <el-select v-model="oneForm" placeHolder="请选择一表一单类型" style="width:calc(100% - 60px)!important;padding-left: 10px;">
- <el-option label="问题(现场)确认单" value="wtxcqrd-1"></el-option>
- <el-option label="问题提交单(流域机构督查办)" value="wttjd-2"></el-option>
- </el-select>
- </p>
- </span>
- <span slot="footer">
- <el-button type="primary" @click="toFormOk">确定</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import axios from 'axios';
- import {formatDateTime2,formatDateTime2New} from '../../utils/gw_date.js'
- import {pblmSubmit} from "../../api/duChaAPI.js";
- import {exportModel} from "@util/gw_exportModel";
- import request from '../../utils/gw_ajax_request.js'
- import { hostUrl } from "@util/global_variable.js";
- import problemModify from '../duChaTianBao/project/problemModify.vue'
- import rectifyModify from '../duChaTianBao/project/rectifyModify.vue'
- import problemDetail from '../duChaTianBao/project/problemDetails.vue'
- import rectifyDetail from '../duChaTianBao/project/rectifyDetails.vue'
- export default {
- props: [],
- data(){
- return{
- oneForm:"wtxcqrd-1",
- isToFormVisible:false,
- ids:"",
- tabType:"0",//0全部数据,1当前数据,2历史数据
- tableHeight: window.innerHeight - 280,
- tableData:[
- {
- date: '',
- name: '',
- province: '',
- city: '',
- address: '',
- zip: ''
- }
- ],
- problemSearch:{
- problemType: '',
- inspPblmCate: '',
- reviConc: '',
- regid: '',
- regId: '',
- pType: '',
- state: "",
- pageSize: '20',
- pageNum: 1
- },
- stateList: [
- {
- label: '未提交',
- value: '0'
- },
- {
- label: '已提交',
- value: '2'
- },
- {
- label: '已发布',
- value: '3'
- }
- ],
- 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: [
- {pblmType: '违规行为',value:'0'},
- {pblmType: '质量缺陷',value:'1'},
- {pblmType: '合同问题',value:'2'},
- {pblmType: '工程缺陷',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,
- 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,
- treeData: [],
- findUseOrgArray: [],
- treeNodeArray: [],
- loading: true,
- multipleSelection: [], // 已选
- rectifyProblemInfo: null,
- exportLoading:false,
- datas:{}
- }
- },
- computed: {
- persId() {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- },
- formatDateTime(){
- return formatDateTime2New
- },
- hostUrl(){
- return hostUrl
- },
- isGd(){
- if(localStorage.getItem('currentRlcode').substring(0,2)=="44"){
- return true;
- }else{
- return false;
- }
- }
- },
- components: {
- upload: resolve => {
- require(["../../widgets/uploadFile.vue"], resolve);
- },
- problemModify: problemModify,
- problemDetail: problemDetail,
- rectifyDetail: rectifyDetail,
- rectifyModify: rectifyModify
- },
- mounted(){
- this.getLeftTreeData();
- this.searchList()
- },
- activated(){
- // 监督司提的一个优化,来回切换页签的时候,能不能不主动刷新页面,这样他们不方便来回对比数据
- // this.getLeftTreeData();
- // this.search();
- // this.findParams = {
- // hasVedio:"",
- // adCode: "",
- // pblmStat: "",
- // inspPblmCate: "",
- // ifCasePblm: "",
- // nm: "",
- // rsName: "",
- // adFullName: "",
- // startTime: "",
- // endTime: "",
- // objType: 1,
- // inspPblmName: "",
- // persId: localStorage.getItem("userid")
- // }
- },
- methods:{
- openDetails(row){
- this.problemId = row.pblmId
- this.rectifyId = row.guid
- this.projectType = row.villType == '8' ? '1' : row.villType == '9' ? '2' : '1'
- this.reviConc = row.reviConc
- this.supervisionDetailsVisible = true
- },
- tabChange(tabType){
- this.tabType = tabType;
- this.getLeftTreeData();
- this.searchList();
- },
- getLeftTreeData() {
- var _self = this;
- request.get("/dc/organization/base/getAllNode", {
- params: {
- userId: this.persId,
- orgType: "004",
- tabType:this.tabType
- }
- }).then(res => {
- let data = res.data;
- data.forEach(ele => {
- if (ele.pid == null || ele.pid == "") {
- ele.pid = "004";
- }
- });
- data = _self.getTrees(data);
- _self.treeData = data;
- console.log(data);
- });
- },
- search(){
- this.searchList()
- },
- searchList(){
- let _self = this;
- this.problemSearch.persId = this.persId
- this.problemSearch.pType = '4'
- // this.problemSearch.regid = this.unitProblemInfo.oneUnitId ? this.unitProblemInfo.oneUnitId : this.unitProblemInfo.id //管理单位唯一标识
- // this.problemSearch.regId = this.unitProblemInfo.oneUnitId ? this.unitProblemInfo.oneUnitId : this.unitProblemInfo.id //管理单位唯一标识
- this.problemSearch.pageSize = this.pageSize
- this.problemSearch.pageNum = this.pageIndex
- this.problemSearch.reviConc = "0"
- 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'] = ''
- }
- this.problemSearch.tabType = this.tabType;
- request.get("/dc/organization/base/getAllNode", {params: {userId: this.userId,orgType: "004",tabType:this.tabType}}).then(res => {
- _self.loading = true;
- let orgAllNode = res.data;
- let data = _self.problemSearch;
- _self.findUseOrgArray = [];
- _self.treeNodeArray.forEach(item => {
- if (item.id.length < 12) {
- orgAllNode.forEach(orgItem => {
- if (orgItem.id.startsWith(item.code)) {
- _self.findUseOrgArray.push(orgItem.id);
- }
- });
- }
- _self.findUseOrgArray.push(item.id);
- });
- if (_self.findUseOrgArray.length > 0) {
- data["orgIds"] = _self.findUseOrgArray.join(",");
- } else {
- data["orgIds"] = "";
- }
- request.post(`/dc/insp/pblm/page/keyReg`, this.problemSearch).then(res => {
- _self.loading = false;
- _self.multipleSelection = [];
- if (res.success) {
- this.tableData = res.data.list;
- this.total = res.data.total;
- if(this.problemSearch.pType == '7'){
- // this.tableData.forEach(ele=>{
- // ele['reviOrg'] = this.unitLevel
- // })
- }
- }
- });
- });
- },
- async submitBtn() {
- if (this.multipleSelection.length === 0) {
- this.$message.warning('请至少选择一条问题');
- return;
- }
- let newArray = this.multipleSelection.map((item) => {
- return {
- "objId": item.objId,
- "objType": item.objType,
- "state": "3"
- }
- });
- const {success, message} = await pblmSubmit(newArray);
- if (success) {
- this.$message.success('问题发布成功');
- this.search();
- } else {
- this.$message.warning(message);
- }
- },
- toEditProblem(row){
- this.dialogType = '修改'
- this.unitProblemInfo = row
- this.problemId = row.pblmId
- this.projectType = row.villType == '8' ? '1' : row.villType == '9' ? '2' : '1'
- this.add_dialogVisible = true
- },
- // 复查
- toRecheckProblem(row){
- this.rectifyProblemInfo = 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 = ''
- }else{
- this.rectifyForm.collTime = this.formatDateTime(row.collTime)
- }
- this.recheck_dialogVisible = true
- },
- // 查看详情
- toShowDetail(row){
- this.problemId = row.pblmId
- this.rectifyId = row.guid
- this.projectType = row.villType == '8' ? '1' : row.villType == '9' ? '2' : '1'
- this.reviConc = row.reviConc
- 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();
- },
- handleClose(){
- this.$emit('dialogClose')
- },
- handleDetailClick(tab, event) {
- console.log(tab, event);
- },
- pageIndexChange(val) {
- this.pageIndex = val;
- this.searchList();
- },
- handleSizeChange(val) {
- this.pageSize = val;
- this.searchList();
- },
- //格式化树形数据
- getTrees(list) {
- //@wxcwater重写方法 适应多个树
- let highLevelLength = 99;//预设最大节点id长度,目前最大应该为12,所以设置为99保证正常
- let _self =this;
- list.forEach((item,index)=>{
- item['pidLength'] = item.pid&&item.pid!=''?item.pid.length:0;
- if(highLevelLength>item.pidLength){
- highLevelLength = item.pidLength;
- }
- });
- console.log(highLevelLength);
- let heightLevelNode = [];
- list.forEach((item,index)=>{
- if(highLevelLength>=item.pidLength){
- heightLevelNode.push(item);
- }
- });
- list.forEach((item,index)=>{
- heightLevelNode.forEach((pItem)=>{
- _self.addTreeNode(pItem,item);
- });
- });
- console.log(heightLevelNode);
- return heightLevelNode;
- },
- addTreeNode:function(treeNode,leafNode){
- let _self = this;
- if(!treeNode.hasOwnProperty('children')){
- treeNode['children'] = [];
- }
- if(leafNode.pid == treeNode.id){
- treeNode.children.push(leafNode);
- return;
- }
- treeNode.children.forEach((item) => {
- _self.addTreeNode(item,leafNode);
- });
- },
- handleCheckChange(data, checked, indeterminate) {
- let cNarray = this.$refs["jigou_tree"].getCheckedNodes();
- console.log(cNarray);
- this.treeNodeArray = cNarray;
- },
- // 已选择项
- handleSelectionChange(val) {
- this.multipleSelection = val;
- },
- closeEditDialog(){
- this.add_dialogVisible = false
- this.searchList()
- },
- closeRectifyEditDialog(){
- this.recheck_dialogVisible = false
- this.searchList()
- },
- toForm(){
- var idArr = [];
- if(this.multipleSelection && this.multipleSelection.length==0){
- this.$message.warning("请选择数据");
- return false;
- }else{
- this.multipleSelection.forEach((item)=>{
- idArr.push(item.pblmId);
- })
- }
- this.ids = idArr.join(",");
- this.isToFormVisible = true;
- },
- toFormOk(){
- let host = hostUrl;
- let nginx = '/pageofficePath/';
- var params = {
- ids:this.ids
- }
- axios.post('/pageofficePath/pageoffice/pblm/list/sendIds',params).then((res)=> {
- if(res.status==200){
- let href = 'pageoffice://|' + host + nginx + '/pageoffice/pblm/list/word?filename='+this.oneForm+'|width=1100px;height=800px;ismodal=false;||91A4EE66EC1921F376873E85D6C74FFA|A890649B44577C32CE1930797E1299F9';
- let a = document.createElement('a'); // 创建a标签
- a.setAttribute('href', href);// href链接
- a.click();// 自执行点击事件
- }
- })
- },
- async exportExcel() {
- let _self = this;
- _self.exportLoading = true;
- await request.get("/dc/organization/base/getAllNode", {
- params: {
- userId: this.persId,
- orgType: "004"
- }
- }).then(res => {
- let orgAllNode = res.data;
- let data = _self.problemSearch;
- data.pageNum = _self.pageIndex;
- data.pageSize = _self.pageSize;
- data.villType = "8";
- data.pType = "4";
- this.datas = JSON.stringify(data);
- _self.treeNodeArray.forEach(item => {
- console.log(item);
- if (item.id.length < 12) {
- orgAllNode.forEach(orgItem => {
- if (orgItem.id.startsWith(item.id)) {
- _self.findUseOrgArray.push(orgItem.id);
- }
- });
- } else {
- _self.findUseOrgArray.push(item.id);
- }
- });
- });
- let url = "/pdcApi/dc/insp/pblm/page/export";
- let type = "post";
- let exportName = "水利工程建设问题列表.xls"
- let result = await exportModel(type,url,exportName,this.datas);
- _self.exportLoading = result;
- },
- async exportWord() {
- let _self = this;
- _self.exportLoading = true;
- await request.get("/dc/organization/base/getAllNode", {
- params: {
- userId: this.persId,
- orgType: "004"
- }
- }).then(res => {
- let orgAllNode = res.data;
- let data = _self.findParams;
- data.pageNum = _self.pageIndex;
- data.pageSize = _self.pageSize;
- data.villType = "8";
- data.pType = "4";
- this.datas = data;
- _self.treeNodeArray.forEach(item => {
- if (item.id.length < 12) {
- orgAllNode.forEach(orgItem => {
- if (orgItem.id.startsWith(item.id)) {
- _self.findUseOrgArray.push(orgItem.id);
- }
- });
- } else {
- _self.findUseOrgArray.push(item.id);
- }
- });
- });
- //下载word文档2
- await request.post('/keyReg/doc',this.datas).then(res=>{
- if(res.success){
- _self.exportLoading = false;
- console.log(this.response)
- var a = document.createElement('a');
- a.href = `${this.hostUrl}${res.data.downloadPath}`;
- //设置文件名称
- a.download = '水利工程运行问题详情.doc';
- a.click();
- }else{
- _self.$mesage.error(res.message)
- }
- }).catch(res=>{
- _self.$mesage.error(res.message)
- })
- },
- },
- watch:{
- // '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(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{
- width: 100%;
- min-height: 70px;
- 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;
- }
- .inspPblmCate{
- padding: 2px 10px;
- border-radius:10px;
- color: #ffffff;
- -webkit-border-radius: 10px;
- -moz-border-radius: 10px;
- border-radius: 10px;
- }
- .skactive{
- background: #3f8eff !important;
- color:white !important;
- margin-top: 5px;
- margin-bottom: 5px;
- }
- .sknormal{
- background: white;
- margin-top: 5px;
- margin-bottom: 5px;
- }
- </style>
|