This commit is contained in:
Paidax
2024-10-11 16:22:21 +08:00
parent b5f156e3ab
commit dbdf74e628
8 changed files with 167 additions and 16 deletions
@@ -79,7 +79,11 @@ layout("/layouts/platform.html"){
</div>
</el-card>
<el-card shadow="never" style="margin:10px 10px 0 10px">
<vi-title2 title="资料列表"></vi-title2>
<table-tool :label="( checkData.unionname ? checkData.unionname : '全部分工会' ) + '资料列表'" :app="this">
<template #func>
<el-button v-if="checkData.unionname" type="primary" size="small" @click="exportAllFileByUnionId">导出全部资料</el-button>
</template>
</table-tool>
<el-table :data="tableData" @sort-change='pageOrder' height="626">
<el-table-column label="序号" type="index" header-align="center" align="center">
<template scope="scope"><span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span></template>
@@ -87,7 +91,8 @@ layout("/layouts/platform.html"){
<el-table-column prop="revelName" label="资料名称"></el-table-column>
<el-table-column sortable prop="typeName" label="资料类型"></el-table-column>
<el-table-column sortable prop="username" label="上传人"></el-table-column>
<el-table-column sortable prop="unionName" label="工会"></el-table-column>
<el-table-column sortable prop="unionName" label="上传人工会"></el-table-column>
<el-table-column sortable prop="belongToUnionName" label="资料归属工会"></el-table-column>
<el-table-column sortable prop="time" label="上传时间"></el-table-column>
<el-table-column prop="userOnline" label="操作" width="100px">
<template slot-scope="scope">
@@ -135,6 +140,9 @@ layout("/layouts/platform.html"){
<el-form-item label="上传人">
<el-input readonly value="${@shiro.getPrincipalProperty('username')}"></el-input>
</el-form-item>
<el-form-item label="所属工会">
<el-input readonly :value="checkData.unionname ? checkData.unionname : '${@shiro.getPrincipalProperty('union').getUnionname()}'"></el-input>
</el-form-item>
<el-form-item prop="revelName" label="资料名称">
<el-input placeholder="请填写工作资料名称" v-model="formData.revelName"></el-input>
</el-form-item>
@@ -149,7 +157,12 @@ layout("/layouts/platform.html"){
</el-select>
</el-form-item>
<el-form-item prop="files" label="附件上传">
<file-upload :files.sync="formData.files"></file-upload>
<file-upload :files.sync="formData.files" card
: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-form>
</el-form>
@@ -221,7 +234,6 @@ layout("/layouts/platform.html"){
</span>
</el-dialog>
</div>
<script>
@@ -270,6 +282,13 @@ layout("/layouts/platform.html"){
}
},
methods: {
exportAllFileByUnionId() {
const unionId = this.checkData.id
const unionName = this.checkData.unionname
const url = '/platform/wakeshome/data/revel/exportAllFileByUnionId?unionId=' + unionId + '&unionName=' + unionName
window.open(url)
},
},
async handleNodeClick(data, node) {
this.checkData = data
this.checkNode = node
@@ -388,6 +407,9 @@ layout("/layouts/platform.html"){
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
});
if (this.checkData.id) {
this.formData.belongToUnionId = this.checkData.id
}
const resp = await $.post('/platform/wakeshome/data/revel/doAdd', formData)
loading.close()
if (resp.code === 0) {
@@ -56,11 +56,44 @@ layout("/layouts/platform.html"){
<el-input readonly v-model="formData.unionName"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<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 :span="8">
<el-form-item label="填报时间" prop="applyTime">
<el-input readonly v-model="formData.applyDate"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单位位置" prop="position">
<el-input placeholder="请填写单位位置" v-model="formData.position"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<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-row :gutter="20">
@@ -80,6 +113,15 @@ layout("/layouts/platform.html"){
<el-form-item label="教工小家建设方案" prop="constructionPlan">
<text-editor v-model="formData.constructionPlan"></text-editor>
</el-form-item>
<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-form>
<el-row class="mt10" justify="center" type="flex">
@@ -45,7 +45,7 @@ layout("/layouts/platform.html"){
<el-col :lg="8" :sm="24">
<el-form-item label="联系方式" prop="mobile">
<el-input v-model="formData.mobile"></el-input>
<el-input v-model="formData.mobile" placeholder="请填写联系方式" maxlength="18"></el-input>
</el-form-item>
</el-col>
@@ -224,6 +224,7 @@ layout("/layouts/platform.html"){
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']}],
},
@@ -238,9 +239,9 @@ layout("/layouts/platform.html"){
async doSave() {
let postUrl = ''
if (this.formData.id) {
postUrl = loc()+'/doEdit'
postUrl = loc() + '/doEdit'
} else {
postUrl = loc()+'/doAdd'
postUrl = loc() + '/doAdd'
}
const formData = this.doJsonStr(this.formData)
formData.isSubmit = false;
@@ -260,9 +261,9 @@ layout("/layouts/platform.html"){
if (valid) {
let postUrl = ''
if (this.formData.id) {
postUrl = loc()+'/doEdit'
postUrl = loc() + '/doEdit'
} else {
postUrl = loc()+'/doAdd'
postUrl = loc() + '/doAdd'
}
const formData = this.doJsonStr(this.formData)
formData.isSubmit = true
@@ -296,8 +297,8 @@ layout("/layouts/platform.html"){
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){
const resp = await $.get('/platform/wakeshome/info/mine/getInfoById', {id: this.id})
if (resp.code === 0) {
this.formData = {...resp.data}
}
}
@@ -309,10 +310,11 @@ layout("/layouts/platform.html"){
formData.files = JSON.stringify(this.formData.files)
return formData;
},
async validateApply(){
async validateApply() {
const resp = await $.get(loc() + '/validateApply')
if (resp.code === 0) {
this.disabled = true
await this.getWakesHomeUnitInfo()
} else {
this.disabled = false
this.$confirm('未获取到单位的建家申报记录,是否前往申报?', '提示', {
@@ -325,6 +327,15 @@ layout("/layouts/platform.html"){
}, 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() {