Compare commits
No commits in common. "08c365b0edf4f97abfbb53afd9c929bbffef32ad" and "415a4c17c19d254fabeaf96e1c8c072aabe8358d" have entirely different histories.
08c365b0ed
...
415a4c17c1
|
@ -145,7 +145,6 @@ watch(() => props.modelValue, (newVal) => {
|
|||
.dialog-footer{
|
||||
text-align: center;
|
||||
padding-bottom: 10px;
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="page-right">
|
||||
<!-- 搜索 -->
|
||||
<ResoureSearch #add>
|
||||
<el-button v-if="sourceStore.isCreate" type="primary" round @click="openDialog" class="create-btn">
|
||||
<el-button v-if="hasPermission(['platformmanager'])" type="primary" round @click="openDialog" class="create-btn">
|
||||
<i class="iconfont icon-jiahao"></i>
|
||||
新建资源</el-button>
|
||||
</ResoureSearch>
|
||||
|
@ -19,7 +19,7 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onMounted, ref, toRaw } from 'vue'
|
||||
import { ref, toRaw } from 'vue'
|
||||
import useResoureStore from './store'
|
||||
import ChooseTextbook from '@/components/choose-textbook/index.vue'
|
||||
import ResoureSearch from './container/resoure-search.vue'
|
||||
|
@ -27,7 +27,7 @@ import ResoureList from './container/resoure-list.vue'
|
|||
import uploadDialog from '@/components/upload-dialog/index.vue'
|
||||
import uploaderState from '@/store/modules/uploader'
|
||||
import { hasPermission } from '@/utils/hasPermission'
|
||||
//
|
||||
|
||||
const sourceStore = useResoureStore()
|
||||
const isDialogOpen = ref(false)
|
||||
|
||||
|
@ -82,10 +82,6 @@ const fileCallBack = (res) => {
|
|||
}
|
||||
}
|
||||
|
||||
onMounted(()=>{
|
||||
sourceStore.getCreate()
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -27,6 +27,11 @@ tabs.forEach((item) => {
|
|||
item.value = userStore.user.deptId
|
||||
}
|
||||
})
|
||||
tabs.forEach((item, i) => {
|
||||
if (item.label == '平台资源' && !hasPermission(['platformmanager'])) {
|
||||
tabs.splice(i, 1)
|
||||
}
|
||||
})
|
||||
|
||||
const structQuery = {
|
||||
pageNum: 1,
|
||||
|
@ -44,8 +49,6 @@ export default defineStore('resource', {
|
|||
//节点数据
|
||||
nodeData: {},
|
||||
loading: false,
|
||||
//
|
||||
isCreate: true,
|
||||
//查询条件
|
||||
query: {
|
||||
textbookId: '',
|
||||
|
@ -73,6 +76,7 @@ export default defineStore('resource', {
|
|||
if (data.fileSuffix == -1) {
|
||||
data.fileSuffix = ''
|
||||
}
|
||||
console.log(data, 200)
|
||||
getSmarttalkPage(data).then((res) => {
|
||||
this.result.total = res.total
|
||||
this.result.list = res.rows
|
||||
|
@ -83,7 +87,6 @@ export default defineStore('resource', {
|
|||
},
|
||||
changeTab(val) {
|
||||
this.query.fileSource = val
|
||||
this.getCreate()
|
||||
this.handleQuery()
|
||||
},
|
||||
changeType(val) {
|
||||
|
@ -97,14 +100,6 @@ export default defineStore('resource', {
|
|||
// 关键词搜索
|
||||
changeName() {
|
||||
this.handleQuery()
|
||||
},
|
||||
getCreate(){
|
||||
if(this.query.fileSource == '平台'){
|
||||
this.isCreate = hasPermission(['platformmanager'])
|
||||
}
|
||||
else{
|
||||
this.isCreate = hasPermission(['schoolteacher','headmaster'])
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue