guhongwei 4 years ago
parent
commit
6d3128880b
2 changed files with 75 additions and 0 deletions
  1. 6 0
      src/router/index.js
  2. 69 0
      src/views/adminCenter/order/list.vue

+ 6 - 0
src/router/index.js

@@ -265,6 +265,12 @@ const web = [
         meta: { title: '创新券申领审核结果查看' },
         component: () => import('../views/adminCenter/policy/apply_info.vue'),
       },
+      {
+        path: '/adminCenter/order/list',
+        name: 'admin_order_list',
+        meta: { title: '服务订单' },
+        component: () => import('../views/adminCenter/order/list.vue'),
+      },
       {
         path: '/adminCenter/ticket',
         name: 'admin_ticket',

+ 69 - 0
src/views/adminCenter/order/list.vue

@@ -0,0 +1,69 @@
+<template>
+  <div id="list">
+    <el-row>
+      <el-col :span="24" class="main">
+        <el-col :span="24" class="one">
+          <data-table :fields="fields" :opera="opera" :data="list" :total="total" @query="search"> </data-table>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: policy } = createNamespacedHelpers('policy');
+export default {
+  name: 'list',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      list: [],
+      total: 0,
+      opera: [],
+      fields: [{ label: '订单号', prop: 'type' }],
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...policy(['query', 'update']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      const res = await this.query({ skip, limit, ...info });
+      if (this.$checkRes(res)) {
+        console.log(res);
+        // this.$set(this, `list`, res.data);
+        // this.$set(this, `total`, res.total);
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    type: {
+      deep: true,
+      immediate: true,
+      handler(val) {
+        this.search();
+      },
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  border-radius: 10px;
+  box-shadow: 0 0 5px #cccccc;
+  padding: 20px;
+}
+.main:hover {
+  box-shadow: 0 0 5px #409eff;
+}
+</style>