Commit 659ccf5f authored by zhengke's avatar zhengke

修改

parent 4960e804
<style> <style>
.choiceappoval .ApprovalProcessBg { .choiceappoval .ApprovalProcessBg {
background: #f8f8f8; background: #f8f8f8;
max-height: 400px; max-height: 400px;
overflow-y: auto; overflow-y: auto;
} }
.choiceappoval .Approval_yxList { .choiceappoval .Approval_yxList {
width: 300px; width: 300px;
background: #f8f8f8; background: #f8f8f8;
min-height: 400px; min-height: 400px;
max-height: 400px; max-height: 400px;
overflow-y: auto; overflow-y: auto;
} }
.choiceappoval .Approval_yxList li { .choiceappoval .Approval_yxList li {
display: inline-block; display: inline-block;
width: 100%; width: 100%;
line-height: 40px; line-height: 40px;
text-indent: 15px; text-indent: 15px;
border-bottom: 1px dotted #eee; border-bottom: 1px dotted #eee;
} }
</style> </style>
<template> <template>
...@@ -40,29 +41,15 @@ ...@@ -40,29 +41,15 @@
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-section class="q-pt-none" style="padding: 20px 0;"> <q-card-section class="q-pt-none" style="padding: 20px 0;">
<div <div style="display: flex;align-items: flex-start;justify-content: space-between;">
style="display: flex;align-items: flex-start;justify-content: space-between;"
>
<div style="width: 300px; margin: 0 20px;"> <div style="width: 300px; margin: 0 20px;">
<p style="margin: 0 0 10px 0;display: flex;align-items: center;"> <p style="margin: 0 0 10px 0;display: flex;align-items: center;">
选择:<el-input 选择:<el-input style="width: 200px;" placeholder="输入关键字进行过滤" v-model="filterText">
style="width: 200px;"
placeholder="输入关键字进行过滤"
v-model="filterText"
>
</el-input> </el-input>
</p> </p>
<el-tree <el-tree class="ApprovalProcessBg" :filter-node-method="filterNode" :data="memberList" show-checkbox
class="ApprovalProcessBg" ref="treeUser" :props="defaultProps" :render-after-expand="false" node-key="DeptId"
:filter-node-method="filterNode" @check-change="handleNodeChange">
:data="memberList"
show-checkbox
ref="treeUser"
:props="defaultProps"
:render-after-expand="false"
node-key="DeptId"
@check-change="handleNodeChange"
>
</el-tree> </el-tree>
</div> </div>
<div style="width: 300px; margin: 0 20px;"> <div style="width: 300px; margin: 0 20px;">
...@@ -70,10 +57,7 @@ ...@@ -70,10 +57,7 @@
<div class="Approval_yxList"> <div class="Approval_yxList">
<li v-for="item in showMember"> <li v-for="item in showMember">
{{ item.DeptName }} {{ item.DeptName }}
<i <i @click="mySetCheckedKeys(item.DeptId)" class="el-icon-circle-close showMemberIcon"></i>
@click="mySetCheckedKeys(item.DeptId)"
class="el-icon-circle-close showMemberIcon"
></i>
</li> </li>
</div> </div>
</div> </div>
...@@ -83,22 +67,19 @@ ...@@ -83,22 +67,19 @@
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn class="q-mr-md" label="取消" @click="closeEditOrder" /> <q-btn class="q-mr-md" label="取消" @click="closeEditOrder" />
<q-btn <q-btn color="accent" class="q-mr-md" label="确定" @click="saveOrderInfo()" />
color="accent"
class="q-mr-md"
label="确定"
@click="saveOrderInfo()"
/>
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getEmployeeAddrBook } from "../../api/users/user"; import {
import selectMaterial from "./selectMaterial"; getEmployeeAddrBook
} from "../../api/users/user";
import selectMaterial from "./selectMaterial";
export default { export default {
props: { props: {
outerindex: { outerindex: {
type: String, type: String,
...@@ -112,6 +93,10 @@ export default { ...@@ -112,6 +93,10 @@ export default {
//1是列表上使用2 新增使用 //1是列表上使用2 新增使用
type: String, type: String,
default: "1" default: "1"
},
singleCheck: {
type: Boolean,
default: null
} }
}, },
...@@ -166,6 +151,19 @@ export default { ...@@ -166,6 +151,19 @@ export default {
}, },
handleNodeChange(data, checked) { handleNodeChange(data, checked) {
//单选
if (this.singleCheck) {
if (checked) {
this.$refs.treeUser.setCheckedKeys([data.DeptId])
this.showMember=[];
this.memberSetCheckedKeys=[]
this.showMember.push({
DeptName: data.DeptName,
DeptId: data.DeptId
});
this.memberSetCheckedKeys.push(data.DeptId);
}
} else {
data.IsCheck = checked; data.IsCheck = checked;
if (data.DataType == 2 && data.IsCheck) { if (data.DataType == 2 && data.IsCheck) {
//是员工且选中 //是员工且选中
...@@ -237,6 +235,7 @@ export default { ...@@ -237,6 +235,7 @@ export default {
} }
} }
} }
}
}, },
mySetCheckedKeys(id) { mySetCheckedKeys(id) {
if (this.memberSetCheckedKeys.length == 0) return; if (this.memberSetCheckedKeys.length == 0) return;
...@@ -262,5 +261,6 @@ export default { ...@@ -262,5 +261,6 @@ export default {
this.$emit("success", this.showMember, this.cptype); this.$emit("success", this.showMember, this.cptype);
} }
} }
}; };
</script> </script>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
label="客户需求" style="width: 300px" emit-value map-options /> label="客户需求" style="width: 300px" emit-value map-options />
<q-btn class="q-mt-xl q-px-lg" unelevated color="primary" :loading="saving" @click="saveHandler">立即保存</q-btn> <q-btn class="q-mt-xl q-px-lg" unelevated color="primary" :loading="saving" @click="saveHandler">立即保存</q-btn>
</q-card> </q-card>
<choiceapproval v-if="outerVisible" @close="getclose()" @success="getsuccess2" :byval="chosenUser" cptype="0"> <choiceapproval v-if="outerVisible" @close="getclose()" :singleCheck="true" @success="getsuccess2" :byval="chosenUser" cptype="0">
</choiceapproval> </choiceapproval>
</div> </div>
</template> </template>
...@@ -94,6 +94,18 @@ ...@@ -94,6 +94,18 @@
this.dictObjEmp.Code=tempObj.Code; this.dictObjEmp.Code=tempObj.Code;
this.dictObjEmp.Content=tempObj.Content; this.dictObjEmp.Content=tempObj.Content;
this.dictObjEmp.Mask=tempObj.Mask; this.dictObjEmp.Mask=tempObj.Mask;
if(tempObj.Content&&tempObj.Mask){
this.chosenUser.push({
DeptId:tempObj.Content,
DeptName:tempObj.Mask
})
}
if(tempObj.Code){
this.multiCheck = tempObj.Code.split(',');
this.multiCheck=this.multiCheck.map(item => {
return +item;
});
}
} }
} }
}); });
......
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