recheck.vue 5.7 KB
Newer Older
xulili's avatar
xulili committed
1
<template>
xulili's avatar
xulili committed
2
  <!-- 账号禁用审核 -->
xulili's avatar
xulili committed
3
  <div class="recheck-wrapper height100">
xulili's avatar
xulili committed
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
    <div class="search-container">
      <el-form :inline="true" :model="form">
        <el-form-item>
          <el-input
            v-model="form.name"
            placeholder="请输入账号名称、提交人"
            suffix-icon="el-icon-search"
            clearable
          >
          </el-input>
        </el-form-item>
        <el-form-item>
          <el-select
            v-model="form.status"
            placeholder="请选择账号状态"
            clearable
          >
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <div class="btn-group">
            <el-button type="primary" @click="handleSubmit">查询</el-button>
            <el-button @click="handleReset">重置</el-button>
          </div>
        </el-form-item>
      </el-form>
      <div class="page-tip">
        <span class="page-tip-title">页面说明:</span>
        <span class="page-tips"
          >展示所有禁用账号的申请,审核通过后,该账号状态为禁用,无法在系统中使用</span
        >
xulili's avatar
xulili committed
41
      </div>
xulili's avatar
xulili committed
42 43 44 45 46 47 48 49 50 51 52
    </div>
    <div class="table-content">
      <check-table
        class="noAdd"
        :feildList="feildList"
        :list="list"
        @action="handleAction"
      />
      <party-pagination :page="page" @changePage="handleChangeCurrent" />
    </div>
    <reject-dialog ref="rejectDialog" @success="getPageList()" />
xulili's avatar
xulili committed
53 54 55
  </div>
</template>
<script>
xulili's avatar
xulili committed
56 57 58
import { partyPagination } from "@/components/index";
import checkTable from "./components/checkTable";
import { rejectDialog } from "./checkDialog/index";
xulili's avatar
xulili committed
59
export default {
xulili's avatar
xulili committed
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
  data() {
    return {
      form: {
        name: "",
        status: "",
      },
      options: [
        { label: "待初审", value: "TBC" },
        { label: "驳回", value: "REFUSED" },
        { label: "待复审", value: "TBCA" },
        { label: "通过", value: "APPROVED_FINAL" }
      ],
      feildList: [
        { prop: "content", label: "账号名称" },
        { prop: "orgName", label: "所在机构" },
        { prop: "userName", label: "提交人" },
        { prop: "createTime", label: "提交日期" },
        { prop: "status", label: "审核状态" },
        { prop: "", label: "操作", isEdit: true, width: 240 },
      ],
      list: [],
      activeRow: {},
      page: {
        _index: 1,
        _size: 10,
        total: 0,
      },
      type:'ACCOUNT',
xulili's avatar
xulili committed
88 89
      passStatus:'APPROVED_FINAL'
      //待初审 TBC, 驳回 REFUSED, 待复审 TBCA, 通过APPROVED_FINAL
xulili's avatar
xulili committed
90 91 92 93 94 95 96 97 98 99
    };
  },
  components: { partyPagination, checkTable, rejectDialog },
  mounted() {
    this.getFirstPageList();
  },
  methods: {
    // 查询数据
    handleSubmit() {
      this.getPageList();
xulili's avatar
xulili committed
100
    },
xulili's avatar
xulili committed
101 102 103 104
    handleReset() {
      this.form.name = "";
      this.form.status = "";
      this.getFirstPageList()
xulili's avatar
xulili committed
105 106
    },

xulili's avatar
xulili committed
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
    // 获取第一页数据列表
    getFirstPageList() {
      this.page._index = 1;
      this.getPageList();
    },
    getPageList() {
      let requestParams = {};
      requestParams._index = this.page._index;
      requestParams._size = this.page._size;
      requestParams.name = this.form.name;
      requestParams.status = this.form.status;
      this.$https(
        {
          method: "get",
          url: "audit/getUserList",
          authType: this.backToken,
xulili's avatar
xulili committed
123
        },
xulili's avatar
xulili committed
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
        requestParams
      )
        .then((res) => {
          if (res.status != 200) {
            this.getResWithOutData();
          } else {
            if (res.data.resultCode == 200) {
              this.list = res.data.data.records;
              this.page._size = res.data.data.size;
              this.page.total = res.data.data.total;
            } else {
              this.getResWithOutData();
            }
          }
        })
        .catch((err) => {
          console.log(err);
        });
    },
    // 页面返回值为空
    getResWithOutData() {
      this.list = [];
      this.page = {
        _index: 1,
        _size: 10,
        total: 0,
      };
    },
    handleAction(params) {
      this.activeRow = params.row;
      switch (params.type) {
        case "reject":
          this.handleRject();
          break;
        case "pass":
          this.handlePass();
          break;
        default:
          break;
      }
    },
    // 驳回
    handleRject() {
xulili's avatar
xulili committed
167
      this.$refs.rejectDialog.activeRow = this.activeRow;
xulili's avatar
xulili committed
168 169 170 171 172
      this.$refs.rejectDialog.dialogVisible = true;
    },
    // 通过
    handlePass() {
      let params = {};
xulili's avatar
xulili committed
173
      let _this = this
xulili's avatar
xulili committed
174
      params.id = this.activeRow.id;
xulili's avatar
xulili committed
175
      params.status = this.passStatus;
xulili's avatar
xulili committed
176
      params.type = this.type
xulili's avatar
xulili committed
177 178 179
      params.refItemId = this.activeRow.refItemId
      params.level = this.activeRow.status

xulili's avatar
xulili committed
180 181 182 183 184
      this.$https(
        {
          method: "put",
          url: "audit/update",
          authType: this.backToken,
xulili's avatar
xulili committed
185
        },
xulili's avatar
xulili committed
186
        //  _this.$qs.stringify(params)
xulili's avatar
xulili committed
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
        params
      )
        .then((res) => {
          if (res.status == 200) {
            if (res.data.resultCode == 200) {
              this.$message({
                type: "success",
                message: res.data.message,
              });
              this.getPageList();
            } else {
              this.$message.error(res.data.message);
            }
          } else {
            this.$message.error(res.data);
          }
        })
        .catch((err) => {
          console.log(res);
        });
    },
    // 翻页
    handleChangeCurrent() {
      this.page._index = val;
      this.getPageList();
    },
  },
};
xulili's avatar
xulili committed
215 216 217
</script>
<style lang="less" scoped>
</style>