走访慰问
This commit is contained in:
@@ -24,34 +24,34 @@
|
||||
:visible.sync="isShow"
|
||||
width="1000px"
|
||||
height="500px"
|
||||
title="数据源"
|
||||
title="添加走访记录"
|
||||
@close="onClose"
|
||||
@onConfirm="onConfirm">
|
||||
<el-form ref="form" :model="form" label-width="110px" label-position="right">
|
||||
<ai-bar title="基本信息">基本信息</ai-bar>
|
||||
<div class="ai-form">
|
||||
<el-form-item label="走访人姓名" prop="description">
|
||||
<span>且听风吟</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证账号" prop="description">
|
||||
<span>2131313</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据源描述" prop="description" :rules="[{ required: true, message: '请输入数据源描述', trigger: 'blur' }]">
|
||||
<el-input
|
||||
<ai-bar title="走访记录"></ai-bar>
|
||||
<div class="ai-form" :model="form" label-width="110px" label-position="right">
|
||||
<el-form-item label="走访时间" prop="visitTime" :rules="[{ required: true, message: '请选择走访时间', trigger: 'change' }]">
|
||||
<el-date-picker
|
||||
v-model="form.visitTime"
|
||||
type="date"
|
||||
style="width: 100%;"
|
||||
size="small"
|
||||
placeholder="请输入数据源描述"
|
||||
v-model="form.description">
|
||||
</el-input>
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择走访时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="村微应用" prop="appId" :rules="[{ required: true, message: '请选择村微应用', trigger: 'change' }]">
|
||||
<el-select size="small" v-model="form.appId" placeholder="请选择村微应用">
|
||||
<el-option
|
||||
v-for="item in appList"
|
||||
:key="item.id"
|
||||
:label="item.appName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-form-item label="现实状态" prop="reality" :rules="[{ required: true, message: '请选择现实状态', trigger: 'change' }]">
|
||||
<ai-select
|
||||
v-model="form.reality"
|
||||
:selectList="dict.getDict('visitCondolenceReality')"
|
||||
laceholder="请选择现实状态">
|
||||
</ai-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="description" style="width: 100%;">
|
||||
<el-input type="textarea" placeholder="请输入描述" v-model="form.description" :rows="4"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片" prop="images" style="width: 100%;">
|
||||
<ai-uploader v-model="form.images" :instance="instance" :limit="9"></ai-uploader>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
@@ -61,32 +61,59 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'visit',
|
||||
|
||||
props: ['id'],
|
||||
props: ['id', 'dict', 'instance', 'appId', 'name'],
|
||||
|
||||
data () {
|
||||
return {
|
||||
appList: [],
|
||||
list: [],
|
||||
isShow: false,
|
||||
form: {
|
||||
description: '',
|
||||
appId: ''
|
||||
visitTime: '',
|
||||
reality: '',
|
||||
images: [],
|
||||
description: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.dict.load('visitCondolenceReality', () => {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList () {
|
||||
this.instance.post(`/app/appvisitvondolence/list?id=${this.id}&size=10000`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.list = res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onConfirm () {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.instance.post(`/appdiylargescreen/addOrUpdateDatasource`, {
|
||||
this.instance.post(`/app/appdiylargescreen/addOrUpdateDatasource`, {
|
||||
...this.form,
|
||||
id: this.id ? this.id : ''
|
||||
optionId: this.id,
|
||||
images: JSON.stringify(this.form.images),
|
||||
applicationId: this.appId,
|
||||
name: this.name,
|
||||
visitTime: this.form.visitTime + ' 23:59:59'
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(this.id ? '编辑成功' : '添加成功')
|
||||
this.$message.success('添加成功')
|
||||
this.isShow = false
|
||||
|
||||
this.getList()
|
||||
@@ -98,10 +125,6 @@
|
||||
|
||||
onClose () {
|
||||
|
||||
},
|
||||
|
||||
getList () {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<component :is="component" v-if="currIndex === 1"></component>
|
||||
<component :is="component" :name="params.name || params.name00" :id="params.id" :appId="appId" :dict="dict" :instance="instance" v-if="currIndex === 1"></component>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user