2a038539e2cf12986302cde5b3ea7c54289be995.svn-base 33 KB

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