mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-16 14:26:45 +08:00
讲师管理
This commit is contained in:
@@ -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,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user