Browse Source

新增统计接口

master
zhouhaibin 5 months ago
parent
commit
9453a41c06
  1. 12
      src/views/informationSub/countStatistics/countStatistics.api.ts
  2. 4
      src/views/informationSub/countStatistics/index.vue
  3. 6
      src/views/informationSub/countStatistics/modifycountStatistics.vue

12
src/views/informationSub/countStatistics/countStatistics.api.ts

@ -2,18 +2,18 @@ import { defHttp } from '@/utils/http/axios';
export enum Api { export enum Api {
changeFieldManagePageList = '/huzhouChangefieldmanage/changeFieldManagePageList', periodicallabCountPageList = '/huzhouPeriodicallabCount/periodicallabCountPageList',
getchangeFieldManageById = '/huzhouChangefieldmanage/getchangeFieldManageById', getperiodicallabById = '/huzhouPeriodicallabCount/getperiodicallabById',
modifychangeFieldManageById='/huzhouChangefieldmanage/modifychangeFieldManageById' modifyPeriodicallabCount='/huzhouPeriodicallabCount/modifyPeriodicallabCount'
} }
/** /**
* list * list
*/ */
export const changeFieldManagePageList = (params?) =>defHttp.get({ url: Api.changeFieldManagePageList, params }); export const periodicallabCountPageList = (params?) =>defHttp.get({ url: Api.periodicallabCountPageList, params });
export const getchangeFieldManageById = (params?) =>defHttp.get({ url: Api.getchangeFieldManageById, params }); export const getperiodicallabById = (params?) =>defHttp.get({ url: Api.getperiodicallabById, params });
export const modifychangeFieldManageById = (params?) =>defHttp.post({ url: Api.modifychangeFieldManageById, params }); export const modifyPeriodicallabCount = (params?) =>defHttp.post({ url: Api.modifyPeriodicallabCount, params });

4
src/views/informationSub/countStatistics/index.vue

@ -25,7 +25,7 @@ import { PageWrapper } from '@/components/Page';
import modifycountStatistics from "./modifycountStatistics.vue" import modifycountStatistics from "./modifycountStatistics.vue"
import { BasicModal, useModal } from '@/components/Modal'; import { BasicModal, useModal } from '@/components/Modal';
import { countStatisticsColumns, searchFormSchema } from './countStatistics.data' import { countStatisticsColumns, searchFormSchema } from './countStatistics.data'
import { changeFieldManagePageList } from './countStatistics.api'; import { periodicallabCountPageList } from './countStatistics.api';
let id = ref(); let id = ref();
@ -34,7 +34,7 @@ const [registechangeFieldManageModal, { openModal: openchangeFieldManage,closeMo
const [registerTable,{reload}] = useTable({ const [registerTable,{reload}] = useTable({
title: '信息稿件详情', title: '信息稿件详情',
api: changeFieldManagePageList, api: periodicallabCountPageList,
columns: countStatisticsColumns, columns: countStatisticsColumns,
useSearchForm: true, useSearchForm: true,
actionColumn: { actionColumn: {

6
src/views/informationSub/countStatistics/modifycountStatistics.vue

@ -9,13 +9,13 @@
import { defineProps, onMounted } from 'vue'; import { defineProps, onMounted } from 'vue';
import { useForm, BasicForm } from '@/components/Form'; import { useForm, BasicForm } from '@/components/Form';
import { countStatisticsFormSchema } from './countStatistics.data' import { countStatisticsFormSchema } from './countStatistics.data'
import { modifychangeFieldManageById, getchangeFieldManageById } from './countStatistics.api'; import { modifyPeriodicallabCount, getperiodicallabById } from './countStatistics.api';
let emit = defineEmits(["exit"]) let emit = defineEmits(["exit"])
let dataTo = defineProps(["id"]) let dataTo = defineProps(["id"])
onMounted(async () => { onMounted(async () => {
let res = await getchangeFieldManageById({id: dataTo.id}) let res = await getperiodicallabById({id: dataTo.id})
console.log("结果是", res) console.log("结果是", res)
setFieldsValue(res) setFieldsValue(res)
}) })
@ -46,7 +46,7 @@ const [registerchangeFieldForm,{ getFieldsValue, validate, setFieldsValue }] = u
async function handleSubmit() { async function handleSubmit() {
if (await validate()) { if (await validate()) {
let datas = await getFieldsValue() let datas = await getFieldsValue()
await modifychangeFieldManageById(datas) await modifyPeriodicallabCount(datas)
emit("exit") emit("exit")
} }
} }

Loading…
Cancel
Save