This commit is contained in:
liuye
2022-02-11 10:05:13 +08:00
2 changed files with 46 additions and 24 deletions

View File

@@ -87,6 +87,14 @@
</div>
</div>
<div class="item" v-if="item.type == 'number'">
<span class="label"><span class="tips"></span>{{ item.label }}</span>
<div class="value">
<u-input type="number" placeholder="请输入" v-model="form[item.formDbName]" input-align="right"
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="item.maxlength" :clearable="false" />
</div>
</div>
<div class="item" v-if="item.type == 'select'">
<span class="label"><span class="tips"></span>{{ item.label }}</span>
<div class="value" @click="selectClick(item.dict, item.formDbName)">
@@ -155,9 +163,9 @@ export default {
list: [ // 残疾人
{
label: '家庭年收入(万)',
type: 'input',
type: 'number',
formDbName: 'income',
maxLength: 20
maxlength: 9
},
{
label: '婚姻情况',
@@ -189,9 +197,9 @@ export default {
list: [ // 精神病人
{
label: '家庭年收入',
type: 'input',
type: 'number',
formDbName: 'income',
maxLength: 20
maxlength: 9
},
{
label: '发病日期',
@@ -202,13 +210,13 @@ export default {
label: '监护人姓名',
type: 'input',
formDbName: 'helpName',
maxLength: 20
maxlength: 20
},
{
label: '监护人联系方式',
type: 'input',
type: 'number',
formDbName: 'helpPhone',
maxLength: 11
maxlength: 11
},
{
label: '目前危险等级',
@@ -230,7 +238,7 @@ export default {
label: '具体罪名',
type: 'input',
formDbName: 'crime',
maxLength: 20
maxlength: 20
},
{
label: '矫正类别',
@@ -291,13 +299,13 @@ export default {
label: '管控人姓名',
type: 'input',
formDbName: 'controlName',
maxLength: 20
maxlength: 20
},
{
label: '管控人联系方式',
type: 'input',
type: 'number',
formDbName: 'controlPhone',
maxLength: 11
maxlength: 11
},
{
label: '有无犯罪史',
@@ -325,7 +333,7 @@ export default {
label: '服刑场所',
type: 'input',
formDbName: 'place',
maxLength: 20
maxlength: 20
},
{
label: '危险性评估',
@@ -400,19 +408,21 @@ export default {
methods: {
getDetail() {
console.log(111);
if (!this.id) return
var urlList = ['app/appspecialdisabled/queryDetailById', 'app/appspecialmental/queryDetailById', 'app/appspecialadjustment/queryDetailById',
'app/appspecialdrug/queryDetailById', 'app/appspecialprison/queryDetailById']
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.$forceUpdate()
this.form = res.data
this.form.userType = this.index
this.$forceUpdate()
}
})
},

View File

@@ -53,7 +53,7 @@
</div>
<div class="user-info">
<p class="name">{{e.name}}
<span class="btn-icon">
<span class="btn-icon" v-if="userGird != 0">
<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>
@@ -67,7 +67,7 @@
<p class="text" v-if="!userList.length">{{'暂无' + item.dictName + '信息'}}</p>
</div>
</div>
<div class="footer" @click="toAdd">
<div class="footer" @click="toAdd" v-if="userGird != 0">
<div class="btn">新增特殊人群信息</div>
</div>
</div>
@@ -91,7 +91,8 @@ export default {
name: '',
typeList: [],
type: '',
current: 1
current: 1,
userGird: ''
}
},
computed: { ...mapState(['user']) },
@@ -102,6 +103,7 @@ export default {
this.areaName = this.user.areaName
this.getStatistic()
this.getUserList()
this.isGirdUser()
})
uni.$on('specialPeopleList', () => {
@@ -122,6 +124,17 @@ export default {
tabClick(index) {
this.tabIndex = index
},
isGirdUser() {
this.$http.post('/app/appgirdmemberinfo/checkLogOnUser').then((res) => {
// console.log(res);
if (res.code == 0) {
this.userGird = res.data.checkType
// if (res.data.checkType) {
// this.userGird = res.data.checkType
// }
}
})
},
getStatistic() {
this.statisticsList = []
this.statisticsListMon = []
@@ -175,7 +188,7 @@ export default {
// })
// this.userList[index].check = true
// }
console.log(item)
console.log(item);
this.type = item.dictValue
this.current = 1
this.userList = []
@@ -188,11 +201,11 @@ export default {
})
},
del(row,indexs) {
var delUrl = ['app/appspecialdisabled/delete','app/appspecialmental/delete',
'app/appspecialadjustment/delete','app/appspecialdrug/delete','app/appspecialprison/delete'
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'
// var idUrl='app/appspecialdisabled/delete'
// var id='c24aaff664a94fdd908a85c0237583bd'
this.$confirm('确定删除该数据?').then(() => {
uni.showLoading()
this.$http.post(delUrl[indexs],null, {params: {ids: row.id}}).then((res) => {
@@ -251,7 +264,6 @@ export default {
.select-content{
width: 100%;
padding: 24px 32px 24px 0;
border-bottom: 1px solid #D8DDE6;
display: flex;
justify-content: space-between;
font-family: PingFangSC-Regular, PingFang SC;