This commit is contained in:
yanran200730
2022-12-29 15:07:51 +08:00
parent 5e9f44e5c4
commit 02e4b80ba1
5 changed files with 606 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
<template>
<div class="doc-circulation">
<keep-alive :include="['List']">
<component ref="component" :is="component" @change="onChange" :params="params" :instance="instance" :dict="dict"></component>
</keep-alive>
</div>
</template>
<script>
import List from './components/List'
export default {
name: 'AppVoteRecord',
label: '投票记录',
props: {
instance: Function,
dict: Object
},
data () {
return {
component: 'List',
params: {},
include: []
}
},
components: {
List
},
mounted () {
if (this.$route.query.isAdd === '1') {
this.component = 'Add'
}
},
methods: {
onChange (data) {
if (data.type === 'List') {
this.component = 'List'
this.params = data.params
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getList()
}
})
}
}
}
}
</script>
<style lang="scss">
.doc-circulation {
height: 100%;
background: #F3F6F9;
overflow: auto;
}
</style>

View File

@@ -0,0 +1,106 @@
<template>
<ai-list class="list">
<ai-title slot="title" title="投票记录" isShowBottomBorder :instance="instance"></ai-title>
<template slot="content">
<div class="content">
<ai-search-bar bottomBorder>
<template #left>
<el-date-picker
v-model="search.startDate"
type="date"
size="small"
value-format="yyyy-MM-DD"
placeholder="选择开始日期">
</el-date-picker>
<el-date-picker
v-model="search.endDate"
type="date"
size="small"
value-format="yyyy-MM-DD"
placeholder="选择结束日期">
</el-date-picker>
</template>
<template #right>
<el-input
v-model="search.name"
size="small"
placeholder="请输入视频名称"
clearable
v-throttle="() => {search.current = 1, getList()}"
@clear="search.current = 1, search.name = '', getList()"
suffix-icon="iconfont iconSearch">
</el-input>
</template>
</ai-search-bar>
<ai-table
:tableData="tableData"
:col-configs="colConfigs"
:total="total"
v-loading="loading"
style="margin-top: 16px;"
:current.sync="search.current"
:size.sync="search.size"
@getList="getList">
<el-table-column slot="options" width="120px" fixed="right" label="操作" align="center">
<template slot-scope="{ row }">
<div class="table-options">>
</div>
</template>
</el-table-column>
</ai-table>
</div>
</template>
</ai-list>
</template>
<script>
export default {
name: 'List',
props: {
instance: Function,
dict: Object
},
data () {
return {
search: {
current: 1,
size: 10,
startDate: '',
endDate: '',
name: ''
},
colConfigs: [
{ prop: 'name', label: '昵称' },
{ prop: 'fillingUserNames', align: 'center', label: '投票视频' },
{ prop: 'examineUserNames', align: 'center', label: '投票时间' }
],
tableData: [],
total: 0
}
},
created () {
this.getList()
},
methods: {
getList () {
this.instance.post(`/app/appassessmentscorev2examinegroup/list`, null, {
params: {
...this.search
}
}).then(res => {
if (res.code == 0) {
this.tableData = res.data.records
this.total = res.data.total
}
})
}
}
}
</script>
<style scoped lang="scss">
</style>