151 lines
6.0 KiB
HTML
151 lines
6.0 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
|
|
<div id="app" v-cloak>
|
|
<guava ref="guava">
|
|
<template>
|
|
<el-card shadow="never">
|
|
<div class="search">
|
|
<div class="search-item">
|
|
<div class="search-item-label">年度:</div>
|
|
<div class="search-item-option">
|
|
<el-date-picker
|
|
placeholder="选择年度"
|
|
style="width: 100%"
|
|
type="year"
|
|
v-model="pageForm.year"
|
|
value-format="yyyy">
|
|
</el-date-picker>
|
|
</div>
|
|
</div>
|
|
<div class="search-item">
|
|
<div class="search-item-label">主题名称:</div>
|
|
<div class="search-item-option">
|
|
<el-input clearable maxlength="50" v-model="pageForm.subjectName"></el-input>
|
|
</div>
|
|
</div>
|
|
<div class="search-query">
|
|
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
|
|
<el-card class="mt10" shadow="never">
|
|
<table-tool :app="this" label="建言献策">
|
|
<template #func>
|
|
</template>
|
|
</table-tool>
|
|
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
|
align="center"
|
|
header-align="center">
|
|
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号" type="index"
|
|
width="80px"></el-table-column>
|
|
<el-table-column
|
|
:label="column.label"
|
|
:prop="column.prop"
|
|
:sortable="column.sortable"
|
|
align="center"
|
|
header-align="center"
|
|
show-overflow-tooltip
|
|
v-for="column in tableColumns"
|
|
>
|
|
<template scope="{row}" v-if="column.prop=='subjectName'">
|
|
<el-link @click="openView(row.id)" type="primary">{{ row.subjectName }}</el-link>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="操作" width="250px">
|
|
<template scope="{row}">
|
|
<el-button @click="openView(row.id)" size="mini" type="primary">查看</el-button>
|
|
<el-button @click="openEdit(row.id)" size="mini" type="primary" v-if="row.stateCode===3000">
|
|
编辑
|
|
</el-button>
|
|
<!-- <el-button @click="doSubmit(row.id)" size="mini" type="primary">提交</el-button>-->
|
|
<el-button @click="doDelete(row.id)" size="mini" type="danger" v-if="row.stateCode===3000">
|
|
删除
|
|
</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<!--#include("/layouts/pagination.html"){}#-->
|
|
</el-card>
|
|
</template>
|
|
|
|
<template #view>
|
|
<offer-advice-info ref="offerAdviceView"></offer-advice-info>
|
|
</template>
|
|
|
|
</guava>
|
|
</div>
|
|
|
|
<script>
|
|
var vue = new Vue({
|
|
el: '#app',
|
|
mixins: [initTableMixins],
|
|
components: {
|
|
'offer-advice-info': httpVueLoader('/components/offerAdvice/OfferAdviceInfo.vue')
|
|
},
|
|
data() {
|
|
return {
|
|
typeOptions: [],
|
|
pageForm: {
|
|
subjectName: null,
|
|
year: null
|
|
},
|
|
tableColumns: [
|
|
{label: '主题', prop: 'subjectName'},
|
|
{label: '时间', prop: 'createTime'},
|
|
{label: '类型', prop: 'typeName'},
|
|
{label: '状态', prop: 'stateName'},
|
|
]
|
|
}
|
|
},
|
|
methods: {
|
|
openView(id) {
|
|
this.$refs.guava.view()
|
|
this.$refs.offerAdviceView.openView(id)
|
|
},
|
|
openEdit(id) {
|
|
sublime.jumpPagePjax('/platform/offerAdviceWrite?id=' + id)
|
|
},
|
|
async doSubmit(id) {
|
|
const confirm = await this.$confirm('您确定要提交吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
})
|
|
if (confirm !== 'confirm') return
|
|
const resp = await $.post(loc() + '/doSubmit/' + id)
|
|
if (resp.code === 0) {
|
|
this.pageData()
|
|
this.notifySuccess(resp.msg)
|
|
} else {
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
|
|
},
|
|
async doDelete(id) {
|
|
const confirm = await this.$confirm('您确定要删除吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
})
|
|
if (confirm !== 'confirm') return
|
|
const resp = await $.post(loc() + '/doDelete/' + id)
|
|
if (resp.code === 0) {
|
|
this.doSearch()
|
|
this.notifySuccess(resp.msg)
|
|
} else {
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
}
|
|
},
|
|
async created() {
|
|
this.pageData()
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<!--#
|
|
}
|
|
#--> |