From ca27e2841ce98e65bee4f78efe9873d1a9ff43b2 Mon Sep 17 00:00:00 2001
From: Riollee <530377286@qq.com>
Date: Tue, 3 Aug 2021 21:54:36 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90feat=E3=80=91=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E6=96=B0=E9=97=BB=E5=92=8C=E4=B8=93=E5=88=A9=E7=AE=A1=E7=90=86?=
=?UTF-8?q?=E7=9A=84=E7=AD=9B=E9=80=89=E3=80=81=E6=90=9C=E7=B4=A2=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD=EF=BC=8C=E6=96=B0=E5=A2=9E=E4=B8=93=E5=88=A9=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=E6=B7=BB=E5=8A=A0=E4=B8=93=E5=88=A9=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/Content/News.vue | 91 ++++++++++++++++++++-------
src/views/Content/Patents.vue | 114 ++++++++++++++++++++++++----------
2 files changed, 147 insertions(+), 58 deletions(-)
diff --git a/src/views/Content/News.vue b/src/views/Content/News.vue
index 731b8e9..12a2047 100644
--- a/src/views/Content/News.vue
+++ b/src/views/Content/News.vue
@@ -11,18 +11,28 @@
-
+
- 搜索
- 添加
+ 搜索
+
+
+
+
+
+
+
+
+ 发布新闻
-
-
@@ -30,7 +40,7 @@
show-overflow-tooltip/>
- 修改
+ 修改
删除
@@ -42,7 +52,7 @@
:before-close="closeDialog">
-
+
= 0 && parameter.type <= 3) {
+ params.type = parameter.type
+ }
+ if (parameter.search !== '') {
+ params.search = parameter.search
+ }
get(`/news/`, params).then(value => {
this.listData = value.results
that.pageparm.currentPage = that.formInline.page
@@ -184,17 +226,17 @@ export default {
this.$message.error('加载失败')
})
},
- // 分页插件事件
+
callFather (parm) {
this.formInline.page = parm.currentPage
this.formInline.limit = parm.pageSize
this.getdata(this.formInline)
},
- // 搜索事件
+
search () {
this.getdata(this.formInline)
},
- //显示编辑界面
+
handleEdit: function (index, row) {
this.editFormVisible = true
if (row !== undefined && row !== 'undefined') {
@@ -212,20 +254,20 @@ export default {
this.editForm.type = ''
}
},
- // 编辑、增加页面保存方法
+
submitForm (editData) {
this.$refs[editData].validate(valid => {
if (!valid || this.title === undefined || this.title !== '修改') {
return false
}
- put(`/news/${this.editId}/`, { ...this.editForm }).then(() => {
+ put(`/news/${this.editForm.editId}/`, { ...this.editForm }).then(() => {
this.editFormVisible = false
this.$message.success('修改成功')
this.getdata(this.formInline)
}).catch(error => this.$message.error('修改失败'))
})
},
- // 删除公司
+
deleteUser (index, row) {
this.$confirm('确定要删除该新闻?', '删除', {
cancelButtonText: '取消',
@@ -242,7 +284,7 @@ export default {
}
})
},
- // 关闭编辑、增加弹出框
+
closeDialog (formName) {
this.editFormVisible = false
this.$refs['editForm'].resetFields()
@@ -256,8 +298,9 @@ export default {
margin-top: 20px;
}
-.userRole {
- width: 100%;
+.publish-news-item-button {
+ position: relative;
+ left: 35%;
}
diff --git a/src/views/Content/Patents.vue b/src/views/Content/Patents.vue
index c470375..3e6ab4b 100644
--- a/src/views/Content/Patents.vue
+++ b/src/views/Content/Patents.vue
@@ -11,11 +11,23 @@
-
+
- 搜索
- 添加
+ 搜索
+
+
+
+
+
+
+
+
+ 添加专利
@@ -65,7 +77,9 @@
+ placeholder="请选择专利授权日期"
+ :picker-options='pickerOptions'
+ value-format="yyyy-MM-dd">
@@ -80,7 +94,7 @@