ac239f0762f51e53e883dea8bdc666d3d655d459.svn-base 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. <template>
  2. <div id="skMain" style="height:100%;" v-loading="exportLoading">
  3. <el-row>
  4. <el-col :span="24">
  5. <div class="grid-content bg-purple-light">
  6. <div style="padding:15px 5px 5px 5px;">
  7. <span style="font-size: 12px;margin-left: 10px;">名称:</span>
  8. <el-input style="width:150px;" class="kjr-input" size="mini" v-model="model_shuiku_name"
  9. placeholder="请输入名称查询" @keydown.enter.native="searchByName" clearable>
  10. </el-input>
  11. <span style="font-size: 12px;margin-left: 10px;">规模:</span>
  12. <el-select v-model="guimo" placeholder="请选择" style="width: 140px" clearable>
  13. <el-option
  14. v-for="item in options"
  15. :key="item.value"
  16. :label="item.label"
  17. :value="item.value">
  18. </el-option>
  19. </el-select>
  20. <span v-if="!dcztDisabled">
  21. <span style="font-size: 12px;margin-left: 10px;">督查状态:</span>
  22. <el-select v-model="dczt" placeholder="请选择" :disabled="dcztDisabled" style="width: 140px" clearable>
  23. <el-option
  24. v-for="item in dcOptions"
  25. :key="item.value"
  26. :label="item.label"
  27. :value="item.value">
  28. </el-option>
  29. </el-select>
  30. </span>
  31. <!-- <span v-if="isDczt">-->
  32. <!-- <span v-if="dcztDisabled">-->
  33. <!-- </span>-->
  34. <!-- <el-radio v-model="dcztradio" label="0" style="margin-left: 10px; margin-right: 6px">未督查</el-radio>-->
  35. <!-- <el-radio v-model="dcztradio" label="1" style="margin-right: 6px">督查中</el-radio>-->
  36. <!-- <el-radio v-model="dcztradio" label="2" style="margin-right: 6px">已督查</el-radio>-->
  37. <!-- </span>-->
  38. &nbsp;&nbsp;&nbsp;
  39. <el-button @click="searchByName" size="mini" type="primary">查询</el-button>
  40. <el-button @click="exPort" size="mini" type="success">导出</el-button>
  41. </div>
  42. <div style="padding:5px;">
  43. <el-col :span="5">
  44. <div style="height: 500px;overflow: auto">
  45. <provTreeList :rootCode="rootCode" :rootType="rootType"
  46. @provTreeSelectChange="provTreeSelectChangeHandler"
  47. >
  48. </provTreeList>
  49. </div>
  50. </el-col>
  51. <el-col :span="19">
  52. <el-table :data="tableData_shuikuList" v-loading="loading" height="468" border stripe style="width: 100%">
  53. <el-table-column type="index" width="50" label="序号" align="center" :index="indexMethod_country">
  54. </el-table-column>
  55. <el-table-column prop="rsName" label="水库名称" width="130" align="center" sortable></el-table-column>
  56. <el-table-column prop="engScal" label="规模" width="110" align="center">
  57. <template slot-scope="scope" v-if="scope.row.status">
  58. <span v-if="scope.row.engScal == '4'" style="color: #4fdeb2;">小(1)</span>
  59. <span v-if="scope.row.engScal == '5'" style="color: #d69b0d;">小(2)</span>
  60. </template>
  61. </el-table-column>
  62. <el-table-column prop="status" label="小水库督查状态" min-width="150" align="center">
  63. </el-table-column>
  64. <el-table-column prop="rsAdmName" label="水库位置" width="130" align="center" show-overflow-tooltip>
  65. </el-table-column>
  66. <el-table-column prop="totCap" label="库容(万立方米)" width="110" align="center">
  67. </el-table-column>
  68. <!--<el-table-column prop="rsType" label="水库类型" width="110" align="center"-->
  69. <!--:formatter="formatter_shuiku_type">-->
  70. <!--</el-table-column>-->
  71. <!--<el-table-column prop="damSizeHig" label="主坝尺寸坝高(m)" width="150" align="center">-->
  72. <!--</el-table-column>-->
  73. <el-table-column fixed="right" label="操作" min-width="200" align="center">
  74. <template slot-scope="scope" v-if="scope.row.status">
  75. <el-button type="text" size="small" @click="skInfo(scope.row,'loaction')">定位</el-button>
  76. <el-button type="text" size="small" @click="skInfo(scope.row,'baseInfo')">详细信息</el-button>
  77. <!-- <el-button type="text" size="small" v-if="scope.row.status.substr(0, 4) == '2019' || scope.row.status.substr(0, 2) == '复查'" @click="skInfo(scope.row,'dcInfo')">督查信息</el-button>-->
  78. <!-- <el-button type="text" size="small" v-if="scope.row.status.substr(0, 4) == '2018' || scope.row.status == '督查计划外'" @click="skInfo(scope.row,'addDcInfo')">加入督查计划</el-button>-->
  79. </template>
  80. </el-table-column>
  81. </el-table>
  82. <div class="block">
  83. <el-pagination background @size-change="handleSizeChange_shuiku"
  84. @current-change="handleCurrentChange_shuiku" :page-sizes="[10,50, 100, 200]"
  85. :page-size="15" layout="total,sizes, prev, pager, next" :pager-count="5"
  86. :total="recordTotal_shuiku">
  87. </el-pagination>
  88. </div>
  89. </el-col>
  90. </div>
  91. </div>
  92. </el-col>
  93. </el-row>
  94. </div>
  95. </template>
  96. <script>
  97. import provTreeList from '../../../widgets/provTreeListAndChina'
  98. import request from '../../../utils/gw_ajax_request.js';
  99. import {exportModel} from "@util/gw_exportModel";
  100. export default {
  101. name: "resevoirList",
  102. components:{
  103. provTreeList
  104. },
  105. props:["dcztStatus","dcztDisabled","currentAdCode"],
  106. data() {
  107. return {
  108. rootCode:'000000',
  109. rootType:'2',
  110. model_shuiku_name:'',
  111. model_shuiku_dwName:'',
  112. recordTotal_dxs:'',
  113. options: [
  114. {
  115. value: '4',
  116. label: '小(1)'
  117. }, {
  118. value: '5',
  119. label: '小(2)'
  120. }
  121. ],
  122. guimo:'',
  123. dczt:'',
  124. dcOptions: [
  125. {
  126. value: '0',
  127. label: '未督查'
  128. }, {
  129. value: '1',
  130. label: '督查中'
  131. }, {
  132. value: '2',
  133. label: '已督查'
  134. }],
  135. tableData_shuikuList:[],
  136. recordTotal_shuiku:0,
  137. pageSize_shuiku: 10,
  138. pageIndex_shuiku: 1,
  139. loading: false,
  140. dcztradio:'',
  141. isDczt:false,
  142. adCode:'',
  143. model_shuiku_statistic:false,
  144. paginationBoxReflow:true,
  145. exportLoading:false,
  146. // isFc: true,
  147. }
  148. },
  149. computed: {
  150. recPersId() {
  151. return localStorage.getItem("userid") ? localStorage.getItem("userid") : ''
  152. }
  153. },
  154. mounted(){
  155. let _this = this;
  156. _this.dczt = _this.dcztStatus;
  157. _this.loadTableShuiku();
  158. },
  159. methods:{
  160. indexMethod_country(index) {
  161. return (index + 1) + this.pageSize_shuiku * (this.pageIndex_shuiku - 1)
  162. },
  163. provTreeSelectChangeHandler(params) {
  164. this.adCode = params.code;
  165. this.$nextTick(()=>{
  166. this.pageSize_shuiku = 10;
  167. this.pageIndex_shuiku = 1;
  168. this.loadTableShuiku();
  169. })
  170. },
  171. searchByName() {
  172. this.loadTableShuiku();
  173. },
  174. async exPort(){
  175. let _self = this;
  176. this.exportLoading = true;
  177. let data = {};
  178. data.rsName = _self.model_shuiku_name;
  179. data.adCode = _self.adCode;
  180. data.engScal = _self.guimo;
  181. data.status = _self.dczt;
  182. data.rsvrState = _self.dcztradio;
  183. data.persGuid = _self.recPersId;
  184. data.objType = '1';
  185. data.isExport = '1';
  186. let datas = JSON.stringify(data);
  187. let url = `/pdcApi/dc/general/info/getRsSupData`;
  188. let downloadName = "水库.xls";
  189. let type = "post";
  190. let result = await exportModel(type,url,downloadName,datas);
  191. this.exportLoading = result;
  192. },
  193. loadTableShuiku() {
  194. let _this = this;
  195. _this.loading = true;
  196. request.post(`/dc/general/info/getRsSupData`, {
  197. objType: 1,
  198. pageNum: _this.pageIndex_shuiku,
  199. pageSize: _this.pageSize_shuiku,
  200. rsName: _this.model_shuiku_name,
  201. adCode: _this.adCode,
  202. engScal: _this.guimo,
  203. status: _this.dczt,
  204. rsvrState: _this.dcztradio,
  205. persGuid: _this.recPersId,
  206. })
  207. .then((res) => {
  208. if (res.success) {
  209. _this.$nextTick()
  210. _this.loading = false;
  211. var obj = res.data;
  212. _this.tableData_shuikuList = obj.list;
  213. _this.recordTotal_shuiku = obj.total;
  214. }
  215. })
  216. },
  217. handleSizeChange_shuiku (pageSize) {
  218. this.pageSize_shuiku = pageSize;
  219. this.loadTableShuiku();
  220. },
  221. handleCurrentChange_shuiku (pageNum) {
  222. this.pageIndex_shuiku = pageNum;
  223. this.loadTableShuiku();
  224. },
  225. bShuikuStatistic(){
  226. },
  227. skInfo(row,info){
  228. this.$emit('skInfo',row,info);
  229. },
  230. },
  231. watch:{
  232. dczt(n,o){
  233. if(n == '2' || n == '3'){
  234. this.isDczt = true;
  235. }else {
  236. this.isDczt = false;
  237. this.dcztradio = '';
  238. }
  239. },
  240. model_shuiku_statistic(n,o){
  241. if(n){
  242. this.dczt = '3';
  243. this.loadTableShuiku();
  244. }else {
  245. this.dczt = '';
  246. this.loadTableShuiku();
  247. }
  248. },
  249. dcztStatus(n,o){
  250. this.dczt = n;
  251. this.loadTableShuiku();
  252. },
  253. currentAdCode(n,o){
  254. this.adCode = n;
  255. this.loadTableShuiku();
  256. }
  257. }
  258. }
  259. </script>
  260. <style>
  261. #skMain .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
  262. background-color: #558ed0;
  263. }
  264. </style>