diff --git a/.env.development b/.env.development
index b76cb67..3a18247 100644
--- a/.env.development
+++ b/.env.development
@@ -1,12 +1,12 @@
# 变量必须以 VITE_ 为前缀才能暴露给外部读取
VITE_ENV = 'development'
-VITE_WEB_TITLE = '固始电子报'
+VITE_WEB_TITLE = '今日固始电子版'
VITE_WEB_EN_TITLE = 'GUSHI-NEWSPAPER'
-VITE_LOGIN_TITLE = '固始电子报 管理平台'
+VITE_LOGIN_TITLE = '今日固始电子版 管理平台'
VITE_LOGIN_EN_TITLE = 'GuShi Platform'
VITE_WEB_BASE_API = '/api'
# 本地Mock地址
-VITE_SERVER = 'http://csdzb.hschool.com.cn/'
+VITE_SERVER = 'https://jinrigushi.gushitv.com/'
# 路由模式[哈希模式 AND WEB模式 [hash | history, 这两个模式是固定死的,不能乱改值]
VITE_ROUTER_MODE = hash
# 是否使用全部去除console和debugger
diff --git a/.env.production b/.env.production
index 7283077..f458732 100644
--- a/.env.production
+++ b/.env.production
@@ -1,12 +1,12 @@
# 变量必须以 VITE_ 为前缀才能暴露给外部读取
VITE_ENV = 'production'
-VITE_WEB_TITLE = '固始电子报'
+VITE_WEB_TITLE = '今日固始电子版'
VITE_WEB_EN_TITLE = 'GUSHI-NEWSPAPER'
-VITE_LOGIN_TITLE = '固始电子报 管理平台'
+VITE_LOGIN_TITLE = '今日固始电子版 管理平台'
VITE_LOGIN_EN_TITLE = 'GuShi Platform'
VITE_WEB_BASE_API = ''
# 后端接口地址
-VITE_SERVER = 'http://csdzb.hschool.com.cn/'
+VITE_SERVER = 'https://jinrigushi.gushitv.com/'
# 路由模式[哈希模式 AND WEB模式 [hash | history, 这两个模式是固定死的,不能乱改值]
VITE_ROUTER_MODE = hash
# 是否使用全部去除console和debugger
diff --git a/src/api/system/post/index.ts b/src/api/system/post/index.ts
index ef17992..3107e97 100644
--- a/src/api/system/post/index.ts
+++ b/src/api/system/post/index.ts
@@ -32,6 +32,7 @@ enum API {
KNOWLEDGEADD="/api/admin/zsk/add",
KNOWLEDGEUPDATE="/api/admin/zsk/update",
KNOWLEDGEDEL="/api/admin/zsk/del",
+ GETMP3="/api/admin/scheduled_tasks/generateRecording"
}
export const Login = (data: any) => {
return koi.post(API.LOGIN, data);
@@ -108,4 +109,8 @@ export const knowledgeUpdate = (data: any) => {
export const knowledgeDel = (data: any) => {
return koi.post(API.KNOWLEDGEDEL, data);
};
+export const getMp3 = (data: any) => {
+ return koi.post(API.GETMP3, data);
+};
+
diff --git a/src/assets/json/authMenu.json b/src/assets/json/authMenu.json
index bba515a..b0c72b7 100644
--- a/src/assets/json/authMenu.json
+++ b/src/assets/json/authMenu.json
@@ -103,23 +103,6 @@
"isAffix": "1",
"redirect": ""
},
- {
- "menuId": 16,
- "menuName": "期刊类型",
- "enName": "User Manage",
- "parentId": 1,
- "menuType": "2",
- "path": "/paper/type",
- "name": "PaperType",
- "component": "paper/type/index",
- "icon": "Files",
- "isHide": "1",
- "isLink": "",
- "isKeepAlive": "0",
- "isFull": "1",
- "isAffix": "1",
- "redirect": ""
- },
{
"menuId": 2,
"menuName": "知识库",
diff --git a/src/config/index.ts b/src/config/index.ts
index 0dc095b..766dce2 100644
--- a/src/config/index.ts
+++ b/src/config/index.ts
@@ -1,12 +1,12 @@
// 全局默认配置项
// 首页地址[默认]
-export const HOME_URL: string = "/dist/home/index";
+export const HOME_URL: string = "/home/index";
// 跳转子页面静态路由父级节点
export const STATIC_URL: string = "/system/static";
// 登录页地址[默认]
-export const LOGIN_URL: string = "/dist/login";
+export const LOGIN_URL: string = "/admin";
// pinia仓库前缀
export const PINIA_PREFIX: string = "koi-";
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 3e95706..a07e80c 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -3,7 +3,7 @@
-
固始电子报系统后台
+
今日固始电子报 管理后台
diff --git a/src/views/knowledge/add.vue b/src/views/knowledge/add.vue
index 9302a1b..01b1de4 100644
--- a/src/views/knowledge/add.vue
+++ b/src/views/knowledge/add.vue
@@ -40,7 +40,11 @@ import {
// @ts-ignore
import {knowledgeAdd} from "@/api/system/post/index.ts";
import {onBeforeUnmount, ref, shallowRef, onMounted, reactive, nextTick} from 'vue'
-
+import {useRoute, useRouter} from "vue-router";
+import useTabsStore from "@/stores/modules/tabs.ts";
+const route = useRoute();
+const router = useRouter();
+const tabsStore = useTabsStore();
const form = reactive({
zsk_explain: '',
zsk_name: '',
@@ -57,6 +61,8 @@ const onSubmit = async () => {
try {
await knowledgeAdd(form);
koiNoticeSuccess("添加成功!");
+ tabsStore.removeTab(route.fullPath);
+ router.push('/knowledge/list');
} catch (error) {
console.log(error);
koiNoticeError("添加失败,请刷新重试!");
diff --git a/src/views/knowledge/list.vue b/src/views/knowledge/list.vue
index 020710b..c25fb67 100644
--- a/src/views/knowledge/list.vue
+++ b/src/views/knowledge/list.vue
@@ -25,13 +25,18 @@
align="center"
:show-overflow-tooltip="true"
>
-
+
+
+
+
+
+
+
+ 点击查看
+
+
+
+
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index b0bc4d4..7daca81 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -16,7 +16,7 @@
@@ -78,7 +78,7 @@
@@ -139,8 +139,8 @@ interface ILoginUser {
}
const loginForm = reactive({
- loginName: "admin",
- password: "admin888",
+ loginName: "",
+ password: "",
});
let loginRules: any = reactive>({});
diff --git a/src/views/paper/add/index.vue b/src/views/paper/add/index.vue
index c8d8e81..8db4541 100644
--- a/src/views/paper/add/index.vue
+++ b/src/views/paper/add/index.vue
@@ -13,11 +13,11 @@
style="width: 100%"
>
-
-
-
-
-
+
+
+
+
+
新增版面
@@ -94,7 +94,7 @@ import {
} from "@/utils/koi.ts";
import useTabsStore from "@/stores/modules/tabs.ts";
import {useRoute, useRouter} from "vue-router";
-
+import { ElLoading } from 'element-plus'
const route = useRoute();
const router = useRouter();
const tabsStore = useTabsStore();
@@ -133,7 +133,7 @@ const addSort = () => {
backArr.value.sort((a, b) => a.weight - b.weight);
}
onMounted(() => {
- getTypelist();
+ //getTypelist();
})
const typeList = ref();
const getTypelist = async () => {
@@ -146,14 +146,15 @@ const getTypelist = async () => {
}
}
const handleMineSave = async () => {
+
if (form.datetime == '') {
koiMsgError('请选择报纸日期');
return;
}
- if (form.type_id == '' || form.type_id == null) {
- koiMsgError('请选择报纸类别');
- return;
- }
+ // if (form.type_id == '' || form.type_id == null) {
+ // koiMsgError('请选择报纸类别');
+ // return;
+ // }
for (let i = 0; i < backArr.value.length; i++) {
if (backArr.value[i].bm_name == '' || backArr.value[i].bm_img == '' || backArr.value[i].bm_pdf == '') {
koiMsgError('请完善版面[' + (i + 1) + ']信息');
@@ -161,9 +162,15 @@ const handleMineSave = async () => {
}
}
const data = {date: form, bm: backArr.value};
+ const loading = ElLoading.service({
+ lock: true,
+ text: '保存中...',
+ background: 'rgba(0, 0, 0, 0.1)',
+ })
try {
await bmAdd(data);
koiNoticeSuccess("保存成功!");
+ loading.close();
tabsStore.removeTab(route.fullPath);
router.push('/paper/list');
} catch (error) {
diff --git a/src/views/paper/article/update.vue b/src/views/paper/article/update.vue
index 021515c..8c0e2b1 100644
--- a/src/views/paper/article/update.vue
+++ b/src/views/paper/article/update.vue
@@ -92,6 +92,7 @@ const getNewsInfo = async () => {
form.reporter = res.data.reporter;
form.content = res.data.content;
form.id = res.data.id;
+ form.bm_id = res.data.bm_id;
form.coordinate = res.data.coordinate;
form.coordinate_show=res.data.coordinate_show;
coordinate.value = res.data.coordinate;
@@ -152,7 +153,6 @@ const updateDrawRectanglePath = (x1, y1, x2, y2) => {
const onSubmit = async () => {
form.coordinate = coordinate.value;
form.coordinate_show=coordinateShow.value ;
- form.bm_id = id.value;
console.log(form);
try {
const res: any = await newsUpdate(form);
diff --git a/src/views/paper/list/index.vue b/src/views/paper/list/index.vue
index 5e2028b..a4a1304 100644
--- a/src/views/paper/list/index.vue
+++ b/src/views/paper/list/index.vue
@@ -1,42 +1,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
-
-
新增
+ 生成语音文件
-
@@ -60,7 +31,7 @@
prop="datetime"
align="left"
:show-overflow-tooltip="true"
- width="300px"
+ width="400px"
>
{{ scope.row.datetime }}
-
-
+
+
+ 已隐藏
+ 显示中
+
+
+
版面数量:{{ scope.row.bm_count }}
新闻数量:{{ scope.row.new_count }}
+
-
+
- 隐藏
+
+ 添加版面
+ @click="statusUpdate(row,1)"
+ >显示
修改
+ @click="handleAddDate(row)"
+ >添加版面
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
@@ -226,9 +215,10 @@ import {
dateUpdate,
getList,
newsDel,
- bmOneAdd
+ bmOneAdd, getMp3
} from "@/api/system/post/index.ts";
import useTabsStore from "@/stores/modules/tabs.ts";
+
const tabsStore = useTabsStore();
const router = useRouter();
// 表格加载动画Loading
@@ -274,6 +264,18 @@ const updateFileList = (d) => {
//console.log(index);
//backArr.value[index].bm_pdf = d.fullurl?d.fullurl:'';
}
+const Mp3Check = async (row) => {
+ //console.log(row);
+ try {
+ const res: any = await getMp3('');
+ koiNoticeSuccess("语音生成成功!");
+ handleTreeList();
+ } catch (error) {
+ console.log(error);
+ koiNoticeError("数据修改失败,请刷新重试🌻");
+ }
+
+}
/*PDF上传*/
const getFileList = (d) => {
console.log(d);
@@ -309,7 +311,7 @@ const load = async (row, treeNode, resolve) => {
res.data = res.data.map(item => {
return {
...item,
- uuid:generateUUID(),
+ uuid: generateUUID(),
datetime: item.bm_name,
bm_name: undefined // 或者删除该项
};
@@ -319,7 +321,7 @@ const load = async (row, treeNode, resolve) => {
res.data = res.data.map(item => {
return {
...item,
- uuid:generateUUID(),
+ uuid: generateUUID(),
datetime: item.new_name,
bm_name: undefined // 或者删除该项
};
@@ -376,7 +378,17 @@ const addSort = async (row) => {
}
}
-
+const statusUpdate = async (row,type) => {
+ try {
+ const res: any = await dateUpdate({status:type,id: row.id});
+ console.log("菜单数据表格数据->", res.data);
+ koiNoticeSuccess("修改成功!");
+ handleTreeList();
+ } catch (error) {
+ console.log(error);
+ koiNoticeError("数据查询失败,请刷新重试🌻");
+ }
+}
/*版面修改/添加*/
const handleConfirmBmDo = async () => {
confirmLoading.value = true;
@@ -426,7 +438,7 @@ const handleTreeList = async () => {
res.data.data = res.data.data.map(item => {
return {
...item,
- uuid:generateUUID(),
+ uuid: generateUUID(),
};
});
diff --git a/vite.config.ts b/vite.config.ts
index e82de76..328d86c 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -18,7 +18,7 @@ import path from "path";
export default defineConfig(({ command, mode }: ConfigEnv): UserConfig => {
const env = loadEnv(mode, process.cwd()); // 获取配置文件别名配置
return {
- base: '/dist/', // 设置为您的二级目录名称
+ base: '/admin/', // 设置为您的二级目录名称
plugins: [
vue(),
Unocss(),