diff --git a/.env.development b/.env.development
index ad07c38..d21c7d5 100644
--- a/.env.development
+++ b/.env.development
@@ -9,3 +9,5 @@ VITE_EDITOR = vscode
// VITE_EDITOR = webstorm 如果使用webstorm开发且要使用dom定位到代码行功能 请先自定添加 webstorm到环境变量 再将VITE_EDITOR值修改为webstorm
// 如果使用docker-compose开发模式,设置为下面的地址或本机主机IP
//VITE_BASE_PATH = http://177.7.0.12
+
+VITE_WWW_PATH = 'http://w1.zkzk.org.cn'
diff --git a/.env.production b/.env.production
index 0e1c391..d0cd929 100644
--- a/.env.production
+++ b/.env.production
@@ -5,3 +5,5 @@ VITE_BASE_API = /api
VITE_FILE_API = /api
#下方修改为你的线上ip(如果需要在线使用表单构建工具时使用,其余情况无需使用以下环境变量)
VITE_BASE_PATH = ''
+
+VITE_WWW_PATH = 'http://w1.zkzk.org.cn'
diff --git a/src/api/academician.js b/src/api/academician.js
new file mode 100644
index 0000000..476c536
--- /dev/null
+++ b/src/api/academician.js
@@ -0,0 +1,82 @@
+import service from '@/utils/request'
+
+// @Summary 获取列表
+// @Produce application/json
+// @Router /cms/academician/getList [post]
+export const getAcademicianList = (data) => {
+ return service({
+ url: '/cms/academician/getList',
+ method: 'post',
+ data
+ })
+}
+
+// @Summary 新增
+// @Produce application/json
+// @Param Object
+// @Router /cms/academician/add [post]
+export const addAcademician = (data) => {
+ return service({
+ url: '/cms/academician/add',
+ method: 'post',
+ data
+ })
+}
+
+// @Summary 删除
+// @Produce application/json
+// @Param ID int
+// @Router /cms/academician/delete [delete]
+export const deleteAcademician = (data) => {
+ return service({
+ url: '/cms/academician/delete',
+ method: 'delete',
+ data
+ })
+}
+
+// @Summary 批量删除
+// @Param data body request.IdsReq true "批量删除"
+// @Router /cms/academician/deleteByIds [delete]
+export const deleteAcademicianByIds = (params) => {
+ return service({
+ url: '/cms/academician/deleteByIds',
+ method: 'delete',
+ params
+ })
+}
+
+// @Summary 修改
+// @Produce application/json
+// @Param Object
+// @Router /cms/academician/update [put]
+export const updateAcademician = (data) => {
+ return service({
+ url: '/cms/academician/update',
+ method: 'put',
+ data
+ })
+}
+
+// @Summary 根据id获取
+// @Param data body api.GetById true "根据id获取"
+// @Router /cms/academician/get [get]
+export const getAcademicianById = (params) => {
+ return service({
+ url: '/cms/academician/get',
+ method: 'get',
+ params
+ })
+}
+
+// @Summary 修改
+// @Produce application/json
+// @Param Object
+// @Router /cms/academician/setRel [put]
+export const setAcademicianRel = (data) => {
+ return service({
+ url: '/cms/academician/setRel',
+ method: 'put',
+ data
+ })
+}
diff --git a/src/style/main.scss b/src/style/main.scss
index 86e5bf2..2e2606a 100644
--- a/src/style/main.scss
+++ b/src/style/main.scss
@@ -699,3 +699,9 @@ li {
}
}
}
+
+.section-title {
+ font-size: 16px;
+ line-height: 1.2;
+ margin-bottom: 15px;
+}
diff --git a/src/utils/format.js b/src/utils/format.js
index 851b77c..edcab45 100644
--- a/src/utils/format.js
+++ b/src/utils/format.js
@@ -59,3 +59,16 @@ export const ReturnArrImg = (arr) => {
export const onDownloadFile = (url) => {
window.open(path + url)
}
+
+const wwwPath = import.meta.env.VITE_WWW_PATH
+export const getArticlePreviewPath = (ID) => {
+ return wwwPath + '/article/' + ID + '.html'
+}
+
+export const getAcademicianPreviewPath = (ID) => {
+ return wwwPath + '/academician/' + ID + '.html'
+}
+
+export const getEntrepreneurPreviewPath = (ID) => {
+ return wwwPath + '/entrepreneur/' + ID + '.html'
+}
diff --git a/src/utils/options.js b/src/utils/options.js
new file mode 100644
index 0000000..b973314
--- /dev/null
+++ b/src/utils/options.js
@@ -0,0 +1,20 @@
+
+export const articleTypeOptions = [
+ { key: 1, label: '图文' },
+ { key: 2, label: '视频' },
+]
+export const statusOptions = [
+ { key: 1, label: '草稿' },
+ { key: 2, label: '待审核' },
+ { key: 3, label: '待发布' },
+ { key: 4, label: '已发布' },
+ { key: 5, label: '已撤销' },
+]
+export const formatArticleType = (value) => {
+ const rowLabel = articleTypeOptions.filter(item => item.key === value)
+ return rowLabel && rowLabel[0] && rowLabel[0].label
+}
+export const formatStatus = (value) => {
+ const rowLabel = statusOptions.filter(item => item.key === value)
+ return rowLabel && rowLabel[0] && rowLabel[0].label
+}
diff --git a/src/view/ad/content.vue b/src/view/ad/content.vue
index 6f1b155..98b7231 100644
--- a/src/view/ad/content.vue
+++ b/src/view/ad/content.vue
@@ -94,9 +94,8 @@
:title="`文件类型为:${uploadInfo.mediaTypeInfo}, 大小不超过${uploadInfo.fileSizeInfo}, 宽*高: ${uploadInfo.mediaWidth}px*${uploadInfo.mediaHeight}px`" />
+ :action="`${imgUploadPath}/cms/mediaFile/upload?category=ad_content_imgs`" :show-file-list="false"
+ :on-success="uploadSuccess" :on-error="uploadFailure" :before-upload="beforeUpload">
上传
diff --git a/src/view/ad/position.vue b/src/view/ad/position.vue
index 5cf73d1..9b38235 100644
--- a/src/view/ad/position.vue
+++ b/src/view/ad/position.vue
@@ -56,9 +56,8 @@
-
+
diff --git a/src/view/content/academician/index.vue b/src/view/content/academician/index.vue
index e69de29..3d44c00 100644
--- a/src/view/content/academician/index.vue
+++ b/src/view/content/academician/index.vue
@@ -0,0 +1,246 @@
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+ 新增院士
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.name }}
+
+ {{ scope.row.title }}
+
+
+
+
+ {{ scope.row.brief }}
+
+
+
+
+
+ 编辑
+ 关联项目
+
+
+ 删除
+ 关联讲座
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/view/content/article/index.vue b/src/view/content/article/index.vue
index 045392e..b4aefb6 100644
--- a/src/view/content/article/index.vue
+++ b/src/view/content/article/index.vue
@@ -52,7 +52,7 @@
-
+
{{ scope.row.title }}
@@ -148,7 +148,7 @@
+
+
+
+
diff --git a/src/view/content/components/articleEdit.vue b/src/view/content/components/articleEdit.vue
index e5b16ae..19c1e1a 100644
--- a/src/view/content/components/articleEdit.vue
+++ b/src/view/content/components/articleEdit.vue
@@ -155,6 +155,7 @@ import {
} from '@/api/article'
import { importFetcherArticleById } from '@/api/fetcher'
import { isUrl } from '@/utils/validator'
+import { articleTypeOptions } from '@/utils/options'
// 组件定义
defineOptions({
@@ -208,10 +209,7 @@ const formRules = reactive({
{ validator: isUrl, message: '请输入正确的跳转地址', trigger: 'blur' }
]
})
-const articleTypeOptions = ref([
- { key: 1, label: '图文' },
- { key: 2, label: '视频' },
-])
+
const editForm = ref({
ID: 0,
articleType: '',
diff --git a/src/view/content/components/entrepreneurEdit.vue b/src/view/content/components/entrepreneurEdit.vue
index 0db524d..f55cfa4 100644
--- a/src/view/content/components/entrepreneurEdit.vue
+++ b/src/view/content/components/entrepreneurEdit.vue
@@ -54,9 +54,9 @@
+ :action="`${imgUploadPath}/cms/mediaFile/upload?category=entrepreneur_avatar`" :show-file-list="false"
+ :on-success="(res) => { uploadSuccess(res, 'avatar') }" :on-error="uploadFailure"
+ :before-upload="(file) => { return beforeUpload(file, avatarInfo) }">
@@ -67,8 +67,8 @@
上传
@@ -80,9 +80,9 @@
+ :action="`${imgUploadPath}/cms/mediaFile/upload?category=entrepreneur_qrcode`" :show-file-list="false"
+ :on-success="(res) => { uploadSuccess(res, 'qrcode') }" :on-error="uploadFailure"
+ :before-upload="(file) => { return beforeUpload(file, qrcodeInfo) }">
@@ -109,7 +109,7 @@ import {
// 组件定义
defineOptions({
- name: 'ArticleEdit',
+ name: 'EntrepreneurEdit',
})
const emit = defineEmits(['on-save', 'on-close'])
const props = defineProps({
@@ -144,12 +144,14 @@ const emptyForm = () => {
checkFlag.value = false
editForm.value = {
ID: 0,
- adType: '',
- adPositionId: '',
- url: '',
- validStart: '',
- validEnd: '',
- mediaUrl: '',
+ name: '',
+ enterprise: '',
+ avatar: '',
+ brief: '',
+ description: '',
+ enterpriseDsc: '',
+ videoUrl: '',
+ qrcodeUrl: '',
}
}
// 关闭弹窗
@@ -187,24 +189,24 @@ const avatarInfo = {
mediaTypeInfo: 'jpg,png,webp,svg',
fileSize: 500,
fileSizeInfo: '500K',
- mediaWidth: 280,
- mediaHeight: 360,
+ mediaWidth: 180,
+ mediaHeight: 270,
}
const videoInfo = {
mediaType: 'video',
mediaTypeInfo: 'mp4,webm',
fileSize: 5000,
fileSizeInfo: '5M',
- mediaWidth: 300,
- mediaHeight: 180,
+ mediaWidth: 214,
+ mediaHeight: 380,
}
const qrcodeInfo = {
mediaType: 'pic',
mediaTypeInfo: 'jpg,png,webp,svg',
fileSize: 500,
fileSizeInfo: '500K',
- mediaWidth: 300,
- mediaHeight: 300,
+ mediaWidth: 120,
+ mediaHeight: 120,
}
const videoRef = ref(null)
const imgUploadPath = import.meta.env.VITE_BASE_API
@@ -341,4 +343,8 @@ defineExpose({ openPage })
height: 150px;
text-align: center;
}
+
+.el-form-item__content .el-alert__description {
+ line-height: 22px;
+}
diff --git a/src/view/content/components/selectArticle.vue b/src/view/content/components/selectArticle.vue
new file mode 100644
index 0000000..39b7c97
--- /dev/null
+++ b/src/view/content/components/selectArticle.vue
@@ -0,0 +1,236 @@
+
+
+
+
+
{{ props.title }}
+
+ 确 定
+ 取 消
+
+
+
+
+
+ {{ showErrMessage }}
+
+
+
+
已选择的
+
+
+
+
+
+
+
+ {{ scope.row.title }}
+
+
+ {{ scope.row.subtitle }}
+
+
+
+ {{ formatArticleType(scope.row.articleType) }}
+
+
+ {{ formatStatus(scope.row.status) }}
+
+
+
+ 移除
+
+
+
+
+
+
+
+
待选择的
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+
+
+
+
+
+
+
+
+ {{ scope.row.title }}
+
+
+ {{ scope.row.subtitle }}
+
+
+
+ {{ formatArticleType(scope.row.articleType) }}
+
+
+ {{ formatStatus(scope.row.status) }}
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/view/content/entrepreneur/index.vue b/src/view/content/entrepreneur/index.vue
index 85625d7..f49d649 100644
--- a/src/view/content/entrepreneur/index.vue
+++ b/src/view/content/entrepreneur/index.vue
@@ -29,13 +29,12 @@
+ style="max-width: 70px; max-height: 90px" />
-
+
{{ scope.row.name }}
{{ scope.row.enterprise }}
@@ -67,6 +66,7 @@