删除
This commit is contained in:
@@ -24,20 +24,20 @@
|
||||
<div class="item">
|
||||
<span class="label"><span class="tips">*</span>性别</span>
|
||||
<div class="value">
|
||||
<u-input placeholder="请输入" v-model="form.gender" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="15" :clearable="false" />
|
||||
<u-input disabled placeholder="请输入" v-model="form.gender" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="15" :clearable="false" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label"><span class="tips">*</span>出生日期</span>
|
||||
<div class="value">
|
||||
|
||||
<u-input type="text" placeholder="请输入" v-model="form.birth" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="19" :clearable="false" />
|
||||
<u-input type="text" disabled placeholder="请输入" v-model="form.birth" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="19" :clearable="false" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label"><span class="tips">*</span>联系电话</span>
|
||||
<div class="value">
|
||||
<u-input type="number" placeholder="请输入" v-model="form.phone" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="11" :clearable="false" />
|
||||
<u-input type="number" placeholder="请输入" v-model="form.phone" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="11" :clearable="false" @input="changePhone" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
@@ -59,7 +59,7 @@
|
||||
<div class="item">
|
||||
<span class="label"><span class="tips">*</span>所属网格</span>
|
||||
<div class="value">
|
||||
<u-input type="text" placeholder="请输入" v-model="form.girdName" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :clearable="false"/>
|
||||
<u-input type="text" placeholder="请输入" disabled v-model="form.girdName" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :clearable="false" @click="showGird=true"/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="this.form.userType != ''">
|
||||
@@ -97,6 +97,7 @@
|
||||
|
||||
<u-picker mode="time" v-model="dateShow" :params="deteParams" start-year="2010" @confirm="dateConfirm">请选择</u-picker>
|
||||
<u-select v-model="showSelect" :list="selectList" label-name="dictName" value-name="dictValue" @confirm="confirmSelect"/>
|
||||
<u-select v-model="showGird" :list="girdlist" label-name="dictName" value-name="dictValue" @confirm="confirmGirdSelect"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -253,7 +254,7 @@ export default {
|
||||
label: '戒毒情况',
|
||||
type: 'select',
|
||||
dict: 'appSpecialDebug',
|
||||
formDbName: 'houselivingStatus',
|
||||
formDbName: 'debug',
|
||||
},
|
||||
{
|
||||
label: '管控情况',
|
||||
@@ -336,23 +337,89 @@ export default {
|
||||
}
|
||||
],
|
||||
selectList: [],
|
||||
id:"",
|
||||
index:"",
|
||||
showGird:false,
|
||||
girdlist:[]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['user']),
|
||||
},
|
||||
created() {
|
||||
onLoad(o) {
|
||||
// console.log(o);
|
||||
this.$dict.load('appSpecialSituation', 'appSpecialPlacement', 'appSpecialDenger', 'appSpecialCrime',
|
||||
'appSpecialControl', 'appSpecialDebug', 'appSpecialDrug', 'appSpecialChangeType','appSpecialCure','appSpecialDengerLevel',
|
||||
'appSpecialDisableLevel','appSpecialDisableType','appSpecialHealth','appSpecialMarriage','appSpecialTypeFive').then(() => {
|
||||
}),
|
||||
this.gridName()
|
||||
if(o){
|
||||
this.id = o.id
|
||||
this.index = o.index
|
||||
this.getDetail()
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
document.title = '新增人员'
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
getDetail(){
|
||||
if(!this.id) return
|
||||
var urlList = ['app/appspecialdisabled/queryDetailById','app/appspecialmental/queryDetailById', 'app/appspecialadjustment/queryDetailById',
|
||||
'app/appspecialdrug/queryDetailById', 'app/appspecialprison/queryDetailById']
|
||||
|
||||
this.$http.post(urlList[this.index],null,{
|
||||
params: {
|
||||
id:this.id
|
||||
}
|
||||
}).then(({res}) => {
|
||||
console.log(res);
|
||||
if(res.code == 0 ){
|
||||
this.form = res
|
||||
// this.form.userType = this.index
|
||||
// this.form.name = res.data.name
|
||||
// this.form.idNumber = res.data.idNumber
|
||||
// this.form.gender=res.data.gender,
|
||||
// this.form.birth=res.data.birth,
|
||||
// this.form.phone=res.data.phone,
|
||||
// this.form.areaName=res.data.areaName,
|
||||
// this.form.address=res.data.address,
|
||||
// this.form.girdName=res.data.girdName,
|
||||
// this.form.areaId=res.data.areaId,
|
||||
// this.form.income=res.data.income,
|
||||
// this.form.marriage = res.data.marriage,
|
||||
// this.form.health = res.data.health
|
||||
// this.form.type = res.data.type
|
||||
// this.form.level= res.data.level
|
||||
// this.form.sickTime= res.data.sickTime
|
||||
// this.form.helpName= res.data.helpName
|
||||
// this.form.helpPhone= res.data.helpPhone
|
||||
// this.form.crime= res.data.crime
|
||||
// this.form.startTime= res.data.startTime
|
||||
// this.form.endTime= res.data.endTime
|
||||
// this.form.isCreateGroup= res.data.isCreateGroup
|
||||
// this.form.isRelease= res.data.isRelease
|
||||
// this.form.firstTime= res.data.firstTime
|
||||
// this.form.status= res.data.status
|
||||
// this.form.debug= res.data.debug
|
||||
// this.form.control= res.data.control
|
||||
// this.form.controlName= res.data.controlName
|
||||
// this.form.controlPhone= res.data.controlPhone
|
||||
// this.form.isSecond= res.data.isSecond
|
||||
// this.form.= res.data.
|
||||
// this.form.= res.data.
|
||||
// this.form.= res.data.
|
||||
// this.form.= res.data.
|
||||
// this.form.= res.data.
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
|
||||
changeIdNumber() {
|
||||
if(this.form.idNumber.length == 18){
|
||||
var people = this.$idCardNoUtil.getIdCardInfo(this.form.idNumber)
|
||||
@@ -366,11 +433,27 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
changePhone() {
|
||||
let regTel = /^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/
|
||||
if(!regTel.test(this.form.phone)){
|
||||
return this.$u.toast('请输入正确的手机号')
|
||||
}
|
||||
},
|
||||
confirmGirdSelect(e){
|
||||
this.form.girdId = e[0].value
|
||||
this.form.girdName=e[0].label
|
||||
},
|
||||
|
||||
gridName() {
|
||||
this.$http.post('app/appgirdmemberinfo/queryMyGirdListByLevel2AndUser').then(res => {
|
||||
console.log(res);
|
||||
// if(res.code == 0 ){
|
||||
// }
|
||||
if(res.code == 0 ){
|
||||
var list=[]
|
||||
res.data.map((e,index)=>{
|
||||
list.push({dictName:e.girdName,dictValue:index})
|
||||
})
|
||||
this.girdlist=list
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -411,12 +494,12 @@ export default {
|
||||
})
|
||||
},
|
||||
areaSelect(e){
|
||||
console.log(e);
|
||||
// console.log(e);
|
||||
this.form.areaId = e
|
||||
},
|
||||
|
||||
selectClick(dictName, formName) {
|
||||
console.log(dictName)
|
||||
// console.log(dictName)
|
||||
this.selectList = this.$dict.getDict(dictName)
|
||||
this.selectName = formName
|
||||
this.showSelect = true
|
||||
|
||||
@@ -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