Browse Source

修改新闻管理列表样式;格式化代码

feature/yujt_analysis_pc
yujt 5 years ago
parent
commit
be59917bb8
  1. 78
      src/views/modules/case/typicalcase-list.vue
  2. 4
      src/views/modules/custom/evaluatedeptcount.vue
  3. 6
      src/views/modules/custom/gridoperatorinfo.vue
  4. 5
      src/views/modules/heart/actbanner.vue
  5. 2
      src/views/modules/heart/actinfo-list.vue
  6. 2
      src/views/modules/news/news-add-or-update.vue
  7. 8
      src/views/modules/news/news-healthy.vue
  8. 8
      src/views/modules/news/news-safety.vue
  9. 8
      src/views/modules/news/news-services.vue
  10. 8
      src/views/modules/news/news.vue
  11. 2
      src/views/modules/sys/deptmacode.vue

78
src/views/modules/case/typicalcase-list.vue

@ -71,7 +71,7 @@
import mixinViewModule from '@/mixins/view-module' import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './typicalcase-add-or-update' import AddOrUpdate from './typicalcase-add-or-update'
import CaseInfoDetailView from './typicalcase-detail' import CaseInfoDetailView from './typicalcase-detail'
import {debounce} from 'lodash' import { debounce } from 'lodash'
export default { export default {
mixins: [mixinViewModule], mixins: [mixinViewModule],
name: 'CaseInfoList', name: 'CaseInfoList',
@ -88,22 +88,22 @@ export default {
startTime: '', startTime: '',
endTime: '' endTime: ''
}, },
pickerBeginDateBefore: { pickerBeginDateBefore: {
disabledDate: (time) => { disabledDate: (time) => {
let beginDateVal = this.dataForm.startTime let beginDateVal = this.dataForm.startTime
if (beginDateVal) { if (beginDateVal) {
return time.getTime() > new Date(beginDateVal).getTime() return time.getTime() > new Date(beginDateVal).getTime()
} }
} }
}, },
pickerBeginDateAfter: { pickerBeginDateAfter: {
disabledDate: (time) => { disabledDate: (time) => {
let EndDateVal = this.dataForm.endTime let EndDateVal = this.dataForm.endTime
if (EndDateVal) { if (EndDateVal) {
return time.getTime() < new Date(EndDateVal).getTime() return time.getTime() < new Date(EndDateVal).getTime()
} }
}
} }
}
} }
}, },
components: { components: {
@ -120,17 +120,17 @@ export default {
}, },
formatState: function (row, column) { formatState: function (row, column) {
let state = row.state let state = row.state
if (state == 1) { if (state === 1) {
return '上架' return '上架'
} else if (state == 0) { } else if (state === 0) {
return '下架' return '下架'
} }
}, },
changeGroundingText(state){ changeGroundingText (state) {
let status = state let status = state
if (status == 1) { if (status === 1) {
return '下架' return '下架'
} else if (status == 0) { } else if (status === 0) {
return '上架' return '上架'
} }
}, },
@ -139,25 +139,25 @@ export default {
this.$router.push({ path: '/case-typicalcase' }) this.$router.push({ path: '/case-typicalcase' })
}, },
changeGroundingHandle: debounce(function (row) { changeGroundingHandle: debounce(function (row) {
this.$confirm(this.$t('prompt.info', { 'handle': this.changeGroundingText(row.state) }), this.$t('prompt.title'), { this.$confirm(this.$t('prompt.info', { 'handle': this.changeGroundingText(row.state) }), this.$t('prompt.title'), {
confirmButtonText: this.$t('confirm'), confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t('cancel'), cancelButtonText: this.$t('cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$http.get(`/cloudAnalysis/typicalcase/updateState/${row.id}`).then(({ data: res }) => { this.$http.get(`/cloudAnalysis/typicalcase/updateState/${row.id}`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
this.$message({ this.$message({
message: this.$t('prompt.success'), message: this.$t('prompt.success'),
type: 'success', type: 'success',
duration: 500, duration: 500,
onClose: () => { onClose: () => {
this.getDataList() this.getDataList()
} }
}) })
}).catch(() => {})
}).catch(() => {}) }).catch(() => {})
}).catch(() => {})
}, 1000, { 'leading': true, 'trailing': false }) }, 1000, { 'leading': true, 'trailing': false })
} }
} }

