update code
parent
2fa278a1a9
commit
d1bfb36b3b
|
@ -27,7 +27,7 @@
|
|||
<el-col :span="8">
|
||||
<el-form-item label="部门" prop="deptid">
|
||||
<treeselect v-model="form.deptid" :options="deptOptions" :show-count="true"
|
||||
placeholder="请选择归属部门" @select="doDeptChange()" />
|
||||
placeholder="请选择归属部门" @select="doDeptChange(0)" />
|
||||
<!--
|
||||
<el-select v-model="form.deptid" filterable placeholder="请选择单位" style="width: 100%;"
|
||||
@change="doDeptChange()">
|
||||
|
@ -144,10 +144,25 @@ export default {
|
|||
}
|
||||
return it;
|
||||
});
|
||||
this.form.authorName="";
|
||||
this.form.authorPhone="";
|
||||
if (init) {
|
||||
if (this.oldData && this.userList.length > 0) {
|
||||
if(init==0){
|
||||
this.form.authorName="";
|
||||
this.form.authorPhone="";
|
||||
}else if(init==1){
|
||||
let user=this.$store.state.user;
|
||||
if(user){
|
||||
let tmps=this.userList.filter(d=>d.userId==user.userId);
|
||||
if(tmps.length>0){
|
||||
let tmp=tmps[0];
|
||||
let phone=tmp.phonenumber;
|
||||
if(!phone){
|
||||
phone=tmp.userId+" --- ";
|
||||
}
|
||||
this.form.authorPhone=phone;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (init==2) {
|
||||
if (this.oldData && this.userList.length > 0) {
|
||||
this.form.authorPhone = this.oldData.authorPhone;
|
||||
this.form.authorName = this.oldData.authorName;
|
||||
}
|
||||
|
@ -186,7 +201,7 @@ export default {
|
|||
this.form.ord = ord;
|
||||
this.isOpen = true;
|
||||
this.loadMag(true);
|
||||
this.loadDepts(true);
|
||||
this.loadDepts(2);
|
||||
if (row) {
|
||||
this.form.title = row.title;
|
||||
this.form.ord = row.ord;
|
||||
|
@ -206,6 +221,9 @@ export default {
|
|||
this.form.imageUrl = [];
|
||||
this.form.content = "";
|
||||
this.form.images = "";
|
||||
if(user){
|
||||
this.doDeptChange(1);
|
||||
}
|
||||
}
|
||||
},
|
||||
submitForm() {
|
||||
|
|
Loading…
Reference in New Issue