跨域搜索
This commit is contained in:
parent
05af74956f
commit
d786ec3701
@ -1,41 +1,47 @@
|
|||||||
import request from '@/config/axios'
|
import request from '@/config/axios'
|
||||||
|
|
||||||
// 收藏管理 VO
|
// 收藏管理 VO
|
||||||
export interface Star2VO {
|
export interface Star2VO {
|
||||||
kowsmId: number // 知识id
|
kowsmId: number // 知识id
|
||||||
userId: number // 用户id
|
userId: number // 用户id
|
||||||
kowsId: number // 知识分类id
|
kowsId: number // 知识分类id
|
||||||
}
|
}
|
||||||
|
|
||||||
// 收藏管理 API
|
// 收藏管理 API
|
||||||
export const Star2Api = {
|
export const Star2Api = {
|
||||||
// 查询收藏管理分页
|
// 查询收藏管理分页
|
||||||
getStar2Page: async (params: any) => {
|
getStar2Page: async (params: any) => {
|
||||||
return await request.get({ url: `/bpm/star2/page`, params })
|
console.log("getSearchPage",params)
|
||||||
},
|
return await request.get({ url: `/bpm/star2/page`, params })
|
||||||
|
},
|
||||||
// 查询收藏管理详情
|
|
||||||
getStar2: async (id: number) => {
|
// 查询收藏管理详情
|
||||||
return await request.get({ url: `/bpm/star2/get?id=` + id })
|
getStar2: async (id: number) => {
|
||||||
},
|
console.log("getSearchPage2")
|
||||||
|
return await request.get({ url: `/bpm/star2/get?id=` + id })
|
||||||
// 新增收藏管理
|
},
|
||||||
createStar2: async (data: Star2VO) => {
|
|
||||||
return await request.post({ url: `/bpm/star2/create`, data })
|
// 新增收藏管理
|
||||||
},
|
createStar2: async (data: Star2VO) => {
|
||||||
|
console.log("getSearchPage2")
|
||||||
// 修改收藏管理
|
return await request.post({ url: `/bpm/star2/create`, data })
|
||||||
updateStar2: async (data: Star2VO) => {
|
},
|
||||||
return await request.put({ url: `/bpm/star2/update`, data })
|
|
||||||
},
|
// 修改收藏管理
|
||||||
|
updateStar2: async (data: Star2VO) => {
|
||||||
// 删除收藏管理
|
console.log("getSearchPage2")
|
||||||
deleteStar2: async (id: number) => {
|
return await request.put({ url: `/bpm/star2/update`, data })
|
||||||
return await request.delete({ url: `/bpm/star2/delete?id=` + id })
|
},
|
||||||
},
|
|
||||||
|
// 删除收藏管理
|
||||||
// 导出收藏管理 Excel
|
deleteStar2: async (id: number) => {
|
||||||
exportStar2: async (params) => {
|
console.log("getSearchPage2")
|
||||||
return await request.download({ url: `/bpm/star2/export-excel`, params })
|
return await request.delete({ url: `/bpm/star2/delete?id=` + id })
|
||||||
},
|
},
|
||||||
}
|
|
||||||
|
// 导出收藏管理 Excel
|
||||||
|
exportStar2: async (params) => {
|
||||||
|
console.log("getSearchPage2")
|
||||||
|
return await request.download({ url: `/bpm/star2/export-excel`, params })
|
||||||
|
},
|
||||||
|
}
|
||||||
|
65
src/api/search/search.ts
Normal file
65
src/api/search/search.ts
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
export interface SearchVO {
|
||||||
|
id:number
|
||||||
|
title:string
|
||||||
|
catalogId:number
|
||||||
|
deptId:number
|
||||||
|
mainContent:string
|
||||||
|
summary:string
|
||||||
|
keyword:string
|
||||||
|
coverImg:string
|
||||||
|
version:number
|
||||||
|
state:string
|
||||||
|
publishDate:string
|
||||||
|
processInstanceId:string
|
||||||
|
readCount:number
|
||||||
|
filePath:string
|
||||||
|
fileName:string
|
||||||
|
createUserId:number
|
||||||
|
updateUserId:number
|
||||||
|
originId:number
|
||||||
|
isNewVersion:number
|
||||||
|
createBy:string
|
||||||
|
createTime:Date
|
||||||
|
updateBy:string
|
||||||
|
updateTime:Date
|
||||||
|
}
|
||||||
|
//Search
|
||||||
|
export const SearchApi = {
|
||||||
|
// 查询【请填写功能名称】分页
|
||||||
|
getSearchPage: async (params: any) => {
|
||||||
|
console.log("getSearchPage",params)
|
||||||
|
return await request.get({ url: `/bpm/knowledge/listForEs`, params })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 查询【请填写功能名称】详细
|
||||||
|
getSearch: async (id: number) => {
|
||||||
|
console.log("getSearchPage2")
|
||||||
|
return await request.get({ url:'/kms/main/get?id=' + id })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 新增【请填写功能名称】
|
||||||
|
createSearch: async (data: SearchVO) => {
|
||||||
|
console.log("getSearchPage2")
|
||||||
|
return await request.post({ url: `/kms/main/create`, data })
|
||||||
|
},
|
||||||
|
|
||||||
|
// 修改【请填写功能名称】
|
||||||
|
updateSearch: async (data: SearchVO) => {
|
||||||
|
console.log("getSearchPage2")
|
||||||
|
return await request.post({url:'/kms/main/update',data})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 删除【请填写功能名称】
|
||||||
|
deleteSearch: async (id: number) => {
|
||||||
|
console.log("getSearchPage2")
|
||||||
|
return await request.delete({url:'/kmd/main/delete?id='+id})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 预览附件接口
|
||||||
|
previewAttFile: async (id:number) => {
|
||||||
|
console.log("getSearchPage2")
|
||||||
|
return await request.get({url:'/sys/attachment/find/converted',kmsId:id})
|
||||||
|
}
|
||||||
|
}
|
162
src/views/search/view-bk.vue
Normal file
162
src/views/search/view-bk.vue
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-form ref="form" :model="list">
|
||||||
|
<el-form-item label="知识标题">
|
||||||
|
<input style=" height: 40px; width: 80%" :readOnly="true" v-model="infoList.title"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间">
|
||||||
|
<input style=" height: 40px; width: 80%" :readOnly="true" v-model="infoList.publishDate"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="知识简介">
|
||||||
|
<input style=" height: 40px; width: 80%" :readOnly="true" v-model="infoList.summary"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="知识内容">
|
||||||
|
<editor style="width: 100%" :readOnly="true" v-model="infoList.mainContent"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import {SearchVO} from "@/api/search/main";
|
||||||
|
|
||||||
|
defineOptions({name:'View'})
|
||||||
|
const props = defineProps<{
|
||||||
|
list: {
|
||||||
|
type: SearchVO,
|
||||||
|
default: () => ({})
|
||||||
|
}
|
||||||
|
}>()
|
||||||
|
const infoList = reactive({
|
||||||
|
title: '',
|
||||||
|
publishDate: '',
|
||||||
|
summary: '',
|
||||||
|
mainContent: ''
|
||||||
|
});
|
||||||
|
const infoListFc = async () => {
|
||||||
|
Object.assign(infoList, props.list);
|
||||||
|
console.log("infoList",infoList)
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
infoListFc()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
/*@import url("http://at.alicdn.com/t/font_2602024_czfyrrtt7tk.css");*/
|
||||||
|
.iconfont{
|
||||||
|
font-family: hufont!important;
|
||||||
|
font-style: normal;
|
||||||
|
margin-right: 5px;
|
||||||
|
color: #00afff;
|
||||||
|
|
||||||
|
speak: none;
|
||||||
|
font-weight: 400;
|
||||||
|
font-variant: normal;
|
||||||
|
text-transform: none;
|
||||||
|
line-height: 1;
|
||||||
|
vertical-align: baseline;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ic-xiangguanziliao-copy{
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
.list-title{
|
||||||
|
/*border-bottom: solid 1px #eee;
|
||||||
|
padding: 0 1px 8px 1px;*/
|
||||||
|
color:#00afff ;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kms-view{
|
||||||
|
background: #FFFFFF;
|
||||||
|
margin: 10px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kms-header{
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0px 2px 18px 1px rgba(0, 0, 0, 0.08);
|
||||||
|
border-radius: 4px 4px 4px 4px;
|
||||||
|
margin: 15px auto;
|
||||||
|
width: 90%;
|
||||||
|
}
|
||||||
|
.kms-header-title{
|
||||||
|
text-align: center;
|
||||||
|
padding: 30px 0px;
|
||||||
|
}
|
||||||
|
.kms-header-summary{
|
||||||
|
text-align: center;
|
||||||
|
color: #5d5d5d;
|
||||||
|
padding: 5px 10px 30px;
|
||||||
|
}
|
||||||
|
.kms-header-create-info{
|
||||||
|
color: #5d5d5d;
|
||||||
|
font-size: 13px;
|
||||||
|
padding: 5px 10px 30px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
width: 30%;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.kms-content{
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0px 2px 18px 1px rgba(0, 0, 0, 0.08);
|
||||||
|
border-radius: 4px 4px 4px 4px;
|
||||||
|
margin: 15px auto;
|
||||||
|
width: 90%;
|
||||||
|
padding: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-panel{
|
||||||
|
background: #FFFFFF;
|
||||||
|
box-shadow: 0px 2px 18px 1px rgba(0, 0, 0, 0.08);
|
||||||
|
border-radius: 4px 4px 4px 4px;
|
||||||
|
margin: 15px auto;
|
||||||
|
width: 90%;
|
||||||
|
padding: 15px 20px 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview-ul{
|
||||||
|
list-style: none;
|
||||||
|
width: 95%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview-ul li{
|
||||||
|
padding: 5px 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
.preview-ul li:hover{
|
||||||
|
color:#409eff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.version-ul{
|
||||||
|
list-style: none;
|
||||||
|
width: 95%;
|
||||||
|
}
|
||||||
|
.version-ul li{
|
||||||
|
display: flex;
|
||||||
|
height: 50px;
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: solid 1px #eee;
|
||||||
|
padding-left: 15px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.version-ul li:hover{
|
||||||
|
color:#409eff;
|
||||||
|
}
|
||||||
|
.version-ul li span{
|
||||||
|
margin: 0 15px 0 35px;
|
||||||
|
color: #ddd;
|
||||||
|
}
|
||||||
|
.label{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.time{
|
||||||
|
color:#bbb;
|
||||||
|
font-size: 12px;
|
||||||
|
padding-top: 5px;
|
||||||
|
}
|
||||||
|
</style>
|
75
src/views/search/view.vue
Normal file
75
src/views/search/view.vue
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-form ref="form" :model="list">
|
||||||
|
<el-form-item label="知识标题">
|
||||||
|
<input style=" height: 40px; width: 80%" :readOnly="true" v-model="infoList.title"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间">
|
||||||
|
<input style=" height: 40px; width: 80%" :readOnly="true" v-model="infoList.publishDate"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="知识简介">
|
||||||
|
<input style=" height: 40px; width: 80%" :readOnly="true" v-model="infoList.summary"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="知识内容">
|
||||||
|
<editor style="width: 100%" :readOnly="true" v-model="infoList.mainContent"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import {SearchVO} from "@/api/search/search";
|
||||||
|
|
||||||
|
defineOptions({name:'View'})
|
||||||
|
const props = defineProps<{
|
||||||
|
list: SearchVO
|
||||||
|
}>()
|
||||||
|
const infoList = reactive({
|
||||||
|
title: '',
|
||||||
|
publishDate: '',
|
||||||
|
summary: '',
|
||||||
|
mainContent: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
const infoListFc = () => {
|
||||||
|
Object.assign(infoList, props.list);
|
||||||
|
infoList.title = props.list.title
|
||||||
|
infoList.publishDate = props.list.publishDate
|
||||||
|
infoList.summary = props.list.summary
|
||||||
|
infoList.mainContent = props.list.mainContent
|
||||||
|
console.log("infoList",infoList)
|
||||||
|
console.log("props.list",props.list)
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
infoListFc()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
/*@import url("http://at.alicdn.com/t/font_2602024_czfyrrtt7tk.css");*/
|
||||||
|
.preview-ul li{
|
||||||
|
padding: 5px 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
.preview-ul li:hover{
|
||||||
|
color:#409eff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.version-ul li{
|
||||||
|
display: flex;
|
||||||
|
height: 50px;
|
||||||
|
align-items: center;
|
||||||
|
border-bottom: solid 1px #eee;
|
||||||
|
padding-left: 15px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.version-ul li:hover{
|
||||||
|
color:#409eff;
|
||||||
|
}
|
||||||
|
.version-ul li span{
|
||||||
|
margin: 0 15px 0 35px;
|
||||||
|
color: #ddd;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in New Issue
Block a user