删除
This commit is contained in:
@@ -27,8 +27,8 @@
|
||||
<div class="num-content">
|
||||
<div class="num-item" v-for="(item, index) in statisticsList" :key="index">
|
||||
<h3>
|
||||
<!-- {{item.value}} -->
|
||||
{{ $dict.getLabel('appSpecialTypeFive', item.value) }}
|
||||
{{item.value}}
|
||||
|
||||
</h3>
|
||||
<p>{{item.label}}</p>
|
||||
</div>
|
||||
@@ -49,7 +49,9 @@
|
||||
<div v-else>
|
||||
<div class="item-content" v-for="(item, index) in userList" :key="index">
|
||||
<div class="title" @click="showUserType(index)">
|
||||
<h2>{{item.label}}</h2>
|
||||
<h2>
|
||||
{{ $dict.getLabel('appSpecialTypeFive', item.label) }}
|
||||
</h2>
|
||||
<img src="./img/down-icon.png" alt="" :class="item.check ? 'img-active' : ''">
|
||||
</div>
|
||||
<div class="user-list" v-if="item.check">
|
||||
@@ -60,8 +62,8 @@
|
||||
<div class="user-info">
|
||||
<p class="name">{{e.name}}
|
||||
<span class="btn-icon">
|
||||
<img src="./img/edit-icon.png" alt="" @click="toEdit(e)">
|
||||
<img src="./img/del-icon.png" alt="" @click="del(e)">
|
||||
<img src="./img/edit-icon.png" alt="" @click="toEdit(e,item.label)">
|
||||
<img src="./img/del-icon.png" alt="" @click="del(e,item.label)">
|
||||
</span>
|
||||
</p>
|
||||
<div class="phone">
|
||||
@@ -70,7 +72,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text" v-if="!item.value.length">{{'暂无' + item.label + '信息'}}</p>
|
||||
<p class="text" v-if="!item.value.length">{{'暂无' + $dict.getLabel('appSpecialTypeFive', item.label) + '信息'}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer" @click="toAdd">
|
||||
@@ -163,6 +165,7 @@ export default {
|
||||
check: false
|
||||
}
|
||||
this.userList.push(obj)
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -192,16 +195,20 @@ export default {
|
||||
}
|
||||
|
||||
},
|
||||
toEdit(row) {
|
||||
uni.navigateTo({url: `./add?id=${row.id}`})
|
||||
toEdit(row,index) {
|
||||
uni.navigateTo({url: `./add?id=${row.id}&index=${index}`})
|
||||
},
|
||||
del(row) {
|
||||
del(row,indexs) {
|
||||
console.log(indexs);
|
||||
var delUrl = ['app/appspecialdisabled/delete','app/appspecialmental/delete',
|
||||
'app/appspecialadjustment/delete','app/appspecialdrug/delete','app/appspecialprison/delete'
|
||||
]
|
||||
var idUrl='app/appspecialdisabled/delete'
|
||||
var id='c24aaff664a94fdd908a85c0237583bd'
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
uni.showLoading()
|
||||
this.$http.post(delUrl[row.userType],{id: row.id}).then((res) => {
|
||||
this.$http.post(delUrl[indexs],null, {params: {ids: row.id}}).then((res) => {
|
||||
// this.$http.post(idUrl,{ids: row.id}).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$u.toast('删除成功!')
|
||||
this.getUserList()
|
||||
|
||||
Reference in New Issue
Block a user