重绘
This commit is contained in:
@@ -26,33 +26,33 @@
|
||||
</div>
|
||||
|
||||
<div @click.stop="btnHide" class="datas" v-if="data.length > 0">
|
||||
<div class="cards" @click.stop="toDetail" v-for="(item, i) in 4" :key="i">
|
||||
<div class="cards" @click.stop="toDetail(item)" v-for="(item, i) in data" :key="i">
|
||||
<div class="cards-top">
|
||||
<div class="cards-left">
|
||||
<span class="walkName">走访对象:李伟民</span>
|
||||
<span class="walkName">走访对象:{{ item.createUserName }}</span>
|
||||
<span class="tags">残疾人</span>
|
||||
<span class="tags">居家看护</span>
|
||||
</div>
|
||||
|
||||
<div class="cards-right" @click.stop="showHide">
|
||||
<img src="../AppWalkask/components/images/1.png" alt="" />
|
||||
<img src="./components/images/1.png" alt="" />
|
||||
</div>
|
||||
|
||||
<div class="btn" v-if="showBtn">
|
||||
<span @click="toAdd">编辑</span>
|
||||
<span @click="deletShow = true">删除</span>
|
||||
<span @click="toAdd(item)">编辑</span>
|
||||
<span @click="toDetele(item)">删除</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cards-hint">脱贫攻坚走脱贫攻坚脱贫攻坚走访—徐家棚街道脱贫攻坚走访徐家走访—徐家棚街道脱贫攻坚走访徐家访—徐家棚街脱贫攻坚脱贫攻坚走访—徐家棚街道脱贫攻坚走访徐家脱贫攻坚走访—徐家棚街道脱贫攻坚走访徐家脱贫攻坚走访—徐家棚街道脱贫攻坚走访徐家脱贫攻坚走访—徐家棚街道脱贫攻坚走访徐家走访—徐家棚街道脱贫攻脱贫攻坚走访—徐家棚街道脱贫攻坚走访徐家坚走访徐家道脱贫攻坚走访徐家脱贫攻坚走访—徐家棚街道脱贫攻脱贫攻坚走访—徐家棚街道脱贫攻坚走访徐家坚走访徐家</div>
|
||||
<div class="cards-hint">{{ item.description }}</div>
|
||||
|
||||
<div class="imgs">
|
||||
<img src="../AppWalkask/components/images/天使彦5.jpg" alt="" v-for="(item, i) in 4" :key="i" />
|
||||
<img :src="items.url" alt="" v-for="(items, i) in item.images" :key="i" @click.stop="previewImage(item.images, items.url)" />
|
||||
</div>
|
||||
|
||||
<div class="cards-bottom">
|
||||
<span>走访人:林珊珊</span>
|
||||
<span>2021-12-18 13:45:36</span>
|
||||
<span>走访人:{{ item.createUserName }}</span>
|
||||
<span>{{ item.createTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -82,10 +82,10 @@
|
||||
</div>
|
||||
|
||||
<div @click.stop="btnHide" class="datas" v-if="data.length > 0">
|
||||
<div class="cards" @click.stop="toDetail" v-for="(item, i) in 4" :key="i">
|
||||
<div class="cards" @click.stop="toDetail(item)" v-for="(item, i) in data" :key="i">
|
||||
<div class="cards-top">
|
||||
<div class="cards-left">
|
||||
<span class="walkName">走访对象:李伟民</span>
|
||||
<span class="walkName">走访对象:{{ item.createUserName }}</span>
|
||||
<span class="tags">残疾人</span>
|
||||
<span class="tags">居家看护</span>
|
||||
</div>
|
||||
@@ -95,20 +95,20 @@
|
||||
</div>
|
||||
|
||||
<div class="btn" v-if="showBtn">
|
||||
<span @click="toAdd">编辑</span>
|
||||
<span @click="deletShow = true">删除</span>
|
||||
<span @click="toAdd(item)">编辑</span>
|
||||
<span @click="toDetele(item)">删除</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="cards-hint">脱贫攻坚走脱贫攻坚脱贫攻坚走访—徐家棚街道脱贫攻坚走访徐家走访—徐家棚街道脱贫攻坚走访徐家访—徐家棚街脱贫攻坚脱贫攻坚走访—徐家棚街道脱贫攻坚走访徐家脱贫攻坚走访—徐家棚街道脱贫攻坚走访徐家脱贫攻坚走访—徐家棚街道脱贫攻坚走访徐家脱贫攻坚走访—徐家棚街道脱贫攻坚走访徐家走访—徐家棚街道脱贫攻脱贫攻坚走访—徐家棚街道脱贫攻坚走访徐家坚走访徐家道脱贫攻坚走访徐家脱贫攻坚走访—徐家棚街道脱贫攻脱贫攻坚走访—徐家棚街道脱贫攻坚走访徐家坚走访徐家</div>
|
||||
<div class="cards-hint">{{ item.description }}</div>
|
||||
|
||||
<div class="imgs">
|
||||
<img src="../AppWalkask/components/images/天使彦5.jpg" alt="" v-for="(item, i) in 4" :key="i" />
|
||||
<img :src="items.url" alt="" v-for="items in item.images" :key="items.id" @click.stop="previewImage(item.images, items.url)" />
|
||||
</div>
|
||||
|
||||
<div class="cards-bottom">
|
||||
<span>走访人:林珊珊</span>
|
||||
<span>2021-12-18 13:45:36</span>
|
||||
<span>走访人:{{ item.createUserName }}</span>
|
||||
<span>{{ item.createTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -178,6 +178,7 @@ export default {
|
||||
params: null,
|
||||
current: 1,
|
||||
areaId: '',
|
||||
deletId: '',
|
||||
}
|
||||
},
|
||||
computed: { ...mapState(['user']) },
|
||||
@@ -200,6 +201,14 @@ export default {
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.data = res.data.records
|
||||
if (this.data) {
|
||||
this.data.map((item) => {
|
||||
if (item.images) {
|
||||
item.images = JSON.parse(item.images || '[]')
|
||||
}
|
||||
return item
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -218,15 +227,16 @@ export default {
|
||||
|
||||
toAdd(item) {
|
||||
console.log('编辑', '添加')
|
||||
// const { id } = item.id
|
||||
this.isList = false
|
||||
this.comp = 'add'
|
||||
this.params = 12313
|
||||
// if (id) {
|
||||
// this.comp = 'add'
|
||||
// this.params = id
|
||||
const id = item.id
|
||||
// this.isList = false
|
||||
// }
|
||||
// this.comp = 'add'
|
||||
// this.params = 12313
|
||||
if (id) {
|
||||
this.comp = 'add'
|
||||
// this.params = id
|
||||
this.params = 12313
|
||||
this.isList = false
|
||||
}
|
||||
},
|
||||
|
||||
toDetail(item) {
|
||||
@@ -236,8 +246,19 @@ export default {
|
||||
this.params = detail
|
||||
},
|
||||
|
||||
toDetele(item) {
|
||||
this.deletShow = true
|
||||
this.deletId = item.id
|
||||
},
|
||||
|
||||
delet() {
|
||||
console.log('delet')
|
||||
this.$http.post(`/app/appvisitvondolence/delete?ids=${this.deletId}`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$u.toast('删除成功!')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
showHide() {
|
||||
@@ -263,6 +284,13 @@ export default {
|
||||
this.current = 1
|
||||
// this.getList()
|
||||
},
|
||||
|
||||
previewImage(images, img) {
|
||||
uni.previewImage({
|
||||
urls: images.map((v) => v.url),
|
||||
current: img,
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="走访对象" prop="application" required style="position: relative">
|
||||
<u-input v-model="forms.application" disabled placeholder="请选择走访对象" @click="handerSelecUser" />
|
||||
<u-input v-model="forms.application" disabled placeholder="请选择走访对象" @click="toWalkObject" />
|
||||
<!-- @click="showObject = true" @click="toWalkObject" -->
|
||||
|
||||
<u-select v-model="showObject" :list="Objectlist" @confirm="applicaStatus"></u-select>
|
||||
@@ -37,8 +37,8 @@
|
||||
<div>{{ forms.description.length }}/500</div>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="图片(最多9张)" prop="images" class="avatars" required label-position="top">
|
||||
<AiUploader :def.sync="forms.images" multiple @list="change" placeholder="上传图片" :limit="9"></AiUploader>
|
||||
<u-form-item label="图片(最多9张)" prop="images" class="avatars" label-position="top">
|
||||
<AiUploader :def.sync="forms.images" multiple placeholder="上传图片" :limit="9"></AiUploader>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
</div>
|
||||
@@ -54,11 +54,12 @@
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import { mapActions } from 'vuex'
|
||||
import walkObject from './walkObject'
|
||||
|
||||
export default {
|
||||
name: 'add',
|
||||
components: {
|
||||
walkObject,
|
||||
},
|
||||
props: {},
|
||||
data() {
|
||||
@@ -92,48 +93,25 @@ export default {
|
||||
},
|
||||
computed: { ...mapState(['user']) },
|
||||
created() {
|
||||
console.log(this.user)
|
||||
this.areaIdProps = this.user.areaId
|
||||
this.$dict.load('realityStatus').then(() => {})
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
// ...mapActions(['selectEnterpriseContact']),
|
||||
handerSelecUser() {
|
||||
this.$http.post('/app/appapplicationinfo/queryApplicationListByType?type=0').then((res) => {
|
||||
if (res.code == 0) {
|
||||
// this.data = res.data.records
|
||||
}
|
||||
mounted() {
|
||||
this.$on('black', (data) => {
|
||||
console.log(data)
|
||||
})
|
||||
},
|
||||
|
||||
// handerSelecUser() {
|
||||
// console.log(this.clickedUserSelect)
|
||||
// if (this.clickedUserSelect) return this.$u.toast('正在打开人员选择器')
|
||||
|
||||
// this.clickedUserSelect = true
|
||||
// this.selectEnterpriseContact({
|
||||
// fromDepartmentId: 0,
|
||||
// type: ['user'],
|
||||
// optionId: this.forms.application?.map((e) => e.id),
|
||||
// })
|
||||
// .then((res) => {
|
||||
// this.change(res?.userList || [])
|
||||
// this.clickedUserSelect = false
|
||||
// })
|
||||
// .catch(() => {
|
||||
// this.clickedUserSelect = false
|
||||
// })
|
||||
// },
|
||||
|
||||
methods: {
|
||||
submit() {
|
||||
console.log(1)
|
||||
if (this.flag) return
|
||||
|
||||
this.$refs.uForm.validate((valid) => {
|
||||
if (valid) {
|
||||
if (!this.forms.application) {
|
||||
return this.$u.toast('请选择走访对象')
|
||||
}
|
||||
// if (!this.forms.application) {
|
||||
// return this.$u.toast('请选择走访对象')
|
||||
// }
|
||||
if (!this.forms.title) {
|
||||
return this.$u.toast('请输入入户走访事项')
|
||||
}
|
||||
@@ -149,17 +127,18 @@ export default {
|
||||
|
||||
console.log(3)
|
||||
this.flag = true
|
||||
this.$instance
|
||||
.post(`/appjobresume/addOrUpdate`, {
|
||||
this.$http
|
||||
.post(`/app/appvisitvondolence/addOrUpdate`, {
|
||||
areaId: this.forms.areaId,
|
||||
applicationId: '',
|
||||
// object: this.forms.object,
|
||||
applicationId: '02fcf19c81154f6ea9560d9a9deee9f4',
|
||||
optionId: '4703806718f842a98a28df554c6aa6b2',
|
||||
reality: this.forms.reality == Number ? this.forms.reality : this.forms.realitylabel,
|
||||
title: this.forms.title,
|
||||
description: this.forms.description,
|
||||
images: imgs || [],
|
||||
// education: this.form.education == Number ? this.form.education : this.forms.educationValue,
|
||||
id: '',
|
||||
createUserId: this.user.id,
|
||||
createUserName: this.user.name,
|
||||
images: JSON.stringify(imgs) || [],
|
||||
id: this.id,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(4)
|
||||
@@ -197,14 +176,10 @@ export default {
|
||||
this.forms.realityValue = e[0].value
|
||||
},
|
||||
|
||||
// toWalkObject() {
|
||||
// this.addList = false
|
||||
// this.comp = 'walkObject'
|
||||
// this.params = 111
|
||||
// },
|
||||
|
||||
change(e) {
|
||||
console.log(e)
|
||||
toWalkObject() {
|
||||
this.addList = false
|
||||
this.comp = 'walkObject'
|
||||
this.params = 111
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -42,11 +42,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'detail',
|
||||
components: {
|
||||
},
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
@@ -63,7 +61,7 @@ export default {
|
||||
mounted() {},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.$instance.post(`apppolicypromotion/queryDetailByIdWeChat?id=${this.id}`).then((res) => {
|
||||
this.$http.post(`/app/appvisitvondolence/queryDetailById?id=${this.id}`).then((res) => {
|
||||
if (res?.data) {
|
||||
this.data = res.data
|
||||
}
|
||||
|
||||
190
src/apps/AppWalkask/walkObject.vue
Normal file
190
src/apps/AppWalkask/walkObject.vue
Normal file
@@ -0,0 +1,190 @@
|
||||
<template>
|
||||
<div class="walkObject">
|
||||
<u-navbar title="选择走访慰问对象" back-icon-color="#fff" title-color="#fff" title-width="300" title-size="36" :border-bottom="false" :background="backgroundNavbar"> </u-navbar>
|
||||
|
||||
<div class="header-top">
|
||||
<u-search v-model="keyword" placeholder="搜索" :show-action="false" bg-color="#F5F5F5" search-icon-color="#CCCCCC" placeholder-color="#999999" @search="handerSearch" @clear="handerClear"></u-search>
|
||||
</div>
|
||||
|
||||
<div class="header-middle">
|
||||
<div class="hint">可选范围</div>
|
||||
|
||||
<div class="empty-div"></div>
|
||||
|
||||
<div class="Checkbox">
|
||||
<div v-if="DiyList.length > 0">
|
||||
<u-collapse event-type="close" arrowaccordion>
|
||||
<u-collapse-item v-for="(item, index) in DiyList" :title="item.menuLevel2Name" :key="index" @change="selectUser(item)">
|
||||
<u-checkbox-group @change="checkboxGroupChange">
|
||||
<u-checkbox @change="checkboxChange" v-model="e.checked" v-for="(e, index) in userList" :key="index" :name="e.create_user_name" shape="circle">{{ e.name00 }}</u-checkbox>
|
||||
</u-checkbox-group>
|
||||
</u-collapse-item>
|
||||
</u-collapse>
|
||||
</div>
|
||||
|
||||
<AiEmpty description="没有数据" class="emptyWrap" v-else> </AiEmpty>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fixedBtn">
|
||||
<div class="typeName">
|
||||
<span class="typeName-box" v-for="(item, index) in list" :key="index" v-if="item.checked == true">
|
||||
{{ item.name }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="subBtn" @click="submit">确定选择</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'walkObject',
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
DiyList: {},
|
||||
userList: {},
|
||||
backgroundNavbar: {
|
||||
backgroundColor: '#3975C6',
|
||||
},
|
||||
keyword: '',
|
||||
list: [
|
||||
{
|
||||
name: '残疾人',
|
||||
},
|
||||
{
|
||||
name: '精神病患者',
|
||||
},
|
||||
{
|
||||
name: '吸毒人员',
|
||||
},
|
||||
],
|
||||
nameList: [],
|
||||
current: 1,
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
created() {
|
||||
this.getDiyList()
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
getDiyList() {
|
||||
this.$http.post('/app/appapplicationinfo/queryApplicationListByType?type=0').then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.DiyList = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
selectUser(item) {
|
||||
console.log(item)
|
||||
this.$http.post(`/app/appapplicationinfo/list?appId=${item.id}¤t=${this.current}&size=${99}`, { searchParam: this.keyword }).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.userList = res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
checkboxGroupChange(a) {
|
||||
console.log(a)
|
||||
},
|
||||
|
||||
checkboxChange(e) {
|
||||
console.log(e)
|
||||
},
|
||||
|
||||
submit() {
|
||||
this.userList.map((item) => {
|
||||
if (item.checked == true) {
|
||||
console.log(11, 'back', 'item')
|
||||
this.$emit('back', item)
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.walkObject {
|
||||
background: #ffffff;
|
||||
padding-bottom: 118px;
|
||||
.header-top {
|
||||
background: #fff;
|
||||
padding: 20px 32px;
|
||||
}
|
||||
|
||||
.header-middle {
|
||||
.hint {
|
||||
padding: 0 20px 0 32px;
|
||||
height: 112px;
|
||||
line-height: 112px;
|
||||
box-shadow: 0px 1px 0px 0px #e4e5e6;
|
||||
font-size: 30px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.empty-div {
|
||||
height: 16px;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
.Checkbox {
|
||||
padding: 0 20px 0 30px;
|
||||
::v-deep .u-checkbox-group {
|
||||
.u-checkbox {
|
||||
// position: relative;
|
||||
height: 112px;
|
||||
}
|
||||
}
|
||||
::v-deep .u-collapse {
|
||||
.u-collapse-item {
|
||||
.u-collapse-body {
|
||||
display: inline;
|
||||
.u-checkbox-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fixedBtn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 0 32px;
|
||||
.subBtn {
|
||||
margin: 20px 0 18px 0;
|
||||
padding: 18px 32px;
|
||||
background: #1365dd;
|
||||
border-radius: 4px;
|
||||
font-size: 32px;
|
||||
color: #ffffff;
|
||||
}
|
||||
.typeName {
|
||||
// margin: 48px 0 44px 0;
|
||||
margin: 36px 0 22px 0;
|
||||
.typeName-box {
|
||||
padding: 16px 14px;
|
||||
background: #eaeef1;
|
||||
border-radius: 8px;
|
||||
font-size: 30px;
|
||||
font-weight: 500;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.typeName-box:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user