45580d95fb8b3f2119e811df9ebc8a5cc55fc8f2.svn-base 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  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="14"
  11. :height="testHeight"
  12. width="250"
  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 prop="state" label="督查状态" align="center" min-width="130">
  85. <template slot-scope="scope">
  86. <span
  87. style="padding: 3px 10px;background:#F56C6C;border-radius:15px;color:rgba(255,255,255,1)"
  88. v-if="scope.row.state == 0"
  89. >未督查</span>
  90. <span
  91. style="padding: 3px 10px;background:#FBB56D;border-radius:15px;color:rgba(255,255,255,1)"
  92. v-if="scope.row.state == 1"
  93. >督查中</span>
  94. <span
  95. style="padding: 3px 10px;background:#63C25E;border-radius:15px;color:rgba(255,255,255,1)"
  96. v-if="scope.row.state == 2"
  97. >已督查</span>
  98. </template>
  99. </el-table-column>
  100. <el-table-column prop="location" show-overflow-tooltip min-width="200"
  101. label="详细地址"></el-table-column>
  102. <el-table-column
  103. prop="intm"
  104. label="创建时间"
  105. show-overflow-tooltip
  106. min-width="120"
  107. align="center"
  108. ></el-table-column>
  109. <el-table-column prop="intInfoStat" label="水量分配及取用水管控情况填报状态" align="center" min-width="220">
  110. <template slot-scope="scope">
  111. <p style="cursor:pointer;color:#F56C6C;"
  112. v-if="scope.row.intInfoStat == 0 || !scope.row.intInfoStat">待填报</p>
  113. <p style="cursor:pointer;color:#fbb56d" v-if="scope.row.intInfoStat == 1">未完成</p>
  114. <p style="cursor:pointer;color:#67C23A" v-if="scope.row.intInfoStat == 2">已完成</p>
  115. </template>
  116. </el-table-column>
  117. <el-table-column align="center" label="操作" min-width="160" fixed="right">
  118. <template slot-scope="scope">
  119. <el-button type="success" plain @click="lookOver(scope.row)">查看</el-button>
  120. </template>
  121. </el-table-column>
  122. </el-table>
  123. <el-pagination
  124. background
  125. :pager-count="5"
  126. :current-page="pageIndex"
  127. :page-size="pageSize"
  128. :page-sizes="[10, 20, 30, 40, 50, 100]"
  129. layout="sizes, total, prev, pager, next"
  130. :total="total"
  131. @current-change="pageIndexChange"
  132. @size-change="handleSizeChange"
  133. ></el-pagination>
  134. </el-main>
  135. </el-container>
  136. <fenShuiGuanKong
  137. v-if="showSlfpTianBao"
  138. :rowData="rowData"
  139. :currentObjectRgstrId="currentObjectRgstrId"
  140. :currentResCode="currentResCode"
  141. :currentAdcode="currentAdcode"
  142. :currentObjectId="currentObjectId"
  143. :currentObjectName="currentObjectName"
  144. :showOrEdit="showOrEdit"
  145. :swhsId="swhsId"
  146. @cancelHandler="cancelHandler"></fenShuiGuanKong>
  147. </div>
  148. </template>
  149. <script>
  150. import request from "../../../utils/gw_ajax_request.js";
  151. import {dateFormat} from "../../../utils/gw_date.js";
  152. import {deleteDcdxByObjid, getListChengGuo_slfp} from "../../../api/duChaTianBao.js";
  153. import TreeListWithCheckBox from './treeListWithCheckBox'
  154. import fenShuiGuanKong from './fenShuiGuanKong'
  155. export default {
  156. components: {
  157. TreeListWithCheckBox: TreeListWithCheckBox,
  158. fenShuiGuanKong: fenShuiGuanKong
  159. },
  160. props: [],
  161. data() {
  162. return {
  163. dateRange: [],
  164. nm: "",
  165. lyjg: [],
  166. engScales: [
  167. {id: "1", name: "大型"},
  168. {id: "2", name: "中型"},
  169. {id: "3", name: "小型"},
  170. {id: "4", name: "其他"},
  171. ],
  172. engScale: "",
  173. orgName: "",
  174. groupName: "",
  175. groupId: "",
  176. groups: [],
  177. sttm: "",
  178. entm: "",
  179. adName: "",
  180. treeData: [],
  181. dxdcMainHeight: window.innerHeight - 345,
  182. testHeight: window.innerHeight - 111,
  183. skDataList: [],
  184. pageIndex: 1,
  185. pageSize: 20,
  186. total: 0,
  187. tableHeight: 0,
  188. currentResCode: "",
  189. currentResName: "",
  190. currentObjectId: "",
  191. currentObjectRgstrId: "",
  192. currentObjectInfoObject: null,
  193. showSlfpTianBao: false,
  194. currentAdCode: "",
  195. currentNodeId: "",
  196. rsvrName: "",
  197. dcType: "",
  198. rowData: "",
  199. uploadDisabled: true,
  200. showTianBaoPl: false,
  201. downIcon: "el-icon-download",
  202. expLoading: false,
  203. currentEngScale: "",
  204. currentGroupId: "",
  205. currentAdcode: "",
  206. currentObjectName: "",
  207. showOrEdit: "",
  208. gdX: 0,
  209. gdY: 0,
  210. baseForm: {},
  211. problemLastYearVisible: false,
  212. swhsId: '',
  213. swhsCode: '',
  214. adCodes: []
  215. };
  216. },
  217. computed: {
  218. persId() {
  219. return localStorage.getItem("userid")
  220. ? localStorage.getItem("userid")
  221. : "1098101939614724096";
  222. },
  223. isAdmin: function () {
  224. return localStorage.getItem("isAdmin")
  225. ? localStorage.getItem("isAdmin")
  226. : "";
  227. }
  228. },
  229. mounted() {
  230. this.$nextTick(function () {
  231. this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 50;
  232. let _self = this;
  233. window.onresize = function () {
  234. _self.tableHeight = window.innerHeight - _self.$refs.table.$el.offsetTop - 50
  235. }
  236. })
  237. },
  238. activated() {
  239. this.currentNodeId = "";
  240. this.rsvrName = "";
  241. this.dcType = "";
  242. },
  243. watch: {
  244. adCodes(n) {
  245. if (n.length) {
  246. this.getSkDataList();
  247. }
  248. }
  249. },
  250. methods: {
  251. //树节点选中或取消事件
  252. treeCheckedDataChange(params) {
  253. // 去重
  254. this.adCodes = Array.from(new Set(params.CheckedKey));
  255. },
  256. formatDate(row, column) {
  257. if (row.upTm) {
  258. return dateFormat(row.upTm, "yyyy-MM-dd");
  259. }
  260. if (row.intm) {
  261. return dateFormat(row.intm, "yyyy-MM-dd");
  262. }
  263. },
  264. formatGateType: function (row, column) {
  265. return row.type == "1" ? '水库'
  266. : row.type == "2" ? '湖泊'
  267. : row.type == "3" ? '河流'
  268. : row.type == "9" ? '其他' : '';
  269. },
  270. formatEngScal: function (row, column) {
  271. return row.engScal == "1" ? '大型'
  272. : row.engScal == "2" ? '中型'
  273. : row.engScal == "3" ? '小型' : '其他'
  274. },
  275. getSkDataList: function () {
  276. getListChengGuo_slfp(
  277. this.persId,
  278. this.pageSize,
  279. this.pageIndex,
  280. this.nm,
  281. this.dcType,
  282. this.adName,
  283. this.dateRange && this.dateRange.length > 1 ? this.dateRange[0] : null,
  284. this.dateRange && this.dateRange.length > 1 ? this.dateRange[1] : null,
  285. this.groupId,
  286. this.adCodes.toString()
  287. ).then(res => {
  288. console.log(res);
  289. this.skDataList = res.data.list;
  290. this.total = res.data.total;
  291. });
  292. },
  293. onSubmit() {
  294. if (this.adCodes.length) {
  295. this.getSkDataList();
  296. }
  297. },
  298. cancelHandler() {
  299. this.showSlfpTianBao = false;
  300. },
  301. pageIndexChange(val) {
  302. console.log(val);
  303. this.pageIndex = val;
  304. this.getSkDataList();
  305. },
  306. handleSizeChange(val) {
  307. this.pageSize = val;
  308. this.getSkDataList();
  309. },
  310. lookOver(rowData) {
  311. let _self = this;
  312. _self.showOrEdit = 'show';
  313. _self.swhsId = rowData.code;
  314. _self.currentObjectName = rowData.nm;
  315. _self.currentResCode = rowData.code;
  316. _self.currentObjectRgstrId = rowData.id;
  317. _self.currentObjectId = rowData.objId;
  318. _self.showSlfpTianBao = true;
  319. }
  320. }
  321. }
  322. </script>
  323. <style>
  324. #dcdxHeader {
  325. padding: 15px 20px;
  326. }
  327. #dxdcFooter {
  328. text-align: center;
  329. }
  330. #dxdcAside {
  331. border: 1px solid #d5d5ff;
  332. }
  333. .el-table .warning-row {
  334. background: oldlace;
  335. }
  336. .el-table .success-row {
  337. background: #f0f9eb;
  338. }
  339. </style>