| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480 |
- <template>
- <div style="height:100%;width:100%" id="wenTiContainer_sk">
- <el-container>
- <el-aside
- width="318px"
- style="border-right:2px solid #d5d5ff;float:left;text-align: center;"
- :style="{'max-height':testHeight+'px','height':testHeight+'px'}">
- <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% - 50px);
- 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:0px;" class="shuiku" v-loading="exportLoading">
- <div class="pages" :style="{'max-height':testHeight+'px'}">
- <div class="search">
- <el-row type="flex" justify="space-between">
- <el-col :span="24">
- <el-form
- :inline="true"
- size="mini"
- class="demo-form-inline"
- style="padding-left: 10px;"
- >
- <el-form-item label="行政区划:">
- <el-input
- resize="none"
- type="input"
- :rows="3"
- placeholder="请输入行政区划名称"
- v-model.trim="findParams.adFullName"
- clearable
- ></el-input>
- </el-form-item>
- <el-form-item label="工程名称:">
- <el-input
- resize="none"
- type="input"
- :rows="3"
- placeholder="请输入工程名称"
- v-model.trim="findParams.nm"
- clearable
- ></el-input>
- </el-form-item>
- </el-form>
- </el-col>
- </el-row>
- <el-row type="flex" justify="space-bv-fortween" v-show="showExpandSearchPanel">
- <el-col :span="24">
- <el-form
- :inline="true"
- size="mini"
- class="demo-form-inline"
- style="padding-left: 10px;"
- >
- <el-form-item label="问题类别:">
- <el-select v-model="findParams.inspPblmName" clearable placeholder="请选择">
- <el-option
- v-for="item in problemList"
- :key="item.guid"
- :label="item.inspPblmsName"
- :value="item.inspPblmsName"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="是否典型:">
- <el-select v-model="findParams.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="pblscr" clearable placeholder="请选择">
- <el-option
- v-for="item in pblscrList"
- :key="item.value"
- :label="item.lable"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="上报人员:">
- <el-input
- resize="none"
- type="input"
- :rows="3"
- placeholder="请输入名称"
- v-model.trim="findParams.persName"
- ></el-input>
- </el-form-item>
- <el-form-item label="严重程度:">
- <el-select v-model="findParams.inspPblmCate" clearable placeholder="请选择">
- <el-option
- v-for="item in supervisionState"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="发现时间:">
- <el-date-picker
- v-model="value6"
- type="daterange"
- value-format="yyyy-MM-dd"
- style="width:240px"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- ></el-date-picker>
- </el-form-item>
- <el-form-item label="所在组:">
- <el-input
- resize="none"
- type="input"
- :rows="3"
- placeholder="请输入所在组名称"
- v-model.trim="pblscrGroup"
- clearable
- ></el-input>
- </el-form-item>
- <el-form-item label="是否包含多媒体文件:">
- <el-select v-model="findParams.hasVedio" clearable placeholder="请选择">
- <el-option
- v-for="item in hasVedio1"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="问题督查状态:">
- <el-select v-model="findParams.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>
- </el-col>
- </el-row>
- <el-row type="flex" justify="space-between" style="border-top:1px solid #0014ff2e;">
- <el-col style="padding-bottom:10px;" :offset="11" :span="2">
- <el-button
- style="float:right;margin-right:10px;border: 1px solid #0014ff2e;
- border-radius: 0px 0px 5px 5px;border-top: 0px;"
- type="info"
- plain
- size="mini"
- @click="showExpandSearchPanel = !showExpandSearchPanel"
- >
- {{showExpandSearchPanel?'收起':'更多条件'}}
- <i
- class="el-icon-arrow-down el-icon--right"
- v-show="!showExpandSearchPanel"
- />
- <i class="el-icon-arrow-up el-icon--right" v-show="showExpandSearchPanel"/>
- </el-button>
- </el-col>
- <el-col :offset="2" :span="9">
- <el-button
- style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
- type="primary"
- icon="el-icon-search"
- @click="search"
- > 查 询
- </el-button>
- <!-- <el-button
- style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
- type="success"
- icon="el-icon-download"
- @click="exportWord"
- >导出WORD</el-button>
- -->
- <el-button
- style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
- 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-top:5px;"
- type="success"
- @click="submitBtn"
- >问题提交
- </el-button>
- <el-button
- v-if="isGd"
- style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
- type="success"
- icon="el-icon-download"
- @click="toForm"
- >导出一表一单
- </el-button>
- <!-- <el-button
- style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
- type="success"
- icon="el-icon-download"
- @click="showPlDialog"
- :disabled="uploadDisabled"
- >上传模板</el-button>
- <el-button
- style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-top:5px;"
- type="success"
- icon="el-icon-download"
- @click="downloadTemplate"
- >导出模板</el-button>
- <shuiZhaWentiPl v-if="showTianBaoPl"
- :showTianBaoPl="showTianBaoPl"
- @closePlDialog="closePlDialog">
- </shuiZhaWentiPl>-->
- </el-col>
- </el-row>
- </div>
- <!-- 查询展示 -->
- <div class="search" style="margin-top:10px;">
- <el-table
- v-loading="loading"
- border
- ref="multipleTable"
- :height="tableHeight"
- :data="searchResult"
- @row-click="openDetails"
- tooltip-effect="dark"
- style="width: 100%"
- @selection-change="handleSelectionChange"
- >
- <el-table-column
- type="selection"
- min-width="55">
- </el-table-column>
- <!-- <el-table-column align="center" type="index" label="序号" min-width="25">-->
- <!-- <template slot-scope="scope">{{ (currentPage - 1) * pageSize + (scope.$index + 1) }}-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column
- header-align="center"
- align="center"
- min-width="60"
- prop="province"
- label="省" v-if="isXj"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="60"
- prop="city"
- :label="ownAdName"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="60"
- prop="country"
- label="县"
- v-if="isXj"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- prop="nm"
- label="工程名称"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- prop="inspPblmName"
- label="问题类别"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- prop="checkPoint"
- label="检查项目"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="60"
- prop="ifCasePblm"
- label="典型"
- >
- <template slot-scope="scope">
- <p v-if="scope.row.ifCasePblm == 1">是</p>
- <p v-if="scope.row.ifCasePblm == 0">否</p>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- prop="inspPblmCate"
- label="严重程度"
- >
- <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="100"
- 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-->
- <!-- header-align="center"-->
- <!-- align="center"-->
- <!-- min-width="70"-->
- <!-- prop="attach"-->
- <!-- label="附件"-->
- <!-- show-overflow-tooltip-->
- <!-- >-->
- <!-- <template slot-scope="scope">-->
- <!-- <span>{{'附件' + scope.row.attach}}</span>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <!-- <el-table-column-->
- <!-- header-align="center"-->
- <!-- align="center"-->
- <!-- min-width="80"-->
- <!-- prop="snNum"-->
- <!-- label="问题序号"-->
- <!-- show-overflow-tooltip-->
- <!-- ></el-table-column>-->
- <el-table-column
- header-align="center"
- align="center"
- min-width="70"
- prop="persName"
- label="上报人"
- ></el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- show-overflow-tooltip
- prop="orgNm"
- label="所在组"
- ></el-table-column>
- <el-table-column
- prop="collTime"
- label="上报时间"
- sortable
- align="center"
- min-width="100"
- show-overflow-tooltip>
- <template slot-scope="scope">
- {{scope.row.collTime ? formatDateTime(scope.row.collTime) : ''}}
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- prop="hasVedio"
- label="是否包含多媒体文件"
- >
- <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
- align="center"
- prop
- min-width="100"
- label="操作"
- show-overflow-tooltip
- fixed="right"
- >
- <template slot-scope="scope">
- <el-button icon="el-icon-view" title="查看详情" type="text"
- @click.native.stop="showDetails(scope.row.pblmId)"></el-button>
- <el-button
- v-if="ownPriv('manage')"
- icon="el-icon-edit"
- title="修改问题"
- type="text"
- @click.native.stop="changeSup(scope.row.pblmId)"
- ></el-button>
- <el-button
- v-if="ownPriv('manage')"
- icon="el-icon-delete"
- type="text"
- title="删除问题" @click.native.stop="removeSuperviseOne(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>
- </div>
- <!-- 详情弹框 -->
- <el-dialog
- class="outerDialog custom_dialog"
- title="问题详情"
- @close="detailClose"
- v-if="supervisionDetailsVisible"
- :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>
- <!-- 删除弹窗 -->
- <el-dialog class="deleteDialog" title="问题删除描述" :visible.sync="problemDeleteVisible">
- <Problem-delete
- ref="deleteMiaoShu"
- :deleteProblemId="deleteId"
- @deleteSuccess="deleteSuccess"
- ></Problem-delete>
- <span slot="footer">
- <el-button @click="problemDeleteVisible = false">返回</el-button>
- </span>
- </el-dialog>
- <!-- 修改弹框 -->
- <problem-edit :editId="editId" @closeEditDialog="closeEditDialog"
- v-if="changeSupervisionVisible"></problem-edit>
- </div>
- </el-main>
- </el-container>
- </div>
- </template>
- <script>
- import {pblmSubmit, submitUpload} from "../../api/duChaAPI.js";
- import {formatDateTime2} from '@util/gw_date.js'
- import {exportModel} from "@util/gw_exportModel";
- import request from "../../utils/gw_ajax_request.js";
- import {hostUrl} from "@util/global_variable.js";
- import elaudio from "../../widgets/elAudioShort.vue";
- import inuptWithDuChaTreeNode from "../../widgets/inuptWithDuChaTreeNode.vue";
- import inputWidthDuChaNodes from "../../widgets/inputWithDuChaNodes.vue";
- import inputWidthDuChaShuiKu from "../../widgets/inputWith_sk.vue";
- import problemDialog from "./problemDialog.vue";
- import {formatDateTime2New} from "../../utils/gw_date";
- export default {
- props: ["codeId"],
- components: {
- // 问题详情
- supervisionDetails: resolve => {
- require(["./supervisionDetails_shuibao.vue"], resolve);
- },
- // 问题删除
- ProblemDelete: resolve => {
- require(["./problemDelete.vue"], resolve);
- },
- // 问题修改
- problemEdit: resolve => {
- require(["./shuiBaoProblemModify.vue"], resolve);
- },
- elaudio: elaudio,
- inuptWithDuChaTreeNode: inuptWithDuChaTreeNode,
- inputWidthDuChaNodes: inputWidthDuChaNodes,
- inputWidthDuChaShuiKu: inputWidthDuChaShuiKu,
- problemDialog: problemDialog
- },
- data() {
- return {
- tabType: "0",//0全部数据,1当前数据,2历史数据
- showExpandSearchPanel: false,
- tableHeight: window.innerHeight - 290,
- dataAll: {},
- globoId: "",
- currentDate: new Date(),
- deleteId: "",
- treeNodeArray: [],
- treeNodeSelectVisible: false,
- adNodeArray: [],
- adNodeSelectVisible: false,
- areaSelectVisible: false,
- rsvrNodeArray: [],
- rsvrNodeSelectVisible: false,
- skSelectVisible: false,
- currentProblemId: "",
- updateIdXiuGai: "",
- rules1: {
- inspPblmName: [
- {
- required: true,
- message: "请输入问题名称",
- trigger: "blur"
- },
- {
- min: 1,
- max: 999,
- message: "不超过100字符",
- trigger: "blur"
- }
- ],
- inspPblmDesc: [
- {
- required: true,
- message: "请输入问题描述",
- trigger: "blur"
- }
- ],
- recPers: [
- {
- required: true,
- message: "请输入记录人",
- trigger: "blur"
- },
- {
- min: 1,
- max: 999,
- message: "不超过100字符",
- trigger: "blur"
- }
- ],
- objType: [
- {
- required: true,
- message: "请选择督查对象类型",
- trigger: "change"
- }
- ],
- objId: [
- {
- required: true,
- message: "请选择督查对象类型",
- trigger: "change"
- }
- ],
- inspPblmType: [
- {
- required: true,
- message: "请选择督查问题类型",
- trigger: "change"
- }
- ],
- dataStat: [
- {
- required: true,
- message: "请选择数据状态",
- trigger: "change"
- }
- ],
- collTime: [
- {
- required: true,
- message: "请选择采集时间",
- trigger: "change"
- }
- ],
- ifCasePblm: [
- {
- required: true,
- message: "请选择是否典型",
- trigger: "change"
- }
- ],
- pblmStat: [
- {
- required: true,
- message: "请选择问题类型",
- trigger: "change"
- }
- ],
- inspPblmCate: [
- {
- required: true,
- message: "请选择问题程度",
- trigger: "change"
- },
- {
- trigger: "change"
- }
- ]
- },
- dxdcAsideHeight: window.innerHeight - 220,
- maxHeight: window.innerHeight - 300,
- testHeight: window.innerHeight - 80,
- supervisionStateList: [
- {
- value: "0",
- label: "暂存"
- },
- {
- value: "1",
- label: "上报"
- }
- ],
- supervisionState: [
- {
- value: "0",
- label: "一般"
- },
- {
- value: "1",
- label: "较重"
- },
- {
- value: "2",
- label: "严重"
- },
- {
- value: "3",
- label: "特别严重"
- }
- ],
- supervision: [
- {
- value: "1",
- label: "是"
- },
- {
- value: "0",
- label: "否"
- }
- ],
- hasVedio1: [
- {
- value: "1",
- label: "是"
- },
- {
- value: "0",
- label: "否"
- }
- ],
- findUseOrgArray: [],
- areaInputValue: {},
- memberInputValue: {},
- multipleSelection: [], // 已选
- selectionType: {
- remove: 0,
- befor: 0,
- now: 0,
- after: 0
- },
- // 根据客户点击的督查类型查找督查对象ID
- // 新增
- listobjId: [],
- userId: localStorage.getItem("userid"),
- treeData: [],
- // 修改督查
- changeSupervisionVisible: false,
- leibie: [],
- // 查询
- value6: [],
- findParams: {
- hasVedio: "",
- adCode: "",
- pblmStat: "",
- inspPblmCate: "",
- ifCasePblm: "",
- nm: "",
- adFullName: "",
- startTime: "",
- endTime: "",
- objType: 17,
- inspPblmName: "",
- persId: localStorage.getItem("userid"),
- state: ''
- },
- stateList: [
- {
- label: '未提交',
- value: '0'
- },
- {
- label: '已提交',
- value: '2'
- },
- {
- label: '已发布',
- value: '3'
- }
- ],
- currentPage: 1, // 页码
- pageSize: 20, // 条数
- loading: false,
- total: 0, // 总数
- searchResult: [], // 结果
- crId: "", // 当前督查id
- // 督查详情
- userid: localStorage.getItem("userid"),
- supervisionDetailsVisible: false,
- problemDeleteVisible: false,
- supervisionDetails: {},
- pblmId: "",
- gwComFiles: [],
- pblscr: "",
- pblscrList: [
- {
- lable: "我的问题",
- value: localStorage.getItem("userid")
- }
- ],
- pblscrGroup: "",
- problemList: [],
- currentCheckPointList: [],
- currentProblemDescList: [],
- t1: {},
- t2: {},
- t3: {},
- xiangqingmiaoshu: "",
- wenTiLeiBie: "",
- jianChaXiangMu: "",
- header: {
- persId: localStorage.getItem("userid")
- },
- exportLoading: false,
- datas: {},
- showTianBaoPl: false,
- orgType: '017',
- // orgType:'006',
- };
- },
- computed: {
- hostUrl() {
- return hostUrl;
- },
- formatDateTime() {
- return formatDateTime2New
- },
- isGd(){
- if(localStorage.getItem('currentRlcode').substring(0,2)=="44"){
- return true;
- }else{
- return false;
- }
- }
- },
- created() {
- if (this.userId) {
- console.log("已经登录");
- this.search();
- } else {
- this.$router.push("/login");
- }
- this.getLeftTreeData();
- this.getproblemSmallType();
- },
- activated() {
- },
- methods: {
- openDetails(row) {
- this.currentProblemId = row.pblmId;
- this.supervisionDetailsVisible = true;
- },
- tabChange(tabType) {
- this.tabType = tabType;
- this.getLeftTreeData();
- this.search();
- },
- handleCheckChange(data, checked, indeterminate) {
- let cNarray = this.$refs["jigou_tree"].getCheckedNodes();
- console.log(cNarray);
- this.treeNodeArray = cNarray;
- },
- getLeftTreeData() {
- var _self = this;
- request
- .get("/dc/organization/base/getAllNode", {
- params: {
- userId: this.userId,
- orgType: this.orgType,
- tabType: this.tabType
- }
- })
- .then(res => {
- let data = res.data;
- data.forEach(ele => {
- if (ele.pid == null || ele.pid == "") {
- ele.pid = "017";
- }
- });
- data = _self.getTrees(data);
- _self.treeData = data;
- });
- },
- //格式化树形数据
- 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);
- });
- },
- // 查询参数逻辑
- insertTreeNode: function (params) {
- this.treeNodeArray.push({
- name: params.name,
- code: params.code
- });
- this.treeNodeSelectVisible = false;
- this.areaSelectVisible = false;
- this.skSelectVisible = false;
- },
- deleteTreeNode: function (tag) {
- let deleteIndex;
- this.treeNodeArray.forEach((item, index) => {
- if (item.code == tag.code) {
- deleteIndex = index;
- }
- });
- this.treeNodeArray.splice(deleteIndex, 1);
- },
- selectDuChaAreaNode(params) {
- this.adNodeArray.push(params);
- this.areaSelectVisible = false;
- this.skSelectVisible = false;
- },
- deleteAreaNode(tag) {
- let deleteIndex;
- this.adNodeArray.forEach((item, index) => {
- if (item.adCode == tag.adCode) {
- deleteIndex = index;
- return;
- }
- });
- this.adNodeArray.splice(deleteIndex, 1);
- },
- selectSkNode(params) {
- this.rsvrNodeArray.push(params);
- this.skSelectVisible = false;
- },
- deleteSkNode(tag) {
- let deleteIndex;
- this.rsvrNodeArray.forEach((item, index) => {
- if (item.rsCode == tag.rsCode) {
- deleteIndex = index;
- return;
- }
- });
- this.rsvrNodeArray.splice(deleteIndex, 1);
- },
- // end
- // 操作成功反馈
- successInfo() {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- },
- // 操作失败反馈
- failInfo(val) {
- this.$message.error(val);
- },
- // 已选择项
- handleSelectionChange(val) {
- this.multipleSelection = val;
- },
- // 文件上传
- submitUpload() {
- this.$refs.upload.submit();
- },
- // 查询
- search() {
- this.loading = true;
- let _self = this;
- request
- .get("/dc/organization/base/getAllNode", {
- params: {
- userId: this.userId,
- orgType: this.orgType,
- tabType: this.tabType
- }
- })
- .then(res => {
- let orgAllNode = res.data;
- _self.loading = true;
- let data = _self.findParams;
- data.startTime = _self.value6 && _self.value6.length > 0 ? _self.value6[0] : "";
- data.endTime = _self.value6 && _self.value6.length > 0 ? _self.value6[1] : "";
- data.pageNum = _self.currentPage;
- data.recPers = _self.pblscr;
- data.orgNm = _self.pblscrGroup;
- data.pageSize = _self.pageSize;
- _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"] = "";
- }
- this.dataAll = data;
- data.tabType = this.tabType;
- request.post(`/dc/insp/pblm/page/prdPblm`, data).then(res => {
- _self.loading = false;
- _self.multipleSelection = [];
- if (res.success) {
- res.data.list.forEach(item => {
- if (item.inTm || item.upTm || item.rectTm || item.fdTm) {
- item.inTm =
- typeof item.inTm == "string"
- ? item.inTm
- : dateFormat(item.inTm, "yyyy-MM-dd");
- item.upTm =
- typeof item.upTm == "string"
- ? item.upTm
- : dateFormat(item.upTm, "yyyy-MM-dd");
- item.rectTm =
- typeof item.rectTm == "string"
- ? item.rectTm
- : dateFormat(item.rectTm, "yyyy-MM-dd");
- item.fdTm =
- typeof item.fdTm == "string"
- ? item.fdTm
- : dateFormat(item.fdTm, "yyyy-MM-dd");
- }
- });
- _self.searchResult = res.data.list;
- _self.total = res.data.total;
- } else {
- _self.failInfo();
- }
- });
- });
- },
- 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);
- }
- },
- toForm(){
- var idArr = [];
- if(this.multipleSelection && this.multipleSelection.length==0){
- this.$message.warning("请选择数据");
- return false;
- }else{
- this.multipleSelection.forEach((item)=>{
- idArr.push(item.pblmId);
- })
- }
- var ids = idArr.join(",");
- let host = hostUrl;
- let nginx = '/pageofficePath/';
- let href = 'pageoffice://|' + host + nginx + '/pageoffice/pblm/list/word?ids='+ids+'&filename=pblm|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;
- await request
- .get("/dc/organization/base/getAllNode", {
- params: {
- userId: this.userId,
- orgType: this.orgType
- }
- })
- .then(res => {
- let orgAllNode = res.data;
- let data = _self.findParams;
- data.pageNum = _self.currentPage;
- data.pageSize = _self.pageSize;
- data.villType = "0";
- 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/prdPblm/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.userId,
- orgType: this.orgType
- }
- })
- .then(res => {
- let orgAllNode = res.data;
- let data = _self.findParams;
- data.pageNum = _self.currentPage;
- data.pageSize = _self.pageSize;
- data.villType = "0";
- _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);
- }
- });
- });
- await request
- .post("/prdPblm/doc", _self.dataAll)
- .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);
- });
- },
- downFile(blob, fileName) {
- // 非IE下载
- if ("download" in document.createElement("a")) {
- let link = document.createElement("a");
- link.href = window.URL.createObjectURL(blob); // 创建下载的链接
- link.download = fileName; // 下载后文件名
- link.style.display = "none";
- document.body.appendChild(link);
- link.click(); // 点击下载
- window.URL.revokeObjectURL(link.href); // 释放掉blob对象
- document.body.removeChild(link); // 下载完成移除元素
- } else {
- // IE10+下载
- window.navigator.msSaveBlob(blob, fileName);
- }
- },
- handleSizeChange(pageSize) {
- this.pageSize = pageSize;
- this.search();
- },
- // 详情弹框
- showDetails(id) {
- this.currentProblemId = id;
- this.supervisionDetailsVisible = true;
- },
- // 删除弹窗
- removeSuperviseOne(id) {
- this.deleteId = id;
- this.problemDeleteVisible = true;
- },
- deleteSuccess() {
- this.problemDeleteVisible = false;
- this.search();
- this.$emit("problemCount");
- },
- // 修改弹窗显示
- changeSup(pblmId) {
- this.editId = pblmId
- this.changeSupervisionVisible = true
- },
- // 修改弹窗关闭
- closeEditDialog(val) {
- this.changeSupervisionVisible = false
- if (val == 'success') this.search()
- },
- showPlDialog() {
- this.showTianBaoPl = true;
- },
- closePlDialog(val) {
- this.showTianBaoPl = false;
- this.search();
- },
- getproblemSmallType() {
- let result = [];
- request.get('/dc/insp/pblms/getPblmType', {
- params: {
- type: 17
- }
- }).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.problemList = result;
- }
- })
- },
- detailClose() {
- this.currentProblemId = ''
- }
- },
- watch: {
- codeId: function () {
- this.search();
- },
- showExpandSearchPanel: function (val) {
- if (val) {
- this.tableHeight = window.innerHeight - 389;
- } else {
- this.tableHeight = window.innerHeight - 290;
- }
- }
- }
- };
- </script>
- <style rel="stylesheet/scss" lang="scss" scoped>
- @import "./base.css";
- @import url("/src/assets/iconfont/iconfont.css");
- @import url("/src/assets/css/mixin.scss");
- .upload-container {
- width: 100%;
- position: relative;
- .image-uploader {
- width: 35%;
- float: left;
- }
- .image-preview {
- width: 200px;
- height: 200px;
- position: relative;
- border: 1px dashed #d9d9d9;
- float: left;
- // margin-left: 50px;
- .image-preview-wrapper {
- position: relative;
- width: 100%;
- height: 100%;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .image-preview-action {
- position: absolute;
- width: 100%;
- height: 100%;
- left: 0;
- top: 0;
- cursor: default;
- text-align: center;
- color: #fff;
- opacity: 0;
- font-size: 20px;
- background-color: rgba(0, 0, 0, 0.5);
- transition: opacity 0.3s;
- cursor: pointer;
- text-align: center;
- line-height: 200px;
- .el-icon-delete {
- font-size: 36px;
- }
- }
- &:hover {
- .image-preview-action {
- opacity: 1;
- }
- }
- }
- .image-app-preview {
- margin-bottom: 10px;
- width: 40vh;
- height: 180px;
- position: relative;
- border: 1px dashed #d9d9d9;
- float: left;
- // margin-left: 50px;
- .app-fake-conver {
- height: 44px;
- position: absolute;
- width: 100%; // background: rgba(0, 0, 0, .1);
- text-align: center;
- line-height: 64px;
- color: #fff;
- }
- }
- }
- .bottom {
- margin-top: 13px;
- line-height: 12px;
- }
- .button {
- padding: 0;
- float: right;
- }
- .image {
- width: 100%;
- display: block;
- }
- .clearfix:before,
- .clearfix:after {
- display: table;
- content: "";
- }
- .clearfix:after {
- clear: both;
- }
- #wenTiContainer_sk .el-tree-node {
- /* overflow: auto; */
- }
- #wenTiContainer_sk .el-tree-node > .el-tree-node__children {
- overflow: auto;
- }
- .shuiku .el-date-editor.el-input {
- min-width: 180px !important;
- }
- .shuiku .header {
- padding: 0px 10px;
- }
- .shuiku .el-row {
- margin-bottom: 5px;
- }
- .shuiku .content {
- margin: 10px;
- }
- /* .search .el-table>>>.el-tooltip {
- white-space: pre-wrap !important;
- line-height: 30px;
- font-size: 0;
- } */
- .shuiku .search > > > .el-table .el-button:nth-child(odd) {
- margin-left: 0 !important;
- }
- .custom_dialog .el-dialog {
- width: 60% !important;
- }
- .custom_dialog .scroll300 {
- max-height: 60vh !important;
- }
- .shuiku .el-tag + .el-tag {
- margin-left: 10px;
- }
- .shuiku .button-new-tag {
- margin-left: 10px;
- height: 28px;
- line-height: 28px;
- padding-top: 0;
- padding-bottom: 0;
- }
- .shuiku .input-new-tag {
- width: 90px;
- margin-left: 10px;
- vertical-align: bottom;
- }
- .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>
|