first commit
This commit is contained in:
@@ -0,0 +1,644 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
.el-select {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<div class="block">
|
||||
<el-date-picker
|
||||
@change="getEvaluateByYear()"
|
||||
placeholder="年度" type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-select clearable="true" filterable="true" placeholder="评优评先名称"
|
||||
style="width: 100%;" v-model="pageForm.evaluateId">
|
||||
<el-option :label="item.evaluateName" :value="item.evaluateId"
|
||||
v-for="item in evaluateOptions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-radio-group @change="(o) => {radioChange(o)}" v-model="pageForm.honorType">
|
||||
<el-radio-button :label="v.id" v-for="v in honorTypeList">{{v.name}}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary"></el-button>
|
||||
</div>
|
||||
|
||||
<div class="pull-right offscreen-right">
|
||||
<el-button @click="applyEvaluate" size="medium" type="primary">申请评优评先</el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
|
||||
<template #vi-title>
|
||||
<vi-title title="申请列表"></vi-title>
|
||||
</template>
|
||||
|
||||
<el-table :data="tableData">
|
||||
|
||||
<el-table-column 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"
|
||||
:sortable="column.sortable"
|
||||
align="center" header-align="center"
|
||||
show-overflow-tooltip v-for="column in tableColumns">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请时间" prop="applyTime"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="审核状态" prop="year"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="{row}">
|
||||
<span :style="'color: ' + row.stateColor">{{row.stateName}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="150px">
|
||||
<template scope="{row}">
|
||||
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
<el-button plain size="mini">
|
||||
<i class="ti-settings"></i>
|
||||
<span class="ti-angle-down"></span>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{type:'view',data:row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'edit',data:row}"
|
||||
:disabled="row.stateId>1400">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
|
||||
<!--#if(@shiro.hasRole('sysadmin')){#-->
|
||||
<el-dropdown-item :command="{type:'delete',data:row}"
|
||||
:loading="row.delLoading">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<!--#}else{#-->
|
||||
<el-dropdown-item :command="{type:'delete',data:row}"
|
||||
:disabled="row.stateId>1400"
|
||||
:loading="row.delLoading">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<!--#}#-->
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
|
||||
<template #header>
|
||||
<el-row justify="space-between" type="flex">
|
||||
<h3>{{isEdit?'修改数据':'添加数据'}}</h3>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-form :model="formData" :rules="formRules" label-width="120px" ref="form">
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="评优评先名称" prop="evaluateId">
|
||||
<el-select :disabled="isEdit" @change="evaluateChange" v-model="formData.evaluateId">
|
||||
<el-option :key="o.id"
|
||||
:label="o.name"
|
||||
:value="o.id"
|
||||
v-for="o in evaluateList"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="荣誉类型" prop="honorType">
|
||||
<el-input readonly v-model="formData.honorType"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<vi-title title="基础信息"></vi-title>
|
||||
|
||||
<template
|
||||
v-if="formData.honorTypeId === undefined || formData.honorTypeId === HonorApi.honor_single_id">
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="申请人" prop="userId">
|
||||
<el-select
|
||||
:disabled="isEdit"
|
||||
:loading="userLoading"
|
||||
:remote-method="userRemoteMethod"
|
||||
@change="userChange"
|
||||
filterable
|
||||
placeholder="请输入姓名或工号查找"
|
||||
remote
|
||||
reserve-keyword
|
||||
style="width: 100%"
|
||||
v-model="formData.userId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.username"
|
||||
:value="item.id"
|
||||
v-for="item in userOptions">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工号" prop="loginname">
|
||||
<el-input v-model="formData.loginname"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性别" prop="userSex">
|
||||
<el-radio-group :disabled="isEdit" v-model="formData.userSex">
|
||||
<el-radio-button label="男"></el-radio-button>
|
||||
<el-radio-button label="女"></el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="民族" prop="nation">
|
||||
<el-select filterable placeholder="民族" style="width: 100%"
|
||||
v-model="formData.nation">
|
||||
<el-option :key="nation" :label="nation" :value="nation"
|
||||
v-for="nation in nationOptions"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="职务" prop="position">
|
||||
<el-input v-model="formData.position"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="职称" prop="jobTitle">
|
||||
<el-input v-model="formData.jobTitle"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="政治面貌" prop="political">
|
||||
<el-input v-model="formData.political"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="在职状态" prop="userState">
|
||||
<el-input v-model="formData.userState"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属单位" prop="unitId">
|
||||
<el-select :disabled="isEdit" filterable="true"
|
||||
placeholder="所属单位"
|
||||
style="width: 100%;"
|
||||
v-model="formData.unitId">
|
||||
<el-option :label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属工会" prop="unionId">
|
||||
<el-select :disabled="isEdit" filterable="true"
|
||||
placeholder="所属工会"
|
||||
style="width: 100%;"
|
||||
v-model="formData.unionId">
|
||||
<el-option :label="item.unionname"
|
||||
:value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="获奖单位" prop="unitName">
|
||||
<el-select :disabled="isEdit" allow-create
|
||||
filterable
|
||||
placeholder="获奖单位"
|
||||
style="width: 100%;"
|
||||
v-model="formData.unitName">
|
||||
<el-option :label="item.name"
|
||||
:value="item.name"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属工会" prop="unionId">
|
||||
<el-select :disabled="isEdit" filterable="true"
|
||||
placeholder="所属工会"
|
||||
style="width: 100%;"
|
||||
v-model="formData.unionId">
|
||||
<el-option :label="item.unionname"
|
||||
:value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位负责人" prop="unitLeader">
|
||||
<el-input v-model="formData.unitLeader"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="单位人数" prop="unitPeopleNum">
|
||||
<el-input-number :max="2000" :min="0"
|
||||
style="width: 100%" v-model="formData.unitPeopleNum"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="会员人数" prop="memberNum">
|
||||
<el-input-number :max="2000" :min="0"
|
||||
style="width: 100%" v-model="formData.memberNum"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="女职工人员" prop="unitFemalePeopleNum">
|
||||
<el-input-number
|
||||
:max="2000" :min="0"
|
||||
style="width: 100%"
|
||||
v-model.number="formData.unitFemalePeopleNum"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</template>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="曾受何种奖励" prop="award">
|
||||
<el-input placeholder="如有多种奖励,请用 / 隔开" rows="4" type="textarea"
|
||||
v-model="formData.award"></el-input>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
trigger="click"
|
||||
v-model="popover"
|
||||
width="600">
|
||||
<el-table :data="gridData" @selection-change="handleSelectionChange" ref="multipleTable"
|
||||
row-key="id"
|
||||
size="mini" style="width: 100%; max-height: 300px; overflow-y: auto">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column label="奖项" property="prizeName"></el-table-column>
|
||||
<el-table-column label="授予时间" property="grantDate" sortable></el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align: right; margin-top: 10px">
|
||||
<el-button @click="multipleSelection = []; popover = false" size="mini">取消
|
||||
</el-button>
|
||||
<el-button @click="popoverOK" size="mini" type="primary">确定</el-button>
|
||||
</div>
|
||||
<el-button size="mini" slot="reference" type="primary">调用已录入荣誉</el-button>
|
||||
</el-popover>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="主要事迹" prop="deeds">
|
||||
<el-input rows="4" type="textarea" v-model="formData.deeds"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<vi-title title="获奖信息"></vi-title>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="附件" prop="files">
|
||||
<file-upload :files.sync="formData.files">
|
||||
<template #el-upload__tip>
|
||||
<div class="el-upload__tip" slot="tip">
|
||||
图片类请上传jpg/png/jpeg等格式,文档类请上传doc/docx/xls/xlsx/pdf等格式
|
||||
</div>
|
||||
</template>
|
||||
</file-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
|
||||
<el-row class="m20 text-right">
|
||||
<el-button @click="saveForm" type="primary">保存</el-button>
|
||||
<el-button @click="doSubmit" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<evaluate-info ref="info"></evaluate-info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
<!--<el-dialog title="荣誉列表" :visible.sync="addDialogVisible">
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="addDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="doAdd">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>-->
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
popover: false,
|
||||
multipleSelection: [],
|
||||
honorTypeList: [],
|
||||
evaluateList: [],
|
||||
evaluateOptions: [],
|
||||
gridData: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + "",
|
||||
honorType: '',
|
||||
honorLevel: ''
|
||||
},
|
||||
tableData: [],
|
||||
isEdit: false,
|
||||
formData: {
|
||||
evaluateId: '',
|
||||
award: '',
|
||||
deeds: '',
|
||||
},
|
||||
userLoading: false,
|
||||
userOptions: [],
|
||||
nationOptions: nation,
|
||||
units: [],
|
||||
unions: [],
|
||||
formRules: {
|
||||
evaluateId: [{required: true, message: '请选择评优评先', trigger: ['blur', 'change']}],
|
||||
},
|
||||
tableColumns: [{prop: 'username', label: '申请人姓名', sortable: true},
|
||||
{prop: 'evaluateName', label: '评优评先名称', sortable: true},
|
||||
{prop: 'loginname', label: '工号', sortable: true},
|
||||
{prop: 'userSex', label: '性别', sortable: true},
|
||||
{prop: 'political', label: '政治面貌', sortable: true},
|
||||
{prop: 'jobTitle', label: '职称', sortable: true},
|
||||
{prop: 'unitName', label: '单位', sortable: true},
|
||||
{prop: 'unionName', label: '工会', sortable: true},]
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
'evaluate-info': httpVueLoader('/components/evaluate/evaluateInfo.vue'),
|
||||
},
|
||||
methods: {
|
||||
async saveForm() {
|
||||
const valid = await this.$refs.form.validate()
|
||||
if (!valid) return
|
||||
|
||||
this.formData.files = JSON.stringify(this.formData.files)
|
||||
const resp = await $.post('/platform/evaluate/apply/saveForm', this.formData)
|
||||
requestLaterFun(resp, () => {
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
}, () => {
|
||||
this.$notify.error({title: '失败', message: resp.msg});
|
||||
})
|
||||
},
|
||||
radioChange() {
|
||||
if (this.pageForm.honorType === HonorApi.honor_single_id) {
|
||||
this.tableColumns = [
|
||||
{prop: 'username', label: '申请人姓名', sortable: true},
|
||||
{prop: 'evaluateName', label: '评优评先名称', sortable: true},
|
||||
{prop: 'loginname', label: '工号', sortable: true},
|
||||
{prop: 'userSex', label: '性别', sortable: true},
|
||||
{prop: 'political', label: '政治面貌', sortable: true},
|
||||
{prop: 'jobTitle', label: '职称', sortable: true},
|
||||
{prop: 'unitName', label: '单位', sortable: true},
|
||||
{prop: 'unionName', label: '工会', sortable: true}
|
||||
]
|
||||
} else {
|
||||
this.tableColumns = [
|
||||
{prop: 'unitName', label: '申请单位', sortable: true},
|
||||
{prop: 'evaluateName', label: '评优评先名称', sortable: true},
|
||||
{prop: 'unitLeader', label: '负责人', sortable: true},
|
||||
{prop: 'unitPeopleNum', label: '单位人数', sortable: true},
|
||||
{prop: 'unitFemalePeopleNum', label: '单位女职工人数', sortable: true},
|
||||
{prop: 'memberNum', label: '单位会员人数', sortable: true},
|
||||
]
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
async getEvaluateByYear() {
|
||||
const {data} = await $.post('/platform/evaluate/apply/getEvaluateByYear', {year: this.pageForm.year})
|
||||
this.evaluateOptions = data
|
||||
},
|
||||
popoverOK() {
|
||||
if (this.multipleSelection) {
|
||||
let str = '';
|
||||
this.multipleSelection.forEach(item => {
|
||||
str += moment(item.grantDate).format('YYYY') + '-' + item.prizeName + '\n'
|
||||
})
|
||||
str = str.substring(0, str.length - 1)
|
||||
this.formData.award = str
|
||||
this.popover = false
|
||||
}
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
dropdownCommand(command) {
|
||||
const {type, data} = command
|
||||
if (type == 'view') {
|
||||
this.openView(data)
|
||||
} else if (type == 'edit') {
|
||||
this.openEdit(data)
|
||||
} else if (type == 'delete') {
|
||||
this.doDelete(data)
|
||||
}
|
||||
},
|
||||
openView(data) {
|
||||
this.$refs.info.getInfo(data.id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
doDelete(row) {
|
||||
this.$confirm('确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
callback: async (a, b) => {
|
||||
if ("confirm" == a) {//确认后再执行
|
||||
this.$set(row, "delLoading", true)
|
||||
const resp = await $.post('/platform/evaluate/apply/doDelete', {id: row.id})
|
||||
requestLaterMsgFun(vue, resp, async () => {
|
||||
this.pageData()
|
||||
}, () => {
|
||||
}, () => {
|
||||
this.$set(row, "delLoading", false)
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
openEdit(data) {
|
||||
this.isEdit = true
|
||||
this.findData(data)
|
||||
this.$refs.guava.edit()
|
||||
},
|
||||
async findData(data) {
|
||||
this.formData = {}
|
||||
this.formData = clone(data)
|
||||
if (this.formData.userId && this.formData.userId !== '') {
|
||||
const user = await queryUserById(this.formData.userId)
|
||||
this.setFormData(user)
|
||||
} else {
|
||||
this.$set(this.formData, 'userName', this.formData.userName)
|
||||
}
|
||||
this.$set(this.formData, "political", data.political)
|
||||
this.$set(this.formData, "position", data.position)
|
||||
this.$set(this.formData, "honorType", data && data.honorTypeId === HonorApi.honor_single_id ? '个人荣誉' : '集体荣誉')
|
||||
if (data.files && data.files.length > 0) this.$set(this.formData, "files", JSON.parse(data.files))
|
||||
},
|
||||
async userChange() {
|
||||
const user = await queryUserById(this.formData.userId)
|
||||
this.setFormData(user)
|
||||
},
|
||||
setFormData(user) {
|
||||
this.$set(this.formData, "userSex", user[0].sex)
|
||||
this.$set(this.formData, "userName", user[0].username)
|
||||
this.$set(this.formData, "loginname", user[0].loginname)
|
||||
this.$set(this.formData, "unitId", user[0].unitid)
|
||||
this.$set(this.formData, "unionId", user[0].unionid)
|
||||
this.$set(this.formData, "birthday", user[0].birthday)
|
||||
this.$set(this.formData, "jobTitle", user[0].jobTitle)
|
||||
this.$set(this.formData, "position", user[0].position)
|
||||
this.$set(this.formData, "unionName", user[0].unionname)
|
||||
this.$set(this.formData, "unitName", user[0].unitname)
|
||||
this.$set(this.formData, "userState", user[0].userState)
|
||||
this.$set(this.formData, "political", user[0].political)
|
||||
this.$set(this.formData, "nation", user[0].nation)
|
||||
},
|
||||
async userRemoteMethod(query) {
|
||||
if (query) {
|
||||
this.userLoading = true
|
||||
this.userOptions = await searchUser(query)
|
||||
this.userLoading = false
|
||||
}
|
||||
},
|
||||
async applyEvaluate() {
|
||||
const {data} = await $.post('/platform/evaluate/apply/getHonor')
|
||||
this.gridData = data
|
||||
this.initData()
|
||||
this.$refs.guava.edit()
|
||||
if (this.$refs['form']) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
},
|
||||
evaluateChange(val) {
|
||||
const evaluate = this.evaluateList.find(o => o.id === val)
|
||||
this.formData.honorType = evaluate && evaluate.honorTypeId === HonorApi.honor_single_id ? '个人荣誉' : '集体荣誉'
|
||||
this.formData.honorTypeId = evaluate.honorTypeId
|
||||
this.formData.honorId = evaluate.honorId
|
||||
},
|
||||
async doSubmit() {
|
||||
|
||||
const valid = await this.$refs.form.validate()
|
||||
if (!valid) return
|
||||
|
||||
this.formData.files = JSON.stringify(this.formData.files)
|
||||
const resp = await $.post('/platform/evaluate/apply/doSubmit', this.formData)
|
||||
requestLaterFun(resp, () => {
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
}, () => {
|
||||
this.$notify.error({title: '失败', message: resp.msg});
|
||||
})
|
||||
},
|
||||
async initData() {
|
||||
|
||||
const {data} = await $.post('/platform/evaluate/getEvaluateList')
|
||||
this.evaluateList = data
|
||||
|
||||
this.units = await getUnits(null)
|
||||
this.unions = await getUnions(null)
|
||||
|
||||
await this.userRemoteMethod("${@shiro.getPrincipalProperty('loginname')}")
|
||||
this.$set(this.formData, "userId", this.userOptions[0].id)
|
||||
await this.userChange()
|
||||
},
|
||||
async pageData() {
|
||||
const res = await $.post('/platform/evaluate/apply/pageData', this.pageForm)
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list;
|
||||
this.pageForm.totalCount = res.data.totalCount;
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
async created() {
|
||||
this.honorTypeList = await HonorApi.getHonorType()
|
||||
if (this.honorTypeList) {
|
||||
this.$set(this.pageForm, "honorType", this.honorTypeList[0].id)
|
||||
}
|
||||
await this.initData()
|
||||
await this.getEvaluateByYear()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user