index.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. <template>
  2. <el-dialog
  3. title="已关联证据"
  4. :visible.sync="dialogVisibleReport"
  5. :append-to-body="true"
  6. width="1000px"
  7. :before-close="handleClose"
  8. class="dialog_diy"
  9. >
  10. <el-table
  11. ref="multipleTable"
  12. :data="tableData"
  13. tooltip-effect="dark"
  14. style="width: 100%"
  15. border
  16. header-align="center"
  17. :header-cell-style="{
  18. background: '#E0EAFB',
  19. color: 'rgba(0, 0, 0, 0.90)'
  20. }"
  21. >
  22. <!-- <el-table-column type="selection" align="center" label="全选" width="55">
  23. </el-table-column> -->
  24. <el-table-column
  25. prop="create_at"
  26. label="创建时间"
  27. align="center"
  28. width="120"
  29. >
  30. <!-- <template slot-scope="scope">{{ scope.row.date }}</template> -->
  31. </el-table-column>
  32. <el-table-column
  33. prop="recordTit"
  34. label="观察内容"
  35. align="center"
  36. width="120"
  37. >
  38. </el-table-column>
  39. <el-table-column
  40. prop="place"
  41. label="观察地点"
  42. align="center"
  43. show-overflow-tooltip
  44. >
  45. </el-table-column>
  46. <el-table-column
  47. prop="tname"
  48. label="维度"
  49. align="center"
  50. show-overflow-tooltip
  51. >
  52. </el-table-column>
  53. <el-table-column
  54. prop="recordContent"
  55. label="内容"
  56. align="center"
  57. show-overflow-tooltip
  58. >
  59. </el-table-column>
  60. <!-- <el-table-column label="操作" align="center" width="175px">
  61. <template slot-scope="scope">
  62. <div class="evaluate">
  63. <div
  64. class="TableBtn"
  65. style="color: #3681fc"
  66. @click="updateCred(scope.row, 0)"
  67. >
  68. 查看
  69. </div>
  70. <div
  71. class="TableBtn"
  72. style="color: #3681fc"
  73. @click="updateCred(scope.row, 1)"
  74. >
  75. 修改
  76. </div>
  77. <div
  78. class="TableBtn"
  79. style="color: #ee3e3e"
  80. @click="delRecord(scope.row)"
  81. >
  82. 删除
  83. </div>
  84. </div>
  85. </template>
  86. </el-table-column> -->
  87. </el-table>
  88. <!-- 分页 -->
  89. <el-pagination
  90. @current-change="handleCurrentChange"
  91. background
  92. :page-size="8"
  93. layout="prev, pager, next"
  94. :total="total"
  95. class="pagination"
  96. >
  97. </el-pagination>
  98. </el-dialog>
  99. </template>
  100. <script>
  101. export default {
  102. props: {
  103. dialogVisibleReport: {
  104. type: Boolean,
  105. default: false
  106. },
  107. userid: {
  108. type: String
  109. },
  110. fid: {
  111. type: String
  112. },
  113. tid: {
  114. type: String
  115. },
  116. oid: {
  117. type: String
  118. },
  119. year: {
  120. type: String
  121. },
  122. cid: {
  123. type: String
  124. }
  125. },
  126. data() {
  127. return {
  128. // 表格数据
  129. tableData: [],
  130. // 总条数
  131. total: 0,
  132. // 当前页
  133. page: 1
  134. };
  135. },
  136. watch: {
  137. dialogVisibleReport(newVal) {
  138. if (newVal) {
  139. this.getData();
  140. }
  141. }
  142. },
  143. methods: {
  144. handleClose(done) {
  145. this.close();
  146. done();
  147. },
  148. close() {
  149. this.$emit("update:dialogVisibleReport", false);
  150. },
  151. // 获取数据
  152. getData() {
  153. // 获取筛选框数据
  154. let params = {
  155. uid: this.userid,
  156. cid: this.cid,
  157. cu: this.fid,
  158. cn: this.tid,
  159. cm: this.year,
  160. page: this.page
  161. };
  162. console.log(params);
  163. this.ajax
  164. .get(this.$store.state.api + "selectVeidooType", params)
  165. .then(res => {
  166. this.isLoading = false;
  167. this.tableData = res.data[0];
  168. this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
  169. // console.log(" 获取筛选数据", res);
  170. })
  171. .catch(err => {
  172. this.isLoading = false;
  173. console.error(err);
  174. });
  175. },
  176. // 切换页
  177. handleCurrentChange(val) {
  178. //当页数发生改变的时候调用获取列表数据请求
  179. // console.log(`当前页: ${val}`);
  180. this.page = val;
  181. this.getData();
  182. }
  183. },
  184. mounted() {
  185. // this.getData();
  186. }
  187. };
  188. </script>
  189. <style scoped>
  190. .dialog_diy {
  191. box-sizing: border-box;
  192. /* padding: 0 10px 10px 10px; */
  193. }
  194. .dialog_diy >>> .el-dialog {
  195. /* height: 100%; */
  196. margin: 10vh auto !important;
  197. }
  198. .dialog_diy >>> .el-dialog__header {
  199. background: #454545 !important;
  200. padding: 15px 20px;
  201. }
  202. .dialog_diy >>> .el-dialog__body {
  203. height: calc(100% - 124px);
  204. box-sizing: border-box;
  205. /* padding: 0px; */
  206. }
  207. .dialog_diy >>> .el-dialog__title {
  208. color: #fff;
  209. }
  210. .dialog_diy >>> .el-dialog__headerbtn {
  211. top: 19px;
  212. }
  213. .dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
  214. color: #fff;
  215. }
  216. .dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
  217. color: #fff;
  218. }
  219. .dialog_diy >>> .el-dialog__body,
  220. .dialog_diy >>> .el-dialog__footer {
  221. background: #fafafa;
  222. }
  223. .pagination {
  224. display: flex;
  225. justify-content: flex-end;
  226. padding: 20px;
  227. }
  228. </style>