AiAreaPicker
This commit is contained in:
@@ -6,11 +6,7 @@
|
||||
<div class="header-content">
|
||||
<u-form :model="forms" ref="uForm" label-width="auto">
|
||||
<u-form-item label="区域选择" prop="areaId" required style="position: relative">
|
||||
<u-input v-model="forms.areaId" disabled placeholder="请选择区域" @click="showAreaId = true" />
|
||||
|
||||
<u-select v-model="showAreaId" :list="areaIdlist" @confirm="changeAreaId"></u-select>
|
||||
|
||||
<u-icon name="arrow-right" color="#CCCCCC" style="position: absolute; top: 25px; right: 30px"></u-icon>
|
||||
<ai-area-picker v-model="forms.areaId" ref="areaIds" :areaId="areaIdProps" @select="areaSelect" style="color: #333"> </ai-area-picker>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="走访对象" prop="object" style="position: relative">
|
||||
@@ -22,10 +18,11 @@
|
||||
<u-icon name="arrow-right" color="#CCCCCC" style="position: absolute; top: 25px; right: 30px"></u-icon>
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="现实状态" prop="nowStstus" required style="position: relative">
|
||||
<u-input v-model="forms.nowStstus" disabled placeholder="请选择走访对象" @click="showStstus = true" />
|
||||
<u-form-item label="现实状态" prop="reality" required style="position: relative">
|
||||
<u-input v-model="forms.reality" disabled placeholder="请选择走访对象" @click="showStstus = true" />
|
||||
|
||||
<u-select v-model="showStstus" :list="Objectlist" @confirm="changeStstus"></u-select>
|
||||
<!-- :disabled="!forms.object" -->
|
||||
<u-select v-model="showStstus" :list="$dict.getDict('realityStatus')" value-name="dictValue" label-name="dictName" @confirm="changeStstus"></u-select>
|
||||
|
||||
<u-icon name="arrow-right" color="#CCCCCC" style="position: absolute; top: 25px; right: 30px"></u-icon>
|
||||
</u-form-item>
|
||||
@@ -56,23 +53,27 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import AiUploader from '../../../components/AiUploader.vue'
|
||||
import AiBack from '../../../components/AiBack.vue'
|
||||
import walkObject from './walkObject.vue'
|
||||
import AiAreaPicker from '../../../components/AiAreaPicker'
|
||||
|
||||
export default {
|
||||
name: 'add',
|
||||
components: { AiUploader, AiBack, walkObject },
|
||||
components: { AiUploader, AiBack, walkObject, AiAreaPicker },
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
backgroundNavbar: {
|
||||
backgroundColor: '#3975C6',
|
||||
},
|
||||
|
||||
forms: {
|
||||
areaId: '',
|
||||
object: '',
|
||||
nowStstus: '',
|
||||
reality: '',
|
||||
realitylabel: '',
|
||||
things: '',
|
||||
content: '',
|
||||
avatar: [],
|
||||
@@ -102,10 +103,14 @@ export default {
|
||||
showStstus: false,
|
||||
flag: false,
|
||||
addList: true,
|
||||
areaIdProps: '',
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
created() {},
|
||||
computed: { ...mapState(['user']) },
|
||||
created() {
|
||||
this.areaIdProps = this.user.areaId
|
||||
this.$dict.load('realityStatus').then(() => {})
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
submit() {
|
||||
@@ -113,7 +118,7 @@ export default {
|
||||
|
||||
this.$refs.uForm.validate((valid) => {
|
||||
if (valid) {
|
||||
if (!this.form.areaId) {
|
||||
if (!this.areaId) {
|
||||
return this.$u.toast('请选择走访对象')
|
||||
}
|
||||
if (!this.form.things) {
|
||||
@@ -125,7 +130,7 @@ export default {
|
||||
.post(`/appjobresume/addOrUpdate`, {
|
||||
areaId: this.forms.areaId,
|
||||
object: this.forms.object,
|
||||
nowStstus: this.forms.nowStstus,
|
||||
reality: this.forms.reality == Number ? this.forms.reality : this.forms.realitylabel,
|
||||
things: this.forms.things,
|
||||
content: this.forms.content,
|
||||
avatar: this.forms.avatar[0],
|
||||
@@ -145,10 +150,12 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
changeAreaId(e) {
|
||||
console.log(e)
|
||||
this.forms.areaId = e[0].value
|
||||
this.forms.areaIdValue = e[0].label
|
||||
areaSelect(e) {
|
||||
if (e.type == 5) {
|
||||
this.forms.areaId = e.id
|
||||
} else {
|
||||
return this.$u.toast('请选择到村')
|
||||
}
|
||||
},
|
||||
|
||||
changeObject(e) {
|
||||
@@ -159,8 +166,8 @@ export default {
|
||||
|
||||
changeStstus(e) {
|
||||
console.log(e)
|
||||
this.forms.nowStstus = e[0].value
|
||||
this.forms.nowStstuslabel = e[0].label
|
||||
this.forms.reality = e[0].value
|
||||
this.forms.realitylabel = e[0].label
|
||||
},
|
||||
|
||||
toWalkObject() {
|
||||
|
||||
BIN
src/apps/AppWalkask/components/images/icon1.png
Normal file
BIN
src/apps/AppWalkask/components/images/icon1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 396 B |
BIN
src/apps/AppWalkask/components/images/icon2.png
Normal file
BIN
src/apps/AppWalkask/components/images/icon2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 766 B |
Reference in New Issue
Block a user