968507f605d07d7147eb866c41cf35df3e0f1ab1.svn-base 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497
  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. <tb-left-tree orgType="068" @treeNodeClickHandler="treeNodeClickHandler"
  7. @organList="getOrganList" @changeTabType="changeTabType"></tb-left-tree>
  8. </el-aside>
  9. <!-- 主要窗口 -->
  10. <el-main id="dxdcListMaintdfj" style="padding:5px 20px;">
  11. <el-row>
  12. <el-col :span="24">
  13. <el-form :inline="true" size="mini" class="demo-form-inline" style="padding-left: 10px;">
  14. <el-form-item label="督查状态">
  15. <el-select v-model="dcType" clearable placeholder="督查状态">
  16. <el-option label="未督查" value="0"></el-option>
  17. <el-option label="督查中" value="1"></el-option>
  18. <el-option label="已督查" value="2"></el-option>
  19. </el-select>
  20. </el-form-item>
  21. <el-form-item label="行政区名称">
  22. <addvSearch
  23. v-model="adName"
  24. :maxHeight='300'
  25. :maxWidth='250'
  26. :rootAddCode='"000000000000"'
  27. :level='"3"'
  28. :nameOrCode="'name'"
  29. ></addvSearch>
  30. </el-form-item>
  31. <el-form-item label="项目名称">
  32. <el-input v-model="name" placeholder="项目名称" clearable></el-input>
  33. </el-form-item>
  34. <el-form-item label="所在组">
  35. <el-autocomplete v-model="groupName" clearable value-key='nm'
  36. :fetch-suggestions="querySearchAsync" placeholder="请输入内容"
  37. @select="handleSelect"></el-autocomplete>
  38. </el-form-item>
  39. <el-form-item label="督查时间">
  40. <div style="display: flex;">
  41. <el-date-picker
  42. v-model="dateRange"
  43. type="daterange"
  44. value-format="yyyy-MM-dd"
  45. style="width:100%"
  46. range-separator="至"
  47. start-placeholder="开始日期"
  48. end-placeholder="结束日期"
  49. ></el-date-picker>
  50. </div>
  51. </el-form-item>
  52. <el-form-item style="float:right">
  53. <el-button type="primary" @click="onSubmit" icon="el-icon-search">查询</el-button>
  54. <el-button type="success" @click="reFresh" icon="el-icon-refresh">刷新</el-button>
  55. <!--<el-button type="success" style="float:right;margin-left:5px"-->
  56. <!--@click="showPlDialog"-->
  57. <!--icon="el-icon-upload2"-->
  58. <!--:disabled="disabled"-->
  59. <!--&gt;批量填报</el-button>-->
  60. <!--<el-button type="success" style="float:right;"-->
  61. <!--@click="downloadTemplate"-->
  62. <!--:icon="downIcon"-->
  63. <!--&gt;下载模板</el-button>-->
  64. </el-form-item>
  65. </el-form>
  66. </el-col>
  67. </el-row>
  68. <el-table
  69. ref="table"
  70. border
  71. :height="tableHeight"
  72. :data="tdfjDataList"
  73. style="width: 100%"
  74. v-loading="expLoading">
  75. <el-table-column prop="landName" label="督查对象名称" min-width="130" align="center"
  76. fixed="left"></el-table-column>
  77. <el-table-column prop="adName" label="行政区划名称" show-overflow-tooltip min-width="150"
  78. align="center"></el-table-column>
  79. <!--<el-table-column prop="loc" label="详细地址" show-overflow-tooltip min-width="100"-->
  80. <!--align="center"></el-table-column>-->
  81. <!--<el-table-column prop="city" :label="ownAdName" show-overflow-tooltip min-width="100"-->
  82. <!--align="center"></el-table-column>-->
  83. <!--<el-table-column prop="country" label="县" v-if="isXj" show-overflow-tooltip min-width="100"-->
  84. <!--align="center"></el-table-column>-->
  85. <el-table-column prop="groupName" label="所在组" show-overflow-tooltip min-width="150"
  86. align="center"></el-table-column>
  87. <el-table-column prop="intm" label="创建时间" show-overflow-tooltip min-width="100"
  88. align="center"></el-table-column>
  89. <el-table-column
  90. prop="uptm"
  91. label="修改时间"
  92. align="center"
  93. min-width="100">
  94. </el-table-column>
  95. <el-table-column
  96. prop="wtdstState"
  97. label="督查状态"
  98. align="center"
  99. min-width="130">
  100. <template slot-scope="scope">
  101. <span
  102. style="padding: 3px 10px;background:#F56C6C;border-radius:15px;color:rgba(255,255,255,1)"
  103. v-if="scope.row.state == '0' || !scope.row.state">未督查</span>
  104. <span
  105. style="padding: 3px 10px;background:#FBB56D;border-radius:15px;color:rgba(255,255,255,1)"
  106. v-if="scope.row.state == '1'">督查中</span>
  107. <span
  108. style="padding: 3px 10px;background:#63C25E;border-radius:15px;color:rgba(255,255,255,1)"
  109. v-if="scope.row.state == '2'">已督查</span>
  110. </template>
  111. </el-table-column>
  112. <el-table-column prop="behState" label="今年退地情况督查填报" align="center" min-width="170">
  113. <template slot-scope="scope">
  114. <p style="cursor:pointer;color:#F56C6C;"
  115. v-if="scope.row.curState == 0 || !scope.row.curState">待填报</p>
  116. <p style="cursor:pointer;color:#fbb56d" v-if="scope.row.curState == 1">未完成</p>
  117. <p style="cursor:pointer;color:#67C23A" v-if="scope.row.curState == 2">已完成</p>
  118. </template>
  119. </el-table-column>
  120. <el-table-column prop="behState" label="历年完成情况复查填报状态" align="center" min-width="170">
  121. <template slot-scope="scope">
  122. <p style="cursor:pointer;color:#F56C6C;"
  123. v-if="scope.row.behState == 0 || !scope.row.behState">待填报</p>
  124. <p style="cursor:pointer;color:#fbb56d" v-if="scope.row.behState == 1">未完成</p>
  125. <p style="cursor:pointer;color:#67C23A" v-if="scope.row.behState == 2">已完成</p>
  126. </template>
  127. </el-table-column>
  128. <el-table-column align="center" label="操作" min-width="220" fixed="right" v-if="hasPriv('manage')">
  129. <template slot-scope="scope">
  130. <el-button size="mini" type="success" v-if="!scope.row.rgstrId" plain
  131. @click="toAddMember('填报',scope.row)">填报
  132. </el-button>
  133. <el-button size="mini" type="success" v-if="scope.row.rgstrId" plain
  134. @click="toAddMember('编辑',scope.row)">编辑
  135. </el-button>
  136. <el-button size="mini" type="danger" plain @click="deleteMember(scope.row)">删除</el-button>
  137. <el-button size="mini" type="danger" plain @click="submitHandler(scope.row)">提交</el-button>
  138. </template>
  139. </el-table-column>
  140. </el-table>
  141. <el-pagination background :pager-count="5" :current-page="pageIndex"
  142. :page-size="pageSize" :page-sizes="[10, 20, 30, 40, 50, 100]"
  143. layout="sizes, total, prev, pager, next" :total="total"
  144. @current-change="pageIndexChange" @size-change="handleSizeChange"
  145. ></el-pagination>
  146. </el-main>
  147. <!-- </el-container> -->
  148. <tuidiJianshuiTianBao v-if="showtuidiJianshuiTianBao" :rowData="rowData"
  149. :currentObjectRgstrId="currentObjectRgstrId"
  150. :currentResCode="currentResCode" :currentObjectId="currentObjectId"
  151. :currentObjectName="currentResName"
  152. :openType="openType"
  153. @cancelHandler="cancelHandler"
  154. @addxinRenYinSuccess="addxinRenYinSuccess"></tuidiJianshuiTianBao>
  155. </el-container>
  156. <!-- 添加/编辑人员弹窗 -->
  157. </div>
  158. </template>
  159. <script>
  160. import request from '@util/gw_ajax_request.js'
  161. import {formatDateTime2} from '@util/gw_date.js'
  162. import provTreeList from "@widget/provTreeList.vue";
  163. import tuidiJianshuiTianBao from "./xjtdjs/tuidiJianshuiTianBao.vue"
  164. import addvSearch from "@widget/addvSearch.vue"
  165. import tbLeftTree from "./dctb_lefttree.vue"
  166. export default {
  167. components: {
  168. provTreeList: provTreeList,
  169. tuidiJianshuiTianBao: tuidiJianshuiTianBao,
  170. addvSearch,
  171. tbLeftTree
  172. },
  173. props: [],
  174. data() {
  175. return {
  176. tabType: "0",
  177. dateRange: [],
  178. lyjg: [],
  179. engScale: '',
  180. orgName: '',
  181. groupName: '',
  182. groupId: '',
  183. groups: [],
  184. adName: '',
  185. treeData: [],
  186. dxdcMainHeight: window.innerHeight - 304,
  187. testHeight: window.innerHeight - 111,
  188. tdfjDataList: [],
  189. pageIndex: 1,
  190. pageSize: 20,
  191. total: 0,
  192. tableHeight: 0,
  193. currentResCode: '',
  194. currentResName: '',
  195. currentObjectId: '',
  196. currentObjectRgstrId: '',
  197. currentObjectInfoObject: null,
  198. showtuidiJianshuiTianBao: false,
  199. currentAdCode: '',
  200. currentNodeId: '',
  201. rsvrName: '',
  202. dcType: '',
  203. sjState: '',
  204. rowData: '',
  205. disabled: true,
  206. showtuidiJianshuiTianBaoPl: false,
  207. downIcon: 'el-icon-download',
  208. expLoading: false,
  209. dataStat: '',
  210. name: '',
  211. state: '',
  212. openType: true
  213. };
  214. },
  215. computed: {
  216. persId() {
  217. return localStorage.getItem("userid")
  218. ? localStorage.getItem("userid")
  219. : "1098101939614724096";
  220. },
  221. isAdmin: function () {
  222. return localStorage.getItem("isAdmin") ? localStorage.getItem("isAdmin") : ''
  223. },
  224. hasPriv() {
  225. return this.ownPriv
  226. }
  227. },
  228. mounted() {
  229. this.$nextTick(function () {
  230. this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 50;
  231. let _self = this;
  232. window.onresize = function () {
  233. _self.tableHeight = window.innerHeight - _self.$refs.table.$el.offsetTop - 50
  234. }
  235. })
  236. this.getTdJsDataList();
  237. this.getAllGroup();
  238. },
  239. activated() {
  240. },
  241. watch: {
  242. currentNodeId(n, o) {
  243. this.getTdJsDataList();
  244. },
  245. groupName(n, o) {
  246. if (n == '') {
  247. this.groupId = '';
  248. }
  249. },
  250. },
  251. methods: {
  252. changeTabType(tabType) {
  253. this.tabType = tabType;
  254. this.currentNodeId = "";
  255. this.getAllGroup();
  256. this.getTdJsDataList();
  257. },
  258. reFresh() {
  259. this.currentNodeId = "";
  260. this.rsvrName = "";
  261. this.dcType = "";
  262. this.getTdJsDataList();
  263. },
  264. //获取所有的组
  265. getAllGroup() {
  266. var _self = this;
  267. request.get('/dc/user/getGroupByPersid', {
  268. params: {
  269. 'persid': this.persId,
  270. 'ptype': '068',
  271. 'tabType': this.tabType
  272. }
  273. }).then((res) => {
  274. if (res.success) {
  275. _self.groups = res.data;
  276. }
  277. })
  278. },
  279. querySearchAsync(queryString, cb) {
  280. var restaurants = this.groups;
  281. var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants;
  282. clearTimeout(this.timeout);
  283. this.timeout = setTimeout(() => {
  284. cb(results);
  285. }, 1500 * Math.random());
  286. },
  287. createStateFilter(queryString) {
  288. return (state) => {
  289. return (state.nm.toLowerCase().indexOf(queryString.toLowerCase()) != -1);
  290. };
  291. },
  292. handleSelect(item) {
  293. console.log(item);
  294. this.groupId = item.id;
  295. },
  296. getOrganList(data) {
  297. this.lyjg = data
  298. },
  299. treeNodeClickHandler(data) {
  300. this.currentNodeId = data.id;
  301. },
  302. provTreeSelectChangeHandler: function (params) {
  303. this.currentAdCode = params.likeCode;
  304. this.getTdJsDataList();
  305. },
  306. formatDate(row, column) {
  307. if (row.uptm) {
  308. return (dateFormat(row.uptm, 'yyyy-MM-dd'));
  309. }
  310. },
  311. getTdJsDataList: function () {
  312. this.expLoading = true;
  313. let paramStartDate = '';
  314. let paramEndDate = '';
  315. if (this.dateRange && this.dateRange.length > 1 && this.dateRange[0] != '' && this.dateRange[1] != '') {
  316. paramStartDate = this.dateRange[0];
  317. paramEndDate = this.dateRange[1];
  318. }
  319. let params = {
  320. "sttm": paramStartDate,
  321. "entm": paramEndDate,
  322. "pageSize": this.pageSize,
  323. "pageNum": this.pageIndex,
  324. "groupId": this.groupId,
  325. "name": this.name,
  326. "state": this.dcType,
  327. "pType": 68,
  328. "adName": this.adName,
  329. "presId": this.persId,
  330. "plnaId": this.currentNodeId,
  331. 'tabType': this.tabType
  332. };
  333. request.post(`/bis/insp/rlrw/findPage`, params).then(res => {
  334. if (res.success) {
  335. this.expLoading = false;
  336. if (res.data.list) {
  337. res.data.list.forEach((item) => {
  338. if (item.intm && item.uptm) {
  339. item.intm = formatDateTime2(item.intm).substr(0, 10);
  340. item.uptm = formatDateTime2(item.uptm).substr(0, 10);
  341. }
  342. })
  343. }
  344. this.tdfjDataList = res.data.list;
  345. this.total = res.data.total;
  346. this.$nextTick(() => {
  347. this.$refs.table.doLayout();
  348. });
  349. }
  350. })
  351. },
  352. onSubmit() {
  353. this.getTdJsDataList();
  354. },
  355. toAddMember(type, rowData) {
  356. var _self = this;
  357. this.rowData = rowData;
  358. console.log(rowData);
  359. _self.currentObjectId = this.rowData.objId;
  360. _self.currentObjectRgstrId = this.rowData.id;
  361. _self.currentResName = this.rowData.landName;
  362. _self.currentResCode = this.rowData.code;
  363. _self.showtuidiJianshuiTianBao = true;
  364. },
  365. cancelHandler() {
  366. this.showtuidiJianshuiTianBao = false;
  367. this.getTdJsDataList();
  368. },
  369. addxinRenYinSuccess() {
  370. this.getTdJsDataList();
  371. },
  372. deleteMember(obj) {
  373. console.log(obj);
  374. var _self = this;
  375. this.$confirm('此操作将删除该条相关的所有已填报的信息和问题,确认删除该条数据吗?', '提示', {
  376. confirmButtonText: '确定',
  377. cancelButtonText: '取消',
  378. type: 'warning'
  379. }).then(() => {
  380. request.get(`/supervision/plan/cleanObjDataByObjId?objType=68&objId=${obj.objId}`).then((res) => {
  381. if (res.success) {
  382. _self.pageIndexChange();
  383. _self.$message.success('删除成功')
  384. } else {
  385. _self.$message.error(res.message)
  386. }
  387. });
  388. }).catch(() => {
  389. });
  390. },
  391. submitHandler(rowData) {
  392. console.log(rowData)
  393. if (rowData.curState != 2) {
  394. this.$message({
  395. message: '今年退地情况督查填报!',
  396. type: 'warning'
  397. });
  398. return
  399. } else if (rowData.behState != 2) {
  400. this.$message({
  401. message: '历年完成情况复查填报状态!',
  402. type: 'warning'
  403. });
  404. return
  405. }
  406. var _self = this;
  407. this.$confirm('请确认所有信息填报完毕?', '提示', {
  408. confirmButtonText: '确定',
  409. cancelButtonText: '取消',
  410. type: 'warning'
  411. }).then(() => {
  412. let formObj = {
  413. "id": rowData.rgstrId,
  414. "state": "2"
  415. }
  416. request.post('/bis/insp/rlrw/update', formObj).then((res) => {
  417. if (res.success) {
  418. _self.addxinRenYinSuccess();
  419. _self.$message.success("提交成功");
  420. } else {
  421. _self.cancelHandler();
  422. }
  423. });
  424. }).catch(() => {
  425. });
  426. },
  427. pageIndexChange(val) {
  428. console.log(val);
  429. this.pageIndex = val;
  430. this.getTdJsDataList();
  431. },
  432. handleSizeChange(val) {
  433. this.pageSize = val;
  434. this.getTdJsDataList();
  435. },
  436. // 下载填报模板
  437. downloadTemplate() {
  438. this.downloadTemplateSet();
  439. this.disabled = false;
  440. },
  441. downloadTemplateSet() {
  442. let paramStartDate = '';
  443. let paramEndDate = '';
  444. if (this.dateRange && this.dateRange.length > 1 && this.dateRange[0] != '' && this.dateRange[1] != '') {
  445. paramStartDate = this.dateRange[0];
  446. paramEndDate = this.dateRange[1];
  447. }
  448. let href = `/pdcApi/bis/insp/fsc/pblm/downTemplate?fileName=pblmFsc.xlsx&adName=${this.adName}&name=${this.name}&state=${this.dcType}&entm=${paramEndDate}sttm=${paramStartDate}&presId=${this.persId}&startRow=1`;
  449. const a = document.createElement('a'); // 创建a标签
  450. a.setAttribute('download', '退地减水填报模板.xls');// download属性
  451. a.setAttribute('href', href);// href链接
  452. a.click();// 自执行点击事件
  453. },
  454. showPlDialog() {
  455. this.showtuidiJianshuiTianBaoPl = true
  456. },
  457. closePlDialog(val) {
  458. this.showtuidiJianshuiTianBaoPl = false
  459. },
  460. uploadSuccess() {
  461. this.showtuidiJianshuiTianBaoPl = false;
  462. this.getTdJsDataList();
  463. }
  464. },
  465. };
  466. </script>
  467. <style>
  468. .el-table .warning-row {
  469. background: oldlace;
  470. }
  471. .el-table .success-row {
  472. background: #f0f9eb;
  473. }
  474. #dxdcListMaintdfj {
  475. overflow-y: hidden;
  476. }
  477. </style>