| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324 |
- <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'}">
- <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>
- <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.adName"
- clearable
- ></el-input>
- </el-form-item>
- <el-form-item label="项目名称:">
- <el-input
- resize="none"
- type="input"
- :rows="3"
- placeholder="请输入名称"
- v-model.trim="findParams.name"
- 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="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-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.tmType" clearable placeholder="请选择">
- <el-option
- v-for="item in timeType"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- ></el-option>
- </el-select>
- <el-date-picker
- v-model="value6"
- type="datetimerange"
- value-format="yyyy-MM-dd hh:mm:ss"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- ></el-date-picker>
- </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="success"
- icon="el-icon-upload2"
- @click="showPlDialog"
- :disabled="uploadDisabled"
- >批 量 填 报
- </el-button>
- <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"
- @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="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"
- icon="el-icon-download"
- @click="downloadTemplate"
- >导出EXCEL</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"
- 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="序号" width="60">
- <template slot-scope="scope">{{ (currentPage - 1) * pageSize + (scope.$index + 1) }}
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="140"
- prop="name"
- label="项目名称"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="province"
- label="省(直辖市)"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- prop="city"
- :label="ownAdName"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="80"
- prop="country"
- label="县"
- v-if="isXj"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="140"
- prop="aUnit"
- label="责任单位"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="120"
- prop="basName"
- label="流域机构"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="type"
- label="检查分类"
- show-overflow-tooltip>
- <template slot-scope="scope">
- <span v-if="scope.row.type == '1'">水库</span>
- <span v-if="scope.row.type == '2'">水闸</span>
- <span v-if="scope.row.type == '3'">人饮</span>
- <span v-if="scope.row.type == '4'">水利工程建设</span>
- <span v-if="scope.row.type == '5'">水利工程运行</span>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="fdTm"
- label="发现时间"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="110"
- prop="pblmIsTrue"
- label="调查核实情况"
- show-overflow-tooltip>
- <template slot-scope="scope">
- <span v-if="scope.row.pblmIsTrue == 0">不属实</span>
- <span v-if="scope.row.pblmIsTrue == 1">部分属实</span>
- <span v-if="scope.row.pblmIsTrue == 2">属实</span>
- </template>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="110"
- prop="rectMeas"
- label="整改详细情况"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="rectTm"
- label="复查时间"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="persName"
- label="上报人"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column
- header-align="center"
- align="center"
- min-width="100"
- prop="groupName"
- label="所在组"
- show-overflow-tooltip>
- </el-table-column>
- <el-table-column fixed="right" label="操作" min-width="130">
- <template slot-scope="scope">
- <el-button icon="el-icon-view" title="查看详情" type="text"
- @click="showDetails(scope.row.id)"></el-button>
- <el-button
- v-if="ownPriv('manage')"
- icon="el-icon-edit"
- type="text"
- @click="changeSup(scope.row.id)"
- ></el-button>
- <el-button
- v-if="ownPriv('manage')"
- icon="el-icon-delete"
- type="text"
- title="删除问题" @click="removeSuperviseOne(scope.row.id)"
- ></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>
- </div>
- <!-- 详情组件-->
- <el-dialog
- class="custom_dialog"
- title="问题详情"
- width="60%"
- append-to-body
- 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="问题删除描述" append-to-body :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>
- </el-main>
- </el-container>
- </div>
- </template>
- <script>
- import {submitUpload, pblmSubmit} from "../../api/duChaAPI.js";
- import {dateFormat} from "@util/gw_date";
- import {exportModel} from "@util/gw_exportModel";
- import request from "../../utils/gw_ajax_request.js";
- import {hostUrl} from "@util/global_variable.js";
- import inuptWithDuChaTreeNode from "../../widgets/inuptWithDuChaTreeNode.vue";
- import inputWidthDuChaNodes from "../../widgets/inputWithDuChaNodes.vue";
- import inputWidthDuChaShuiKu from "../../widgets/inputWith_sk.vue";
- export default {
- props: ["codeId"],
- components: {
- //详情页
- supervisionDetails: resolve => {
- require(["./supervisionDetails_qita.vue"], resolve);
- },
- // 删除描述页
- ProblemDelete: resolve => {
- require(["./problemDeleteQiTa.vue"], resolve);
- },
- // 修改问题
- problemEdit: resolve => {
- require(["./qiTaProblemModify.vue"], resolve);
- },
- inuptWithDuChaTreeNode: inuptWithDuChaTreeNode,
- inputWidthDuChaNodes: inputWidthDuChaNodes,
- inputWidthDuChaShuiKu: inputWidthDuChaShuiKu
- },
- data() {
- var validatePass1 = (rules1, value, callback) => {
- if (this.newSupervision.startTime > this.newSupervision.endTime) {
- callback(new Error("结束时间不能早于开始时间"));
- } else {
- callback();
- }
- };
- var validatePass2 = (rules1, value, callback) => {
- let startTime = this.changeSupervision.startTime.slice(0, 10);
- if (startTime > this.changeSupervision.endTime) {
- callback(new Error("结束时间不能早于开始时间"));
- } else {
- callback();
- }
- };
- var divisionList = (rules1, value, callback) => {
- if (this.newGroup.divisionList.length) {
- callback();
- } else {
- callback(new Error("至少要添加一个地区"));
- }
- };
- return {
- tabType: "0",//0全部数据,1当前数据,2历史数据
- showExpandSearchPanel: false,
- tableHeight: window.innerHeight - 260,
- 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"
- }
- ],
- dataStat: [
- {
- required: true,
- message: "请选择数据状态",
- trigger: "change"
- }
- ],
- collTime: [
- {
- required: true,
- message: "请选择采集时间",
- trigger: "change"
- }
- ]
- },
- dxdcAsideHeight: window.innerHeight - 220,
- maxHeight: window.innerHeight - 300,
- testHeight: window.innerHeight - 80,
- supervisionStateList: [
- {
- value: "0",
- label: "暂存"
- },
- {
- value: "1",
- label: "上报"
- }
- ],
- supervision: [
- {
- value: "1",
- label: "是"
- },
- {
- value: "0",
- label: "否"
- }
- ],
- findUseOrgArray: [],
- areaInputValue: {},
- memberInputValue: {},
- multipleSelection: [], // 已选
- // 根据客户点击的督查类型查找督查对象ID
- // 新增
- listobjId: [],
- userId: localStorage.getItem("userid"),
- treeData: [],
- changeSupervisionVisible: false,
- changeSupervisionLoading: false,
- changeSupervision: {
- nm: "",
- presId: localStorage.getItem("userid"),
- endTime: "",
- pblmId: "",
- objId: "",
- objType: "",
- inspGroupId: "",
- inspPblmName: "",
- inspPblmDesc: "",
- pblmLong: "",
- pblmLat: "",
- pblmStat: "",
- inspPblmOrgName: "",
- pblmPersName: "",
- reviOpin: "",
- reviConc: "",
- reviOrgGuid: "",
- collTime: "",
- recPers: "",
- },
- // 督查类型
- supervisionTypeList: [
- {
- value: "1",
- label: "其他"
- }
- ],
- // 查询
- value6: [],
- findParams: {
- adName: '',
- name: '',
- persName: '',
- startTime: "",
- endTime: "",
- tmType: '1',
- persId: localStorage.getItem("userid"),
- state: ''
- },
- stateList: [
- {
- label: '未提交',
- value: '0'
- },
- {
- label: '已提交',
- value: '2'
- },
- {
- label: '已发布',
- value: '3'
- }
- ],
- timeType: [
- {label: '发现时间', value: '1'},
- {label: '复查时间', value: '2'}
- ],
- currentPage: 1, // 页码
- pageSize: 20, // 条数
- loading: false,
- total: 0, // 总数
- searchResult: [], // 结果
- crId: "", // 当前督查id
- // 督查详情
- userid: localStorage.getItem("userid"),
- supervisionDetailsVisible: false,
- problemDeleteVisible: false,
- supervisionDetails: {},
- pblmId: "",
- pblscr: "",
- pblscrList: [
- {
- lable: "我的问题",
- value: localStorage.getItem("userid")
- }
- ],
- pblscrGroup: "",
- header: {
- 'persId': localStorage.getItem('userid'),
- 'accessToken': localStorage.getItem('accessToken')
- },
- exportLoading: false,
- datas: {},
- showTianBaoPl: false,
- orgIds: "010",
- uploadDisabled: true
- };
- },
- computed: {
- hostUrl() {
- return hostUrl
- },
- 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.addPicPanel = false;
- },
- activated() {
- this.getLeftTreeData();
- this.search();
- this.findParams = {
- adName: '',
- name: '',
- persName: '',
- startTime: "",
- endTime: "",
- tmType: '1',
- persId: localStorage.getItem("userid")
- };
- },
- methods: {
- 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: "010",
- tabType: this.tabType
- }
- }).then(res => {
- let data = res.data;
- data.forEach(ele => {
- if (ele.pid == null || ele.pid == "") {
- ele.pid = "010";
- }
- });
- data = _self.getTrees(data);
- _self.treeData = data;
- console.log(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);
- },
- // end
- // 操作成功反馈
- successInfo() {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- },
- // 操作失败反馈
- failInfo(val) {
- this.$message.error(val);
- },
- // 清空选择
- toggleSelection(rows) {
- this.$refs.multipleTable.clearSelection();
- },
- // 已选择项
- handleSelectionChange(val) {
- this.multipleSelection = val;
- },
- // 查询
- async search() {
- this.loading = true;
- let _self = this;
- await request.get("/dc/organization/base/getAllNode", {
- params: {
- userId: this.userId,
- orgType: "010",
- 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.groupName = _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(",");
- this.orgIds = _self.findUseOrgArray.join(",");
- } else {
- data["orgIds"] = "";
- }
- this.dataAll = data;
- data.tabType = this.tabType;
- request.post(`/bis/insp/other/pblm/page`, 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: "010"
- }
- })
- .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/waga/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: "010"
- }
- })
- .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("/waga/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();
- // window.open(`${this.hostUrl}${res.data.downloadPath}`)
- } 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);
- }
- },
- // 下载模板
- async downloadTemplate() {
- await this.search();
- await this.downloadTemplateSet();
- this.uploadDisabled = false;
- },
- async downloadTemplateSet() {
- let url =
- "/pdcApi/dc/imp/pblm/download?userId=" +
- this.userId +
- "&orgType=010&orgIds=" +
- this.orgIds;
- let downloadName = "其他问题.xls";
- let type = "get";
- await exportModel(type, url, downloadName);
- },
- handleSizeChange(pageSize) {
- this.pageSize = pageSize;
- this.search();
- },
- // 关闭修改弹窗
- closeEditDialog(val) {
- this.changeSupervisionVisible = false
- if (val == 'success') this.search()
- },
- // 详情弹框
- showDetails(pblmId) {
- this.currentProblemId = pblmId
- 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
- },
- UploadUrl: function () {
- return `/pdcApi/file/insert?bizId=${this.changeSupervision.pblmId}`;
- },
- showPlDialog() {
- this.showTianBaoPl = true;
- },
- closePlDialog(val) {
- this.showTianBaoPl = false;
- this.search();
- },
- //切换问题是否被督查简报调用
- changeSfYy(row, val) {
- this.$confirm("此问题将切换是否被督查简报引用, 是否继续?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- if (val) {
- request
- .post(`/dc/insp/pblm/update`, {
- pblmId: row,
- quote: 0
- })
- .then(res => {
- if (res.success) {
- this.search();
- }
- });
- } else {
- request
- .post(`/dc/insp/pblm/update`, {
- pblmId: row,
- quote: 1
- })
- .then(res => {
- if (res.success) {
- this.search();
- }
- });
- }
- })
- .catch(() => {
- this.$message({
- type: "info",
- message: "已取消切换"
- });
- });
- }
- },
- watch: {
- codeId: function () {
- this.search();
- },
- showExpandSearchPanel: function (val) {
- if (val) {
- this.tableHeight = window.innerHeight - 359;
- } else {
- this.tableHeight = window.innerHeight - 260;
- }
- }
- }
- };
- </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>
|