邻里互助

This commit is contained in:
liuye
2023-03-16 16:49:07 +08:00
parent 05959f7e24
commit aebe3d75d7
4 changed files with 13 additions and 10 deletions

View File

@@ -1,14 +1,14 @@
<template>
<ai-detail class="content-add">
<template slot="title">
<ai-title :title="params.id ? '编辑帖子' : '发帖'" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
<ai-title :title="params.id ? '编辑帖子' : '我要发帖'" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
</ai-title>
</template>
<template slot="content">
<ai-card title="发帖信息">
<template #content>
<el-form class="ai-form" :model="form" label-width="120px" ref="form">
<el-form-item label="单位" prop="publishDepartName" style="width: 100%;" :rules="[{ required: true, message: '请选择单位', trigger: 'change' }]">
<el-form-item label="发布单位" prop="publishDepartName" style="width: 100%;" :rules="[{ required: true, message: '请选择单位', trigger: 'change' }]">
<ai-picker :instance="instance" multiple @pick="e => onUserChange(e)" dialogTitle="选择部门" action="/app/wxcp/wxdepartment/departList">
<div class="time-select">
<span class="dept-name" style="color:#999;" v-if="!form.publishDepartName">选择部门</span>
@@ -29,8 +29,8 @@
:limit="9">
</ai-uploader>
</el-form-item>
<el-form-item prop="themeId" style="width: 100%;" label="话题">
<ai-select v-model="form.themeId" :selectList="talkList" placeholder="请选择话题" />
<el-form-item prop="themeId" style="width: 100%;" label="关联话题">
<ai-select v-model="form.themeId" :selectList="talkList" placeholder="请选择关联话题" />
</el-form-item>
</el-form>
</template>
@@ -65,7 +65,8 @@
},
id: '',
department: [],
talkList: []
talkList: [],
isFlag: false
}
},
@@ -92,8 +93,10 @@
},
confirm () {
if(this.isFlag) return
this.$refs.form.validate((valid) => {
if (valid) {
this.isFlag = true
this.instance.post(`/app/appneighborhoodassistance/addOrUpdate`, {
...this.form,
publishDepartId: this.form.publishDepartIdList.join(',')

View File

@@ -7,6 +7,7 @@
<template slot="content">
<ai-search-bar class="search-bar">
<template #left>
<el-button size="small" type="primary" icon="iconfont iconAdd" @click="toAdd('')">我要发帖</el-button>
<el-date-picker
v-model="dateList"
@change="search.current = 1,getList()"
@@ -17,7 +18,6 @@
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
<el-button size="small" type="primary" icon="iconfont iconAdd" @click="toAdd('')">添加</el-button>
</template>
<template #right>
<el-input
@@ -73,7 +73,7 @@
colConfigs: [
{ prop: 'content', label: '内容', align: 'left'},
{ prop: 'createUserName', label: '发帖人', align: 'center', width: '120' },
{ prop: 'createTime', label: '创建时间', align: 'center', width: '120' },
{ prop: 'createTime', label: '创建时间', align: 'center', width: '180' },
{ prop: 'commentCount', label: '评论数', align: 'center', width: '120' },
{ prop: 'appreciateCount', label: '点赞数', align: 'center', width: '120' },
{ prop: 'sharedCount', label: '分享数', align: 'center', width: '120' },

View File

@@ -11,7 +11,7 @@
<el-form-item prop="title" style="width: 100%;" label="话题名称" :rules="[{required: true, message: '请输入话题名称', trigger: 'change'}]">
<el-input size="small" placeholder='如“社会保障”仅限4个字' v-model="form.title" maxlength="4" :show-word-limit="true"></el-input>
</el-form-item>
<el-form-item prop="title" style="width: 100%;" label="排序" :rules="[{required: true, message: '请输入排序', trigger: 'change'}]">
<el-form-item prop="showIndex" style="width: 100%;" label="排序" :rules="[{required: true, message: '请输入排序', trigger: 'change'}]">
<el-input-number v-model="form.showIndex" :min="1" :max="100" size="small"></el-input-number>
<span class="tips">请输入数字数字越小排序越前</span>
</el-form-item>
@@ -61,7 +61,7 @@
description: '',
files: [],
picUrl: '',
status: '0',
status: '1',
},
}
},

View File

@@ -72,7 +72,7 @@
{ prop: 'createUserName', label: '创建人', align: 'center', width: '120' },
{ prop: 'createTime', label: '创建时间', align: 'center', width: '180' },
{ prop: 'partakeCount', label: '参与话题数', align: 'center', width: '120' },
{ prop: 'showIndex', label: '序', align: 'center', width: '120' },
{ prop: 'showIndex', label: '序', align: 'center', width: '120' },
{ slot: 'status'},
{ slot: 'options'},
],