index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <div class="app-container">
  3. <el-row :gutter="20">
  4. <!--用户数据-->
  5. <el-col style="display:flex" :span="20" :xs="24">
  6. <el-form :model="queryParams" ref="queryRef" :inline="true">
  7. <el-form-item label="企业信用代码" prop="unifiedSocialCreditCode">
  8. <el-input v-model="queryParams.unifiedSocialCreditCode" placeholder="请输入企业信用代码" clearable
  9. style="width: 240px" />
  10. </el-form-item>
  11. <el-form-item>
  12. <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
  13. <el-button icon="Refresh" @click="resetQuery">重置</el-button>
  14. </el-form-item>
  15. </el-form>
  16. </el-col>
  17. </el-row>
  18. <el-table stripe :data="tableData" style="width: 100%" height="710">
  19. <el-table-column prop="enterpriseName" label="企业名称">
  20. </el-table-column>
  21. <el-table-column label="企业信用代码">
  22. <template #default="scope">
  23. <el-link type="primary" @click="handleClick(scope.row)">{{ scope.row.unifiedSocialCreditCode }}</el-link>
  24. </template>
  25. </el-table-column>
  26. <!-- <el-table-column prop="total" label="总数">-->
  27. <!-- </el-table-column>-->
  28. <el-table-column label="总分" align="center" prop="total">
  29. <template #default="scope">
  30. {{ scope.row.total.toFixed(2) }}
  31. </template>
  32. </el-table-column>
  33. <el-table-column prop="grade" label="等级">
  34. </el-table-column>
  35. </el-table>
  36. <div style="position: fixed;bottom: 20px;right: 10px;">
  37. <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
  38. v-model:limit="queryParams.pageSize" @pagination="getList" />
  39. </div>
  40. </div>
  41. </template>
  42. <script setup name="getCerating">
  43. // import { getToken } from '@/utils/auth'
  44. import { getCreditScoreList } from '@/api/ceenterprise/cerating'
  45. import {useRouter} from "vue-router";
  46. const router = useRouter();
  47. const tableData = ref([])
  48. const handleClick = (row)=>{
  49. const {unifiedSocialCreditCode, enterpriseName} = row
  50. router.push({
  51. path: '/CEEnterprise/companydetail',
  52. query: {
  53. unifiedSocialCreditCode,
  54. enterpriseName
  55. }
  56. })
  57. }
  58. const total = ref(0)
  59. const data = reactive({
  60. form: {},
  61. queryParams: {
  62. pageNum: 1,
  63. pageSize: 20,
  64. unifiedSocialCreditCode: '',
  65. grade:null,
  66. total:null,
  67. condition:'AAA,AA,A'
  68. // userName: undefined,
  69. // phonenumber: undefined,
  70. // status: undefined,
  71. // deptId: store.state.user.userInfo.deptId
  72. },
  73. })
  74. const { queryParams } = toRefs(data)
  75. /** 搜索按钮操作 */
  76. function handleQuery() {
  77. queryParams.value.pageNum = 1;
  78. getList()
  79. }
  80. /** 重置按钮操作 */
  81. function resetQuery() {
  82. queryParams.value.unifiedSocialCreditCode = "";
  83. handleQuery()
  84. }
  85. /** 查询用户列表 */
  86. function getList() {
  87. getCreditScoreList(queryParams.value).then((res) => {
  88. tableData.value = res.data.result
  89. total.value = res.data.totalSize
  90. })
  91. }
  92. getList()
  93. </script>