Browse Source

后台系统增加审核页面

chaihaorui 1 year ago
parent
commit
ca5bc14110

+ 2 - 4
src/pages/homepage/components/cardWrap.vue

@@ -240,14 +240,12 @@ export default {
240 240
       },
241 241
       jumpToFilePage() {
242 242
         this.$router.push({
243
-          name: "file",
244
-          path: "/file"
243
+          name: "file",path: "/file"
245 244
         });
246 245
       },
247 246
       jumpToApplyPage() {
248 247
         this.$router.push({
249
-          name: "apply",
250
-          path: "/apply"
248
+          name: "apply", path: "/apply"
251 249
         });
252 250
       }
253 251
     }

+ 118 - 0
src/pages/index/audit.vue

@@ -0,0 +1,118 @@
1
+<template>
2
+  <div class="body-wrapper">
3
+    <el-table :data="tableData">
4
+      <el-table-column v-for="(item, index) in columns" :key="index" :label="item.label" :prop="item.key">
5
+      </el-table-column>
6
+      <el-table-column
7
+        label="操作"
8
+        width="100">
9
+        <template slot-scope="scope">
10
+            <el-button v-if="scope.row && scope.row.status === ''" @click="handleApply(scope.row)" type="text" size="small">审核</el-button>
11
+        </template>
12
+      </el-table-column>
13
+    </el-table>
14
+    <div class="table-pagination">
15
+      <el-pagination layout="prev, pager, next" :total="total" @current-change="handlePageChange"
16
+        :current-page.sync="pageNum" :page-size.sync="pageSize">
17
+      </el-pagination>
18
+    </div>
19
+    <el-dialog
20
+        title="审核"
21
+        :visible.sync="dialogVisible"
22
+        width="60%"
23
+        custom-class="audit-dialog">
24
+        <el-row class="mg-bt">
25
+            <el-col class="label" :span="4">审核:</el-col>
26
+            <el-col :span="18">
27
+                <el-radio v-model="radio" label="1">通过</el-radio>
28
+                <el-radio v-model="radio" label="2">驳回</el-radio>
29
+            </el-col>
30
+        </el-row>
31
+        <el-row class="mg-bt">
32
+            <el-col class="label" :span="4">审核意见:</el-col>
33
+            <el-col :span="18">
34
+                <el-input
35
+                    type="textarea"
36
+                    :rows="2"
37
+                    placeholder="请输入内容"
38
+                    v-model="textarea">
39
+                </el-input>
40
+            </el-col>
41
+        </el-row>
42
+        <span slot="footer" class="dialog-footer">
43
+            <el-button @click="dialogVisible = false">取 消</el-button>
44
+            <el-button type="primary" @click="handleConfirm">确 定</el-button>
45
+        </span>
46
+    </el-dialog>
47
+  </div>
48
+</template>
49
+<script>
50
+
51
+export default {
52
+    components: {},
53
+    data() {
54
+      return {
55
+        columns: [
56
+          {
57
+            label: '资源名称',
58
+            key: 'nameCh'
59
+          },
60
+          {
61
+            label: '资源类型',
62
+            key: 'nameEn'
63
+          },
64
+          {
65
+            label: '状态',
66
+            key: 'status'
67
+          }
68
+        ],
69
+        tableData: [],
70
+        total: 0,
71
+        pageSize: 10,
72
+        pageNum: 1,
73
+        radio: '1',
74
+        textarea: '',
75
+        dialogVisible: false
76
+      }
77
+    },
78
+    mounted() {
79
+    },
80
+    watch: {
81
+    },
82
+    methods: {
83
+      handlePageChange() {
84
+        console.log('enter handle page change')
85
+      },
86
+      handleApply(row) {
87
+        console.log('enter handle apply')
88
+      },
89
+      handleCancelApply(row) {
90
+        console.log('enter handle cancel apply')
91
+      },
92
+      handleConfirm() {
93
+        this.dialogVisible = false
94
+      }
95
+    }
96
+}
97
+</script>
98
+<style  lang="scss" scoped>
99
+.body-wrapper {
100
+  width: 100%;
101
+  padding: 20px;
102
+  .button-block{
103
+    text-align: right;
104
+    margin-bottom: 20px;
105
+  }
106
+  .table-pagination{
107
+    text-align: right;
108
+  }
109
+}
110
+.audit-dialog{
111
+    .mg-bt{
112
+        margin-bottom: 24px;
113
+    }
114
+    .label{
115
+        text-align: right;
116
+    }
117
+}
118
+</style>

+ 4 - 2
src/pages/index/components/searchPage.vue

@@ -451,8 +451,10 @@ export default {
451 451
       this.menuId = undefined
452 452
       this.currentPage = 1
453 453
     },
454
-    jumpToAudit () {
455
-
454
+    jumpToAudit() {
455
+      this.$router.push({
456
+        name: "audit",path: "/audit"
457
+      });
456 458
     }
457 459
   }
458 460
 };

+ 5 - 0
src/router/index.js

@@ -24,6 +24,11 @@ export default new Router({
24 24
           name: "entityDetail",
25 25
           path: "/entityDetail",
26 26
           component: () => import("../pages/index/components/entityDetail.vue")
27
+        },
28
+        {
29
+          name: "audit",
30
+          path: "/audit",
31
+          component: () => import("../pages/index/audit.vue")
27 32
         }
28 33
       ]
29 34
     }