44d75a8f858f06a196bc6f70e54d633bbe8c9dd7.svn-base 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  1. <template>
  2. <el-row>
  3. <el-col :span="24">
  4. <el-row>
  5. <el-col :span="24">
  6. <el-form :inline="true" size="mini" class="demo-form-inline" style="padding-left: 10px;">
  7. <el-form-item label="督查时间">
  8. <div style="display: flex;">
  9. <el-date-picker
  10. v-model="dateRange"
  11. type="daterange"
  12. value-format="yyyy-MM-dd"
  13. style="width:100%"
  14. range-separator="至"
  15. start-placeholder="开始日期"
  16. end-placeholder="结束日期"
  17. ></el-date-picker>
  18. </div>
  19. </el-form-item>
  20. <el-form-item>
  21. <el-button type="primary" @click="onSubmit1" icon="el-icon-search">查询</el-button>
  22. </el-form-item>
  23. </el-form>
  24. </el-col>
  25. </el-row>
  26. <el-card :body-style="{ 'padding': '0 5px' }">
  27. <el-main style="margin: 0 -5px;padding: 0">
  28. <el-table :data="tableList" style="width: 100%;" ref="singleTable" v-loading="tableLoading" border
  29. :height="dxdcMainHeight+'px'" tooltip-effect="dark">
  30. <el-table-column type="index" fixed min-width="80" :index="getIndex" label="序号"
  31. show-overflow-tooltip align="center"></el-table-column>
  32. <el-table-column align="center" show-overflow-tooltip prop="province" label="省" v-if="isXj"
  33. min-width="100"></el-table-column>
  34. <el-table-column align="center" show-overflow-tooltip prop="city" :label="ownAdName"
  35. min-width="100"></el-table-column>
  36. <el-table-column align="center" show-overflow-tooltip prop="county" label="县(区)"
  37. min-width="100"></el-table-column>
  38. <el-table-column align="center" show-overflow-tooltip prop="town" label="乡(镇)"
  39. min-width="100"></el-table-column>
  40. <el-table-column prop="villageNm" label="调查地点(*县*乡镇*村)" min-width="170" show-overflow-tooltip
  41. align="center">
  42. </el-table-column>
  43. <el-table-column align="center" sortable show-overflow-tooltip prop="visitDate" label="暗访日期"
  44. min-width="110"></el-table-column>
  45. <el-table-column prop="userNm" label="户主姓名" min-width="100" show-overflow-tooltip
  46. align="center"></el-table-column>
  47. <el-table-column prop="telphone" label="电话" min-width="100" show-overflow-tooltip
  48. align="center"></el-table-column>
  49. <!--水质-->
  50. <el-table-column label="水质" min-width="80" show-overflow-tooltip align="center">
  51. <el-table-column prop="isQualityGood" label="水质是否良好" min-width="100" show-overflow-tooltip
  52. align="center">
  53. <template slot-scope="scope">
  54. <span>{{formatBoo(scope.row.isQualityGood)}}</span>
  55. </template>
  56. </el-table-column>
  57. <el-table-column prop="isQualityProblem" label="是否存在问题" min-width="140"
  58. show-overflow-tooltip align="center">
  59. <template slot-scope="scope">
  60. <span>{{formatBoo(scope.row.isQualityProblem)}}</span>
  61. </template>
  62. </el-table-column>
  63. </el-table-column>
  64. <!--水量-->
  65. <el-table-column label="水量" min-width="100" show-overflow-tooltip align="center">
  66. <el-table-column prop="isSplyHome" label="是否供水入户" min-width="100" show-overflow-tooltip
  67. align="center">
  68. <template slot-scope="scope">
  69. <span>{{formatBoo(scope.row.isSplyHome)}}</span>
  70. </template>
  71. </el-table-column>
  72. <el-table-column prop="is24hSupply" label="是否24小时供水" min-width="130" show-overflow-tooltip
  73. align="center">
  74. <template slot-scope="scope">
  75. <span>{{formatBoo(scope.row.is24hSupply)}}</span>
  76. </template>
  77. </el-table-column>
  78. <el-table-column prop="isHrSupply" label="是否定时供水" min-width="130" show-overflow-tooltip
  79. align="center">
  80. <template slot-scope="scope">
  81. <span v-if="scope.row.is24hSupply == '0'">{{formatBoo(scope.row.isHrSupply)}}</span>
  82. </template>
  83. </el-table-column>
  84. <el-table-column prop="hrNote" label="备注" min-width="130" show-overflow-tooltip
  85. align="center">
  86. </el-table-column>
  87. <el-table-column prop="isWaterProblem" label="是否存在问题" min-width="100" show-overflow-tooltip
  88. align="center">
  89. <template slot-scope="scope">
  90. <span>{{formatBoo(scope.row.isWaterProblem)}}</span>
  91. </template>
  92. </el-table-column>
  93. </el-table-column>
  94. <!--水价收费-->
  95. <el-table-column label="水价收费" min-width="100" show-overflow-tooltip align="center">
  96. <el-table-column prop="isCalFee" label="是否计量收费" min-width="100" show-overflow-tooltip
  97. align="center">
  98. <template slot-scope="scope">
  99. <span>{{formatBoo(scope.row.isCalFee)}}</span>
  100. </template>
  101. </el-table-column>
  102. <el-table-column prop="waterFee" label="单位水价" min-width="100" show-overflow-tooltip
  103. align="center">
  104. </el-table-column>
  105. <el-table-column prop="isFeeProblem" label="是否存在问题" min-width="100" show-overflow-tooltip
  106. align="center">
  107. <template slot-scope="scope">
  108. <span>{{formatBoo(scope.row.isFeeProblem)}}</span>
  109. </template>
  110. </el-table-column>
  111. </el-table-column>
  112. <!--供水服务-->
  113. <el-table-column label="供水服务" min-width="150" show-overflow-tooltip align="center">
  114. <el-table-column prop="isSplyProblem" label="是否存在问题" min-width="150" show-overflow-tooltip
  115. align="center">
  116. <template slot-scope="scope">
  117. <span>{{formatBoo(scope.row.isSplyProblem)}}</span>
  118. </template>
  119. </el-table-column>
  120. </el-table-column>
  121. <el-table-column prop="evaluate" label="总体评价" min-width="100" show-overflow-tooltip
  122. align="center">
  123. <template slot-scope="scope">
  124. <span>{{formatEvaluate(scope.row.evaluate)}}</span>
  125. </template>
  126. </el-table-column>
  127. <el-table-column fixed="right" label="操作" align="center" width="160">
  128. <template slot-scope="scope">
  129. <el-button type="success" plain @click="lookOver(scope.row)">查看</el-button>
  130. </template>
  131. </el-table-column>
  132. </el-table>
  133. </el-main>
  134. <el-footer class="el-footer-style">
  135. <el-pagination style="text-align:center;" small background :current-page.sync="page.pageNum"
  136. :page-size="page.pageSize" :page-sizes="[10, 20, 30, 40, 50, 100]"
  137. layout="sizes, total,prev, pager, next,jumper" :total="showResultCount"
  138. @current-change="pageIndexChange" @size-change="handleSizeChange"></el-pagination>
  139. </el-footer>
  140. </el-card>
  141. </el-col>
  142. <!--督查成果查看-->
  143. <renyinProject v-if="ryInfoDialog" ref="ryRef" :ryTitle="ryTitle" :ryObjId="ryObjId" :ryEngId="ryEngId"
  144. @cancelHandler="ryCancelHandler"></renyinProject>
  145. </el-row>
  146. </template>
  147. <style>
  148. .form_label {
  149. font-family: 黑体;
  150. font-size: 15px;
  151. }
  152. hr {
  153. background-color: #f0f9eb;
  154. }
  155. .add-icon {
  156. color: #009cee;
  157. float: right;
  158. margin-right: 20px;
  159. font-size: 18px;
  160. cursor: pointer;
  161. }
  162. </style>
  163. <script>
  164. let evaluateOption = [{
  165. "label": "A-能饮用",
  166. "value": "A"
  167. }, {
  168. "label": "B-能基本饮用",
  169. "value": "B"
  170. }, {
  171. "label": "C-不能饮用",
  172. "value": "C"
  173. }];
  174. import request from '../../../utils/gw_ajax_request.js';
  175. export default {
  176. name: "wiuStatusTable",
  177. components: {
  178. renyinProject: resolve => {
  179. require(['../../../views/zongHeXinXiOl/components/popupWindow/renyin/main.vue'], resolve)
  180. },
  181. },
  182. props: ['engId', 'fengongxianCode', 'fenggongxianName', 'fengongxianObjCode', 'currentNodeType', 'lyjg', 'fengongxianAdCode', 'adCodes', 'groups'],
  183. data() {
  184. var checkTel = (rule, value, callback) => {
  185. if (value == '') {
  186. callback();
  187. }
  188. if (isNaN(value)) {
  189. callback(new Error('请输入合理电话'));
  190. }
  191. var isPhone = /^([0-9]{3,4}-)?[0-9]{7,8}$/; //座机
  192. var isMob = /^[1][3,4,5,6,7,8,9][0-9]{9}$/; // 手机号格式
  193. if (!isMob.test(value) && !isPhone.test(value)) {
  194. callback(new Error('请输入合理电话'));
  195. } else {
  196. callback();
  197. }
  198. };
  199. return {
  200. dateRange: [],
  201. groupId: '',
  202. lyjg1: [],
  203. groupName: '',
  204. sttm: '',
  205. ettm: '',
  206. searchObj: {
  207. pageNum: this.pageIndex,
  208. pageSize: this.pageSize,
  209. persId: "",
  210. chkComId: '',
  211. chkCom: '',
  212. groupNm: '',
  213. groupId: '',
  214. startDate: '',
  215. endDate: '',
  216. adCodes: []
  217. },
  218. autoInput: '请输入',
  219. tableList: [],
  220. tableLoading: false,
  221. dialogVisible: false,
  222. form: {
  223. villageNm: '',
  224. villageCode: '',
  225. userNm: '',
  226. telphone: '',
  227. cwsName: '',
  228. cwsCode: '',
  229. isQualityGood: '1',
  230. isQualityProblem: '1',
  231. isSplyHome: '1',
  232. is24hSupply: '1',
  233. isWaterProblem: '1',
  234. isCalFee: '1',
  235. isFeeProblem: '1',
  236. isSplyProblem: '1',
  237. evaluate: 'A',
  238. engId: this.engId,
  239. visitDate: '',
  240. recPersId: localStorage.getItem("userid"),
  241. status: '1',
  242. isHrSupply: '',
  243. hrNote: '',
  244. waterFee: '',
  245. centerX: 0,
  246. centerY: 0
  247. },
  248. rules: {
  249. telphone: [{
  250. // type: 'number'
  251. validator: checkTel,
  252. trigger: 'change',
  253. }],
  254. },
  255. page: {
  256. pageNum: 1,
  257. pageSize: 20,
  258. },
  259. showResultCount: 0,
  260. evaluateOption: evaluateOption,
  261. dxdcMainHeight: window.innerHeight - 310,
  262. dxdcAsideHeight: window.innerHeight - 90,
  263. isAddOrUpdate: '0',
  264. dialogShow: false,
  265. problemSmallType: '',
  266. jqmmButton: false,
  267. jqmmShow: false,
  268. imageShow: false,
  269. jqmmEngId: "",
  270. yshName: "",
  271. //督查成果
  272. ryInfoDialog: false,
  273. ryTitle: "",
  274. ryEngId: "",
  275. ryObjId: ""
  276. }
  277. },
  278. mounted() {
  279. this.searchObj.persId = this.userId;
  280. },
  281. computed: {
  282. userId: function () {
  283. return localStorage.getItem("userid")
  284. ? localStorage.getItem("userid")
  285. : "1098101939614724096";
  286. },
  287. },
  288. methods: {
  289. handleSelect(item) {
  290. console.log(item);
  291. this.groupId = item.id;
  292. },
  293. onSubmit1() {
  294. if (this.adCodes.length) {
  295. this.getTableListByNode();
  296. }
  297. },
  298. formatEvaluate(value) {
  299. switch (value) {
  300. case 'A':
  301. value = 'A-能饮用';
  302. break;
  303. case 'B':
  304. value = 'B-能基本饮用';
  305. break;
  306. case 'C':
  307. value = 'C-不能饮用';
  308. break;
  309. }
  310. return value;
  311. },
  312. getIndex(index) {
  313. return (index + this.page.pageSize * (this.page.pageNum - 1)) + 1
  314. },
  315. pageIndexChange(val) {
  316. this.page.pageNum = val;
  317. this.getTableListByNode();
  318. },
  319. handleSizeChange(val) {
  320. this.page.pageSize = val;
  321. this.getTableListByNode();
  322. },
  323. //根据节点id查列表
  324. getTableListByNode() {
  325. if (this.dateRange && this.dateRange.length > 1 && this.dateRange[0] != '' && this.dateRange[1] != '') {
  326. this.searchObj.startDate = this.dateRange[0];
  327. this.searchObj.endDate = this.dateRange[1];
  328. } else {
  329. delete this.searchObj['startDate'];
  330. delete this.searchObj['endDate'];
  331. }
  332. this.searchObj.pageNum = this.page.pageIndex
  333. this.searchObj.pageSize = this.page.pageSize
  334. this.searchObj.adCodes = this.adCodes.toString()
  335. this.searchObj.groupId = this.groupId
  336. // this.searchObj.adNm = this.fenggongxianName
  337. let paramsObj = this.searchObj
  338. request.post('/dc/insp/wateruserInfo/getPageByNodeId', paramsObj).then((res) => {
  339. if (res.success) {
  340. this.tableList = res.data.list
  341. this.showResultCount = res.data.total
  342. this.loading = false
  343. }
  344. })
  345. },
  346. formatBoo(val) {
  347. if (val == '1') {
  348. return '是'
  349. } else if (val == '0') {
  350. return '否'
  351. } else {
  352. return val
  353. }
  354. },
  355. //-----------------------------------------------------------------
  356. // 督查成果
  357. ryCancelHandler() {
  358. this.ryInfoDialog = false;
  359. },
  360. //成果查看
  361. lookOver(row) {
  362. // this.ryTitle = row.userNm;
  363. this.ryObjId = row.objId;
  364. this.ryEngId = row.engId;
  365. this.ryInfoDialog = true;
  366. if (this.$refs['ryRef']) {
  367. this.$refs['ryRef'].showDialog();
  368. }
  369. }
  370. },
  371. watch: {
  372. adCodes(n) {
  373. if (n.length) {
  374. this.getTableListByNode();
  375. }
  376. }
  377. }
  378. }
  379. </script>