3
0
Fork 0

fix(regiest): 修复安置地区变化时无法触发表单校验的bug

This commit is contained in:
ywk 2025-04-07 16:06:47 +08:00
parent 57393066d7
commit ce3df63cb3
2 changed files with 49 additions and 41 deletions

View File

@ -263,20 +263,21 @@
<view <view
class="theorderflex1" class="theorderflex1"
v-if="item.ifshow" v-if="item.ifshow"
:key="index"
@click="goTo(item.url)" @click="goTo(item.url)"
> >
<image class="order_img" :src="item.imgurl" /> <image class="order_img" :src="item.imgurl" />
<view class="order_text">{{ item.name }}</view> <view class="order_text">{{ item.name }}</view>
</view> </view>
</template> </template>
<view <!-- <view
class="theorderflex1" class="theorderflex1"
@click="goTo('/pages/mine/feedBack/feedBack')" @click="goTo('/pages/mine/feedBack/feedBack')"
> >
<image class="order_img" src="../../static/images/my_icon12.png" /> <image class="order_img" src="../../static/images/my_icon12.png" />
<view class="order_text">{{ '意见反馈' }}</view> <view class="order_text">{{ '意见反馈' }}</view>
</view> </view> -->
<picker <!-- <picker
:range="getLanguageList" :range="getLanguageList"
:value="index" :value="index"
range-key="label" range-key="label"
@ -286,8 +287,8 @@
<image class="order_img" src="../../static/images/mark6.png" /> <image class="order_img" src="../../static/images/mark6.png" />
<view class="order_text">{{ '多语言切换' }}</view> <view class="order_text">{{ '多语言切换' }}</view>
</view> </view>
</picker> </picker> -->
<view <!-- <view
class="theorderflex1" class="theorderflex1"
@click="goTo('/pages/mine/branchAddress/branchAddress')" @click="goTo('/pages/mine/branchAddress/branchAddress')"
> >
@ -295,12 +296,12 @@
<view class="order_text" <view class="order_text"
>{{ '分公司' }}{{ '地址' }}</view >{{ '分公司' }}{{ '地址' }}</view
> >
</view> </view> -->
<view class="theorderflex1" @click="goYear"> <!-- <view class="theorderflex1" @click="goYear">
<image class='order_img' src="../../static/images/my_icon12.png" /> <image class='order_img' src="../../static/images/my_icon12.png" />
<view class="order_text">{{ '年度奖衔' }}</view> <view class="order_text">{{ '年度奖衔' }}</view>
</view> </view> -->
<!-- <view class="theorderflex1" @click="goTo('')"> <!-- <view class="theorderflex1" @click="goTo('')">
<image class='order_img' src="../../static/images/my_icon12.png" /> <image class='order_img' src="../../static/images/my_icon12.png" />
<view class="order_text">关于我们</view> <view class="order_text">关于我们</view>
@ -345,7 +346,7 @@
</u-button> </u-button>
</view> </view>
</u-popup> </u-popup>
<talentList :drShow="drShow" @closeShow="closeShow"></talentList> <!-- <talentList :drShow="drShow" @closeShow="closeShow"></talentList> -->
</view> </view>
</template> </template>
@ -480,14 +481,14 @@ export default {
menuKey: "", menuKey: "",
ifshow: false, ifshow: false,
}, },
{ // {
url: "2", // url: "2",
name: "达人榜单", // name: "",
imgurl: "../../static/images/my_icon10.png", // imgurl: "../../static/images/my_icon10.png",
menuKey: "", // menuKey: "",
ifdr: 1, // ifdr: 1,
ifshow: false, // ifshow: false,
}, // },
{ {
url: "/pages/mine/myMarket/myMarket", url: "/pages/mine/myMarket/myMarket",
name: '我的市场', name: '我的市场',
@ -495,20 +496,20 @@ export default {
menuKey: "", menuKey: "",
ifshow: false, ifshow: false,
}, },
{ // {
url: "/pages/mine/globalDistribution/globalDistribution", // url: "/pages/mine/globalDistribution/globalDistribution",
name: '全球分布', // name: '',
imgurl: "../../static/images/my_icon9.png", // imgurl: "../../static/images/my_icon9.png",
menuKey: "", // menuKey: "",
ifshow: false, // ifshow: false,
}, // },
{ // {
url: "/pages/mine/honorHall/honorHall", // url: "/pages/mine/honorHall/honorHall",
name: "荣誉馆", // name: "",
imgurl: "../../static/images/my_icon9.png", // imgurl: "../../static/images/my_icon9.png",
menuKey: "", // menuKey: "",
ifshow: false, // ifshow: false,
}, // },
{ {
url: "/pages/mine/giftAddress/list", url: "/pages/mine/giftAddress/list",
name: '礼品地址', name: '礼品地址',
@ -516,13 +517,13 @@ export default {
menuKey: "", menuKey: "",
ifshow: false, ifshow: false,
}, },
{ // {
url: "/pages/mine/space/list", // url: "/pages/mine/space/list",
name: '创客空间', // name: '',
imgurl: "../../static/images/mark9.png", // imgurl: "../../static/images/mark9.png",
menuKey: "", // menuKey: "",
ifshow: false, // ifshow: false,
}, // },
{ {
url: "/pages/mine/addNewPv/index", url: "/pages/mine/addNewPv/index",
name: '新增业绩', name: '新增业绩',

View File

@ -677,7 +677,7 @@ export default {
{ {
required: true, required: true,
validator: this.placeDeptPass, validator: this.placeDeptPass,
trigger: ["blur"], trigger: ["change"],
}, },
], ],
memberName: [ memberName: [
@ -941,6 +941,7 @@ export default {
if (res.code == 200) { if (res.code == 200) {
this.form.placeDept = res.data.placeDept; this.form.placeDept = res.data.placeDept;
this.form.placeDeptLabel = res.data.placeDeptVal; this.form.placeDeptLabel = res.data.placeDeptVal;
this.$set(this.form, 'placeDeptLabel', res.data.placeDeptVal);
this.form.placeParent = res.data.placeParent; this.form.placeParent = res.data.placeParent;
this.form.placeParentName = res.data.placeParentName; this.form.placeParentName = res.data.placeParentName;
this.form.parentName = res.data.parentName; this.form.parentName = res.data.parentName;
@ -1007,6 +1008,7 @@ export default {
if (!value) { if (!value) {
callback(new Error('请选择安置位置')); callback(new Error('请选择安置位置'));
} else { } else {
console.log(value, '....value?');
api api
.validPPcode({ .validPPcode({
parent: this.form.parent, parent: this.form.parent,
@ -1283,9 +1285,14 @@ export default {
}, },
surePlace(e) { surePlace(e) {
const { value } = e; const { value } = e;
this.form.placeDept = value[0].id; // this.form.placeDept = value[0].id;
this.form.placeDeptLabel = value[0].label; // this.form.placeDeptLabel = value[0].label;
this.$set(this.form, 'placeDept', value[0].id);
this.$set(this.form, 'placeDeptLabel', value[0].label);
this.isPlace = false; this.isPlace = false;
this.$nextTick(() => {
this.$refs.uForm.validateField('placeDeptLabel');
});
}, },
changeCountry(index) { changeCountry(index) {