|
@@ -148,9 +148,9 @@
|
|
</vxe-column>
|
|
</vxe-column>
|
|
<vxe-column title="操作" width="150px" fixed="right" align="center">
|
|
<vxe-column title="操作" width="150px" fixed="right" align="center">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button v-if="hasPermission('cw_work_client:info:edit')&&scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'" type="text" icon="el-icon-edit" size="small" @click="push(scope.row)">修改</el-button>
|
|
|
|
- <el-button v-if="hasPermission('cw_work_client:info:edit')&&scope.row.status==='2'" type="text" icon="el-icon-edit" size="small" @click="reback(scope.row)">撤回</el-button>
|
|
|
|
- <el-button v-if="hasPermission('cw_work_client:info:del')&&scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'" type="text" icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
|
|
|
|
|
|
+ <el-button v-if="hasPermission('cw_work_client:info:edit')&&(scope.row.createBy.id === $store.state.user.id || isAdmin)&&scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'" type="text" icon="el-icon-edit" size="small" @click="push(scope.row)">修改</el-button>
|
|
|
|
+ <el-button v-if="hasPermission('cw_work_client:info:edit')&&(scope.row.createBy.id === $store.state.user.id || isAdmin)&&scope.row.status==='2'" type="text" icon="el-icon-edit" size="small" @click="reback(scope.row)">撤回</el-button>
|
|
|
|
+ <el-button v-if="hasPermission('cw_work_client:info:del')&&(scope.row.createBy.id === $store.state.user.id || isAdmin)&&scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'" type="text" icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
|
|
</template>
|
|
</template>
|
|
</vxe-column>
|
|
</vxe-column>
|
|
</vxe-table>
|
|
</vxe-table>
|
|
@@ -176,6 +176,7 @@
|
|
import ProcessService from '@/api/flowable/ProcessService'
|
|
import ProcessService from '@/api/flowable/ProcessService'
|
|
import WorkClientForm from './WorkClientForm'
|
|
import WorkClientForm from './WorkClientForm'
|
|
import pick from 'lodash.pick'
|
|
import pick from 'lodash.pick'
|
|
|
|
+ import UserService from '@/api/sys/UserService'
|
|
export default {
|
|
export default {
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
@@ -201,16 +202,19 @@
|
|
tableKey: '',
|
|
tableKey: '',
|
|
loading: false,
|
|
loading: false,
|
|
processDefinitionAuditId: '',
|
|
processDefinitionAuditId: '',
|
|
- procDefAuditKey: ''
|
|
|
|
|
|
+ procDefAuditKey: '',
|
|
|
|
+ isAdmin: false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
workClientService: null,
|
|
workClientService: null,
|
|
taskService: null,
|
|
taskService: null,
|
|
processService: null,
|
|
processService: null,
|
|
|
|
+ userService: null,
|
|
created () {
|
|
created () {
|
|
this.workClientService = new WorkClientService()
|
|
this.workClientService = new WorkClientService()
|
|
this.taskService = new TaskService()
|
|
this.taskService = new TaskService()
|
|
this.processService = new ProcessService()
|
|
this.processService = new ProcessService()
|
|
|
|
+ this.userService = new UserService()
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
WorkClientForm
|
|
WorkClientForm
|
|
@@ -246,6 +250,12 @@
|
|
view (id) {
|
|
view (id) {
|
|
this.$refs.workClientForm.init('view', id)
|
|
this.$refs.workClientForm.init('view', id)
|
|
},
|
|
},
|
|
|
|
+ // 查询当前用户是否是管理员用户
|
|
|
|
+ checkIsAdmin () {
|
|
|
|
+ this.userService.is().then(({data}) => {
|
|
|
|
+ this.isAdmin = data
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 获取数据列表
|
|
// 获取数据列表
|
|
refreshList () {
|
|
refreshList () {
|
|
this.loading = true
|
|
this.loading = true
|
|
@@ -260,6 +270,7 @@
|
|
this.tableKey = Math.random()
|
|
this.tableKey = Math.random()
|
|
this.loading = false
|
|
this.loading = false
|
|
})
|
|
})
|
|
|
|
+ this.checkIsAdmin()
|
|
this.processService.getByName('财务-客户登记').then(({data}) => {
|
|
this.processService.getByName('财务-客户登记').then(({data}) => {
|
|
if (!this.commonJS.isEmpty(data.id)) {
|
|
if (!this.commonJS.isEmpty(data.id)) {
|
|
this.processDefinitionAuditId = data.id
|
|
this.processDefinitionAuditId = data.id
|