| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914 |
- <template>
- <div style="height:100%;width:100%;">
- <el-container style="height:100%;width:100%;">
- <el-aside width="320px" 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"
- :data="treeData"
- node-key="id"
- :expand-on-click-node="false"
- @node-click = 'treeNodeClickHandler'
- ref="jigou_tree"
- >
- <div class="custom-tree-node" slot-scope="{ node, data }">
- <span style="float:left;">{{ data.pnm}}</span>
- </div>
- </el-tree>
- </div>
- </el-aside>
- <!-- 主要窗口 -->
- <el-main id="dxdcListMainsk" style="padding:5px 20px;">
- <el-row>
- <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="dcType" clearable placeholder="督查状态">
- <el-option label="未督查" value="0"></el-option>
- <el-option label="督查中" value="1"></el-option>
- <el-option label="已督查" value="2"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="行政区名称">
- <addvSearch
- v-model="adName"
- :maxHeight='300'
- :maxWidth='250'
- :rootAddCode='curAdcode_long'
- :level='"3"'
- :nameOrCode="'name'"
- ></addvSearch>
- </el-form-item>
- <el-form-item label="名称">
- <el-input v-model="rsvrName" placeholder="名称"></el-input>
- </el-form-item>
- <el-form-item label="所在组">
- <el-autocomplete v-model="groupName" clearable value-key='nm' :fetch-suggestions="querySearchAsync"
- placeholder="请输入内容"
- @select="handleSelect"></el-autocomplete>
- </el-form-item>
- <el-form-item label="是否复查" v-if="isJiangXi">
- <el-select v-model="repeatId" clearable placeholder="督查状态">
- <el-option label="是" value="1"></el-option>
- <el-option label="否" value="2"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="督查时间">
- <div style="display: flex;">
- <el-date-picker
- v-model="dateRange"
- type="daterange"
- value-format="yyyy-MM-dd"
- style="width:280px"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期"
- ></el-date-picker>
- <!-- <el-date-picker v-model="sttm" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
- <p style="padding-left: 10px;padding-right: 10px;">至</p>
- <el-date-picker v-model="ettm" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker> -->
- </div>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" @click="onSubmit" icon="el-icon-search">查询</el-button>
- </el-form-item>
- <!-- <el-form-item style="float:right">-->
- <!-- <el-button type="success" style="float:right;margin-left:5px"-->
- <!-- @click="showPlDialog"-->
- <!-- icon="el-icon-upload2"-->
- <!-- :disabled="disabled"-->
- <!-- >批量填报-->
- <!-- </el-button>-->
- <!-- <el-button type="success" style="float:right;"-->
- <!-- @click="downloadTemplate"-->
- <!-- :icon="downIcon"-->
- <!-- >下载模板-->
- <!-- </el-button>-->
- <!-- </el-form-item>-->
- </el-form>
- </el-col>
- </el-row>
- <el-table
- ref="table"
- border
- :height="tableHeight"
- :data="skDataList"
- style="width: 100%"
- v-loading="expLoading">
- <el-table-column prop="nm" label="名称" show-overflow-tooltip min-width="100"
- align="center"></el-table-column>
- <el-table-column prop="adFullName" label="地区" show-overflow-tooltip min-width="100"
- align="center"></el-table-column>
- <el-table-column prop="intm1" label="督查时间" show-overflow-tooltip min-width="100"
- align="center"></el-table-column>
- <el-table-column
- prop="uptm"
- label="更新时间"
- align="center"
- :formatter="formatDate"
- min-width="100">
- </el-table-column>
- <el-table-column
- prop="state"
- label="督查状态"
- align="center"
- min-width="80">
- <template slot-scope="scope">
- <span
- style="padding: 3px 10px;background:#F56C6C;border-radius:15px;color:rgba(255,255,255,1)"
- v-if="scope.row.state == 0"
- >未督查</span>
- <span
- style="padding: 3px 10px;background:#FBB56D;border-radius:15px;color:rgba(255,255,255,1)"
- v-if="scope.row.state == 1"
- >督查中</span>
- <span
- style="padding: 3px 10px;background:#63C25E;border-radius:15px;color:rgba(255,255,255,1)"
- v-if="scope.row.state == 2"
- >已督查</span>
- </template>
- </el-table-column>
- <el-table-column
- prop="engScal"
- label="工程规模"
- :formatter="formatEngScal"
- min-width="80">
- </el-table-column>
- <!-- <el-table-column-->
- <!-- prop="hystSite"-->
- <!-- min-width="200"-->
- <!-- label="水库所在位置">-->
- <!-- </el-table-column>-->
- <!-- <el-table-column-->
- <!-- prop="rsAdmName"-->
- <!-- min-width="180"-->
- <!-- label="管理单位"-->
- <!-- show-overflow-tooltip>-->
- <!-- </el-table-column>-->
- <!-- <el-table-column-->
- <!-- prop="totCap"-->
- <!-- label="总库容(万m³)"-->
- <!-- align="right"-->
- <!-- min-width="130">-->
- <!-- </el-table-column>-->
- <el-table-column
- v-for="(column,index) in fillTableData"
- :key="index"
- :prop="column.prop"
- :label='column.label'
- align="center"
- min-width="80">
- <template slot-scope="scope">
- <p style="cursor:pointer;color:#F56C6C;" v-if="scope.row[column.prop] == 0 || !scope.row[column.prop]">
- 待填报</p>
- <p style="cursor:pointer;color:#fbb56d" v-if="scope.row[column.prop] == 1">未完成</p>
- <p style="cursor:pointer;color:#67C23A" v-if="scope.row[column.prop] == 2">已完成</p>
- <p style="cursor:pointer;color:#67C23A" v-if="column.prop == 'viewStat' && scope.row[column.prop] != 0">
- 已填报</p>
- <p style="cursor:pointer;color:#F56C6C;" v-if="column.prop == 'viewStat' && scope.row[column.prop] == 0">
- 未填报</p>
- </template>
- </el-table-column>
- <el-table-column align="center" label="操作" min-width="200" fixed="right">
- <template slot-scope="scope">
- <div style="display: flex;justify-content: center">
- <div style="display: flex">
- <el-button size="mini" type="success" v-if="scope.row.rgstrId && scope.row.state != '2'" plain @click="toAddMember('编辑',scope.row)">督查</el-button>
- <el-button size="mini" type="danger" v-if="scope.row.rgstrId && scope.row.state != '2'" plain @click="deleteMember(scope.row)">删除</el-button>
- <el-button size="mini" type="danger" v-if="scope.row.rgstrId && scope.row.state != '2' && isSdPriv(scope.row)" plain @click="submitHandler(scope.row)">提交</el-button>
- </div>
- <el-button size="mini" style="margin-left: 10px;" type="warning" v-if="scope.row.rgstrId && scope.row.state == '2'" plain @click="toAddMember('查看',scope.row,true)">查看</el-button>
- <div style="padding-left: 10px;">
- <el-button size="mini" type="danger" v-if="scope.row.rgstrId && scope.row.state == '2'" plain @click="revoke(scope.row)">撤回</el-button>
- </div>
- </div>
- </template>
- </el-table-column>
- </el-table>
- <el-pagination background :pager-count="5" :current-page="pageIndex"
- :page-size="pageSize" :page-sizes="[10, 20, 30, 40, 50, 100]"
- layout="sizes, total, prev, pager, next" :total="total"
- @current-change="pageIndexChange" @size-change="handleSizeChange"
- ></el-pagination>
- </el-main>
- <!-- </el-container> -->
- <shuiKuTianBao v-if="showShuiKuTianBao" :rowData="rowData" :currentObjectRgstrId="currentObjectRgstrId"
- :currentResCode="currentResCode" :currentObjectId="currentObjectId"
- :currentObjectName="currentResName"
- :currentRsvrNm="currentRsvrNm"
- :currentAdCode="currentAdCode"
- :pType="pType"
- :ifView="ifView"
- @cancelHandler="cancelHandler" @addShuiKuSuccess="addShuiKuSuccess"></shuiKuTianBao>
- </el-container>
- <!-- 添加/编辑人员弹窗 -->
- <!-- 上传模板弹窗 -->
- <shuiku-tian-bao-pl v-if="showShuiKuTianBaoPl"
- :showShuiKuTianBaoPl="showShuiKuTianBaoPl"
- :id="currentNodeId"
- @closePlDialog="closePlDialog"></shuiku-tian-bao-pl>
- <!-- 水库信息查看 -->
- <rsvr-info
- :currentObjectRgstrId="currentObjectRgstrId"
- :currentResCode="currentResCode"
- :currentObjectId="currentObjectId"
- :currentObjectName="currentResName"
- :isJiangXi="isJiangXi"
- v-if="showDuchaDetails" @cancelHandler="closeInfoDialog"></rsvr-info>
- <!-- 水库督查信息 -->
- </div>
- </template>
- <script>
- import request from '../../utils/gw_ajax_request.js'
- import {dateFormat} from '../../utils/gw_date.js'
- import {getrgstrIdObject, getSKList_fjty} from "../../api/duChaTianBao.js";
- import addvSearch from "@widget/addvSearch.vue"
- import provTreeList from "../../widgets/provTreeList.vue";
- import shuiKuTianBao from "../duChaTianBao/shuiKuTianbao.vue"
- import shuikuTianBaoPl from "../duChaTianBao/shuiKuTianbao_piliang.vue"
- import rsvrInfo from "../duChaTianBao/shuiku/skInfo/main.vue"
- import {curAdcode_long, curAdcode_short} from '@util/global_variable.js'
- import {fillColumnForFujian, fillColumnNation,fillColumnNationOld} from '../duChaTianBao/shuiku/forDifferentProvince.js'
- import {exportModel} from "@util/gw_exportModel";
- import popupSk from "../duChaTianBao/components/popupWindow/sk/main.vue"
- export default {
- components: {
- provTreeList: provTreeList,
- shuiKuTianBao: shuiKuTianBao,
- shuikuTianBaoPl: shuikuTianBaoPl,
- rsvrInfo: rsvrInfo,
- addvSearch,
- popupSk
- },
- props: [],
- data() {
- return {
- tabType: "0",
- dateRange: [],
- lyjg: [],
- engScales: [
- {id: '4', name: '小(1)型'},
- {id: '5', name: '小(2)型'},
- ],
- engScale: '',
- orgName: '',
- groupName: '',
- groupId: '',
- groups: [],
- // sttm:'',
- // ettm:'',
- adName: '',
- treeData: [],
- dxdcMainHeight: window.innerHeight - 304,
- testHeight: window.innerHeight - 111,
- skDataList: [],
- pageIndex: 1,
- pageSize: 20,
- total: 0,
- tableHeight: 0,
- currentResCode: '',
- currentResName: '',
- currentObjectId: '',
- currentObjectRgstrId: '',
- currentObjectInfoObject: null,
- showShuiKuTianBao: false,
- currentAdCode: '',
- currentNodeId: '',
- rsvrName: '',
- dcType: '',
- rowData: '',
- disabled: true,
- showShuiKuTianBaoPl: false,
- downIcon: 'el-icon-download',
- expLoading: false,
- //
- repeatId: '',
- showDuchaDetails: false,
- zerenrenLabel: '"三个责任人"落实情况',
- pType: 128,
- fillTableData: [], //根据不同省份赋值
- xskInfoDialog: false,
- currentDuchaTpe: false,
- currentRsCode: '',
- xskRgstrId: '',
- currentObjId: '',
- currentRsName: '',
- endTime: '',
- curTime: new Date().getTime(),
- flage: false,
- currentRsvrNm: '',
- dataProblemclass: [],
- ifView: false
- }
- },
- computed: {
-
- persId() {
- return localStorage.getItem("userid")
- ? localStorage.getItem("userid")
- : "1098101939614724096";
- },
- isAdmin: function () {
- return localStorage.getItem("isAdmin") ? localStorage.getItem("isAdmin") : ''
- },
- currentRlcode() {
- return localStorage.getItem('currentRlcode') ? localStorage.getItem('currentRlcode') : ''
- },
- isJiangXi() {
- return this.currentRlcode.indexOf('36') == '0' ? true : false
- },
- curAdcode_short() {
- return curAdcode_short
- },
- curAdcode_long() {
- return curAdcode_long
- },
- persType() {
- return localStorage.getItem("persType") ? localStorage.getItem("persType") : ''
- },
- isSc(){
- if(localStorage.getItem('currentRlcode').substring(0,2)=="51"){
- return true;
- }else{
- return false;
- }
- },
- isSd(){
- if(localStorage.getItem('currentRlcode').substring(0,2)=="37"){
- return true;
- }else{
- return false;
- }
- }
- },
- mounted() {
- this.getLeftTreeData();
- this.$nextTick(function () {
- this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 50;
- let _self = this;
- window.onresize = function () {
- _self.tableHeight = window.innerHeight - _self.$refs.table.$el.offsetTop - 50
- }
- })
- this.getSkDataList();
- this.getAllGroup();
- this.fillTableData = fillColumnNation;
- if (this.currentRlcode.indexOf('63') == '0' || this.currentRlcode.indexOf('66') == '0') {
- this.fillTableData = fillColumnForFujian
- }
- if (this.currentRlcode.indexOf('53') == '0') {
- this.fillTableData = fillColumnNationOld
- }
- },
- activated() {
- this.getprolist();
- this.currentNodeId = "";
- this.rsvrName = "";
- this.dcType = "";
- this.getSkDataList();
- },
- watch: {
- currentNodeId(n, o) {
- this.getSkDataList();
- },
- groupName(n, o) {
- if (n == '') {
- this.groupId = '';
- }
- },
- // endTime(n, o) {
- // this.flage = this.endTime ? (eval(this.endTime) < eval(this.curTime) ? true : false) : false
- // }
- },
- methods: {
- async getprolist(){
- await request.post('/bis/insp/pblmP/list').then(res=>{
- if(res.success){
- this.dataProblemclass = res.data
- }
- this.$nextTick(() => {
- if (this.dataProblemclass && this.dataProblemclass.length > 0) {
- const firstNodeId = this.dataProblemclass[0].id;
- this.$refs.myTree.setCurrentKey(firstNodeId);
- // if (this.$refs.myTree.getCurrentNode()) {
- // this.treeNodeClickHandler(this.$refs.myTree.getCurrentNode());
- // }
- }
- });
- })
- },
- isSdPriv(row){
- if(this.isSd){
- return (this.ownPriv('tmanage') || (!this.ownPriv('tmanage') && row.timeout=='1'))
- }
- return true;
- },
- tabChange(tabType) {
- this.tabType = tabType;
- this.currentNodeId = "";
- this.groupName = "";
- this.groupId = "";
- this.getAllGroup();
- this.getLeftTreeData();
- this.getSkDataList();
- },
- //获取所有的组
- getAllGroup() {
- var _self = this;
- request.get('/dc/user/getGroupByPersid', {
- params: {
- 'persid': this.persId,
- 'ptype': '128',
- 'tabType': this.tabType
- }
- }).then((res) => {
- if (res.success) {
- _self.groups = res.data;
- }
- })
- },
- querySearchAsync(queryString, cb) {
- var restaurants = this.groups;
- var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants;
- clearTimeout(this.timeout);
- this.timeout = setTimeout(() => {
- cb(results);
- }, 1500 * Math.random());
- },
- createStateFilter(queryString) {
- return (state) => {
- return (state.nm.toLowerCase().indexOf(queryString.toLowerCase()) != -1);
- };
- },
- handleSelect(item) {
- console.log(item);
- this.groupId = item.id;
- },
- getLeftTreeData() {
- var _self = this;
- _self.lyjg = [];
- request.get('/dc/organization/base/getAllNode', {
- params: {
- 'userId': this.persId,
- 'orgType': '128',
- 'tabType': this.tabType
- }
- }).then((res) => {
- let data = res.data
- data.forEach(ele => {
- if (ele.pid == null || ele.pid == '') {
- ele.pid = '001'
- }
- if (ele.id.length == 6) {
- _self.lyjg.push(ele);
- }
- });
- data = _self.getTrees(data)
- // _self.flage = this.getBoolDate(data[0].sttm,data[0].entm);
- _self.treeData = data;
- // _self.endTime = data[0]['entm']
- })
- },
- getBoolDate(sttm,entm){
- if(sttm==null && entm==null){
- return true;
- }
- if(sttm!=null && entm!=null && (sttm<=new Date().getTime() && new Date().getTime()<=entm)){
- return true;
- }
- if(sttm==null || entm==null){
- if(sttm==null && new Date().getTime()<=entm){
- return true;
- }
- if(entm==null && sttm<=new Date().getTime()){
- return true;
- }
- }
- return false;
- },
- //格式化树形数据
- 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);
- });
- },
- treeNodeClickHandler: function (data, node, tree) {
- // this.endTime = data['entm']
- this.currentNodeId = data.id;
- if(this.currentNodeId.length==12){
- this.groupId = data.id;
- this.groupName = data.pnm;
- }
- // this.flage = this.getBoolDate(data[0].sttm,data[0].entm);
- },
- provTreeSelectChangeHandler: function (params) {
- this.currentAdCode = params.likeCode;
- this.getSkDataList();
- },
- formatDate(row, column) {
- if (row.uptm) {
- return (dateFormat(row.uptm, 'yyyy-MM-dd'));
- }
- },
- formatEngScal(row, column) {
- let engScal = row.engScal;
- let _engScal = '其他';
- switch (engScal) {
- case '1' :
- _engScal = '大(1)型';
- break;
- case '2' :
- _engScal = '大(2)型';
- break;
- case '3' :
- _engScal = '中型';
- break;
- case '4' :
- _engScal = '小(1)型';
- break;
- case '5' :
- _engScal = '小(2)型';
- break;
- case '9' :
- _engScal = '其他';
- break;
- }
- return _engScal;
- },
- getSkDataList: function () {
- let paramStartDate = '';
- let paramEndDate = '';
- if (this.dateRange && this.dateRange.length > 1 && this.dateRange[0] != '' && this.dateRange[1] != '') {
- paramStartDate = this.dateRange[0];
- paramEndDate = this.dateRange[1];
- }
- let paramsData = {
- "type": "rsvr",
- 'presId': this.persId,
- "pType": "128",
- "pageSize": this.pageSize,
- 'pageNum': this.pageIndex,
- 'id': this.currentNodeId,
- 'rsName': this.rsvrName,
- 'state': this.dcType,
- 'adName': this.adName,
- 'sttm': paramStartDate,
- 'entm': paramEndDate,
- 'riverId': this.orgName,
- 'engScal': this.engScale,
- 'groupId': this.groupId,
- 'tabType': this.tabType
- }
- if (this.currentRlcode.indexOf('36') == '0') {
- paramsData['repeatId'] = this.repeatId
- }
- this.expLoading = true;
- getSKList_fjty(paramsData).then(
- (res) => {
- console.log(res);
- res.data.list.forEach((item) => {
- if (item.intm) {
- item.intm1 = dateFormat(item.intm, 'yyyy-MM-dd');
- }
- })
- this.skDataList = res.data.list;
- this.total = res.data.total;
- this.expLoading = false;
- }
- );
- },
- onSubmit() {
- this.getSkDataList();
- },
- skCancelHandler() {
- this.xskInfoDialog = false
- },
- toCheck(type, rowData) {
- this.currentDuchaTpe = true;
- this.xskInfoDialog = true;
- this.xskRgstrId = rowData.rgstrId;
- this.currentRsCode = rowData.code;
- this.currentObjId = rowData.objId;
- this.currentRsName = rowData.nm;
- this.$nextTick(() => {
- if (this.$refs['xskTianBaoRef']) {
- this.$refs['xskTianBaoRef'].showDialog();
- }
- })
- },
- toAddMember(type, rowData, ifView) {
- var _self = this;
- this.rowData = rowData;
- // ;
- console.log(rowData);
- // getrgstrIdObject(rowData.code,rowData.objId,_self.pageIndex).then(
- // (res) =>{
- // console.log(res);
- _self.currentResCode = this.rowData.code;
- _self.currentObjectId = this.rowData.objId;
- _self.currentObjectRgstrId = this.rowData.rgstrId;
- _self.currentResName = this.rowData.nm;
- _self.currentRsvrNm = this.rowData.rsvrNm;
- _self.currentAdCode = this.rowData.adCode;
- _self.ifView = ifView;
- _self.showShuiKuTianBao = true;
- // 获取完成
- // },
- // (err) =>{
- // }
- // );
- },
- cancelHandler() {
- this.showShuiKuTianBao = false;
- },
- addShuiKuSuccess() {
- this.getSkDataList();
- // this.showShuiKuTianBao = false;
- },
- deleteMember(obj) {
- console.log(obj);
- var _self = this;
- // /dc/insp/rsvrRgstr/delete/{id}
- this.$confirm('此操作将督查对象从列表中删除,确认删除该水库吗?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- request.get(`/supervision/plan/cleanObjDataByObjId?objType=128&objId=${obj.objId}`).then((res) => {
- if (res.success) {
- _self.pageIndexChange();
- _self.$message.success('删除成功')
- } else {
- _self.$message.error(res.message)
- }
- });
- }).catch(() => {
- });
- },
- submitHandler(rowData) {
- console.log(rowData)
- var _self = this;
- getrgstrIdObject(rowData.code, rowData.objId).then(
- (res) => {
- if (this.currentRlcode.indexOf('63') == '0' || this.currentRlcode.indexOf('66') == '0' || this.currentRlcode.indexOf('53') == '0') {
- if (res.data.presStat != '2') {
- this.$message({
- message: '三个责任人"落实情况填报未完成!',
- type: 'warning'
- });
- return
- }
- else if (res.data.safeStat != '2' && !(this.currentRlcode.indexOf('53') == '0')) {
- this.$message({
- message: '安全管理三级责任人填报未完成!',
- type: 'warning'
- });
- return
- }
- else if (res.data.baseStat != '2') {
- this.$message({
- message: '三个重点环节"落实情况填报未完成!',
- type: 'warning'
- });
- return
- } else if (res.data.reverStat != '2') {
- this.$message({
- message: '水库工程实体填报未完成',
- type: 'warning'
- });
- return
- } else if (res.data.resRunStat != '2') {
- this.$message({
- message: '运行管理情况填报未完成',
- type: 'warning'
- });
- return
- } else if (res.data.benefitStat != '2') {
- this.$message({
- message: '效益发挥情况填报未完成',
- type: 'warning'
- });
- return
- }
- }else{
- // if (res.data.chkInfoStat != '2') {
- // this.$message({
- // message: '水库检查情况填报未完成!',
- // type: 'warning'
- // });
- // return
- // } else
- // if (res.data.rectStat != '2') {
- // this.$message({
- // message: '整改情况填报填报未完成!',
- // type: 'warning'
- // });
- // return
- // }
- }
- this.$confirm('请确认所有信息填报完毕?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- let formObj = {
- "rgstrId": rowData.rgstrId,
- "state": "2"
- }
- request.post('/dc/insp/rsvrRgstr/update', formObj).then((res) => {
- if (res.success) {
- _self.addShuiKuSuccess();
- _self.$message.success("提交成功");
- } else {
- _self.cancelHandler();
- }
- });
- }).catch(() => {
- });
- }, (err) => {
- });
- },
- revoke(rowData) {
- var _self = this;
- this.$confirm('确定要撤回当前信息吗?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- let formObj = {
- "rgstrId": rowData.rgstrId,
- "state": "1"
- }
- request.post('/dc/insp/rsvrRgstr/update', formObj).then((res) => {
- if (res.success) {
- _self.addShuiKuSuccess();
- _self.$message.success("撤回成功");
- } else {
- _self.cancelHandler();
- }
- });
- }).catch(() => {
- });
- },
- pageIndexChange(val) {
- console.log(val);
- this.pageIndex = val;
- this.getSkDataList();
- },
- handleSizeChange(val) {
- this.pageSize = val;
- this.getSkDataList();
- },
- // 下载填报模板
- async downloadTemplate() {
- let url = '/pdcApi/dc/impExcel/downloadTemplate/sk?userId=' + this.persId + '&id=' + this.currentNodeId;
- let downloadName = "小水库填报模板.xls";
- let type = "get";
- await exportModel(type, url, downloadName);
- this.disabled = false;
- },
- showPlDialog() {
- this.showShuiKuTianBaoPl = true
- },
- closePlDialog(val) {
- this.showShuiKuTianBaoPl = false
- },
- // 新需求 点击复查显示以前的督查信息
- toShowDuchaDetail(row) {
- this.currentResCode = row.code;
- this.currentObjectId = row.objId;
- this.currentObjectRgstrId = row.rgstrId;
- this.currentResName = row.nm;
- this.showDuchaDetails = true
- },
- closeInfoDialog() {
- this.showDuchaDetails = false
- },
- // 加入复查
- joinRecheck(row) {
- let _self = this
- let data = {
- regerId: row.rgstrId,
- type: '1'
- }
- this.$confirm('确定加入复查吗?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- request.post(`/bis/insp/repeat/check/log`, data).then((res) => {
- if (res.success) {
- _self.$message.success('已加入复查')
- _self.getSkDataList();
- } else {
- _self.$message.error(res.message)
- }
- }).catch(err => {
- _self.$message.error(res.message)
- });
- }).catch(() => {
- });
- }
- },
- };
- </script>
- <style>
- .skactive {
- background: #3f8eff !important;
- color: white !important;
- margin-top: 5px;
- margin-bottom: 5px;
- }
- .sknormal {
- background: white;
- margin-top: 5px;
- margin-bottom: 5px;
- }
- .el-table .warning-row {
- background: oldlace;
- }
- .el-table .success-row {
- background: #f0f9eb;
- }
- #dxdcListMainsk {
- overflow-y: hidden;
- }
- </style>
|