Browse Source

摘要增加新配置

pull/140/head
zq 3 days ago
parent
commit
21720b2edb
  1. 22
      src/components/HeaderClientSet.vue
  2. 39
      src/components/clientSet/clientForm.vue
  3. 2
      src/router/index.js
  4. 19
      src/views/super/clientSet/summaryPage.vue

22
src/components/HeaderClientSet.vue

@ -101,29 +101,7 @@ export default {
console.error('数据加载失败:', error) console.error('数据加载失败:', error)
} }
}, },
//
getList() {
try {
this.$http('POST', '/supernew/ajax_get_paiban_review_list', {
school: this.school,
degree: this.degree,
review_status: this.review_status,
page: this.currentPage,
}).then(response => {
this.$nextTick(() => {
this.total = response.data.count
})
}).catch(error => {
console.error(error, 'error')
})
} catch (error) {
console.error('数据加载失败:', error)
}
},
toHome() { toHome() {
// this.$router.push({
// path: '/'
// })
location.href = 'http://www.kuailelunwen.com/?adm=1' location.href = 'http://www.kuailelunwen.com/?adm=1'
}, },
goToPage(path) { goToPage(path) {

39
src/components/clientSet/clientForm.vue

@ -112,6 +112,11 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="summaryFlag">
<GuipRadio :options="summaryList" v-model="coverInfo.is_need_blank_line_between_the_keywords" label="是否需要空行:" />
<GuipRadio :options="summaryList" v-model="coverInfo.is_independent_page" label="是否单独页:" />
<GuipRadio :options="summaryList" v-model="coverInfo.is_before_catalogue" label="是否在目录前:" />
</div>
<div v-if="headerMargin"> <div v-if="headerMargin">
<!-- 暂时先不用 默认单位为厘米 --> <!-- 暂时先不用 默认单位为厘米 -->
<GuipRadio v-if="false" :options="distanceUnit" :client-form-flex="true" label="单位" /> <GuipRadio v-if="false" :options="distanceUnit" :client-form-flex="true" label="单位" />
@ -180,6 +185,10 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
summaryFlag: {//
type: Boolean,
default: false
},
fontWeightflag: {// fontWeightflag: {//
type: Boolean, type: Boolean,
default: true default: true
@ -280,7 +289,10 @@ export default {
unit: 'pt', unit: 'pt',
value: '' value: ''
} }
} },
// is_before_catalogue:'True',
// is_independent_page:'True',
// is_need_blank_line_between_the_keywords:'True'
}, },
// UI // UI
@ -288,6 +300,10 @@ export default {
grammarCheck: '', grammarCheck: '',
// //
summaryList: [
{ label: '是', value: 'True' },
{ label: '否', value: 'False' },
],
internalIndentationList: [ internalIndentationList: [
{ label: '有', value: '1' }, { label: '有', value: '1' },
{ label: '无', value: '0' }, { label: '无', value: '0' },
@ -516,7 +532,6 @@ export default {
* 默认重置创建状态 * 默认重置创建状态
*/ */
defaultReset() { defaultReset() {
console.log('这里');
this.coverInfo = this.getDefaultCoverInfo(); this.coverInfo = this.getDefaultCoverInfo();
this.indentation = '1'; // this.indentation = '1'; //
this.delimiter = ''; this.delimiter = '';
@ -624,7 +639,12 @@ export default {
right:this.coverInfo.right right:this.coverInfo.right
} }
} }
return { const summaryJson = {
"is_need_blank_line_between_the_keywords": this.coverInfo.is_need_blank_line_between_the_keywords,
"is_independent_page": this.coverInfo.is_independent_page,
"is_before_catalogue": this.coverInfo.is_before_catalogue
}
const baseJson = {
font: { font: {
zh: { zh: {
font: this.coverInfo.font.zh.font, font: this.coverInfo.font.zh.font,
@ -673,6 +693,10 @@ export default {
} }
} }
} }
if(this.summaryFlag){
return {...baseJson,...summaryJson}
}
return baseJson
}, },
/** /**
@ -893,6 +917,15 @@ export default {
} }
} }
} }
if(levelData.is_need_blank_line_between_the_keywords){
this.coverInfo.is_need_blank_line_between_the_keywords = levelData.is_need_blank_line_between_the_keywords;
}
if(levelData.is_independent_page){
this.coverInfo.is_independent_page = levelData.is_independent_page;
}
if(levelData.is_before_catalogue){
this.coverInfo.is_before_catalogue = levelData.is_before_catalogue;
}
} }
} }
}; };

2
src/router/index.js

@ -743,6 +743,8 @@ router.beforeEach((to, from, next) => {
} }
if (to.path.includes('/super/paiban/')) { if (to.path.includes('/super/paiban/')) {
store.commit('SET_HEADER_RIGHT', true); store.commit('SET_HEADER_RIGHT', true);
localStorage.removeItem('template_id');
localStorage.removeItem('curtplInfo');
} }
if (to.path.includes('/super/clientSet/')) { if (to.path.includes('/super/clientSet/')) {

19
src/views/super/clientSet/summaryPage.vue

@ -3,20 +3,20 @@
<h3 class="pageTitle">摘要</h3> <h3 class="pageTitle">摘要</h3>
<div class="flex-between flex-common" id="summaryTitle"> <div class="flex-between flex-common" id="summaryTitle">
<ClientForm ref="chTitleRef" title="摘要标题" :init-data="chTitleData" :titlePosFlag="false" <ClientForm ref="chTitleRef" title="摘要标题" :init-data="chTitleData" :titlePosFlag="false"
@cancel="(data) => handleCancelEvent(data, 'chTitleRef')" @cancel="(data) => handleCancelEvent(data, 'chTitleRef')" :summaryFlag="true"
:outputStructure="chTitleOut" :outputStructure="chTitleOut"
@submit="(data) => handleSubmitEvent(data, 'chTitleRef')" /> @submit="(data) => handleSubmitEvent(data, 'chTitleRef')" />
<ClientForm ref="chTextRef" title="摘要正文" :titlePosFlag="false" <ClientForm ref="chTextRef" title="摘要正文" :titlePosFlag="false" :summaryFlag="true"
:init-data="chTextData" @cancel="(data) => handleCancelEvent(data, 'chTextRef')" :init-data="chTextData" @cancel="(data) => handleCancelEvent(data, 'chTextRef')"
:outputStructure="chTextOut" :outputStructure="chTextOut"
@submit="(data) => handleSubmitEvent(data, 'chTextRef')" /> @submit="(data) => handleSubmitEvent(data, 'chTextRef')" />
</div> </div>
<div class="flex-between flex-common mt12" id="summaryContent"> <div class="flex-between flex-common mt12" id="summaryContent">
<ClientForm ref="chKeyRef" title="中文关键词" :titlePosFlag="false" :lineSpaceShow="false" <ClientForm ref="chKeyRef" title="中文关键词" :titlePosFlag="false" :summaryFlag="true"
:ch_keywords="true" :showIndentation="false" :outputStructure="chKeyOut" :alignShow="false" :ch_keywords="true" :outputStructure="chKeyOut" :alignShow="false"
:init-data="chKeyData" @cancel="(data) => handleCancelEvent(data, 'chKeyRef')" :init-data="chKeyData" @cancel="(data) => handleCancelEvent(data, 'chKeyRef')"
@submit="(data) => handleSubmitEvent(data, 'chKeyRef')" /> @submit="(data) => handleSubmitEvent(data, 'chKeyRef')" />
<ClientForm ref="engKeyRef" title="" :titlePosFlag="false" <ClientForm ref="engKeyRef" title="" :titlePosFlag="false" :summaryFlag="true"
:eng_keywords="true" :showIndentation="false" :outputStructure="chKeyOut" :alignShow="false" :eng_keywords="true" :showIndentation="false" :outputStructure="chKeyOut" :alignShow="false"
:init-data="engKeyData" @cancel="(data) => handleCancelEvent(data, 'engKeyRef')" :init-data="engKeyData" @cancel="(data) => handleCancelEvent(data, 'engKeyRef')"
@submit="(data) => handleSubmitEvent(data, 'engKeyRef')" /> @submit="(data) => handleSubmitEvent(data, 'engKeyRef')" />
@ -128,17 +128,8 @@ export default {
handleSubmitEvent(formData, refName) { handleSubmitEvent(formData, refName) {
console.log('外部提交方法:', formData,refName); console.log('外部提交方法:', formData,refName);
// refName API
this.submitConfig(formData); this.submitConfig(formData);
// switch (refName) {
// case 'level_1_heading':
// this.submitConfig(formData);
// break;
// case 'level_2_heading':
// this.submitConfig(formData);
// break;
// }
}, },
async submitConfig(data) { async submitConfig(data) {
// API // API

Loading…
Cancel
Save