四邻联动
This commit is contained in:
@@ -5,16 +5,17 @@
|
|||||||
<span class="tips">*</span>党员信息
|
<span class="tips">*</span>党员信息
|
||||||
</div>
|
</div>
|
||||||
<div class="value">
|
<div class="value">
|
||||||
<span class="color-999">请选择</span>
|
<AiPagePicker type="party" @select="handlePartySelect" single>
|
||||||
<u-icon name="arrow-right" color="#ddd" size="28"></u-icon>
|
<AiMore v-model="form.partyName" placeholder="请选择"/>
|
||||||
|
</AiPagePicker>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex mar-b16">
|
<div class="flex mar-b16">
|
||||||
<div class="label">
|
<div class="label">
|
||||||
<span class="tips">*</span>四邻对象
|
<span class="tips">*</span>四邻对象
|
||||||
</div>
|
</div>
|
||||||
<div class="value">
|
<div class="value" @click="selectUser">
|
||||||
<span class="color-999">请选择</span>
|
<span :class="form.residentName ? '' : 'color-999'">{{form.residentName || '请选择'}}</span>
|
||||||
<u-icon name="arrow-right" color="#ddd" size="28"></u-icon>
|
<u-icon name="arrow-right" color="#ddd" size="28"></u-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -22,8 +23,8 @@
|
|||||||
<div class="label">
|
<div class="label">
|
||||||
<span class="tips">*</span>事件日期
|
<span class="tips">*</span>事件日期
|
||||||
</div>
|
</div>
|
||||||
<div class="value">
|
<div class="value" @click="showTimeSelect=true">
|
||||||
<span class="color-999">请选择</span>
|
<span :class="form.linksageDate ? '' : 'color-999'">{{form.linksageDate || '请选择'}}</span>
|
||||||
<u-icon name="arrow-right" color="#ddd" size="28"></u-icon>
|
<u-icon name="arrow-right" color="#ddd" size="28"></u-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -33,12 +34,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-area">
|
<div class="text-area">
|
||||||
<u-input v-model="value" type="textarea" :height="150" :auto-height="true" maxlength="500" placeholder="请输入事件内容描述" placeholder-style="font-size:16px;" />
|
<u-input v-model="form.description" type="textarea" :height="150" :auto-height="true" maxlength="500" placeholder="请输入事件内容描述" placeholder-style="font-size:16px;" />
|
||||||
<div class="hint">{{ value.length }}/500</div>
|
<div class="hint">{{ form.description.length }}/500</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer" @click="confirm">
|
||||||
<div class="btn">确认提交</div>
|
<div class="btn">确认提交</div>
|
||||||
</div>
|
</div>
|
||||||
|
<u-picker v-model="showTimeSelect" mode="time" :params="params" @confirm="confirmSelectTime"></u-picker>
|
||||||
|
<u-select :list="userList" value-name="id" label-name="name" v-model="showUserSelect" @confirm="confirmSelectUser"></u-select>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -49,7 +52,19 @@ export default {
|
|||||||
name: 'Add',
|
name: 'Add',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
value: ''
|
value: '',
|
||||||
|
form: {
|
||||||
|
partyName: '',
|
||||||
|
partyId: '',
|
||||||
|
residentName: '',
|
||||||
|
residentId: '',
|
||||||
|
linksageDate: '',
|
||||||
|
description: ''
|
||||||
|
},
|
||||||
|
showTimeSelect: false,
|
||||||
|
userList: [],
|
||||||
|
showUserSelect: false,
|
||||||
|
params: {year: true, month: true, day: true, hour: false, minute: false, second: false},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -61,10 +76,65 @@ export default {
|
|||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
document.title = '新增'
|
document.title = '新增'
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
rules() {
|
||||||
|
return {
|
||||||
|
partyId: '请选择党员信息',
|
||||||
|
residentId: '请选择四邻对象',
|
||||||
|
linksageDate: '请选择事件日期',
|
||||||
|
description: '请输入事件描述',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
confirm() {
|
||||||
|
const rules = this.rules()
|
||||||
|
for (let v of Object.keys(rules)) {
|
||||||
|
if (!this.form[v]) {
|
||||||
|
return this.$u.toast(rules[v])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.$http.post('/app/apppartyfourlinkage/addOrUpdate', {...this.form}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$u.toast('提交成功')
|
||||||
|
uni.$emit('reload')
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}).catch((err) => {
|
||||||
|
this.$u.toast(err)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
confirmSelectTime(e) {
|
||||||
|
this.form.linksageDate = e.year + '-' + e.month + '-' + e.day
|
||||||
|
},
|
||||||
|
selectUser() {
|
||||||
|
if(!this.form.partyId) {
|
||||||
|
return this.$u.toast('请先选择党员信息')
|
||||||
|
}
|
||||||
|
this.showUserSelect = true
|
||||||
|
},
|
||||||
|
confirmSelectUser(e) {
|
||||||
|
this.form.residentId = e[0].value
|
||||||
|
this.form.residentName = e[0].label
|
||||||
|
},
|
||||||
|
handlePartySelect(e) {
|
||||||
|
this.form.partyId = e[0].id
|
||||||
|
this.form.partyName = e[0].name
|
||||||
|
this.getUserList()
|
||||||
|
},
|
||||||
|
getUserList() {
|
||||||
|
this.$http.post('/app/apppartyfourresident/listFourResident', null, {
|
||||||
|
params: {
|
||||||
|
size: 10,
|
||||||
|
partyId: this.form.partyId,
|
||||||
|
},
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.userList = res.data.records
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -4,38 +4,28 @@
|
|||||||
<div flex>
|
<div flex>
|
||||||
<div class="time-select" @click="showTimeSelect=true">
|
<div class="time-select" @click="showTimeSelect=true">
|
||||||
<img src="./components/img/time-icon.png" alt="" class="time-icon">
|
<img src="./components/img/time-icon.png" alt="" class="time-icon">
|
||||||
<span>{{search.time || '日期选择' }}</span>
|
<span>{{search.linksageDate || '日期选择' }}</span>
|
||||||
<img src="./components/img/down-icon-666.png" alt="" v-if="!search.time" class="mar-r16">
|
<img src="./components/img/down-icon-666.png" alt="" v-if="!search.linksageDate" class="mar-r16">
|
||||||
</div>
|
</div>
|
||||||
<u-icon name="close-circle" color="#999" size="32" v-if="search.time" @click="clearTime" class="mar-r16"></u-icon>
|
<u-icon name="close-circle" color="#999" size="32" v-if="search.linksageDate" @click="clearTime" class="mar-r16"></u-icon>
|
||||||
<u-search placeholder="请输入四邻对象、描述、党员信息" :show-action="false" search-icon-color="#ccc" v-model="search.title"
|
<u-search placeholder="请输入四邻对象、描述、党员信息" :show-action="false" search-icon-color="#ccc" v-model="search.title"
|
||||||
@search="isMore = false, search.current = 1, getList()"/>
|
@search="isMore = false, search.current = 1, getList()"/>
|
||||||
</div>
|
</div>
|
||||||
</AiTopFixed>
|
</AiTopFixed>
|
||||||
<div class="list-content">
|
<div class="list-content" v-if="list.length">
|
||||||
<div class="item" @click="toDetail">
|
<div class="item" @click="toDetail(item.id)" v-for="(item, index) in list" :key="index">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<p class="title">帮助赵顺伟咨询户口迁移问题帮助赵顺伟咨询户口迁移问题</p>
|
<p class="title">{{item.description}}</p>
|
||||||
<div class="info"><span class="label">党员信息</span>张三</div>
|
<div class="info"><span class="label">党员信息</span>{{item.partyName}}</div>
|
||||||
<div class="info"><span class="label">四邻对象</span>张三</div>
|
<div class="info"><span class="label">四邻对象</span>{{item.residentName}}</div>
|
||||||
<div class="info"><span class="label">事件日期</span>2022-04-15</div>
|
<div class="info"><span class="label">事件日期</span>{{item.linksageDate}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottom status0">
|
<div class="bottom status0">
|
||||||
<span class="tips"></span>待审核
|
<span class="tips"></span>{{$dict.getLabel('partyFourLinkageStatus', item.status)}}
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="item">
|
|
||||||
<div class="top">
|
|
||||||
<p class="title">帮助赵顺伟咨询户口迁移问题帮助赵顺伟咨询户口迁移问题</p>
|
|
||||||
<div class="info"><span class="label">党员信息</span>张三</div>
|
|
||||||
<div class="info"><span class="label">四邻对象</span>张三</div>
|
|
||||||
<div class="info"><span class="label">事件日期</span>2022-04-15</div>
|
|
||||||
</div>
|
|
||||||
<div class="bottom status0">
|
|
||||||
<span class="tips"></span>待审核
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<AiEmpty v-else></AiEmpty>
|
||||||
<div class="footer" @click="toAdd">
|
<div class="footer" @click="toAdd">
|
||||||
<div class="btn">新增联动记录</div>
|
<div class="btn">新增联动记录</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -51,9 +41,11 @@ export default {
|
|||||||
appName: '四邻联动',
|
appName: '四邻联动',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
search: {title: '', time: ''},
|
search: {title: '', linksageDate: ''},
|
||||||
showTimeSelect: false,
|
showTimeSelect: false,
|
||||||
params: {year: true, month: true, day: true, hour: false, minute: false, second: false},
|
params: {year: true, month: true, day: true, hour: false, minute: false, second: false},
|
||||||
|
current: 1,
|
||||||
|
list: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -61,26 +53,53 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$dict.load('appSpecialTypeFive')
|
this.$dict.load('partyFourLinkageStatus').then(() => {
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
uni.$on('reload', () => {
|
||||||
|
this.getListInit()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
document.title = '四邻联动'
|
document.title = '四邻联动'
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getList() {
|
||||||
|
this.$http.post('/app/apppartyfourlinkage/list', null, {
|
||||||
|
params: {
|
||||||
|
size: 20,
|
||||||
|
current: this.current,
|
||||||
|
linksageDate: this.search.linksageDate
|
||||||
|
},
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getListInit() {
|
||||||
|
this.current = 1
|
||||||
|
this.datas = []
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
clearTime() {
|
clearTime() {
|
||||||
this.search.time = ''
|
this.search.linksageDate = ''
|
||||||
},
|
},
|
||||||
selectTime(e) {
|
selectTime(e) {
|
||||||
this.search.time = e.year + '-' + e.month + '-' + e.day
|
this.search.linksageDate = e.year + '-' + e.month + '-' + e.day
|
||||||
},
|
},
|
||||||
toAdd() {
|
toAdd() {
|
||||||
uni.navigateTo({url: './Add'})
|
uni.navigateTo({url: './Add'})
|
||||||
},
|
},
|
||||||
toDetail() {
|
toDetail(id) {
|
||||||
uni.navigateTo({url: './Detail'})
|
uni.navigateTo({url: `./Detail?id=${id}`})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
this.current = this.current + 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-area">
|
<div class="text-area">
|
||||||
<u-input v-model="value" type="textarea" :height="500" :auto-height="true" maxlength="500" placeholder="请输入审核意见" placeholder-style="font-size:16px;" />
|
<u-input v-model="remark" type="textarea" :height="500" :auto-height="true" maxlength="500" placeholder="请输入审核意见" placeholder-style="font-size:16px;" />
|
||||||
<div class="hint">{{ value.length }}/500</div>
|
<div class="hint">{{ remark.length }}/500</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer" @click="pass">
|
||||||
<div class="btn">确认提交</div>
|
<div class="btn">确认提交</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -22,22 +22,34 @@ export default {
|
|||||||
name: 'Add',
|
name: 'Add',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
value: ''
|
id: '',
|
||||||
|
remark: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['user']),
|
...mapState(['user']),
|
||||||
|
|
||||||
},
|
},
|
||||||
created() {
|
onLoad(option) {
|
||||||
this.$dict.load('appSpecialTypeFive')
|
this.id = option.id
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
document.title = '新增'
|
document.title = '新增'
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
pass() {
|
||||||
|
if(!this.remark) {
|
||||||
|
return this.$u.toast('请输入审核意见')
|
||||||
|
}
|
||||||
|
this.$http.post(`/app/apppartyfourlinkage/auditById?id=${this.id}&status=0&remark=${this.remark}`).then((res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$u.toast('审核成功')
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
})
|
||||||
|
uni.$emit('reload')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,23 +2,23 @@
|
|||||||
<div class="detail">
|
<div class="detail">
|
||||||
<div class="flex mar-b16">
|
<div class="flex mar-b16">
|
||||||
<div class="label">党员信息</div>
|
<div class="label">党员信息</div>
|
||||||
<div class="value">待审核</div>
|
<div class="value">{{form.partyName}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex mar-b16">
|
<div class="flex mar-b16">
|
||||||
<div class="label">四邻对象</div>
|
<div class="label">四邻对象</div>
|
||||||
<div class="value">张三</div>
|
<div class="value">{{form.residentName}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex mar-b16">
|
<div class="flex mar-b16">
|
||||||
<div class="label">事件日期</div>
|
<div class="label">事件日期</div>
|
||||||
<div class="value">2022-04-15</div>
|
<div class="value">{{form.linksageDate}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div class="label">事件描述</div>
|
<div class="label">事件描述</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">帮助赵顺伟咨询户口迁移问题</div>
|
<div class="content">{{form.description}}</div>
|
||||||
<div class="footer">
|
<div class="footer" v-if="form.status == 0">
|
||||||
<div @click="toContent">审核不通过</div>
|
<div @click="toContent">审核不通过</div>
|
||||||
<div class="btn">审核通过</div>
|
<div class="btn" @click="pass">审核通过</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -30,24 +30,47 @@ export default {
|
|||||||
name: 'detail',
|
name: 'detail',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
value: ''
|
id: '',
|
||||||
|
form: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(['user']),
|
...mapState(['user']),
|
||||||
|
|
||||||
},
|
},
|
||||||
created() {
|
onLoad(option) {
|
||||||
this.$dict.load('appSpecialTypeFive')
|
this.id = option.id
|
||||||
|
this.getDetail()
|
||||||
|
uni.$on('reload', () => {
|
||||||
|
this.getDetail()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
document.title = '四邻联动'
|
document.title = '四邻联动'
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toContent() {
|
toContent() {
|
||||||
uni.navigateTo({url: './Content'})
|
uni.navigateTo({url: `./Content?id=${this.id}`})
|
||||||
|
},
|
||||||
|
getDetail() {
|
||||||
|
this.$http.post(`/app/apppartyfourlinkage/queryDetailById?id=${this.id}`).then((res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.form = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
pass() {
|
||||||
|
this.$confirm('是否确认审核通过?').then(() => {
|
||||||
|
this.$http.post(`/app/apppartyfourlinkage/auditById?id=${this.id}&status=1`).then((res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$u.toast('审核成功')
|
||||||
|
this.getDetail()
|
||||||
|
uni.$emit('reload')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -37,8 +37,11 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
...mapState(['user']),
|
...mapState(['user']),
|
||||||
},
|
},
|
||||||
created() {
|
onLoad() {
|
||||||
this.getList()
|
this.getList()
|
||||||
|
uni.$on('reload', () => {
|
||||||
|
this.getListInit()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
document.title = '党员积分'
|
document.title = '党员积分'
|
||||||
|
|||||||
Reference in New Issue
Block a user