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