走访慰问人员选择
This commit is contained in:
@@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
|
|
||||||
<u-form-item label="走访对象" prop="create_user_name" required :right-icon="id ? '' : 'arrow-right'" class="create_user_names">
|
<u-form-item label="走访对象" prop="name" required :right-icon="id ? '' : 'arrow-right'" class="create_user_names">
|
||||||
<u-input v-model="forms.create_user_name" disabled placeholder="请选择走访对象" @click="toWalkObject" />
|
<u-input v-model="forms.name" disabled placeholder="请选择走访对象" @click="toWalkObject" />
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
|
||||||
<div class="line"></div>
|
<div class="line"></div>
|
||||||
@@ -68,8 +68,10 @@ export default {
|
|||||||
forms: {
|
forms: {
|
||||||
areaId: '',
|
areaId: '',
|
||||||
areaName: '',
|
areaName: '',
|
||||||
|
|
||||||
optionId: '',
|
optionId: '',
|
||||||
create_user_name: '',
|
name: '',
|
||||||
|
|
||||||
reality: '',
|
reality: '',
|
||||||
realityValue: '',
|
realityValue: '',
|
||||||
menuLevel3Name: '',
|
menuLevel3Name: '',
|
||||||
@@ -84,11 +86,14 @@ export default {
|
|||||||
areaIdProps: '',
|
areaIdProps: '',
|
||||||
clickedUserSelect: false,
|
clickedUserSelect: false,
|
||||||
id: '',
|
id: '',
|
||||||
|
|
||||||
|
name: '',
|
||||||
|
optionId: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: { ...mapState(['user']) },
|
computed: { ...mapState(['user']) },
|
||||||
onLoad(o) {
|
onLoad(o) {
|
||||||
this.id = o.id
|
this.id = o.id ? o.id : ''
|
||||||
this.areaIdProps = this.user.areaId
|
this.areaIdProps = this.user.areaId
|
||||||
if (!this.id) {
|
if (!this.id) {
|
||||||
this.forms.areaId = this.user.areaId
|
this.forms.areaId = this.user.areaId
|
||||||
@@ -97,6 +102,13 @@ export default {
|
|||||||
this.$dict.load('realityStatus').then(() => {
|
this.$dict.load('realityStatus').then(() => {
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
uni.$on('goBack', (data) => {
|
||||||
|
console.log(data)
|
||||||
|
this.forms.menuLevel3Name = data.applicationName
|
||||||
|
this.forms.name = data.selectUser.name
|
||||||
|
this.forms.optionId = data.selectUser.id
|
||||||
|
})
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
document.title = '新建走访'
|
document.title = '新建走访'
|
||||||
@@ -105,11 +117,12 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
realityClick() {
|
realityClick() {
|
||||||
if (this.id) return
|
if (this.id) return
|
||||||
if (!this.forms.create_user_name) {
|
if (!this.forms.name) {
|
||||||
return this.$u.toast('请选择走访对象')
|
return this.$u.toast('请选择走访对象')
|
||||||
}
|
}
|
||||||
this.showStstus = true
|
this.showStstus = true
|
||||||
},
|
},
|
||||||
|
|
||||||
getDetail() {
|
getDetail() {
|
||||||
if (this.id) {
|
if (this.id) {
|
||||||
this.$http.post(`/app/appvisitvondolence/queryDetailById?id=${this.id}`).then((res) => {
|
this.$http.post(`/app/appvisitvondolence/queryDetailById?id=${this.id}`).then((res) => {
|
||||||
@@ -131,7 +144,7 @@ export default {
|
|||||||
|
|
||||||
this.$refs.uForm.validate((valid) => {
|
this.$refs.uForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (!this.forms.create_user_name) {
|
if (!this.forms.name) {
|
||||||
return this.$u.toast('请选择走访对象')
|
return this.$u.toast('请选择走访对象')
|
||||||
}
|
}
|
||||||
if (!this.forms.title) {
|
if (!this.forms.title) {
|
||||||
@@ -150,9 +163,10 @@ export default {
|
|||||||
.post(`/app/appvisitvondolence/addOrUpdate`, {
|
.post(`/app/appvisitvondolence/addOrUpdate`, {
|
||||||
areaId: this.forms.areaId,
|
areaId: this.forms.areaId,
|
||||||
applicationId: this.forms.applicationId,
|
applicationId: this.forms.applicationId,
|
||||||
name: this.forms.create_user_name,
|
name: this.forms.name,
|
||||||
|
optionId: this.forms.optionId,
|
||||||
menuLevel3Name: this.forms.menuLevel3Name,
|
menuLevel3Name: this.forms.menuLevel3Name,
|
||||||
optionId: this.forms.applicationId,
|
|
||||||
reality: this.forms.realityValue ? this.forms.realityValue : this.forms.reality,
|
reality: this.forms.realityValue ? this.forms.realityValue : this.forms.reality,
|
||||||
title: this.forms.title,
|
title: this.forms.title,
|
||||||
description: this.forms.description,
|
description: this.forms.description,
|
||||||
@@ -182,13 +196,13 @@ export default {
|
|||||||
this.forms.areaId = e
|
this.forms.areaId = e
|
||||||
},
|
},
|
||||||
|
|
||||||
backlist(e) {
|
// backlist(e) {
|
||||||
this.forms.create_user_name = e.item.create_user_name
|
// this.forms.create_user_name = e.item.create_user_name
|
||||||
this.forms.menuLevel3Name = e.menuLevel3Name
|
// this.forms.menuLevel3Name = e.menuLevel3Name
|
||||||
this.forms.applicationId = e.appId
|
// this.forms.applicationId = e.appId
|
||||||
this.forms.optionId = e.item.id
|
// this.forms.optionId = e.item.id
|
||||||
this.addList = true
|
// this.addList = true
|
||||||
},
|
// },
|
||||||
|
|
||||||
realityStstus(e) {
|
realityStstus(e) {
|
||||||
this.forms.reality = e[0].label
|
this.forms.reality = e[0].label
|
||||||
|
|||||||
BIN
src/apps/AppWalkask/img/tx@2x.png
Normal file
BIN
src/apps/AppWalkask/img/tx@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/apps/AppWalkask/img/xz.png
Normal file
BIN
src/apps/AppWalkask/img/xz.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/apps/AppWalkask/img/xzh.png
Normal file
BIN
src/apps/AppWalkask/img/xzh.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<div v-if="typeList.length > 0">
|
<div v-if="typeList.length > 0">
|
||||||
<div class="cards" v-for="(item, i) in typeList" :key="i" @click="toUserSelect(item)">
|
<div class="cards" v-for="(item, i) in typeList" :key="i" @click="toUserSelect(item)">
|
||||||
<img src="./img/user-img.png" alt="" />
|
<img src="./img/tx@2x.png" alt="" />
|
||||||
|
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<div class="applicationNames">{{ item.applicationName }}</div>
|
<div class="applicationNames">{{ item.applicationName }}</div>
|
||||||
@@ -31,10 +31,15 @@
|
|||||||
<div class="showUsers" v-else>
|
<div class="showUsers" v-else>
|
||||||
<div v-if="userList.length > 0">
|
<div v-if="userList.length > 0">
|
||||||
<div class="cards" v-for="(e, index) in userList" :key="index">
|
<div class="cards" v-for="(e, index) in userList" :key="index">
|
||||||
<img src="./img/user-img.png" alt="" />
|
<div class="imges">
|
||||||
|
<img src="./img/xzh.png" alt="" class="imgselect" v-if="e.isChecked" @click="userClick(e, index)" />
|
||||||
|
<img src="./img/xz.png" alt="" class="imgselect" v-else @click="userClick(e, index)" />
|
||||||
|
|
||||||
|
<img src="./img/tx@2x.png" alt="" class="avatras" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<div class="applicationNames">{{ e.create_user_name }}</div>
|
<div class="applicationNames">{{ e.name }}</div>
|
||||||
|
|
||||||
<!-- <img src="./img/2.png" alt="" class="imgs" /> -->
|
<!-- <img src="./img/2.png" alt="" class="imgs" /> -->
|
||||||
</div>
|
</div>
|
||||||
@@ -45,6 +50,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="subBtn" @click="submit">
|
||||||
|
<div>确定选择</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- <AiBck /> -->
|
<!-- <AiBck /> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -62,6 +71,7 @@ export default {
|
|||||||
current: 1,
|
current: 1,
|
||||||
showType: true,
|
showType: true,
|
||||||
applicationName: '',
|
applicationName: '',
|
||||||
|
selectUser: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
@@ -71,6 +81,20 @@ export default {
|
|||||||
},
|
},
|
||||||
onShow() {},
|
onShow() {},
|
||||||
methods: {
|
methods: {
|
||||||
|
userClick(row, index) {
|
||||||
|
if (this.userList[index].isChecked) {
|
||||||
|
//取消
|
||||||
|
this.userList[index].isChecked = false
|
||||||
|
this.selectUser = {}
|
||||||
|
} else {
|
||||||
|
this.userList.map((item) => {
|
||||||
|
item.isChecked = false
|
||||||
|
})
|
||||||
|
this.userList[index].isChecked = true
|
||||||
|
this.selectUser = row
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
getTypeList() {
|
getTypeList() {
|
||||||
this.userList = []
|
this.userList = []
|
||||||
this.$http.post(`/app/appapplicationinfo/queryApplicationListByType?type=0&status=1`).then((res) => {
|
this.$http.post(`/app/appapplicationinfo/queryApplicationListByType?type=0&status=1`).then((res) => {
|
||||||
@@ -83,13 +107,21 @@ export default {
|
|||||||
getUser(data) {
|
getUser(data) {
|
||||||
this.$http.post(`/app/appapplicationinfo/list?appId=${data.id}¤t=${this.current}&size=${999}`, { searchParam: this.keyword }).then((res) => {
|
this.$http.post(`/app/appapplicationinfo/list?appId=${data.id}¤t=${this.current}&size=${999}`, { searchParam: this.keyword }).then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
res.data.records.map((item) => {
|
||||||
|
item.isChecked = false
|
||||||
|
})
|
||||||
this.userList = res.data.records
|
this.userList = res.data.records
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
submit() {
|
||||||
|
uni.$emit('goBack', { selectUser: this.selectUser, applicationName: this.applicationName })
|
||||||
|
uni.navigateBack()
|
||||||
|
// uni.navigateTo({ url: `./add` })
|
||||||
|
},
|
||||||
|
|
||||||
toUserSelect(item) {
|
toUserSelect(item) {
|
||||||
console.log(item)
|
|
||||||
this.applicationName = item.applicationName
|
this.applicationName = item.applicationName
|
||||||
this.showType = false
|
this.showType = false
|
||||||
this.getUser(item)
|
this.getUser(item)
|
||||||
@@ -152,7 +184,7 @@ export default {
|
|||||||
height: 120px;
|
height: 120px;
|
||||||
line-height: 120px;
|
line-height: 120px;
|
||||||
// background: pink;
|
// background: pink;
|
||||||
padding: 0 20px 0 32px;
|
padding: 0 0 0 32px;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: 74px;
|
width: 74px;
|
||||||
@@ -174,6 +206,7 @@ export default {
|
|||||||
.imgs {
|
.imgs {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -186,13 +219,25 @@ export default {
|
|||||||
height: 120px;
|
height: 120px;
|
||||||
line-height: 120px;
|
line-height: 120px;
|
||||||
// background: pink;
|
// background: pink;
|
||||||
padding: 0 20px 0 32px;
|
padding: 0 0 0 32px;
|
||||||
|
|
||||||
img {
|
.imges {
|
||||||
width: 74px;
|
display: flex;
|
||||||
height: 74px;
|
align-items: center;
|
||||||
border-radius: 8px;
|
width: 200px;
|
||||||
|
.imgselect {
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatras {
|
||||||
|
width: 74px;
|
||||||
|
height: 74px;
|
||||||
|
border-radius: 8px;
|
||||||
|
margin-left: 36px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -213,5 +258,26 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.subBtn {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 118px;
|
||||||
|
background: #f4f8fb;
|
||||||
|
div {
|
||||||
|
width: 192px;
|
||||||
|
height: 80px;
|
||||||
|
line-height: 80px;
|
||||||
|
text-align: center;
|
||||||
|
background: #1365dd;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 32px;
|
||||||
|
color: #fff;
|
||||||
|
margin: 20px 34px 0 0;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user