yangll 4 лет назад
Родитель
Сommit
c87150aa92

+ 52 - 0
src/views/smscheck/TaskMain.vue

@@ -0,0 +1,52 @@
+<template>
+  <!-- 列表页 -->
+  <TaskList v-if="showType === 'list'"
+                    @goAdd="showAdd"
+                    @goImport="showImport"/>
+  <!-- 添加页 -->
+  <TaskAdd v-else-if="showType === 'add'"
+            @goList="showList"/>
+  <!-- 导入页 -->
+  <TaskImport v-else-if="showType === 'import'"
+            @goList="showList"/>
+</template>
+
+<script>
+
+  import TaskList from './modules/TaskList'
+  import TaskAdd from './modules/TaskAdd'
+  import TaskImport from './modules/TaskImport'
+
+  export default {
+    name: 'TaskMain',
+    components: {
+      TaskList,
+      TaskAdd,
+      TaskImport,
+    },
+    data () {
+      return {
+        description: '稽核任务管理主页面',
+        showType: 'list',
+      }
+    },
+    methods: {
+      // 显示列表页面
+      showList() {
+        this.showType = 'list'
+      },
+      // 显示添加页面
+      showAdd() {
+        this.showType = 'add'
+      },
+      // 显示导入页面
+      showImport() {
+        this.showType = 'import'
+      },
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 35 - 0
src/views/smscheck/modules/TaskAdd.vue

@@ -0,0 +1,35 @@
+<template>
+
+  <div>
+    <div>
+      <h1>添加页</h1>
+    </div>
+    <div>
+      <a-button type="primary" @click="showList">返回</a-button>
+    </div>
+  </div>
+
+</template>
+
+<script>
+
+export default {
+  name: 'TaskAdd',
+
+  data () {
+    return {
+      description: '添加页面'
+    }
+  },
+  methods: {
+    // 显示列表页面
+    showList() {
+      this.$emit('goList', true);
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 35 - 0
src/views/smscheck/modules/TaskImport.vue

@@ -0,0 +1,35 @@
+<template>
+
+  <div>
+    <div>
+      <h1>导入页</h1>
+    </div>
+    <div>
+      <a-button type="primary" @click="showList">返回</a-button>
+    </div>
+  </div>
+
+</template>
+
+<script>
+
+  export default {
+    name: 'TaskImport',
+
+    data () {
+      return {
+        description: '导入页面'
+      }
+    },
+    methods: {
+      // 显示列表页面
+      showList() {
+        this.$emit('goList', true);
+      },
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 40 - 0
src/views/smscheck/modules/TaskList.vue

@@ -0,0 +1,40 @@
+<template>
+
+  <div>
+    <div>
+      <h1>列表页</h1>
+    </div>
+    <div>
+      <a-button type="primary" @click="showAdd">添加</a-button>
+      <a-button type="primary" @click="showImport">导入</a-button>
+    </div>
+  </div>
+
+</template>
+
+<script>
+
+  export default {
+    name: 'TaskList',
+
+    data () {
+      return {
+        description: '列表页面'
+      }
+    },
+    methods: {
+      // 显示添加页面
+      showAdd() {
+        this.$emit('goAdd', true);
+      },
+      // 显示导入页面
+      showImport() {
+        this.$emit('goImport', true);
+      },
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>