Commit 65b4047e authored by 黄奎's avatar 黄奎

页面修改

parent 6dd0349d
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<div class="approval_layer_info" v-if="approvalType==2"> <div class="approval_layer_info" v-if="approvalType==2">
<div class="normalMember"> <div class="normalMember">
<ul> <ul>
<li v-for="item in showMember">{{item.DepartmentName}}</li> <!-- @click="mySetCheckedKeys(item.DepartmentId)"--> <li v-for="item in showMember">{{item.DepartmentName}}</li>
</ul> </ul>
</div> </div>
<input type="button" class="normalBtn" @click="getMember(),mySetCheckedKeys(-1)" value="添加成员" /> <input type="button" class="normalBtn" @click="getMember(),mySetCheckedKeys(-1)" value="添加成员" />
...@@ -48,7 +48,6 @@ ...@@ -48,7 +48,6 @@
</el-radio-group> </el-radio-group>
</div> </div>
</div> </div>
</div> </div>
<div class="approval_page_layer_bottom"> <div class="approval_page_layer_bottom">
<input type="button" class="hollowFixedBtn" value="取消" @click="closeLayer" /> &nbsp;&nbsp; <input type="button" class="hollowFixedBtn" value="取消" @click="closeLayer" /> &nbsp;&nbsp;
...@@ -57,19 +56,22 @@ ...@@ -57,19 +56,22 @@
</div> </div>
</div> </div>
</div> </div>
<input type="button" class="hollowFixedBtn approval_back_btn" value="返回" @click="goback"/> <input type="button" class="hollowFixedBtn approval_back_btn" value="返回" @click="goback" />
<div class="approval_page_content" v-loading="loading"> <div class="approval_page_content" v-loading="loading">
<p style="text-align: center; border-bottom:1px solid #f1f1f1; padding: 15px 0 10px 0;font-size: 16px;">{{TemplateTypeName}}流程设置</p> <p style="text-align: center; border-bottom:1px solid #f1f1f1; padding: 15px 0 10px 0;font-size: 16px;">
{{TemplateTypeName}}流程设置</p>
<div class="approval_page_title">默认审批流程</div> <div class="approval_page_title">默认审批流程</div>
<div class="approval_person_content"> <div class="approval_person_content">
<span class="approval_span_type">默认审批人</span> <span class="approval_span_type">默认审批人</span>
<div class="approval_person_list fl"> <div class="approval_person_list fl">
<div class="approval_process_item" draggable="true" v-for="(item,index) in myAuditList" @click="getItemValue(item,index)"> <div class="approval_process_item" draggable="true" v-for="(item,index) in myAuditList"
@click="getItemValue(item,index)">
<span style="position: relative;" @mouseenter="itemIndex=index" @mouseleave="itemIndex='-1'"> <span style="position: relative;" @mouseenter="itemIndex=index" @mouseleave="itemIndex='-1'">
<i class="iconfont icon-user11"></i> <i class="iconfont icon-user11"></i>
{{item.AuditDescription}}&nbsp; {{item.AuditDescription}}&nbsp;
<b class="bnotice" v-if="item.AuditWay!=1">({{item.AuditWay=="2"?'会签':'或签'}})</b> <b class="bnotice" v-if="item.AuditWay!=1">({{item.AuditWay=="2"?'会签':'或签'}})</b>
<em v-if='index==itemIndex' class="iconfont icon-guanbi approval_process_item_delete" @click.stop='deleteItem(item.Sort)'></em> <em v-if='index==itemIndex' class="iconfont icon-guanbi approval_process_item_delete"
@click.stop='deleteItem(item.Sort)'></em>
</span> </span>
<i class="iconfont icon-jiantouyou"></i> <i class="iconfont icon-jiantouyou"></i>
</div> </div>
...@@ -83,10 +85,11 @@ ...@@ -83,10 +85,11 @@
<span style="position: relative;" @mouseenter="itemIndex1=index" @mouseleave="itemIndex1='-1'"> <span style="position: relative;" @mouseenter="itemIndex1=index" @mouseleave="itemIndex1='-1'">
<i class="iconfont icon-user11"></i> <i class="iconfont icon-user11"></i>
{{item.EmName}}&nbsp; {{item.EmName}}&nbsp;
<em v-if='index==itemIndex1' @click="deleteUser(item.EmployeeId)" class="iconfont icon-guanbi approval_process_item_delete" ></em> <em v-if='index==itemIndex1' @click="deleteUser(item.EmployeeId)"
class="iconfont icon-guanbi approval_process_item_delete"></em>
</span> </span>
</div> </div>
<input type="button" class="hollowFixedBtn" value="添加" @click='addAuditUser'/> <input type="button" class="hollowFixedBtn" value="添加" @click='addAuditUser' />
</div> </div>
</div> </div>
...@@ -99,7 +102,8 @@ ...@@ -99,7 +102,8 @@
<div> <div>
<div class="processOtherDiv" v-for="(item,index) in otherList" @click="goUrl('updateProcessDesign',item.Id)"> <div class="processOtherDiv" v-for="(item,index) in otherList" @click="goUrl('updateProcessDesign',item.Id)">
<p style="background: #f1f1f1; padding: 10px 30px;">{{item.Description}} <p style="background: #f1f1f1; padding: 10px 30px;">{{item.Description}}
<span class="fr processOtherdelSpan" style="margin-left: 10px;" @click.stop="deleteOtherProcess(item.Id)">删除</span> <span class="fr processOtherdelSpan" style="margin-left: 10px;"
@click.stop="deleteOtherProcess(item.Id)">删除</span>
<span class="fr processOtherdelSpan">修改</span> <span class="fr processOtherdelSpan">修改</span>
</p> </p>
<div style="padding: 0 30px;"> <div style="padding: 0 30px;">
...@@ -134,14 +138,8 @@ ...@@ -134,14 +138,8 @@
<p style="margin: 0 0 10px 0;">选择: <el-input class='w200' placeholder="输入关键字进行过滤" v-model="filterText"> <p style="margin: 0 0 10px 0;">选择: <el-input class='w200' placeholder="输入关键字进行过滤" v-model="filterText">
</el-input> </el-input>
</p> </p>
<el-tree class='ApprovalProcessBg' <el-tree class='ApprovalProcessBg' :data="memberList" show-checkbox :filter-node-method="filterNode" ref="tree"
:data="memberList" :props="defaultProps" :render-after-expand="false" node-key="DepartmentId" @check-change="handleNodeChange">
show-checkbox
:filter-node-method="filterNode"
ref="tree" :props="defaultProps"
:render-after-expand="false"
node-key="DepartmentId"
@check-change="handleNodeChange">
</el-tree> </el-tree>
</div> </div>
<div class="fl"> <div class="fl">
...@@ -163,14 +161,8 @@ ...@@ -163,14 +161,8 @@
<p style="margin: 0 0 10px 0;">选择岗位: <el-input class='w200' placeholder="输入关键字进行过滤" v-model="filterText1"> <p style="margin: 0 0 10px 0;">选择岗位: <el-input class='w200' placeholder="输入关键字进行过滤" v-model="filterText1">
</el-input> </el-input>
</p> </p>
<el-tree class='ApprovalProcessBg' <el-tree class='ApprovalProcessBg' :data="roleList" ref="treeRole" show-checkbox
:data="roleList" :filter-node-method="filterNode1" :props="defaultProps1" @check-change="checkedRole">
ref="treeRole"
show-checkbox
:filter-node-method="filterNode1"
:props="defaultProps1"
@check-change="checkedRole"
>
</el-tree> </el-tree>
</div> </div>
<div class="fl"> <div class="fl">
...@@ -192,14 +184,8 @@ ...@@ -192,14 +184,8 @@
<p style="margin: 0 0 10px 0;">选择抄送人:<el-input class='w200' placeholder="输入关键字进行过滤" v-model="filterText2"> <p style="margin: 0 0 10px 0;">选择抄送人:<el-input class='w200' placeholder="输入关键字进行过滤" v-model="filterText2">
</el-input> </el-input>
</p> </p>
<el-tree class='ApprovalProcessBg' <el-tree class='ApprovalProcessBg' :data="userList" show-checkbox :filter-node-method="filterNode2"
:data="userList" ref="treeUser" :props="defaultProps2" :render-after-expand="false" node-key="DepartmentId"
show-checkbox
:filter-node-method="filterNode2"
ref="treeUser"
:props="defaultProps2"
:render-after-expand="false"
node-key="DepartmentId"
@check-change="handleNodeChange1"> @check-change="handleNodeChange1">
</el-tree> </el-tree>
</div> </div>
...@@ -216,8 +202,6 @@ ...@@ -216,8 +202,6 @@
<button class="normalBtn" type="primary" @click="saveAuditUser">确定</button> <button class="normalBtn" type="primary" @click="saveAuditUser">确定</button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
...@@ -225,9 +209,9 @@ ...@@ -225,9 +209,9 @@
export default { export default {
data() { data() {
return { return {
filterText:"", filterText: "",
filterText1:"", filterText1: "",
filterText2:"", filterText2: "",
defaultProps: { defaultProps: {
children: 'ChildList', children: 'ChildList',
label: 'DepartmentName', label: 'DepartmentName',
...@@ -266,56 +250,56 @@ ...@@ -266,56 +250,56 @@
label: '第6级主管' label: '第6级主管'
}, },
], ],
TemplateType:'', TemplateType: '',
addBtn:true, addBtn: true,
loading:true, loading: true,
dialogTitle: '', dialogTitle: '',
outerVisible:false, outerVisible: false,
outerVisible1:false, outerVisible1: false,
outerVisible2:false, outerVisible2: false,
itemIndex: -1, itemIndex: -1,
itemIndex1: -1, itemIndex1: -1,
approvalType: 1, approvalType: 1,
showlayer: false, showlayer: false,
isTransition: false, isTransition: false,
updateItem:[], updateItem: [],
updateItemIndex:-1, //修改节点 updateItemIndex: -1, //修改节点
TemplateId:'', TemplateId: '',
addMsg:{ addMsg: {
Id:'', Id: '',
TemplateId:'', TemplateId: '',
AuditList:[], AuditList: [],
AuditUserList:[], AuditUserList: [],
ConditionSortList:[], ConditionSortList: [],
Sort:'', Sort: '',
}, },
zgObj: { zgObj: {
AuditDescription: '', AuditDescription: '',
RoleOrInitiator: '1', RoleOrInitiator: '1',
AuditType: '', AuditType: '',
AuditUserList: [], AuditUserList: [],
AuditWay:2, AuditWay: 2,
Sort: '', Sort: '',
}, },
tempChosenId: -1, tempChosenId: -1,
//返回数据 //返回数据
TemplateTypeName:'', TemplateTypeName: '',
myAuditList: [], myAuditList: [],
myAuditUserList: [], myAuditUserList: [],
myAuditUserList1:[], myAuditUserList1: [],
memberList: [], memberList: [],
sysUserKeys:[], sysUserKeys: [],
userList:[], userList: [],
roleList: [], roleList: [],
checkedMember: [], checkedMember: [],
showMember: [], showMember: [],
showRole:[], showRole: [],
memberSetCheckedKeys: [], memberSetCheckedKeys: [],
memberSetCheckedUserKeys:[], memberSetCheckedUserKeys: [],
normalMember: [], normalMember: [],
otherList:[], otherList: [],
otherListSpr:[], otherListSpr: [],
otherListCsr:[], otherListCsr: [],
} }
}, },
watch: { watch: {
...@@ -342,96 +326,100 @@ ...@@ -342,96 +326,100 @@
if (!value) return true; if (!value) return true;
return data.DepartmentName.indexOf(value) !== -1; return data.DepartmentName.indexOf(value) !== -1;
}, },
deleteOtherProcess(id){ deleteOtherProcess(id) {
this.$confirm('是否删除?', '提示', { this.$confirm('是否删除?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.apipost('WorkFlow_post_DelOtherCondition',{ConditionId:id},res=>{ this.apipost('WorkFlow_post_DelOtherCondition', {
if(res.data.resultCode==1){ ConditionId: id
}, res => {
if (res.data.resultCode == 1) {
this.$message.success('删除成功!'); this.$message.success('删除成功!');
this.getOtherList() this.getOtherList()
} }
},err=>{}) }, err => {})
}).catch(() => { }).catch(() => {
this.$message.info('已取消删除!'); this.$message.info('已取消删除!');
}); });
}, },
addAppPerson(){ addAppPerson() {
this.approvalType=1; this.approvalType = 1;
this.addBtn=true; this.addBtn = true;
this.showLayer(); this.showLayer();
}, },
deleteUser(id){ deleteUser(id) {
if(this.memberSetCheckedUserKeys.findIndex(item => item === id)!=-1){ if (this.memberSetCheckedUserKeys.findIndex(item => item === id) != -1) {
this.memberSetCheckedUserKeys.splice(this.memberSetCheckedUserKeys.findIndex(item => item === id), 1) this.memberSetCheckedUserKeys.splice(this.memberSetCheckedUserKeys.findIndex(item => item === id), 1)
} }
if(this.myAuditUserList.findIndex(item => item.EmployeeId === id)!=-1) if (this.myAuditUserList.findIndex(item => item.EmployeeId === id) != -1) {
{
this.myAuditUserList.splice(this.myAuditUserList.findIndex(item => item.EmployeeId === id), 1) this.myAuditUserList.splice(this.myAuditUserList.findIndex(item => item.EmployeeId === id), 1)
} }
if(this.myAuditUserList1.findIndex(item => item.EmployeeId === id)!=-1) if (this.myAuditUserList1.findIndex(item => item.EmployeeId === id) != -1) {
{
this.myAuditUserList1.splice(this.myAuditUserList1.findIndex(item => item.EmployeeId === id), 1) this.myAuditUserList1.splice(this.myAuditUserList1.findIndex(item => item.EmployeeId === id), 1)
} }
}, },
addAuditUser(){ addAuditUser() {
let _arr=this.sysUserKeys.concat(this.memberSetCheckedUserKeys) let _arr = this.sysUserKeys.concat(this.memberSetCheckedUserKeys)
this.dialogTitle = '选择人员'; this.dialogTitle = '选择人员';
this.outerVisible2=true; this.outerVisible2 = true;
let _this=this; let _this = this;
this.apipost('WorkFlow_get_GetDepartMentEmployee', {}, res => { this.apipost('WorkFlow_get_GetDepartMentEmployee', {}, res => {
if(res.data.resultCode==1){ if (res.data.resultCode == 1) {
this.userList = res.data.data this.userList = res.data.data
_this.$refs.treeUser.setCheckedKeys(_arr); _this.$refs.treeUser.setCheckedKeys(_arr);
} }
}, err => {}) }, err => {})
}, },
saveAuditUser(){ saveAuditUser() {
if(this.myAuditUserList1.length<=10){ if (this.myAuditUserList1.length <= 10) {
this.myAuditUserList=JSON.parse(JSON.stringify(this.myAuditUserList1)) this.myAuditUserList = JSON.parse(JSON.stringify(this.myAuditUserList1))
this.outerVisible2 = false this.outerVisible2 = false
}else{ } else {
this.$message.error('人数不能超过10人') this.$message.error('人数不能超过10人')
return false; return false;
} }
}, },
clearValue(value){ clearValue(value) {
if(value=='1'){ if (value == '1') {
this.zgObj.RoleOrInitiator='1' this.zgObj.RoleOrInitiator = '1'
} }
if(value=='2'){ if (value == '2') {
this.showMember=[]; this.showMember = [];
this.memberSetCheckedKeys=[]; this.memberSetCheckedKeys = [];
} }
if(value=='3'){ if (value == '3') {
this.showRole=[] this.showRole = []
this.zgObj.AuditWay=2 this.zgObj.AuditWay = 2
} }
}, },
getList() { getList() {
this.apipost('WorkFlow_get_GetDefaultCondition', {TemplateId:this.TemplateId}, res => { this.apipost('WorkFlow_get_GetDefaultCondition', {
if(res.data.resultCode == 1) { TemplateId: this.TemplateId
this.loading=false }, res => {
this.addMsg.Id=res.data.data.Id if (res.data.resultCode == 1) {
this.myAuditList = res.data.data.AuditList==null?[]:res.data.data.AuditList this.loading = false
this.myAuditUserList = res.data.data.AuditUserList==null?[]:res.data.data.AuditUserList this.addMsg.Id = res.data.data.Id
this.myAuditList = res.data.data.AuditList == null ? [] : res.data.data.AuditList
this.myAuditUserList = res.data.data.AuditUserList == null ? [] : res.data.data.AuditUserList
this.myAuditUserList1 = JSON.parse(JSON.stringify(this.myAuditUserList)) this.myAuditUserList1 = JSON.parse(JSON.stringify(this.myAuditUserList))
this.myAuditUserList1.forEach(item=>{ this.myAuditUserList1.forEach(item => {
this.sysUserKeys.push(item.EmployeeId) this.sysUserKeys.push(item.EmployeeId)
}) })
this.TemplateTypeName=res.data.data.TemplateTypeName this.TemplateTypeName = res.data.data.TemplateTypeName
this.TemplateType=res.data.data.TemplateType; this.TemplateType = res.data.data.TemplateType;
} else {} } else {}
}, error => {}) }, error => {})
}, },
getOtherList(){ getOtherList() {
this.apipost('WorkFlow_get_GetOtherConditionList', {TemplateId:this.TemplateId}, res => { this.apipost('WorkFlow_get_GetOtherConditionList', {
if(res.data.resultCode == 1) { TemplateId: this.TemplateId
this.otherList=res.data.data }, res => {
this.otherListSpr=res.data.data.AuditList if (res.data.resultCode == 1) {
this.otherList = res.data.data
this.otherListSpr = res.data.data.AuditList
} else {} } else {}
}, error => {}) }, error => {})
}, },
...@@ -451,15 +439,15 @@ ...@@ -451,15 +439,15 @@
}, },
handleNodeChange1(data, checked) { handleNodeChange1(data, checked) {
data.IsCheck = checked; data.IsCheck = checked;
if(data.Type == 2 && data.IsCheck) { //是员工且选中 if (data.Type == 2 && data.IsCheck) { //是员工且选中
let isExsit = false let isExsit = false
this.myAuditUserList1.forEach(x => { this.myAuditUserList1.forEach(x => {
if(x.EmployeeId == data.DepartmentId) { if (x.EmployeeId == data.DepartmentId) {
isExsit = true isExsit = true
return false return false
} }
}) })
if(!isExsit) { if (!isExsit) {
this.myAuditUserList1.push({ this.myAuditUserList1.push({
EmName: data.DepartmentName, EmName: data.DepartmentName,
EmployeeId: data.DepartmentId, EmployeeId: data.DepartmentId,
...@@ -467,71 +455,76 @@ ...@@ -467,71 +455,76 @@
}) })
this.memberSetCheckedUserKeys.push(data.DepartmentId) this.memberSetCheckedUserKeys.push(data.DepartmentId)
} }
} else if(data.Type == 2 && !data.IsCheck) { } else if (data.Type == 2 && !data.IsCheck) {
if(this.myAuditUserList1.findIndex(item => item.EmployeeId === data.DepartmentId) != -1) { if (this.myAuditUserList1.findIndex(item => item.EmployeeId === data.DepartmentId) != -1) {
this.myAuditUserList1.splice(this.myAuditUserList1.findIndex(item => item.EmployeeId === data.DepartmentId), 1) this.myAuditUserList1.splice(this.myAuditUserList1.findIndex(item => item.EmployeeId === data.DepartmentId),
this.memberSetCheckedUserKeys.splice(this.memberSetCheckedUserKeys.findIndex(item => item === data.DepartmentId), 1) 1)
if(this.myAuditUserList1.findIndex(item => item.EmployeeId === data.ParentId) != -1) { this.memberSetCheckedUserKeys.splice(this.memberSetCheckedUserKeys.findIndex(item => item === data
this.memberSetCheckedUserKeys.splice(this.memberSetCheckedUserKeys.findIndex(item => item === data.ParentId), 1) .DepartmentId), 1)
if (this.myAuditUserList1.findIndex(item => item.EmployeeId === data.ParentId) != -1) {
this.memberSetCheckedUserKeys.splice(this.memberSetCheckedUserKeys.findIndex(item => item === data
.ParentId), 1)
} }
} }
} }
if(data.Type != 2 && data.IsCheck) { if (data.Type != 2 && data.IsCheck) {
if(this.memberSetCheckedUserKeys.findIndex(item => item === data.DepartmentId) == -1) { if (this.memberSetCheckedUserKeys.findIndex(item => item === data.DepartmentId) == -1) {
this.memberSetCheckedUserKeys.push(data.DepartmentId) this.memberSetCheckedUserKeys.push(data.DepartmentId)
} }
} else if(data.Type == 2 && !data.IsCheck) { } else if (data.Type == 2 && !data.IsCheck) {
if(this.memberSetCheckedUserKeys.findIndex(item => item === data.DepartmentId) != -1) { if (this.memberSetCheckedUserKeys.findIndex(item => item === data.DepartmentId) != -1) {
this.memberSetCheckedUserKeys.splice(this.memberSetCheckedUserKeys.findIndex(item => item === data.DepartmentId), 1) this.memberSetCheckedUserKeys.splice(this.memberSetCheckedUserKeys.findIndex(item => item === data
if(this.myAuditUserList1.findIndex(item => item.EmployeeId === data.ParentId) != -1) { .DepartmentId), 1)
this.memberSetCheckedUserKeys.splice(this.memberSetCheckedUserKeys.findIndex(item => item === data.ParentId), 1) if (this.myAuditUserList1.findIndex(item => item.EmployeeId === data.ParentId) != -1) {
this.memberSetCheckedUserKeys.splice(this.memberSetCheckedUserKeys.findIndex(item => item === data
.ParentId), 1)
} }
} }
} }
}, },
handleNodeChange(data, checked) { handleNodeChange(data, checked) {
data.IsCheck = checked; data.IsCheck = checked;
if(data.Type == 2 && data.IsCheck) { //是员工且选中 if (data.Type == 2 && data.IsCheck) { //是员工且选中
let isExsit = false let isExsit = false
this.showMember.forEach(x => { this.showMember.forEach(x => {
if(x.DepartmentId == data.DepartmentId) { if (x.DepartmentId == data.DepartmentId) {
isExsit = true isExsit = true
return false return false
} }
}) })
if(!isExsit) { if (!isExsit) {
this.showMember.push({ this.showMember.push({
DepartmentName: data.DepartmentName, DepartmentName: data.DepartmentName,
DepartmentId: data.DepartmentId DepartmentId: data.DepartmentId
}) })
this.memberSetCheckedKeys.push(data.DepartmentId) this.memberSetCheckedKeys.push(data.DepartmentId)
} }
} else if(data.Type == 2 && !data.IsCheck) { } else if (data.Type == 2 && !data.IsCheck) {
if(this.showMember.findIndex(item => item.DepartmentId === data.DepartmentId) != -1) { if (this.showMember.findIndex(item => item.DepartmentId === data.DepartmentId) != -1) {
this.showMember.splice(this.showMember.findIndex(item => item.DepartmentId === data.DepartmentId), 1) this.showMember.splice(this.showMember.findIndex(item => item.DepartmentId === data.DepartmentId), 1)
this.memberSetCheckedKeys.splice(this.memberSetCheckedKeys.findIndex(item => item === data.DepartmentId), 1) this.memberSetCheckedKeys.splice(this.memberSetCheckedKeys.findIndex(item => item === data.DepartmentId), 1)
if(this.showMember.findIndex(item => item.DepartmentId === data.ParentId) != -1) { if (this.showMember.findIndex(item => item.DepartmentId === data.ParentId) != -1) {
this.memberSetCheckedKeys.splice(this.memberSetCheckedKeys.findIndex(item => item === data.ParentId), 1) this.memberSetCheckedKeys.splice(this.memberSetCheckedKeys.findIndex(item => item === data.ParentId), 1)
} }
} }
} }
if(data.Type != 2 && data.IsCheck) { if (data.Type != 2 && data.IsCheck) {
if(this.memberSetCheckedKeys.findIndex(item => item === data.DepartmentId) == -1) { if (this.memberSetCheckedKeys.findIndex(item => item === data.DepartmentId) == -1) {
this.memberSetCheckedKeys.push(data.DepartmentId) this.memberSetCheckedKeys.push(data.DepartmentId)
} }
} else if(data.Type == 2 && !data.IsCheck) { } else if (data.Type == 2 && !data.IsCheck) {
if(this.memberSetCheckedKeys.findIndex(item => item === data.DepartmentId) != -1) { if (this.memberSetCheckedKeys.findIndex(item => item === data.DepartmentId) != -1) {
this.memberSetCheckedKeys.splice(this.memberSetCheckedKeys.findIndex(item => item === data.DepartmentId), 1) this.memberSetCheckedKeys.splice(this.memberSetCheckedKeys.findIndex(item => item === data.DepartmentId), 1)
if(this.showMember.findIndex(item => item.DepartmentId === data.ParentId) != -1) { if (this.showMember.findIndex(item => item.DepartmentId === data.ParentId) != -1) {
this.memberSetCheckedKeys.splice(this.memberSetCheckedKeys.findIndex(item => item === data.ParentId), 1) this.memberSetCheckedKeys.splice(this.memberSetCheckedKeys.findIndex(item => item === data.ParentId), 1)
} }
} }
} }
}, },
mySetCheckedKeys(id) { mySetCheckedKeys(id) {
if(this.memberSetCheckedKeys.length == 0) if (this.memberSetCheckedKeys.length == 0)
return return
if(id == -1) { if (id == -1) {
this.$refs.tree.setCheckedKeys(this.memberSetCheckedKeys) this.$refs.tree.setCheckedKeys(this.memberSetCheckedKeys)
return return
} }
...@@ -539,34 +532,36 @@ ...@@ -539,34 +532,36 @@
this.memberSetCheckedKeys.splice(this.memberSetCheckedKeys.findIndex(item => item === id), 1) this.memberSetCheckedKeys.splice(this.memberSetCheckedKeys.findIndex(item => item === id), 1)
this.$refs.tree.setCheckedKeys(this.memberSetCheckedKeys); this.$refs.tree.setCheckedKeys(this.memberSetCheckedKeys);
}, },
mySetCheckedUsersKeys(){ mySetCheckedUsersKeys() {
}, },
checkedRole(data,checked){ checkedRole(data, checked) {
data.IsCheck = checked; data.IsCheck = checked;
if(data.Disabled==false&&data.IsCheck){ if (data.Disabled == false && data.IsCheck) {
this.showRole=[]; this.showRole = [];
this.showRole.push({DepartmentName:data.DepartmentName,Id:data.DepartmentId}) this.showRole.push({
DepartmentName: data.DepartmentName,
Id: data.DepartmentId
})
} }
}, },
deleteItem(sort) { deleteItem(sort) {
this.myAuditList.splice(this.myAuditList.findIndex(item => item.Sort === sort), 1) this.myAuditList.splice(this.myAuditList.findIndex(item => item.Sort === sort), 1)
}, },
getItemValue(obj,index){ getItemValue(obj, index) {
this.addBtn=false; this.addBtn = false;
this.updateItemIndex=index; this.updateItemIndex = index;
this.updateItem=obj; this.updateItem = obj;
this.showLayer(); this.showLayer();
this.approvalType=obj.AuditType; this.approvalType = obj.AuditType;
if(obj.AuditType==1){ if (obj.AuditType == 1) {
this.zgObj.RoleOrInitiator=obj.RoleOrInitiator.toString(); this.zgObj.RoleOrInitiator = obj.RoleOrInitiator.toString();
} }
if(obj.AuditType==2){ if (obj.AuditType == 2) {
this.showMember=[]; this.showMember = [];
this.memberSetCheckedKeys=[]; this.memberSetCheckedKeys = [];
this.zgObj.AuditWay=obj.AuditWay; this.zgObj.AuditWay = obj.AuditWay;
obj.AuditUserList.forEach((item,index)=>{ obj.AuditUserList.forEach((item, index) => {
this.showMember.push({ this.showMember.push({
DepartmentName: item.EmName, DepartmentName: item.EmName,
DepartmentId: item.EmployeeId DepartmentId: item.EmployeeId
...@@ -574,24 +569,25 @@ ...@@ -574,24 +569,25 @@
this.memberSetCheckedKeys.push(item.EmployeeId) this.memberSetCheckedKeys.push(item.EmployeeId)
}) })
} }
if(obj.AuditType==3){ if (obj.AuditType == 3) {
this.zgObj.AuditWay=obj.AuditWay; this.zgObj.AuditWay = obj.AuditWay;
this.showRole=[]; this.showRole = [];
this.showRole.push({DepartmentName:obj.AuditDescription}) this.showRole.push({
DepartmentName: obj.AuditDescription
})
} }
}, },
saveUpdateNode(){ saveUpdateNode() {
let zg = {} let zg = {}
if(this.approvalType == 1) if (this.approvalType == 1) {
{
zg.AuditType = 1; zg.AuditType = 1;
zg.AuditWay = 1; zg.AuditWay = 1;
zg.AuditUserList=[], zg.AuditUserList = [],
zg.Sort = this.myAuditList.length + 1; zg.Sort = this.myAuditList.length + 1;
zg.RoleOrInitiator = this.zgObj.RoleOrInitiator zg.RoleOrInitiator = this.zgObj.RoleOrInitiator
let obj = {} let obj = {}
if(this.tempChosenId != -1) { if (this.tempChosenId != -1) {
obj = this.zgList.find((item) => { obj = this.zgList.find((item) => {
return item.value === this.tempChosenId; return item.value === this.tempChosenId;
}) })
...@@ -599,22 +595,22 @@ ...@@ -599,22 +595,22 @@
} else { } else {
zg.AuditDescription = '直接主管' zg.AuditDescription = '直接主管'
} }
this.myAuditList[this.updateItemIndex]=zg; this.myAuditList[this.updateItemIndex] = zg;
} }
if(this.approvalType == 2) { //指定成员 if (this.approvalType == 2) { //指定成员
let Au = this.showMember; let Au = this.showMember;
let Auu = []; let Auu = [];
Au.forEach((item, index) => { Au.forEach((item, index) => {
Auu.push({ Auu.push({
EmployeeId: item.DepartmentId, EmployeeId: item.DepartmentId,
EmName:item.DepartmentName, EmName: item.DepartmentName,
Sort: index Sort: index
}) })
}) })
if(Auu.length==1){ if (Auu.length == 1) {
zg.AuditWay = 1 zg.AuditWay = 1
zg.AuditDescription = Auu[0].EmName zg.AuditDescription = Auu[0].EmName
}else if(Auu.length>1){ } else if (Auu.length > 1) {
zg.AuditWay = this.zgObj.AuditWay; zg.AuditWay = this.zgObj.AuditWay;
zg.AuditDescription = '指定' + this.showMember.length + '人' zg.AuditDescription = '指定' + this.showMember.length + '人'
} }
...@@ -622,35 +618,33 @@ ...@@ -622,35 +618,33 @@
zg.RoleOrInitiator = '-1'; zg.RoleOrInitiator = '-1';
zg.Sort = this.myAuditList.length + 1; zg.Sort = this.myAuditList.length + 1;
zg.AuditUserList = Auu; zg.AuditUserList = Auu;
if(Auu.length==0) if (Auu.length == 0) {
{
this.$message.error("成员不能为空") this.$message.error("成员不能为空")
return return
}else if(Auu.length>10){ } else if (Auu.length > 10) {
this.$message.error("人数不能超过10人!") this.$message.error("人数不能超过10人!")
return return
} }
this.myAuditList[this.updateItemIndex]=zg; this.myAuditList[this.updateItemIndex] = zg;
} }
if(this.approvalType == 3) { //岗位 if (this.approvalType == 3) { //岗位
zg.AuditType=3; zg.AuditType = 3;
zg.AuditWay = this.zgObj.AuditWay; zg.AuditWay = this.zgObj.AuditWay;
zg.Sort = this.myAuditList.length + 1; zg.Sort = this.myAuditList.length + 1;
zg.AuditUserList=''; zg.AuditUserList = '';
if(this.showRole.length==0) if (this.showRole.length == 0) {
{
this.$message.error("请选择岗位") this.$message.error("请选择岗位")
return return
}else{ } else {
zg.RoleOrInitiator=this.showRole[0].Id; zg.RoleOrInitiator = this.showRole[0].Id;
zg.AuditDescription=this.showRole[0].DepartmentName; zg.AuditDescription = this.showRole[0].DepartmentName;
} }
this.myAuditList[this.updateItemIndex]=zg; this.myAuditList[this.updateItemIndex] = zg;
} }
this.closeLayer() this.closeLayer()
}, },
deleteRole(){ deleteRole() {
this.showRole=[]; this.showRole = [];
}, },
changeValue(value) { changeValue(value) {
this.tempChosenId = value this.tempChosenId = value
...@@ -658,15 +652,15 @@ ...@@ -658,15 +652,15 @@
addNode() { addNode() {
//data>>AuditList>>AuditType 核人类型 1主管(指定一级) 2 指定成员 3角色 //data>>AuditList>>AuditType 核人类型 1主管(指定一级) 2 指定成员 3角色
let zg = {} let zg = {}
if(this.approvalType == 1) //主管 if (this.approvalType == 1) //主管
{ {
zg.AuditType = 1; zg.AuditType = 1;
zg.AuditWay = 1; zg.AuditWay = 1;
zg.AuditUserList=[], zg.AuditUserList = [],
zg.Sort = this.myAuditList.length + 1; zg.Sort = this.myAuditList.length + 1;
zg.RoleOrInitiator = this.zgObj.RoleOrInitiator zg.RoleOrInitiator = this.zgObj.RoleOrInitiator
let obj = {} let obj = {}
if(this.tempChosenId != -1) { if (this.tempChosenId != -1) {
obj = this.zgList.find((item) => { obj = this.zgList.find((item) => {
return item.value === this.tempChosenId; return item.value === this.tempChosenId;
}) })
...@@ -676,20 +670,20 @@ ...@@ -676,20 +670,20 @@
} }
this.myAuditList.push(zg); this.myAuditList.push(zg);
} }
if(this.approvalType == 2) { //指定成员 if (this.approvalType == 2) { //指定成员
let Au = this.showMember; let Au = this.showMember;
let Auu = []; let Auu = [];
Au.forEach((item, index) => { Au.forEach((item, index) => {
Auu.push({ Auu.push({
EmployeeId: item.DepartmentId, EmployeeId: item.DepartmentId,
EmName:item.DepartmentName, EmName: item.DepartmentName,
Sort: index Sort: index
}) })
}) })
if(Auu.length==1){ if (Auu.length == 1) {
zg.AuditWay = 1 zg.AuditWay = 1
zg.AuditDescription = Auu[0].EmName zg.AuditDescription = Auu[0].EmName
}else if(Auu.length>1){ } else if (Auu.length > 1) {
zg.AuditWay = this.zgObj.AuditWay; zg.AuditWay = this.zgObj.AuditWay;
zg.AuditDescription = '指定' + this.showMember.length + '人' zg.AuditDescription = '指定' + this.showMember.length + '人'
} }
...@@ -697,11 +691,10 @@ ...@@ -697,11 +691,10 @@
zg.RoleOrInitiator = '-1'; zg.RoleOrInitiator = '-1';
zg.Sort = this.myAuditList.length + 1; zg.Sort = this.myAuditList.length + 1;
zg.AuditUserList = Auu; zg.AuditUserList = Auu;
if(Auu.length==0) if (Auu.length == 0) {
{
this.$message.error("成员不能为空") this.$message.error("成员不能为空")
return return
}else if(Auu.length>10){ } else if (Auu.length > 10) {
this.$message.error("人数不能超过10人!") this.$message.error("人数不能超过10人!")
return return
} }
...@@ -709,18 +702,17 @@ ...@@ -709,18 +702,17 @@
this.myAuditList.push(zg); this.myAuditList.push(zg);
} }
if(this.approvalType == 3) { //岗位 if (this.approvalType == 3) { //岗位
zg.AuditType=3; zg.AuditType = 3;
zg.AuditWay = this.zgObj.AuditWay; zg.AuditWay = this.zgObj.AuditWay;
zg.Sort = this.myAuditList.length + 1; zg.Sort = this.myAuditList.length + 1;
zg.AuditUserList=''; zg.AuditUserList = '';
if(this.showRole.length==0) if (this.showRole.length == 0) {
{
this.$message.error("请选择部门") this.$message.error("请选择部门")
return return
}else{ } else {
zg.RoleOrInitiator=this.showRole[0].Id; zg.RoleOrInitiator = this.showRole[0].Id;
zg.AuditDescription=this.showRole[0].DepartmentName; zg.AuditDescription = this.showRole[0].DepartmentName;
} }
this.myAuditList.push(zg); this.myAuditList.push(zg);
} }
...@@ -732,29 +724,39 @@ ...@@ -732,29 +724,39 @@
}, },
closeLayer() { closeLayer() {
let _this = this; let _this = this;
setTimeout(function() { setTimeout(function () {
_this.showlayer = false; _this.showlayer = false;
}, 300) }, 300)
this.isTransition = false; this.isTransition = false;
}, },
saveApproval(){ saveApproval() {
this.addMsg.AuditList=this.myAuditList; this.addMsg.AuditList = this.myAuditList;
this.addMsg.AuditUserList=this.myAuditUserList; this.addMsg.AuditUserList = this.myAuditUserList;
this.ConditionSortList=[], this.ConditionSortList = [],
this.addMsg.Sort=0, this.addMsg.Sort = 0,
this.loading=true; this.loading = true;
this.apipost('WorkFlow_post_SetDefaultCondition',this.addMsg,res=>{ this.apipost('WorkFlow_post_SetDefaultCondition', this.addMsg, res => {
if(res.data.resultCode==1){ if (res.data.resultCode == 1) {
this.loading=false; this.loading = false;
this.$message.success("操作成功!") this.$message.success("操作成功!")
} }
},err=>{}) }, err => {})
}, },
goUrl (path,id) { goUrl(path, id) {
this.$router.push({ name: path,query:{"id":id} }) this.$router.push({
name: path,
query: {
"id": id
}
})
}, },
goback(){ goback() {
this.$router.push({name: 'Approval',query:{"Bid":this.$route.query.Bid}}); this.$router.push({
name: 'Approval',
query: {
"Bid": this.$route.query.Bid
}
});
} }
}, },
mounted() { mounted() {
...@@ -764,22 +766,26 @@ ...@@ -764,22 +766,26 @@
} }
} }
</script> </script>
<style> <style>
.processOtherdelSpan{ .processOtherdelSpan {
color: #E95252; color: #E95252;
} }
.processOtherdelSpan:hover{
.processOtherdelSpan:hover {
text-decoration: underline; text-decoration: underline;
} }
.processOtherDiv{
.processOtherDiv {
font-size: 12px; font-size: 12px;
min-height: 80px; min-height: 80px;
border:1px solid #D2D2D2; border: 1px solid #D2D2D2;
margin-top: 20px; margin-top: 20px;
cursor: pointer; cursor: pointer;
} }
.showMemberIcon { .showMemberIcon {
float: right; float: right;
font-size: 20px; font-size: 20px;
...@@ -831,7 +837,7 @@ ...@@ -831,7 +837,7 @@
} }
.approval_page_content i { .approval_page_content i {
color: #999!important; color: #999 !important;
} }
.approval_page_layer_bottom { .approval_page_layer_bottom {
...@@ -953,4 +959,5 @@ ...@@ -953,4 +959,5 @@
padding-left: 20px; padding-left: 20px;
overflow: hidden; overflow: hidden;
} }
</style> </style>
...@@ -824,8 +824,6 @@ ...@@ -824,8 +824,6 @@
this.PostConfig.TripColor = tempData.LineTripColor; this.PostConfig.TripColor = tempData.LineTripColor;
this.FeatureData.TripColor = tempData.LineTripColor; this.FeatureData.TripColor = tempData.LineTripColor;
} }
console.log(" this.PostConfig", this.PostConfig)
console.log(" this.FeatureData", this.FeatureData)
this.FeatureData.LtName = tempData.LtName; this.FeatureData.LtName = tempData.LtName;
this.FeatureData.DayList = tempData.DayList; this.FeatureData.DayList = tempData.DayList;
......
...@@ -591,7 +591,6 @@ ...@@ -591,7 +591,6 @@
//选中的景点 //选中的景点
'ChooseScenicArray': { 'ChooseScenicArray': {
handler: function (val, oldVal) { handler: function (val, oldVal) {
console.log("this.ChooseScenicArray",this.ChooseScenicArray)
//新增 //新增
this.ChooseScenicArray.forEach(x => { this.ChooseScenicArray.forEach(x => {
let isExist = false; let isExist = false;
...@@ -604,7 +603,6 @@ ...@@ -604,7 +603,6 @@
let scenic = this.$tripUtils.scenicObj(); let scenic = this.$tripUtils.scenicObj();
this.QScenicList.forEach(s => { this.QScenicList.forEach(s => {
if (s.ID === x) { if (s.ID === x) {
console.log("scenic22",s);
scenic.Description = s.Feature; scenic.Description = s.Feature;
scenic.CouponsId = x; scenic.CouponsId = x;
scenic.CouponsName = s.Name; scenic.CouponsName = s.Name;
......
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