scorestatisticsDialog.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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 :data="tableData" style="width: 100%" height="400px">
  27. <el-table-column label="序号" type="index" width="50">
  28. </el-table-column>
  29. <el-table-column prop="orgName" label="营业场所">
  30. </el-table-column>
  31. <el-table-column prop="orgTypeText" label="场所分类">
  32. </el-table-column>
  33. <el-table-column prop="orgScore" label="安全指数">
  34. </el-table-column>
  35. <el-table-column prop="levelName" label="安全等级">
  36. </el-table-column>
  37. </el-table>
  38. <pagination
  39. v-show="total > 0"
  40. :total="total"
  41. :page.sync="queryParams.page"
  42. :limit.sync="queryParams.size"
  43. @pagination="getDetailList"
  44. />
  45. </div>
  46. <div slot="footer" class="dialog-footer">
  47. <el-button @click="onHide">取消</el-button>
  48. <!-- <el-button type="primary" @click="onSubmit">确定</el-button> -->
  49. </div>
  50. </DialogCom>
  51. </div>
  52. </template>
  53. <script>
  54. import dayjs from "dayjs";
  55. import { mapGetters } from "vuex";
  56. import { detail } from "@/api/scorestatistics/scorestatistics.js";
  57. import { guid } from "@/utils/index.js";
  58. import {
  59. addTargetEvaluate,
  60. getEvaluateById,
  61. editTargetEvaluate,
  62. } from "@/api/evaluateRule/rule.js";
  63. export default {
  64. dicts: ["evaluate_cycle", "sys_org_type"],
  65. data() {
  66. return {
  67. tableData: [],
  68. id: null,
  69. isShow: false,
  70. total: 0,
  71. queryParams: {
  72. page: 1,
  73. size: 10,
  74. orgId: "",
  75. date: null,
  76. levelId: "",
  77. orgName: null,
  78. },
  79. };
  80. },
  81. props: {
  82. targetList: {
  83. type: Array,
  84. },
  85. },
  86. watch: {},
  87. mounted() {},
  88. methods: {
  89. onOrgTypeChanged() {},
  90. show(row) {
  91. let month=row.dataMonth+''
  92. this.queryParams.date = row.dataYear + "-" + (row.dataMonth<10? '0'+month:month);
  93. this.queryParams.orgName = row.orgName;
  94. this.queryParams.orgId = row.orgId;
  95. this.queryParams.levelId = row.levelId;
  96. this.tableData = [];
  97. this.getDetailList();
  98. },
  99. //获取分页数据
  100. getDetailList() {
  101. detail(this.queryParams).then((res) => {
  102. let { code, msg, rows } = res;
  103. if (code == 200) {
  104. this.tableData = rows||[];
  105. this.isShow = true;
  106. } else {
  107. this.$message.error(msg);
  108. }
  109. });
  110. },
  111. // 事件
  112. onHide() {
  113. this.$refs.form.resetFields();
  114. this.isShow = false;
  115. this.queryParams = {
  116. page: 1,
  117. size: 10,
  118. };
  119. this.tableData = [];
  120. },
  121. //打开前的回调
  122. openHandler() {},
  123. // 事件
  124. //apimark//
  125. },
  126. };
  127. </script>
  128. <style lang="scss" scoped>
  129. .brand_info {
  130. .el-form {
  131. width: 600px;
  132. padding-top: 40px;
  133. }
  134. }
  135. .form-item-comment {
  136. font-size: 12px;
  137. color: #999;
  138. height: 10px;
  139. }
  140. .el-select {
  141. width: 100%;
  142. }
  143. </style>