vue watch
watch: {
// 当为谁咨询是自己的时候, 将页面信息全初始化为本人信息, 否则, 初始为空
"form.findfor"(val) {
if (this.applyloacluserInfo == null) {
if (this.form.findfor == "自己") {
this.form.forname = this.loacluserInfo.username;
this.phone = this.loacluserInfo.phone;
} else {
this.form.forname = "";
this.form.sex = "请选择";
this.form.age = "";
this.phone = "";
}
return;
}
if (this.applyloacluserInfo.findfor == this.form.findfor) {
this.form.forname = this.applyloacluserInfo.forname;
this.form.findfor = this.applyloacluserInfo.findfor;
this.form.age = this.applyloacluserInfo.age;
this.form.sex = this.applyloacluserInfo.sex;
var d = this.userworkPhone;
d = d.replace('"', "").replace('"', "");
d = d.replace(/\"/g, "");
this.phone = d;
} else {
if (this.form.findfor == "自己") {
this.form.findfor = "自己";
this.form.sex = "请选择";
this.form.age = "";
this.form.forname = this.loacluserInfo.username;
this.phone = this.loacluserInfo.phone;
} else {
this.form.forname = "";
this.form.sex = "请选择";
this.form.age = "";
this.phone = "";
}
}
}
},
不求大富大贵,但求一生平凡
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步