4c6a6bf24d0dc19ff3654341dede17828954c107.svn-base 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  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. <cg-left-tree orgType="26" @treeNodeClickHandler="treeNodeClickHandler"></cg-left-tree>
  7. </el-aside>
  8. <!-- 主要窗口 -->
  9. <el-main id="dxdcListMaintdfj" style="padding:5px 20px;">
  10. <el-row>
  11. <el-col :span="24">
  12. <el-form :inline="true" size="mini" class="demo-form-inline" style="padding-left: 10px;">
  13. <el-form-item label="督查状态">
  14. <el-select v-model="dcType" clearable placeholder="督查状态">
  15. <el-option label="未督查" value="0"></el-option>
  16. <el-option label="督查中" value="1"></el-option>
  17. <el-option label="已督查" value="2"></el-option>
  18. </el-select>
  19. </el-form-item>
  20. <el-form-item label="项目名称">
  21. <el-input v-model="name" placeholder="项目名称" clearable></el-input>
  22. </el-form-item>
  23. <el-form-item label="督查时间">
  24. <div style="display: flex;">
  25. <el-date-picker
  26. v-model="dateRange"
  27. type="daterange"
  28. value-format="yyyy-MM-dd"
  29. style="width:100%"
  30. range-separator="至"
  31. start-placeholder="开始日期"
  32. end-placeholder="结束日期"
  33. ></el-date-picker>
  34. </div>
  35. </el-form-item>
  36. <el-form-item style="float:right">
  37. <el-button type="primary" @click="onSubmit" icon="el-icon-search">查询</el-button>
  38. </el-form-item>
  39. </el-form>
  40. </el-col>
  41. </el-row>
  42. <el-table
  43. ref="table"
  44. border
  45. :height="tableHeight"
  46. :data="tdfjDataList"
  47. style="width: 100%"
  48. v-loading="expLoading">
  49. <el-table-column prop="nm" label="项目名称" min-width="130" align="center"
  50. fixed="left"></el-table-column>
  51. <el-table-column prop="province" label="省" v-if="isXj" show-overflow-tooltip min-width="100"
  52. align="center"></el-table-column>
  53. <el-table-column prop="city" :label="ownAdName" show-overflow-tooltip min-width="100"
  54. align="center"></el-table-column>
  55. <el-table-column prop="county" label="县" v-if="isXj" show-overflow-tooltip min-width="100"
  56. align="center"></el-table-column>
  57. <el-table-column prop="groupName" label="所在组" show-overflow-tooltip min-width="150"
  58. align="center"></el-table-column>
  59. <el-table-column prop="intm" label="创建时间" show-overflow-tooltip min-width="100"
  60. align="center"></el-table-column>
  61. <el-table-column
  62. prop="uptm"
  63. label="修改时间"
  64. align="center"
  65. min-width="100">
  66. </el-table-column>
  67. <el-table-column
  68. prop="state"
  69. label="督查状态"
  70. align="center"
  71. min-width="130">
  72. <template slot-scope="scope">
  73. <span
  74. style="padding: 3px 10px;background:#F56C6C;border-radius:15px;color:rgba(255,255,255,1)"
  75. v-if="scope.row.state == '0' || !scope.row.state">未督查</span>
  76. <span
  77. style="padding: 3px 10px;background:#FBB56D;border-radius:15px;color:rgba(255,255,255,1)"
  78. v-if="scope.row.state == '1'">督查中</span>
  79. <span
  80. style="padding: 3px 10px;background:#63C25E;border-radius:15px;color:rgba(255,255,255,1)"
  81. v-if="scope.row.state == '2'">已督查</span>
  82. </template>
  83. </el-table-column>
  84. <el-table-column
  85. prop="presState"
  86. label="水库总体情况"
  87. align="center"
  88. min-width="130">
  89. <template slot-scope="scope">
  90. <p style="cursor:pointer;color:#F56C6C;"
  91. v-if="scope.row.presState == 0 || !scope.row.presState">待填报</p>
  92. <p style="cursor:pointer;color:#67C23A" v-if="scope.row.presState == 1">未完成</p>
  93. <p style="cursor:pointer;color:#67C23A" v-if="scope.row.presState == 2">已完成</p>
  94. </template>
  95. </el-table-column>
  96. <el-table-column
  97. prop="runManageState"
  98. label="水库防洪调度和汛限水位执行"
  99. align="center"
  100. min-width="130">
  101. <template slot-scope="scope">
  102. <p style="cursor:pointer;color:#F56C6C;"
  103. v-if="scope.row.runManageState == 0 || !scope.row.runManageState">待填报</p>
  104. <p style="cursor:pointer;color:#67C23A" v-if="scope.row.runManageState == 1">未完成</p>
  105. <p style="cursor:pointer;color:#67C23A" v-if="scope.row.runManageState == 2">已完成</p>
  106. </template>
  107. </el-table-column>
  108. <el-table-column
  109. prop="projectState"
  110. label="存在问题原因分析及整改意见"
  111. align="center"
  112. min-width="130">
  113. <template slot-scope="scope">
  114. <p style="cursor:pointer;color:#F56C6C;"
  115. v-if="scope.row.projectState == 0 || !scope.row.projectState">待填报</p>
  116. <p style="cursor:pointer;color:#67C23A" v-if="scope.row.projectState == 1">未完成</p>
  117. <p style="cursor:pointer;color:#67C23A" v-if="scope.row.projectState == 2">已完成</p>
  118. </template>
  119. </el-table-column>
  120. <el-table-column align="center" label="操作" min-width="220" fixed="right">
  121. <template slot-scope="scope">
  122. <el-button
  123. size="mini"
  124. type="success"
  125. plain
  126. @click="fanghongInfo(scope.row)"
  127. >查看
  128. </el-button>
  129. </template>
  130. </el-table-column>
  131. </el-table>
  132. <el-pagination background :pager-count="5" :current-page="pageIndex"
  133. :page-size="pageSize" :page-sizes="[10, 20, 30, 40, 50, 100]"
  134. layout="sizes, total, prev, pager, next" :total="total"
  135. @current-change="pageIndexChange" @size-change="handleSizeChange"
  136. ></el-pagination>
  137. </el-main>
  138. <!-- </el-container> -->
  139. <fangHongChengGuo v-if="showfangHongChengGuo" :rowData="rowData"
  140. :currentObjectRgstrId="currentObjectRgstrId"
  141. :currentResCode="currentResCode" :currentObjectId="currentObjectId"
  142. :currentObjectName="currentResName"
  143. @cancelHandler="cancelHandler"
  144. @addxinRenYinSuccess="addxinRenYinSuccess"
  145. :currentDuchaTpe="currentDuchaTpe"></fangHongChengGuo>
  146. </el-container>
  147. </div>
  148. </template>
  149. <script>
  150. import request from '@util/gw_ajax_request.js'
  151. import fangHongChengGuo from "../../zongHeXinXiOl/components/popupWindow/skfh/fangHongTianBao"
  152. import cgLeftTree from "../dccg_lefttree.vue"
  153. export default {
  154. components: {
  155. fangHongChengGuo: fangHongChengGuo,
  156. cgLeftTree
  157. },
  158. props: [],
  159. data() {
  160. return {
  161. dateRange: [],
  162. lyjg: [],
  163. engScale: '',
  164. orgName: '',
  165. groupName: '',
  166. groupId: '',
  167. groups: [],
  168. // sttm:'',
  169. // ettm:'',
  170. adName: '',
  171. treeData: [],
  172. dxdcMainHeight: window.innerHeight - 304,
  173. testHeight: window.innerHeight - 111,
  174. tdfjDataList: [],
  175. pageIndex: 1,
  176. pageSize: 20,
  177. total: 0,
  178. tableHeight: 0,
  179. currentResCode: '',
  180. currentResName: '',
  181. currentObjectId: '',
  182. currentObjectRgstrId: '',
  183. currentObjectInfoObject: null,
  184. showfangHongChengGuo: false,
  185. currentAdCode: '',
  186. currentNodeId: '',
  187. rsvrName: '',
  188. dcType: '',
  189. sjState: '',
  190. rowData: '',
  191. disabled: true,
  192. showfangHongChengGuoPl: false,
  193. downIcon: 'el-icon-download',
  194. expLoading: false,
  195. dataStat: '',
  196. name: '',
  197. state: '',
  198. currentDuchaTpe: true,
  199. adCodes: []
  200. };
  201. },
  202. computed: {
  203. persId() {
  204. return localStorage.getItem("userid")
  205. ? localStorage.getItem("userid")
  206. : "1098101939614724096";
  207. },
  208. isAdmin: function () {
  209. return localStorage.getItem("isAdmin") ? localStorage.getItem("isAdmin") : ''
  210. },
  211. hasPriv() {
  212. return this.ownPriv
  213. }
  214. },
  215. mounted() {
  216. this.$nextTick(function () {
  217. this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 50;
  218. let _self = this;
  219. window.onresize = function () {
  220. _self.tableHeight = window.innerHeight - _self.$refs.table.$el.offsetTop - 50
  221. }
  222. })
  223. },
  224. watch: {
  225. currentNodeId(n, o) {
  226. this.getSkfhDataList();
  227. },
  228. adCodes(val) {
  229. if(val.length) this.getSkfhDataList();
  230. }
  231. },
  232. methods: {
  233. treeNodeClickHandler(data) {
  234. this.adCodes = data;
  235. },
  236. fanghongInfo(rowData) {
  237. var _self = this;
  238. this.rowData = rowData;
  239. _self.currentObjectRgstrId = this.rowData.id;
  240. _self.currentResCode = this.rowData.code;
  241. _self.currentResName = this.rowData.nm;
  242. _self.showfangHongChengGuo = true;
  243. },
  244. getSkfhDataList: function () {
  245. this.expLoading = true;
  246. let paramStartDate = '';
  247. let paramEndDate = '';
  248. if (this.dateRange && this.dateRange.length > 1 && this.dateRange[0] != '' && this.dateRange[1] != '') {
  249. paramStartDate = this.dateRange[0];
  250. paramEndDate = this.dateRange[1];
  251. }
  252. let params = {
  253. "sttm": paramStartDate,
  254. "entm": paramEndDate,
  255. "pageSize": this.pageSize,
  256. "pageNum": this.pageIndex,
  257. "groupId": this.groupId,
  258. "rsName": this.name,
  259. "state": this.dcType,
  260. "pType": 26,
  261. "adName": this.adName,
  262. "presId": this.persId,
  263. "plnaId": this.currentNodeId,
  264. "adCodes": this.adCodes.toString()
  265. };
  266. request.post(`/bis/insp/rsfco/rgstr/findRsfcoPage`, params).then(res => {
  267. if (res.success) {
  268. this.expLoading = false;
  269. if (res.data.list) {
  270. res.data.list.forEach((item) => {
  271. if (item.intm && item.uptm) {
  272. item.intm = item.intm.substr(0, 10);
  273. item.uptm = item.uptm.substr(0, 10);
  274. }
  275. })
  276. }
  277. this.tdfjDataList = res.data.list;
  278. this.total = res.data.total;
  279. }
  280. })
  281. },
  282. onSubmit() {
  283. if(this.adCodes.length) this.getSkfhDataList();
  284. },
  285. toAddMember(type, rowData) {
  286. var _self = this;
  287. this.rowData = rowData;
  288. console.log(rowData);
  289. _self.currentObjectId = this.rowData.objId;
  290. _self.currentObjectRgstrId = this.rowData.rgstrId;
  291. _self.currentResName = this.rowData.nm;
  292. _self.currentResCode = this.rowData.code;
  293. _self.showfangHongChengGuo = true;
  294. },
  295. cancelHandler() {
  296. this.showfangHongChengGuo = false;
  297. this.getSkfhDataList();
  298. },
  299. addxinRenYinSuccess() {
  300. this.getSkfhDataList();
  301. },
  302. deleteMember(obj) {
  303. console.log(obj);
  304. var _self = this;
  305. // /dc/insp/rsvrRgstr/delete/{id}
  306. this.$confirm('此操作将删除该条相关的所有已填报的信息和问题,确认删除该条数据吗?', '提示', {
  307. confirmButtonText: '确定',
  308. cancelButtonText: '取消',
  309. type: 'warning'
  310. }).then(() => {
  311. request.get(`/supervision/plan/cleanObjDataByObjId?objType=26&objId=${obj.objId}`).then((res) => {
  312. if (res.success) {
  313. _self.pageIndexChange();
  314. _self.$message.success('删除成功')
  315. } else {
  316. _self.$message.error(res.message)
  317. }
  318. });
  319. }).catch(() => {
  320. });
  321. },
  322. pageIndexChange(val) {
  323. console.log(val);
  324. this.pageIndex = val;
  325. this.getSkfhDataList();
  326. },
  327. handleSizeChange(val) {
  328. this.pageSize = val;
  329. this.getSkfhDataList();
  330. }
  331. },
  332. };
  333. </script>
  334. <style>
  335. .el-table .warning-row {
  336. background: oldlace;
  337. }
  338. .el-table .success-row {
  339. background: #f0f9eb;
  340. }
  341. #dxdcListMaintdfj {
  342. overflow-y: hidden;
  343. }
  344. </style>