af2ff065ba27f0716bacd6d023dc7118da2f36b7.svn-base 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  1. <template>
  2. <div>
  3. <el-container>
  4. <el-main id="dxdcListMain" style="padding:5px 20px;">
  5. <el-row>
  6. <el-col :span="24">
  7. <el-form :inline="true" size="mini" class="demo-form-inline" style="padding-left: 10px;">
  8. <el-form-item label="督查时间">
  9. <div style="display: flex;">
  10. <el-date-picker
  11. v-model="dateRange"
  12. type="daterange"
  13. value-format="yyyy-MM-dd"
  14. style="width:100%"
  15. range-separator="至"
  16. start-placeholder="开始日期"
  17. end-placeholder="结束日期"
  18. ></el-date-picker>
  19. </div>
  20. </el-form-item>
  21. <el-form-item>
  22. <el-button type="primary" @click="onSubmit" icon="el-icon-search">查询</el-button>
  23. </el-form-item>
  24. </el-form>
  25. </el-col>
  26. </el-row>
  27. <el-table ref="table" :height="dxdcMainHeight+'px'" border :data="villageList" tooltip-effect="dark"
  28. style="width: 100%;" v-loading="loading">
  29. <el-table-column align="center" type="index" label="序号" min-width="45">
  30. <template slot-scope="scope">
  31. {{ (pageIndex - 1) * pageSize + (scope.$index + 1) }}
  32. </template>
  33. </el-table-column>
  34. <el-table-column align="center" show-overflow-tooltip prop="province" label="省" v-if="isXj"
  35. min-width="100"></el-table-column>
  36. <el-table-column align="center" show-overflow-tooltip prop="city" :label="ownAdName"
  37. min-width="100"></el-table-column>
  38. <el-table-column align="center" show-overflow-tooltip prop="county" label="县(区)"
  39. min-width="100"></el-table-column>
  40. <el-table-column align="center" show-overflow-tooltip prop="town" label="乡(镇)"
  41. min-width="100"></el-table-column>
  42. <el-table-column align="center" show-overflow-tooltip prop="adnm" label="行政村名(*县*乡镇*村)"
  43. min-width="160"></el-table-column>
  44. <el-table-column align="center" sortable show-overflow-tooltip prop="visitDate" label="暗访日期"
  45. min-width="110"></el-table-column>
  46. <el-table-column align="center" show-overflow-tooltip prop="isNdAdmin" label="是否需要设置管水员"
  47. min-width="110">
  48. <template slot-scope="scope">
  49. <span>{{formatRadio(scope.row.isNdAdmin)}}</span>
  50. </template>
  51. </el-table-column>
  52. <el-table-column align="center" show-overflow-tooltip label="是否供水单位直接管理" min-width="110">
  53. <template slot-scope="scope">
  54. <span v-if="scope.row.isNdAdmin == '0'">{{formatRadio(scope.row.isComMng)}}</span>
  55. </template>
  56. </el-table-column>
  57. <el-table-column align="center" show-overflow-tooltip prop="isAdmin" label="是否设置管水员" min-width="80">
  58. <template slot-scope="scope">
  59. <span v-if="scope.row.isNdAdmin == '1'">{{formatRadio(scope.row.isAdmin)}}</span>
  60. </template>
  61. </el-table-column>
  62. <el-table-column align="center" show-overflow-tooltip prop="adminNm" label="管水员姓名" min-width="90">
  63. <template slot-scope="scope">
  64. <span v-if="scope.row.isAdmin == 1">{{scope.row.adminNm}}</span>
  65. </template>
  66. </el-table-column>
  67. <el-table-column align="center" show-overflow-tooltip prop="adminAge" label="管水员年龄" min-width="90">
  68. <template slot-scope="scope">
  69. <span v-if="scope.row.isAdmin == 1">{{scope.row.adminAge}}</span>
  70. </template>
  71. </el-table-column>
  72. <el-table-column align="center" show-overflow-tooltip prop="adminPro" label="管水员性质" min-width="90">
  73. <template slot-scope="scope">
  74. <span v-if="scope.row.isAdmin == 1">{{scope.row.adminPro == 'A' ? '专职' : scope.row.adminPro == 'B' ? '兼职' : scope.row.adminPro}}</span>
  75. </template>
  76. </el-table-column>
  77. <el-table-column align="center" show-overflow-tooltip prop="salary" label="管水员工资(元/年)"
  78. min-width="100">
  79. <template slot-scope="scope">
  80. <span v-if="scope.row.isAdmin == '1'">{{scope.row.salary}}</span>
  81. </template>
  82. </el-table-column>
  83. <el-table-column align="center" show-overflow-tooltip prop="operFee" label="运行维护费用(元/年)"
  84. min-width="110"></el-table-column>
  85. <el-table-column align="center" show-overflow-tooltip prop="otherFeeOrg" label="除水费收入外的运行维护费用来源"
  86. min-width="130">
  87. <template slot-scope="scope">
  88. <span>{{scope.row.otherFeeOrg == 'A' ? '政府' : scope.row.otherFeeOrg == 'B' ? '村委会' : scope.row.otherFeeOrg == 'C' ? '村民自筹' : scope.row.otherFeeOrg == 'D' ? '其它' : scope.row.otherFeeOrg}}</span>
  89. </template>
  90. </el-table-column>
  91. <el-table-column align="center" show-overflow-tooltip prop="feeCommons" label="费用说明"
  92. min-width="90"></el-table-column>
  93. <el-table-column align="center" show-overflow-tooltip label="操作" min-width="160" fixed="right">
  94. <template slot-scope="scope">
  95. <el-button type="success" plain @click="lookOver(scope.row)">查看</el-button>
  96. </template>
  97. </el-table-column>
  98. </el-table>
  99. </el-main>
  100. <el-footer id="dxdcFooter">
  101. <el-pagination background @current-change="handleCurrentChange" @size-change="handleSizeChange"
  102. :pager-count="5" :current-page.sync="pageIndex" :page-size="pageSize"
  103. :page-sizes="[10, 20, 30, 40, 50, 100]" layout="sizes, total, prev, pager, next"
  104. :total="total"></el-pagination>
  105. </el-footer>
  106. </el-container>
  107. <!--督查成果查看-->
  108. <renyinProject v-if="ryInfoDialog" ref="ryRef" :ryTitle="ryTitle" :ryObjId="ryObjId" :ryEngId="ryEngId"
  109. @cancelHandler="ryCancelHandler"></renyinProject>
  110. </div>
  111. </template>
  112. <script>
  113. import request from "../../../utils/gw_ajax_request.js"
  114. export default {
  115. components: {
  116. renyinProject: resolve => {
  117. require(['../../../views/zongHeXinXiOl/components/popupWindow/renyin/main.vue'], resolve)
  118. },
  119. },
  120. props: ['fengongxianCode', 'engId', 'fenggongxianName', 'currentNodeType', 'lyjg', 'fengongxianAdCode', 'fengongxianChildren', 'adCodes', 'groups'],
  121. data() {
  122. return {
  123. dateRange: [],
  124. groupId: '',
  125. lyjg1: [],
  126. groupName: '',
  127. sttm: '',
  128. ettm: '',
  129. local: false,
  130. dxdcMainHeight: window.innerHeight - 327,
  131. dxdcAsideHeight: window.innerHeight - 90,
  132. addObj: {
  133. adnm: '',
  134. adCode: '',
  135. isNdAdmin: '',
  136. recPersId: '',
  137. isAdmin: '',
  138. adminNm: '',
  139. adminAge: '',
  140. adminPro: '',
  141. salary: '',
  142. operFee: '',
  143. otherFeeOrg: '',
  144. feeCommons: '',
  145. visitDate: '',
  146. recPers2: '',
  147. isComMng: '',
  148. },
  149. rules: {
  150. adminAge: [{
  151. required: false,
  152. type: 'number',
  153. message: '年龄必须为数字值'
  154. }],
  155. salary: [{
  156. required: false,
  157. type: 'number',
  158. message: '管水员工资必须为数字值'
  159. }],
  160. operFee: [{
  161. required: false,
  162. type: 'number',
  163. message: '运行维护费用必须为数字值'
  164. }],
  165. },
  166. searchObj: {
  167. pageNum: this.pageIndex,
  168. pageSize: this.pageSize,
  169. // adNm: "",
  170. persId: "",
  171. chkComId: '',
  172. chkCom: '',
  173. groupNm: '',
  174. groupId: '',
  175. startDate: '',
  176. endDate: '',
  177. adCodes: ''
  178. },
  179. adminType: [{
  180. label: '专职',
  181. value: 'A'
  182. },
  183. {
  184. label: '兼职',
  185. value: 'B'
  186. }
  187. ],
  188. feeFrom: [{
  189. label: '政府',
  190. value: 'A',
  191. },
  192. {
  193. label: '村委会',
  194. value: 'B',
  195. },
  196. {
  197. label: '村民自筹',
  198. value: 'C',
  199. },
  200. {
  201. label: '其它',
  202. value: 'D',
  203. },
  204. {
  205. label: '无',
  206. value: 'E',
  207. },
  208. ],
  209. pageIndex: 1,
  210. pageSize: 20,
  211. total: 1,
  212. villageList: [],
  213. dialogFormVisible: false,
  214. formLabelWidth: '170px',
  215. curOperate: '',
  216. isExits: false,
  217. loading: false,
  218. tableHeight: 50,
  219. jqmmButton: false,
  220. jqmmShow: false,
  221. imageShow: false,
  222. jqmmEngId: "",
  223. sswhName: "",
  224. centerX: 0,
  225. centerY: 0,
  226. //督查成果
  227. ryInfoDialog: false,
  228. ryTitle: "",
  229. ryEngId: "",
  230. ryObjId: ""
  231. }
  232. },
  233. computed: {
  234. recPersId() {
  235. return localStorage.getItem("userid") ? localStorage.getItem("userid") : '1098101939614724096'
  236. },
  237. userId: function () {
  238. return localStorage.getItem("userid")
  239. ? localStorage.getItem("userid")
  240. : "1098101939614724096";
  241. },
  242. },
  243. mounted() {
  244. this.$nextTick(function () {
  245. this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 200;
  246. let _self = this;
  247. window.onresize = function () {
  248. _self.tableHeight = window.innerHeight - _self.$refs.table.$el.offsetTop - 200
  249. }
  250. })
  251. this.searchObj.persId = this.userId;
  252. },
  253. watch: {
  254. adCodes(n) {
  255. if (n.length) {
  256. this.getVillageListByNode();
  257. }
  258. },
  259. lyjg(n, o) {
  260. this.lyjg1 = this.lyjg;
  261. },
  262. 'addObj.isAdmin'(val, oldVal) {
  263. console.log(val, oldVal)
  264. if (val == '1') {
  265. this.local = true
  266. } else {
  267. this.local = false
  268. }
  269. },
  270. deep: true
  271. },
  272. methods: {
  273. handleSelect(item) {
  274. console.log(item);
  275. this.groupId = item.id;
  276. },
  277. onSubmit() {
  278. if (this.adCodes.length) {
  279. this.getVillageListByNode();
  280. }
  281. },
  282. //根据节点id查工程列表
  283. getVillageListByNode() {
  284. if (this.dateRange && this.dateRange.length > 1 && this.dateRange[0] != '' && this.dateRange[1] != '') {
  285. this.searchObj.startDate = this.dateRange[0];
  286. this.searchObj.endDate = this.dateRange[1];
  287. } else {
  288. delete this.searchObj['startDate'];
  289. delete this.searchObj['endDate'];
  290. }
  291. this.searchObj.pageSize = this.pageSize;//添加每页条目数
  292. this.searchObj.pageNum = this.pageIndex
  293. this.searchObj.groupId = this.groupId
  294. this.searchObj.adCodes = this.adCodes.toString()
  295. let paramsObj = this.searchObj
  296. request.post('/dc/insp/VlgdrinkFacOper/getPageByNodeId', paramsObj).then((res) => {
  297. if (res.success) {
  298. this.villageList = res.data.list
  299. this.total = res.data.total
  300. this.loading = false
  301. }
  302. })
  303. },
  304. //分页
  305. handleCurrentChange(val) {
  306. this.searchObj.pageNum = val;
  307. this.getVillageListByNode();
  308. },
  309. handleSizeChange(val) {
  310. this.searchObj.pageSize = val;
  311. this.pageSize = val
  312. this.getVillageListByNode();
  313. },
  314. formatRadio(val) {
  315. if (val == '1') {
  316. return '是'
  317. } else {
  318. return '否'
  319. }
  320. },
  321. //-----------------------------------------------------------------
  322. // 督查成果
  323. ryCancelHandler() {
  324. this.ryInfoDialog = false;
  325. },
  326. //成果查看
  327. lookOver(row) {
  328. this.ryTitle = row.adnm;
  329. this.ryObjId = row.objId;
  330. this.ryEngId = row.engId;
  331. this.ryInfoDialog = true;
  332. if (this.$refs['ryRef']) {
  333. this.$refs['ryRef'].showDialog();
  334. }
  335. }
  336. },
  337. }
  338. </script>
  339. <style>
  340. #dcdxHeader {
  341. padding: 15px 20px;
  342. }
  343. #dxdcFooter {
  344. text-align: center;
  345. }
  346. #dxdcAside {
  347. border: 1px solid #d5d5ff;
  348. }
  349. .el-dialog__wrapper .el-treeWhite {
  350. /* max-height: 260px !important; */
  351. }
  352. </style>