130 lines
4.1 KiB
Vue
130 lines
4.1 KiB
Vue
<!-- 流程组件公共数据 -->
|
|
<script>
|
|
|
|
export default {
|
|
name: 'ProcessMixins',
|
|
mixins: [],
|
|
components: {},
|
|
data() {
|
|
return {
|
|
processTypeList: [
|
|
{
|
|
label: '权限申请流程',
|
|
value: '1'
|
|
},
|
|
],
|
|
formDisableFlag: false,
|
|
nowOrder: '',
|
|
nowOrderBy: '',
|
|
searchForm: {},
|
|
busMes: {
|
|
createUser: '',
|
|
createUserName: '',
|
|
dataJson: '',
|
|
dept: '',
|
|
id: '',
|
|
prcType: '',
|
|
submitJson: '',
|
|
taskId: '',
|
|
userId: '',
|
|
},
|
|
processOld:{} , //存储流程的就信息
|
|
prcId: '',
|
|
prcNum: '',
|
|
prcName:''
|
|
}
|
|
},
|
|
methods: {
|
|
// 表格排序
|
|
sortChange(sortObj, tableName) {
|
|
// console.log(sortObj)
|
|
this.nowOrderBy = sortObj.prop
|
|
if (sortObj.order === 'ascending') {
|
|
this.nowOrder = 'asc'
|
|
} else if (sortObj.order === 'descending') {
|
|
this.nowOrder = 'desc'
|
|
} else {
|
|
this.nowOrder = ''
|
|
this.nowOrderBy = ''
|
|
}
|
|
this[tableName]()
|
|
},
|
|
/**
|
|
* @description: 根据流程类型获取流程名称
|
|
* @date: 2020-11-25 15:47:12
|
|
* @auth: chenxiaoxi
|
|
*/
|
|
getPrcName(prcType) {
|
|
let prcName = ''
|
|
this.processTypeList.map(item => {
|
|
if (item.value === prcType) {
|
|
prcName = item.label
|
|
}
|
|
})
|
|
return prcName
|
|
},
|
|
/**
|
|
* @description: 对表单部分字段进行校验
|
|
* @date: 2021-01-15 10:00:16
|
|
* @auth: chenxiaoxi
|
|
*/
|
|
handleValidField(field) {
|
|
this.$refs['prcForm'].validateField(field)
|
|
},
|
|
|
|
/**
|
|
* @description: 查询下一节点处理人(高级经理)
|
|
* @date: 2021-03-11
|
|
* @auth: WangXu
|
|
*/
|
|
getResByCurrentRoleId(roleIds, roleName, callback) {
|
|
// 获取当前 foRoleId 有 otherFORoleId 就一定是 其他起草人填写的 FO
|
|
// 否则一定是主起草人填写的 FO
|
|
this.$http.get('sys/role/getParentsByFOs', {
|
|
ids: roleIds, // 当前登录人的角色
|
|
roleHierarchyName: roleName // 上级角色
|
|
}, {}, res => {
|
|
if (res.ok) {
|
|
callback.call(this, res.data)
|
|
} else {
|
|
this.$message.warning(res.message)
|
|
}
|
|
})
|
|
},
|
|
// 所有流程的完成任务
|
|
completeProcess(obj) {
|
|
this.$api.process.completeTask(obj).then(res=>{
|
|
this.$message['success']('提交成功')
|
|
this.$router.push({
|
|
path:"/userCenter/processCenter",
|
|
query:{
|
|
id:'AEHJB8YNJ3'
|
|
}
|
|
})
|
|
})
|
|
},
|
|
// 获取流程详细信息
|
|
getProcessDetail(){
|
|
return new Promise((resolve,reject)=>{
|
|
this.$api.process.getProcessDetail({
|
|
prcId: this.prcId,
|
|
prcType: this.prcType
|
|
}).then(res=>{
|
|
let data=res.data
|
|
this.processOld=data
|
|
console.log( this.processOld,"processOld")
|
|
resolve()
|
|
}).catch(err=>{
|
|
reject()
|
|
})
|
|
})
|
|
},
|
|
|
|
},
|
|
computed: {},
|
|
watch: {},
|
|
mounted() {
|
|
}
|
|
}
|
|
</script>
|