浏览代码

volunteer list +

abpcoder 1 周之前
父节点
当前提交
be03067ce9
共有 1 个文件被更改,包括 110 次插入0 次删除
  1. 110 0
      src/views/career/zhiyuan/components/volunteerList.vue

+ 110 - 0
src/views/career/zhiyuan/components/volunteerList.vue

@@ -0,0 +1,110 @@
+<template>
+    <index-card title="志愿填报记录" class="vs-index-card">
+      <el-button slot="more" v-has-history size="small" round @click="$router.back()">返回</el-button>
+      <dynamic-table :rows="tableData" :columns="propDefines">
+        <template #temp="{row}">
+          <el-link :underline="false" type="primary" @click="goDetails(row)">详情</el-link>
+          <el-link :underline="false" type="danger" style="margin-left: 7px;" @click="delTableList(row)"> 删除
+          </el-link>
+        </template>
+      </dynamic-table>
+      <pagination
+        :total="examRecordTotal"
+        :auto-scroll="false"
+        :page.sync="tableParams.pageNum"
+        :limit.sync="tableParams.pageSize"
+        @pagination="onChangePage"
+      />
+    </index-card>
+</template>
+
+<script>
+import { delZytbRecord, selectZytbRecord } from '@/api/webApi/career-other'
+import IndexCard from '@/views/login/components/modules/shared/IndexCard'
+import LeftMiddleMenu from '@/views/login/components/menu/LeftMiddleMenu.vue'
+import DynamicTable from '@/components/dynamic-table/index.vue'
+import MxTransferMixin from '@/components/mx-transfer-mixin'
+import MxConst from '@/common/MxConst'
+
+export default {
+  name: 'VolunteerList',
+  components: { DynamicTable, LeftMiddleMenu, IndexCard },
+  mixins: [MxTransferMixin],
+  data() {
+    return {
+      propDefines: [{
+        prop: 'index',
+        label: '序号',
+        type: 'index'
+      }, {
+        prop: 'name',
+        label: '志愿表名称'
+      }, {
+        prop: 'batchName',
+        label: '批次'
+      }, {
+        prop: 'mode',
+        label: '科目'
+      }, {
+        prop: 'score',
+        label: '成绩'
+      }, {
+        prop: 'createTime',
+        label: '填报时间',
+        width: '180px'
+      }, {
+        prop: 'temp',
+        label: '操作',
+        slotBody: 'temp'
+      }],
+      examRecordTotal: 0,
+      tableParams: {
+        pageSize: 20,
+        pageNum: 1
+      },
+      tableData: [],
+      loading: false
+    }
+  },
+  created() {
+    this.getZytbRecord()
+  },
+  methods: {
+    goDetails(data) {
+      this.transferTo('/career/RecordDetail', data, null, false, MxConst.keys.keyVoluntaryDetail)
+    },
+    delTableList(data) {
+      this.$confirm(`是否确定删除-${data.name} ?`, '提示', {
+        confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning', closeOnClickModal: false
+      }).then(() => {
+        const params = {
+          id: data.id
+        }
+        delZytbRecord(params).then(res => {
+          this.getZytbRecord()
+          this.msgSuccess('删除成功')
+        })
+      }).catch(() => {
+      })
+    },
+    getZytbRecord() {
+      this.loading = true
+      console.log(this.tableParams)
+      selectZytbRecord(this.tableParams).then(res => {
+        this.examRecordTotal = res.total
+        this.loading = false
+        this.tableData = res.rows
+      })
+    },
+    onChangePage(page) {
+      this.tableParams.pageSize = page.limit
+      this.tableParams.pageNum = page.page
+      this.getZytbRecord()
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>