接口调试结束

This commit is contained in:
13218645326 2023-12-13 17:23:54 +08:00
parent df34cadfed
commit 1dc8d975b6
5 changed files with 30 additions and 12 deletions

View File

@ -56,7 +56,7 @@ export const apiAddCompanyInfo = (params: any) => {
// 企业入驻信息导出
export const apiCompanyExportExcel = (params: any) => {
let strUrl = `/zlpt-company/company_info/exportExcel`
return get(strUrl, params)
return download(strUrl, params)
}
// 根据企业id查询企业信息
export const apiGetCompanyInfoById = (id: any) => {
@ -94,7 +94,7 @@ export const apiGetCompanyInfoById = (id: any) => {
// business/open/exportExcel
export const apiBusinessOpenExportExcel = ( ) => {
let strUrl = `/zlpt-company/business/open/exportExcel`
return get(strUrl,{})
return download(strUrl,{})
}
// 新增业务开通请求
export const apiBusinessOpenInsert = (params: any) => {
@ -138,7 +138,7 @@ export const apiServiceGreementInfoAdd = (params: any) => {
// 导出隐私协议模板信息
export const apiServiceExport = (params: any) => {
let strUrl = `/zlpt-company/serviceGreementInfo/export`
return get(strUrl,{})
return download(strUrl,{})
}
// 获取隐私协议模板列表

View File

@ -44,6 +44,7 @@ service.interceptors.response.use(
const handleDataCode = (res: any) => {
const data = res.data
console.log("data----",data)
if (data.code == '200') {
return data
} else if (data.code == '403') {
@ -52,6 +53,9 @@ const handleDataCode = (res: any) => {
} else if (data.code == '401') {
ElMessage.error(data.msg)
router.push('/login')
} else if (data.code == '500') {
ElMessage.error(data.msg)
router.push('/login')
}
else {
return data

View File

@ -36,7 +36,7 @@
import type { FormInstance, FormRules } from 'element-plus'
import { ElMessage } from 'element-plus'
import editorWang from "components/com/editorWang.vue"
import { apiBmTopicInfoById,apiBmTopicInfoAddorupdate } from "http/api/config"
import { apiServiceGreementInfo,apiServiceGreementInfoAdd,apiServiceGreementInfoUpdate } from "http/api/enterprise"
const emits = defineEmits(['send'])
const addShow = ref(false)
let title = ref("新增")
@ -78,8 +78,8 @@ const formRules = reactive<FormRules<any>>({
const getPrivicynfoById=async(id:any)=>{
const res:any = await apiBmTopicInfoById(id)
console.log("resapiBmTopicInfoById",res)
const res:any = await apiServiceGreementInfo(id)
console.log("apiServiceGreementInfo",res)
const data = res.data
editorWangRef.value.setHtmlByFather(data.content)
Object.assign(form,data)
@ -121,6 +121,7 @@ const edit = () => {
const showFn =(val: any) => {
title.value =val.title
addShow.value = true
getPrivicynfoById(val.serviceId)
}
defineExpose({
open,

View File

@ -63,9 +63,7 @@ let tableListInfo = reactive({
})
const showRowFn = (row: any) => {
addComRef.value.showFn({
title: "111"
})
addComRef.value.showFn(row)
}

View File

@ -31,7 +31,7 @@
<div class="pass_status_c" v-else-if="scope.row.status == '1'">
已通过
</div>
<div class="reject_status_c" v-else-if="scope.row.status == '2'">
<div class="reject_status_c" v-else-if="scope.row.status == '2'">
已驳回
</div>
<div class="reject_status_c" v-else-if="scope.row.status == '3'">
@ -65,8 +65,9 @@
import headerTop from "./com/headerTop.vue"
import addCom from "./com/addCom.vue"
import { ElConfirmBeforeOpert } from "utils/elementCom"
import { apiGetCompanyInfoSelectList, apiupdateCompanyInfo } from "http/api/enterprise"
import { apiGetCompanyInfoSelectList, apiupdateCompanyInfo ,apiCompanyExportExcel} from "http/api/enterprise"
import { ElMessage } from 'element-plus'
import {exportBlob} from "utils/index"
const router = useRouter()
const addComRef = ref()
const paginationInfo = reactive({
@ -136,7 +137,21 @@ const resetFn = (params: any) => {
initTableList()
}
const exportFn = () => {
const exportFn = async () => {
const res: any = await apiCompanyExportExcel({})
// console.log("res-apiCompanyExportExcel", res)
const data = res.data.body
console.log("res-apiCompanyExportExcel", data)
exportBlob(data)
ElMessage({
type: 'success',
message: "导出成功"
})
}
const addFn = () => {