|
@@ -0,0 +1,78 @@
|
|
|
+<template>
|
|
|
+ <div id="list">
|
|
|
+ <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search"></data-table>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import dataTable from '@common/src/components/frame/filter-page-table.vue';
|
|
|
+import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: achieveApply } = createNamespacedHelpers('achieveApply');
|
|
|
+export default {
|
|
|
+ name: 'list',
|
|
|
+ props: {
|
|
|
+ status: { type: String, default: '0' },
|
|
|
+ },
|
|
|
+ components: { dataTable },
|
|
|
+ data: function() {
|
|
|
+ return {
|
|
|
+ opera: [
|
|
|
+ {
|
|
|
+ label: '查看申请',
|
|
|
+ method: 'view',
|
|
|
+ display: i => i.status === '0',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '修改申请',
|
|
|
+ method: 'edit',
|
|
|
+ display: i => i.status === '-1',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '查看意见',
|
|
|
+ method: 'view',
|
|
|
+ display: i => i.status === '-1',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ fields: [
|
|
|
+ { label: '成果编号', prop: 'basic.achieve_num', filter: 'input', showTip: true },
|
|
|
+ { label: '成果名称', prop: 'basic.achieve_name', showTip: true },
|
|
|
+ { label: '成果类别', prop: 'basic.achieve_type', showTip: true },
|
|
|
+ {
|
|
|
+ label: '状态',
|
|
|
+ prop: 'status',
|
|
|
+ format: item => {
|
|
|
+ return item === '0' ? '待审中' : item === '-1' ? '审核未通过' : '未识别';
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ list: [],
|
|
|
+ total: 0,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...achieveApply(['query']),
|
|
|
+ // 查询列表
|
|
|
+ async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
+ const res = await this.query({ skip, limit, status: this.status, user_id: this.user.id, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, 'list', res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user', 'menuParams']),
|
|
|
+ pageTitle() {
|
|
|
+ return `${this.$route.meta.title}`;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped></style>
|