Commit d5e87c97 authored by 黄奎's avatar 黄奎

页面修改

parent 56e662bf
...@@ -117,8 +117,7 @@ ...@@ -117,8 +117,7 @@
this.setTreeCheckNode() this.setTreeCheckNode()
}, },
//有默认值 //有默认值
defaultArray: { defaultArray(newValue) {
handler(newValue) {
this.chooseTreeNodeArray = []; this.chooseTreeNodeArray = [];
if (this.defaultArray && this.defaultArray.length > 0) { if (this.defaultArray && this.defaultArray.length > 0) {
this.defaultArray.forEach(item => { this.defaultArray.forEach(item => {
...@@ -133,8 +132,6 @@ ...@@ -133,8 +132,6 @@
} }
this.setTreeCheckNode(); this.setTreeCheckNode();
}, },
immediate: true
},
resultObj(val) { resultObj(val) {
var resultStr = ""; var resultStr = "";
if (this.resultObj && this.resultObj.length > 0) { if (this.resultObj && this.resultObj.length > 0) {
......
...@@ -14,17 +14,17 @@ ...@@ -14,17 +14,17 @@
map-options @input="schoolChagne" /> map-options @input="schoolChagne" />
<q-input type="tel" filled stack-label maxlength="20" :dense="false" v-model="objOption.AssistTel" <q-input type="tel" filled stack-label maxlength="20" :dense="false" v-model="objOption.AssistTel"
ref="AssistTel" class="col-6 q-pr-lg q-pb-lg" label="联系电话" :rules="[val => !!val || '请填写助教联系电话']" /> ref="AssistTel" class="col-6 q-pr-lg q-pb-lg" label="联系电话" :rules="[val => !!val || '请填写助教联系电话']" />
<selectTree v-if="DeptList&&DeptList.length>0" :treeData='DeptList' :defaultArray="returnString" <selectTree :treeData='DeptList' :defaultArray="returnString" nodeKey="DeptId" :multiple="false"
nodeKey="DeptId" :multiple="false" labelKey="DeptName" childrenKey="ChildList" tipText="选择部门" labelKey="DeptName" childrenKey="ChildList" tipText="选择部门" @getChild="getChild" classStr="col-6 q-pb-lg">
@getChild="getChild" classStr="col-6 q-pr-lg q-pb-lg"></selectTree> </selectTree>
<q-select filled stack-label option-value="PostId" option-label="PostName" v-model="objOption.Post_Id" <q-select filled stack-label option-value="PostId" option-label="PostName" v-model="objOption.Post_Id"
ref="Post_Id" :options="PostList" label="岗位" :dense="false" class="col-6 q-pb-lg q-pb-lg" emit-value ref="Post_Id" :options="PostList" label="岗位" :dense="false" class="col-6 q-pr-lg q-pb-lg" emit-value
map-options /> map-options />
<div class="col-6 q-pb-lg"> <div class="col-6 q-pb-lg">
<q-uploader style="display: inline-block;max-height: 320px;max-width: 100%; background-repeat:no-repeat" <q-uploader style="display: inline-block;max-height: 320px;max-width: 100%; background-repeat:no-repeat"
:style="{'background-image':'url(' + objOption.AssistIcon + ')'}" max-files="1" hide-upload-btn :style="{'background-image':'url(' + objOption.AssistIcon + ')'}" max-files="1" hide-upload-btn
@rejected="onRejected" label="助教头像" accept=".jpg, image/*" auto-upload @rejected="onRejected" label="助教头像" accept=".jpg, image/*" auto-upload :factory="uploadFile"
:factory="uploadFile" no-thumbnails> no-thumbnails>
</q-uploader> </q-uploader>
</div> </div>
</div> </div>
...@@ -130,14 +130,17 @@ ...@@ -130,14 +130,17 @@
//获取部门结构树 //获取部门结构树
queryDeptTree() { queryDeptTree() {
var msg = { var msg = {
School_Id: 0 School_Id: -1
}; };
if (this.objOption.School_Id && this.objOption.School_Id != '') { if (this.objOption.School_Id != '' && this.objOption.School_Id >= 0) {
msg.School_Id = this.objOption.School_Id; msg.School_Id = this.objOption.School_Id;
} }
getDeptTree(msg).then(res => { getDeptTree(msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.DeptList = res.Data; this.DeptList = res.Data;
if (this.objOption.Dept_Id) {
this.returnString.push(this.objOption.Dept_Id.toString());
}
} }
}) })
}, },
...@@ -171,7 +174,7 @@ ...@@ -171,7 +174,7 @@
this.objOption.AssistIntro = this.saveObj.AssistIntro; this.objOption.AssistIntro = this.saveObj.AssistIntro;
this.objOption.Dept_Id = this.saveObj.Dept_Id; this.objOption.Dept_Id = this.saveObj.Dept_Id;
this.objOption.Post_Id = this.saveObj.Post_Id; this.objOption.Post_Id = this.saveObj.Post_Id;
if (this.objOption.School_Id) { if (this.objOption.School_Id>=0) {
this.queryDeptTree(); this.queryDeptTree();
} }
if (this.saveObj.Dept_Id) { if (this.saveObj.Dept_Id) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment