diff --git a/src/apps/AppSpecialPeople/detail.vue b/src/apps/AppSpecialPeople/detail.vue index 6acbb078..495a9919 100644 --- a/src/apps/AppSpecialPeople/detail.vue +++ b/src/apps/AppSpecialPeople/detail.vue @@ -39,7 +39,7 @@

{{ item.value }}

{{ item.label }}

- + @@ -122,11 +122,12 @@ export default { getStatistic() { this.statisticsList = [] this.$http.post(`/app/appapplicationinfo/specialStatistic?areaId=${this.areaId}&type=0&range=0`).then((res) => { + console.log(res); if (res.code == 0) { - for (let i in res.data) { + for (let i in res.data.map) { var obj = { label: i, - value: res.data[i], + value: res.data.map[i], } this.statisticsList.push(obj) } @@ -136,11 +137,12 @@ export default { getStatisticMon() { this.statisticsListMon = [] this.$http.post(`/app/appapplicationinfo/specialStatistic?areaId=${this.areaId}&type=0&range=1`).then((res) => { + console.log(res); if (res.code == 0) { - for (let i in res.data) { + for (let i in res.data.monthMap) { var obj = { label: i, - value: res.data[i], + value: res.data.monthMap[i], } this.statisticsListMon.push(obj) } diff --git a/src/sass/AppSpecialPeople/add.vue b/src/sass/AppSpecialPeople/add.vue index a267d29c..b8909659 100644 --- a/src/sass/AppSpecialPeople/add.vue +++ b/src/sass/AppSpecialPeople/add.vue @@ -103,7 +103,7 @@ {{ item.label }}
{{ - $dateFormat(form[item.formDbName], 'YYYY-MM-DD') || '请选择' + $dateFormat(form[item.formDbName], 'YYYY-MM-DD HH:mm') || '请选择' }}
@@ -247,13 +247,13 @@ export default { { label: '是否建立矫正小组', type: 'select', - dict: 'isCreateGroup', + dict: 'yesOrNo', formDbName: 'isCreateGroup', }, { label: '是否托管', type: 'select', - dict: 'isRelease', + dict: 'yesOrNo', formDbName: 'isRelease', } ] @@ -505,7 +505,7 @@ export default { } var urlList = ['app/appspecialdisabled/addOrUpdate', 'app/appspecialmental/addOrUpdate', 'app/appspecialadjustment/addOrUpdate', - 'app/appspecialdrug/addOrUpdate', 'app/appspecialprison/addOrUpdate'] + 'app/appspecialdrug/addOrUpdate','app/appspecialprison/addOrUpdate'] this.$http.post(urlList[this.form.userType], { ...this.form, @@ -550,7 +550,7 @@ export default { this.dateShow = true }, dateConfirm(e) { - this.form[this.selectName] = `${e.year}-${e.month}-${e.day} 00:00:00` + this.form[this.selectName] = `${e.year}-${e.month}-${e.day}` } } } diff --git a/src/sass/AppSpecialPeople/detail.vue b/src/sass/AppSpecialPeople/detail.vue index a5c0df29..ce5ecfea 100644 --- a/src/sass/AppSpecialPeople/detail.vue +++ b/src/sass/AppSpecialPeople/detail.vue @@ -7,12 +7,6 @@
-
@@ -28,7 +22,6 @@

{{item.value}} -

{{item.label}}

@@ -105,11 +98,13 @@ export default { this.areaId = this.user.areaId this.areaName = this.user.areaName this.getStatistic() + this.getStatisticMon() this.getUserList() }) uni.$on('specialPeopleList', () => { this.getStatistic() + this.getStatisticMon() this.getUserList() }) }, @@ -121,6 +116,7 @@ export default { areaSelect(e) { this.areaId = e this.getStatistic() + this.getStatisticMon() this.getUserList() }, tabClick(index) { @@ -129,30 +125,32 @@ export default { getStatistic() { this.statisticsList = [] this.$http.post(`app/appspecialadjustment/statistic?type=0&range=0`).then((res) => { - // if (res.code == 0) { - // for(let i in res.data){ - // var obj = { - // label: i, - // value: res.data[i] - // } - // this.statisticsList.push(obj) - // } - // } + // console.log(res); + if (res.code == 0) { + for (let i in res.data.map) { + var obj = { + label: i, + value: res.data.map[i], + } + this.statisticsList.push(obj) + } + } }) }, getStatisticMon() { - // this.statisticsListMon = [] - // this.$http.post(`/app/appapplicationinfo/specialStatistic?areaId=${this.areaId}&type=0&range=1`).then((res) => { - // if (res.code == 0) { - // for(let i in res.data){ - // var obj = { - // label: i, - // value: res.data[i] - // } - // this.statisticsListMon.push(obj) - // } - // } - // }) + this.statisticsListMon = [] + this.$http.post(`app/appspecialadjustment/statistic?type=0&range=0`).then((res) => { + console.log(res); + if (res.code == 0) { + for(let i in res.data.monthMap){ + var obj = { + label: i, + value: res.data.monthMap[i] + } + this.statisticsListMon.push(obj) + } + } + }) }, getUserList() { this.userList = [] @@ -171,9 +169,6 @@ export default { }) }, toAdd() { - // this.$emit('change', { - // type: 'Add', - // }) uni.navigateTo({url: './add'}) }, idNumberInit(idNumber) { @@ -196,7 +191,13 @@ export default { }, toEdit(row,index) { - uni.navigateTo({url: `./add?id=${row.id}&index=${index}`}) + this.$confirm('确定编辑该数据?').then(() => { + uni.navigateTo({ + url: `./add?id=${row.id}&index=${index}` + }) + }).catch(() => { + }) + }, del(row,indexs) { console.log(indexs); @@ -208,7 +209,6 @@ export default { this.$confirm('确定删除该数据?').then(() => { uni.showLoading() 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()