Browse Source

新增数据总览模块:最新(热)话题,最新(热)议题,最热项目

master
尹作梅 6 years ago
parent
commit
11b40b1a53
  1. 154
      src/views/modules/analysis/issue/hottest-issue.vue
  2. 154
      src/views/modules/analysis/issue/latest-issue.vue
  3. 154
      src/views/modules/analysis/item/hottest-item.vue
  4. 153
      src/views/modules/analysis/topic/hottest-topic.vue
  5. 153
      src/views/modules/analysis/topic/latest-topic.vue

154
src/views/modules/analysis/issue/hottest-issue.vue

@ -0,0 +1,154 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-news__topic}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item label="所属机构">
<el-cascader v-model="ids" :options="options" :props="{ checkStrictly: true }" clearable>
</el-cascader>
</el-form-item>
<el-form-item label="议题摘要" prop="topicContent">
<el-input v-model="dataForm.issueContent" placeholder="" clearable ></el-input>
</el-form-item>
<el-form-item label="时间"
prop="startTime">
<el-date-picker v-model="dataForm.startTime"
type="date"
:picker-options="pickerBeginDateBefore"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="至"
label-width="25px"
prop="endTime">
<el-date-picker v-model="dataForm.endTime"
type="date"
:picker-options="pickerBeginDateAfter"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('epdc:topic:export')" type="primary" @click="exportHandle()">{{ $t('export') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column label="序号" type="index" show-overflow-tooltip align="center" width="50"></el-table-column>
<el-table-column prop="issueContent" label="议题摘要" header-align="center" align="center"></el-table-column>
<el-table-column prop="allDeptNames" label="来源网格" header-align="center" align="center"></el-table-column>
<el-table-column prop="nickName" label="发言人" header-align="center" align="center"></el-table-column>
<el-table-column prop="releaseTime" label="发布时间" header-align="center" align="center"></el-table-column>
<el-table-column prop="approveNum" label="支持总数" header-align="center" align="center"></el-table-column>
<el-table-column prop="opposeNum" label="反对总数" header-align="center" align="center"></el-table-column>
<el-table-column prop="commentNum" label="评论总数" header-align="center" align="center"></el-table-column>
<el-table-column prop="browseNum" label="浏览总数" header-align="center" align="center"></el-table-column>
<el-table-column prop="expressAttitudeNum" label="表达态度总数" header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="look(scope.row.id)">{{ $t('look') }}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/analysis/issue/pageHottestIssue',
getDataListIsPage: true
},
closeVisible: false,
dataForm: {
id: '',
streetId: '',
communityId: '',
gridId: '',
startTime: '',
endTime: '',
topicContent: ''
},
pickerBeginDateBefore: {
disabledDate: (time) => {
let beginDateVal = this.dataForm.startTime
if (beginDateVal) {
return time.getTime() > new Date(beginDateVal).getTime()
}
}
},
pickerBeginDateAfter: {
disabledDate: (time) => {
let EndDateVal = this.dataForm.endTime
if (EndDateVal) {
return time.getTime() < new Date(EndDateVal).getTime()
}
}
},
ids: [],
options: []
}
},
components: {
},
created: function () {
this.getOptions()
},
watch: {
'ids': function (val) {
if (val.length === 0) {
this.dataForm.streetId = ''
this.dataForm.communityId = ''
this.dataForm.gridId = ''
}
if (val.length === 1) {
this.dataForm.streetId = this.ids[0]
this.dataForm.communityId = ''
this.dataForm.gridId = ''
}
if (val.length === 2) {
this.dataForm.streetId = this.ids[0]
this.dataForm.communityId = this.ids[1]
this.dataForm.gridId = ''
}
if (val.length === 3) {
this.dataForm.streetId = this.ids[0]
this.dataForm.communityId = this.ids[1]
this.dataForm.gridId = this.ids[2]
}
}
},
methods: {
getOptions () {
this.$http.get(`/sys/user/deptOptions/getByLoginUser`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
}).catch(() => {})
},
look (id) {
// this.$parent.selectComponent = 'TopicDetail'
// this.$router.push({ path: '/group-topic', query: { id: id } })
}
}
}
</script>

154
src/views/modules/analysis/issue/latest-issue.vue

