Skip to content

Commit

Permalink
Merge pull request #50 from lanyulei/dev
Browse files Browse the repository at this point in the history
feat: 添加部门处理人
  • Loading branch information
lanyulei authored Nov 15, 2020
2 parents 74a913e + ab22271 commit 6fd38b9
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 15 deletions.
8 changes: 8 additions & 0 deletions src/api/system/dept.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ export function getDeptList(query) {
})
}

export function getOrdinaryDeptList(params) {
return request({
url: '/api/v1/ordinaryDeptList',
method: 'get',
params
})
}

// 查询部门详细
export function getDept(deptId) {
return request({
Expand Down
15 changes: 9 additions & 6 deletions src/components/wfd/components/DetailPanel/UserTaskDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
:placeholder="i18n['userTask.assignType.placeholder']"
:value="model.assignType"
:disabled="readOnly"
@change="(e) => { onChange('assignValue', []);onChange('assignType', e) }"
@change="(e) => { onChange('assignValue', []); onChange('assignType', e); assignmentType() }"
>
<el-option key="person" value="person" :label="i18n['userTask.assignType.person']" />
<el-option key="role" value="role" :label="i18n['userTask.assignType.role']" />
<!-- <el-option key="persongroup" value="persongroup" :label="i18n['userTask.assignType.persongroup']"/>
<el-option key="department" value="department" :label="i18n['userTask.assignType.department']"/> -->
<!-- <el-option key="persongroup" value="persongroup" :label="i18n['userTask.assignType.persongroup']" /> -->
<el-option key="department" value="department" :label="i18n['userTask.assignType.department']" />
<el-option key="variable" value="variable" :label="i18n['userTask.assignType.variable']" />
</el-select>
</div>
Expand Down Expand Up @@ -74,7 +74,7 @@
<el-option v-for="group in groups" :key="group.id" :label="group.nickname===''?group.name:group.nickname" :value="group.id" />
</el-select>
</div> -->
<!-- <div v-else-if="model.assignType === 'department'" class="panelRow">
<div v-else-if="model.assignType === 'department'" class="panelRow">
<div><span style="color: red">*</span> {{ i18n['userTask.assignType.department.title'] }}:</div>
<el-select
style="width:90%; font-size:12px"
Expand All @@ -85,9 +85,9 @@
:filterable="true"
@change="(e) => { onChange('assignValue', e); getPersons(e) }"
>
<el-option v-for="department in departments" :key="department.id" :label="department.name===''?department.nickname:department.name" :value="department.id" />
<el-option v-for="department in departments" :key="department.deptId" :label="department.deptName" :value="department.deptId" />
</el-select>
</div> -->
</div>
<div v-else-if="model.assignType === 'variable'" class="panelRow">
<div><span style="color: red">*</span> {{ i18n['userTask.assignType.variable.title'] }}:</div>
<el-select
Expand Down Expand Up @@ -220,6 +220,9 @@ export default {
if (!e) {
this.onChange('fullHandle', false)
}
},
assignmentType() {
this.onChange('isCounterSign', false)
}
}
}
Expand Down
18 changes: 9 additions & 9 deletions src/views/process/admin/process-manager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ import { templateList } from '@/api/process/admin/template'
import { taskList } from '@/api/process/admin/task'
import { listUser } from '@/api/system/sysuser'
import { listRole } from '@/api/system/role'
import { getOrdinaryDeptList } from '@/api/system/dept'
export default {
name: 'Process',
Expand Down Expand Up @@ -307,14 +308,12 @@ export default {
})
},
// 获取部门
// getDepartments() {
// departmentList({
// page: 1,
// per_page: 99999
// }).then(response => {
// this.departments = response.data.data
// })
// },
getDepartments() {
getOrdinaryDeptList().then(response => {
this.departments = response.data
console.log(this.departments)
})
},
/** 查询流程列表 */
getList() {
this.loading = true
Expand All @@ -333,6 +332,7 @@ export default {
this.getTemplates()
this.getUsers()
this.getRoles()
this.getDepartments()
this.getTaskList()
},
handleCreate() {
Expand All @@ -359,6 +359,7 @@ export default {
this.dialogProcessVisibleName = 2
this.getProcessInitData()
this.wfdDesignRefresh = false
this.open = true
processDetails({
processId: row.id
}).then(response => {
Expand All @@ -373,7 +374,6 @@ export default {
icon: response.data.icon,
remarks: response.data.remarks
}
this.open = true
this.wfdDesignRefresh = false
this.$nextTick(() => {
this.wfdDesignRefresh = true
Expand Down

0 comments on commit 6fd38b9

Please sign in to comment.