From 3511f336bcb77c1feefaca034adcc24975f5efcc Mon Sep 17 00:00:00 2001
From: zq <136432190602163.com>
Date: Fri, 9 Jan 2026 18:35:57 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A8=A1=E6=9D=BF=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E4=BA=A4=E4=BA=92=E3=80=81=E9=85=8D=E7=BD=AE=E9=80=89?=
=?UTF-8?q?=E9=A1=B9=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/clientSet/clientForm.vue | 26 +++++-
src/components/clientSet/reviewBtn.vue | 63 +++++++++++++
src/store/index.js | 136 +++++++++++++++++++++++++++-
src/views/super/clientSet/catalogPage.vue | 15 ++-
src/views/super/clientSet/coverInfoPage.vue | 124 ++++++++++++++-----------
src/views/super/clientSet/headerPage.vue | 9 +-
src/views/super/clientSet/mainTextPage.vue | 15 +--
src/views/super/clientSet/referencePage.vue | 10 +-
src/views/super/clientSet/summaryPage.vue | 8 +-
src/views/super/clientSet/switchPage.vue | 9 +-
src/views/super/clientSet/thanksPage.vue | 11 ++-
src/views/super/paiban/college.vue | 32 ++++++-
12 files changed, 359 insertions(+), 99 deletions(-)
create mode 100644 src/components/clientSet/reviewBtn.vue
diff --git a/src/components/clientSet/clientForm.vue b/src/components/clientSet/clientForm.vue
index 79dbb45..5150cd2 100644
--- a/src/components/clientSet/clientForm.vue
+++ b/src/components/clientSet/clientForm.vue
@@ -107,17 +107,19 @@
-
\ No newline at end of file
diff --git a/src/store/index.js b/src/store/index.js
index 02ec682..b4600a5 100755
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -24,6 +24,17 @@ export default new Vuex.Store({
carryParam: true, //携带参数
componentsName: '',
currentMenuItem: null,
+ client_tpl_id: '',//排版-模板id
+ client_tpl_type: '',//排版-模板类型 编辑还是添加 还是从收录进来的 edit add collect
+ client_tpl_review_status: '',//排版-模板收录状态
+ client_tpl_options:{},//排版-模板选项
+ client_tpl_config:{},//排版-模板选项
+ paibanRequestStatus: {
+ isLoading: false,
+ hasLoaded: false,
+ lastRequestTime: 0,
+ cacheDuration: 5 * 60 * 1000 // 5分钟缓存
+ },
uiSliderData: [
{
name: 'UI组件库示例',
@@ -814,6 +825,98 @@ export default new Vuex.Store({
},
actions: {
+ async fetchClientOptions({ commit }) {
+ try {
+ // 使用 axios 或您项目中的 http 库
+ Vue.prototype.$http('POST', '/supernew/ajax_get_paiban_template_option', {
+ }).then(response => {
+ // this.qualificationList = response.data
+ // 将数据存储到 client_tpl_options 中
+ commit('SET_CLIENT_TPL_OPTIONS', {
+ ...response.data,
+ });
+ }).catch(error => {
+ console.error(error, 'error')
+ })
+ // return response.data;
+ } catch (error) {
+ console.error('获取学位数据失败:', error);
+ throw error;
+ }
+ },
+ async fetchPaibanTemplateOption({ state, commit }) {
+ // 如果正在加载中,直接返回
+ if (state.paibanRequestStatus.isLoading) {
+ return new Promise((resolve) => {
+ // 等待现有请求完成
+ const interval = setInterval(() => {
+ if (!state.paibanRequestStatus.isLoading) {
+ clearInterval(interval);
+ resolve(state.client_tpl_options);
+ }
+ }, 100);
+ });
+ }
+
+ // 如果有缓存且在有效期内,直接使用缓存
+ const now = Date.now();
+ if (state.paibanRequestStatus.hasLoaded &&
+ (now - state.paibanRequestStatus.lastRequestTime) < state.paibanRequestStatus.cacheDuration) {
+ return state.client_tpl_options;
+ }
+
+ // 开始请求
+ try {
+ commit('SET_REQUEST_LOADING', true);
+ let data = {}
+ // const response = await this._vm.$http('POST', '/supernew/ajax_get_paiban_template_option', {});
+ Vue.prototype.$http('POST', '/supernew/ajax_get_paiban_degrees', {
+ }).then(response => {
+ // 存储数据
+ data=response.data
+ commit('SET_CLIENT_TPL_OPTIONS', response.data);
+ commit('SET_REQUEST_STATUS', {
+ hasLoaded: true,
+ lastRequestTime: now
+ });
+ }).catch(error => {
+ console.error(error, 'error')
+ })
+
+ return data;
+ } catch (error) {
+ console.error('获取排版选项失败:', error);
+ commit('SET_REQUEST_ERROR', error);
+ throw error;
+ } finally {
+ commit('SET_REQUEST_LOADING', false);
+ }
+ },
+
+ // 强制刷新(忽略缓存)
+ forceFetchPaibanTemplateOption({ commit,dispatch }) {
+ commit('SET_REQUEST_STATUS', {
+ hasLoaded: false,
+ lastRequestTime: 0
+ });
+ return dispatch('fetchPaibanTemplateOption');
+ },
+
+ SET_CLIENTTEMID({
+ commit
+ }) {
+ commit('SET_CLIENTTEMID');
+ },
+ SET_CLIENTTPLREVIEWSTATUS({
+ commit
+ }) {
+ commit('SET_CLIENTTPLREVIEWSTATUS');
+ },
+ SET_CLIENTTEMTYPE({
+ commit
+ }) {
+ commit('SET_CLIENTTEMTYPE');
+ },
SET_HEADER({
commit
}) {
@@ -896,8 +999,25 @@ export default new Vuex.Store({
},
},
mutations: {
+ SET_CLIENT_TPL_OPTIONS(state, data) {
+ state.client_tpl_options = data;
+ },
+
+ SET_REQUEST_LOADING(state, isLoading) {
+ state.paibanRequestStatus.isLoading = isLoading;
+ },
+
+ SET_REQUEST_STATUS(state, status) {
+ state.paibanRequestStatus = {
+ ...state.paibanRequestStatus,
+ ...status
+ };
+ },
+
+ SET_REQUEST_ERROR(state, error) {
+ state.paibanRequestStatus.error = error;
+ },
SET_CURRENTMENUITEM(state, data) {
- // console.log(data,'=====data====currentMenuItem');
state.currentMenuItem = data && JSON.parse(JSON.stringify(data));
},
SET_COMPONENTS_NAME(state, name) {
@@ -939,6 +1059,15 @@ export default new Vuex.Store({
SET_HEADER(state, show) {
state.showHeader = show;
},
+ SET_CLIENTTEMTYPE(state, show) {
+ state.client_tpl_type = show;
+ },
+ SET_CLIENTTEMID(state, show) {
+ state.client_tpl_id = show;
+ },
+ SET_CLIENTTPLREVIEWSTATUS(state, show) {
+ state.client_tpl_review_status = show;
+ },
SET_HEADER_RIGHT(state, show) {
state.showHeaderRight = show;
},
@@ -957,7 +1086,10 @@ export default new Vuex.Store({
}
},
getters: {
- menuData: state => state.menuData
+ menuData: state => state.menuData,
+ getClientTplOptions: state => state.client_tpl_options,
+ isPaibanLoading: state => state.paibanRequestStatus.isLoading,
+ hasPaibanLoaded: state => state.paibanRequestStatus.hasLoaded
},
// plugins: [createPersistedState()],
modules: {}
diff --git a/src/views/super/clientSet/catalogPage.vue b/src/views/super/clientSet/catalogPage.vue
index 9d1626c..d49811c 100644
--- a/src/views/super/clientSet/catalogPage.vue
+++ b/src/views/super/clientSet/catalogPage.vue
@@ -14,18 +14,21 @@
:init-data="threeFormData" @cancel="(data) => handleCancelEvent(data, 'threeLevelRef')"
@submit="(data) => handleSubmitEvent(data, 'threeLevelRef')" />
-
- 收录完成
-
+
+