172 lines
7.3 KiB
HTML
172 lines
7.3 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
|
|
@change="doSearch"
|
|
formData="yyyy"
|
|
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-select @change="doSearch" clearable="true"
|
|
filterable="true"
|
|
placeholder="所属工会"
|
|
style="width: 100%;"
|
|
v-model="pageForm.unionId">
|
|
<el-option :label="item.unionname" :value="item.id"
|
|
v-for="item in unions"></el-option>
|
|
</el-select>
|
|
</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="申报列表">
|
|
</table-tool>
|
|
|
|
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" class="vi-table"
|
|
ref="table"
|
|
row-key="id" style="width: 100%" v-loading="tableLoading">
|
|
<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"
|
|
>
|
|
</el-table-column>
|
|
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
|
width="150px">
|
|
<template scope="{row}">
|
|
<el-button @click="openView(row)"
|
|
size="mini" type="primary"
|
|
v-if="![8100].includes(row.state) && row.state">查看
|
|
</el-button>
|
|
<el-button @click="openEdit(row)"
|
|
size="mini" type="primary"
|
|
v-if="[8100,8125].includes(row.state) || !row.state">编辑
|
|
</el-button>
|
|
<el-button @click="doDelete(row)"
|
|
size="mini" type="danger"
|
|
v-if="[8100].includes(row.state) || !row.state">删除
|
|
</el-button>
|
|
<el-button @click="doDelete(row)"
|
|
size="mini"
|
|
type="danger" v-if="![8100].includes(row.state) && row.state && (${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')})">删除
|
|
</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<!--#include("/layouts/pagination.html"){}#-->
|
|
</el-card>
|
|
</template>
|
|
|
|
|
|
<template #view>
|
|
<wakes-info ref="viewInfo"></wakes-info>
|
|
</template>
|
|
</guava>
|
|
</div>
|
|
|
|
<script>
|
|
const vue = new Vue({
|
|
el: '#app',
|
|
mixins: [initTableMixins],
|
|
data() {
|
|
return {
|
|
unions: [],
|
|
pageForm: {
|
|
isAudit: false,
|
|
year: moment().format('YYYY'),
|
|
},
|
|
tableColumns: [
|
|
{prop: 'unionName', label: '申报工会', sortable: true},
|
|
{prop: 'username', label: '申报人', sortable: true},
|
|
{prop: 'mobile', label: '联系方式', sortable: true},
|
|
{prop: 'position', label: '地址', sortable: true},
|
|
{prop: 'area', label: '面积', sortable: true},
|
|
{prop: 'foundTime', label: '创立时间', sortable: true},
|
|
{prop: 'applyTime', label: '申报日期', sortable: true},
|
|
{prop: 'stateName', label: '状态', sortable: true},
|
|
],
|
|
}
|
|
},
|
|
components: {
|
|
'wakes-info': httpVueLoader('/components/wakeshome/info/WakesHomeInfo.vue')
|
|
},
|
|
methods: {
|
|
openView(row) {
|
|
this.$refs.guava.view()
|
|
this.$refs.viewInfo.openView(row.id)
|
|
},
|
|
async doDelete(row) {
|
|
const confirm = await this.$confirm('确定要删除吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
})
|
|
if (confirm==="confirm"){
|
|
const resp = await $.get(loc() + '/doRemove', {id: row.id})
|
|
if (resp.code === 0) {
|
|
this.notifySuccess(resp.msg)
|
|
this.pageData();
|
|
} else {
|
|
this.notifyWarning(resp.msg)
|
|
}
|
|
}
|
|
|
|
},
|
|
openEdit(row) {
|
|
sublime.jumpPagePjax('/platform/wakeshome/info/apply?id=' + row.id)
|
|
},
|
|
async flushUnits() {
|
|
this.$set(this.pageForm, "unitId", null)
|
|
this.units = []
|
|
if (this.pageForm.unionId) {
|
|
this.units = await getUnits(this.pageForm.unionId)
|
|
}
|
|
},
|
|
},
|
|
async created() {
|
|
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
|
this.unions = await getUnions(null, false)
|
|
this.unions.unshift({id: '校工会', unionname: '校工会'})
|
|
} else {
|
|
this.unions = await getUnions(null, true)
|
|
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
|
this.flushUnits()
|
|
}
|
|
this.pageData();
|
|
}
|
|
})
|
|
</script>
|
|
<!--#
|
|
}
|
|
#-->
|