提交
This commit is contained in:
@@ -30,7 +30,7 @@ layout("/layouts/platform.html"){
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-form :model="formData" :rules="formRules" label-width="120px" ref="form">
|
||||
<el-form :model="formData" :rules="formRules" label-width="150px" ref="form">
|
||||
<vi-title title="职工建家申报信息"></vi-title>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
@@ -45,7 +45,7 @@ layout("/layouts/platform.html"){
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="联系方式" prop="mobile">
|
||||
<el-input v-model="formData.mobile" maxlength="11"></el-input>
|
||||
<el-input maxlength="11" v-model="formData.mobile"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -58,28 +58,30 @@ layout("/layouts/platform.html"){
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="填报时间" prop="applyTime">
|
||||
<el-input readonly v-model="formData.applyTime"></el-input>
|
||||
<el-input readonly v-model="formData.applyDate"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="基层工会简况" prop="basicInformation">
|
||||
<el-input type="textarea" v-model="formData.basicInformation" maxlength="500" show-word-limit></el-input>
|
||||
<el-form-item class="is-required" label="基层工会简况"
|
||||
prop="basicInformation">
|
||||
<text-editor v-model="formData.basicInformation"></text-editor>
|
||||
<!-- <el-input type="textarea" v-model="formData.basicInformation" maxlength="500" show-word-limit :rows="10"></el-input>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<vi-title title="职工建家建设方案"></vi-title>
|
||||
<el-form-item prop="constructionPlan">
|
||||
<el-form-item label="职工建家建设方案" prop="constructionPlan">
|
||||
<text-editor v-model="formData.constructionPlan"></text-editor>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row class="mt10" justify="center" type="flex">
|
||||
<el-button @click="doSave()" style="width: 200px" type="primary">保 存</el-button>
|
||||
<el-button @click="doSubmit()" style="width: 200px" type="primary">提 交</el-button>
|
||||
<el-button @click="doSubmit()" style="width: 200px" type="primary">提 交
|
||||
</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
@@ -90,19 +92,43 @@ layout("/layouts/platform.html"){
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data:{
|
||||
id: '',
|
||||
formData: {},
|
||||
formRules: {
|
||||
mobile: [{ required: true, message: '手机号不能为空', trigger: 'blur' },
|
||||
{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号格式', trigger: 'blur' }],
|
||||
basicInformation: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
constructionPlan: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
data() {
|
||||
const validBasicInformation = (rule, value, callback) => {
|
||||
if (!this.formData.basicInformation || !dd3s.html2txt(this.formData.basicInformation)) {
|
||||
callback(new Error('请填写基层工会简况'));
|
||||
} else if (dd3s.html2txt(this.formData.basicInformation).length > 500) {
|
||||
console.log(11)
|
||||
callback(new Error('基层工会简况最多500字'));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
};
|
||||
return {
|
||||
id: '',
|
||||
formData: {},
|
||||
formRules: {
|
||||
mobile: [{required: true, message: '手机号不能为空', trigger: 'blur'},
|
||||
{pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号格式', trigger: 'blur'}],
|
||||
basicInformation: [{
|
||||
required: true,
|
||||
message: '必填',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
constructionPlan: [{
|
||||
required: true,
|
||||
message: '必填',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
basicInformation: [{
|
||||
validator: validBasicInformation,
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
},
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
async doSave(){
|
||||
const resp = await $.post('/platform/wakeshome/declaration/apply/doSave',this.formData)
|
||||
methods: {
|
||||
async doSave() {
|
||||
const resp = await $.post('/platform/wakeshome/declaration/apply/doSave', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success('保存成功')
|
||||
setTimeout(() => {
|
||||
@@ -112,11 +138,11 @@ layout("/layouts/platform.html"){
|
||||
this.$message.warning('操作失败')
|
||||
}
|
||||
},
|
||||
async doSubmit(){
|
||||
async doSubmit() {
|
||||
try {
|
||||
const valid = await this.$refs.form.validate()
|
||||
if (valid) {
|
||||
const resp = await $.post('/platform/wakeshome/declaration/apply/doSubmit',this.formData)
|
||||
const resp = await $.post('/platform/wakeshome/declaration/apply/doSubmit', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success('提交成功')
|
||||
setTimeout(() => {
|
||||
@@ -127,7 +153,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
this.$message.warning('操作失败')
|
||||
// this.$message.warning('请查看是否按要求填写')
|
||||
}
|
||||
},
|
||||
async initFormData() {
|
||||
@@ -135,17 +161,17 @@ layout("/layouts/platform.html"){
|
||||
this.$set(this.formData, 'username', "${@shiro.getPrincipalProperty('username')}")
|
||||
this.$set(this.formData, 'loginName', "${@shiro.getPrincipalProperty('loginname')}")
|
||||
this.$set(this.formData, 'mobile', "${@shiro.getPrincipalProperty('mobile')}")
|
||||
this.$set(this.formData, 'applyTime', moment().format('YYYY-MM-DD'))
|
||||
this.$set(this.formData, 'applyDate', moment().format('YYYY-MM-DD'))
|
||||
this.$set(this.formData, 'unionName', "${@shiro.getPrincipalProperty('union').getUnionname()}")
|
||||
} else {
|
||||
const resp = await $.get('/platform/wakeshome/mine/getInfoById',{id:this.id})
|
||||
if (resp.code === 0){
|
||||
const resp = await $.get('/platform/wakeshome/declaration/apply/getInfoById', {id: this.id})
|
||||
if (resp.code === 0) {
|
||||
this.formData = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
async created(){
|
||||
async created() {
|
||||
this.id = GetQueryString("id")
|
||||
this.initFormData();
|
||||
}
|
||||
|
||||
@@ -11,76 +11,89 @@ layout("/layouts/platform.html"){
|
||||
<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"
|
||||
formData="yyyy"
|
||||
placeholder="请选择年度"
|
||||
style="width: 100%"
|
||||
placeholder="请选择年度">
|
||||
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 placeholder="所属工会" v-model="pageForm.unionId"
|
||||
<el-select @change="doSearch" clearable="true"
|
||||
filterable="true"
|
||||
placeholder="所属工会"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="doSearch"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
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 type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="申报列表" :app="this">
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="申报列表">
|
||||
</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="序号"
|
||||
<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
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop === 'applyDate'">
|
||||
<span>{{ moment(row.applyDate).format('YYYY年MM月DD日') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="280px">
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||
width="280px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" v-if="!['10000'].includes(row.state) && row.state"
|
||||
size="mini" type="primary">查看
|
||||
<el-button @click="openView(row)"
|
||||
size="mini"
|
||||
type="primary"
|
||||
v-if="!['10000'].includes(row.state) && row.state">查看
|
||||
</el-button>
|
||||
<el-button @click="openView(row)" v-if="['10030'].includes(row.state) && row.state"
|
||||
size="mini" type="primary">申报表导出
|
||||
<el-button @click="openExport(row.id)"
|
||||
size="mini"
|
||||
type="primary"
|
||||
v-if="['10030'].includes(row.state) && row.state">申报表导出
|
||||
</el-button>
|
||||
<el-button @click="openEdit(row)" v-if="['10000'].includes(row.state) || !row.state"
|
||||
size="mini" type="primary">编辑
|
||||
</el-button>
|
||||
<el-button @click="doDelete(row)" v-if="['10000'].includes(row.state) || !row.state"
|
||||
size="mini" type="danger">删除
|
||||
<el-button @click="openEdit(row)"
|
||||
size="mini"
|
||||
type="primary"
|
||||
v-if="['10000','10015','10025'].includes(row.state) || !row.state">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button @click="doDelete(row)"
|
||||
v-if="!['10000'].includes(row.state) && row.state && (${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')})"
|
||||
size="mini" type="danger">删除
|
||||
size="mini"
|
||||
type="danger"
|
||||
v-if="['10000'].includes(row.state) || !row.state">删除
|
||||
</el-button>
|
||||
<el-button @click="doDelete(row)"
|
||||
size="mini"
|
||||
type="danger"
|
||||
v-if="!['10000'].includes(row.state) && row.state && (${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')})">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -112,7 +125,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'username', label: '申报人', sortable: true},
|
||||
{prop: 'loginName', label: '申报人工号', sortable: true},
|
||||
{prop: 'mobile', label: '联系方式', sortable: true},
|
||||
{prop: 'basicInformation', label: '基本情况简介', sortable: true},
|
||||
// {prop: 'basicInformation', label: '基本情况简介', sortable: true},
|
||||
{prop: 'applyDate', label: '申报日期', sortable: true},
|
||||
{prop: 'stateName', label: '审核状态', sortable: true},
|
||||
],
|
||||
@@ -123,6 +136,9 @@ layout("/layouts/platform.html"){
|
||||
'wakes-info-apply': httpVueLoader('/components/wakeshome/declaration/WakesHomeInfoApply.vue')
|
||||
},
|
||||
methods: {
|
||||
openExport(id) {
|
||||
window.open(loc() + "/openExport?id=" + id)
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row.id)
|
||||
|
||||
@@ -150,7 +150,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'username', label: '申报人', sortable: true},
|
||||
{prop: 'loginName', label: '申报人工号', sortable: true},
|
||||
{prop: 'mobile', label: '联系方式', sortable: true},
|
||||
{prop: 'basicInformation', label: '基本情况简介', sortable: true},
|
||||
// {prop: 'basicInformation', label: '基本情况简介', sortable: true},
|
||||
{prop: 'applyDate', label: '申报日期', sortable: true},
|
||||
{prop: 'stateName', label: '审核状态', sortable: true},
|
||||
],
|
||||
|
||||
@@ -150,7 +150,7 @@ layout("/layouts/platform.html"){
|
||||
{prop: 'username', label: '申报人', sortable: true},
|
||||
{prop: 'loginName', label: '申报人工号', sortable: true},
|
||||
{prop: 'mobile', label: '联系方式', sortable: true},
|
||||
{prop: 'basicInformation', label: '基本情况简介', sortable: true},
|
||||
// {prop: 'basicInformation', label: '基本情况简介', sortable: true},
|
||||
{prop: 'applyDate', label: '申报日期', sortable: true},
|
||||
{prop: 'stateName', label: '审核状态', sortable: true},
|
||||
],
|
||||
|
||||
@@ -134,7 +134,7 @@ layout("/layouts/platform.html"){
|
||||
<el-date-picker
|
||||
v-model="row.awardTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择获奖日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
@@ -238,9 +238,9 @@ layout("/layouts/platform.html"){
|
||||
async doSave() {
|
||||
let postUrl = ''
|
||||
if (this.formData.id) {
|
||||
postUrl = '/platform/wakeshome/apply/doEdit'
|
||||
postUrl = loc()+'/doEdit'
|
||||
} else {
|
||||
postUrl = '/platform/wakeshome/apply/doAdd'
|
||||
postUrl = loc()+'/doAdd'
|
||||
}
|
||||
const formData = this.doJsonStr(this.formData)
|
||||
formData.isSubmit = false;
|
||||
@@ -248,7 +248,7 @@ layout("/layouts/platform.html"){
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
setTimeout(() => {
|
||||
sublime.jumpPagePjax('/platform/wakeshome/mine')
|
||||
sublime.jumpPagePjax('/platform/wakeshome/declaration/mine')
|
||||
}, 500)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
@@ -260,9 +260,9 @@ layout("/layouts/platform.html"){
|
||||
if (valid) {
|
||||
let postUrl = ''
|
||||
if (this.formData.id) {
|
||||
postUrl = '/platform/wakeshome/apply/doEdit'
|
||||
postUrl = loc()+'/doEdit'
|
||||
} else {
|
||||
postUrl = '/platform/wakeshome/apply/doAdd'
|
||||
postUrl = loc()+'/doAdd'
|
||||
}
|
||||
const formData = this.doJsonStr(this.formData)
|
||||
formData.isSubmit = true
|
||||
@@ -270,7 +270,7 @@ layout("/layouts/platform.html"){
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
setTimeout(() => {
|
||||
sublime.jumpPagePjax('/platform/wakeshome/mine')
|
||||
sublime.jumpPagePjax('/platform/wakeshome/declaration/mine')
|
||||
}, 500)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
@@ -296,7 +296,7 @@ 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/mine/getInfoById',{id:this.id})
|
||||
const resp = await $.get('/platform/wakeshome/declaration/mine/getInfoById',{id:this.id})
|
||||
if (resp.code === 0){
|
||||
this.formData = {...resp.data}
|
||||
}
|
||||
|
||||
@@ -136,11 +136,11 @@ layout("/layouts/platform.html"){
|
||||
<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">
|
||||
<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">
|
||||
<span class="header-label">位置:{{item.position}}</span>
|
||||
<el-button type="text" class="header-label">查看位置</el-button>
|
||||
</el-tooltip>
|
||||
<!--<span class="header-label"></span>-->
|
||||
</div>
|
||||
|
||||
@@ -11,62 +11,75 @@ layout("/layouts/platform.html"){
|
||||
<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"
|
||||
formData="yyyy"
|
||||
placeholder="请选择年度"
|
||||
style="width: 100%"
|
||||
placeholder="请选择年度">
|
||||
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 placeholder="所属工会" v-model="pageForm.unionId"
|
||||
<el-select @change="doSearch" clearable="true"
|
||||
filterable="true"
|
||||
placeholder="所属工会"
|
||||
style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="doSearch"
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname"
|
||||
:value="item.id"></el-option>
|
||||
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 type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="申报列表" :app="this">
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="申报列表">
|
||||
</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="序号"
|
||||
<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
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
: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" header-align="center" label="操作" fixed="right" width="150px">
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||
width="150px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" v-if="![8100].includes(row.state) && row.state" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openEdit(row)" v-if="[8100].includes(row.state) || !row.state" size="mini" type="primary">编辑</el-button>
|
||||
<el-button @click="doDelete(row)" v-if="[8100].includes(row.state) || !row.state" size="mini" type="danger">删除</el-button>
|
||||
<el-button @click="doDelete(row)" v-if="![8100].includes(row.state) && row.state && (${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')})" size="mini" type="danger">删除</el-button>
|
||||
<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].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>
|
||||
@@ -83,13 +96,13 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el:'#app',
|
||||
mixins:[initTableMixins],
|
||||
data(){
|
||||
return{
|
||||
unions:[],
|
||||
pageForm:{
|
||||
isAudit:false,
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
unions: [],
|
||||
pageForm: {
|
||||
isAudit: false,
|
||||
year: moment().format('YYYY'),
|
||||
},
|
||||
tableColumns: [
|
||||
@@ -105,25 +118,32 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'wakes-info': httpVueLoader('/components/wakeshome/info/WakesHomeInfo.vue')
|
||||
},
|
||||
methods:{
|
||||
openView(row){
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.openView(row.id)
|
||||
},
|
||||
async doDelete(row){
|
||||
const resp = await $.get(loc() + '/doRemove',{id:row.id})
|
||||
if (resp.code === 0){
|
||||
this.notifySuccess(resp.msg)
|
||||
this.pageData();
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
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){
|
||||
window.location.href = '/platform/wakeshome/apply?id=' + row.id;
|
||||
openEdit(row) {
|
||||
sublime.jumpPagePjax('/platform/wakeshome/declaration/apply?id=' + row.id)
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
@@ -133,10 +153,10 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
},
|
||||
async created(){
|
||||
async created() {
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
||||
this.unions = await getUnions(null, false)
|
||||
this.unions.unshift({id:'校工会',unionname:'校工会'})
|
||||
this.unions.unshift({id: '校工会', unionname: '校工会'})
|
||||
} else {
|
||||
this.unions = await getUnions(null, true)
|
||||
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
||||
|
||||
Reference in New Issue
Block a user