|
@@ -3,7 +3,7 @@
|
|
<div class="app-container approvalProcess">
|
|
<div class="app-container approvalProcess">
|
|
<div class="title-box">
|
|
<div class="title-box">
|
|
<p>化学品申购审批流程</p>
|
|
<p>化学品申购审批流程</p>
|
|
- <!--<p class="reset-button-one"><i class="el-icon-arrow-left"></i>返回</p>-->
|
|
|
|
|
|
+ <p class="inquire-button-one" @click="submitForm">提交</p>
|
|
</div>
|
|
</div>
|
|
<div class="approvalProcess-page scrollbar-box">
|
|
<div class="approvalProcess-page scrollbar-box">
|
|
<div class="process-max-box">
|
|
<div class="process-max-box">
|
|
@@ -27,7 +27,7 @@
|
|
<i class="el-icon-close" @click="listDelButton"></i>
|
|
<i class="el-icon-close" @click="listDelButton"></i>
|
|
</div>
|
|
</div>
|
|
<div class="process-name-box" @click="openDialogButton(index)">
|
|
<div class="process-name-box" @click="openDialogButton(index)">
|
|
- <p class="process-name-p">{{!item.list[0]?'请选择审批人':(item.list[0]&&!item.list[1]?item.list[0].name:(!item.list[0]?'已选择'+item.list.length+'人':''))}}</p>
|
|
|
|
|
|
+ <p class="process-name-p">{{!item.actAudituserInfo[0]?'请选择审批人':(item.actAudituserInfo[0]&&!item.actAudituserInfo[1]?item.actAudituserInfo[0].nickName:(item.actAudituserInfo[1]?'已选择'+item.actAudituserInfo.length+'人':''))}}</p>
|
|
<i class="el-icon-arrow-right"></i>
|
|
<i class="el-icon-arrow-right"></i>
|
|
</div>
|
|
</div>
|
|
<div class="process-img-box">
|
|
<div class="process-img-box">
|
|
@@ -48,22 +48,24 @@
|
|
<div class="big-box">
|
|
<div class="big-box">
|
|
<!--input部分-->
|
|
<!--input部分-->
|
|
<div class="input-box">
|
|
<div class="input-box">
|
|
- <input type="text" placeholder="搜索姓名或工号、身份">
|
|
|
|
- <p class="el-icon-search"></p>
|
|
|
|
|
|
+ <input type="text" placeholder="搜索姓名或工号、身份"
|
|
|
|
+ v-model="queryParamsData.nickName">
|
|
|
|
+ <p class="el-icon-search" @click="handleQuery"></p>
|
|
</div>
|
|
</div>
|
|
<!--面包屑部分-->
|
|
<!--面包屑部分-->
|
|
<div class="title-list-box scrollbar-box">
|
|
<div class="title-list-box scrollbar-box">
|
|
<div class="title-for" v-for="(item,index) in titleList" :key="index" @click="titleClick(index)">
|
|
<div class="title-for" v-for="(item,index) in titleList" :key="index" @click="titleClick(index)">
|
|
- <span :class="index!=titleList.length-1?'spanColor':''">{{item.name}}</span>
|
|
|
|
|
|
+ <span :class="index!=titleList.length-1?'spanColor':''">{{item.label}}</span>
|
|
<span v-if="index!=titleList.length-1" class="el-icon-arrow-right"></span>
|
|
<span v-if="index!=titleList.length-1" class="el-icon-arrow-right"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!--可滚动数据部分-->
|
|
<!--可滚动数据部分-->
|
|
<div class="list-max-box scrollbar-box">
|
|
<div class="list-max-box scrollbar-box">
|
|
<!--部门部分-->
|
|
<!--部门部分-->
|
|
- <div class="dept-box" v-for="(item,index) in deptList" :key="item.deptId">
|
|
|
|
|
|
+ <div class="dept-box" @click="deptClick(item)"
|
|
|
|
+ v-for="(item,index) in deptList" :key="item.deptId">
|
|
<img src="@/assets/ZDimages/medicUniversity-3_1/icon-mc.png">
|
|
<img src="@/assets/ZDimages/medicUniversity-3_1/icon-mc.png">
|
|
- <p>{{item.name}}</p>
|
|
|
|
|
|
+ <p>{{item.label}}</p>
|
|
<img src="@/assets/ZDimages/medicUniversity-3_1/icon-mc-xj.png">
|
|
<img src="@/assets/ZDimages/medicUniversity-3_1/icon-mc-xj.png">
|
|
<p>下级</p>
|
|
<p>下级</p>
|
|
</div>
|
|
</div>
|
|
@@ -71,8 +73,8 @@
|
|
<div class="user-box" v-for="(item,index) in userList" :key="index" @click="addObjButton(item)">
|
|
<div class="user-box" v-for="(item,index) in userList" :key="index" @click="addObjButton(item)">
|
|
<img v-if="item.type" src="@/assets/ZDimages/personnelManagement/icon_xzqx_xz.png">
|
|
<img v-if="item.type" src="@/assets/ZDimages/personnelManagement/icon_xzqx_xz.png">
|
|
<img v-if="!item.type" src="@/assets/ZDimages/personnelManagement/icon_xzqx_zc.png">
|
|
<img v-if="!item.type" src="@/assets/ZDimages/personnelManagement/icon_xzqx_zc.png">
|
|
- <p>{{item.name}}</p>
|
|
|
|
- <p>{{item.text}}</p>
|
|
|
|
|
|
+ <p>{{item.nickName}}</p>
|
|
|
|
+ <p>{{item.positionName}}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -80,9 +82,9 @@
|
|
<div class="dialog-right-max-big-box">
|
|
<div class="dialog-right-max-big-box">
|
|
<p class="title-p">已选:</p>
|
|
<p class="title-p">已选:</p>
|
|
<div class="big-box scrollbar-box">
|
|
<div class="big-box scrollbar-box">
|
|
- <div class="user-for-box" v-for="(item,index) in userDialogRightList" :key="index">
|
|
|
|
- <img :src="item.url">
|
|
|
|
- <p>{{item.name}}</p>
|
|
|
|
|
|
+ <div class="user-for-box" v-for="(item,index) in userDialogRightList.actAudituserInfo" :key="index">
|
|
|
|
+ <img :src="item.avatar">
|
|
|
|
+ <p>{{item.nickName}}</p>
|
|
<p class="el-icon-circle-close" @click="delRightUser(index)"></p>
|
|
<p class="el-icon-circle-close" @click="delRightUser(index)"></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -100,7 +102,7 @@
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div class="radio-box">
|
|
<div class="radio-box">
|
|
- <el-radio-group v-model="radio">
|
|
|
|
|
|
+ <el-radio-group v-model="userDialogRightList.auditType">
|
|
<el-radio :label="1" style="color:#999;">依次审批</el-radio>
|
|
<el-radio :label="1" style="color:#999;">依次审批</el-radio>
|
|
<el-radio :label="2" style="color:#999;">或签</el-radio>
|
|
<el-radio :label="2" style="color:#999;">或签</el-radio>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
@@ -109,8 +111,8 @@
|
|
</div>
|
|
</div>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
<p class="dialog-footer-null-p"></p>
|
|
<p class="dialog-footer-null-p"></p>
|
|
- <el-button>取 消</el-button>
|
|
|
|
- <el-button type="primary">确 定</el-button>
|
|
|
|
|
|
+ <el-button @click="offDialog">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="upDataButton">确 定</el-button>
|
|
<p class="dialog-footer-null-p"></p>
|
|
<p class="dialog-footer-null-p"></p>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -118,12 +120,11 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+ import { getConfigList,treeselect,listUser,auditconfig } from "@/api/medicUniversity-3_1/index";
|
|
export default {
|
|
export default {
|
|
name: "index",
|
|
name: "index",
|
|
data(){
|
|
data(){
|
|
return{
|
|
return{
|
|
- // 审批流程类型
|
|
|
|
- radio:null,
|
|
|
|
//流程数据
|
|
//流程数据
|
|
dataList:[],
|
|
dataList:[],
|
|
//人员选择页面开关
|
|
//人员选择页面开关
|
|
@@ -131,24 +132,11 @@
|
|
//选中流程的index
|
|
//选中流程的index
|
|
userDialogTypeIndex:null,
|
|
userDialogTypeIndex:null,
|
|
//窗口右侧已选中人员数据
|
|
//窗口右侧已选中人员数据
|
|
- userDialogRightList:[
|
|
|
|
- {name:"柴云龙1",id:1,url:"https://img2.baidu.com/it/u=2493740568,4186617519&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"},
|
|
|
|
- {name:"柴云龙2",id:2,url:"https://img2.baidu.com/it/u=2493740568,4186617519&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"},
|
|
|
|
- {name:"柴云龙3",id:3,url:"https://img2.baidu.com/it/u=2493740568,4186617519&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"},
|
|
|
|
- {name:"柴云龙4",id:4,url:"https://img2.baidu.com/it/u=2493740568,4186617519&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"},
|
|
|
|
- {name:"柴云龙5",id:5,url:"https://img2.baidu.com/it/u=2493740568,4186617519&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"},
|
|
|
|
- {name:"柴云龙6",id:6,url:"https://img2.baidu.com/it/u=2493740568,4186617519&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"},
|
|
|
|
- ],
|
|
|
|
- //查询院系的index
|
|
|
|
- userDialogDeptIndex:null,
|
|
|
|
|
|
+ userDialogRightList:{},
|
|
//面包屑数据
|
|
//面包屑数据
|
|
- titleList:[
|
|
|
|
- {name:"中国矿业大学",deptId:"1"},
|
|
|
|
- {name:"环境与测绘学院",deptId:"2"},
|
|
|
|
- {name:"实验中心",deptId:"3"},
|
|
|
|
- ],
|
|
|
|
|
|
+ titleList:[],
|
|
//院系数据
|
|
//院系数据
|
|
- deptList:[{name:"实验中心"},{name:"实验中心"},{name:"实验中心"},{name:"实验中心"},{name:"实验中心"},],
|
|
|
|
|
|
+ deptList:[],
|
|
//人员数据
|
|
//人员数据
|
|
userList:[
|
|
userList:[
|
|
{name:"柴云龙1",type:true,text:"安全责任人",id:1,},
|
|
{name:"柴云龙1",type:true,text:"安全责任人",id:1,},
|
|
@@ -169,22 +157,72 @@
|
|
pageSize:20,
|
|
pageSize:20,
|
|
},
|
|
},
|
|
//数据数量
|
|
//数据数量
|
|
- total:10,
|
|
|
|
|
|
+ total:20,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
|
|
|
|
},
|
|
},
|
|
mounted(){
|
|
mounted(){
|
|
-
|
|
|
|
|
|
+ this.getConfigList();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //提交
|
|
|
|
+ submitForm(){
|
|
|
|
+ let self = this;
|
|
|
|
+ self.$confirm('确认要提交吗?', "警告", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning"
|
|
|
|
+ }).then(function() {
|
|
|
|
+ for(let i=0;i<self.dataList.length;i++){
|
|
|
|
+ if(!self.dataList[i].actAudituserInfo[0]){
|
|
|
|
+ self.msgError('第'+(i+1)+'个审批流程未添加人员')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ let list = [];
|
|
|
|
+ for(let i=0;i<self.dataList.length;i++){
|
|
|
|
+ let bigObj = {
|
|
|
|
+ auditType:self.dataList.auditType,
|
|
|
|
+ actAudituser:[],
|
|
|
|
+ };
|
|
|
|
+ for(let o=0;o<self.dataList[i].actAudituserInfo.length;o++){
|
|
|
|
+ let obj = {
|
|
|
|
+ auditUserId:self.dataList[i].actAudituserInfo[o].userId,
|
|
|
|
+ };
|
|
|
|
+ bigObj.actAudituser.push(obj);
|
|
|
|
+ }
|
|
|
|
+ list.push(bigObj);
|
|
|
|
+ }
|
|
|
|
+ auditconfig(list).then(response => {
|
|
|
|
+ self.msgSuccess(response.msg);
|
|
|
|
+ self.getConfigList();
|
|
|
|
+ });
|
|
|
|
+ }).then(() => {
|
|
|
|
+ }).catch(() => {});
|
|
|
|
+ },
|
|
|
|
+ //确认
|
|
|
|
+ upDataButton(){
|
|
|
|
+ this.dataList[this.userDialogTypeIndex] = JSON.parse(JSON.stringify(this.userDialogRightList));
|
|
|
|
+ this.userDialogType = false;
|
|
|
|
+ },
|
|
|
|
+ //关闭弹窗
|
|
|
|
+ offDialog(){
|
|
|
|
+ this.userDialogType = false;
|
|
|
|
+ },
|
|
|
|
+ // 查询设置
|
|
|
|
+ getConfigList(){
|
|
|
|
+ getConfigList().then(response => {
|
|
|
|
+ this.dataList = response.rows
|
|
|
|
+ });
|
|
|
|
+ },
|
|
//添加勾选人员
|
|
//添加勾选人员
|
|
addObjButton(item){
|
|
addObjButton(item){
|
|
if(!item.type){
|
|
if(!item.type){
|
|
- if(this.userDialogRightList.length<10){
|
|
|
|
- this.userDialogRightList.push(item);
|
|
|
|
- this.checkDataProcess(1);
|
|
|
|
|
|
+ if(this.userDialogRightList.actAudituserInfo.length<10){
|
|
|
|
+ this.userDialogRightList.actAudituserInfo.push(item);
|
|
|
|
+ this.checkDataProcess();
|
|
}else{
|
|
}else{
|
|
this.msgError('选择不能超过10人')
|
|
this.msgError('选择不能超过10人')
|
|
}
|
|
}
|
|
@@ -192,16 +230,16 @@
|
|
},
|
|
},
|
|
//删除选中人员
|
|
//删除选中人员
|
|
delRightUser(index){
|
|
delRightUser(index){
|
|
- this.userDialogRightList.splice(index,1);
|
|
|
|
- this.checkDataProcess(2);
|
|
|
|
|
|
+ this.userDialogRightList.actAudituserInfo.splice(index,1);
|
|
|
|
+ this.checkDataProcess();
|
|
},
|
|
},
|
|
// 勾选数据处理
|
|
// 勾选数据处理
|
|
- checkDataProcess(type){
|
|
|
|
|
|
+ checkDataProcess(){
|
|
let self = this;
|
|
let self = this;
|
|
for(let i=0;i<self.userList.length;i++){
|
|
for(let i=0;i<self.userList.length;i++){
|
|
let num = 0;
|
|
let num = 0;
|
|
- for(let o=0;o<self.userDialogRightList.length;o++){
|
|
|
|
- if(self.userList[i].id == self.userDialogRightList[o].id){
|
|
|
|
|
|
+ for(let o=0;o<self.userDialogRightList.actAudituserInfo.length;o++){
|
|
|
|
+ if(self.userList[i].userId == self.userDialogRightList.actAudituserInfo[o].userId){
|
|
num++
|
|
num++
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -209,13 +247,11 @@
|
|
}
|
|
}
|
|
self.$forceUpdate();
|
|
self.$forceUpdate();
|
|
},
|
|
},
|
|
- //获取人员列表
|
|
|
|
- getUserList(){
|
|
|
|
- this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
|
|
|
|
- },
|
|
|
|
//面包屑点击事件
|
|
//面包屑点击事件
|
|
titleClick(index){
|
|
titleClick(index){
|
|
let self = this;
|
|
let self = this;
|
|
|
|
+ this.getCatalogListOne(this.titleList[index].id);
|
|
|
|
+ this.getUserList(this.titleList[index].id);
|
|
let list = [];
|
|
let list = [];
|
|
let data = JSON.parse(JSON.stringify(self.titleList))
|
|
let data = JSON.parse(JSON.stringify(self.titleList))
|
|
for(let i=index;i>=0;i--){
|
|
for(let i=index;i>=0;i--){
|
|
@@ -223,16 +259,59 @@
|
|
}
|
|
}
|
|
this.$set(this,'titleList',list);
|
|
this.$set(this,'titleList',list);
|
|
},
|
|
},
|
|
|
|
+ // 目录点击事件
|
|
|
|
+ deptClick(item){
|
|
|
|
+ this.titleList.push(item);
|
|
|
|
+ this.getCatalogListOne(item.id);
|
|
|
|
+ this.getUserList(item.id);
|
|
|
|
+ },
|
|
|
|
+ // 查询目录
|
|
|
|
+ getCatalogListOne(id){
|
|
|
|
+ treeselect({parentId:id}).then(response => {
|
|
|
|
+ this.deptList = response.data;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 查询目录初始化
|
|
|
|
+ getCatalogList(id){
|
|
|
|
+ treeselect({parentId:id}).then(response => {
|
|
|
|
+ this.deptList = response.data[0].children;
|
|
|
|
+ this.$set(this,'titleList',[response.data[0]]);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 查询人员列表
|
|
|
|
+ getUserList(deptId){
|
|
|
|
+ this.queryParamsData = JSON.parse(JSON.stringify(this.queryParams));
|
|
|
|
+ this.queryParamsData.deptId = deptId;
|
|
|
|
+ listUser(this.queryParamsData).then(response => {
|
|
|
|
+ this.userList = response.rows;
|
|
|
|
+ this.checkDataProcess();
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ handleQuery() {
|
|
|
|
+ this.queryParamsData.pageNum = 1;
|
|
|
|
+ this.queryParamsData.pageSize = 20;
|
|
|
|
+ this.queryParams = JSON.parse(JSON.stringify(this.queryParamsData));
|
|
|
|
+ this.getUserList("");
|
|
|
|
+ this.getCatalogList("");
|
|
|
|
+ },
|
|
// 编辑人员页面开启
|
|
// 编辑人员页面开启
|
|
openDialogButton(index){
|
|
openDialogButton(index){
|
|
let self = this;
|
|
let self = this;
|
|
|
|
+ this.$set(this.queryParamsData,'nickName',"");
|
|
|
|
+ this.$set(this.queryParams,'nickName',"");
|
|
|
|
+ this.getCatalogList("");
|
|
|
|
+ this.getUserList("");
|
|
|
|
+ this.$set(this,'userDialogRightList',JSON.parse(JSON.stringify(this.dataList[index])));
|
|
this.$set(this,'userDialogTypeIndex',index);
|
|
this.$set(this,'userDialogTypeIndex',index);
|
|
- // this.$set(this,'userDialogRightList',self.dataList[index].list);
|
|
|
|
this.$set(this,'userDialogType',true);
|
|
this.$set(this,'userDialogType',true);
|
|
},
|
|
},
|
|
//添加流
|
|
//添加流
|
|
listAddButton(){
|
|
listAddButton(){
|
|
- let obj = {list:[]};
|
|
|
|
|
|
+ let obj = {
|
|
|
|
+ actAudituser:[],
|
|
|
|
+ actAudituserInfo:[],
|
|
|
|
+ auditType:1,
|
|
|
|
+ };
|
|
this.dataList.push(obj);
|
|
this.dataList.push(obj);
|
|
},
|
|
},
|
|
//删除流
|
|
//删除流
|