bfd02b74e38ae2f9f8bd9fa4c9184c7a625812ae.svn-base 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914
  1. <template>
  2. <div style="height:100%;width:100%;">
  3. <el-container style="height:100%;width:100%;">
  4. <el-aside width="320px" style="border-right:2px solid #d5d5ff;float:left;text-align: center;"
  5. :style="{'max-height':testHeight+'px','height':testHeight+'px'}">
  6. <span style="display: flex;justify-content: center;align-items: center;border-bottom: 1px solid #ebeef5;">
  7. <el-button size="mini" :class="tabType==1 ? 'skactive' : 'sknormal'" @click="tabChange('1')">当前数据</el-button>
  8. <!-- <el-button size="mini" :class="tabType==2 ? 'skactive' : 'sknormal'" @click="tabChange('2')">历史数据</el-button>-->
  9. <el-button size="mini" :class="tabType==0 ? 'skactive' : 'sknormal'" @click="tabChange('0')">全部数据</el-button>
  10. </span>
  11. <div class="tree" style="
  12. height: calc(100% - 50px);
  13. width: 100%;
  14. overflow: auto;
  15. display: inline-flex;">
  16. <el-tree
  17. :highlight-current="true"
  18. :data="treeData"
  19. node-key="id"
  20. :expand-on-click-node="false"
  21. @node-click = 'treeNodeClickHandler'
  22. ref="jigou_tree"
  23. >
  24. <div class="custom-tree-node" slot-scope="{ node, data }">
  25. <span style="float:left;">{{ data.pnm}}</span>
  26. </div>
  27. </el-tree>
  28. </div>
  29. </el-aside>
  30. <!-- 主要窗口 -->
  31. <el-main id="dxdcListMainsk" style="padding:5px 20px;">
  32. <el-row>
  33. <el-col :span="24">
  34. <el-form :inline="true" size="mini" class="demo-form-inline" style="padding-left: 10px;">
  35. <el-form-item label="督查状态">
  36. <el-select v-model="dcType" clearable placeholder="督查状态">
  37. <el-option label="未督查" value="0"></el-option>
  38. <el-option label="督查中" value="1"></el-option>
  39. <el-option label="已督查" value="2"></el-option>
  40. </el-select>
  41. </el-form-item>
  42. <el-form-item label="行政区名称">
  43. <addvSearch
  44. v-model="adName"
  45. :maxHeight='300'
  46. :maxWidth='250'
  47. :rootAddCode='curAdcode_long'
  48. :level='"3"'
  49. :nameOrCode="'name'"
  50. ></addvSearch>
  51. </el-form-item>
  52. <el-form-item label="名称">
  53. <el-input v-model="rsvrName" placeholder="名称"></el-input>
  54. </el-form-item>
  55. <el-form-item label="所在组">
  56. <el-autocomplete v-model="groupName" clearable value-key='nm' :fetch-suggestions="querySearchAsync"
  57. placeholder="请输入内容"
  58. @select="handleSelect"></el-autocomplete>
  59. </el-form-item>
  60. <el-form-item label="是否复查" v-if="isJiangXi">
  61. <el-select v-model="repeatId" clearable placeholder="督查状态">
  62. <el-option label="是" value="1"></el-option>
  63. <el-option label="否" value="2"></el-option>
  64. </el-select>
  65. </el-form-item>
  66. <el-form-item label="督查时间">
  67. <div style="display: flex;">
  68. <el-date-picker
  69. v-model="dateRange"
  70. type="daterange"
  71. value-format="yyyy-MM-dd"
  72. style="width:280px"
  73. range-separator="至"
  74. start-placeholder="开始日期"
  75. end-placeholder="结束日期"
  76. ></el-date-picker>
  77. <!-- <el-date-picker v-model="sttm" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
  78. <p style="padding-left: 10px;padding-right: 10px;">至</p>
  79. <el-date-picker v-model="ettm" type="date" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker> -->
  80. </div>
  81. </el-form-item>
  82. <el-form-item>
  83. <el-button type="primary" @click="onSubmit" icon="el-icon-search">查询</el-button>
  84. </el-form-item>
  85. <!-- <el-form-item style="float:right">-->
  86. <!-- <el-button type="success" style="float:right;margin-left:5px"-->
  87. <!-- @click="showPlDialog"-->
  88. <!-- icon="el-icon-upload2"-->
  89. <!-- :disabled="disabled"-->
  90. <!-- >批量填报-->
  91. <!-- </el-button>-->
  92. <!-- <el-button type="success" style="float:right;"-->
  93. <!-- @click="downloadTemplate"-->
  94. <!-- :icon="downIcon"-->
  95. <!-- >下载模板-->
  96. <!-- </el-button>-->
  97. <!-- </el-form-item>-->
  98. </el-form>
  99. </el-col>
  100. </el-row>
  101. <el-table
  102. ref="table"
  103. border
  104. :height="tableHeight"
  105. :data="skDataList"
  106. style="width: 100%"
  107. v-loading="expLoading">
  108. <el-table-column prop="nm" label="名称" show-overflow-tooltip min-width="100"
  109. align="center"></el-table-column>
  110. <el-table-column prop="adFullName" label="地区" show-overflow-tooltip min-width="100"
  111. align="center"></el-table-column>
  112. <el-table-column prop="intm1" label="督查时间" show-overflow-tooltip min-width="100"
  113. align="center"></el-table-column>
  114. <el-table-column
  115. prop="uptm"
  116. label="更新时间"
  117. align="center"
  118. :formatter="formatDate"
  119. min-width="100">
  120. </el-table-column>
  121. <el-table-column
  122. prop="state"
  123. label="督查状态"
  124. align="center"
  125. min-width="80">
  126. <template slot-scope="scope">
  127. <span
  128. style="padding: 3px 10px;background:#F56C6C;border-radius:15px;color:rgba(255,255,255,1)"
  129. v-if="scope.row.state == 0"
  130. >未督查</span>
  131. <span
  132. style="padding: 3px 10px;background:#FBB56D;border-radius:15px;color:rgba(255,255,255,1)"
  133. v-if="scope.row.state == 1"
  134. >督查中</span>
  135. <span
  136. style="padding: 3px 10px;background:#63C25E;border-radius:15px;color:rgba(255,255,255,1)"
  137. v-if="scope.row.state == 2"
  138. >已督查</span>
  139. </template>
  140. </el-table-column>
  141. <el-table-column
  142. prop="engScal"
  143. label="工程规模"
  144. :formatter="formatEngScal"
  145. min-width="80">
  146. </el-table-column>
  147. <!-- <el-table-column-->
  148. <!-- prop="hystSite"-->
  149. <!-- min-width="200"-->
  150. <!-- label="水库所在位置">-->
  151. <!-- </el-table-column>-->
  152. <!-- <el-table-column-->
  153. <!-- prop="rsAdmName"-->
  154. <!-- min-width="180"-->
  155. <!-- label="管理单位"-->
  156. <!-- show-overflow-tooltip>-->
  157. <!-- </el-table-column>-->
  158. <!-- <el-table-column-->
  159. <!-- prop="totCap"-->
  160. <!-- label="总库容(万m³)"-->
  161. <!-- align="right"-->
  162. <!-- min-width="130">-->
  163. <!-- </el-table-column>-->
  164. <el-table-column
  165. v-for="(column,index) in fillTableData"
  166. :key="index"
  167. :prop="column.prop"
  168. :label='column.label'
  169. align="center"
  170. min-width="80">
  171. <template slot-scope="scope">
  172. <p style="cursor:pointer;color:#F56C6C;" v-if="scope.row[column.prop] == 0 || !scope.row[column.prop]">
  173. 待填报</p>
  174. <p style="cursor:pointer;color:#fbb56d" v-if="scope.row[column.prop] == 1">未完成</p>
  175. <p style="cursor:pointer;color:#67C23A" v-if="scope.row[column.prop] == 2">已完成</p>
  176. <p style="cursor:pointer;color:#67C23A" v-if="column.prop == 'viewStat' && scope.row[column.prop] != 0">
  177. 已填报</p>
  178. <p style="cursor:pointer;color:#F56C6C;" v-if="column.prop == 'viewStat' && scope.row[column.prop] == 0">
  179. 未填报</p>
  180. </template>
  181. </el-table-column>
  182. <el-table-column align="center" label="操作" min-width="200" fixed="right">
  183. <template slot-scope="scope">
  184. <div style="display: flex;justify-content: center">
  185. <div style="display: flex">
  186. <el-button size="mini" type="success" v-if="scope.row.rgstrId && scope.row.state != '2'" plain @click="toAddMember('编辑',scope.row)">督查</el-button>
  187. <el-button size="mini" type="danger" v-if="scope.row.rgstrId && scope.row.state != '2'" plain @click="deleteMember(scope.row)">删除</el-button>
  188. <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>
  189. </div>
  190. <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>
  191. <div style="padding-left: 10px;">
  192. <el-button size="mini" type="danger" v-if="scope.row.rgstrId && scope.row.state == '2'" plain @click="revoke(scope.row)">撤回</el-button>
  193. </div>
  194. </div>
  195. </template>
  196. </el-table-column>
  197. </el-table>
  198. <el-pagination background :pager-count="5" :current-page="pageIndex"
  199. :page-size="pageSize" :page-sizes="[10, 20, 30, 40, 50, 100]"
  200. layout="sizes, total, prev, pager, next" :total="total"
  201. @current-change="pageIndexChange" @size-change="handleSizeChange"
  202. ></el-pagination>
  203. </el-main>
  204. <!-- </el-container> -->
  205. <shuiKuTianBao v-if="showShuiKuTianBao" :rowData="rowData" :currentObjectRgstrId="currentObjectRgstrId"
  206. :currentResCode="currentResCode" :currentObjectId="currentObjectId"
  207. :currentObjectName="currentResName"
  208. :currentRsvrNm="currentRsvrNm"
  209. :currentAdCode="currentAdCode"
  210. :pType="pType"
  211. :ifView="ifView"
  212. @cancelHandler="cancelHandler" @addShuiKuSuccess="addShuiKuSuccess"></shuiKuTianBao>
  213. </el-container>
  214. <!-- 添加/编辑人员弹窗 -->
  215. <!-- 上传模板弹窗 -->
  216. <shuiku-tian-bao-pl v-if="showShuiKuTianBaoPl"
  217. :showShuiKuTianBaoPl="showShuiKuTianBaoPl"
  218. :id="currentNodeId"
  219. @closePlDialog="closePlDialog"></shuiku-tian-bao-pl>
  220. <!-- 水库信息查看 -->
  221. <rsvr-info
  222. :currentObjectRgstrId="currentObjectRgstrId"
  223. :currentResCode="currentResCode"
  224. :currentObjectId="currentObjectId"
  225. :currentObjectName="currentResName"
  226. :isJiangXi="isJiangXi"
  227. v-if="showDuchaDetails" @cancelHandler="closeInfoDialog"></rsvr-info>
  228. <!-- 水库督查信息 -->
  229. </div>
  230. </template>
  231. <script>
  232. import request from '../../utils/gw_ajax_request.js'
  233. import {dateFormat} from '../../utils/gw_date.js'
  234. import {getrgstrIdObject, getSKList_fjty} from "../../api/duChaTianBao.js";
  235. import addvSearch from "@widget/addvSearch.vue"
  236. import provTreeList from "../../widgets/provTreeList.vue";
  237. import shuiKuTianBao from "../duChaTianBao/shuiKuTianbao.vue"
  238. import shuikuTianBaoPl from "../duChaTianBao/shuiKuTianbao_piliang.vue"
  239. import rsvrInfo from "../duChaTianBao/shuiku/skInfo/main.vue"
  240. import {curAdcode_long, curAdcode_short} from '@util/global_variable.js'
  241. import {fillColumnForFujian, fillColumnNation,fillColumnNationOld} from '../duChaTianBao/shuiku/forDifferentProvince.js'
  242. import {exportModel} from "@util/gw_exportModel";
  243. import popupSk from "../duChaTianBao/components/popupWindow/sk/main.vue"
  244. export default {
  245. components: {
  246. provTreeList: provTreeList,
  247. shuiKuTianBao: shuiKuTianBao,
  248. shuikuTianBaoPl: shuikuTianBaoPl,
  249. rsvrInfo: rsvrInfo,
  250. addvSearch,
  251. popupSk
  252. },
  253. props: [],
  254. data() {
  255. return {
  256. tabType: "0",
  257. dateRange: [],
  258. lyjg: [],
  259. engScales: [
  260. {id: '4', name: '小(1)型'},
  261. {id: '5', name: '小(2)型'},
  262. ],
  263. engScale: '',
  264. orgName: '',
  265. groupName: '',
  266. groupId: '',
  267. groups: [],
  268. // sttm:'',
  269. // ettm:'',
  270. adName: '',
  271. treeData: [],
  272. dxdcMainHeight: window.innerHeight - 304,
  273. testHeight: window.innerHeight - 111,
  274. skDataList: [],
  275. pageIndex: 1,
  276. pageSize: 20,
  277. total: 0,
  278. tableHeight: 0,
  279. currentResCode: '',
  280. currentResName: '',
  281. currentObjectId: '',
  282. currentObjectRgstrId: '',
  283. currentObjectInfoObject: null,
  284. showShuiKuTianBao: false,
  285. currentAdCode: '',
  286. currentNodeId: '',
  287. rsvrName: '',
  288. dcType: '',
  289. rowData: '',
  290. disabled: true,
  291. showShuiKuTianBaoPl: false,
  292. downIcon: 'el-icon-download',
  293. expLoading: false,
  294. //
  295. repeatId: '',
  296. showDuchaDetails: false,
  297. zerenrenLabel: '"三个责任人"落实情况',
  298. pType: 128,
  299. fillTableData: [], //根据不同省份赋值
  300. xskInfoDialog: false,
  301. currentDuchaTpe: false,
  302. currentRsCode: '',
  303. xskRgstrId: '',
  304. currentObjId: '',
  305. currentRsName: '',
  306. endTime: '',
  307. curTime: new Date().getTime(),
  308. flage: false,
  309. currentRsvrNm: '',
  310. dataProblemclass: [],
  311. ifView: false
  312. }
  313. },
  314. computed: {
  315. persId() {
  316. return localStorage.getItem("userid")
  317. ? localStorage.getItem("userid")
  318. : "1098101939614724096";
  319. },
  320. isAdmin: function () {
  321. return localStorage.getItem("isAdmin") ? localStorage.getItem("isAdmin") : ''
  322. },
  323. currentRlcode() {
  324. return localStorage.getItem('currentRlcode') ? localStorage.getItem('currentRlcode') : ''
  325. },
  326. isJiangXi() {
  327. return this.currentRlcode.indexOf('36') == '0' ? true : false
  328. },
  329. curAdcode_short() {
  330. return curAdcode_short
  331. },
  332. curAdcode_long() {
  333. return curAdcode_long
  334. },
  335. persType() {
  336. return localStorage.getItem("persType") ? localStorage.getItem("persType") : ''
  337. },
  338. isSc(){
  339. if(localStorage.getItem('currentRlcode').substring(0,2)=="51"){
  340. return true;
  341. }else{
  342. return false;
  343. }
  344. },
  345. isSd(){
  346. if(localStorage.getItem('currentRlcode').substring(0,2)=="37"){
  347. return true;
  348. }else{
  349. return false;
  350. }
  351. }
  352. },
  353. mounted() {
  354. this.getLeftTreeData();
  355. this.$nextTick(function () {
  356. this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 50;
  357. let _self = this;
  358. window.onresize = function () {
  359. _self.tableHeight = window.innerHeight - _self.$refs.table.$el.offsetTop - 50
  360. }
  361. })
  362. this.getSkDataList();
  363. this.getAllGroup();
  364. this.fillTableData = fillColumnNation;
  365. if (this.currentRlcode.indexOf('63') == '0' || this.currentRlcode.indexOf('66') == '0') {
  366. this.fillTableData = fillColumnForFujian
  367. }
  368. if (this.currentRlcode.indexOf('53') == '0') {
  369. this.fillTableData = fillColumnNationOld
  370. }
  371. },
  372. activated() {
  373. this.getprolist();
  374. this.currentNodeId = "";
  375. this.rsvrName = "";
  376. this.dcType = "";
  377. this.getSkDataList();
  378. },
  379. watch: {
  380. currentNodeId(n, o) {
  381. this.getSkDataList();
  382. },
  383. groupName(n, o) {
  384. if (n == '') {
  385. this.groupId = '';
  386. }
  387. },
  388. // endTime(n, o) {
  389. // this.flage = this.endTime ? (eval(this.endTime) < eval(this.curTime) ? true : false) : false
  390. // }
  391. },
  392. methods: {
  393. async getprolist(){
  394. await request.post('/bis/insp/pblmP/list').then(res=>{
  395. if(res.success){
  396. this.dataProblemclass = res.data
  397. }
  398. this.$nextTick(() => {
  399. if (this.dataProblemclass && this.dataProblemclass.length > 0) {
  400. const firstNodeId = this.dataProblemclass[0].id;
  401. this.$refs.myTree.setCurrentKey(firstNodeId);
  402. // if (this.$refs.myTree.getCurrentNode()) {
  403. // this.treeNodeClickHandler(this.$refs.myTree.getCurrentNode());
  404. // }
  405. }
  406. });
  407. })
  408. },
  409. isSdPriv(row){
  410. if(this.isSd){
  411. return (this.ownPriv('tmanage') || (!this.ownPriv('tmanage') && row.timeout=='1'))
  412. }
  413. return true;
  414. },
  415. tabChange(tabType) {
  416. this.tabType = tabType;
  417. this.currentNodeId = "";
  418. this.groupName = "";
  419. this.groupId = "";
  420. this.getAllGroup();
  421. this.getLeftTreeData();
  422. this.getSkDataList();
  423. },
  424. //获取所有的组
  425. getAllGroup() {
  426. var _self = this;
  427. request.get('/dc/user/getGroupByPersid', {
  428. params: {
  429. 'persid': this.persId,
  430. 'ptype': '128',
  431. 'tabType': this.tabType
  432. }
  433. }).then((res) => {
  434. if (res.success) {
  435. _self.groups = res.data;
  436. }
  437. })
  438. },
  439. querySearchAsync(queryString, cb) {
  440. var restaurants = this.groups;
  441. var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants;
  442. clearTimeout(this.timeout);
  443. this.timeout = setTimeout(() => {
  444. cb(results);
  445. }, 1500 * Math.random());
  446. },
  447. createStateFilter(queryString) {
  448. return (state) => {
  449. return (state.nm.toLowerCase().indexOf(queryString.toLowerCase()) != -1);
  450. };
  451. },
  452. handleSelect(item) {
  453. console.log(item);
  454. this.groupId = item.id;
  455. },
  456. getLeftTreeData() {
  457. var _self = this;
  458. _self.lyjg = [];
  459. request.get('/dc/organization/base/getAllNode', {
  460. params: {
  461. 'userId': this.persId,
  462. 'orgType': '128',
  463. 'tabType': this.tabType
  464. }
  465. }).then((res) => {
  466. let data = res.data
  467. data.forEach(ele => {
  468. if (ele.pid == null || ele.pid == '') {
  469. ele.pid = '001'
  470. }
  471. if (ele.id.length == 6) {
  472. _self.lyjg.push(ele);
  473. }
  474. });
  475. data = _self.getTrees(data)
  476. // _self.flage = this.getBoolDate(data[0].sttm,data[0].entm);
  477. _self.treeData = data;
  478. // _self.endTime = data[0]['entm']
  479. })
  480. },
  481. getBoolDate(sttm,entm){
  482. if(sttm==null && entm==null){
  483. return true;
  484. }
  485. if(sttm!=null && entm!=null && (sttm<=new Date().getTime() && new Date().getTime()<=entm)){
  486. return true;
  487. }
  488. if(sttm==null || entm==null){
  489. if(sttm==null && new Date().getTime()<=entm){
  490. return true;
  491. }
  492. if(entm==null && sttm<=new Date().getTime()){
  493. return true;
  494. }
  495. }
  496. return false;
  497. },
  498. //格式化树形数据
  499. getTrees(list) {
  500. //@wxcwater重写方法 适应多个树
  501. let highLevelLength = 99;//预设最大节点id长度,目前最大应该为12,所以设置为99保证正常
  502. let _self = this;
  503. list.forEach((item, index) => {
  504. item['pidLength'] = item.pid && item.pid != '' ? item.pid.length : 0;
  505. if (highLevelLength > item.pidLength) {
  506. highLevelLength = item.pidLength;
  507. }
  508. });
  509. console.log(highLevelLength);
  510. let heightLevelNode = [];
  511. list.forEach((item, index) => {
  512. if (highLevelLength >= item.pidLength) {
  513. heightLevelNode.push(item);
  514. }
  515. });
  516. list.forEach((item, index) => {
  517. heightLevelNode.forEach((pItem) => {
  518. _self.addTreeNode(pItem, item);
  519. });
  520. });
  521. console.log(heightLevelNode);
  522. return heightLevelNode;
  523. },
  524. addTreeNode: function (treeNode, leafNode) {
  525. let _self = this;
  526. if (!treeNode.hasOwnProperty('children')) {
  527. treeNode['children'] = [];
  528. }
  529. if (leafNode.pid == treeNode.id) {
  530. treeNode.children.push(leafNode);
  531. return;
  532. }
  533. treeNode.children.forEach((item) => {
  534. _self.addTreeNode(item, leafNode);
  535. });
  536. },
  537. treeNodeClickHandler: function (data, node, tree) {
  538. // this.endTime = data['entm']
  539. this.currentNodeId = data.id;
  540. if(this.currentNodeId.length==12){
  541. this.groupId = data.id;
  542. this.groupName = data.pnm;
  543. }
  544. // this.flage = this.getBoolDate(data[0].sttm,data[0].entm);
  545. },
  546. provTreeSelectChangeHandler: function (params) {
  547. this.currentAdCode = params.likeCode;
  548. this.getSkDataList();
  549. },
  550. formatDate(row, column) {
  551. if (row.uptm) {
  552. return (dateFormat(row.uptm, 'yyyy-MM-dd'));
  553. }
  554. },
  555. formatEngScal(row, column) {
  556. let engScal = row.engScal;
  557. let _engScal = '其他';
  558. switch (engScal) {
  559. case '1' :
  560. _engScal = '大(1)型';
  561. break;
  562. case '2' :
  563. _engScal = '大(2)型';
  564. break;
  565. case '3' :
  566. _engScal = '中型';
  567. break;
  568. case '4' :
  569. _engScal = '小(1)型';
  570. break;
  571. case '5' :
  572. _engScal = '小(2)型';
  573. break;
  574. case '9' :
  575. _engScal = '其他';
  576. break;
  577. }
  578. return _engScal;
  579. },
  580. getSkDataList: function () {
  581. let paramStartDate = '';
  582. let paramEndDate = '';
  583. if (this.dateRange && this.dateRange.length > 1 && this.dateRange[0] != '' && this.dateRange[1] != '') {
  584. paramStartDate = this.dateRange[0];
  585. paramEndDate = this.dateRange[1];
  586. }
  587. let paramsData = {
  588. "type": "rsvr",
  589. 'presId': this.persId,
  590. "pType": "128",
  591. "pageSize": this.pageSize,
  592. 'pageNum': this.pageIndex,
  593. 'id': this.currentNodeId,
  594. 'rsName': this.rsvrName,
  595. 'state': this.dcType,
  596. 'adName': this.adName,
  597. 'sttm': paramStartDate,
  598. 'entm': paramEndDate,
  599. 'riverId': this.orgName,
  600. 'engScal': this.engScale,
  601. 'groupId': this.groupId,
  602. 'tabType': this.tabType
  603. }
  604. if (this.currentRlcode.indexOf('36') == '0') {
  605. paramsData['repeatId'] = this.repeatId
  606. }
  607. this.expLoading = true;
  608. getSKList_fjty(paramsData).then(
  609. (res) => {
  610. console.log(res);
  611. res.data.list.forEach((item) => {
  612. if (item.intm) {
  613. item.intm1 = dateFormat(item.intm, 'yyyy-MM-dd');
  614. }
  615. })
  616. this.skDataList = res.data.list;
  617. this.total = res.data.total;
  618. this.expLoading = false;
  619. }
  620. );
  621. },
  622. onSubmit() {
  623. this.getSkDataList();
  624. },
  625. skCancelHandler() {
  626. this.xskInfoDialog = false
  627. },
  628. toCheck(type, rowData) {
  629. this.currentDuchaTpe = true;
  630. this.xskInfoDialog = true;
  631. this.xskRgstrId = rowData.rgstrId;
  632. this.currentRsCode = rowData.code;
  633. this.currentObjId = rowData.objId;
  634. this.currentRsName = rowData.nm;
  635. this.$nextTick(() => {
  636. if (this.$refs['xskTianBaoRef']) {
  637. this.$refs['xskTianBaoRef'].showDialog();
  638. }
  639. })
  640. },
  641. toAddMember(type, rowData, ifView) {
  642. var _self = this;
  643. this.rowData = rowData;
  644. // ;
  645. console.log(rowData);
  646. // getrgstrIdObject(rowData.code,rowData.objId,_self.pageIndex).then(
  647. // (res) =>{
  648. // console.log(res);
  649. _self.currentResCode = this.rowData.code;
  650. _self.currentObjectId = this.rowData.objId;
  651. _self.currentObjectRgstrId = this.rowData.rgstrId;
  652. _self.currentResName = this.rowData.nm;
  653. _self.currentRsvrNm = this.rowData.rsvrNm;
  654. _self.currentAdCode = this.rowData.adCode;
  655. _self.ifView = ifView;
  656. _self.showShuiKuTianBao = true;
  657. // 获取完成
  658. // },
  659. // (err) =>{
  660. // }
  661. // );
  662. },
  663. cancelHandler() {
  664. this.showShuiKuTianBao = false;
  665. },
  666. addShuiKuSuccess() {
  667. this.getSkDataList();
  668. // this.showShuiKuTianBao = false;
  669. },
  670. deleteMember(obj) {
  671. console.log(obj);
  672. var _self = this;
  673. // /dc/insp/rsvrRgstr/delete/{id}
  674. this.$confirm('此操作将督查对象从列表中删除,确认删除该水库吗?', '提示', {
  675. confirmButtonText: '确定',
  676. cancelButtonText: '取消',
  677. type: 'warning'
  678. }).then(() => {
  679. request.get(`/supervision/plan/cleanObjDataByObjId?objType=128&objId=${obj.objId}`).then((res) => {
  680. if (res.success) {
  681. _self.pageIndexChange();
  682. _self.$message.success('删除成功')
  683. } else {
  684. _self.$message.error(res.message)
  685. }
  686. });
  687. }).catch(() => {
  688. });
  689. },
  690. submitHandler(rowData) {
  691. console.log(rowData)
  692. var _self = this;
  693. getrgstrIdObject(rowData.code, rowData.objId).then(
  694. (res) => {
  695. if (this.currentRlcode.indexOf('63') == '0' || this.currentRlcode.indexOf('66') == '0' || this.currentRlcode.indexOf('53') == '0') {
  696. if (res.data.presStat != '2') {
  697. this.$message({
  698. message: '三个责任人"落实情况填报未完成!',
  699. type: 'warning'
  700. });
  701. return
  702. }
  703. else if (res.data.safeStat != '2' && !(this.currentRlcode.indexOf('53') == '0')) {
  704. this.$message({
  705. message: '安全管理三级责任人填报未完成!',
  706. type: 'warning'
  707. });
  708. return
  709. }
  710. else if (res.data.baseStat != '2') {
  711. this.$message({
  712. message: '三个重点环节"落实情况填报未完成!',
  713. type: 'warning'
  714. });
  715. return
  716. } else if (res.data.reverStat != '2') {
  717. this.$message({
  718. message: '水库工程实体填报未完成',
  719. type: 'warning'
  720. });
  721. return
  722. } else if (res.data.resRunStat != '2') {
  723. this.$message({
  724. message: '运行管理情况填报未完成',
  725. type: 'warning'
  726. });
  727. return
  728. } else if (res.data.benefitStat != '2') {
  729. this.$message({
  730. message: '效益发挥情况填报未完成',
  731. type: 'warning'
  732. });
  733. return
  734. }
  735. }else{
  736. // if (res.data.chkInfoStat != '2') {
  737. // this.$message({
  738. // message: '水库检查情况填报未完成!',
  739. // type: 'warning'
  740. // });
  741. // return
  742. // } else
  743. // if (res.data.rectStat != '2') {
  744. // this.$message({
  745. // message: '整改情况填报填报未完成!',
  746. // type: 'warning'
  747. // });
  748. // return
  749. // }
  750. }
  751. this.$confirm('请确认所有信息填报完毕?', '提示', {
  752. confirmButtonText: '确定',
  753. cancelButtonText: '取消',
  754. type: 'warning'
  755. }).then(() => {
  756. let formObj = {
  757. "rgstrId": rowData.rgstrId,
  758. "state": "2"
  759. }
  760. request.post('/dc/insp/rsvrRgstr/update', formObj).then((res) => {
  761. if (res.success) {
  762. _self.addShuiKuSuccess();
  763. _self.$message.success("提交成功");
  764. } else {
  765. _self.cancelHandler();
  766. }
  767. });
  768. }).catch(() => {
  769. });
  770. }, (err) => {
  771. });
  772. },
  773. revoke(rowData) {
  774. var _self = this;
  775. this.$confirm('确定要撤回当前信息吗?', '提示', {
  776. confirmButtonText: '确定',
  777. cancelButtonText: '取消',
  778. type: 'warning'
  779. }).then(() => {
  780. let formObj = {
  781. "rgstrId": rowData.rgstrId,
  782. "state": "1"
  783. }
  784. request.post('/dc/insp/rsvrRgstr/update', formObj).then((res) => {
  785. if (res.success) {
  786. _self.addShuiKuSuccess();
  787. _self.$message.success("撤回成功");
  788. } else {
  789. _self.cancelHandler();
  790. }
  791. });
  792. }).catch(() => {
  793. });
  794. },
  795. pageIndexChange(val) {
  796. console.log(val);
  797. this.pageIndex = val;
  798. this.getSkDataList();
  799. },
  800. handleSizeChange(val) {
  801. this.pageSize = val;
  802. this.getSkDataList();
  803. },
  804. // 下载填报模板
  805. async downloadTemplate() {
  806. let url = '/pdcApi/dc/impExcel/downloadTemplate/sk?userId=' + this.persId + '&id=' + this.currentNodeId;
  807. let downloadName = "小水库填报模板.xls";
  808. let type = "get";
  809. await exportModel(type, url, downloadName);
  810. this.disabled = false;
  811. },
  812. showPlDialog() {
  813. this.showShuiKuTianBaoPl = true
  814. },
  815. closePlDialog(val) {
  816. this.showShuiKuTianBaoPl = false
  817. },
  818. // 新需求 点击复查显示以前的督查信息
  819. toShowDuchaDetail(row) {
  820. this.currentResCode = row.code;
  821. this.currentObjectId = row.objId;
  822. this.currentObjectRgstrId = row.rgstrId;
  823. this.currentResName = row.nm;
  824. this.showDuchaDetails = true
  825. },
  826. closeInfoDialog() {
  827. this.showDuchaDetails = false
  828. },
  829. // 加入复查
  830. joinRecheck(row) {
  831. let _self = this
  832. let data = {
  833. regerId: row.rgstrId,
  834. type: '1'
  835. }
  836. this.$confirm('确定加入复查吗?', '提示', {
  837. confirmButtonText: '确定',
  838. cancelButtonText: '取消',
  839. type: 'warning'
  840. }).then(() => {
  841. request.post(`/bis/insp/repeat/check/log`, data).then((res) => {
  842. if (res.success) {
  843. _self.$message.success('已加入复查')
  844. _self.getSkDataList();
  845. } else {
  846. _self.$message.error(res.message)
  847. }
  848. }).catch(err => {
  849. _self.$message.error(res.message)
  850. });
  851. }).catch(() => {
  852. });
  853. }
  854. },
  855. };
  856. </script>
  857. <style>
  858. .skactive {
  859. background: #3f8eff !important;
  860. color: white !important;
  861. margin-top: 5px;
  862. margin-bottom: 5px;
  863. }
  864. .sknormal {
  865. background: white;
  866. margin-top: 5px;
  867. margin-bottom: 5px;
  868. }
  869. .el-table .warning-row {
  870. background: oldlace;
  871. }
  872. .el-table .success-row {
  873. background: #f0f9eb;
  874. }
  875. #dxdcListMainsk {
  876. overflow-y: hidden;
  877. }
  878. </style>