69fbc0e75a358625d3c4e45e328a7c4da8dadf4f.svn-base 32 KB

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