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

View File

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