scorestatisticsDialog.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <template>
  2. <div class="rule-type">
  3. <DialogCom
  4. @colse="onHide"
  5. title="查看"
  6. :visible.sync="isShow"
  7. width="1400px"
  8. destroy-on-close
  9. @open="openHandler"
  10. >
  11. <div class="page-body">
  12. <el-form
  13. :model="queryParams"
  14. size="small"
  15. ref="form"
  16. label-position="right"
  17. label-width="130px"
  18. label-prefix=":"
  19. :inline="true"
  20. >
  21. <el-form-item label="年月:"> {{ queryParams.date }}</el-form-item>
  22. <el-form-item label="机构名称:"
  23. >{{ queryParams.orgName }}
  24. </el-form-item>
  25. </el-form>
  26. <el-table v-loading="loading" :data="tableData" style="width: 100%" height="400px">
  27. <el-table-column label="序号" type="index" width="100">
  28. </el-table-column>
  29. <el-table-column prop="orgName" label="营业场所"> </el-table-column>
  30. <el-table-column prop="orgTypeText" label="场所分类">
  31. </el-table-column>
  32. <el-table-column prop="orgScore" label="安全指数"> </el-table-column>
  33. <el-table-column prop="levelName" label="安全等级"> </el-table-column>
  34. </el-table>
  35. <pagination
  36. v-show="total > 0"
  37. :total="total"
  38. :page.sync="queryParams.page"
  39. :limit.sync="queryParams.size"
  40. @pagination="getDetailList"
  41. />
  42. </div>
  43. <div slot="footer" class="dialog-footer">
  44. <!-- <el-button type="primary" @click="onSubmit">确定</el-button> -->
  45. <el-button @click="onHide">取消</el-button>
  46. </div>
  47. </DialogCom>
  48. </div>
  49. </template>
  50. <script>
  51. import { mapGetters } from "vuex";
  52. import { detail } from "@/api/scorestatistics/scorestatistics.js";
  53. export default {
  54. data() {
  55. return {
  56. tableData: [],
  57. id: null,
  58. isShow: false,
  59. total: 0,
  60. loading:false,
  61. queryParams: {
  62. page: 1,
  63. size: 10,
  64. orgId: "",
  65. date: null,
  66. levelId: "",
  67. orgName: null,
  68. },
  69. };
  70. },
  71. props: {
  72. targetList: {
  73. type: Array,
  74. },
  75. },
  76. watch: {},
  77. mounted() {},
  78. methods: {
  79. onOrgTypeChanged() {},
  80. show(row) {
  81. let month = row.dataMonth + "";
  82. this.queryParams.date =
  83. row.dataYear + "-" + (row.dataMonth < 10 ? "0" + month : month);
  84. this.queryParams.orgName = row.orgName;
  85. this.queryParams.orgId = row.orgId;
  86. this.queryParams.levelId = row.levelId;
  87. this.tableData = [];
  88. this.getDetailList();
  89. },
  90. //获取分页数据
  91. getDetailList() {
  92. this.loading=true
  93. detail(this.queryParams).then((res) => {
  94. let { code, msg, rows,total } = res;
  95. if (code == 200) {
  96. this.tableData = rows || [];
  97. this.total=total||0
  98. this.isShow = true;
  99. } else {
  100. this.$message.error(msg);
  101. }
  102. this.loading=false
  103. });
  104. },
  105. // 事件
  106. onHide() {
  107. this.$refs.form.resetFields();
  108. this.isShow = false;
  109. this.queryParams = {
  110. page: 1,
  111. size: 10,
  112. };
  113. this.tableData = [];
  114. },
  115. //打开前的回调
  116. openHandler() {},
  117. // 事件
  118. //apimark//
  119. },
  120. };
  121. </script>
  122. <style lang="scss" scoped>
  123. .brand_info {
  124. .el-form {
  125. width: 600px;
  126. padding-top: 40px;
  127. }
  128. }
  129. .form-item-comment {
  130. font-size: 12px;
  131. color: #999;
  132. height: 10px;
  133. }
  134. .el-select {
  135. width: 100%;
  136. }
  137. </style>