Переглянути джерело

修改小程序查询传参

pull/97/head
余菲 1 рік тому
джерело
коміт
2a32445c38
4 змінених файлів з 26 додано та 10 видалено
  1. +1
    -1
      src/views/system-manage/mpmenu-manage/tools/table.js
  2. +13
    -4
      src/views/task-manage/index.vue
  3. +1
    -1
      src/views/task-manage/tools/table.js
  4. +11
    -4
      src/views/user-manage/index.vue

+ 1
- 1
src/views/system-manage/mpmenu-manage/tools/table.js Переглянути файл

@@ -12,7 +12,7 @@ const searchParams = ref({ menuType: 2 })
async function fetchList() {
const params = {
...unref(data.searchParams),
menuType: 1
menuType: 2
}
const res = await getMenuList(params)
const { menuListVoList, permissionList } = res.data

+ 13
- 4
src/views/task-manage/index.vue Переглянути файл

@@ -14,7 +14,7 @@
@update:checked-row-keys="handleCheck"
>
<template #tableTitle>
<n-button v-if="permissionStore.includes('task:all:create')" type="primary" @click="handleModal"> 新建 </n-button>
<n-button v-if="permissionList.includes('task:all:create')" type="primary" @click="handleModal"> {{ getPermissionLabel('task:all:create') }} </n-button>
</template>
</data-table>
</n-card>
@@ -49,12 +49,21 @@ export default {
components: { dataTable, UserModal, headSearch, DrawComp },
setup() {
getPlatform()
const permissionStore = usePermissionStore()// 按钮权限
const data = reactive({
...toRefs(table),
...toRefs(search)
...toRefs(search),
permissionList: permissionStore.accessPermissionCodes

})
const permissionStore = usePermissionStore().accessPermissionCodes // 按钮权限
const getPermissionLabel = (code) => {
return permissionStore.accessPermissions.find((item) => {
return item.code === code
})?.name || ''
}

const status = ['任务待分配', '任务已分配', '飞手已接单', '任务飞行中', '任务已完成']

const loadDataTable = async(res) => {
const _params = {
...unref(data.searchParams),
@@ -101,7 +110,7 @@ export default {
handleModal,
selectedIds,
// deleteComplex,
permissionStore,
getPermissionLabel,
handleCheck,
roleType
}

+ 1
- 1
src/views/task-manage/tools/table.js Переглянути файл

@@ -124,7 +124,7 @@ const data = reactive({
text: true,
onClick: getRowData.bind(null, row)
},
auth: 'basic_list'
auth: ''
},
{
label: '编辑',

+ 11
- 4
src/views/user-manage/index.vue Переглянути файл

@@ -10,7 +10,7 @@
size="large"
>
<template #tableTitle>
<n-button v-if="permissionStore.includes('user:menber:create')" type="primary" @click="handleModal"> 新建 </n-button>
<n-button v-if="permissionList.includes('user:menber:create')" type="primary" @click="handleModal"> {{ getPermissionLabel('user:menber:create') }} </n-button>
</template>
</data-table>
</n-card>
@@ -33,11 +33,18 @@ export default {
name: 'UserManage',
components: { dataTable, UserModal, headSearch },
setup() {
const permissionStore = usePermissionStore()// 按钮权限
const data = reactive({
...toRefs(tableData),
search
search,
permissionList: permissionStore.accessPermissionCodes

})
const permissionStore = usePermissionStore().accessPermissionCodes // 按钮权限
const getPermissionLabel = (code) => {
return permissionStore.accessPermissions.find((item) => {
return item.code === code
})?.name || ''
}
getRoleOptions()

const loadDataTable = async(res) => {
@@ -63,7 +70,7 @@ export default {
...toRefs(data),
loadDataTable,
handleModal,
permissionStore
getPermissionLabel
}
}
}

Завантаження…
Відмінити
Зберегти