4
src/views/modules/custom/evaluatedeptcount.vue

@ -78,7 +78,7 @@
<script> <script>
import mixinViewModule from '@/mixins/view-module' import mixinViewModule from '@/mixins/view-module'
import EvaluateOfficerCountList from './evaluateofficercount' // import EvaluateOfficerCountList from './evaluateofficercount'
export default { export default {
mixins: [mixinViewModule], mixins: [mixinViewModule],
name: 'EvaluateDeptCountList', name: 'EvaluateDeptCountList',
@ -114,7 +114,7 @@ export default {
} }
}, },
created: function () { created: function () {
this.getDataList(); this.getDataList()
}, },
methods: { methods: {
officerAction (deptId) { officerAction (deptId) {

6
src/views/modules/custom/gridoperatorinfo.vue

@ -165,17 +165,17 @@ export default {
}, },
watch: { watch: {
'ids': function (val) { 'ids': function (val) {
if (val.length == 0 || val.length == 1) { if (val.length === 0 || val.length === 1) {
this.dataForm.streetId = val[0] this.dataForm.streetId = val[0]
this.dataForm.communityId = '' this.dataForm.communityId = ''
this.dataForm.gridId = '' this.dataForm.gridId = ''
} }
if (val.length == 2) { if (val.length === 2) {
this.dataForm.streetId = '' this.dataForm.streetId = ''
this.dataForm.communityId = val[1] this.dataForm.communityId = val[1]
this.dataForm.gridId = '' this.dataForm.gridId = ''
} }
if (val.length == 3) { if (val.length === 3) {
this.dataForm.streetId = '' this.dataForm.streetId = ''
this.dataForm.communityId = '' this.dataForm.communityId = ''
this.dataForm.gridId = val[2] this.dataForm.gridId = val[2]

5
src/views/modules/heart/actbanner.vue

@ -64,7 +64,7 @@
<script> <script>
import mixinViewModule from '@/mixins/view-module' import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './actbanner-add-or-update' import AddOrUpdate from './actbanner-add-or-update'
import {debounce} from 'lodash' import { debounce } from 'lodash'
export default { export default {
mixins: [mixinViewModule], mixins: [mixinViewModule],
data () { data () {
@ -86,7 +86,7 @@ export default {
AddOrUpdate AddOrUpdate
}, },
methods: { methods: {
changeGroundingText(status){ changeGroundingText (status) {
let state = status let state = status
if (state === '1') { if (state === '1') {
return '下架' return '下架'
@ -104,7 +104,6 @@ export default {
}, },
changeGroundingHandle: debounce(function (row) { changeGroundingHandle: debounce(function (row) {
this.$confirm(this.$t('prompt.info', { 'handle': this.changeGroundingText(row.status) }), this.$t('prompt.title'), { this.$confirm(this.$t('prompt.info', { 'handle': this.changeGroundingText(row.status) }), this.$t('prompt.title'), {
confirmButtonText: this.$t('confirm'), confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t('cancel'), cancelButtonText: this.$t('cancel'),

2
src/views/modules/heart/actinfo-list.vue

@ -144,7 +144,7 @@ export default {
addAction () { addAction () {
this.$parent.selectComponent = 'ActInfoAdd' this.$parent.selectComponent = 'ActInfoAdd'
this.$router.push( this.$router.push(
{ path: '/heart-actinfo'} { path: '/heart-actinfo' }
) )
}, },
joinManage (id) { joinManage (id) {

2
src/views/modules/news/news-add-or-update.vue

@ -288,7 +288,7 @@ export default {
this.dataForm.newsReleaseEndTime = this.time[1] this.dataForm.newsReleaseEndTime = this.time[1]
if (new Date(this.dataForm.newsReleaseEndTime) < new Date()) { if (new Date(this.dataForm.newsReleaseEndTime) < new Date()) {
this.dataForm.newsUpDownState = '1' this.dataForm.newsUpDownState = '1'
} else if (this.newsUpDownStateOld == '0'){ } else if (this.newsUpDownStateOld === '0') {
this.dataForm.newsUpDownState = '0' this.dataForm.newsUpDownState = '0'
} }
}, },

8
src/views/modules/news/news-healthy.vue

@ -66,24 +66,24 @@
</el-table-column> </el-table-column>
<el-table-column prop="newsTitle" <el-table-column prop="newsTitle"
label="文章标题" label="文章标题"
width="450px" width="500px"
header-align="center" header-align="center"
min-width="400px" min-width="400px"
show-overflow-tooltip show-overflow-tooltip
align="left"></el-table-column> align="left"></el-table-column>
<el-table-column prop="readingAmount" <el-table-column prop="readingAmount"
label="阅读量" label="阅读量"
width="40px" width="80px"
header-align="center" header-align="center"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="likeNumber" <el-table-column prop="likeNumber"
label="支持数" label="支持数"
width="40px" width="80px"
header-align="center" header-align="center"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="unLikeNumber" <el-table-column prop="unLikeNumber"
label="不支持数" label="不支持数"
width="40px" width="80px"
header-align="center" header-align="center"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="createdTime" <el-table-column prop="createdTime"

8
src/views/modules/news/news-safety.vue

@ -66,24 +66,24 @@
</el-table-column> </el-table-column>
<el-table-column prop="newsTitle" <el-table-column prop="newsTitle"
label="文章标题" label="文章标题"
width="450px" width="500px"
header-align="center" header-align="center"
min-width="400px" min-width="400px"
show-overflow-tooltip show-overflow-tooltip
align="left"></el-table-column> align="left"></el-table-column>
<el-table-column prop="readingAmount" <el-table-column prop="readingAmount"
label="阅读量" label="阅读量"
width="40px" width="80px"
header-align="center" header-align="center"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="likeNumber" <el-table-column prop="likeNumber"
label="支持数" label="支持数"
width="40px" width="80px"
header-align="center" header-align="center"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="unLikeNumber" <el-table-column prop="unLikeNumber"
label="不支持数" label="不支持数"
width="40px" width="80px"
header-align="center" header-align="center"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="createdTime" <el-table-column prop="createdTime"

8
src/views/modules/news/news-services.vue

@ -66,24 +66,24 @@
</el-table-column> </el-table-column>
<el-table-column prop="newsTitle" <el-table-column prop="newsTitle"
label="文章标题" label="文章标题"
width="450px" width="500px"
header-align="center" header-align="center"
min-width="400px" min-width="400px"
show-overflow-tooltip show-overflow-tooltip
align="left"></el-table-column> align="left"></el-table-column>
<el-table-column prop="readingAmount" <el-table-column prop="readingAmount"
label="阅读量" label="阅读量"
width="40px" width="80px"
header-align="center" header-align="center"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="likeNumber" <el-table-column prop="likeNumber"
label="支持数" label="支持数"
width="40px" width="80px"
header-align="center" header-align="center"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="unLikeNumber" <el-table-column prop="unLikeNumber"
label="不支持数" label="不支持数"
width="40px" width="80px"
header-align="center" header-align="center"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="createdTime" <el-table-column prop="createdTime"

8
src/views/modules/news/news.vue

@ -66,24 +66,24 @@
</el-table-column> </el-table-column>
<el-table-column prop="newsTitle" <el-table-column prop="newsTitle"
label="标题名称" label="标题名称"
width="450px" width="500px"
header-align="center" header-align="center"
min-width="400px" min-width="400px"
show-overflow-tooltip show-overflow-tooltip
align="left"></el-table-column> align="left"></el-table-column>
<el-table-column prop="readingAmount" <el-table-column prop="readingAmount"
label="阅读量" label="阅读量"
width="40px" width="80px"
header-align="center" header-align="center"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="likeNumber" <el-table-column prop="likeNumber"
label="支持数" label="支持数"
width="40px" width="80px"
header-align="center" header-align="center"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="unLikeNumber" <el-table-column prop="unLikeNumber"
label="不支持数" label="不支持数"
width="40px" width="80px"
header-align="center" header-align="center"
align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="createdTime" <el-table-column prop="createdTime"

2
src/views/modules/sys/deptmacode.vue

@ -329,7 +329,7 @@ export default {
uploadSuccess (response, file, fileList) { uploadSuccess (response, file, fileList) {
this.$refs.upload.clearFiles() this.$refs.upload.clearFiles()
if (response.code !== 0) { if (response.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(response.msg)
} }
this.$message({ this.$message({
message: this.$t('prompt.success'), message: this.$t('prompt.success'),

Loading…
Cancel
Save