@ -0,0 +1,154 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-news__topic}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item label="所属机构">
<el-cascader v-model="ids" :options="options" :props="{ checkStrictly: true }" clearable>
</el-cascader>
</el-form-item>
<el-form-item label="议题摘要" prop="topicContent">
<el-input v-model="dataForm.issueContent" placeholder="" clearable ></el-input>
</el-form-item>
<el-form-item label="时间"
prop="startTime">
<el-date-picker v-model="dataForm.startTime"
type="date"
:picker-options="pickerBeginDateBefore"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="至"
label-width="25px"
prop="endTime">
<el-date-picker v-model="dataForm.endTime"
type="date"
:picker-options="pickerBeginDateAfter"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('epdc:topic:export')" type="primary" @click="exportHandle()">{{ $t('export') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column label="序号" type="index" show-overflow-tooltip align="center" width="50"></el-table-column>
<el-table-column prop="issueContent" label="议题摘要" header-align="center" align="center"></el-table-column>
<el-table-column prop="allDeptNames" label="来源网格" header-align="center" align="center"></el-table-column>
<el-table-column prop="nickName" label="发言人" header-align="center" align="center"></el-table-column>
<el-table-column prop="releaseTime" label="发布时间" header-align="center" align="center"></el-table-column>
<el-table-column prop="approveNum" label="支持总数" header-align="center" align="center"></el-table-column>
<el-table-column prop="opposeNum" label="反对总数" header-align="center" align="center"></el-table-column>
<el-table-column prop="commentNum" label="评论总数" header-align="center" align="center"></el-table-column>
<el-table-column prop="browseNum" label="浏览总数" header-align="center" align="center"></el-table-column>
<el-table-column prop="expressAttitudeNum" label="表达态度总数" header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="look(scope.row.id)">{{ $t('look') }}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/analysis/issue/pageLatestIssue',
getDataListIsPage: true
},
closeVisible: false,
dataForm: {
id: '',
streetId: '',
communityId: '',
gridId: '',
startTime: '',
endTime: '',
topicContent: ''
},
pickerBeginDateBefore: {
disabledDate: (time) => {
let beginDateVal = this.dataForm.startTime
if (beginDateVal) {
return time.getTime() > new Date(beginDateVal).getTime()
}
}
},
pickerBeginDateAfter: {
disabledDate: (time) => {
let EndDateVal = this.dataForm.endTime
if (EndDateVal) {
return time.getTime() < new Date(EndDateVal).getTime()
}
}
},
ids: [],
options: []
}
},
components: {
},
created: function () {
this.getOptions()
},
watch: {
'ids': function (val) {
if (val.length === 0) {
this.dataForm.streetId = ''
this.dataForm.communityId = ''
this.dataForm.gridId = ''
}
if (val.length === 1) {
this.dataForm.streetId = this.ids[0]
this.dataForm.communityId = ''
this.dataForm.gridId = ''
}
if (val.length === 2) {
this.dataForm.streetId = this.ids[0]
this.dataForm.communityId = this.ids[1]
this.dataForm.gridId = ''
}
if (val.length === 3) {
this.dataForm.streetId = this.ids[0]
this.dataForm.communityId = this.ids[1]
this.dataForm.gridId = this.ids[2]
}
}
},
methods: {
getOptions () {
this.$http.get(`/sys/user/deptOptions/getByLoginUser`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
}).catch(() => {})
},
look (id) {
// this.$parent.selectComponent = 'TopicDetail'
// this.$router.push({ path: '/group-topic', query: { id: id } })
}
}
}
</script>

154
src/views/modules/analysis/item/hottest-item.vue

