Browse Source

修改小程序查询传参

pull/97/head
余菲 1 year ago
parent
commit
2a32445c38
4 changed files with 26 additions and 10 deletions
  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 View File

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

+ 13
- 4
src/views/task-manage/index.vue View File

@update:checked-row-keys="handleCheck" @update:checked-row-keys="handleCheck"
> >
<template #tableTitle> <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> </template>
</data-table> </data-table>
</n-card> </n-card>
components: { dataTable, UserModal, headSearch, DrawComp }, components: { dataTable, UserModal, headSearch, DrawComp },
setup() { setup() {
getPlatform() getPlatform()
const permissionStore = usePermissionStore()// 按钮权限
const data = reactive({ const data = reactive({
...toRefs(table), ...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 status = ['任务待分配', '任务已分配', '飞手已接单', '任务飞行中', '任务已完成']

const loadDataTable = async(res) => { const loadDataTable = async(res) => {
const _params = { const _params = {
...unref(data.searchParams), ...unref(data.searchParams),
handleModal, handleModal,
selectedIds, selectedIds,
// deleteComplex, // deleteComplex,
permissionStore,
getPermissionLabel,
handleCheck, handleCheck,
roleType roleType
} }

+ 1
- 1
src/views/task-manage/tools/table.js View File

text: true, text: true,
onClick: getRowData.bind(null, row) onClick: getRowData.bind(null, row)
}, },
auth: 'basic_list'
auth: ''
}, },
{ {
label: '编辑', label: '编辑',

+ 11
- 4
src/views/user-manage/index.vue View File

size="large" size="large"
> >
<template #tableTitle> <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> </template>
</data-table> </data-table>
</n-card> </n-card>
name: 'UserManage', name: 'UserManage',
components: { dataTable, UserModal, headSearch }, components: { dataTable, UserModal, headSearch },
setup() { setup() {
const permissionStore = usePermissionStore()// 按钮权限
const data = reactive({ const data = reactive({
...toRefs(tableData), ...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() getRoleOptions()


const loadDataTable = async(res) => { const loadDataTable = async(res) => {
...toRefs(data), ...toRefs(data),
loadDataTable, loadDataTable,
handleModal, handleModal,
permissionStore
getPermissionLabel
} }
} }
} }

Loading…
Cancel
Save