2f359d19b978bdcdc17cfa29f1189b5a3e0bd865.svn-base 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  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. <cg-left-tree orgType="30" @treeNodeClickHandler="treeNodeClickHandler"></cg-left-tree>
  7. </el-aside>
  8. <!-- 主要窗口 -->
  9. <el-main id="dxdcListMaindf" style="padding:5px 20px;">
  10. <el-row>
  11. <el-col :span="24">
  12. <el-form :inline="true" size="mini" class="demo-form-inline" style="padding-left: 10px;">
  13. <el-form-item label="督查状态">
  14. <el-select v-model="dcType" clearable placeholder="督查状态">
  15. <el-option label="未督查" value="0"></el-option>
  16. <el-option label="督查中" value="1"></el-option>
  17. <el-option label="已督查" value="2"></el-option>
  18. </el-select>
  19. </el-form-item>
  20. <el-form-item label="超标洪预案名称">
  21. <el-input v-model="name" placeholder="超标洪预案名称" clearable></el-input>
  22. </el-form-item>
  23. <el-form-item label="项目类别">
  24. <el-select v-model="type" clearable placeholder="督查状态">
  25. <el-option :label="item.label" :value="item.value" v-for="item in typeList"
  26. :key="item.value"></el-option>
  27. </el-select>
  28. </el-form-item>
  29. <el-form-item label="督查时间">
  30. <div style="display: flex;">
  31. <el-date-picker
  32. v-model="dateRange"
  33. type="daterange"
  34. value-format="yyyy-MM-dd"
  35. style="width:100%"
  36. range-separator="至"
  37. start-placeholder="开始日期"
  38. end-placeholder="结束日期"
  39. ></el-date-picker>
  40. </div>
  41. </el-form-item>
  42. <el-form-item>
  43. <el-button type="primary" @click="onSubmit" icon="el-icon-search">查询</el-button>
  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="chbDataList"
  53. style="width: 100%"
  54. v-loading="expLoading">
  55. <el-table-column prop="nm" label="督查项目" min-width="130" align="center"
  56. fixed="left"></el-table-column>
  57. <el-table-column
  58. prop="type"
  59. min-width="200"
  60. label="类别"
  61. :formatter="typeFormatter">
  62. </el-table-column>
  63. <el-table-column prop="groupName" label="所在组" show-overflow-tooltip min-width="150"
  64. align="center"></el-table-column>
  65. <el-table-column prop="intm" label="督查时间" show-overflow-tooltip min-width="200"
  66. align="center"></el-table-column>
  67. <el-table-column
  68. prop="state"
  69. label="督查状态"
  70. align="center"
  71. min-width="130">
  72. <template slot-scope="scope">
  73. <span style="padding: 3px 10px;background:#F56C6C;border-radius:15px;color:rgba(255,255,255,1)"
  74. v-if="scope.row.state == 0"
  75. >未督查</span>
  76. <span
  77. style="padding: 3px 10px;background:#FBB56D;border-radius:15px;color:rgba(255,255,255,1)"
  78. v-if="scope.row.state == 1"
  79. >督查中</span>
  80. <span
  81. style="padding: 3px 10px;background:#63C25E;border-radius:15px;color:rgba(255,255,255,1)"
  82. v-if="scope.row.state == 2"
  83. >已督查</span>
  84. </template>
  85. </el-table-column>
  86. <el-table-column
  87. v-for="(column,index) in fillTableData"
  88. :key="index"
  89. :prop="column.prop"
  90. :label='column.label'
  91. align="center"
  92. min-width="130">
  93. <template slot-scope="scope">
  94. <p style="cursor:pointer;color:#F56C6C;"
  95. v-if="scope.row[column.prop] == 0 || !scope.row[column.prop]">待填报</p>
  96. <p style="cursor:pointer;color:#fbb56d" v-if="scope.row[column.prop] == 1">未完成</p>
  97. <p style="cursor:pointer;color:#67C23A" v-if="scope.row[column.prop] == 2">已完成</p>
  98. <p style="cursor:pointer;color:#67C23A"
  99. v-if="column.prop == 'viewStat' && scope.row[column.prop] != 0">已填报</p>
  100. <p style="cursor:pointer;color:#F56C6C;"
  101. v-if="column.prop == 'viewStat' && scope.row[column.prop] == 0">未填报</p>
  102. </template>
  103. </el-table-column>
  104. <el-table-column align="center" label="操作" min-width="220" fixed="right">
  105. <template slot-scope="scope">
  106. <el-button
  107. size="mini"
  108. type="success"
  109. plain
  110. @click="cbhyaInfo(scope.row)"
  111. >查看
  112. </el-button>
  113. </template>
  114. </el-table-column>
  115. </el-table>
  116. <el-pagination background :pager-count="5" :current-page="pageIndex"
  117. :page-size="pageSize" :page-sizes="[10, 20, 30, 40, 50, 100]"
  118. layout="sizes, total, prev, pager, next" :total="total"
  119. @current-change="pageIndexChange" @size-change="handleSizeChange"
  120. ></el-pagination>
  121. </el-main>
  122. </el-container>
  123. <chaoBiaoHongYuAn
  124. v-if="showChaoBiaoChengGuo"
  125. :rowData="rowData"
  126. :currentObjectRgstrId="currentObjectRgstrId"
  127. :currentResCode="currentResCode"
  128. :currentObjectId="currentObjectId"
  129. :currentObjectName="currentResName"
  130. @cancelHandler="cbhyaCancelHandler">
  131. </chaoBiaoHongYuAn>
  132. </div>
  133. </template>
  134. <script>
  135. import request from '@util/gw_ajax_request.js'
  136. import provTreeList from "@widget/provTreeList.vue";
  137. import cgLeftTree from "../dccg_lefttree.vue"
  138. export default {
  139. components: {
  140. provTreeList: provTreeList,
  141. cgLeftTree,
  142. chaoBiaoHongYuAn: resolve => {
  143. require(["../../zongHeXinXiOl/components/popupWindow/chaobiao/main"], resolve);
  144. },
  145. },
  146. props: [],
  147. data() {
  148. return {
  149. dateRange: [],
  150. tableHeight: 50,
  151. lyjg: [],
  152. orgName: '',
  153. groupName: '',
  154. groupId: '',
  155. groups: [],
  156. adName: '',
  157. downIcon: 'el-icon-download',
  158. treeData: [],
  159. dxdcMainHeight: window.innerHeight - 304,
  160. testHeight: window.innerHeight - 111,
  161. chbDataList: [],
  162. pageIndex: 1,
  163. pageSize: 20,
  164. total: 0,
  165. currentResCode: '',
  166. currentResName: '',
  167. currentObjectId: '',
  168. currentObjectRgstrId: '',
  169. currentObjectInfoObject: null,
  170. showShuiKuTianBao: false,
  171. currentAdCode: '',
  172. currentNodeId: '',
  173. name: '',
  174. type: '',
  175. dcType: '',
  176. rowData: '',
  177. disabled: true,
  178. showShuiKuTianBaoPl: false,
  179. expLoading: false,
  180. $el: '',
  181. fillTableData: [
  182. {
  183. label: '预案编制情况',
  184. prop: "planStat"
  185. },
  186. {
  187. label: '原因分析和整改意见',
  188. prop: "reasonStat"
  189. }
  190. ],
  191. typeList: [
  192. {label: '流域内大江大河', value: '1'},
  193. {label: '流域内跨省大江大河重要支流', value: '2'},
  194. {label: '非跨省大江大河重要支流和其他重要河流', value: '3'},
  195. {label: '全国重点防洪城市', value: '4'},
  196. {label: '全国重要防洪城市', value: '5'},
  197. ],
  198. newYear: "",
  199. adCodes: [],
  200. showChaoBiaoChengGuo: false
  201. };
  202. },
  203. computed: {
  204. persId() {
  205. return localStorage.getItem("userid")
  206. ? localStorage.getItem("userid")
  207. : "1098101939614724096";
  208. },
  209. isAdmin() {
  210. return localStorage.getItem("isAdmin") ? localStorage.getItem("isAdmin") : ''
  211. },
  212. hasPriv() {
  213. return this.ownPriv('manage')
  214. }
  215. },
  216. mounted() {
  217. this.$nextTick(function () {
  218. this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 50;
  219. let _self = this;
  220. window.onresize = function () {
  221. _self.tableHeight = window.innerHeight - _self.$refs.table.$el.offsetTop - 50
  222. }
  223. })
  224. },
  225. methods: {
  226. changeYear(val) {
  227. this.newYear = val;
  228. this.getChbDataList();
  229. },
  230. reFresh() {
  231. this.currentNodeId = "";
  232. this.name = "";
  233. this.type = "";
  234. this.dcType = "";
  235. this.getChbDataList();
  236. },
  237. handleSelect(item) {
  238. console.log(item);
  239. this.groupId = item.id;
  240. },
  241. getOrganList(data) {
  242. this.lyjg = data
  243. },
  244. treeNodeClickHandler(data) {
  245. this.adCodes = data;
  246. },
  247. provTreeSelectChangeHandler: function (params) {
  248. this.currentAdCode = params.likeCode;
  249. this.getChbDataList();
  250. },
  251. getChbDataList() {
  252. this.expLoading = true;
  253. let paramStartDate = '';
  254. let paramEndDate = '';
  255. if (this.dateRange && this.dateRange.length > 1 && this.dateRange[0] != '' && this.dateRange[1] != '') {
  256. paramStartDate = this.dateRange[0];
  257. paramEndDate = this.dateRange[1];
  258. }
  259. let params = {
  260. "sttm": paramStartDate,
  261. "entm": paramEndDate,
  262. "pageSize": this.pageSize,
  263. "pageNum": this.pageIndex,
  264. "groupId": this.groupId,
  265. "rsName": this.name,
  266. "efpType": this.type,
  267. "state": this.dcType,
  268. "pType": 30,
  269. "adName": this.adName,
  270. "presId": this.persId,
  271. "plnaId": this.currentNodeId,
  272. "adCodes": this.adCodes.toString()
  273. };
  274. request.post(`/bis/insp/efp/rgstr/findEfpPage`, params).then(res => {
  275. if (res.success) {
  276. this.expLoading = false;
  277. if (res.data.list) {
  278. res.data.list.forEach((item) => {
  279. if (item.intm && item.uptm) {
  280. item.intm = item.intm.substr(0, 10);
  281. item.uptm = item.uptm.substr(0, 10);
  282. }
  283. })
  284. }
  285. this.chbDataList = res.data.list;
  286. this.total = res.data.total;
  287. }
  288. })
  289. },
  290. onSubmit() {
  291. if (this.adCodes.length) {
  292. this.getChbDataList();
  293. }
  294. },
  295. pageIndexChange(val) {
  296. console.log(val);
  297. this.pageIndex = val;
  298. this.getChbDataList();
  299. },
  300. handleSizeChange(val) {
  301. this.pageSize = val;
  302. this.getChbDataList();
  303. },
  304. // 类型格式化
  305. typeFormatter(row, column) {
  306. let type = row.type;
  307. let _type = '其他';
  308. switch (type) {
  309. case '1' :
  310. _type = '流域内大江大河';
  311. break;
  312. case '2' :
  313. _type = '流域内跨省大江大河重要支流';
  314. break;
  315. case '3' :
  316. _type = '非跨省大江大河重要支流和其他重要河流';
  317. break;
  318. case '4' :
  319. _type = '全国重点防洪城市';
  320. break;
  321. case '5' :
  322. _type = '全国重要防洪城市';
  323. break;
  324. default:
  325. _type = '其他';
  326. break;
  327. }
  328. return _type;
  329. },
  330. cbhyaInfo(row) {
  331. this.currentObjectId = row.objId;
  332. this.currentResName = row.nm;
  333. this.currentResCode = row.code;
  334. this.currentObjectRgstrId = row.rgstrId;
  335. this.rowData = row;
  336. this.showChaoBiaoChengGuo = true;
  337. },
  338. cbhyaCancelHandler() {
  339. this.showChaoBiaoChengGuo = false;
  340. }
  341. },
  342. watch: {
  343. adCodes(val) {
  344. if (val.length) this.getChbDataList();
  345. }
  346. }
  347. };
  348. </script>
  349. <style>
  350. .el-table .warning-row {
  351. background: oldlace;
  352. }
  353. .el-table .success-row {
  354. background: #f0f9eb;
  355. }
  356. #dxdcListMaindf {
  357. overflow-y: hidden;
  358. }
  359. </style>