diff --git a/.eslintrc.js b/.eslintrc.js index 97b94c4b2..6e541c3c2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -23,7 +23,7 @@ module.exports = { ], 'prefer-arrow-callback': 'warn', // 建议使用箭头函数 'prefer-const': 'error', // 强制使用 const 定义常量 - 'indent': ['error', 2], // 缩进 2 个空格 + 'indent': ['error', 2, { SwitchCase: 1 }], // 缩进 2 个空格 SwitchCase缩进 // '@stylistic/js/indent': ['error', 2], // 缩进 2 个空格 'no-mixed-spaces-and-tabs': 'error', // 禁止混用空格和 tab缩进 'quotes': ['error', 'single'], // 强制使用单引号 @@ -47,7 +47,7 @@ module.exports = { "padded-blocks": ["error", "never"], // 代码块内部前后不要有空行 "semi-spacing": ["error", { "before": false, "after": true }], // 分号前面不能有空格,后面需要有空格 var foo ; var bar; => var foo; var bar; 'no-multiple-empty-lines': [ 'error', { max: 1 }], // 最多只能有一行空行 - 'no-return-assign': ['error', 'except-parens'], // 禁止在 return 语句中使用赋值语句 + 'no-return-assign': ['off', 'except-parens'], // 禁止在 return 语句中使用赋值语句 'no-self-assign': 'error', // 禁止自我赋值 'no-self-compare': 'error', // 禁止自身比较 // "newline-per-chained-call": ["error", { "ignoreChainWithDepth": 1 }], // 链式调用时,每个调用都需要换行 @@ -70,6 +70,7 @@ module.exports = { 'singleline': 'never', 'multiline': 'always', }], + 'vue/attribute-hyphenation': 'off', // 关闭 属性名必须使用连字符的规则 }, env: { browser: true, diff --git a/src/pages/details/meetingDetail/index.vue b/src/pages/details/meetingDetail/index.vue index 737af2869..c1810f20e 100644 --- a/src/pages/details/meetingDetail/index.vue +++ b/src/pages/details/meetingDetail/index.vue @@ -8,13 +8,16 @@ @@ -29,10 +32,10 @@

-

@@ -45,7 +48,7 @@ @@ -58,7 +61,7 @@ @@ -68,10 +71,10 @@

-

