91e34b83c4b015ff78513a2ff8c3826b982a6d7a.svn-base 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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="27" @treeNodeClickHandler="treeNodeClickHandler"></cg-left-tree>
  7. </el-aside>
  8. <!-- 主要窗口 -->
  9. <el-main id="dxdcListMainshzh" 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="shzhDataList"
  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="country" 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 align="center" label="操作" min-width="220" fixed="right">
  85. <template slot-scope="scope">
  86. <el-button
  87. size="mini"
  88. type="success"
  89. plain
  90. @click="fanghongInfo(scope.row)">查看
  91. </el-button>
  92. </template>
  93. </el-table-column>
  94. </el-table>
  95. <el-pagination background :pager-count="5" :current-page="pageIndex"
  96. :page-size="pageSize" :page-sizes="[10, 20, 30, 40, 50, 100]"
  97. layout="sizes, total, prev, pager, next" :total="total"
  98. @current-change="pageIndexChange" @size-change="handleSizeChange"
  99. ></el-pagination>
  100. </el-main>
  101. <!-- </el-container> -->
  102. <shanHongTianBao v-if="showshanHongTianBao" :rowData="rowData" :currentObjectRgstrId="currentObjectRgstrId"
  103. :currentResCode="currentResCode" :currentObjectId="currentObjectId"
  104. :currentObjectName="currentResName"
  105. :adCode="adCode"
  106. :adName="adName"
  107. @cancelHandler="cancelHandler"
  108. @addxinRenYinSuccess="addxinRenYinSuccess"></shanHongTianBao>
  109. </el-container>
  110. </div>
  111. </template>
  112. <script>
  113. import request from '@util/gw_ajax_request.js'
  114. import shanHongTianBao from "../../zongHeXinXiOl/components/popupWindow/shzh/shanHongTianBao"
  115. import cgLeftTree from "../dccg_lefttree.vue"
  116. export default {
  117. components: {
  118. shanHongTianBao: shanHongTianBao,
  119. cgLeftTree
  120. },
  121. props: [],
  122. data() {
  123. return {
  124. dateRange: [],
  125. lyjg: [],
  126. engScale: '',
  127. orgName: '',
  128. groupName: '',
  129. groupId: '',
  130. groups: [],
  131. // sttm:'',
  132. // ettm:'',
  133. adNameSearch: '',
  134. treeData: [],
  135. dxdcMainHeight: window.innerHeight - 304,
  136. testHeight: window.innerHeight - 111,
  137. shzhDataList: [],
  138. pageIndex: 1,
  139. pageSize: 20,
  140. total: 0,
  141. tableHeight: 0,
  142. currentResCode: '',
  143. currentResName: '',
  144. currentObjectId: '',
  145. currentObjectRgstrId: '',
  146. currentObjectInfoObject: null,
  147. showshanHongTianBao: false,
  148. currentAdCode: '',
  149. currentNodeId: '',
  150. adName: '',
  151. adCode: '',
  152. rsvrName: '',
  153. dcType: '',
  154. sjState: '',
  155. rowData: '',
  156. disabled: true,
  157. showshanHongTianBaoPl: false,
  158. downIcon: 'el-icon-download',
  159. expLoading: false,
  160. dataStat: '',
  161. name: '',
  162. state: '',
  163. adCodes: []
  164. };
  165. },
  166. mounted() {
  167. this.$nextTick(function () {
  168. this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 50;
  169. let _self = this;
  170. window.onresize = function () {
  171. _self.tableHeight = window.innerHeight - _self.$refs.table.$el.offsetTop - 50
  172. }
  173. })
  174. this.getShzhDataList();
  175. },
  176. watch: {
  177. currentNodeId(n, o) {
  178. this.getShzhDataList();
  179. },
  180. adCodes(val) {
  181. if(val.length) this.getShzhDataList();
  182. }
  183. },
  184. methods: {
  185. getShzhDataList: function () {
  186. this.expLoading = true;
  187. let paramStartDate = '';
  188. let paramEndDate = '';
  189. if (this.dateRange && this.dateRange.length > 1 && this.dateRange[0] != '' && this.dateRange[1] != '') {
  190. paramStartDate = this.dateRange[0];
  191. paramEndDate = this.dateRange[1];
  192. }
  193. let params = {
  194. "sttm": paramStartDate,
  195. "entm": paramEndDate,
  196. "pageSize": this.pageSize,
  197. "pageNum": this.pageIndex,
  198. "groupId": this.groupId,
  199. "rsName": this.name,
  200. "state": this.dcType,
  201. "pType": 27,
  202. "adName": this.adNameSearch,
  203. "presId": this.persId,
  204. "plnaId": this.currentNodeId,
  205. "adCodes": this.adCodes.toString()
  206. };
  207. request.post(`/bis/insp/mfdp/rgstr/findMfdpPage`, params).then(res => {
  208. if (res.success) {
  209. this.expLoading = false;
  210. if (res.data.list) {
  211. res.data.list.forEach((item) => {
  212. if (item.intm && item.uptm) {
  213. item.intm = item.intm.substr(0, 10);
  214. item.uptm = item.uptm.substr(0, 10);
  215. }
  216. })
  217. }
  218. this.shzhDataList = res.data.list;
  219. this.total = res.data.total;
  220. }
  221. })
  222. },
  223. onSubmit() {
  224. if(this.adCodes.length) this.getShzhDataList();
  225. },
  226. fanghongInfo(rowData) {
  227. var _self = this;
  228. _self.rowData = rowData;
  229. _self.currentObjectId = this.rowData.objId;
  230. _self.currentObjectRgstrId = this.rowData.rgstrId;
  231. _self.currentResName = this.rowData.nm;
  232. _self.currentResCode = this.rowData.code;
  233. _self.adCode = this.rowData.adCode;
  234. _self.adName = this.rowData.adName;
  235. _self.showshanHongTianBao = true;
  236. },
  237. cancelHandler() {
  238. this.showshanHongTianBao = false;
  239. this.getShzhDataList();
  240. },
  241. pageIndexChange(val) {
  242. console.log(val);
  243. this.pageIndex = val;
  244. this.getShzhDataList();
  245. },
  246. handleSizeChange(val) {
  247. this.pageSize = val;
  248. this.getShzhDataList();
  249. },
  250. treeNodeClickHandler(data) {
  251. this.adCodes = data;
  252. },
  253. },
  254. };
  255. </script>
  256. <style>
  257. .el-table .warning-row {
  258. background: oldlace;
  259. }
  260. .el-table .success-row {
  261. background: #f0f9eb;
  262. }
  263. #dxdcListMainshzh {
  264. overflow-y: hidden;
  265. }
  266. </style>