讲师管理

This commit is contained in:
zhangsir
2024-11-06 18:51:13 +08:00
parent 11af2977c2
commit 8c846fb111
9 changed files with 53 additions and 23 deletions

View File

@@ -6,7 +6,7 @@
<a-tab-pane key="1" tab="讲师费管理">
<LecturerFee />
</a-tab-pane>
<a-tab-pane key="2" tab="讲师费审批" >
<a-tab-pane key="2" tab="讲师费审批" v-if="lecturerAdmin('lecturer-admin')">
<LecturerApproval/>
</a-tab-pane>
</a-tabs>
@@ -14,10 +14,11 @@
</div>
</template>
<script lang="jsx">
import { reactive, toRefs, ref, watch,onMounted } from "vue";
import { reactive, toRefs, ref, watch,onMounted,computed } from "vue";
import LecturerFee from "../lecturer/LecturerFee.vue"
import LecturerApproval from "../lecturer/LecturerApproval.vue"
import { useRoute } from "vue-router";
import {useStore} from 'vuex'
export default {
name: "LecturerFeeManagement",
components: {
@@ -25,10 +26,18 @@ import { useRoute } from "vue-router";
LecturerApproval
},
setup() {
const store = useStore();
const userInfo = computed(()=> store.state.userInfo)
const route = useRoute();
const state = reactive({
activeKey:'1',
})
const lecturerAdmin = (admin)=>{
const roleCode = userInfo.value.roleList.map((item)=>item.roleCode)
if (admin){
return roleCode.some(t => t == admin)
}
}
watch(
)
onMounted(() => {
@@ -38,7 +47,7 @@ import { useRoute } from "vue-router";
})
return {
...toRefs(state),
lecturerAdmin,
}
},
};