Commit a63008a3 authored by Mac's avatar Mac

1

parent 2da65e6d
......@@ -228,6 +228,15 @@
},
//保存部门
saveDept() {
if(this.objOption.IsCompany==1 && this.objOption.School_Id==0){
this.$q.notify({
type: 'warning',
position: 'center',
timeout: 1500,
message: `请选择所属校区`
})
return
}
this.saveLoading = true;
var tempStr = "";
if (this.tempManager && this.tempManager.length > 0) {
......
......@@ -126,35 +126,9 @@
<q-card-section class="q-pt-none">
<div class="row wrap">
<q-input clearable class="col-6 q-pb-lg q-pr-lg" standout="bg-primary text-white" v-model="addMsg.From" label="公文来源(FR)" :rules="[val => !!val || '公文来源(FR)']"/>
<!-- <selectTree class="col-6 q-pb-lg q-pr-lg" :treeData='DeptList' :defaultArray="returnString" nodeKey="DeptId" :multiple="true"-->
<!-- labelKey="DeptName" childrenKey="ChildList" tipText="To" @getChild="getChild"-->
<!-- classStr="col-6 q-pr-lg q-pb-lg"></selectTree>-->
<q-select filled class="col-6 q-pb-lg q-pr-lg" v-model="bumenTo" :options="selectList" clearable @clear="clearData()" label="To"
:multiple="true" emit-value map-options>
<template v-slot:option="scope">
<q-item v-if="scope.index==0">
<q-item-section>
<!-- <q-tree :nodes="DeptList" node-key="DeptId" label-key="DeptName" children-key="ChildList"-->
<!-- tick-strategy="leaf-filtered"-->
<!-- :default-expand-all="false"-->
<!-- :ticked.sync="chooseTreeNodeArray">-->
<!-- </q-tree>-->
<el-tree
:data="DeptList"
show-checkbox
node-key="DeptId"
:default-expanded-keys="[1]"
:default-checked-keys="chooseTreeNodeArray"
@check-change="handleCheckChange"
ref="tree"
:props="defaultProps">
</el-tree>
</q-item-section>
</q-item>
</template>
</q-select>
<selectTree class="col-6 q-pb-lg q-pr-lg" :treeData='DeptList' :defaultArray="returnString" nodeKey="DeptId" :multiple="true" :defaultExpandAll="true"
labelKey="DeptName" childrenKey="ChildList" tipText="To" @getChild="getChild"
classStr="col-6 q-pr-lg q-pb-lg"></selectTree>
<q-select class="col-6 q-pb-lg q-pr-lg" multiple clearable filled stack-label use-input use-chips
option-value="Id" option-label="EmployeeName" v-model="tempManager2" ref="ManagerId" :options="PersionList"
......@@ -359,16 +333,6 @@
drawer: false, //显示右侧抽屉
NInfo:{},//详情内容
bumenTo:[],//部门默认数组
chooseTreeNodeArray : [],
selectList: [{
value: "",
label: ""
}],
defaultProps: {
children: 'ChildList',
label: 'DeptName'
}
}
},
mounted() {
......@@ -380,35 +344,6 @@
this.getNoticeRule()//获取编号规则 枚举列表
},
methods:{
clearData(){
this.bumenTo=[];
this.chooseTreeNodeArray = [];
},
handleCheckChange(val,e){
let data =[];
let data2 =[];
let data3 =[];
let res = this.$refs.tree.getCheckedNodes(true, true);
console.log(res)
res.forEach(x=>{
data.push(x.DeptId)
let obj ={
value:x.DeptId,
label:x.DeptName,
}
data2.push(obj)
data3.push(x.DeptId)
})
this.chooseTreeNodeArray = data
this.selectList = data2
this.bumenTo = data3
if (this.selectList && this.selectList.length == 0) {
this.selectList = [{
value: "",
label: ""
}];
}
},
//获取编辑器值
getEditValue(obj) {
......@@ -595,7 +530,8 @@
this.addMsg.From=res.Data.From;
//数组处理
this.addMsg.To=res.Data.To;
this.bumenTo = res.Data.To.split(',').map(Number)
this.returnString=[]
this.returnString = res.Data.To.split(',').map(Number)
//数组处理
this.addMsg.CopyPeople=res.Data.CopyPeople;
this.tempManager2 = res.Data.CopyPeople.split(',').map(Number)//字符串转为数组map 是转为数字
......
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