|
|
|
@ -18,21 +18,23 @@ |
|
|
|
@refresh-change="refreshChange" |
|
|
|
@refresh-change="refreshChange" |
|
|
|
:before-open="beforeOpen" |
|
|
|
:before-open="beforeOpen" |
|
|
|
@on-load="onLoad" |
|
|
|
@on-load="onLoad" |
|
|
|
|
|
|
|
@sort-change="sortChange" |
|
|
|
|
|
|
|
:permission="permissionList" |
|
|
|
> |
|
|
|
> |
|
|
|
<template #menu-left> |
|
|
|
<template #menu-left> |
|
|
|
<el-button type="danger" @click="handleDelete">删 除 </el-button> |
|
|
|
<el-button type="danger" v-if="permission.teamManagement_del" @click="handleDelete">删 除 </el-button> |
|
|
|
<!-- <el-button type="success" icon="el-icon-upload" @click="handleImport" |
|
|
|
<!-- <el-button type="success" icon="el-icon-upload" @click="handleImport" |
|
|
|
>导入 |
|
|
|
>导入 |
|
|
|
</el-button> --> |
|
|
|
</el-button> --> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #menu-right> |
|
|
|
<template #menu-right> |
|
|
|
<el-button type="primary" @click="handleImport">导入</el-button> |
|
|
|
<el-button type="primary" v-if="permission.teamManagement_import" @click="handleImport">导入</el-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #menu="scope"> |
|
|
|
<template #menu="scope"> |
|
|
|
<el-button type="text" @click="setCrew(scope.row)">设置班组人员</el-button> |
|
|
|
<el-button type="text" v-if="permission.teamManagement_setTeamMembers" @click="setCrew(scope.row)">设置班组人员</el-button> |
|
|
|
<el-button type="text" @click="changeTime(scope.row, 0)">日分派时间</el-button> |
|
|
|
<el-button type="text" v-if="permission.teamManagement_dailyDispatchTime" @click="changeTime(scope.row, 0)">日分派时间</el-button> |
|
|
|
<el-button type="text" @click="changeTime(scope.row, 1)">特殊日分派时间</el-button> |
|
|
|
<el-button type="text" v-if="permission.teamManagement_specialDayDistributionTime" @click="changeTime(scope.row, 1)">特殊日分派时间</el-button> |
|
|
|
<el-button type="text" @click="changeTime(scope.row, 2)">轮换时间</el-button> |
|
|
|
<el-button type="text" v-if="permission.teamManagement_rotationTime" @click="changeTime(scope.row, 2)">轮换时间</el-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template #teamLeader="{ row }"> |
|
|
|
<template #teamLeader="{ row }"> |
|
|
|
{{ row.teamLeaderRealName }} |
|
|
|
{{ row.teamLeaderRealName }} |
|
|
|
@ -263,6 +265,7 @@ import { |
|
|
|
} from '@/api/basicData/teamManagement.js'; |
|
|
|
} from '@/api/basicData/teamManagement.js'; |
|
|
|
import basicImport from '@/components/basic-import/main.vue'; |
|
|
|
import basicImport from '@/components/basic-import/main.vue'; |
|
|
|
import treeTransfer from 'tree-transfer-vue3'; // 引入 |
|
|
|
import treeTransfer from 'tree-transfer-vue3'; // 引入 |
|
|
|
|
|
|
|
import { mapGetters } from 'vuex'; |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
components: { |
|
|
|
basicImport, |
|
|
|
basicImport, |
|
|
|
@ -585,6 +588,15 @@ export default { |
|
|
|
checkId: '', |
|
|
|
checkId: '', |
|
|
|
checkTimeType: 0, |
|
|
|
checkTimeType: 0, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
|
|
|
|
...mapGetters(['permission']), |
|
|
|
|
|
|
|
permissionList() { |
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
addBtn: this.validData(this.permission.teamManagement_add, false), |
|
|
|
|
|
|
|
editBtn: this.validData(this.permission.teamManagement_edit, false), |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() {}, |
|
|
|
mounted() {}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
@ -886,6 +898,20 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
refreshChange() { |
|
|
|
refreshChange() { |
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 排序 |
|
|
|
|
|
|
|
sortChange({ prop, order }) { |
|
|
|
|
|
|
|
if (!prop) { |
|
|
|
|
|
|
|
// 如果取消排序,清空排序参数 |
|
|
|
|
|
|
|
this.query.orderByField = undefined; |
|
|
|
|
|
|
|
this.query.isAsc = undefined; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase(); |
|
|
|
|
|
|
|
this.query.orderByField = orderByField; |
|
|
|
|
|
|
|
this.query.isAsc = order === 'ascending' ? true : false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 重新加载数据 |
|
|
|
|
|
|
|
this.onLoad(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
onLoad() { |
|
|
|
this.loading = true; |
|
|
|
this.loading = true; |
|
|
|
|