permissionDetail.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <div class="container-remindDlg">
  3. <el-dialog title="权限详情" v-dialogDrag :visible.sync="isPermissionDetailShow" :close-on-click-modal="false" :modal-append-to-body="false" @close="cancelHandle" center width="800px">
  4. <CpessionTableEquity v-if="tableData.length" fromType="detail" :authList="tableData" style="margin-bottom: 20px" />
  5. <div style="margin: 20px 0" v-if="Points">
  6. <span>研选服务点数</span>
  7. <span>{{ Points }}</span>
  8. <span class="editsty" @click="lookNumber">明细>></span>
  9. </div>
  10. </el-dialog>
  11. <el-dialog title="研选服务点数明细" :visible.sync="isShowResearchNumber" width="80%" v-dialogDrag :close-on-click-modal="false" :modal-append-to-body="false" center @close="handleClose">
  12. <el-table style="margin-bottom: 30px" :data="tableListResearch" border height="500">
  13. <el-table-column align="center" prop="Content" label="事项"></el-table-column>
  14. <el-table-column align="center" prop="CreateTime" label="时间"></el-table-column>
  15. <el-table-column align="center" prop="RealName" label="参会人" width="150"></el-table-column>
  16. <el-table-column align="center" prop="minNumber" label="小计" width="100">
  17. <template slot-scope="{ row }">
  18. <span :style="{ color: row.BillDetailed > 0 ? '#31c640' : '#ec808d' }"> {{ row.BillDetailed > 0 ? "+" + row.BillDetailed : row.BillDetailed }}</span>
  19. </template>
  20. </el-table-column>
  21. <el-table-column align="center" prop="Points" label="合计" width="100"></el-table-column>
  22. </el-table>
  23. </el-dialog>
  24. </div>
  25. </template>
  26. <script>
  27. import { customInterence, equityContacts, raiInterface } from "@/api/api.js";
  28. import CpessionTableEquity from "./CpessionTableEquity.vue";
  29. export default {
  30. name: "",
  31. components: { CpessionTableEquity },
  32. props: {
  33. isPermissionDetailShow: {
  34. default: false,
  35. type: Boolean,
  36. },
  37. researchDetailId: {
  38. default: 0,
  39. type: Number,
  40. },
  41. },
  42. data() {
  43. return {
  44. tableData: [],
  45. isShowResearchNumber: false, // 研选服务点数明细 弹框
  46. tableListResearch: [], // 严选数据
  47. Points: "",
  48. };
  49. },
  50. computed: {},
  51. watch: {
  52. isPermissionDetailShow: {
  53. handler(newVal) {
  54. newVal && this.getDetailList();
  55. },
  56. },
  57. },
  58. created() {},
  59. mounted() {},
  60. methods: {
  61. // 弹框关闭的事件
  62. cancelHandle() {
  63. this.$emit("update:researchDetailId", 0);
  64. this.$emit("update:isPermissionDetailShow", false);
  65. this.tableData = [];
  66. },
  67. /* 获取客户详情 */
  68. async getDetailList() {
  69. this.tableData = [];
  70. const res = await customInterence.customDetail({
  71. CompanyId: this.researchDetailId,
  72. });
  73. if (res.Ret !== 200) return;
  74. this.Points = res.Data.RaiItem.Points || "";
  75. let auth = [];
  76. res.Data.RaiItem.PermissionList.forEach((item) => {
  77. let obj = {
  78. checkAll: item.CheckList && item.CheckList.length === item.Items.length ? true : false,
  79. isIndeterminate: item.CheckList && item.CheckList.length > 0 && item.CheckList.length < item.Items.length,
  80. ...item,
  81. };
  82. auth.push(obj);
  83. });
  84. this.tableData = auth;
  85. },
  86. // 查看
  87. lookNumber() {
  88. this.isShowResearchNumber = true;
  89. this.getDataList();
  90. },
  91. // 明细弹框关闭
  92. handleClose() {
  93. this.isShowResearchNumber = false;
  94. this.tableListResearch = [];
  95. },
  96. // 获取表格数据
  97. async getDataList() {
  98. const res = await raiInterface.activityPointsBill({
  99. CompanyId: this.researchDetailId,
  100. });
  101. if (res.Ret === 200) {
  102. this.tableListResearch = res.Data.List || [];
  103. }
  104. },
  105. },
  106. };
  107. </script>
  108. <style scoped lang="scss">
  109. .container-remindDlg {
  110. display: block;
  111. }
  112. </style>