This commit is contained in:
liuye
2022-02-07 09:55:05 +08:00
6 changed files with 431 additions and 142 deletions

View File

@@ -29,12 +29,18 @@
"open": true, "open": true,
"proxy": { "proxy": {
"/lan": { "/lan": {
// "target": "http://192.168.1.87:9000", "target": "http://192.168.1.87:9000",
"target": "http://test87tpweb.cunwuyun.cn",
"changeOrigin": true, "changeOrigin": true,
"pathRewrite": { "pathRewrite": {
"^/lan": "/" "^/lan": "/"
} }
},
"/saas": {
"target": "https://test87tpweb.cunwuyun.cn",
"changeOrigin": true,
"pathRewrite": {
"^/saas": "/"
}
} }
} }
}, },

View File

@@ -6,7 +6,7 @@
<ai-result v-if="result.tips" v-bind="result"/> <ai-result v-if="result.tips" v-bind="result"/>
<input v-if="!!$route.query.code" class="codeText" :value="$route.query.code"/> <input v-if="!!$route.query.code" class="codeText" :value="$route.query.code"/>
<div class="codeBtn" @click="handleLogin">去登录</div> <div class="codeBtn" @click="handleLogin">去登录</div>
<u-radio-group v-model="currentLib" @change="getApps"> <u-radio-group v-model="currentLib" @change="handleSwitchSystem">
<u-radio v-for="(op,i) in libs" :key="i" :name="op.dir">{{ op.label }}</u-radio> <u-radio v-for="(op,i) in libs" :key="i" :name="op.dir">{{ op.label }}</u-radio>
</u-radio-group> </u-radio-group>
<input class="codeText" v-model="search" placeholder="搜索要查找的应用"/> <input class="codeText" v-model="search" placeholder="搜索要查找的应用"/>
@@ -17,7 +17,7 @@
</template> </template>
<script> <script>
import {mapActions, mapState} from 'vuex' import {mapActions, mapMutations, mapState} from 'vuex'
import AiResult from "../components/AiResult"; import AiResult from "../components/AiResult";
import AiSelect from "../components/AiSelect"; import AiSelect from "../components/AiSelect";
@@ -48,6 +48,7 @@ export default {
} }
}, },
methods: { methods: {
...mapMutations(['logout']),
...mapActions(['agentSign']), ...mapActions(['agentSign']),
handleGotoApp(app) { handleGotoApp(app) {
uni.navigateTo({url: `/${this.currentLib}${app.path}`}) uni.navigateTo({url: `/${this.currentLib}${app.path}`})
@@ -65,6 +66,12 @@ export default {
this.apps.push({key, name, path: path.replace(/^\.(.+).vue$/g, '$1')}) this.apps.push({key, name, path: path.replace(/^\.(.+).vue$/g, '$1')})
} }
}) })
},
handleSwitchSystem() {
this.$http.defaults.baseURL = this.currentLib == "apps" ? "/lan" :
this.currentLib == "sass" ? "/saas" : "/"
this.getApps()
this.logout()
} }
}, },
onLoad() { onLoad() {

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="statistical"> <div class="statistical" v-if="pageShow">
<div class="statistical-tab"> <div class="statistical-tab">
<span :class="[currIndex === 0 ? 'active' : '']" @click="currIndex = 0">问卷统计</span> <span :class="[currIndex === 0 ? 'active' : '']" @click="currIndex = 0">问卷统计</span>
<span :class="[currIndex === 1 ? 'active' : '']" @click="currIndex = 1">人员统计</span> <span :class="[currIndex === 1 ? 'active' : '']" @click="currIndex = 1">人员统计</span>
@@ -8,25 +8,24 @@
<div class="list-wrapper" v-show="currIndex === 0"> <div class="list-wrapper" v-show="currIndex === 0">
<div class="top"> <div class="top">
<span></span> <span></span>
<i>9</i> <i>{{ subjectList.length }}</i>
<span>其中多选</span> <span>其中</span>
<i>9</i> <span v-for="(item, index) in fieldTypeCount" :key="index">
<span>其中多选</span> {{ mapType(item.field_type) }}<i>{{ item.c }}</i>{{ fieldTypeCount.length - 1 === index ? '' : '' }}
<i>9</i> </span>
<span></span>
</div> </div>
<div class="topic-list"> <div class="topic-list">
<div class="topic-item" v-for="(item, i) in 10" :key="i"> <div class="topic-item" v-for="(item, index) in subjectList" :key="index">
<h2>您是否了解社会治理(单选</h2> <h2>{{ item.fieldName }}{{ item.fixedLabel }}</h2>
<div class="topic-item__wrapper"> <div class="topic-item__wrapper">
<div class="option-item" v-for="(item, index) in 4" :key="index"> <div class="option-item" v-for="(filed, i) in item.options" :key="i" v-show="['radio', 'checkbox', 'select'].indexOf(item.fieldType) > -1">
<div class="option-item__left"> <div class="option-item__left">
<h2>A</h2> <h2>{{ filed.label }}</h2>
<span>每周监测</span> <!-- <span>每周监测</span> -->
</div> </div>
<div class="option-item__right"> <div class="option-item__right">
<span>10</span> <span>{{ filed.c }}</span>
<span>40%</span> <span>{{ (((filed.c || 0) / fieldDataCount[`field_${index}`]) * 100).toFixed(2) }}%</span>
</div> </div>
</div> </div>
</div> </div>
@@ -63,12 +62,95 @@
data () { data () {
return { return {
currIndex: 0 id: '',
currIndex: 0,
targetList: [],
info: {},
subjectList: [],
tableData: [],
total: 0,
pageShow: false,
form: {},
fieldTypeCount: [],
fieldValueDistribution: [],
fieldDataCount: {},
isShowForm: false,
targetList: [],
formInfo: {}
} }
}, },
onLoad () { onLoad (query) {
this.$loading()
this.id = query.id
this.$nextTick(() => {
this.getInfo()
this.getFormInfo()
})
},
methods: {
getInfo () {
this.$http.post(`/app/appquestionnairetemplate/queryDetailById?id=${this.id}`).then(res => {
if (res.code == 0) {
this.info = res.data
this.targetList = res.data.fields.map(item => {
return JSON.parse(item.fieldInfo)
})
}
})
},
mapType(type) {
return {
upload: '上传图片',
input: '单行填空',
textarea: '多行填空',
radio: '单选',
checkbox: '多选',
select: '单下拉框'
}[type]
},
getFormInfo() {
this.$http.post(`/app/appquestionnairetemplate/statisticsTable?id=${this.id}`, null, {
params: {
...this.search
}
}).then(res => {
this.$hideLoading()
if (res.code == 0) {
this.fieldDataCount = res.data.fieldDataCount
this.fieldTypeCount = res.data.fieldTypeCount
this.fieldValueDistribution = res.data.fieldValueDistribution
this.subjectList = res.data.appQuestionnaireTemplate.fields.map((item, index) => {
const fieldInfo = JSON.parse(item.fieldInfo)
let options = fieldInfo.options
if (['radio', 'checkbox', 'select'].indexOf(item.fieldType) > -1) {
options = fieldInfo.options.map(v => {
res.data.fieldValueDistribution[`field_${index}`].forEach(info => {
if (info.fieldValue === v.label) {
v.c = info.c
}
})
return v
})
}
return {
...item,
...fieldInfo,
options
}
})
this.pageShow = true
}
})
}
} }
} }
</script> </script>
@@ -78,6 +160,76 @@
padding-top: 112px; padding-top: 112px;
padding-bottom: 60px; padding-bottom: 60px;
.user-list {
padding: 0 32px;
background: #f5f5f5;
.user-item {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
height: 160px;
margin-top: 24px;
padding: 32px;
background: #FFFFFF;
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.02);
border-radius: 16px;
.user-item__right {
font-size: 30px;
text-align: center;
p {
line-height: 40px;
margin-bottom: 16px;
color: #333333;
}
div {
color: #1365DD;
}
}
.user-item__left {
display: flex;
align-items: center;
.right {
p {
color: #999999;
font-size: 30px;
}
}
.right-top {
display: flex;
align-items: center;
margin-bottom: 16px;
line-height: 40px;
h2 {
margin-right: 20px;
font-size: 30px;
color: #333;
}
span {
color: #999999;
font-size: 28px;
}
}
image {
width: 96px;
height: 96px;
margin-right: 16px;
border-radius: 50%;
}
}
}
}
* { * {
box-sizing: border-box; box-sizing: border-box;
} }
@@ -90,10 +242,8 @@
padding-bottom: 40px; padding-bottom: 40px;
.top { .top {
display: flex; padding: 36px 32px 32px;
align-items: center; text-align: justify;
height: 116px;
padding: 0 32px;
font-size: 34px; font-size: 34px;
color: #333; color: #333;
border-bottom: 4px solid #f3f6f9; border-bottom: 4px solid #f3f6f9;
@@ -173,6 +323,7 @@
width: 100%; width: 100%;
height: 96px; height: 96px;
padding: 0 32px; padding: 0 32px;
border-bottom: 1px solid #D4D4D4;
background: #fff; background: #fff;
span { span {

View File

@@ -4,7 +4,10 @@
<div class="item"> <div class="item">
<span class="label"><span class="tips">*</span>类型</span> <span class="label"><span class="tips">*</span>类型</span>
<div class="value" @click="selectClick('appSpecialTypeFive', 'userType')"> <div class="value" @click="selectClick('appSpecialTypeFive', 'userType')">
<span :class="form.userType === '' ? 'color-999' : ''">{{ $dict.getLabel('appSpecialTypeFive', form.userType) || '请选择'}}</span> <span
:class="form.userType === '' ? 'color-999' : ''">{{
$dict.getLabel('appSpecialTypeFive', form.userType) || '请选择'
}}</span>
<u-icon name="arrow-right" color="#cccccc" size="14"/> <u-icon name="arrow-right" color="#cccccc" size="14"/>
</div> </div>
</div> </div>
@@ -12,32 +15,39 @@
<span class="label"><span class="tips">*</span>姓名</span> <span class="label"><span class="tips">*</span>姓名</span>
<div class="value"> <div class="value">
<u-input type="text" placeholder="请输入" v-model="form.name" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="15" :clearable="false" /> <u-input type="text" placeholder="请输入" v-model="form.name" input-align="right"
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="15" :clearable="false"/>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<span class="label"><span class="tips">*</span>身份证号</span> <span class="label"><span class="tips">*</span>身份证号</span>
<div class="value"> <div class="value">
<u-input type="text" placeholder="请输入" v-model="form.idNumber" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="18" :clearable="false" @input="changeIdNumber"/> <u-input type="text" placeholder="请输入" v-model="form.idNumber" input-align="right"
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="18" :clearable="false"
@input="changeIdNumber"/>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<span class="label"><span class="tips">*</span>性别</span> <span class="label"><span class="tips">*</span>性别</span>
<div class="value"> <div class="value">
<u-input placeholder="请输入" v-model="form.gender" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="15" :clearable="false" /> <u-input disabled placeholder="请输入" v-model="form.gender" input-align="right"
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="15" :clearable="false"/>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<span class="label"><span class="tips">*</span>出生日期</span> <span class="label"><span class="tips">*</span>出生日期</span>
<div class="value"> <div class="value">
<u-input type="text" placeholder="请输入" v-model="form.birth" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="19" :clearable="false" /> <u-input type="text" disabled placeholder="请输入" v-model="form.birth" input-align="right"
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="19" :clearable="false"/>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<span class="label"><span class="tips">*</span>联系电话</span> <span class="label"><span class="tips">*</span>联系电话</span>
<div class="value"> <div class="value">
<u-input type="number" placeholder="请输入" v-model="form.phone" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="11" :clearable="false" /> <u-input type="number" placeholder="请输入" v-model="form.phone" input-align="right"
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="11" :clearable="false"
@input="changePhone"/>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
@@ -53,13 +63,16 @@
<div class="item"> <div class="item">
<span class="label"><span class="tips">*</span>详细地址</span> <span class="label"><span class="tips">*</span>详细地址</span>
<div class="value"> <div class="value">
<u-input type="text" placeholder="请输入" v-model="form.address" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48"/> <u-input type="text" placeholder="请输入" v-model="form.address" input-align="right"
placeholder-style="color:#999;font-size:16px;" height="48"/>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<span class="label"><span class="tips">*</span>所属网格</span> <span class="label"><span class="tips">*</span>所属网格</span>
<div class="value"> <div class="value">
<u-input type="text" placeholder="请输入" v-model="form.girdName" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :clearable="false"/> <u-input type="text" placeholder="请输入" disabled v-model="form.girdName" input-align="right"
placeholder-style="color:#999;font-size:16px;" height="48" :clearable="false"
@click="showGird=true"/>
</div> </div>
</div> </div>
<div v-if="this.form.userType != ''"> <div v-if="this.form.userType != ''">
@@ -68,14 +81,18 @@
<div class="item" v-if="item.type == 'input'"> <div class="item" v-if="item.type == 'input'">
<span class="label"><span class="tips"></span>{{ item.label }}</span> <span class="label"><span class="tips"></span>{{ item.label }}</span>
<div class="value"> <div class="value">
<u-input type="text" placeholder="请输入" v-model="form[item.formDbName]" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="15" :clearable="false" /> <u-input type="text" placeholder="请输入" v-model="form[item.formDbName]" input-align="right"
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="15" :clearable="false"/>
</div> </div>
</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)">
<span :class="form[item.formDbName] === '' ? 'color-999' : ''">{{ $dict.getLabel(item.dict, form[item.formDbName]) || '请选择'}}</span> <span
:class="form[item.formDbName] === '' ? 'color-999' : ''">{{
$dict.getLabel(item.dict, form[item.formDbName]) || '请选择'
}}</span>
<u-icon name="arrow-right" color="#cccccc" size="14"/> <u-icon name="arrow-right" color="#cccccc" size="14"/>
</div> </div>
</div> </div>
@@ -83,7 +100,9 @@
<div class="item" v-if="item.type == 'time'"> <div class="item" v-if="item.type == 'time'">
<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' : ''">{{ $dateFormat(form[item.formDbName],'YYYY-MM-DD') || '请选择' }}</span> <span :class="form[item.formDbName] === '' ? 'color-999' : ''">{{
$dateFormat(form[item.formDbName], 'YYYY-MM-DD') || '请选择'
}}</span>
<u-icon name="arrow-right" color="#cccccc" size="14"/> <u-icon name="arrow-right" color="#cccccc" size="14"/>
</div> </div>
</div> </div>
@@ -95,19 +114,20 @@
<div class="btn">保存</div> <div class="btn">保存</div>
</div> </div>
<u-picker mode="time" v-model="dateShow" :params="deteParams" start-year="2010" @confirm="dateConfirm">请选择</u-picker> <u-picker mode="time" v-model="dateShow" :params="deteParams" start-year="2010" @confirm="dateConfirm">请选择
<u-select v-model="showSelect" :list="selectList" label-name="dictName" value-name="dictValue" @confirm="confirmSelect"/> </u-picker>
<u-select v-model="showSelect" :list="selectList" label-name="dictName" value-name="dictValue"
@confirm="confirmSelect"/>
<u-select v-model="showGird" :list="girdlist" label-name="dictName" value-name="dictValue"
@confirm="confirmGirdSelect"/>
</div> </div>
</template> </template>
<script> <script>
import {mapActions, mapState} from 'vuex' import {mapState} from 'vuex'
import AiAreaPicker from '../../components/AiAreaPicker.vue'
export default { export default {
components: { AiAreaPicker },
data() { data() {
return { return {
form: { form: {
@@ -130,6 +150,39 @@ export default {
selectName: '', selectName: '',
tableIndex: 0, tableIndex: 0,
tableData: [ tableData: [
{
list: [ // 残疾人
{
label: '家庭年收入(万)',
type: 'input',
formDbName: 'income'
},
{
label: '婚姻情况',
type: 'select',
dict: 'appSpecialMarriage',
formDbName: 'marriage'
},
{
label: '身体状况',
type: 'select',
dict: 'appSpecialHealth',
formDbName: 'health'
},
{
label: '残疾类型',
type: 'select',
dict: 'appSpecialDisableType',
formDbName: 'type'
},
{
label: '残疾级别',
type: 'select',
dict: 'appSpecialDisableLevel',
formDbName: 'level'
},
]
},
{ {
list: [ // 精神病人 list: [ // 精神病人
{ {
@@ -166,39 +219,6 @@ export default {
}, },
] ]
}, },
{
list: [ // 残疾人
{
label: '家庭年收入(万)',
type: 'input',
formDbName: 'income'
},
{
label: '婚姻情况',
type: 'select',
dict: 'appSpecialMarriage',
formDbName: 'marriage'
},
{
label: '身体状况',
type: 'select',
dict: 'appSpecialHealth',
formDbName: 'health'
},
{
label: '残疾类型',
type: 'select',
dict: 'appSpecialDisableType',
formDbName: 'type'
},
{
label: '残疾级别',
type: 'select',
dict: 'appSpecialDisableLevel',
formDbName: 'level'
},
]
},
{ {
list: [ // 社区矫正人群 list: [ // 社区矫正人群
{ {
@@ -253,7 +273,7 @@ export default {
label: '戒毒情况', label: '戒毒情况',
type: 'select', type: 'select',
dict: 'appSpecialDebug', dict: 'appSpecialDebug',
formDbName: 'houselivingStatus', formDbName: 'debug',
}, },
{ {
label: '管控情况', label: '管控情况',
@@ -336,22 +356,88 @@ export default {
} }
], ],
selectList: [], selectList: [],
id: "",
index: "",
showGird: false,
girdlist: []
} }
}, },
computed: { computed: {
...mapState(['user']), ...mapState(['user']),
}, },
created() { onLoad(o) {
// console.log(o);
this.$dict.load('appSpecialSituation', 'appSpecialPlacement', 'appSpecialDenger', 'appSpecialCrime', this.$dict.load('appSpecialSituation', 'appSpecialPlacement', 'appSpecialDenger', 'appSpecialCrime',
'appSpecialControl', 'appSpecialDebug', 'appSpecialDrug', 'appSpecialChangeType', 'appSpecialCure', 'appSpecialDengerLevel', 'appSpecialControl', 'appSpecialDebug', 'appSpecialDrug', 'appSpecialChangeType', 'appSpecialCure', 'appSpecialDengerLevel',
'appSpecialDisableLevel', 'appSpecialDisableType', 'appSpecialHealth', 'appSpecialMarriage', 'appSpecialTypeFive').then(() => { 'appSpecialDisableLevel', 'appSpecialDisableType', 'appSpecialHealth', 'appSpecialMarriage', 'appSpecialTypeFive').then(() => {
}) }),
this.gridName()
if (o) {
this.id = o.id
this.index = o.index
this.getDetail()
}
}, },
onShow() { onShow() {
document.title = '新增人员' document.title = '新增人员'
}, },
methods: { methods: {
getDetail() {
if (!this.id) return
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.form = res
// this.form.userType = this.index
// this.form.name = res.data.name
// this.form.idNumber = res.data.idNumber
// this.form.gender=res.data.gender,
// this.form.birth=res.data.birth,
// this.form.phone=res.data.phone,
// this.form.areaName=res.data.areaName,
// this.form.address=res.data.address,
// this.form.girdName=res.data.girdName,
// this.form.areaId=res.data.areaId,
// this.form.income=res.data.income,
// this.form.marriage = res.data.marriage,
// this.form.health = res.data.health
// this.form.type = res.data.type
// this.form.level= res.data.level
// this.form.sickTime= res.data.sickTime
// this.form.helpName= res.data.helpName
// this.form.helpPhone= res.data.helpPhone
// this.form.crime= res.data.crime
// this.form.startTime= res.data.startTime
// this.form.endTime= res.data.endTime
// this.form.isCreateGroup= res.data.isCreateGroup
// this.form.isRelease= res.data.isRelease
// this.form.firstTime= res.data.firstTime
// this.form.status= res.data.status
// this.form.debug= res.data.debug
// this.form.control= res.data.control
// this.form.controlName= res.data.controlName
// this.form.controlPhone= res.data.controlPhone
// this.form.isSecond= res.data.isSecond
// this.form.= res.data.
// this.form.= res.data.
// this.form.= res.data.
// this.form.= res.data.
// this.form.= res.data.
}
})
},
changeIdNumber() { changeIdNumber() {
if (this.form.idNumber.length == 18) { if (this.form.idNumber.length == 18) {
var people = this.$idCardNoUtil.getIdCardInfo(this.form.idNumber) var people = this.$idCardNoUtil.getIdCardInfo(this.form.idNumber)
@@ -363,10 +449,34 @@ export default {
return this.$u.toast('请输入正确的身份证号码') return this.$u.toast('请输入正确的身份证号码')
} }
} }
}, },
changePhone() {
let regTel = /^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/
if (!regTel.test(this.form.phone)) {
return this.$u.toast('请输入正确的手机号')
}
},
confirmGirdSelect(e) {
this.form.girdId = e[0].value
this.form.girdName = e[0].label
},
gridName() {
this.$http.post('app/appgirdmemberinfo/queryMyGirdListByLevel2AndUser').then(res => {
console.log(res);
if (res.code == 0) {
var list = []
res.data.map((e, index) => {
list.push({dictName: e.girdName, dictValue: index})
})
this.girdlist = list
}
})
},
submit() { submit() {
if(this.userType === ''){ if (this.form.userType === '') {
return this.$u.toast('请选择类型') return this.$u.toast('请选择类型')
} }
if (!this.form.name) { if (!this.form.name) {
@@ -388,10 +498,10 @@ export default {
return this.$u.toast('请选择网格') return this.$u.toast('请选择网格')
} }
var urlList = ['app/appspecialmental/addOrUpdate', 'app/appspecialdisabled/addOrUpdate', 'app/appspecialdisabled/addOrUpdate', var urlList = ['app/appspecialdisabled/addOrUpdate', 'app/appspecialmental/addOrUpdate', 'app/appspecialadjustment/addOrUpdate',
'app/appspecialdisabled/addOrUpdate', 'app/appspecialdisabled/addOrUpdate'] 'app/appspecialdrug/addOrUpdate', 'app/appspecialprison/addOrUpdate']
this.$http.post(urlList[this.form.userType], this.form).then(res => { this.$http.post(urlList[this.form.userType], {...this.form}).then(res => {
if (res.code == 0) { if (res.code == 0) {
this.$u.toast('提交成功') this.$u.toast('提交成功')
uni.$emit('specialPeopleList') uni.$emit('specialPeopleList')
@@ -402,12 +512,12 @@ export default {
}) })
}, },
areaSelect(e) { areaSelect(e) {
console.log(e); // console.log(e);
this.form.areaId = e this.form.areaId = e
}, },
selectClick(dictName, formName) { selectClick(dictName, formName) {
console.log(dictName) // console.log(dictName)
this.selectList = this.$dict.getDict(dictName) this.selectList = this.$dict.getDict(dictName)
this.selectName = formName this.selectName = formName
this.showSelect = true this.showSelect = true

View File

@@ -26,7 +26,10 @@
<div class="title">特殊人群</div> <div class="title">特殊人群</div>
<div class="num-content"> <div class="num-content">
<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>{{item.value}}</h3> <h3>
{{item.value}}
</h3>
<p>{{item.label}}</p> <p>{{item.label}}</p>
</div> </div>
<AiEmpty v-if="!statisticsList.length"/> <AiEmpty v-if="!statisticsList.length"/>
@@ -46,7 +49,9 @@
<div v-else> <div v-else>
<div class="item-content" v-for="(item, index) in userList" :key="index"> <div class="item-content" v-for="(item, index) in userList" :key="index">
<div class="title" @click="showUserType(index)"> <div class="title" @click="showUserType(index)">
<h2>{{item.label}}</h2> <h2>
{{ $dict.getLabel('appSpecialTypeFive', item.label) }}
</h2>
<img src="./img/down-icon.png" alt="" :class="item.check ? 'img-active' : ''"> <img src="./img/down-icon.png" alt="" :class="item.check ? 'img-active' : ''">
</div> </div>
<div class="user-list" v-if="item.check"> <div class="user-list" v-if="item.check">
@@ -57,8 +62,8 @@
<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">
<img src="./img/edit-icon.png" alt="" @click="toEdit(e)"> <img src="./img/edit-icon.png" alt="" @click="toEdit(e,item.label)">
<img src="./img/del-icon.png" alt="" @click="del(e)"> <img src="./img/del-icon.png" alt="" @click="del(e,item.label)">
</span> </span>
</p> </p>
<div class="phone"> <div class="phone">
@@ -67,7 +72,7 @@
</div> </div>
</div> </div>
</div> </div>
<p class="text" v-if="!item.value.length">{{'暂无' + item.label + '信息'}}</p> <p class="text" v-if="!item.value.length">{{'暂无' + $dict.getLabel('appSpecialTypeFive', item.label) + '信息'}}</p>
</div> </div>
</div> </div>
<div class="footer" @click="toAdd"> <div class="footer" @click="toAdd">
@@ -123,7 +128,7 @@ 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) { // if (res.code == 0) {
// for(let i in res.data){ // for(let i in res.data){
// var obj = { // var obj = {
@@ -151,17 +156,18 @@ export default {
}, },
getUserList() { getUserList() {
this.userList = [] this.userList = []
this.$http.post(`/app/appspecialadjustment/allList?type=0&name=${this.name}`).then((res) => { this.$http.post('app/appspecialadjustment/allList',{type: '', name: this.name}).then((res) => {
// if (res.code == 0) { if (res.code == 0) {
// for(let i in res.data){ for(let i in res.data){
// var obj = { var obj = {
// label: i, label: i,
// value: res.data[i], value: res.data[i],
// check: false check: false
// } }
// this.userList.push(obj) this.userList.push(obj)
// }
// } }
}
}) })
}, },
toAdd() { toAdd() {
@@ -189,18 +195,27 @@ export default {
} }
}, },
toEdit(row) { toEdit(row,index) {
// uni.navigateTo({url: './add'}) uni.navigateTo({url: `./add?id=${row.id}&index=${index}`})
}, },
del(row) { del(row,indexs) {
console.log(indexs);
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'
this.$confirm('确定删除该数据?').then(() => { this.$confirm('确定删除该数据?').then(() => {
// this.$http.post(`/app/appzyvideobroadcast/getBroadcastRecall?broadcastId=${id}`).then((res) => { uni.showLoading()
// if (res.code == 0) { this.$http.post(delUrl[indexs],null, {params: {ids: row.id}}).then((res) => {
// this.$u.toast('撤回成功!') // this.$http.post(idUrl,{ids: row.id}).then((res) => {
// this.getList() if (res.code == 0) {
// } this.$u.toast('删除成功!')
// }) this.getUserList()
}
uni.hideLoading()
}) })
}).catch(() => {})
} }
} }
} }

View File

@@ -236,7 +236,7 @@ const store = new Vuex.Store({
}, },
agentSign(state, params) { agentSign(state, params) {
let url = window.location.href, let url = window.location.href,
{corpId = "ww596787bb70f08288", suiteId} = state.state.config {corpId, suiteId} = state.state.config
if (agentSignURL == url) { if (agentSignURL == url) {
return Promise.resolve() return Promise.resolve()
} else { } else {