瀏覽代碼

Merge branch 'master' of http://git.cc-lotus.info/financial_platform/admin-cms

reloaded 5 年之前
父節點
當前提交
1a4d3f9ea2
共有 3 個文件被更改,包括 8 次插入6 次删除
  1. 1 4
      src/layout/otheruser/otheruserList.vue
  2. 2 1
      src/views/otheruser/detail.vue
  3. 5 1
      src/views/otheruser/index.vue

+ 1 - 4
src/layout/otheruser/otheruserList.vue

@@ -13,7 +13,7 @@
           </el-table-column>
           </el-table-column>
           <el-table-column fixed="right" label="操作" align="center">
           <el-table-column fixed="right" label="操作" align="center">
             <template slot-scope="scope">
             <template slot-scope="scope">
-              <el-button @click="handleClick(scope.row)" type="text"><i class="el-icon-edit"></i></el-button>
+              <el-button @click="$router.push({ path: '/otheruser/detail', query: { id: scope.$index } })" type="text"><i class="el-icon-edit"></i></el-button>
               <el-button @click.native.prevent="deleteRow(scope.$index, debtTable)" type="text"><i class="el-icon-delete"></i></el-button>
               <el-button @click.native.prevent="deleteRow(scope.$index, debtTable)" type="text"><i class="el-icon-delete"></i></el-button>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
@@ -34,9 +34,6 @@ export default {
   created() {},
   created() {},
   computed: {},
   computed: {},
   methods: {
   methods: {
-    handleClick(id) {
-      this.$emit('handleClick', id);
-    },
     deleteRow(id) {
     deleteRow(id) {
       this.$emit('deleteRow', id);
       this.$emit('deleteRow', id);
     },
     },

+ 2 - 1
src/views/otheruser/detail.vue

@@ -41,10 +41,11 @@ export default {
     // 提交
     // 提交
     submitForm(form) {
     submitForm(form) {
       console.log(form);
       console.log(form);
+      this.resetForm();
     },
     },
     // 取消
     // 取消
     resetForm() {
     resetForm() {
-      console.log('返回');
+      this.$router.push({ path: '/otheruser/index' });
     },
     },
     // 返回
     // 返回
     goBack() {
     goBack() {

+ 5 - 1
src/views/otheruser/index.vue

@@ -8,7 +8,7 @@
         <searchInfo></searchInfo>
         <searchInfo></searchInfo>
       </el-col>
       </el-col>
       <el-col :span="24" class="main">
       <el-col :span="24" class="main">
-        <otheruserList :debtTable="debtTable"></otheruserList>
+        <otheruserList :debtTable="debtTable" @deleteRow="deleteRow"></otheruserList>
       </el-col>
       </el-col>
     </el-col>
     </el-col>
   </div>
   </div>
@@ -55,6 +55,10 @@ export default {
     clickBtn() {
     clickBtn() {
       this.$router.push({ path: '/otheruser/detail' });
       this.$router.push({ path: '/otheruser/detail' });
     },
     },
+    // 删除
+    deleteRow(id) {
+      console.log(id);
+    },
   },
   },
 };
 };
 </script>
 </script>