index.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="90px">
  4. <el-form-item label="企微公司" prop="corpId">
  5. <el-select v-model="queryParams.corpId" placeholder="企微公司" size="small" @change="updateCorpId()">
  6. <el-option
  7. v-for="dict in myQwCompanyList"
  8. :key="dict.dictValue"
  9. :label="dict.dictLabel"
  10. :value="dict.dictValue"
  11. />
  12. </el-select>
  13. </el-form-item>
  14. <el-form-item label="群名" prop="name">
  15. <el-input
  16. v-model="queryParams.name"
  17. placeholder="请输入群名"
  18. clearable
  19. size="small"
  20. @keyup.enter.native="handleQuery"
  21. />
  22. </el-form-item>
  23. <el-form-item>
  24. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  25. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  26. </el-form-item>
  27. </el-form>
  28. <el-table v-loading="loading" :data="transferLogList" border>
  29. <el-table-column label="群名" align="center" prop="name" >
  30. <template slot-scope="scope">
  31. <i class="el-icon-s-comment"></i>
  32. {{scope.row.name}}
  33. </template>
  34. </el-table-column>
  35. <el-table-column label="原群主(后台)" align="center" prop="oldCompanyUserName" />
  36. <el-table-column label="原群主(企微)" align="center" prop="oldQwUserName" />
  37. <el-table-column label="新群主(后台)" align="center" prop="newCompanyUserName" />
  38. <el-table-column label="新群主(企微)" align="center" prop="newQwUserName" />
  39. <el-table-column label="继承类型" align="center" prop="transferType" >
  40. <template slot-scope="scope">
  41. {{scope.row.transferType === 0 ? '在职继承' : '离职继承'}}
  42. </template>
  43. </el-table-column>
  44. <el-table-column label="操作人" align="center" prop="companyUserName" />
  45. <el-table-column label="操作时间" align="center" prop="createTime" />
  46. <el-table-column label="企微主体ID" align="center" prop="corpId" />
  47. </el-table>
  48. <pagination
  49. v-show="total>0"
  50. :total="total"
  51. :page.sync="queryParams.pageNum"
  52. :limit.sync="queryParams.pageSize"
  53. @pagination="getList"
  54. />
  55. </div>
  56. </template>
  57. <script>
  58. import { getMyQwCompanyList } from '@/api/qw/user'
  59. import { list } from '@/api/qw/groupChatTransferLog'
  60. export default {
  61. name: 'groupChatTransferLog',
  62. data() {
  63. return {
  64. loading: false,
  65. total: 0,
  66. queryParams: {
  67. corpId: null,
  68. name: null
  69. },
  70. myQwCompanyList: [],
  71. transferLogList: [],
  72. }
  73. },
  74. created() {
  75. this.getMyQwCompanyList();
  76. },
  77. methods: {
  78. getMyQwCompanyList() {
  79. getMyQwCompanyList().then(response => {
  80. this.myQwCompanyList = response.data;
  81. if(this.myQwCompanyList!=null){
  82. this.queryParams.corpId=this.myQwCompanyList[0].dictValue
  83. this.getList();
  84. }
  85. });
  86. },
  87. updateCorpId() {
  88. this.handleQuery()
  89. },
  90. handleQuery() {
  91. this.queryParams.pageNum = 1;
  92. this.getList();
  93. },
  94. getList() {
  95. this.loading = true;
  96. list(this.queryParams).then(response => {
  97. this.transferLogList = response.rows;
  98. this.total = response.total;
  99. this.loading = false;
  100. })
  101. },
  102. resetQuery() {
  103. this.resetForm("queryForm");
  104. this.queryParams.corpId= this.myQwCompanyList[0].dictValue
  105. this.handleQuery();
  106. }
  107. }
  108. }
  109. </script>
  110. <style scoped>
  111. </style>