This commit is contained in:
shijingjing
2022-02-07 15:38:27 +08:00
parent 17ecb93897
commit 2d4fe614c8
3 changed files with 45 additions and 43 deletions

View File

@@ -39,7 +39,7 @@
<h3>{{ item.value }}</h3>
<p>{{ item.label }}</p>
</div>
<AiEmpty v-if="!statisticsListMon.length" />
<AiEmpty v-if="!statisticsListMon.length"/>
</div>
</div>
</div>
@@ -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)
}

View File

@@ -103,7 +103,7 @@
<span class="label"><span class="tips"></span>{{ item.label }}</span>
<div class="value" @click="selectTime(item.formDbName)">
<span :class="form[item.formDbName] === '' ? 'color-999' : ''">{{
$dateFormat(form[item.formDbName], 'YYYY-MM-DD') || '请选择'
$dateFormat(form[item.formDbName], 'YYYY-MM-DD HH:mm') || '请选择'
}}</span>
<u-icon name="arrow-right" color="#cccccc" size="14"/>
</div>
@@ -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}`
}
}
}

View File

@@ -7,12 +7,6 @@
<div class="area-select">
<div class="select-content">
<div class="area-content">
<!-- <AiAreaPicker :areaId="user.areaId" v-model="areaId" @select="areaSelect" :name.sync="areaName">
<img src="./img/local-icon.png" alt="">
<span class="label" v-if="areaName">{{ areaName }}</span>
<span v-else>请选择</span>
<u-icon name="arrow-down" color="#666" size="24" />
</AiAreaPicker> -->
</div>
<div class="search-input" v-if="tabIndex">
<img src="./img/search-icon.png" alt="">
@@ -28,7 +22,6 @@
<div class="num-item" v-for="(item, index) in statisticsList" :key="index">
<h3>
{{item.value}}
</h3>
<p>{{item.label}}</p>
</div>
@@ -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()