Commit d5e87c97 authored by 黄奎's avatar 黄奎

页面修改

parent 56e662bf
......@@ -4,7 +4,7 @@
<template v-if="multiple">
<q-select filled v-model="resultObj" :options="selectList" clearable @clear="clearData()" :label="tipText"
:multiple="multiple" emit-value map-options>
<template v-slot:option="scope">
<template v-slot:option="scope">
<q-item v-if="scope.index==-1">
<q-item-section>
<q-tree :nodes="treeData" :node-key="nodeKey" :label-key="labelKey" :children-key="childrenKey"
......@@ -117,23 +117,20 @@
this.setTreeCheckNode()
},
//有默认值
defaultArray: {
handler(newValue) {
this.chooseTreeNodeArray = [];
if (this.defaultArray && this.defaultArray.length > 0) {
this.defaultArray.forEach(item => {
if (item != '') {
if (this.multiple) {
this.chooseTreeNodeArray.push(item)
} else {
this.chooseTreeNodeArray = [item];
}
defaultArray(newValue) {
this.chooseTreeNodeArray = [];
if (this.defaultArray && this.defaultArray.length > 0) {
this.defaultArray.forEach(item => {
if (item != '') {
if (this.multiple) {
this.chooseTreeNodeArray.push(item)
} else {
this.chooseTreeNodeArray = [item];
}
})
}
this.setTreeCheckNode();
},
immediate: true
}
})
}
this.setTreeCheckNode();
},
resultObj(val) {
var resultStr = "";
......
......@@ -11,20 +11,20 @@
class="col-6 q-pr-lg q-pb-lg" label="助教名称" :rules="[val => !!val || '请填写助教姓名']" />
<q-select filled stack-label option-value="SId" option-label="SName" v-model="objOption.School_Id"
ref="School_Id" :options="schoolList" label="所属校区" :dense="false" class="col-6 q-pb-lg" emit-value
map-options @input="schoolChagne" />
map-options @input="schoolChagne" />
<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 || '请填写助教联系电话']" />
<selectTree v-if="DeptList&&DeptList.length>0" :treeData='DeptList' :defaultArray="returnString"
nodeKey="DeptId" :multiple="false" labelKey="DeptName" childrenKey="ChildList" tipText="选择部门"
@getChild="getChild" classStr="col-6 q-pr-lg q-pb-lg"></selectTree>
<selectTree :treeData='DeptList' :defaultArray="returnString" nodeKey="DeptId" :multiple="false"
labelKey="DeptName" childrenKey="ChildList" tipText="选择部门" @getChild="getChild" classStr="col-6 q-pb-lg">
</selectTree>
<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 />
<div class="col-6 q-pb-lg">
<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
@rejected="onRejected" label="助教头像" accept=".jpg, image/*" auto-upload
:factory="uploadFile" no-thumbnails>
@rejected="onRejected" label="助教头像" accept=".jpg, image/*" auto-upload :factory="uploadFile"
no-thumbnails>
</q-uploader>
</div>
</div>
......@@ -130,14 +130,17 @@
//获取部门结构树
queryDeptTree() {
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;
}
getDeptTree(msg).then(res => {
if (res.Code == 1) {
this.DeptList = res.Data;
if (this.objOption.Dept_Id) {
this.returnString.push(this.objOption.Dept_Id.toString());
}
}
})
},
......@@ -171,7 +174,7 @@
this.objOption.AssistIntro = this.saveObj.AssistIntro;
this.objOption.Dept_Id = this.saveObj.Dept_Id;
this.objOption.Post_Id = this.saveObj.Post_Id;
if (this.objOption.School_Id) {
if (this.objOption.School_Id>=0) {
this.queryDeptTree();
}
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