f3527a0655d1215ae8d8d2b41836987e4d2f364d.svn-base 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  1. <template>
  2. <div style="height:100%;width:100%;">
  3. <el-container style="height:100%;width:100%;">
  4. <el-aside style="border-right:2px solid #d5d5ff;float:left"
  5. :style="{'max-height':testHeight+'px','height':testHeight+'px'}">
  6. <TreeListWithCheckBox
  7. type="12"
  8. :height="testHeight"
  9. width="250"
  10. @treeCheckedDataChange="treeCheckedDataChange"></TreeListWithCheckBox>
  11. </el-aside>
  12. <!-- 主要窗口 -->
  13. <el-main id="dxdcListMaintdfj" style="padding:5px 20px;">
  14. <el-row>
  15. <el-col :span="24">
  16. <el-form :inline="true" size="mini" class="demo-form-inline" style="padding-left: 10px;">
  17. <el-form-item label="督查状态">
  18. <el-select v-model="dcType" clearable placeholder="督查状态">
  19. <el-option label="未督查" value="0"></el-option>
  20. <el-option label="督查中" value="1"></el-option>
  21. <el-option label="已督查" value="2"></el-option>
  22. </el-select>
  23. </el-form-item>
  24. <el-form-item label="取水口名称">
  25. <el-input v-model="nm" clearable placeholder="项目名称"></el-input>
  26. </el-form-item>
  27. <el-form-item label="督查时间">
  28. <div style="display: flex;">
  29. <el-date-picker
  30. v-model="dateRange"
  31. type="daterange"
  32. value-format="yyyy-MM-dd"
  33. style="width:100%"
  34. range-separator="至"
  35. start-placeholder="开始日期"
  36. end-placeholder="结束日期"
  37. ></el-date-picker>
  38. </div>
  39. </el-form-item>
  40. <el-form-item>
  41. <el-button type="primary" @click="onSubmit" icon="el-icon-search">查询</el-button>
  42. </el-form-item>
  43. <el-form-item style="float:right">
  44. </el-form-item>
  45. </el-form>
  46. </el-col>
  47. </el-row>
  48. <el-table
  49. ref="table"
  50. border
  51. :height="tableHeight"
  52. :data="dataList"
  53. style="width: 100%"
  54. v-loading="expLoading">
  55. <el-table-column prop="nm" label="项目名称" show-overflow-tooltip min-width="130" align="center"
  56. fixed="left"></el-table-column>
  57. <el-table-column prop="province" label="省" v-if="isXj" show-overflow-tooltip min-width="100"
  58. align="center"></el-table-column>
  59. <el-table-column prop="city" :label="ownAdName" show-overflow-tooltip min-width="100"
  60. align="center"></el-table-column>
  61. <el-table-column prop="country" label="县" v-if="isXj" show-overflow-tooltip min-width="100"
  62. align="center"></el-table-column>
  63. <el-table-column
  64. prop="location"
  65. min-width="200"
  66. label="工程详细位置">
  67. </el-table-column>
  68. <el-table-column prop="intm" label="创建时间" show-overflow-tooltip min-width="120"
  69. align="center"></el-table-column>
  70. <el-table-column
  71. prop="state"
  72. label="督查状态"
  73. align="center"
  74. min-width="130">
  75. <template slot-scope="scope">
  76. <span
  77. style="padding: 3px 10px;background:#F56C6C;border-radius:15px;color:rgba(255,255,255,1)"
  78. v-if="scope.row.state == 0"
  79. >未督查</span>
  80. <span
  81. style="padding: 3px 10px;background:#FBB56D;border-radius:15px;color:rgba(255,255,255,1)"
  82. v-if="scope.row.state == 1"
  83. >督查中</span>
  84. <span
  85. style="padding: 3px 10px;background:#63C25E;border-radius:15px;color:rgba(255,255,255,1)"
  86. v-if="scope.row.state == 2"
  87. >已督查</span>
  88. </template>
  89. </el-table-column>
  90. <el-table-column prop="intInfoStat" label="取水口取水及监管情况" align="center" min-width="170">
  91. <template slot-scope="scope">
  92. <p style="cursor:pointer;color:#F56C6C;"
  93. v-if="scope.row.intInfoStat == 0 || !scope.row.intInfoStat">待填报</p>
  94. <p style="cursor:pointer;color:#fbb56d" v-if="scope.row.intInfoStat == 1">未完成</p>
  95. <p style="cursor:pointer;color:#67C23A" v-if="scope.row.intInfoStat == 2">已完成</p>
  96. </template>
  97. </el-table-column>
  98. <el-table-column align="center" label="操作" min-width="160" fixed="right">
  99. <template slot-scope="scope">
  100. <el-button type="success" plain @click="lookOver(scope.row)">查看</el-button>
  101. </template>
  102. </el-table-column>
  103. </el-table>
  104. <el-pagination background :pager-count="5" :current-page="pageIndex"
  105. :page-size="pageSize" :page-sizes="[10, 20, 30, 40, 50, 100]"
  106. layout="sizes, total, prev, pager, next" :total="total"
  107. @current-change="pageIndexChange" @size-change="handleSizeChange"
  108. ></el-pagination>
  109. </el-main>
  110. <!-- 取水户督查信息 -->
  111. <popupQsh v-if="showQshDuChaInfo"
  112. ref="qshTianBaoRef"
  113. :currentDuchaTpe="currentDuchaTpe"
  114. :currentObjectRgstrId="currentRgstrId"
  115. :currentGroupId="currentGroupId"
  116. :currentQshCode="currentQshCode"
  117. :currentQshWintCode="currentQshWintCode"
  118. :currentObjectId="currentObjectId"
  119. :currentObjectWintCode="currentObjectWintCode"
  120. :currentObjectCode="currentObjectCode"
  121. :currentObjectName="currentResName"
  122. showOrEdit="show"
  123. @cancelHandler="qshCancelHandler"></popupQsh>
  124. </el-container>
  125. </div>
  126. </template>
  127. <script>
  128. import request from '../../../utils/gw_ajax_request.js'
  129. import {dateFormat} from '../../../utils/gw_date.js'
  130. import provTreeList from "../../../widgets/provTreeList.vue";
  131. import quShuiKouTianBao from "../../duChaTianBao/waterIntake/quShuiKouTianBao.vue"
  132. import teDingFeiJianTianBaoPl from "../../duChaTianBao/teDingFeiJianTianbao_piliang.vue"
  133. import TreeListWithCheckBox from "./treeListWithCheckBox"
  134. export default {
  135. components: {
  136. provTreeList: provTreeList,
  137. quShuiKouTianBao: quShuiKouTianBao,
  138. teDingFeiJianTianBaoPl: teDingFeiJianTianBaoPl,
  139. popupQsh: resolve => {
  140. require(['../../../views/zongHeXinXiOl/components/popupWindow/qysh/main.vue'], resolve)
  141. },
  142. TreeListWithCheckBox
  143. },
  144. props: [],
  145. data() {
  146. return {
  147. dateRange: [],
  148. lyjg: [],
  149. engScale: '',
  150. orgName: '',
  151. groupName: '',
  152. groupId: '',
  153. groups: [],
  154. // sttm:'',
  155. // ettm:'',
  156. adName: '',
  157. treeData: [],
  158. dxdcMainHeight: window.innerHeight - 304,
  159. testHeight: window.innerHeight - 111,
  160. dataList: [],
  161. pageIndex: 1,
  162. pageSize: 20,
  163. total: 0,
  164. tableHeight: 0,
  165. currentResName: '',
  166. currentObjectId: '',
  167. currentObjectRgstrId: '',
  168. currentObjectCode: '',
  169. currentObjectWintCode: '',
  170. currentObjectInfoObject: null,
  171. showQuShuiKouTianBao: false,
  172. currentAdCode: '',
  173. currentNodeId: '',
  174. currentDuchaTpe: true,
  175. currentRgstrId: '',//当前登记表id
  176. currentGroupId: '',
  177. currentQshCode: '',
  178. currentQshWintCode: '',
  179. currentObjectName: '',
  180. showQshDuChaInfo: false,
  181. rsvrName: '',
  182. dcType: '',
  183. sjState: '',
  184. rowData: '',
  185. disabled: true,
  186. showQuShuiKouTianBaoPl: false,
  187. downIcon: 'el-icon-download',
  188. expLoading: false,
  189. dataStat: '',
  190. nm: '',
  191. state: '',
  192. adCodes: []
  193. };
  194. },
  195. computed: {
  196. persId() {
  197. return localStorage.getItem("userid")
  198. ? localStorage.getItem("userid")
  199. : "1098101939614724096";
  200. },
  201. isAdmin: function () {
  202. return localStorage.getItem("isAdmin") ? localStorage.getItem("isAdmin") : ''
  203. },
  204. },
  205. mounted() {
  206. this.$nextTick(function () {
  207. this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 50;
  208. let _self = this;
  209. window.onresize = function () {
  210. _self.tableHeight = window.innerHeight - _self.$refs.table.$el.offsetTop - 50
  211. }
  212. this.getAllGroup();
  213. })
  214. },
  215. watch: {
  216. adCodes(n) {
  217. if (n.length) {
  218. this.getdataList();
  219. }
  220. }
  221. },
  222. methods: {
  223. //树节点选中或取消事件
  224. treeCheckedDataChange(params) {
  225. // 去重
  226. this.adCodes = Array.from(new Set(params.CheckedKey));
  227. },
  228. formatDate(row, column) {
  229. if (row.uptm) {
  230. return (dateFormat(row.uptm, 'yyyy-MM-dd'));
  231. }
  232. },
  233. getdataList() {
  234. this.expLoading = true;
  235. let paramStartDate = '';
  236. let paramEndDate = '';
  237. if (this.dateRange && this.dateRange.length > 1 && this.dateRange[0] != '' && this.dateRange[1] != '') {
  238. paramStartDate = this.dateRange[0];
  239. paramEndDate = this.dateRange[1];
  240. }
  241. let params = {
  242. "sttm": paramStartDate,
  243. "entm": paramEndDate,
  244. "pageSize": this.pageSize,
  245. "pageNum": this.pageIndex,
  246. "groupId": this.groupId,
  247. "rsName": this.nm,
  248. "state": this.dcType,
  249. "adName": this.adName,
  250. "presId": this.persId,
  251. "adCodes": this.adCodes.toString(),
  252. "pType": '12'
  253. };
  254. request.post(`/bis/insp/wiu/rgstr/list/page`, params).then(res => {
  255. if (res.success) {
  256. this.expLoading = false;
  257. if (res.data.list) {
  258. res.data.list.forEach((item) => {
  259. if (item.intm || item.uptm) {
  260. item.intm = item.intm.substr(0, 10);
  261. }
  262. })
  263. }
  264. this.dataList = res.data.list;
  265. this.total = res.data.total;
  266. }
  267. })
  268. },
  269. onSubmit() {
  270. if (this.adCodes.length) {
  271. this.getdataList();
  272. }
  273. // else{
  274. // this.$message.warning('请选择左侧行政区');
  275. // }
  276. },
  277. cancelHandler() {
  278. this.getdataList()
  279. this.showQuShuiKouTianBao = false;
  280. },
  281. pageIndexChange(val) {
  282. console.log(val);
  283. this.pageIndex = val;
  284. this.getdataList();
  285. },
  286. handleSizeChange(val) {
  287. this.pageSize = val;
  288. this.getdataList();
  289. },
  290. showPlDialog() {
  291. this.showQuShuiKouTianBaoPl = true
  292. },
  293. closePlDialog(val) {
  294. this.showQuShuiKouTianBaoPl = false
  295. },
  296. uploadSuccess() {
  297. this.showQuShuiKouTianBaoPl = false;
  298. this.getdataList();
  299. },
  300. //成果查看
  301. lookOver(row) {
  302. this.currentQshCode = row.code;
  303. this.currentQshWintCode = row.wintCode;
  304. this.currentRgstrId = row.rgstrId;
  305. this.currentObjectId = row.objId;
  306. this.currentObjectRgstrId = row.id;
  307. this.currentObjectWintCode = row.wintCode;
  308. this.currentObjectCode = row.code;
  309. this.currentResName = row.nm;
  310. this.showQshDuChaInfo = true;
  311. if (this.$refs['qshTianBaoRef']) {
  312. this.$refs['qshTianBaoRef'].showDialog();
  313. }
  314. },
  315. qshCancelHandler() {
  316. this.showQshDuChaInfo = false;
  317. },
  318. },
  319. };
  320. </script>
  321. <style>
  322. .el-table .warning-row {
  323. background: oldlace;
  324. }
  325. .el-table .success-row {
  326. background: #f0f9eb;
  327. }
  328. #dxdcListMaintdfj {
  329. overflow-y: hidden;
  330. }
  331. </style>