first commit
This commit is contained in:
@@ -0,0 +1,191 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app" v-clock>
|
||||
<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
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy"
|
||||
formData="yyyy"
|
||||
type="year"
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
placeholder="请选择年度">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">所属工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="doSearch"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="申报列表" :app="this">
|
||||
<template #func>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table ref="table" :data="tableData" style="width: 100%" row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
v-loading="tableLoading" :size="tableSize" class="vi-table">
|
||||
<el-table-column align="center" header-align="center" type="index"
|
||||
:index="indexMethod" label="序号"
|
||||
width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop === 'applyDate'">
|
||||
<span>{{ moment(row.applyDate).format('YYYY年MM月DD日') }}</span>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop === 'files'">
|
||||
<span>{{ row.files?"已上传":"未上传" }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="350">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openExport(row.id)" size="mini" type="primary">导出申报表</el-button>
|
||||
<el-button @click="openFile(row)" size="mini" type="primary">上传党组织盖章文档
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<wakes-info-apply ref="viewInfo"></wakes-info-apply>
|
||||
</template>
|
||||
</guava>
|
||||
<el-dialog
|
||||
:visible.sync="filesDialogVisible"
|
||||
title="上传党组织盖章文档"
|
||||
width="30%">
|
||||
<file-upload :files.sync="formData.files" :max="10"
|
||||
:type="['doc','docx','xls','xlsx','pdf','ppt', 'jpg', 'png', 'jpeg']"
|
||||
card>
|
||||
<template #el-upload__tip>
|
||||
</template>
|
||||
</file-upload>
|
||||
<span class="dialog-footer" slot="footer">
|
||||
<el-button @click="filesDialogVisible = false">关 闭</el-button>
|
||||
<el-button @click="doFiles" type="primary">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data: {
|
||||
id:'',
|
||||
unions:[],
|
||||
pageForm:{
|
||||
isAudit:false,
|
||||
year: moment().format('YYYY'),
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'unionName', label: '申报工会', sortable: true,width: "150px"},
|
||||
{prop: 'username', label: '申报人', sortable: true, width: "100px"},
|
||||
{prop: 'loginName', label: '申报人工号', sortable: true, width: "150px"},
|
||||
{prop: 'mobile', label: '联系方式', sortable: true, width: "150px"},
|
||||
// {prop: 'basicInformation', label: '基本情况简介', sortable: true},
|
||||
{prop: 'applyDate', label: '申报日期', sortable: true},
|
||||
{prop: 'files', label: '是否上传党组织盖章文档', sortable: true},
|
||||
{prop: 'stateName', label: '审核状态', sortable: true},
|
||||
],
|
||||
formRules: {
|
||||
auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
filesDialogVisible: false,
|
||||
},
|
||||
components: {
|
||||
'wakes-info-apply': httpVueLoader('/components/wakeshome/declaration/WakesHomeInfoApply.vue')
|
||||
},
|
||||
methods: {
|
||||
async doFiles() {
|
||||
if (this.formData.files && this.formData.files.length === 0) {
|
||||
this.notifyWarning("请上传党组织盖章文档")
|
||||
return
|
||||
}
|
||||
const {code, msg} = await $.post('/platform/wakeshome/declaration/school/doFiles', {
|
||||
id: this.formData.id,
|
||||
files: JSON.stringify(this.formData.files),
|
||||
})
|
||||
if (code === 0) {
|
||||
this.pageData()
|
||||
this.notifySuccess(msg)
|
||||
this.filesDialogVisible=false
|
||||
} else {
|
||||
this.notifyWarning(msg)
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
openFile(row) {
|
||||
const formData = clone(row)
|
||||
this.formData.id = formData.id
|
||||
this.formData.files = formData.files ? JSON.parse(formData.files) : []
|
||||
this.filesDialogVisible = true
|
||||
},
|
||||
openExport(id) {
|
||||
window.open("/platform/wakeshome/declaration/mine/openExport?id=" + id)
|
||||
},
|
||||
openView(row){
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(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)
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
this.flushUnits()
|
||||
}
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user