@ -0,0 +1,154 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-news__topic}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item label="所属机构">
<el-cascader v-model="ids" :options="options" :props="{ checkStrictly: true }" clearable>
</el-cascader>
</el-form-item>
<el-form-item label="项目摘要" prop="topicContent">
<el-input v-model="dataForm.searchContent" placeholder="" clearable ></el-input>
</el-form-item>
<el-form-item label="时间"
prop="startTime">
<el-date-picker v-model="dataForm.startTime"
type="date"
:picker-options="pickerBeginDateBefore"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="至"
label-width="25px"
prop="endTime">
<el-date-picker v-model="dataForm.endTime"
type="date"
:picker-options="pickerBeginDateAfter"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('epdc:topic:export')" type="primary" @click="exportHandle()">{{ $t('export') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column label="序号" type="index" show-overflow-tooltip align="center" width="50"></el-table-column>
<el-table-column prop="itemContent" label="项目摘要" header-align="center" align="center"></el-table-column>
<el-table-column prop="allDeptNames" label="来源网格" header-align="center" align="center"></el-table-column>
<el-table-column prop="nickName" label="发言人" header-align="center" align="center"></el-table-column>
<el-table-column prop="releaseTime" label="发布时间" header-align="center" align="center"></el-table-column>
<el-table-column prop="approveNum" label="支持总数" header-align="center" align="center"></el-table-column>
<el-table-column prop="opposeNum" label="反对总数" header-align="center" align="center"></el-table-column>
<el-table-column prop="commentNum" label="评论总数" header-align="center" align="center"></el-table-column>
<el-table-column prop="browseNum" label="浏览总数" header-align="center" align="center"></el-table-column>
<el-table-column prop="expressAttitudeNum" label="表达态度总数" header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="look(scope.row.id)">{{ $t('look') }}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/analysis/item/pageHottestItem',
getDataListIsPage: true
},
closeVisible: false,
dataForm: {
id: '',
streetId: '',
communityId: '',
gridId: '',
startTime: '',
endTime: '',
searchContent: ''
},
pickerBeginDateBefore: {
disabledDate: (time) => {
let beginDateVal = this.dataForm.startTime
if (beginDateVal) {
return time.getTime() > new Date(beginDateVal).getTime()
}
}
},
pickerBeginDateAfter: {
disabledDate: (time) => {
let EndDateVal = this.dataForm.endTime
if (EndDateVal) {
return time.getTime() < new Date(EndDateVal).getTime()
}
}
},
ids: [],
options: []
}
},
components: {
},
created: function () {
this.getOptions()
},
watch: {
'ids': function (val) {
if (val.length === 0) {
this.dataForm.streetId = ''
this.dataForm.communityId = ''
this.dataForm.gridId = ''
}
if (val.length === 1) {
this.dataForm.streetId = this.ids[0]
this.dataForm.communityId = ''
this.dataForm.gridId = ''
}
if (val.length === 2) {
this.dataForm.streetId = this.ids[0]
this.dataForm.communityId = this.ids[1]
this.dataForm.gridId = ''
}
if (val.length === 3) {
this.dataForm.streetId = this.ids[0]
this.dataForm.communityId = this.ids[1]
this.dataForm.gridId = this.ids[2]
}
}
},
methods: {
getOptions () {
this.$http.get(`/sys/user/deptOptions/getByLoginUser`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
}).catch(() => {})
},
look (id) {
// this.$parent.selectComponent = 'TopicDetail'
// this.$router.push({ path: '/group-topic', query: { id: id } })
}
}
}
</script>

153
src/views/modules/analysis/topic/hottest-topic.vue

@ -0,0 +1,153 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-news__topic}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item label="所属机构">
<el-cascader v-model="ids" :options="options" :props="{ checkStrictly: true }" clearable>
</el-cascader>
</el-form-item>
<el-form-item label="话题摘要" prop="topicContent">
<el-input v-model="dataForm.topicContent" placeholder="" clearable ></el-input>
</el-form-item>
<el-form-item label="时间"
prop="startTime">
<el-date-picker v-model="dataForm.startTime"
type="date"
:picker-options="pickerBeginDateBefore"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="至"
label-width="25px"
prop="endTime">
<el-date-picker v-model="dataForm.endTime"
type="date"
:picker-options="pickerBeginDateAfter"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('epdc:topic:export')" type="primary" @click="exportHandle()">{{ $t('export') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column label="序号" type="index" show-overflow-tooltip align="center" width="50"></el-table-column>
<el-table-column prop="topicContent" label="话题摘要" header-align="center" align="center"></el-table-column>
<el-table-column prop="allDeptNames" label="来源网格" header-align="center" align="center"></el-table-column>
<el-table-column prop="groupName" label="话题来源群名称" header-align="center" align="center"></el-table-column>
<el-table-column prop="nickName" label="发言人" header-align="center" align="center"></el-table-column>
<el-table-column prop="releaseTime" label="发布时间" header-align="center" align="center"></el-table-column>
<el-table-column prop="commentNum" label="评论数" header-align="center" align="center"></el-table-column>
<el-table-column prop="browseNum" label="浏览数" header-align="center" align="center"></el-table-column>
<el-table-column prop="expressAttitudeNum" label="表达态度总数" header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="look(scope.row.id)">{{ $t('look') }}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/analysis/topic/pageHottestTopic',
getDataListIsPage: true
},
closeVisible: false,
dataForm: {
id: '',
streetId: '',
communityId: '',
gridId: '',
startTime: '',
endTime: '',
topicContent: ''
},
pickerBeginDateBefore: {
disabledDate: (time) => {
let beginDateVal = this.dataForm.startTime
if (beginDateVal) {
return time.getTime() > new Date(beginDateVal).getTime()
}
}
},
pickerBeginDateAfter: {
disabledDate: (time) => {
let EndDateVal = this.dataForm.endTime
if (EndDateVal) {
return time.getTime() < new Date(EndDateVal).getTime()
}
}
},
ids: [],
options: []
}
},
components: {
},
created: function () {
this.getOptions()
},
watch: {
'ids': function (val) {
if (val.length === 0) {
this.dataForm.streetId = ''
this.dataForm.communityId = ''
this.dataForm.gridId = ''
}
if (val.length === 1) {
this.dataForm.streetId = this.ids[0]
this.dataForm.communityId = ''
this.dataForm.gridId = ''
}
if (val.length === 2) {
this.dataForm.streetId = this.ids[0]
this.dataForm.communityId = this.ids[1]
this.dataForm.gridId = ''
}
if (val.length === 3) {
this.dataForm.streetId = this.ids[0]
this.dataForm.communityId = this.ids[1]
this.dataForm.gridId = this.ids[2]
}
}
},
methods: {
getOptions () {
this.$http.get(`/sys/user/deptOptions/getByLoginUser`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
}).catch(() => {})
},
look (id) {
// this.$parent.selectComponent = 'TopicDetail'
// this.$router.push({ path: '/group-topic', query: { id: id } })
}
}
}
</script>

