7c7458483bbb4eaeba36930465dfbb2097cf0c0b.svn-base 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. <template>
  2. <div style="height:100%;width:100%;">
  3. <el-container style="height:100%;width:100%;">
  4. <el-aside
  5. width="320px"
  6. style="border-right:2px solid #d5d5ff;float:left"
  7. :style="{'max-height':testHeight+'px','height':testHeight+'px'}"
  8. >
  9. <TreeListWithCheckBox
  10. type="15"
  11. :height="testHeight"
  12. width="260"
  13. @treeCheckedDataChange="treeCheckedDataChange"></TreeListWithCheckBox>
  14. </el-aside>
  15. <el-main id="dxdcListMainsk" style="padding:5px 20px;">
  16. <el-row>
  17. <el-col :span="24">
  18. <el-form
  19. :inline="true"
  20. size="mini"
  21. class="demo-form-inline"
  22. style="padding-left: 10px;"
  23. >
  24. <el-form-item label="督查状态">
  25. <el-select v-model="dcType" clearable placeholder="督查状态">
  26. <el-option label="未督查" value="0"></el-option>
  27. <el-option label="督查中" value="1"></el-option>
  28. <el-option label="已督查" value="2"></el-option>
  29. </el-select>
  30. </el-form-item>
  31. <el-form-item label="督查对象名称">
  32. <el-input v-model="nm" placeholder="督查对象名称" clearable></el-input>
  33. </el-form-item>
  34. <el-form-item label="督查时间">
  35. <div style="display: flex;">
  36. <el-date-picker
  37. v-model="dateRange"
  38. type="daterange"
  39. value-format="yyyy-MM-dd"
  40. style="width:100%"
  41. range-separator="至"
  42. start-placeholder="开始日期"
  43. end-placeholder="结束日期"
  44. ></el-date-picker>
  45. </div>
  46. </el-form-item>
  47. <el-form-item>
  48. <el-button type="primary" @click="onSubmit" icon="el-icon-search">查询</el-button>
  49. </el-form-item>
  50. </el-form>
  51. </el-col>
  52. </el-row>
  53. <el-table
  54. ref="table"
  55. border
  56. :data="skDataList"
  57. style="width: 100%"
  58. :height="tableHeight"
  59. v-loading="expLoading"
  60. >
  61. <el-table-column show-overflow-tooltip prop="nm" label="督查对象名称" min-width="130"
  62. align="center"></el-table-column>
  63. <el-table-column
  64. prop="province"
  65. label="省" v-if="isXj"
  66. show-overflow-tooltip
  67. min-width="100"
  68. align="center"
  69. ></el-table-column>
  70. <el-table-column
  71. prop="city"
  72. :label="ownAdName"
  73. show-overflow-tooltip
  74. min-width="100"
  75. align="center"
  76. ></el-table-column>
  77. <el-table-column
  78. prop="country"
  79. label="县" v-if="isXj"
  80. show-overflow-tooltip
  81. min-width="100"
  82. align="center"
  83. ></el-table-column>
  84. <!--<el-table-column-->
  85. <!--prop="groupName"-->
  86. <!--label="所在组"-->
  87. <!--show-overflow-tooltip-->
  88. <!--min-width="150"-->
  89. <!--align="center"-->
  90. <!--&gt;</el-table-column>-->
  91. <el-table-column prop="state" label="督查状态" align="center" min-width="130">
  92. <template slot-scope="scope">
  93. <span
  94. style="padding: 3px 10px;background:#F56C6C;border-radius:15px;color:rgba(255,255,255,1)"
  95. v-if="scope.row.state == 0"
  96. >未督查</span>
  97. <span
  98. style="padding: 3px 10px;background:#FBB56D;border-radius:15px;color:rgba(255,255,255,1)"
  99. v-if="scope.row.state == 1"
  100. >督查中</span>
  101. <span
  102. style="padding: 3px 10px;background:#63C25E;border-radius:15px;color:rgba(255,255,255,1)"
  103. v-if="scope.row.state == 2"
  104. >已督查</span>
  105. </template>
  106. </el-table-column>
  107. <el-table-column prop="location" show-overflow-tooltip min-width="200"
  108. label="详细地址"></el-table-column>
  109. <el-table-column
  110. prop="intm"
  111. label="创建时间"
  112. show-overflow-tooltip
  113. min-width="120"
  114. align="center"
  115. ></el-table-column>
  116. <el-table-column prop="wswmInfoStat" label="节约用水管理情况填报状态" align="center" min-width="220">
  117. <template slot-scope="scope">
  118. <p style="cursor:pointer;color:#F56C6C;"
  119. v-if="scope.row.wswmInfoStat == 0 || !scope.row.wswmInfoStat">待填报</p>
  120. <p style="cursor:pointer;color:#fbb56d" v-if="scope.row.wswmInfoStat == 1">未完成</p>
  121. <p style="cursor:pointer;color:#67C23A" v-if="scope.row.wswmInfoStat == 2">已完成</p>
  122. </template>
  123. </el-table-column>
  124. <el-table-column prop="wseInfoStat" label="节水评价情况填报状态" align="center" min-width="220">
  125. <template slot-scope="scope">
  126. <p style="cursor:pointer;color:#F56C6C;"
  127. v-if="scope.row.wseInfoStat == 0 || !scope.row.wseInfoStat">待填报</p>
  128. <p style="cursor:pointer;color:#fbb56d" v-if="scope.row.wseInfoStat == 1">未完成</p>
  129. <p style="cursor:pointer;color:#67C23A" v-if="scope.row.wseInfoStat == 2">已完成</p>
  130. </template>
  131. </el-table-column>
  132. <el-table-column align="center" label="操作" min-width="250" fixed="right">
  133. <template slot-scope="scope">
  134. <el-button type="primary" plain @click="lookOver(scope.row)">查看</el-button>
  135. </template>
  136. </el-table-column>
  137. </el-table>
  138. <el-pagination
  139. background
  140. :pager-count="5"
  141. :current-page="pageIndex"
  142. :page-size="pageSize"
  143. :page-sizes="[10, 20, 30, 40, 50, 100]"
  144. layout="sizes, total, prev, pager, next"
  145. :total="total"
  146. @current-change="pageIndexChange"
  147. @size-change="handleSizeChange"
  148. ></el-pagination>
  149. </el-main>
  150. </el-container>
  151. <popupSzyJsgl v-if="showSzyJsgl"
  152. ref="popupSzyJsglRef"
  153. :currentDuchaTpe="currentDuchaTpe"
  154. :currentObjectRgstrId="currentRgstrId"
  155. :currentJysglAdCode="currentJysglAdCode"
  156. :currentObjectId="currentObjectId"
  157. :currentObjectName="currentObjectName"
  158. @cancelHandler="szyJsglCancelHandler"></popupSzyJsgl>
  159. </div>
  160. </template>
  161. <script>
  162. import request from "../../../utils/gw_ajax_request.js";
  163. import {dateFormat} from "../../../utils/gw_date.js";
  164. import {deleteDcdxByObjid, getList_jieshuiChengGuo} from "../../../api/duChaTianBao.js";
  165. import TreeListWithCheckBox from "./treeListWithCheckBox"
  166. export default {
  167. components: {
  168. TreeListWithCheckBox,
  169. //水资源 节水管理
  170. popupSzyJsgl: resolve => {
  171. require(['../../../views/zongHeXinXiOl/components/popupWindow/szy_jsgl/main.vue'], resolve)
  172. }
  173. },
  174. props: [],
  175. data() {
  176. return {
  177. dateRange: [],
  178. nm: "",
  179. lyjg: [],
  180. engScales: [
  181. {id: "1", name: "大型"},
  182. {id: "2", name: "中型"},
  183. {id: "3", name: "小型"},
  184. {id: "4", name: "其他"},
  185. ],
  186. engScale: "",
  187. orgName: "",
  188. groupName: "",
  189. groupId: "",
  190. groups: [],
  191. sttm: "",
  192. entm: "",
  193. adName: "",
  194. treeData: [],
  195. dxdcMainHeight: window.innerHeight - 345,
  196. testHeight: window.innerHeight - 111,
  197. skDataList: [],
  198. pageIndex: 1,
  199. pageSize: 20,
  200. total: 0,
  201. tableHeight: 0,
  202. currentResCode: "",
  203. currentResName: "",
  204. currentObjectId: "",
  205. currentObjectRgstrId: "",
  206. currentObjectInfoObject: null,
  207. showSlfpTianBao: false,
  208. currentAdCode: "",
  209. currentNodeId: "",
  210. rsvrName: "",
  211. dcType: "",
  212. rowData: "",
  213. uploadDisabled: true,
  214. showTianBaoPl: false,
  215. downIcon: "el-icon-download",
  216. expLoading: false,
  217. currentEngScale: "",
  218. currentGroupId: "",
  219. currentAdcode: "",
  220. currentObjectName: "",
  221. showOrEdit: "",
  222. gdX: 0,
  223. gdY: 0,
  224. baseForm: {},
  225. problemLastYearVisible: false,
  226. swhsId: '',
  227. swhsCode: '',
  228. showSzyJsgl: false,
  229. currentJysglAdCode: '',
  230. currentRgstrId: '',
  231. currentObjectType: '',//水资源 用水单位 类型(节水还是非节水)
  232. currentDuchaTpe: true,
  233. adCodes: []
  234. };
  235. },
  236. computed: {
  237. persId() {
  238. return localStorage.getItem("userid")
  239. ? localStorage.getItem("userid")
  240. : "1098101939614724096";
  241. },
  242. isAdmin: function () {
  243. return localStorage.getItem("isAdmin")
  244. ? localStorage.getItem("isAdmin")
  245. : "";
  246. }
  247. },
  248. mounted() {
  249. this.$nextTick(function () {
  250. this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 50;
  251. let _self = this;
  252. window.onresize = function () {
  253. _self.tableHeight = window.innerHeight - _self.$refs.table.$el.offsetTop - 50
  254. }
  255. })
  256. this.getAllGroup();
  257. this.currentNodeId = "";
  258. this.rsvrName = "";
  259. this.dcType = "";
  260. },
  261. watch: {
  262. adCodes(n) {
  263. if (n.length) {
  264. this.getSkDataList();
  265. }
  266. }
  267. },
  268. methods: {
  269. //树节点选中或取消事件
  270. treeCheckedDataChange(params) {
  271. this.adCodes = Array.from(new Set(params.CheckedKey));
  272. },
  273. handleSelect(item) {
  274. console.log(item);
  275. this.groupId = item.id;
  276. },
  277. formatDate(row, column) {
  278. if (row.upTm) {
  279. return dateFormat(row.upTm, "yyyy-MM-dd");
  280. }
  281. if (row.intm) {
  282. return dateFormat(row.intm, "yyyy-MM-dd");
  283. }
  284. },
  285. formatGateType: function (row, column) {
  286. return row.type == "1" ? '水库'
  287. : row.type == "2" ? '湖泊'
  288. : row.type == "3" ? '河流'
  289. : row.type == "9" ? '其他' : '';
  290. },
  291. formatEngScal: function (row, column) {
  292. return row.engScal == "1" ? '大型'
  293. : row.engScal == "2" ? '中型'
  294. : row.engScal == "3" ? '小型' : '其他'
  295. },
  296. getSkDataList: function () {
  297. getList_jieshuiChengGuo(
  298. this.persId,
  299. this.pageSize,
  300. this.pageIndex,
  301. this.nm,
  302. this.dcType,
  303. this.adName,
  304. this.dateRange && this.dateRange.length > 1 ? this.dateRange[0] : null,
  305. this.dateRange && this.dateRange.length > 1 ? this.dateRange[1] : null,
  306. this.groupId,
  307. this.adCodes.toString()
  308. ).then(res => {
  309. console.log(res);
  310. this.skDataList = res.data.list;
  311. this.total = res.data.total;
  312. });
  313. },
  314. onSubmit() {
  315. if (this.adCodes.length) {
  316. this.getSkDataList();
  317. }
  318. // else{
  319. // this.$message.warning('请选择左侧行政区');
  320. // }
  321. },
  322. cancelHandler() {
  323. this.showSlfpTianBao = false;
  324. },
  325. addShuiKuSuccess() {
  326. this.getSkDataList();
  327. },
  328. deleteMember(val) {
  329. console.log(val);
  330. var _self = this;
  331. this.$confirm('此操作将 “' + val.nm + '” 从督查对象列表中删除,是否继续?', '提示', {
  332. confirmButtonText: '确定',
  333. cancelButtonText: '取消',
  334. type: 'warning'
  335. }).then(() => {
  336. deleteDcdxByObjid(val.objId, 15).then(res => {
  337. if (res.success) {
  338. this.$message({
  339. type: 'success',
  340. message: '删除成功!'
  341. });
  342. }
  343. ;
  344. this.getSkDataList();
  345. }
  346. );
  347. }).catch(() => {
  348. this.$message({
  349. type: 'info',
  350. message: '已取消删除'
  351. });
  352. });
  353. },
  354. submitHandler(rowData) {
  355. console.log(rowData);
  356. var _self = this;
  357. if (!rowData.wswmInfoStat) {
  358. this.$message({
  359. message: "请填写节约用水管理情况!",
  360. type: "warning"
  361. });
  362. return;
  363. }
  364. if (!rowData.wseInfoStat) {
  365. this.$message({
  366. message: "请填写节水评价情况!",
  367. type: "warning"
  368. });
  369. return;
  370. }
  371. this.$confirm("请确认所有信息填报完毕?", "提示", {
  372. confirmButtonText: "确定",
  373. cancelButtonText: "取消",
  374. type: "warning"
  375. }).then(() => {
  376. let formObj = {
  377. id: rowData.id,
  378. state: "2"
  379. };
  380. request.post("/bis/insp/svwt/area/rgstr", formObj).then(res => {
  381. if (res.success) {
  382. _self.addShuiKuSuccess();
  383. _self.$message.success("提交成功");
  384. } else {
  385. _self.cancelHandler();
  386. }
  387. });
  388. }).catch(() => {
  389. });
  390. },
  391. pageIndexChange(val) {
  392. console.log(val);
  393. this.pageIndex = val;
  394. this.getSkDataList();
  395. },
  396. handleSizeChange(val) {
  397. this.pageSize = val;
  398. this.getSkDataList();
  399. },
  400. // 下载模板
  401. async downloadTemplate() {
  402. await this.downloadTemplateSet();
  403. this.uploadDisabled = false;
  404. },
  405. downloadTemplateSet() {
  406. let href = '/api/dc/imp/dcInfo/download?userId=' + this.persId + '&orgType=013&orgIds=' + this.groupId;
  407. const a = document.createElement('a'); // 创建a标签
  408. a.setAttribute('download', '水源地督查填报表.xls');// download属性
  409. a.setAttribute('href', href);// href链接
  410. a.click();// 自执行点击事件
  411. },
  412. showPlDialog() {
  413. this.showTianBaoPl = true
  414. },
  415. closePlDialog(val) {
  416. this.showTianBaoPl = false
  417. this.getSkDataList();
  418. },
  419. //成果查看
  420. lookOver(row) {
  421. this.activeName = "登记信息";
  422. this.currentObjectId = row.objId;
  423. this.currentJysglAdCode = row.code;
  424. this.currentObjectName = row.nm;
  425. this.currentRgstrId = row.rgstrId;
  426. this.showSzyJsgl = true;
  427. if (this.$refs['popupSzyJsglRef']) {
  428. this.$refs['popupSzyJsglRef'].showDialog();
  429. }
  430. },
  431. szyJsglCancelHandler() {
  432. this.showSzyJsgl = false;
  433. },
  434. }
  435. }
  436. </script>
  437. <style>
  438. #dcdxHeader {
  439. padding: 15px 20px;
  440. }
  441. #dxdcFooter {
  442. text-align: center;
  443. }
  444. #dxdcAside {
  445. border: 1px solid #d5d5ff;
  446. }
  447. .el-table .warning-row {
  448. background: oldlace;
  449. }
  450. .el-table .success-row {
  451. background: #f0f9eb;
  452. }
  453. </style>