diff --git a/src/components/navMenu/index.vue b/src/components/navMenu/index.vue
index 59880e236..1779fb412 100644
--- a/src/components/navMenu/index.vue
+++ b/src/components/navMenu/index.vue
@@ -334,60 +334,59 @@ export default {
// }
]
},
- // {
- // title: '个人中心',
- // path: '/personal',
- // 'icon-class': 'ucenter',
- // menuId: 'ZY9RFA4M35',
- // children: [
- // {
- // title: '我的消息',
- // path: '/dynamics',
- // menuId: 'JCEV4AEV32'
- // },
- // {
- // title: '我的企标',
- // path: '/MyEnterpriseStandard',
- // menuId: 'LKU3W23UMEHDM9VLDHGK'
- // },
- // {
- // title: '我的收藏',
- // path: '/collection',
- // menuId: 'JY5LKL2HPD'
- // },
- //
- // {
- // title: '我的浏览',
- // path: '/browsing',
- // menuId: 'HAEY2A4LMX'
- // },
- // {
- // title: '已收分享',
- // path: '/push',
- // menuId: '9F8T7DPYHE'
- // },
- // {
- // title: '已发分享',
- // path: '/forward',
- // menuId: 'K45Y9TGKZV2K4XP4CETD'
- // },
- // {
- // title: '我的问答',
- // path: '/questionsAndAnswers',
- // menuId: '8VKLZATQQG4NQHXV9UDS'
- // },
- // {
- // title: '我的板块',
- // path: '/plate',
- // menuId: 'TUYHX8JBWV'
- // }
- // // {
- // // title: '个人信息',
- // // path: '/info',
- // // menuId: '8K7FDHG89G'
- // // }
- // ]
- // },
+ {
+ title: '个人中心',
+ path: '/personal',
+ 'icon-class': 'ucenter',
+ menuId: 'ZY9RFA4M35',
+ children: [
+ // {
+ // title: '我的消息',
+ // path: '/dynamics',
+ // menuId: 'JCEV4AEV32'
+ // },
+ // {
+ // title: '我的企标',
+ // path: '/MyEnterpriseStandard',
+ // menuId: 'LKU3W23UMEHDM9VLDHGK'
+ // },
+ {
+ title: '我的收藏',
+ path: '/collection',
+ menuId: 'JY5LKL2HPD'
+ },
+ // {
+ // title: '我的浏览',
+ // path: '/browsing',
+ // menuId: 'HAEY2A4LMX'
+ // },
+ // {
+ // title: '已收分享',
+ // path: '/push',
+ // menuId: '9F8T7DPYHE'
+ // },
+ // {
+ // title: '已发分享',
+ // path: '/forward',
+ // menuId: 'K45Y9TGKZV2K4XP4CETD'
+ // },
+ // {
+ // title: '我的问答',
+ // path: '/questionsAndAnswers',
+ // menuId: '8VKLZATQQG4NQHXV9UDS'
+ // },
+ // {
+ // title: '我的板块',
+ // path: '/plate',
+ // menuId: 'TUYHX8JBWV'
+ // }
+ // {
+ // title: '个人信息',
+ // path: '/info',
+ // menuId: '8K7FDHG89G'
+ // }
+ ]
+ },
// {
// title: '搜索中心',
// path: '/advancedSearch',
diff --git a/src/pages/personal/pages/my-collection/components/CollectionStandard.vue b/src/pages/personal/pages/my-collection/components/CollectionStandard.vue
index f0e80e88b..57f18d034 100644
--- a/src/pages/personal/pages/my-collection/components/CollectionStandard.vue
+++ b/src/pages/personal/pages/my-collection/components/CollectionStandard.vue
@@ -6,7 +6,7 @@
-
- 取消收藏
+
+
+
+
+
+
+
@@ -40,62 +46,31 @@
-
+
所属板块:{{ item.collectType === 'INLAND_STAND' ? '国内标准法规' : (item.collectType === 'FOREIGN_STAND' ? '海外标准法规' : '企业标准') }}
- 标题:{{ item.collectTitle }}
+ 标题:{{ item.name }}
-
标题:{{ item.collectTitle }}
+
标题:{{ item.name }}
-
创建时间:{{getDate(item.creationTime)}}
+
创建时间:{{getDate(item.createTime)}}
取消收藏
-
-
-
添加笔记
-
-
笔记{{index2 +1 }}: {{note.noteContentValue}}
-
- 查看此条笔记
- 修改笔记
- 删除笔记
-
-
-
数据获取中
-
-
-
-
-
-
-
-
-
- 取消
- 确认
-
-
@@ -113,7 +88,7 @@ export default {
loadDate: false,
// 查询
search: {
- collectionStandard: ''
+ name: ''
},
// 分页
total: 0,
@@ -121,108 +96,25 @@ export default {
rows: 10,
// 数据内容
standardList: [],
- // 对话框状态
- standardModal: false,
- // 对话框标题
- standardTitle: '',
- // 对话框内容
- standardForm: {
- textarea: '',
- collectId: '',
- id: ''
- },
- modalType: '',
- // 是否读写
- noteType: false,
- // 计算
- // 笔记规则
- standardFormRules: {
- textarea: [
- {required: true, message: '笔记不能为空', trigger: 'blur'},
- {type: 'string', max: 20000, message: '最多输入20000字符'}
- ]
- },
checkAll: false, // 是否全选
indeterminate: false, // 是否半选
- isSubmit: false,
selectedList: [],
selectedAllInfoList: []
}
},
methods: {
- // 对话框关闭清除表单
- noteChange (type) {
- if (!type) {
- this.$refs['standardForm'].resetFields()
- }
- },
// 重置
resetSelect () {
- this.search.collectionStandard = ''
+ this.search.name = ''
this.pageChange(1)
},
- // 笔记数字提示
- descInput () {
- if (this.standardForm.textarea.length > 20000) {
- this.error('最多输入20000字')
- }
- },
- error (msg) {
- this.$Message.error(msg)
- },
- // 跳转
- detailsStandard (item) {
- console.log(item);
- this.$http.get('lawss/sarMenu/judgeSarMenuByRole', {
- sarId: item.collectResId,
- sarType: item.collectType
- }, {
- _this: this
- }, res => {
- if (res.ok) {
- if (item.collectType === 'BUSINESS_STAND') {
- // if (this.$hasPermission('YJUHC32R7G')) {
- let routeUrl = this.$router.resolve({
- name: 'OtherBussStandardDetails',
- params: {
- id: item.collectResId,
- pageType: item.collectType
- }
- })
- window.open(routeUrl.href, '_blank')
- // } else {
- // this.$message.warning('无权访问')
- // }
- } else {
- // if (this.$hasPermission('SSA6WR4HV8')) {
- let routeUrl = this.$router.resolve({
- name: 'OtherStandardDetails',
- params: {
- id: item.collectResId,
- pageType: item.collectType
- }
- })
- window.open(routeUrl.href, '_blank')
- // } else {
- // this.$message.warning('无权访问')
- // }
- }
- } else {
- this.$message.error(res.message)
- }
- }, e => {
- this.$message.error('无权访问')
- })
- },
// 分页
pageChange (page) {
this.page = page
- this.saveNote = ''
this.selectStandard()
},
pageSizeChange (pageSize) {
this.rows = pageSize
- this.saveNote = ''
this.selectStandard()
},
// 搜索
@@ -232,36 +124,19 @@ export default {
},
// 查询、加载数据
selectStandard () {
- this.$http.get('person/personCollect/page', {
- pageNo: this.page,
- pageSize: this.$store.getters.userInfo.configContent,
- modeType: 'STAND',
- collectTitle: this.search.collectionStandard,
- userId: this.$store.getters.userInfo.userId
+ this.$http.get('sarPersonalCenter/sar-user-star/getList', {
+ current: this.page,
+ size: this.$store.getters.userInfo.configContent,
+ userId: this.$store.getters.userInfo.userId,
+ name: this.search.name
}, {
_this: this,
loading: 'loading'
}, res => {
- // for (let i = 0; i < res.data.list.length; i++) {
- // res.data.list[i].checked = false
- // res.data.list[i].check = false
- // res.data.list[i].seeBtn = '查看笔记'
- // }
- res.data.list.map((item, index) => {
- item.checked = false
- })
this.standardList = []
- this.standardList = res.data.list
- this.total = res.data.count
+ this.standardList = res.data.records
+ this.total = res.data.total
this.contentOpen = true
- // if (this.saveNote !== '') {
- // this.standardList[this.saveNote].check = true
- // if (this.standardList[this.saveNote].check === true) {
- // this.standardList[this.saveNote].seeBtn = '关闭笔记'
- // } else {
- // this.standardList[this.saveNote].seeBtn = '查看笔记'
- // }
- // }
}, e => {})
},
// 取消收藏
@@ -273,130 +148,28 @@ export default {
confirmButtonClass: 'common-button-primary',
roundButton: true
}).then(() => {
- this.$http.put('person/personCollect/updateByUserId ', {
- modeType: 'STAND',
- id: id
- }, {
- _this: this
- }, res => {
- this.contentOpen = false
- this.pageChange(1)
- }, e => {
- })
- }).catch(() => {
- })
- },
- // 查看笔记
- writeStandardNotes (item, index) {
- item.check = !item.check
- if (item.check === true) {
- item.seeBtn = '关闭笔记'
- } else {
- item.seeBtn = '查看笔记'
- }
- for (let i = 0; i < this.standardList.length; i++) {
- if (i !== index) {
- this.standardList[i].check = false
- this.standardList[i].seeBtn = '查看笔记'
- }
- }
- },
- // 添加笔记
- createStandardNote (item, index) {
- this.standardModal = true
- this.noteType = false
- this.modalType = 1
- this.standardTitle = '添加笔记'
- this.standardForm.textarea = ''
- this.standardForm = item
- this.saveNote = index
- },
- // 查看此条笔记
- viewStandardData (note) {
- this.standardModal = true
- this.standardTitle = '查看笔记'
- this.standardForm.textarea = note.noteContentValue
- this.noteType = true
- this.modalType = 3
- },
- // 修改笔记
- noteStandardEdit (note, index) {
- this.standardModal = true
- this.noteType = false
- this.standardTitle = '修改笔记'
- this.modalType = 2
- this.standardForm.id = note.id
- this.standardForm.textarea = note.noteContentValue
- this.saveNote = index
- },
- // 删除笔记
- noteStandardDel (note, index) {
- this.saveNote = index
- this.$confirm('确认删除该条数据?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- confirmButtonClass: 'common-button-primary',
- roundButton: true
- }).then(() => {
- this.$http.post('lawss/utNoteInfo/deleteNote', {
- ids: note.id
- },
- {
+ var json = {}
+ json.userId = this.$store.getters.userInfo.userId
+ json.id = id
+ this.$http.postData('/sarPersonalCenter/sar-user-star/delete',json, {
_this: this
}, res => {
if (res.ok) {
- this.selectStandard()
- } else {
+ this.$message.success('已取消收藏')
+ this.contentOpen = false
+ this.pageChange(1)
}
- }).catch(() => {
+ }, e => {
})
- })
- },
- closeModal () {
- this.standardModal = false
- this.$refs['standardForm'].resetFields()
- },
- // 保存笔记 (新增、编辑)
- saveClass () {
- this.$refs['standardForm'].validate((valid) => {
- if (valid) {
- this.standardModal = false
- if (this.modalType === 1) {
- let noteForm = {}
- noteForm.noteContentValue = this.standardForm.textarea
- noteForm.sourceType = 'COSTAND'
- noteForm.noteName = this.standardForm.collectTitle
- noteForm.sarId = this.standardForm.id
- noteForm.forwardId = this.standardForm.collectResId
- this.$http.post('lawss/utNoteInfo/saveNote', noteForm, {
- _this: this,
- loading: 'isSubmit'
- }, res => {
- this.selectStandard()
- }, e => {
- })
- } else if (this.modalType === 2) {
- let noteForm = {
- id: this.standardForm.id,
- noteContentValue: this.standardForm.textarea
- }
- this.$http.post('lawss/utNoteInfo/updateNote', noteForm, {
- _this: this
- }, res => {
- this.selectStandard()
- }, e => {
- })
- }
- } else {
- this.$message.error('请正确输入')
- }
+ }).catch(() => {
})
},
getDate (date) {
return date != null ? date.substring(0, date.indexOf(' ')) : ''
},
cancleCollectBatch () {
+ console.log(this.selectedList);
+ return
if (this.selectedList.length === 0) {
this.$confirm('请先选择数据进行取消收藏', '提示', {
showCancelButton: false,
diff --git a/src/pages/personal/pages/my-collection/index.vue b/src/pages/personal/pages/my-collection/index.vue
index 94e0f944e..2f383b30e 100644
--- a/src/pages/personal/pages/my-collection/index.vue
+++ b/src/pages/personal/pages/my-collection/index.vue
@@ -17,19 +17,22 @@ export default {
data () {
return {
active: 'CollectionStandard',
- tabsList: [ {
- title: '已收藏的标准法规',
- name: 'CollectionStandard'
- }, {
- title: '已收藏的动态&资料 ',
- name: 'CollectionDynamics'
- }, {
- title: '已收藏的政策',
- name: 'CollectionLaws'
- }, {
- title: '已收藏的标准拆分',
- name: 'CollectionBreak'
- }]
+ tabsList: [
+ {
+ title: '已收藏的标准法规',
+ name: 'CollectionStandard'
+ },
+ // {
+ // title: '已收藏的动态&资料 ',
+ // name: 'CollectionDynamics'
+ // }, {
+ // title: '已收藏的政策',
+ // name: 'CollectionLaws'
+ // }, {
+ // title: '已收藏的标准拆分',
+ // name: 'CollectionBreak'
+ // }
+ ]
}
},
methods: {