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> <h3>{{ item.value }}</h3>
<p>{{ item.label }}</p> <p>{{ item.label }}</p>
</div> </div>
<AiEmpty v-if="!statisticsListMon.length" /> <AiEmpty v-if="!statisticsListMon.length"/>
</div> </div>
</div> </div>
</div> </div>
@@ -122,11 +122,12 @@ export default {
getStatistic() { getStatistic() {
this.statisticsList = [] this.statisticsList = []
this.$http.post(`/app/appapplicationinfo/specialStatistic?areaId=${this.areaId}&type=0&range=0`).then((res) => { this.$http.post(`/app/appapplicationinfo/specialStatistic?areaId=${this.areaId}&type=0&range=0`).then((res) => {
console.log(res);
if (res.code == 0) { if (res.code == 0) {
for (let i in res.data) { for (let i in res.data.map) {
var obj = { var obj = {
label: i, label: i,
value: res.data[i], value: res.data.map[i],
} }
this.statisticsList.push(obj) this.statisticsList.push(obj)
} }
@@ -136,11 +137,12 @@ export default {
getStatisticMon() { getStatisticMon() {
this.statisticsListMon = [] this.statisticsListMon = []
this.$http.post(`/app/appapplicationinfo/specialStatistic?areaId=${this.areaId}&type=0&range=1`).then((res) => { this.$http.post(`/app/appapplicationinfo/specialStatistic?areaId=${this.areaId}&type=0&range=1`).then((res) => {
console.log(res);
if (res.code == 0) { if (res.code == 0) {
for (let i in res.data) { for (let i in res.data.monthMap) {
var obj = { var obj = {
label: i, label: i,
value: res.data[i], value: res.data.monthMap[i],
} }
this.statisticsListMon.push(obj) this.statisticsListMon.push(obj)
} }

View File

@@ -103,7 +103,7 @@
<span class="label"><span class="tips"></span>{{ item.label }}</span> <span class="label"><span class="tips"></span>{{ item.label }}</span>
<div class="value" @click="selectTime(item.formDbName)"> <div class="value" @click="selectTime(item.formDbName)">
<span :class="form[item.formDbName] === '' ? 'color-999' : ''">{{ <span :class="form[item.formDbName] === '' ? 'color-999' : ''">{{
$dateFormat(form[item.formDbName], 'YYYY-MM-DD') || '请选择' $dateFormat(form[item.formDbName], 'YYYY-MM-DD HH:mm') || '请选择'
}}</span> }}</span>
<u-icon name="arrow-right" color="#cccccc" size="14"/> <u-icon name="arrow-right" color="#cccccc" size="14"/>
</div> </div>
@@ -247,13 +247,13 @@ export default {
{ {
label: '是否建立矫正小组', label: '是否建立矫正小组',
type: 'select', type: 'select',
dict: 'isCreateGroup', dict: 'yesOrNo',
formDbName: 'isCreateGroup', formDbName: 'isCreateGroup',
}, },
{ {
label: '是否托管', label: '是否托管',
type: 'select', type: 'select',
dict: 'isRelease', dict: 'yesOrNo',
formDbName: 'isRelease', formDbName: 'isRelease',
} }
] ]
@@ -505,7 +505,7 @@ export default {
} }
var urlList = ['app/appspecialdisabled/addOrUpdate', 'app/appspecialmental/addOrUpdate', 'app/appspecialadjustment/addOrUpdate', 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.$http.post(urlList[this.form.userType], {
...this.form, ...this.form,
@@ -550,7 +550,7 @@ export default {
this.dateShow = true this.dateShow = true
}, },
dateConfirm(e) { 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="area-select">
<div class="select-content"> <div class="select-content">
<div class="area-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>
<div class="search-input" v-if="tabIndex"> <div class="search-input" v-if="tabIndex">
<img src="./img/search-icon.png" alt=""> <img src="./img/search-icon.png" alt="">
@@ -28,7 +22,6 @@
<div class="num-item" v-for="(item, index) in statisticsList" :key="index"> <div class="num-item" v-for="(item, index) in statisticsList" :key="index">
<h3> <h3>
{{item.value}} {{item.value}}
</h3> </h3>
<p>{{item.label}}</p> <p>{{item.label}}</p>
</div> </div>
@@ -105,11 +98,13 @@ export default {
this.areaId = this.user.areaId this.areaId = this.user.areaId
this.areaName = this.user.areaName this.areaName = this.user.areaName
this.getStatistic() this.getStatistic()
this.getStatisticMon()
this.getUserList() this.getUserList()
}) })
uni.$on('specialPeopleList', () => { uni.$on('specialPeopleList', () => {
this.getStatistic() this.getStatistic()
this.getStatisticMon()
this.getUserList() this.getUserList()
}) })
}, },
@@ -121,6 +116,7 @@ export default {
areaSelect(e) { areaSelect(e) {
this.areaId = e this.areaId = e
this.getStatistic() this.getStatistic()
this.getStatisticMon()
this.getUserList() this.getUserList()
}, },
tabClick(index) { tabClick(index) {
@@ -129,30 +125,32 @@ export default {
getStatistic() { getStatistic() {
this.statisticsList = [] this.statisticsList = []
this.$http.post(`app/appspecialadjustment/statistic?type=0&range=0`).then((res) => { this.$http.post(`app/appspecialadjustment/statistic?type=0&range=0`).then((res) => {
// if (res.code == 0) { // console.log(res);
// for(let i in res.data){ if (res.code == 0) {
// var obj = { for (let i in res.data.map) {
// label: i, var obj = {
// value: res.data[i] label: i,
// } value: res.data.map[i],
// this.statisticsList.push(obj) }
// } this.statisticsList.push(obj)
// } }
}
}) })
}, },
getStatisticMon() { getStatisticMon() {
// this.statisticsListMon = [] this.statisticsListMon = []
// this.$http.post(`/app/appapplicationinfo/specialStatistic?areaId=${this.areaId}&type=0&range=1`).then((res) => { this.$http.post(`app/appspecialadjustment/statistic?type=0&range=0`).then((res) => {
// if (res.code == 0) { console.log(res);
// for(let i in res.data){ if (res.code == 0) {
// var obj = { for(let i in res.data.monthMap){
// label: i, var obj = {
// value: res.data[i] label: i,
// } value: res.data.monthMap[i]
// this.statisticsListMon.push(obj) }
// } this.statisticsListMon.push(obj)
// } }
// }) }
})
}, },
getUserList() { getUserList() {
this.userList = [] this.userList = []
@@ -171,9 +169,6 @@ export default {
}) })
}, },
toAdd() { toAdd() {
// this.$emit('change', {
// type: 'Add',
// })
uni.navigateTo({url: './add'}) uni.navigateTo({url: './add'})
}, },
idNumberInit(idNumber) { idNumberInit(idNumber) {
@@ -196,7 +191,13 @@ export default {
}, },
toEdit(row,index) { 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) { del(row,indexs) {
console.log(indexs); console.log(indexs);
@@ -208,7 +209,6 @@ export default {
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) => {
// this.$http.post(idUrl,{ids: row.id}).then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.$u.toast('删除成功!') this.$u.toast('删除成功!')
this.getUserList() this.getUserList()