efda12d29cffb41bcfbecc6c411f74125d8b2a3f.svn-base 11 KB

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