页面修改
This commit is contained in:
@@ -11,7 +11,7 @@ const install = (Vue, vm) => {
|
||||
vm.$u.api = {
|
||||
//获取单位列表
|
||||
getUnits:(params = {}) => vm.$u.get(config.adminPath+'/property/enum-fetcher/enum-values/getUnit',params),
|
||||
|
||||
getType:(params = {}) => vm.$u.get(config.adminPath+'/property/xcx/system/type/'+params),
|
||||
codesub: (params = {}) => vm.$u.get(config.adminPath+'/property/visitorManagement/useqr', params),
|
||||
uploadimg: (params = {}) => vm.$u.post(config.adminPath+'/resource/oss/upload', params),
|
||||
fksub: (params = {}) => vm.$u.post(config.adminPath+'/property/visitorManagement/add', params),
|
||||
|
@@ -39,13 +39,13 @@
|
||||
<input type="text" placeholder="请简要描述拜访目的" v-model="formData.visitingReason" />
|
||||
</view> -->
|
||||
<view class="select-wrapper" :class="{active: showTypeDialog}" @click.stop="showTypeDialog = true">
|
||||
<text>{{ formData.visitingReason || '请选择拜访事由' }}</text>
|
||||
<text>{{ getReasonLabel(formData.visitingReason) || '请选择拜访事由' }}</text>
|
||||
<image class="filter-img" src="/static/ic_down_arrow_g.png"/>
|
||||
<view v-if="showTypeDialog" class="dropdown">
|
||||
<view class="dropdown-list">
|
||||
<view v-for="(item, index) in typeList" :key="index" class="dropdown-item"
|
||||
<view v-for="item in typeList" :key="item.dictValue" class="dropdown-item"
|
||||
@click.stop="selectVisitingReason(item)">
|
||||
{{ item }}
|
||||
{{ item.dictLabel }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -64,17 +64,20 @@
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">被访单位</text>
|
||||
<view class="select-wrapper" :class="{active: showUnitDialog}" @click.stop="showUnitDialog = true">
|
||||
<text>{{ formData.interviewedUnit || '请选择被访单位' }}</text>
|
||||
<image class="filter-img" src="/static/ic_down_arrow_g.png"/>
|
||||
<view v-if="showUnitDialog" class="dropdown">
|
||||
<view class="dropdown-list">
|
||||
<view v-for="(item, index) in unitList" :key="index" class="dropdown-item"
|
||||
@click.stop="selectInterviewedUnit(item)">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="select-wrapper" :class="{active: showUnitDialog}" @click.stop="showUnitDialog = true">-->
|
||||
<!-- <text>{{ formData.interviewedUnit || '请选择被访单位' }}</text>-->
|
||||
<!-- <image class="filter-img" src="/static/ic_down_arrow_g.png"/>-->
|
||||
<!-- <view v-if="showUnitDialog" class="dropdown">-->
|
||||
<!-- <view class="dropdown-list">-->
|
||||
<!-- <view v-for="(item, index) in unitList" :key="index" class="dropdown-item"-->
|
||||
<!-- @click.stop="selectInterviewedUnit(item)">-->
|
||||
<!-- {{ item.name }}-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<view class="input-wrapper">
|
||||
<input type="text" placeholder="请输入被访单位名称" v-model="formData.interviewedUnit"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -207,7 +210,7 @@ export default {
|
||||
2: '已取消',
|
||||
3: '已完成'
|
||||
},
|
||||
typeList: ['业务洽谈', '会议参与', '面试应聘', '技术支持', '办事咨询', '调研考察'],
|
||||
typeList: [],
|
||||
unitList: [],
|
||||
showTypeDialog: false,
|
||||
showUnitDialog: false
|
||||
@@ -234,7 +237,8 @@ export default {
|
||||
// #ifdef APP-PLUS
|
||||
plus.screen.lockOrientation('default');
|
||||
// #endif
|
||||
|
||||
// 获取业务类型
|
||||
this.getTypes();
|
||||
// 获取单位列表
|
||||
this.getUnits();
|
||||
},
|
||||
@@ -258,12 +262,22 @@ export default {
|
||||
this.unitList = res.data;
|
||||
}
|
||||
},
|
||||
async getTypes() {
|
||||
let res = await this.$u.api.getType("reason_for_visit");
|
||||
if (res.code == '200') {
|
||||
this.typeList = res.data;
|
||||
}
|
||||
},
|
||||
// 添加选择拜访事由方法
|
||||
selectVisitingReason(reason) {
|
||||
this.formData.visitingReason = reason;
|
||||
this.formData.visitingReason = reason.dictValue;
|
||||
this.showTypeDialog = false;
|
||||
},
|
||||
|
||||
//根据字典获取
|
||||
getReasonLabel(value) {
|
||||
const item = this.typeList.find(item => item.dictValue === value);
|
||||
return item ? item.dictLabel : '';
|
||||
},
|
||||
// 添加选择被访单位方法
|
||||
selectInterviewedUnit(unit) {
|
||||
this.formData.interviewedUnit = unit.name;
|
||||
@@ -414,6 +428,7 @@ export default {
|
||||
|
||||
// 提交表单
|
||||
submitForm() {
|
||||
console.log(this.formData);
|
||||
const errorMsg = this.validateForm();
|
||||
if (errorMsg) {
|
||||
uni.showToast({
|
||||
|
Reference in New Issue
Block a user