This commit is contained in:
yanran200730
2021-12-09 19:45:17 +08:00
parent d5920bda7e
commit 04e7257476
2 changed files with 7 additions and 3 deletions

View File

@@ -8,7 +8,7 @@
</div> </div>
</ai-top-fixed> </ai-top-fixed>
<template v-if="list.length>0"> <template v-if="list.length>0">
<ai-card v-for="(e,index) in list" :key="index" @click.native="goDetail(e.id,1)"> <ai-card :ref="'aiCard' + index" v-for="(e,index) in list" :key="index" @click.native="goDetail(e.id,1)">
<template #custom> <template #custom>
<div flex> <div flex>
<b class="fill">{{ e.title }}</b> <b class="fill">{{ e.title }}</b>
@@ -20,7 +20,7 @@
</template> </template>
<template #menu> <template #menu>
<div class="menu" @tap.stop="goDetail(e.id)">编辑</div> <div class="menu" @tap.stop="goDetail(e.id)">编辑</div>
<div class="menu" @tap.stop="handleDelete(e.id)">删除</div> <div class="menu" @tap.stop="handleDelete(e.id, index)">删除</div>
</template> </template>
</ai-card> </ai-card>
<u-loadmore :status="loadmore" color="#999" font-size="24" <u-loadmore :status="loadmore" color="#999" font-size="24"
@@ -107,7 +107,8 @@ export default {
gotoAdd() { gotoAdd() {
this.root.goto({hash: "#add"}) this.root.goto({hash: "#add"})
}, },
handleDelete(ids) { handleDelete(ids, index) {
this.$refs[`aiCard${index}`][0].handleClose()
this.$confirm("是否要删除该调查走访").then(() => { this.$confirm("是否要删除该调查走访").then(() => {
this.$http.post("/app/appinterview/delete", null, { this.$http.post("/app/appinterview/delete", null, {
params: {ids} params: {ids}

View File

@@ -62,6 +62,9 @@ export default {
} }
} }
}, },
mounted() {
this.$refs.interviewForm.setRules(this.rules);
},
created() { created() {
this.searchDetail(); this.searchDetail();
}, },