公安后台接口替换

This commit is contained in:
TimSpan 2024-09-11 14:42:09 +08:00
parent 5825ea2767
commit e21843ae85
6 changed files with 8 additions and 7 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -1,5 +1,5 @@
<template> <template>
<view>警察</view> <view>警察1111</view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

View File

@ -32,7 +32,7 @@ import {message} from 'ant-design-vue'
const formRef = ref<FormExpose>(null) const formRef = ref<FormExpose>(null)
type TableProps = TableProMaxProps<publicUnitPagerQueryParams> type TableProps = TableProMaxProps<publicUnitPagerQueryParams>
const tableRef = ref<ComponentExposed<typeof TableProMax>>(null!) const tableRef = ref<ComponentExposed<typeof TableProMax>>(null!)
const reqApi: TableProps['requestApi'] = (params) => api.post('/policeUnit/policeEnterprisesUnitPager', params) // const reqApi: TableProps['requestApi'] = (params) => api.post('/management/police/enterprisesUnitPager', params) //
const columns: TableProps['columns'] = [ const columns: TableProps['columns'] = [
{ {

View File

@ -16,6 +16,7 @@ import {ComponentExposed} from 'vue-component-type-helpers'
import {dictSelectNodes} from '@/config/dict.ts' import {dictSelectNodes} from '@/config/dict.ts'
import {publicUnitPagerQueryParams, FromItem} from '@/types/views/publicUnit.ts' import {publicUnitPagerQueryParams, FromItem} from '@/types/views/publicUnit.ts'
import {FormExpose} from 'ant-design-vue/es/form/Form' import {FormExpose} from 'ant-design-vue/es/form/Form'
import {message, Modal} from "ant-design-vue";
const formRef = ref<FormExpose>(null) const formRef = ref<FormExpose>(null)
type TableProps = TableProMaxProps<publicUnitPagerQueryParams> type TableProps = TableProMaxProps<publicUnitPagerQueryParams>
@ -86,9 +87,9 @@ const columns: TableProps['columns'] = [
<a-button <a-button
class={record.isEnable.value === 0 ? 'btn-danger' : 'btn-success'} class={record.isEnable.value === 0 ? 'btn-danger' : 'btn-success'}
onClick={async () => { onClick={async () => {
const resp = await api.post('/management/disableOrEnable', { const resp = await api.post('/management/disableOrEnableMiniProgramUser', {
dataId: record.snowFlakeId, dataId: record.snowFlakeId,
unitOptType: UNIT_TYPE.police unitOptType: 'POLICE_UNIT'
}) })
message.success(resp.message) message.success(resp.message)
await tableRef.value?.requestGetTableData() await tableRef.value?.requestGetTableData()

View File

@ -39,7 +39,7 @@ import {publicUnitPagerQueryParams, FromItem} from "@/types/views/publicUnit.ts"
const tableRef = ref<ComponentExposed<typeof TableProMax>>(null!) const tableRef = ref<ComponentExposed<typeof TableProMax>>(null!)
const formRef = ref<FormExpose>(null) const formRef = ref<FormExpose>(null)
type TableProps = TableProMaxProps<publicUnitPagerQueryParams> type TableProps = TableProMaxProps<publicUnitPagerQueryParams>
const reqApi: TableProps['requestApi'] = (params) => api.post('/managementPoliceUnitUser/pager', params) // const reqApi: TableProps['requestApi'] = (params) => api.post('/management/police/user/pager', params) //
const formParams = ref<{ const formParams = ref<{
snowFlakeId?: string, snowFlakeId?: string,
name: string, name: string,
@ -146,7 +146,7 @@ const columns: TableProps['columns'] = [
style="width:100%" style="width:100%"
title="确认删除账号吗?" title="确认删除账号吗?"
onConfirm={async () => { onConfirm={async () => {
const resp = await api.delete('/managementPoliceUnitUser/deleteById', { const resp = await api.delete('/management/police/user/deleteById', {
managementPoliceUnitUserId: record.snowFlakeId, managementPoliceUnitUserId: record.snowFlakeId,
}) })
message.success(resp.message) message.success(resp.message)
@ -224,7 +224,7 @@ const submit = async () => {
isEnable: formParams.value.isEnable, isEnable: formParams.value.isEnable,
} }
const resp = await api.post('/managementPoliceUnitUser/saveOrUpdate', managementSecurityUnitUserSaveOrUpdateParams) const resp = await api.post('/management/police/user/saveOrUpdate', managementSecurityUnitUserSaveOrUpdateParams)
message.success(resp.message) message.success(resp.message)
tableRef.value?.requestGetTableData() tableRef.value?.requestGetTableData()
closeModal() closeModal()

Binary file not shown.