@@ -87,19 +90,20 @@
+ title="更新记录" + :visible.sync="relateDialog" + width="60%" + class="relateClass" + :before-close="relateDialogClose" + >
- {{index+1}}. {{item.creationUserName}} {{item.creationTime}} {{item.content}} -
+ {{ index+1 }}. {{ item.creationUserName }} {{ item.creationTime }} {{ item.content }} +
关 闭 @@ -110,10 +114,8 @@ diff --git a/src/pages/home2/components/release2/index.vue b/src/pages/home2/components/release2/index.vue index f4391dce5..3f00b1dee 100644 --- a/src/pages/home2/components/release2/index.vue +++ b/src/pages/home2/components/release2/index.vue @@ -1,62 +1,63 @@ @@ -65,48 +66,47 @@ export default { name: 'Release', components: {}, mixins: [], - data() { + data () { return { - loading: false, - pageVerify: false, - page: 1, - pageSize: this.$store.getters.userInfo.configContent, - total: 0, - putTime: '', - standardReleaseList: [], //标准发布数据 + loading: false, + pageVerify: false, + page: 1, + pageSize: this.$store.getters.userInfo.configContent, + total: 0, + putTime: '', + standardReleaseList: [], // 标准发布数据 } }, computed: {}, watch: {}, - mounted() { + mounted () { this.getDate() this.getAdvice() - // this.addDate() }, methods: { - pageChange(page) { - this.page = page - this.pageSize = this.$store.getters.userInfo.configContent - this.getAdvice() - }, - // 分页每页显示数改变后方法 - pageSizeChange(pageSize) { - this.pageSize = this.$store.getters.userInfo.configContent - this.getAdvice() - // 此处需要调用接口,修改个人配置 - }, - togo () { - if(this.total && this.total > 10){ - this.pageVerify = true - this.pageSize = this.$store.getters.userInfo.configContent - }else { - this.pageVerify = false - } - this.getAdvice() - }, + pageChange (page) { + this.page = page + this.pageSize = this.$store.getters.userInfo.configContent + this.getAdvice() + }, + // 分页每页显示数改变后方法 + pageSizeChange (pageSize) { + this.pageSize = this.$store.getters.userInfo.configContent + this.getAdvice() + // 此处需要调用接口,修改个人配置 + }, + togo () { + if(this.total && this.total > 10) { + this.pageVerify = true + this.pageSize = this.$store.getters.userInfo.configContent + }else { + this.pageVerify = false + } + this.getAdvice() + }, // 点击查看 handlePreview (item) { - let routeUrl = this.$router.resolve({ + const routeUrl = this.$router.resolve({ name: 'OtherStandardDetails', params: { id: item.standardId, @@ -115,27 +115,27 @@ export default { }) window.open(routeUrl.href, '_blank') }, - //截取时间 + // 截取时间 getDate (date) { return date != null ? date.substring(0, date.indexOf(' ')) : '' }, - //获取数据 - getAdvice() { + // 获取数据 + getAdvice () { this.loading = true - this.$http.get("/lawss/NewsFeed/getNewsFeed", { - messageType: 'GNWBZFG', - page: this.page, - pageSize: this.pageSize - }, { - _this: this,loading: 'loading' - }, res => { - this.standardReleaseList = res.data.records - this.total = res.data.total - this.loading = false + this.$http.get('/lawss/NewsFeed/getNewsFeed', { + messageType: this.$route.query.messageType, + page: this.page, + pageSize: this.pageSize + }, { + _this: this, loading: 'loading' + }, res => { + this.standardReleaseList = res.data.records + this.total = res.data.total + this.loading = false }, e => { - this.loading = false - this.standardReleaseList = [] - this.total = 0 + this.loading = false + this.standardReleaseList = [] + this.total = 0 }) }, }, @@ -152,12 +152,12 @@ export default { font-size: 13px; } /deep/.more { - position: absolute; - right: 0; - bottom: 2px; - font-size: 15px; - float: right; - color: #4788c0; + //position: absolute; + //right: 0; + //bottom: 2px; + //font-size: 15px; + //float: right; + //color: #4788c0; &:hover { color: #3a8ee6; cursor: pointer; diff --git a/src/pages/home2/components/releaseBuss/index.vue b/src/pages/home2/components/releaseBuss/index.vue index c666041e3..7a5c82dca 100644 --- a/src/pages/home2/components/releaseBuss/index.vue +++ b/src/pages/home2/components/releaseBuss/index.vue @@ -1,64 +1,62 @@ @@ -68,78 +66,81 @@ export default { name: 'ReleaseBuss', components: {}, mixins: [], - data() { + data () { return { loading: false, pageVerify: false, page: 1, - pageSize: this.$store.getters.userInfo.configContent, + pageSize: 10, total: 0, putTime: '', - standardReleaseList: [], //标准发布数据 + standardReleaseList: [], // 标准发布数据 } }, computed: {}, watch: {}, - mounted() { + mounted () { this.getDate() this.getAdvice() // this.addDate() }, methods: { - checkTime (time) { - return moment(time.slice(0,10)).diff(moment(), 'day') > -3 - }, - pageChange(page) { - this.page = page - this.pageSize = this.$store.getters.userInfo.configContent - this.getAdvice() - }, - // 分页每页显示数改变后方法 - pageSizeChange(pageSize) { - this.pageSize = this.$store.getters.userInfo.configContent - this.getAdvice() - // 此处需要调用接口,修改个人配置 - }, - togo () { - this.$router.push({path:'/releaseBuss2'}) - }, + checkTime (time) { + return moment(time.slice(0, 10)).diff(moment(), 'day') > -3 + }, + pageChange (page) { + this.page = page + this.pageSize = this.$store.getters.userInfo.configContent + this.getAdvice() + }, + // 分页每页显示数改变后方法 + pageSizeChange (pageSize) { + this.pageSize = this.$store.getters.userInfo.configContent + this.getAdvice() + // 此处需要调用接口,修改个人配置 + }, + togo () { + this.$router.push({ path: '/releaseBuss2' }) + }, // 点击查看 handlePreview (item) { - let routeUrl = this.$router.resolve({ - name: 'OtherBussStandardDetails', - params: { - id: item.standardId, - pageType: 'BUSINESS_STAND' - } - }) - window.open(routeUrl.href, '_blank') + const routeUrl = this.$router.resolve({ + name: 'OtherBussStandardDetails', + params: { + id: item.standardId, + pageType: 'BUSINESS_STAND' + } + }) + window.open(routeUrl.href, '_blank') }, - //截取时间 + // 截取时间 getDate (date) { return date != null ? date.substring(0, date.indexOf(' ')) : '' }, - //获取数据 - getAdvice() { - this.loading = true - this.$http.get("/lawss/NewsFeed/getNewsFeed", { - messageType: 'QYBZFB', - page: this.page, - pageSize: this.pageSize - }, { - _this: this,loading: 'loading' - }, res => { - this.standardReleaseList = res.data.records - this.total = res.data.total - this.loading = false - }, e => { - this.loading = false - this.standardReleaseList = [] - this.total = 0 - }) + // 获取数据 + getAdvice () { + this.loading = true + this.$http.get('/lawss/NewsFeed/getNewsFeed', { + messageType: 'QYBZFB', + page: this.page, + pageSize: this.pageSize + }, { + _this: this, loading: 'loading' + }, res => { + this.standardReleaseList = res.data.records + this.total = res.data.total + this.loading = false + if (res.data && res.data.records && res.data.records.length > 0) { + const isNew = res.data.records[0].threeDaysNew || false + this.$emit('isNew', isNew) + } + }, e => { + this.loading = false + this.standardReleaseList = [] + this.total = 0 + }) }, }, - } diff --git a/src/pages/home2/components/releaseBuss2/index.vue b/src/pages/home2/components/releaseBuss2/index.vue index 4969e7507..1e4812e53 100644 --- a/src/pages/home2/components/releaseBuss2/index.vue +++ b/src/pages/home2/components/releaseBuss2/index.vue @@ -1,65 +1,63 @@ @@ -69,7 +67,7 @@ export default { name: 'ReleaseBuss2', components: {}, mixins: [], - data() { + data () { return { loading: false, pageVerify: false, @@ -77,73 +75,72 @@ export default { pageSize: this.$store.getters.userInfo.configContent, total: 0, putTime: '', - standardReleaseList: [], //标准发布数据 + standardReleaseList: [], // 标准发布数据 } }, computed: {}, watch: {}, - mounted() { + mounted () { this.getDate() this.getAdvice() - // this.addDate() }, methods: { - checkTime (time) { - return moment(time.slice(0,10)).diff(moment(), 'day') > -3 - }, - pageChange(page) { - this.page = page - this.pageSize = this.$store.getters.userInfo.configContent - this.getAdvice() - }, - // 分页每页显示数改变后方法 - pageSizeChange(pageSize) { - this.pageSize = this.$store.getters.userInfo.configContent - this.getAdvice() - // 此处需要调用接口,修改个人配置 - }, - togo () { - if(this.total && this.total > 10){ - this.pageVerify = true - this.pageSize = this.$store.getters.userInfo.configContent - }else { - this.pageVerify = false - } - this.getAdvice() - }, + checkTime (time) { + return moment(time.slice(0, 10)).diff(moment(), 'day') > -3 + }, + pageChange (page) { + this.page = page + this.pageSize = this.$store.getters.userInfo.configContent + this.getAdvice() + }, + // 分页每页显示数改变后方法 + pageSizeChange (pageSize) { + this.pageSize = this.$store.getters.userInfo.configContent + this.getAdvice() + // 此处需要调用接口,修改个人配置 + }, + togo () { + if(this.total && this.total > 10) { + this.pageVerify = true + this.pageSize = this.$store.getters.userInfo.configContent + }else { + this.pageVerify = false + } + this.getAdvice() + }, // 点击查看 handlePreview (item) { - let routeUrl = this.$router.resolve({ - name: 'OtherBussStandardDetails', - params: { - id: item.standardId, - pageType: 'BUSINESS_STAND' - } - }) - window.open(routeUrl.href, '_blank') + const routeUrl = this.$router.resolve({ + name: 'OtherBussStandardDetails', + params: { + id: item.standardId, + pageType: 'BUSINESS_STAND' + } + }) + window.open(routeUrl.href, '_blank') }, - //截取时间 + // 截取时间 getDate (date) { return date != null ? date.substring(0, date.indexOf(' ')) : '' }, - //获取数据 - getAdvice() { - this.loading = true - this.$http.get("/lawss/NewsFeed/getNewsFeed", { - messageType: 'QYBZFB', - page: this.page, - pageSize: this.pageSize - }, { - _this: this,loading: 'loading' - }, res => { - this.standardReleaseList = res.data.records - this.total = res.data.total - this.loading = false - }, e => { - this.loading = false - this.standardReleaseList = [] - this.total = 0 - }) + // 获取数据 + getAdvice () { + this.loading = true + this.$http.get('/lawss/NewsFeed/getNewsFeed', { + messageType: 'QYBZFB', + page: this.page, + pageSize: this.pageSize + }, { + _this: this, loading: 'loading' + }, res => { + this.standardReleaseList = res.data.records + this.total = res.data.total + this.loading = false + }, e => { + this.loading = false + this.standardReleaseList = [] + this.total = 0 + }) }, }, diff --git a/src/pages/home2/components/releaseQA/index.vue b/src/pages/home2/components/releaseQA/index.vue index 07b1729ca..62addd67d 100644 --- a/src/pages/home2/components/releaseQA/index.vue +++ b/src/pages/home2/components/releaseQA/index.vue @@ -1,51 +1,57 @@ @@ -55,7 +61,7 @@ export default { name: 'ReleaseQA', components: {}, mixins: [], - data() { + data () { return { loading: false, pageVerify: false, @@ -63,36 +69,36 @@ export default { total: 0, currentPage: 1, data: [], - form:{ - classification:"", // 类型 - problemDescription: "", // 问题描述 + form: { + classification: '', // 类型 + problemDescription: '', // 问题描述 }, } }, computed: {}, watch: {}, - mounted() { + mounted () { this.getDate() }, methods: { togo () { - this.$router.push({path:'/releaseQA2'}) + this.$router.push({ path: '/releaseQA2' }) }, handleClick (id) { this.$router.push({ - path:'/standQA', + path: '/standQA', query: { id } }) }, - getDate(){ + getDate () { this.loading = true - let form = this.form + const form = this.form form.userId = this.$store.getters.userInfo.account form.pageSize = this.pageSize form.page = this.currentPage - return new Promise((resolve,reject)=>{ - this.$http.get('lawss/AskQuestions/getAskQuestionsPage', form, {_this: this }, res => { - if(res.data){ + return new Promise((resolve, reject) => { + this.$http.get('lawss/AskQuestions/getAskQuestionsPage', form, { _this: this }, res => { + if(res.data) { const data = res.data this.data = data.records this.total = data.total @@ -101,6 +107,11 @@ export default { } this.loading = false resolve(res) + + if (res.data && res.data.records && res.data.records.length > 0) { + const isNew = res.data.records[0].threeDaysNew || false + this.$emit('isNew', isNew) + } }, e => { this.loading = false reject(e) diff --git a/src/pages/home2/components/releaseUs/index.vue b/src/pages/home2/components/releaseUs/index.vue index 34c8e8525..e8912e5ae 100644 --- a/src/pages/home2/components/releaseUs/index.vue +++ b/src/pages/home2/components/releaseUs/index.vue @@ -1,62 +1,68 @@ @@ -65,7 +71,7 @@ export default { name: 'ReleaseUs', components: {}, mixins: [], - data() { + data () { return { loading: false, pageVerify: false, @@ -73,49 +79,49 @@ export default { pageSize: 10, total: 0, putTime: '', - standardReleaseList: [], //标准发布数据 + standardReleaseList: [], // 标准发布数据 textStatusMap: {} // 标准状态id与name对应 } }, computed: {}, watch: {}, - mounted() { - this.$http.get('sys/dictype/getDicTypeListCode', '', { - _this: this - }, res => { - if (res.data.WBZTCLASS !== undefined && res.data.WBZTCLASS !== null){ - this.setMap(res.data.WBZTCLASS) // 标准状态 - } - }, e => { - }) + mounted () { + this.$http.get('sys/dictype/getDicTypeListCode', '', { + _this: this + }, res => { + if (res.data.WBZTCLASS !== undefined && res.data.WBZTCLASS !== null) { + this.setMap(res.data.WBZTCLASS) // 标准状态 + } + }, e => { + }) this.getDate() this.getAdvice() // this.addDate() }, methods: { - pageChange(page) { - this.page = page - this.pageSize = this.$store.getters.userInfo.configContent - this.getAdvice() - }, - // 分页每页显示数改变后方法 - pageSizeChange(pageSize) { - this.pageSize = this.$store.getters.userInfo.configContent - this.getAdvice() - // 此处需要调用接口,修改个人配置 - }, - togo () { - this.$router.push({path:'/releaseUs2'}) - }, - // 将标准状态的id与name对应 - setMap(data) { - data.forEach(item => { - this.$set(this.textStatusMap, item.value, item.label) - }) - }, + pageChange (page) { + this.page = page + this.pageSize = this.$store.getters.userInfo.configContent + this.getAdvice() + }, + // 分页每页显示数改变后方法 + pageSizeChange (pageSize) { + this.pageSize = this.$store.getters.userInfo.configContent + this.getAdvice() + // 此处需要调用接口,修改个人配置 + }, + togo () { + this.$router.push({ path: '/releaseUs2' }) + }, + // 将标准状态的id与name对应 + setMap (data) { + data.forEach(item => { + this.$set(this.textStatusMap, item.value, item.label) + }) + }, // 点击查看 handlePreview (item) { - let routeUrl = this.$router.resolve({ + const routeUrl = this.$router.resolve({ name: 'OtherStandardDetails', params: { id: item.standardId, @@ -124,28 +130,28 @@ export default { }) window.open(routeUrl.href, '_blank') }, - //截取时间 + // 截取时间 getDate (date) { return date != null ? date.substring(0, date.indexOf(' ')) : '' }, - //获取数据 - getAdvice() { - this.loading = true - this.$http.get("/lawss/NewsFeed/getNewsFeed", { - messageType: 'ZYBZFG', - page: this.page, - pageSize: this.pageSize - }, { - _this: this,loading: 'loading' - }, res => { - this.standardReleaseList = res.data.records - this.total = res.data.total - this.loading = false - }, e => { - this.loading = false - this.standardReleaseList = [] - this.total = 0 - }) + // 获取数据 + getAdvice () { + this.loading = true + this.$http.get('/lawss/NewsFeed/getNewsFeed', { + messageType: 'ZYBZFG', + page: this.page, + pageSize: this.pageSize + }, { + _this: this, loading: 'loading' + }, res => { + this.standardReleaseList = res.data.records + this.total = res.data.total + this.loading = false + }, e => { + this.loading = false + this.standardReleaseList = [] + this.total = 0 + }) }, }, diff --git a/src/pages/home2/components/releaseZL/index.vue b/src/pages/home2/components/releaseZL/index.vue index b2a380590..43ef5b325 100644 --- a/src/pages/home2/components/releaseZL/index.vue +++ b/src/pages/home2/components/releaseZL/index.vue @@ -1,66 +1,66 @@ @@ -69,7 +69,7 @@ export default { name: 'ReleaseQA', components: {}, mixins: [], - data() { + data () { return { loading: false, pageVerify: false, @@ -77,76 +77,80 @@ export default { pageSize: this.$store.getters.userInfo.configContent, total: 0, putTime: '', - standardReleaseList: [], //标准问答数据 + standardReleaseList: [], // 标准问答数据 } }, computed: {}, watch: {}, - mounted() { + mounted () { this.getDate() this.getAdvice() // this.addDate() }, methods: { - pageChange(page) { - this.page = page - this.pageSize = this.$store.getters.userInfo.configContent - this.getAdvice() - }, - // 分页每页显示数改变后方法 - pageSizeChange(pageSize) { - this.pageSize = this.$store.getters.userInfo.configContent - this.getAdvice() - // 此处需要调用接口,修改个人配置 - }, - togo () { - this.$router.push({path:'/dataCenter'}) - }, + pageChange (page) { + this.page = page + this.pageSize = this.$store.getters.userInfo.configContent + this.getAdvice() + }, + // 分页每页显示数改变后方法 + pageSizeChange (pageSize) { + this.pageSize = this.$store.getters.userInfo.configContent + this.getAdvice() + // 此处需要调用接口,修改个人配置 + }, + togo () { + this.$router.push({ path: '/dataCenter' }) + }, // 点击查看 handlePreview (item) { - // let routeUrl = this.$router.resolve({ - // name: 'OtherBussStandardDetails', - // params: { - // id: item.standardId, - // pageType: 'BUSINESS_STAND' - // } - // }) - // window.open(routeUrl.href, '_blank') + // let routeUrl = this.$router.resolve({ + // name: 'OtherBussStandardDetails', + // params: { + // id: item.standardId, + // pageType: 'BUSINESS_STAND' + // } + // }) + // window.open(routeUrl.href, '_blank') }, - //截取时间 + // 截取时间 getDate (date) { return date != null ? date.substring(0, date.indexOf(' ')) : '' }, - toDetail(row){ + toDetail (row) { this.$router.push({ - name: "dataCenterDetail", + name: 'dataCenterDetail', query: { id: row.id } }); }, - //获取数据 - getAdvice() { - this.loading = true - // 模拟加载 - const timer = setInterval(() => { - this.loading = false - }, 2000) - console.log(timer) - let userInfo = JSON.parse(localStorage.getItem('userInfo')); - this.$http.get("fileMaterialCenter/file-material/getFileMaterialIndex", { - userId: userInfo.userId, - }, { - _this: this,loading: 'loading' - }, res => { - this.standardReleaseList = res.data - this.total = res.data.total - this.loading = false - }, e => { - this.loading = false - this.standardReleaseList = [] - this.total = 0 - }) + // 获取数据 + getAdvice () { + this.loading = true + // 模拟加载 + const timer = setInterval(() => { + this.loading = false + }, 2000) + console.log(timer) + const userInfo = JSON.parse(localStorage.getItem('userInfo')); + this.$http.get('fileMaterialCenter/file-material/getFileMaterialIndex', { + userId: userInfo.userId, + }, { + _this: this, loading: 'loading' + }, res => { + this.standardReleaseList = res.data + this.total = res.data.total + this.loading = false + if (res.data && res.data.length > 0) { + const isNew = res.data[0].threeDaysNew || false + this.$emit('isNew', isNew) + } + }, e => { + this.loading = false + this.standardReleaseList = [] + this.total = 0 + }) }, }, diff --git a/src/pages/home2/components/solicitopinions/index.vue b/src/pages/home2/components/solicitopinions/index.vue index 445ad0f5d..85feb6e86 100644 --- a/src/pages/home2/components/solicitopinions/index.vue +++ b/src/pages/home2/components/solicitopinions/index.vue @@ -1,41 +1,36 @@