commit
This commit is contained in:
@@ -1,203 +0,0 @@
|
||||
<!--#
|
||||
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
|
||||
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-input clearable maxlength="50" v-model="pageForm.subjectName"></el-input>
|
||||
</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="分管校领导审核">
|
||||
<template #func>
|
||||
<el-radio-group @change="doSearch" size="small" v-model="pageForm.auditState">
|
||||
<el-radio-button :label="0">全部</el-radio-button>
|
||||
<el-radio-button :label="1">已审核</el-radio-button>
|
||||
<el-radio-button :label="-1">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<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"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='subjectName'">
|
||||
<el-link @click="openView(row.id)" type="primary">{{ row.subjectName }}</el-link>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='publicity'">
|
||||
<template v-if="row.publicity!=null">
|
||||
<span :class="row.publicity?'text-success':'text-danger'">{{row.publicity?'是':'否'}}</span>
|
||||
</template>
|
||||
<span v-else>无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="300px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row.id)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openAudit(row.id)" size="mini" type="primary"
|
||||
v-if="row.stateCode===3015">审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<offer-advice-info ref="offerAdviceAudit">
|
||||
<template #handle>
|
||||
<el-tab-pane label="分管校领导审核" name="leaderAudit">
|
||||
<el-form :model="formData" :rules="formRules" label-width="120px" ref="auditForm">
|
||||
<vi-title title="审核信息"></vi-title>
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人" prop="username">
|
||||
<el-input readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="auditTime">
|
||||
<el-input :value="moment().format('YYYY-MM-DD HH:mm:ss')" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="处理意见" prop="auditOpinion">
|
||||
<el-input
|
||||
:rows="5"
|
||||
maxlength="100"
|
||||
placeholder="请输入处理意见"
|
||||
type="textarea"
|
||||
v-model="formData.auditOpinion">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="是否公示" prop="publicity">
|
||||
<el-radio-group size="small" v-model="formData.publicity">
|
||||
<el-radio :label="true" border>是</el-radio>
|
||||
<el-radio :label="false" border>否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row justify="end" type="flex">
|
||||
<el-button @click="$refs.guava.index()">取消</el-button>
|
||||
<el-button @click="doAudit" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</offer-advice-info>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<offer-advice-info ref="offerAdviceView"></offer-advice-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'offer-advice-info': httpVueLoader('/components/offerAdvice/OfferAdviceInfo.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
typeOptions: [],
|
||||
pageForm: {
|
||||
subjectName: null,
|
||||
year: null,
|
||||
auditState: -1
|
||||
},
|
||||
tableColumns: [
|
||||
{label: '主题', prop: 'subjectName'},
|
||||
{label: '时间', prop: 'createTime'},
|
||||
{label: '姓名', prop: 'createUserName'},
|
||||
{label: '工号', prop: 'createLoginName'},
|
||||
{label: '类型', prop: 'typeName'},
|
||||
{label: '是否公示', prop: 'publicity'},
|
||||
{label: '状态', prop: 'stateName'},
|
||||
],
|
||||
formData: {
|
||||
auditOpinion: null,
|
||||
publicity: null
|
||||
},
|
||||
formRules: {
|
||||
auditOpinion: [{required: true, message: '请输入处理意见', trigger: ['blur', 'change']}],
|
||||
publicity: [{required: true, message: '请选择是否建议公示', trigger: ['blur', 'change']}],
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(id) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.offerAdviceView.openView(id)
|
||||
},
|
||||
openAudit(id) {
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.offerAdviceAudit.openAudit(id, 'leaderAudit')
|
||||
if (this.$refs.auditForm) {
|
||||
this.$refs.auditForm.resetFields()
|
||||
}
|
||||
this.formData.id = id
|
||||
},
|
||||
async doAudit() {
|
||||
const valid = await this.$refs.auditForm.validate()
|
||||
if (!valid) return
|
||||
const resp = await $.post(loc() + '/doAudit', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,151 +0,0 @@
|
||||
<!--#
|
||||
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
|
||||
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-input clearable maxlength="50" v-model="pageForm.subjectName"></el-input>
|
||||
</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="建言献策">
|
||||
<template #func>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<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"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='subjectName'">
|
||||
<el-link @click="openView(row.id)" type="primary">{{ row.subjectName }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="250px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row.id)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openEdit(row.id)" size="mini" type="primary" v-if="row.stateCode===3000">
|
||||
编辑
|
||||
</el-button>
|
||||
<!-- <el-button @click="doSubmit(row.id)" size="mini" type="primary">提交</el-button>-->
|
||||
<el-button @click="doDelete(row.id)" size="mini" type="danger" v-if="row.stateCode===3000">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<offer-advice-info ref="offerAdviceView"></offer-advice-info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'offer-advice-info': httpVueLoader('/components/offerAdvice/OfferAdviceInfo.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
typeOptions: [],
|
||||
pageForm: {
|
||||
subjectName: null,
|
||||
year: null
|
||||
},
|
||||
tableColumns: [
|
||||
{label: '主题', prop: 'subjectName'},
|
||||
{label: '时间', prop: 'createTime'},
|
||||
{label: '类型', prop: 'typeName'},
|
||||
{label: '状态', prop: 'stateName'},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(id) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.offerAdviceView.openView(id)
|
||||
},
|
||||
openEdit(id) {
|
||||
sublime.jumpPagePjax('/platform/offerAdviceWrite?id=' + id)
|
||||
},
|
||||
async doSubmit(id) {
|
||||
const confirm = await this.$confirm('您确定要提交吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
const resp = await $.post(loc() + '/doSubmit/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
|
||||
},
|
||||
async doDelete(id) {
|
||||
const confirm = await this.$confirm('您确定要删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm !== 'confirm') return
|
||||
const resp = await $.post(loc() + '/doDelete/' + id)
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,155 +0,0 @@
|
||||
<!--#
|
||||
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
|
||||
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-input clearable maxlength="50" v-model="pageForm.subjectName"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">分工会:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select @change="unionChange" clearable filterable style="width: 100%"
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id"
|
||||
v-for="item in unionOptions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">单位:</div>
|
||||
<div class="search-item-option">
|
||||
<el-select clearable filterable style="width: 100%" v-model="pageForm.unitId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
v-for="item in unitOptions"></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"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<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"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='subjectName'">
|
||||
<el-link @click="openView(row.id)" type="primary">{{ row.subjectName }}</el-link>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='publicity'">
|
||||
<template v-if="row.publicity!=null">
|
||||
<span :class="row.publicity?'text-success':'text-danger'">{{row.publicity?'是':'否'}}</span>
|
||||
</template>
|
||||
<span v-else>无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="300px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row.id)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openAudit(row.id)" size="mini" type="primary"
|
||||
v-if="row.stateCode===3015">审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<offer-advice-info ref="offerAdviceView"></offer-advice-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'offer-advice-info': httpVueLoader('/components/offerAdvice/OfferAdviceInfo.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
typeOptions: [],
|
||||
pageForm: {
|
||||
subjectName: null,
|
||||
year: null,
|
||||
unionId: null,
|
||||
unitId: null
|
||||
},
|
||||
tableColumns: [
|
||||
{label: '主题', prop: 'subjectName'},
|
||||
{label: '时间', prop: 'createTime'},
|
||||
{label: '姓名', prop: 'createUserName'},
|
||||
{label: '工号', prop: 'createLoginName'},
|
||||
{label: '类型', prop: 'typeName'},
|
||||
{label: '单位', prop: 'unitName'},
|
||||
{label: '工会', prop: 'unionName'},
|
||||
{label: '是否公示', prop: 'publicity'},
|
||||
{label: '状态', prop: 'stateName'},
|
||||
],
|
||||
unitOptions: [],
|
||||
unionOptions: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(id) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.offerAdviceView.openView(id)
|
||||
},
|
||||
async unionChange(id) {
|
||||
this.$set(this.pageForm, 'unitId', null)
|
||||
this.unitOptions = await getUnits(id)
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.unionOptions = await getUnions(null)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,229 +0,0 @@
|
||||
<!--#
|
||||
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
|
||||
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-input clearable maxlength="50" v-model="pageForm.subjectName"></el-input>
|
||||
</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="校工会审核">
|
||||
<template #func>
|
||||
<el-radio-group @change="doSearch" size="small" v-model="pageForm.auditState">
|
||||
<el-radio-button :label="0">全部</el-radio-button>
|
||||
<el-radio-button :label="1">已审核</el-radio-button>
|
||||
<el-radio-button :label="-1">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
align="center"
|
||||
header-align="center">
|
||||
<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"
|
||||
>
|
||||
<template scope="{row}" v-if="column.prop=='subjectName'">
|
||||
<el-link @click="openView(row.id)" type="primary">{{ row.subjectName }}</el-link>
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop=='publicity'">
|
||||
<template v-if="row.publicity!=null">
|
||||
<span :class="row.publicity?'text-success':'text-danger'">{{row.publicity?'是':'否'}}</span>
|
||||
</template>
|
||||
<span v-else>无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="300px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row.id)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="openAudit(row.id)" size="mini" type="primary"
|
||||
v-if="row.stateCode===3005">审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<offer-advice-info ref="offerAdviceAudit">
|
||||
<template #handle>
|
||||
<el-tab-pane label="校工会审核" name="schoolUnionAudit">
|
||||
<el-form :model="formData" :rules="formRules" label-width="120px" ref="auditForm">
|
||||
<vi-title title="审核信息"></vi-title>
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核人" prop="username">
|
||||
<el-input readonly
|
||||
value="${@shiro.getPrincipalProperty('username')}"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="审核时间" prop="auditTime">
|
||||
<el-input :value="moment().format('YYYY-MM-DD HH:mm:ss')" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="承办单位" prop="undertakeUnitId">
|
||||
<el-select clearable filterable style="width: 100%"
|
||||
v-model="formData.undertakeUnitId">
|
||||
<el-option :key="item.id"
|
||||
:label="item.unitName"
|
||||
:value="item.id"
|
||||
v-for="item in underTakeOptions">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="分管校领导">
|
||||
<el-input :value="underTakeLeaderUserName" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="处理意见" prop="auditOpinion">
|
||||
<el-input
|
||||
:rows="5"
|
||||
maxlength="100"
|
||||
placeholder="请输入处理意见"
|
||||
type="textarea"
|
||||
v-model="formData.auditOpinion">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row justify="end" type="flex">
|
||||
<el-button @click="$refs.guava.index()">取消</el-button>
|
||||
<el-button @click="doAudit" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
|
||||
</el-tab-pane>
|
||||
</template>
|
||||
</offer-advice-info>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<offer-advice-info ref="offerAdviceView"></offer-advice-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'offer-advice-info': httpVueLoader('/components/offerAdvice/OfferAdviceInfo.vue')
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
typeOptions: [],
|
||||
pageForm: {
|
||||
subjectName: null,
|
||||
year: null,
|
||||
auditState: -1
|
||||
},
|
||||
tableColumns: [
|
||||
{label: '主题', prop: 'subjectName'},
|
||||
{label: '时间', prop: 'createTime'},
|
||||
{label: '姓名', prop: 'createUserName'},
|
||||
{label: '工号', prop: 'createLoginName'},
|
||||
{label: '类型', prop: 'typeName'},
|
||||
{label: '是否公示', prop: 'publicity'},
|
||||
{label: '状态', prop: 'stateName'},
|
||||
],
|
||||
formData: {
|
||||
undertakeUnitId: null,
|
||||
auditOpinion: null
|
||||
},
|
||||
underTakeOptions: [],
|
||||
formRules: {
|
||||
undertakeUnitId: [{required: true, message: '请选择承办单位', trigger: ['blur', 'change']}],
|
||||
auditOpinion: [{required: true, message: '请输入处理意见', trigger: ['blur', 'change']}],
|
||||
schoolUnionPublicity: [{required: true, message: '请选择是否建议公示', trigger: ['blur', 'change']}],
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
underTakeLeaderUserName() {
|
||||
const underTake = this.underTakeOptions.find(v => v.id === this.formData.undertakeUnitId)
|
||||
return underTake ? underTake.leader : ''
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
openView(id) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.offerAdviceView.openView(id)
|
||||
},
|
||||
openAudit(id) {
|
||||
this.$refs.guava.edit()
|
||||
this.$refs.offerAdviceAudit.openAudit(id, 'schoolUnionAudit')
|
||||
if (this.$refs.auditForm) {
|
||||
this.$refs.auditForm.resetFields()
|
||||
}
|
||||
this.formData.id = id
|
||||
},
|
||||
async getProposalUndertakeAndLeaderInfo() {
|
||||
const resp = await $.get('/platform/proposal/transact/case/case/getUnderTakeAndLeader')
|
||||
return resp.code === 0 ? resp.data : []
|
||||
},
|
||||
async doAudit() {
|
||||
const valid = await this.$refs.auditForm.validate()
|
||||
if (!valid) return
|
||||
const resp = await $.post(loc() + '/doAudit', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.underTakeOptions = await this.getProposalUndertakeAndLeaderInfo()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -1,191 +0,0 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<h3 style="color: #1867b0">上报建言献策</h3>
|
||||
</template>
|
||||
<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="createUserName">
|
||||
<el-input readonly type="text" v-model="formData.createUserName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="时间" prop="createTime">
|
||||
<el-date-picker readonly
|
||||
style="width: 100%"
|
||||
type="datetime"
|
||||
v-model="formData.createTime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" type="flex">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="主题" prop="subjectName">
|
||||
<el-input maxlength="100" placeholder="主题"
|
||||
v-model="formData.subjectName"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="类型" prop="typeId">
|
||||
<el-select clearable filterable placeholder="类型"
|
||||
style="width: 100%"
|
||||
v-model="formData.typeId">
|
||||
<el-option
|
||||
:key="item.id"
|
||||
:label="item.typeName"
|
||||
:value="item.id"
|
||||
v-for="item in typeOptions">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="内  容" prop="brief">
|
||||
<!-- <div id="briefEditor"></div>-->
|
||||
<text-editor v-model="formData.brief"></text-editor>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="建议措施" prop="measures">
|
||||
<!-- <div id="measuresEditor"></div>-->
|
||||
<text-editor v-model="formData.measures"></text-editor>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="附件上传" prop="files">
|
||||
<file-upload :files.sync="formData.files" card></file-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row justify="center" type="flex">
|
||||
<el-button @click="doHandler('save')" type="primary" v-throttle>保存</el-button>
|
||||
<el-button @click="doHandler('submit')" type="primary" v-throttle>提交</el-button>
|
||||
</el-row>
|
||||
|
||||
</template>
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let briefEditor, measuresEditor = null
|
||||
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
const validBrief = (rule, value, callback) => {
|
||||
if (!this.formData.brief || removeHTMLTag(this.formData.brief).length === 0) {
|
||||
callback(new Error('请填写内容'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
const validMeasures = (rule, value, callback) => {
|
||||
if (!this.formData.measures || removeHTMLTag(this.formData.measures).length === 0) {
|
||||
callback(new Error('请填写检验措施'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
return {
|
||||
formRules: {
|
||||
subjectName: [{required: true, message: '请填写主题', trigger: ['blur', 'change']}],
|
||||
typeId: [{required: true, message: '请选择类型', trigger: ['blur', 'change']}],
|
||||
brief: [{validator: validBrief, required: true, message: '请输入内容'}],
|
||||
measures: [{validator: validMeasures, required: true, message: '请输入建议措施'}],
|
||||
},
|
||||
formData: {
|
||||
subjectName: null,
|
||||
typeId: null,
|
||||
brief: null,
|
||||
measures: null,
|
||||
files: null,
|
||||
isSubmit: true
|
||||
},
|
||||
typeOptions: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async initData() {
|
||||
this.typeOptions = await proposal.getProposalType()
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
const resp = await $.post(loc() + '/findOne/' + id)
|
||||
this.formData = resp.data
|
||||
// this.initRichTextEditor(resp.data.brief, resp.data.measures)
|
||||
} else {
|
||||
this.$set(this.formData, 'createUserName', '${@shiro.getPrincipalProperty("username")}')
|
||||
this.$set(this.formData, 'createTime', moment().format('YYYY-MM-DD HH:mm:ss'))
|
||||
}
|
||||
},
|
||||
initRichTextEditor(briefContent, measuresContent) {
|
||||
setTimeout(() => {
|
||||
$("#briefEditor").html("")
|
||||
$("#measuresEditor").html("")
|
||||
briefEditor = new wangEditor("#briefEditor")
|
||||
briefEditor.config.onchange = (html) => {
|
||||
this.formData.brief = html
|
||||
this.$refs.form.validateField('brief', (errMsg) => {
|
||||
})
|
||||
}
|
||||
measuresEditor = new wangEditor("#measuresEditor")
|
||||
measuresEditor.config.onchange = (html) => {
|
||||
this.formData.measures = html
|
||||
this.$refs.form.validateField('measures', (errMsg) => {
|
||||
})
|
||||
}
|
||||
briefEditor.create()
|
||||
measuresEditor.create()
|
||||
if (briefContent) {
|
||||
briefEditor.txt.html(briefContent)
|
||||
}
|
||||
if (measuresContent) {
|
||||
measuresEditor.txt.html(measuresContent)
|
||||
}
|
||||
|
||||
}, 100)
|
||||
},
|
||||
async doHandler(mode = 'save') {
|
||||
if ('save' === mode) {
|
||||
this.formData.isSubmit = false
|
||||
let valid = false
|
||||
this.$refs.form.validateField('subjectName', (errMsg) => {
|
||||
valid = errMsg === ''
|
||||
})
|
||||
if (!valid) return
|
||||
} else {
|
||||
this.formData.isSubmit = true
|
||||
const valid = await this.$refs.form.validate()
|
||||
if (!valid) return
|
||||
}
|
||||
const resp = await $.post(loc() + '/doHandler', {offerAdvice: JSON.stringify(this.formData)})
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
sublime.jumpPagePjax('/platform/offerAdviceMine')
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
// this.initRichTextEditor()
|
||||
await this.initData()
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user