diff --git a/src/views/Content/News.vue b/src/views/Content/News.vue index 731b8e9220f063302d5219f56369f429dcfd1408..12a204781bdb6a0b83a36afde83747c55e328721 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 c47037570c5546121f122cf2940aad9ec8bf0cdc..7d873a6fe5f17604782313097b1f5a0c709c271d 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 @@