first commit
This commit is contained in:
@@ -0,0 +1,351 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.el-form .el-select, .el-form .el-date-editor {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.el-divider {
|
||||
background-color: #1867b0;
|
||||
}
|
||||
|
||||
.el-divider__text {
|
||||
color: #1867b0;
|
||||
}
|
||||
|
||||
.w-e-text-container {
|
||||
height: 250px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row justify="space-between" type="flex">
|
||||
<h3 style="color: rgb(24, 103, 176);">
|
||||
{{id?'信息编辑':'信息填写'}}
|
||||
</h3>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-form :model="formData" :rules="formRules" label-width="100px" ref="AddForm">
|
||||
<!-- <el-divider content-position="left">职工之家申请信息</el-divider>-->
|
||||
<vi-title title="教工小家申请信息"></vi-title>
|
||||
<el-row :gutter="20">
|
||||
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="填报人" prop="username">
|
||||
<el-input readonly v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="联系方式" prop="mobile">
|
||||
<el-input v-model="formData.mobile" placeholder="请填写联系方式" maxlength="18"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="填报时间" prop="applyTime">
|
||||
<el-input readonly v-model="formData.applyTime"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="填报类别" prop="category">
|
||||
<el-radio-group v-model="formData.category" size="small" @change="doChangeCategory">
|
||||
<el-radio label="校工会" border></el-radio>
|
||||
<el-radio label="分工会" border></el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="填报单位" prop="unionName">
|
||||
<el-input readonly v-model="formData.unionName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-divider content-position="left">职工之家详细信息</el-divider>-->
|
||||
<vi-title title="教工小家详细信息"></vi-title>
|
||||
<el-row :gutter="20">
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="创办时间" prop="foundTime">
|
||||
<el-date-picker
|
||||
v-model="formData.foundTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择创办日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="单位位置" prop="position">
|
||||
<el-input placeholder="请填写单位位置" v-model="formData.position"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="8" :sm="24">
|
||||
<el-form-item label="单位面积" prop="area">
|
||||
<el-input placeholder="请填写单位面积" v-model="formData.area"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="24" :sm="24">
|
||||
<el-form-item label="单位信息" prop="details">
|
||||
<el-input type="textarea" :rows="4"
|
||||
placeholder="请填写单位信息"
|
||||
v-model="formData.details"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-divider content-position="left">职工之家荣誉信息</el-divider>-->
|
||||
<vi-title title="教工小家荣誉信息"></vi-title>
|
||||
<el-row :gutter="20">
|
||||
<el-col :lg="24" :sm="24">
|
||||
<el-form-item class="is-required" label="获奖情况" prop="payStandard">
|
||||
<el-button
|
||||
@click="formData.awardInfo.push({awardTime:'',awardUnit:'',awardName:'',awardPic:''})"
|
||||
icon="el-icon-plus" size="mini"
|
||||
style="float: right;margin-bottom: 10px">
|
||||
添加
|
||||
</el-button>
|
||||
<span style="color: red">说明:各奖项图片只能上传一张。</span>
|
||||
<el-table
|
||||
:data="formData.awardInfo"
|
||||
border
|
||||
v-fit-columns
|
||||
size="mini"
|
||||
style="width: 100%">
|
||||
<el-table-column label="获奖日期" prop="awardTime">
|
||||
<template scope="{row,$index}">
|
||||
<el-form-item :prop="'awardInfo.'+$index+'.awardTime'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
|
||||
label-width="0">
|
||||
<el-date-picker
|
||||
v-model="row.awardTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择获奖日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="获奖单位" prop="awardUnit">
|
||||
<template scope="{row,$index}">
|
||||
<el-form-item :prop="'awardInfo.'+$index+'.awardUnit'"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"
|
||||
label-width="0">
|
||||
<el-input clearable maxlength="100" placeholder="请输入获奖单位"
|
||||
v-model="row.awardUnit"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="奖项名称" prop="awardName">
|
||||
<template slot-scope="{row,$index}">
|
||||
<el-input clearable maxlength="100" placeholder="请输入奖项名称"
|
||||
v-model="row.awardName"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="奖项照片" prop="awardPic">
|
||||
<template scope="{row,$index}">
|
||||
<image-upload :limit="1" v-model="row.awardPic"></image-upload>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="formData.awardInfo.length<=1"
|
||||
@click="formData.awardInfo.splice(scope.$index,1)" circle
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
type="danger"></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- <el-divider content-position="left">职工之家材料上传</el-divider>-->
|
||||
<vi-title title="教工小家材料上传"></vi-title>
|
||||
<el-row gutter="20">
|
||||
<el-col :lg="24" :sm="24">
|
||||
<el-form-item required label="图片上传" prop="picFiles">
|
||||
<file-upload :files.sync="formData.picFiles" card :max="10"
|
||||
:type="['jpg', 'png', 'jpeg']">
|
||||
<template #el-upload__tip>
|
||||
</template>
|
||||
</file-upload>
|
||||
<div class="el-upload__tip">请上传jpg、png、jpeg格式的图片,最多不超过10张</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="24" :sm="24">
|
||||
<el-form-item required label="附件上传" prop="files">
|
||||
<file-upload :files.sync="formData.files" card :max="10"
|
||||
:type="['doc','docx','xls','xlsx','pdf','ppt', 'jpg', 'png', 'jpeg']">
|
||||
<template #el-upload__tip>
|
||||
</template>
|
||||
</file-upload>
|
||||
<div class="el-upload__tip">可上传照片、文档等资料</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-row class="mt10" v-if="disabled" justify="center" type="flex">
|
||||
<el-button @click="doSave()" style="width: 300px" type="primary">保 存
|
||||
</el-button>
|
||||
<el-button @click="doSubmit()" style="width: 300px" type="primary">提 交
|
||||
</el-button>
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
id: '',
|
||||
formRules: {
|
||||
position: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
mobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
picFiles: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
files: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
formData: {
|
||||
category: '分工会',
|
||||
awardInfo: [{awardTime: '', awardUnit: '', awardName: '', awardPic: ''}]
|
||||
},
|
||||
disabled: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async doSave() {
|
||||
let postUrl = ''
|
||||
if (this.formData.id) {
|
||||
postUrl = loc() + '/doEdit'
|
||||
} else {
|
||||
postUrl = loc() + '/doAdd'
|
||||
}
|
||||
const formData = this.doJsonStr(this.formData)
|
||||
formData.isSubmit = false;
|
||||
const resp = await $.post(postUrl, formData)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
setTimeout(() => {
|
||||
sublime.jumpPagePjax('/platform/wakeshome/info/mine')
|
||||
}, 500)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
},
|
||||
async doSubmit() {
|
||||
try {
|
||||
const valid = await this.$refs['AddForm'].validate()
|
||||
if (valid) {
|
||||
let postUrl = ''
|
||||
if (this.formData.id) {
|
||||
postUrl = loc() + '/doEdit'
|
||||
} else {
|
||||
postUrl = loc() + '/doAdd'
|
||||
}
|
||||
const formData = this.doJsonStr(this.formData)
|
||||
formData.isSubmit = true
|
||||
const resp = await $.post(postUrl, formData)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
setTimeout(() => {
|
||||
sublime.jumpPagePjax('/platform/wakeshome/info/mine')
|
||||
}, 500)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
doChangeCategory() {
|
||||
if (this.formData.category === '校工会') {
|
||||
this.formData.unionName = '校工会'
|
||||
this.formData.unionId = null
|
||||
} else {
|
||||
this.formData.unionName = "${@shiro.getPrincipalProperty('union').getUnionname()}"
|
||||
this.formData.unionId = "${@shiro.getPrincipalProperty('union').getId()}"
|
||||
}
|
||||
},
|
||||
async initFormData() {
|
||||
if (!this.id) {
|
||||
this.$set(this.formData, 'username', "${@shiro.getPrincipalProperty('username')}")
|
||||
this.$set(this.formData, 'mobile', "${@shiro.getPrincipalProperty('mobile')}")
|
||||
this.$set(this.formData, 'applyTime', moment().format('YYYY-MM-DD'))
|
||||
this.$set(this.formData, 'unionName', "${@shiro.getPrincipalProperty('union').getUnionname()}")
|
||||
} else {
|
||||
const resp = await $.get('/platform/wakeshome/info/mine/getInfoById', {id: this.id})
|
||||
if (resp.code === 0) {
|
||||
this.formData = {...resp.data}
|
||||
}
|
||||
}
|
||||
},
|
||||
doJsonStr(data) {
|
||||
const formData = clone(data)
|
||||
formData.awardInfo = JSON.stringify(this.formData.awardInfo)
|
||||
formData.picFiles = JSON.stringify(this.formData.picFiles)
|
||||
formData.files = JSON.stringify(this.formData.files)
|
||||
return formData;
|
||||
},
|
||||
async validateApply() {
|
||||
const resp = await $.get(loc() + '/validateApply')
|
||||
if (resp.code === 0) {
|
||||
this.disabled = true
|
||||
await this.getWakesHomeUnitInfo()
|
||||
} else {
|
||||
this.disabled = false
|
||||
this.$confirm('未获取到单位的建家申报记录,是否前往申报?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
setTimeout(() => {
|
||||
sublime.jumpPagePjax('/platform/wakeshome/declaration/apply')
|
||||
}, 500)
|
||||
})
|
||||
}
|
||||
},
|
||||
async getWakesHomeUnitInfo() {
|
||||
const resp = await $.get('/platform/wakeshome/declaration/apply/getWakesHomeUnitInfo')
|
||||
if (resp.code === 0 && resp.data) {
|
||||
this.$set(this.formData, 'foundTime', resp.data.foundTime)
|
||||
this.$set(this.formData, 'position', resp.data.position)
|
||||
this.$set(this.formData, 'area', resp.data.area)
|
||||
this.$set(this.formData, 'details', resp.data.details)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
this.initFormData()
|
||||
await this.validateApply()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,235 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.el-row .el-card {
|
||||
min-width: 100%;
|
||||
height: 100%;
|
||||
margin-right: 20px;
|
||||
transition: all .5s;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.pagination-container {
|
||||
margin-top: -3px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.box-card {
|
||||
.header {
|
||||
min-height: 20px;
|
||||
position: relative;
|
||||
|
||||
.label {
|
||||
padding: 1px 6px;
|
||||
background-color: #fdf0da;
|
||||
font-size: 15px;
|
||||
color: #f19901;
|
||||
}
|
||||
|
||||
.header-label {
|
||||
padding: 1px 6px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.card-header-tag-blue {
|
||||
position: absolute;
|
||||
width: 68px;
|
||||
height: 30px;
|
||||
top: -14px;
|
||||
right: -15px;
|
||||
/*background-image: url("~@/assets/images/img_dpj_t.png");*/
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.card-header-tag-green {
|
||||
position: absolute;
|
||||
width: 68px;
|
||||
height: 30px;
|
||||
top: -14px;
|
||||
right: -15px;
|
||||
/*background-image: url("~@/assets/images/img_ypj_t.png");*/
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.footer {
|
||||
font-size: 18px !important;
|
||||
background-color: rgb(245, 247, 251);
|
||||
display: flex;
|
||||
height: 50px;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
|
||||
.card-label {
|
||||
color: rgb(197, 197, 197);
|
||||
margin-right: 8px;
|
||||
width: 70px;
|
||||
display: inline-block;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<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
|
||||
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>
|
||||
<!--<el-button type="primary" size="small">添加信息</el-button>-->
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-row :gutter="20" style="margin-right: 15px;margin-left: -5px" type="flex" v-loading="loading">
|
||||
<el-col v-for="(item, index) in tableData" :key="index" :span="6" style="margin-top: 10px">
|
||||
<el-card class="box-card" shadow="always" :body-style="{ padding: '0px' }">
|
||||
<div slot="header" class="header" style="display: flex">
|
||||
<span class="label">{{item.unionName}}</span>
|
||||
<div style="display:flex; align-items: center;color: #cccccc;margin-left: 20px">|</div>
|
||||
<el-tooltip class="item" effect="dark" :content="item.position" placement="top-start">
|
||||
<el-button type="text" class="header-label">查看位置</el-button>
|
||||
</el-tooltip>
|
||||
<!--<span class="header-label"></span>-->
|
||||
</div>
|
||||
<div style="margin: 15px">
|
||||
<div>
|
||||
<el-carousel height="150px">
|
||||
<el-carousel-item v-for="o in item.picFiles" :key="item">
|
||||
<el-image @click="PREVIEW_IMAGE(o.filepath)"
|
||||
:src="CREATE_PREVIEW_URL(o.filepath)"
|
||||
style="width: 100%;height: 100%"></el-image>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div style="display: flex;align-items: center">
|
||||
<span style="color: #18c8bd;font-size: 14px">面积:{{item.area}}(㎡)</span>
|
||||
<div style="display:flex; align-items: center;color: #cccccc;margin: 0 10px">|</div>
|
||||
<span style="color: #18c8bd;font-size: 14px">申报日期:{{item.applyTime}}</span>
|
||||
</div>
|
||||
<div style="display:flex; align-items: center;color: #cccccc">|</div>
|
||||
<div style="display: flex;align-items: center">
|
||||
<el-button type="text"
|
||||
:style="item.status === '2' ? 'color: #18c8bd' : 'color: rgb(34, 125, 251)'"
|
||||
style="color: #18c8bd"></el-button>
|
||||
<el-button type="text" style="color: #18c8bd;" @click="openView(item.id)">查看
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</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 {
|
||||
loading: false,
|
||||
unions: [],
|
||||
tableData: [],
|
||||
pageForm: {
|
||||
year: moment().format('YYYY'),
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row)
|
||||
},
|
||||
async pageData() {
|
||||
const resp = await $.post(loc() + '/pageData', this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.tableData = resp.data
|
||||
this.tableData.forEach(item => {
|
||||
item.picFiles = JSON.parse(item.picFiles)
|
||||
})
|
||||
}
|
||||
},
|
||||
flushUnits() {
|
||||
},
|
||||
|
||||
},
|
||||
components: {
|
||||
'wakes-info': httpVueLoader('/components/wakeshome/info/WakesHomeInfo.vue')
|
||||
},
|
||||
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.unions.unshift({id: '校工会', unionname: '校工会'})
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,171 @@
|
||||
<!--#
|
||||
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>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,242 @@
|
||||
<!--#
|
||||
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
|
||||
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>
|
||||
<el-radio-group @change="doSearch" class="mr10" size="small" v-model="pageForm.isAudit">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</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"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="150px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openAudit(row)" v-if="[8120].includes(row.state) || !row.state" size="mini" type="primary">审核</el-button>
|
||||
<el-button @click="doRollBack(row.id)" v-if="[8125,8130].includes(row.state) || !row.state" size="mini" type="danger">撤回</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<wakes-info ref="viewInfo"></wakes-info>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<wakes-info ref="auditInfo">
|
||||
<template #handle>
|
||||
<el-tab-pane label="校工会审核" name="schoolAudit">
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
||||
style="padding: 20px 0"
|
||||
label-width="120px">
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="username" label="审核人员">
|
||||
<el-input value="${@shiro.getPrincipalProperty('username')}"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="time" label="审核时间">
|
||||
<el-input v-model="formData.auditTime" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item prop="auditOpinion" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.auditOpinion" rows="4" maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item prop="auditSign" label="审核签字">-->
|
||||
<!-- <sign :qz.sync="formData.auditSign"></sign>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="danger" @click="doReview(0)">
|
||||
拒绝
|
||||
</el-button>
|
||||
<el-button type="primary" @click="doReview(1)">
|
||||
通过
|
||||
</el-button>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</wakes-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el:'#app',
|
||||
mixins:[initTableMixins],
|
||||
data(){
|
||||
return{
|
||||
id:'',
|
||||
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},
|
||||
],
|
||||
formRules: {
|
||||
// auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'dict-select': httpVueLoader('/components/plugins/DictSelect.vue?v=1.0.0'),
|
||||
'wakes-info': httpVueLoader('/components/wakeshome/info/WakesHomeInfo.vue')
|
||||
},
|
||||
methods:{
|
||||
doReview(row){
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
this.$confirm('您确定要提交吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
const {code, msg} = await $.post(loc() + '/doAudit', {
|
||||
audit: JSON.stringify(this.formData),
|
||||
id: this.id,
|
||||
isPass: row,
|
||||
})
|
||||
if (code === 0) {
|
||||
this.pageData()
|
||||
this.notifySuccess(msg)
|
||||
this.$refs.guava.index()
|
||||
} else {
|
||||
this.notifyWarning(msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(row){
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row.id)
|
||||
},
|
||||
openAudit(row){
|
||||
this.formData={}
|
||||
this.id = row.id
|
||||
this.$set(this.formData, 'auditTime', moment().format('YYYY-MM-DD'))
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.auditInfo.activeName = 'schoolAudit'
|
||||
this.$refs.auditInfo.openView(row.id)
|
||||
},
|
||||
async doRollBack(id){
|
||||
const confirm = await this.$confirm('确定要撤回该记录吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if ("confirm" === confirm) {
|
||||
const resp = await $.get(loc() + '/doRollBack',{id:id})
|
||||
if (resp.code === 0){
|
||||
this.pageData();
|
||||
this.notifySuccess(resp.msg)
|
||||
}else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
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.unions.unshift({id:'校工会',unionname:'校工会'})
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user