2bf01a2abe5942d5e07e211bda865fbef3467d50.svn-base 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. <!-- -->
  2. <template>
  3. <div>
  4. <!-- 查询展示 -->
  5. <div :style="{'height':tableHeight1+'px'}">
  6. <el-table
  7. border
  8. :height="tableHeight"
  9. ref="multipleTable"
  10. :data="searchResult"
  11. tooltip-effect="dark"
  12. style="width: 100%"
  13. >
  14. <el-table-column align="center" type="index" label="序号" min-width="50" fixed>
  15. <template slot-scope="scope">{{ (currentPage - 1) * pageSize + (scope.$index + 1) }}</template>
  16. </el-table-column>
  17. <el-table-column
  18. header-align="center"
  19. align="center"
  20. min-width="100"
  21. prop="nm"
  22. label="督查对象名称"
  23. show-overflow-tooltip
  24. ></el-table-column>
  25. <el-table-column
  26. header-align="center"
  27. align="center"
  28. min-width="180"
  29. prop="inspPblmsName"
  30. label="问题类别"
  31. show-overflow-tooltip
  32. ></el-table-column>
  33. <!--<el-table-column-->
  34. <!--header-align="center"-->
  35. <!--align="center"-->
  36. <!--min-width="150"-->
  37. <!--prop="inspPblmName"-->
  38. <!--label="检查事项"-->
  39. <!--show-overflow-tooltip-->
  40. <!--&gt;</el-table-column>-->
  41. <el-table-column
  42. header-align="center"
  43. align="center"
  44. min-width="180"
  45. prop="inspPblmDesc"
  46. label="详细描述"
  47. show-overflow-tooltip
  48. ></el-table-column>
  49. <el-table-column
  50. header-align="center"
  51. align="center"
  52. min-width="60"
  53. prop="persName"
  54. label="上报人"
  55. ></el-table-column>
  56. <el-table-column
  57. prop="collTime"
  58. label="上报时间"
  59. :formatter="timestampToTime"
  60. sortable
  61. align="center"
  62. min-width="100"
  63. show-overflow-tooltip
  64. ></el-table-column>
  65. <el-table-column
  66. align="center"
  67. prop
  68. min-width="130"
  69. label="操作"
  70. fixed="right"
  71. >
  72. <template slot-scope="scope">
  73. <el-button icon="el-icon-view" title="查看详情"type="text" @click="showDetails(scope.row.pblmId)"></el-button>
  74. </template>
  75. </el-table-column>
  76. </el-table>
  77. <!-- 分页 -->
  78. <div>
  79. <el-pagination
  80. class="paginationCenter"
  81. background
  82. @size-change="handleSizeChange"
  83. @current-change="search"
  84. :current-page.sync="currentPage"
  85. :page-sizes="[10, 20, 50, 100]"
  86. :page-size="pageSize"
  87. layout="total, sizes, prev, pager, next, jumper"
  88. :total="total"
  89. ></el-pagination>
  90. </div>
  91. </div>
  92. <!-- 详情弹框 -->
  93. <el-dialog
  94. class="outerDialog custom_dialog"
  95. title="问题详情"
  96. v-if="supervisionDetailsVisible"
  97. :visible.sync="supervisionDetailsVisible"
  98. :append-to-body="true"
  99. >
  100. <supervision-details ref="xianqing" :problemId="currentProblemId" :objType="15"></supervision-details>
  101. <span slot="footer">
  102. <el-button style="margin-top:5px;" @click="supervisionDetailsVisible = false">返回</el-button>
  103. </span>
  104. </el-dialog>
  105. </div>
  106. </template>
  107. <script>
  108. //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
  109. //例如:import 《组件名称》 from '《组件路径》';
  110. import { findPageInfo} from "../../../../../api/duChaAPI.js";
  111. import request from "../../../../../utils/gw_ajax_request.js";
  112. export default {
  113. //import引入的组件需要注入到对象中才能使用
  114. components: {
  115. //详情页
  116. supervisionDetails: resolve => {
  117. require(["../../../../duChaWenTi/supervisionDetails_shuiku.vue"], resolve);
  118. }
  119. },
  120. props: ["activedName","currentResCode","currentObjectRgstrId","currentObjectName","szRuls","currentObjectId","showOrEdit","swhsId"],
  121. data() {
  122. //这里存放数据
  123. return {
  124. testHeight1: window.innerHeight * 0.6,
  125. tableHeight: window.innerHeight * .45,
  126. tableHeight1: window.innerHeight * .55,
  127. problemList:[],
  128. searchResult:[],
  129. loading: false,
  130. currentPage: 1,
  131. pageSize: 10,
  132. pageNum: 1,
  133. total: 0,
  134. supervisionDetailsVisible:false,
  135. currentProblemId: '',
  136. problemDeleteVisible: false,
  137. deleteId: '',
  138. editId: '',
  139. changeSupervisionVisible: false,
  140. showAddProblemDialog: false,
  141. rsvrRules: null,
  142. probId: '',
  143. };
  144. },
  145. //监听属性 类似于data概念
  146. computed: {
  147. persId() {
  148. return localStorage.getItem("userid") ? localStorage.getItem("userid") : "1098101939614724096";
  149. }
  150. },
  151. //生命周期 - 创建完成(可以访问当前this实例)
  152. created() {
  153. },
  154. //生命周期 - 挂载完成(可以访问DOM元素)
  155. mounted() {
  156. this.search();
  157. },
  158. //监控data中的数据变化
  159. watch: {
  160. },
  161. //方法集合
  162. methods: {
  163. handleSizeChange(pageSize) {
  164. this.pageSize = pageSize;
  165. this.search();
  166. },
  167. // 查询
  168. search() {
  169. this.loading = true;
  170. let _self = this;
  171. let data = {};
  172. // data["gateName"] = "";
  173. // data["inspPblmName"] = "";
  174. data["objType"] = "15";
  175. data["presId"] = _self.persId;
  176. data["pageNum"] = _self.currentPage;
  177. data["regid"] = _self.currentObjectRgstrId;
  178. data["pageSize"] = _self.pageSize;
  179. data["villType"] = "15";
  180. // data["codes"] = _self.currentResCode;
  181. findPageInfo(data).then(res => {
  182. _self.loading = false;
  183. if (res.success) {
  184. _self.searchResult = res.data.list;
  185. _self.total = res.data.total;
  186. } else {
  187. }
  188. });
  189. },
  190. timestampToTime(row, column) {
  191. var date = new Date(row.collTime);
  192. var Y = date.getFullYear() + "-";
  193. var M =
  194. (date.getMonth() + 1 < 10
  195. ? "0" + (date.getMonth() + 1)
  196. : date.getMonth() + 1) + "-";
  197. var D =
  198. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  199. var h =
  200. (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
  201. var m =
  202. date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
  203. return Y + M + D + h + m;
  204. },
  205. // 详情弹框
  206. showDetails(id) {
  207. this.currentProblemId = id;
  208. this.supervisionDetailsVisible = true;
  209. },
  210. },
  211. beforeCreate() {}, //生命周期 - 创建之前
  212. beforeMount() {}, //生命周期 - 挂载之前
  213. beforeUpdate() {}, //生命周期 - 更新之前
  214. updated() {}, //生命周期 - 更新之后
  215. beforeDestroy() {}, //生命周期 - 销毁之前
  216. destroyed() {}, //生命周期 - 销毁完成
  217. activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
  218. };
  219. </script>
  220. <style rel="stylesheet/scss" lang="scss" scoped>
  221. @import "../../../../duChaWenTi/base.css";
  222. @import url("/src/assets/iconfont/iconfont.css");
  223. @import url("/src/assets/css/mixin.scss");
  224. .upload-container {
  225. width: 100%;
  226. position: relative;
  227. .image-uploader {
  228. width: 35%;
  229. float: left;
  230. }
  231. .image-preview {
  232. width: 200px;
  233. height: 200px;
  234. position: relative;
  235. border: 1px dashed #d9d9d9;
  236. float: left;
  237. // margin-left: 50px;
  238. .image-preview-wrapper {
  239. position: relative;
  240. width: 100%;
  241. height: 100%;
  242. img {
  243. width: 100%;
  244. height: 100%;
  245. }
  246. }
  247. .image-preview-action {
  248. position: absolute;
  249. width: 100%;
  250. height: 100%;
  251. left: 0;
  252. top: 0;
  253. cursor: default;
  254. text-align: center;
  255. color: #fff;
  256. opacity: 0;
  257. font-size: 20px;
  258. background-color: rgba(0, 0, 0, 0.5);
  259. transition: opacity 0.3s;
  260. cursor: pointer;
  261. text-align: center;
  262. line-height: 200px;
  263. .el-icon-delete {
  264. font-size: 36px;
  265. }
  266. }
  267. &:hover {
  268. .image-preview-action {
  269. opacity: 1;
  270. }
  271. }
  272. }
  273. .image-app-preview {
  274. margin-bottom: 10px;
  275. width: 40vh;
  276. height: 180px;
  277. position: relative;
  278. border: 1px dashed #d9d9d9;
  279. float: left;
  280. // margin-left: 50px;
  281. .app-fake-conver {
  282. height: 44px;
  283. position: absolute;
  284. width: 100%; // background: rgba(0, 0, 0, .1);
  285. text-align: center;
  286. line-height: 64px;
  287. color: #fff;
  288. }
  289. }
  290. }
  291. .bottom {
  292. margin-top: 13px;
  293. line-height: 12px;
  294. }
  295. .button {
  296. padding: 0;
  297. float: right;
  298. }
  299. .image {
  300. width: 100%;
  301. display: block;
  302. }
  303. .clearfix:before,
  304. .clearfix:after {
  305. display: table;
  306. content: "";
  307. }
  308. .clearfix:after {
  309. clear: both;
  310. }
  311. #wenTiContainer_sk .el-tree-node {
  312. /* overflow: auto; */
  313. }
  314. #wenTiContainer_sk .el-tree-node > .el-tree-node__children {
  315. overflow: auto;
  316. }
  317. .shuiku .el-date-editor.el-input {
  318. min-width: 180px !important;
  319. }
  320. .shuiku .header {
  321. padding: 0px 10px;
  322. }
  323. .shuiku .el-row {
  324. margin-bottom: 5px;
  325. }
  326. .shuiku .content {
  327. margin: 10px;
  328. }
  329. /* .search .el-table>>>.el-tooltip {
  330. white-space: pre-wrap !important;
  331. line-height: 30px;
  332. font-size: 0;
  333. } */
  334. .shuiku .search >>> .el-table .el-button:nth-child(odd) {
  335. margin-left: 0 !important;
  336. }
  337. .custom_dialog .el-dialog {
  338. width: 60% !important;
  339. }
  340. .custom_dialog .scroll300 {
  341. max-height: 60vh !important;
  342. }
  343. .shuiku .el-tag + .el-tag {
  344. margin-left: 10px;
  345. }
  346. .shuiku .button-new-tag {
  347. margin-left: 10px;
  348. height: 28px;
  349. line-height: 28px;
  350. padding-top: 0;
  351. padding-bottom: 0;
  352. }
  353. .shuiku .input-new-tag {
  354. width: 90px;
  355. margin-left: 10px;
  356. vertical-align: bottom;
  357. }
  358. </style>