国际化配置更新

文档-查询条件更新
笔记列查询条件更新
master
pan 4 years ago
parent b19a2088ab
commit a0e7bdd8b9
  1. 6
      nuxt.config.js
  2. 18
      pages/index/document.vue
  3. 41
      pages/index/note.vue

@ -105,6 +105,7 @@ export default {
"del": "删除", "del": "删除",
"edit": "编辑", "edit": "编辑",
"ok": "确定", "ok": "确定",
"query": "查询",
"rating": "提交评分", "rating": "提交评分",
"submit": "提交" "submit": "提交"
}, },
@ -143,6 +144,7 @@ export default {
}, },
"form": { "form": {
"author": "作者", "author": "作者",
"content": "正文内容",
"end_year": "结束年份", "end_year": "结束年份",
"keyword": "关键词", "keyword": "关键词",
"school": "学校", "school": "学校",
@ -169,6 +171,7 @@ export default {
"more_query": "更多查询", "more_query": "更多查询",
"note": { "note": {
"table": { "table": {
"note_content": "笔记内容",
"note_name": "笔记名称", "note_name": "笔记名称",
"paper_name": "论文标题" "paper_name": "论文标题"
}, },
@ -240,6 +243,7 @@ export default {
"del": "", "del": "",
"edit": "", "edit": "",
"ok": "", "ok": "",
"query": "",
"rating": "", "rating": "",
"submit": "" "submit": ""
}, },
@ -278,6 +282,7 @@ export default {
}, },
"form": { "form": {
"author": "", "author": "",
"content": "",
"end_year": "", "end_year": "",
"keyword": "", "keyword": "",
"school": "", "school": "",
@ -304,6 +309,7 @@ export default {
"more_query": "", "more_query": "",
"note": { "note": {
"table": { "table": {
"note_content": "",
"note_name": "", "note_name": "",
"paper_name": "" "paper_name": ""
}, },

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item :label="$t('document.form.title')" prop="title"> <el-form-item :label="$t('document.form.title')" prop="title">
<el-col :span="4"> <el-col :span="4">
<el-input v-model="form.title" :placeholder="$t('input_please',{keyword:$t('document.form.title')})"/> <el-input v-model="form.title" :placeholder="$t('input_please',{keyword:$t('document.form.title')})"/>
@ -23,16 +23,6 @@
</el-form-item> </el-form-item>
<el-collapse v-model="activeNames"> <el-collapse v-model="activeNames">
<el-collapse-item :title="activeNames[0]==='1'?$t('hide_more_query'):$t('more_query')" name="1"> <el-collapse-item :title="activeNames[0]==='1'?$t('hide_more_query'):$t('more_query')" name="1">
<el-form-item :label="$t('document.form.school')" prop="school">
<el-col :span="4">
<el-input v-model="form.school" :placeholder="$t('input_please',{keyword:$t('document.form.school')})"/>
</el-col>
</el-form-item>
<el-form-item :label="$t('document.form.tutor')" prop="tutor">
<el-col :span="4">
<el-input v-model="form.tutor" :placeholder="$t('input_please',{keyword:$t('document.form.tutor')})"/>
</el-col>
</el-form-item>
<el-form-item :label="$t('document.form.start_year')" prop="start_year"> <el-form-item :label="$t('document.form.start_year')" prop="start_year">
<el-col :span="4"> <el-col :span="4">
<el-input v-model="form.start_year" <el-input v-model="form.start_year"
@ -46,6 +36,9 @@
</el-col> </el-col>
</el-form-item> </el-form-item>
</el-collapse-item> </el-collapse-item>
<el-form-item class="mt1">
<el-button>{{$t('button.query')}}</el-button>
</el-form-item>
</el-collapse> </el-collapse>
</el-form> </el-form>
<el-row class="mt3"> <el-row class="mt3">
@ -112,7 +105,8 @@
school: '', school: '',
tutor: '', tutor: '',
start_year: '', start_year: '',
end_year: '' end_year: '',
content:'',
}, },
rules: {}, rules: {},
activeNames: [], activeNames: [],

@ -1,10 +1,26 @@
<template> <template>
<el-col :span="10"> <div>
<el-row type="flex" justify="center">
<el-col :span="5">
<el-form ref="form" :model="form" label-width="80px">
<el-form-item :label="$t('read.tip.form.note_title')" prop="note_title">
<el-input v-model="form.note_title" :placeholder="$t('input_please', { keyword: this.$t('read.tip.form.note_title') })"></el-input>
</el-form-item>
<el-form-item :label="$t('read.tip.form.note_content')" prop="note_content">
<el-input type="textarea" v-model="form.note_content" :placeholder="$t('input_please', { keyword: this.$t('read.tip.form.note_content') })"></el-input>
</el-form-item>
<el-form-item class="center">
<el-button>{{$t('button.query')}}</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
<el-table :data="tableData" border> <el-table :data="tableData" border>
<el-table-column align="center" prop="note_name" :label="$t('note.table.note_name')" /> <el-table-column align="center" prop="note_name" :label="$t('note.table.note_name')" />
<el-table-column align="center" prop="note_content" :label="$t('note.table.note_content')" />
<el-table-column align="center" prop="paper_name" :label="$t('note.table.paper_name')" /> <el-table-column align="center" prop="paper_name" :label="$t('note.table.paper_name')" />
<el-table-column align="center" :label="$t('action')"> <el-table-column align="center" :label="$t('action')" >
<template slot-scope="scope"> <template slot-scope="scope" >
<el-button>{{$t('button.edit')}}</el-button> <el-button>{{$t('button.edit')}}</el-button>
<el-button type="danger" @click="del">{{$t('button.del')}}</el-button> <el-button type="danger" @click="del">{{$t('button.del')}}</el-button>
</template> </template>
@ -17,7 +33,7 @@
:total="1000"> :total="1000">
</el-pagination> </el-pagination>
</div> </div>
</el-col> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
@ -29,9 +45,26 @@
return { return {
tableData:[{ tableData:[{
note_name:'笔记', note_name:'笔记',
note_content:'笔记内容',
paper_name: '《论文》' paper_name: '《论文》'
}],
form:{
note_name:'',
note_content:''
},
rules:{
note_title:[{
required: true,
message: this.$t('input_please', { keyword: this.$t('read.tip.form.note_title') }),
trigger: 'blur'
}],
note_content:[{
required: true,
message: this.$t('input_please', { keyword: this.$t('read.tip.form.note_content') }),
trigger: 'blur'
}] }]
} }
}
}, },
methods:{ methods:{
del(){ del(){

Loading…
Cancel
Save