153
src/views/modules/analysis/topic/latest-topic.vue

@ -0,0 +1,153 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-news__topic}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item label="所属机构">
<el-cascader v-model="ids" :options="options" :props="{ checkStrictly: true }" clearable>
</el-cascader>
</el-form-item>
<el-form-item label="话题摘要" prop="topicContent">
<el-input v-model="dataForm.topicContent" placeholder="" clearable ></el-input>
</el-form-item>
<el-form-item label="时间"
prop="startTime">
<el-date-picker v-model="dataForm.startTime"
type="date"
:picker-options="pickerBeginDateBefore"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item label="至"
label-width="25px"
prop="endTime">
<el-date-picker v-model="dataForm.endTime"
type="date"
:picker-options="pickerBeginDateAfter"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期时间">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button v-if="$hasPermission('epdc:topic:export')" type="primary" @click="exportHandle()">{{ $t('export') }}</el-button>
</el-form-item>
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
<el-table-column label="序号" type="index" show-overflow-tooltip align="center" width="50"></el-table-column>
<el-table-column prop="topicContent" label="话题摘要" header-align="center" align="center"></el-table-column>
<el-table-column prop="allDeptNames" label="来源网格" header-align="center" align="center"></el-table-column>
<el-table-column prop="groupName" label="话题来源群名称" header-align="center" align="center"></el-table-column>
<el-table-column prop="nickName" label="发言人" header-align="center" align="center"></el-table-column>
<el-table-column prop="releaseTime" label="发布时间" header-align="center" align="center"></el-table-column>
<el-table-column prop="commentNum" label="评论数" header-align="center" align="center"></el-table-column>
<el-table-column prop="browseNum" label="浏览数" header-align="center" align="center"></el-table-column>
<el-table-column prop="expressAttitudeNum" label="表达态度总数" header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="look(scope.row.id)">{{ $t('look') }}</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
</el-pagination>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/analysis/topic/pageLatestTopic',
getDataListIsPage: true
},
closeVisible: false,
dataForm: {
id: '',
streetId: '',
communityId: '',
gridId: '',
startTime: '',
endTime: '',
topicContent: ''
},
pickerBeginDateBefore: {
disabledDate: (time) => {
let beginDateVal = this.dataForm.startTime
if (beginDateVal) {
return time.getTime() > new Date(beginDateVal).getTime()
}
}
},
pickerBeginDateAfter: {
disabledDate: (time) => {
let EndDateVal = this.dataForm.endTime
if (EndDateVal) {
return time.getTime() < new Date(EndDateVal).getTime()
}
}
},
ids: [],
options: []
}
},
components: {
},
created: function () {
this.getOptions()
},
watch: {
'ids': function (val) {
if (val.length === 0) {
this.dataForm.streetId = ''
this.dataForm.communityId = ''
this.dataForm.gridId = ''
}
if (val.length === 1) {
this.dataForm.streetId = this.ids[0]
this.dataForm.communityId = ''
this.dataForm.gridId = ''
}
if (val.length === 2) {
this.dataForm.streetId = this.ids[0]
this.dataForm.communityId = this.ids[1]
this.dataForm.gridId = ''
}
if (val.length === 3) {
this.dataForm.streetId = this.ids[0]
this.dataForm.communityId = this.ids[1]
this.dataForm.gridId = this.ids[2]
}
}
},
methods: {
getOptions () {
this.$http.get(`/sys/user/deptOptions/getByLoginUser`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.options = res.data.options
}).catch(() => {})
},
look (id) {
// this.$parent.selectComponent = 'TopicDetail'
// this.$router.push({ path: '/group-topic', query: { id: id } })
}
}
}
</script>
Loading…
Cancel
Save