git查看用户

This commit is contained in:
Paidax
2026-03-20 15:09:35 +08:00
parent ad326ec240
commit c5fbf8576c
39 changed files with 2924 additions and 609 deletions
@@ -114,6 +114,31 @@ const initTableMixins = {
this.$set(this.pageForm, 'isAudit', approvalParam === 'done')
this._approvalInitialized = true;
}
},
fileHandleRemove(file, fileList) {
return fileList;
},
fileHandleChange(file, fileList, {type, size}) {
const removeFile = () => {
fileList.splice(fileList.findIndex(v => v === file))
}
if (!file.size) {
this.notifyWarning('您选择的是空文件!')
removeFile()
}
if (type && type.length && !type.includes(file.name.split('.').pop().toLowerCase())) {
this.notifyWarning(`文件只能是 ${type.map(v => v.toUpperCase()).join('/')} 格式!`)
removeFile()
}
if (size && !file.size < size) {
this.notifyWarning(`文件大小不能超过 ${size / 1024 / 1024}MB`)
removeFile()
}
return fileList;
}
},
created() {
Binary file not shown.
@@ -0,0 +1,108 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="教代会">
<el-select @change="meetingChange" clearable filterable placeholder="所属教代会"
v-model="pageForm.sessionId">
<el-option :key="item.id" :label="item.fullName" :value="item.id"
v-for="item in sessionOptions"></el-option>
</el-select>
</search-item>
<search-item label="提案名称">
<el-input v-model="pageForm.name" placeholder="提案名称" @keyup.enter.native="doSearch" clearable
style="width: 100%"></el-input>
</search-item>
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.createUserKeyword"></el-input>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool :columns.sync="tableColumns">
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
<el-table-column label="序号" width="50" type="index" :index="indexMethod" fixed="left"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.key"
:min-width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
v-for="column in tableColumns"
v-if="column.visible !== false"
>
<template v-if="column.prop === 'instanceState'" scope="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="300px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include('../../common/info.js'){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
components: {
"proposal-info": PROPOSAL_INFO
},
data() {
return {
tableColumns: [
{label: "提案编号", prop: "code"},
{label: "提案名称", prop: "name", width: "200px"},
{label: "提案人", prop: "createUserName", width: "80px"},
{label: "提案类别", prop: "typeName"},
{label: "届次", prop: "sessionName"},
{label: "代表团", prop: "delegationName"},
{label: "流程状态", prop: "instanceState"}
],
pageForm: {
approval: false
},
showApprovalForm: false,
}
},
created() {
this.pageData()
this.listOpenSession()
},
methods: {
// 查询开启的教代会
listOpenSession() {
this.$axios.post("/platform/proposal/common/listOpenSession").then((res) => {
if (res.code === 0) {
this.sessionOptions = res.data
if (this.sessionOptions) {
this.$set(this.pageForm, "sessionId", this.sessionOptions[0].id)
this.pageData()
this.listDelegation()
}
}
})
},
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,202 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="教代会">
<el-select @change="meetingChange" clearable filterable placeholder="所属教代会"
v-model="pageForm.sessionId">
<el-option :key="item.id" :label="item.fullName" :value="item.id"
v-for="item in sessionOptions"></el-option>
</el-select>
</search-item>
<search-item label="提案名称">
<el-input v-model="pageForm.name" placeholder="提案名称" @keyup.enter.native="doSearch" clearable
style="width: 100%"></el-input>
</search-item>
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.createUserKeyword"></el-input>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool :columns.sync="tableColumns">
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
<el-radio-button :label="true">已审核</el-radio-button>
<el-radio-button :label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
<el-table-column label="序号" width="50" type="index" :index="indexMethod" fixed="left"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.key"
:min-width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
v-for="column in tableColumns"
v-if="column.visible !== false"
>
<template v-if="column.prop === 'instanceState'" scope="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="300px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<proposal-info ref="proposalInfoRef">
<div v-if="showApprovalForm">
<div class="process-title">
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="150px" label-suffix="">
<el-row gutter="20">
<el-col :span="12">
<el-form-item label="审核人" proop="tf_username">
<el-input readonly v-model="formData.tf_username"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审核时间">
<el-input readonly v-model="formData.tf_auditTime"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="二次答复" prop="tf_caseCheckNeedSecondReply">
<el-radio-group v-model="formData.tf_caseCheckNeedSecondReply">
<el-radio :label="0" border>
无需二次答复
</el-radio>
<el-radio :label="1" border>
需要二次答复
</el-radio>
</el-radio-group>
<span class="text-primary ml10" v-if="formData.tf_caseCheckNeedSecondReply">
(二次答复只需要主办单位答复)
</span>
</el-form-item>
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到提案人</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">不同意</el-button>
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意</el-button>
</el-row>
</div>
</proposal-info>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include('../../common/info.js'){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
components: {
"proposal-info": PROPOSAL_INFO
},
data() {
return {
tableColumns: [
{label: "提案编号", prop: "code"},
{label: "提案名称", prop: "name", width: "200px"},
{label: "提案人", prop: "createUserName", width: "80px"},
{label: "提案类别", prop: "typeName"},
{label: "届次", prop: "sessionName"},
{label: "代表团", prop: "delegationName"},
{label: "当前节点", prop: "curTaskName"},
{label: "流程状态", prop: "instanceState"}
],
pageForm: {
approval: false
},
showApprovalForm: false,
}
},
created() {
this.pageData()
this.listOpenSession()
},
methods: {
openView(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = false
this.$refs.proposalInfoRef.onOpen(row)
})
},
openAudit(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName,
tf_auditTime: this.$moment().format('YYYY-MM-DD'),
tf_username: this.$store.state.user.username
}
this.$refs.proposalInfoRef.onOpen(row)
})
},
// 查询开启的教代会
listOpenSession() {
this.$axios.post("/platform/proposal/common/listOpenSession").then((res) => {
if (res.code === 0) {
this.sessionOptions = res.data
if (this.sessionOptions) {
this.$set(this.pageForm, "sessionId", this.sessionOptions[0].id)
this.pageData()
this.listDelegation()
}
}
})
},
handleTaskAction(val) {
this.$refs.formRef.validate(valid => {
if (!valid) return
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
})
})
})
}
}
})
</script>
<!--#
}
#-->
@@ -2,429 +2,351 @@
layout("/layouts/platform.html"){
#-->
<style></style>
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="提案编号">
<el-input v-model="pageForm.code" placeholder="提案编号" @keyup.enter.native="doSearch" clearable style="width: 100%"></el-input>
</search-item>
<search-item label="提案名称">
<el-input v-model="pageForm.name" placeholder="提案名称" @keyup.enter.native="doSearch" clearable style="width: 100%"></el-input>
</search-item>
<search-item label="提案人姓名">
<el-input
@keyup.enter.native="doSearch"
clearable
placeholder="请输入提案人姓名"
v-model="pageForm.createUserName"
style="width: 100%"
></el-input>
</search-item>
<search-item label="提案人工号">
<el-input
@keyup.enter.native="doSearch"
clearable
placeholder="请输入提案人工号"
v-model="pageForm.createUserLoginName"
style="width: 100%"
></el-input>
</search-item>
<search-item label="教代会">
<el-select @change="meetingChange" clearable filterable placeholder="所属教代会" v-model="pageForm.sessionId">
<el-option :key="item.id" :label="item.fullName" :value="item.id" v-for="item in sessionOptions"></el-option>
</el-select>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool>
<el-button @click="openConsolidationApproval" size="small" type="primary" class="mr5">重新并案审核</el-button>
<el-radio-group v-model="pageForm.approval" @change="doSearch();$refs.tableRef.clearSelection()" size="small">
<el-radio-button :label="true">已审核</el-radio-button>
<el-radio-button :label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table
:data="tableData"
ref="tableRef"
@sort-change="pageOrder"
header-align="center"
style="width: 100%"
:row-key="(val)=>{val.id + val.processInstanceTaskId}"
>
<el-table-column
v-if="!pageForm.approval"
type="selection"
reserve-selection
:selectable="(row)=>row.processInstanceTaskStatus==='ACTIVE'"
></el-table-column>
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
<el-table-column label="提案编号" prop="code" width="120" sortable></el-table-column>
<el-table-column label="提案名称" prop="name" show-overflow-tooltip></el-table-column>
<el-table-column label="提案人" prop="createUserName"></el-table-column>
<el-table-column label="代表团" prop="delegationName" show-overflow-tooltip></el-table-column>
<el-table-column label="立案结果" prop="caseFilingResult">
<template scope="{row}">
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT" :value="row.caseFilingResult"></dict-tag>
</template>
</el-table-column>
<el-table-column label="是否并案" prop="isConsolidation">
<template scope="{row}">
<el-tag size="mini" v-if="row.isConsolidation" type="success"></el-tag>
<el-tag size="mini" v-else type="danger"></el-tag>
</template>
</el-table-column>
<el-table-column label="当前节点" prop="processInstanceNodeName" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" fixed="right" width="200px">
<template scope="{row}">
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
<el-button v-if="row.processInstanceTaskStatus==='ACTIVE'" @click="openApproval(row)" size="mini" type="primary">
审核
</el-button>
<el-button
v-if="row.processInstanceTaskStatus==='COMPLETE' && !row.nextTaskIsComplete"
@click="openRevoke(row.processInstanceTaskId)"
size="mini"
type="danger"
>
撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #public>
<proposal-info ref="infoRef"></proposal-info>
<div v-if="showApprovalForm">
<div class="process-title">{{formData.processInstanceNodeName}}</div>
<el-alert v-if="formData.isConsolidation" type="success" title="提醒:本提案已并案,您只需审核一次即可!"></el-alert>
<el-divider></el-divider>
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px">
<el-form-item label="立案结果" prop="caseFilingResult" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-radio-group v-model="formData.caseFilingResult" size="small">
<el-radio v-for="item in dict.type.PROPOSAL_CASE_FILING_RESULT" :label="item.code" border>{{item.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="主办单位"
v-if="['CONFIRM_FILING','SUGGESTION'].includes(formData.caseFilingResult)"
:rules="[{required:['CONFIRM_FILING','SUGGESTION'].includes(formData.caseFilingResult),message:'必填',trigger:['change','blur']}]"
>
<el-select v-model="formData.hostUnitId" filterable clearable style="width: 100%">
<el-option
v-for="item in underTakeOptions"
:label="item.name"
:value="item.id"
:key="item.id"
:disabled="formData && formData.helpUnitIds.includes(item.id)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="协办单位" v-if="['CONFIRM_FILING','SUGGESTION'].includes(formData.caseFilingResult)">
<el-select v-model="formData.helpUnitIds" filterable clearable multiple style="width: 100%">
<el-option
v-for="item in underTakeOptions"
:label="item.name"
:value="item.id"
:key="item.id"
:disabled="item.id===formData.hostUnitId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="审核意见" prop="approvalOpinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
</el-form-item>
<!-- <el-form-item label="电子签名" prop="approvalSignature" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">-->
<!-- <pc-signature v-model="formData.approvalSignature"></pc-signature>-->
<!-- </el-form-item>-->
</el-form>
<el-row type="flex" justify="end">
<el-button plain @click="$refs.guava.index()">取消</el-button>
<el-button type="primary" @click="doApproval('DYNAMIC')">提交</el-button>
</el-row>
</div>
</template>
<template #edit>
<div class="process-title">并案提案列表</div>
<el-table :data="consolidationProposalTableData" size="small">
<el-table-column label="序号" width="50" type="index" :index="indexMethod"></el-table-column>
<el-table-column label="提案编号" prop="code" width="120px" sortable></el-table-column>
<el-table-column label="提案名称" prop="name" show-overflow-tooltip></el-table-column>
<el-table-column label="提案人" prop="createUserName" width="200px"></el-table-column>
<el-table-column label="代表团" prop="delegationName" width="300px"></el-table-column>
<el-table-column label="立案结果" prop="caseFilingResult" width="100px">
<template scope="{row}">
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT" :value="row.caseFilingResult"></dict-tag>
</template>
</el-table-column>
<el-table-column label="是否并案" prop="isConsolidation" width="100px">
<template scope="{row}">
<el-tag size="mini" v-if="row.isConsolidation" type="success"></el-tag>
<el-tag size="mini" v-else type="danger"></el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="100px">
<template scope="{row}">
<el-link size="mini" type="primary" @click="openViewDialog(row)">查看</el-link>
</template>
</el-table-column>
</el-table>
<div class="process-title">{{consolidationFormData.processInstanceNodeName}}</div>
<el-form :model="consolidationFormData" ref="consolidationFormRef" label-position="left" label-width="80px">
<el-form-item label="立案结果" prop="caseFilingResult" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-radio-group v-model="consolidationFormData.caseFilingResult" size="small">
<el-radio v-for="item in dict.type.PROPOSAL_CASE_FILING_RESULT" :label="item.code" border>{{item.label}}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="主办单位"
v-if="['CONFIRM_FILING','SUGGESTION'].includes(consolidationFormData.caseFilingResult)"
:rules="[{required:['CONFIRM_FILING','SUGGESTION'].includes(consolidationFormData.caseFilingResult),message:'必填',trigger:['change','blur']}]"
>
<el-select v-model="consolidationFormData.hostUnitId" filterable clearable style="width: 100%">
<el-option
v-for="item in underTakeOptions"
:label="item.name"
:value="item.id"
:key="item.id"
:disabled="consolidationFormData && consolidationFormData.helpUnitIds.includes(item.id)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="协办单位" v-if="['CONFIRM_FILING','SUGGESTION'].includes(consolidationFormData.caseFilingResult)">
<el-select v-model="consolidationFormData.helpUnitIds" filterable clearable multiple style="width: 100%">
<el-option
v-for="item in underTakeOptions"
:label="item.name"
:value="item.id"
:key="item.id"
:disabled="item.id===consolidationFormData.hostUnitId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="审核意见" prop="approvalOpinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="consolidationFormData.approvalOpinion"></user-opinion-textarea>
</el-form-item>
<el-form-item label="电子签名" prop="approvalSignature" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<pc-signature v-model="consolidationFormData.approvalSignature"></pc-signature>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button plain @click="$refs.guava.index()">取消</el-button>
<el-button type="primary" @click="doConsolidationApproval('PASS')">提交</el-button>
</el-row>
</template>
<el-dialog title="提案详情" :visible.sync="viewDialogVisible" width="1200px" top="50px" append-to-body>
<div style="max-height: 80vh; overflow-y: auto">
<proposal-info ref="infoDialogRef"></proposal-info>
</div>
</el-dialog>
</guava>
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="教代会">
<el-select @change="meetingChange" clearable filterable placeholder="所属教代会"
v-model="pageForm.sessionId">
<el-option :key="item.id" :label="item.fullName" :value="item.id"
v-for="item in sessionOptions"></el-option>
</el-select>
</search-item>
<search-item label="提案编号">
<el-input v-model="pageForm.code" placeholder="提案编号" @keyup.enter.native="doSearch" clearable
style="width: 100%"></el-input>
</search-item>
<search-item label="提案名称">
<el-input v-model="pageForm.name" placeholder="提案名称" @keyup.enter.native="doSearch" clearable
style="width: 100%"></el-input>
</search-item>
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.createUserKeyword"></el-input>
</search-item>
<!-- <search-item label="提案人姓名">-->
<!-- <el-input-->
<!-- @keyup.enter.native="doSearch"-->
<!-- clearable-->
<!-- placeholder="请输入提案人姓名"-->
<!-- v-model="pageForm.createUserName"-->
<!-- style="width: 100%"-->
<!-- ></el-input>-->
<!-- </search-item>-->
<!-- <search-item label="提案人工号">-->
<!-- <el-input-->
<!-- @keyup.enter.native="doSearch"-->
<!-- clearable-->
<!-- placeholder="请输入提案人工号"-->
<!-- v-model="pageForm.createUserLoginName"-->
<!-- style="width: 100%"-->
<!-- ></el-input>-->
<!-- </search-item>-->
</search>
</el-card>
<el-card shadow="never">
<table-tool :columns.sync="tableColumns">
<!-- <el-button type="primary" icon="el-icon-plus" size="small" @click="openMerge">并案审核</el-button>-->
<!-- <el-button type="primary" icon="el-icon-plus" size="small" @click="doUpData">更新</el-button>-->
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
<el-radio-button :label="true">已审核</el-radio-button>
<el-radio-button :label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" ref="tableRef" row-key="id" style="width: 100%">
<el-table-column type="selection" width="50" fixed="left" v-if="!pageForm.approval"></el-table-column>
<el-table-column label="序号" width="50" type="index" :index="indexMethod"
fixed="left"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.key"
:min-width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
v-for="column in tableColumns"
v-if="column.visible !== false"
>
<template v-if="column.prop === 'caseFilingResult'" scope="{row}">
<dict-tag v-if="row.taskState!==10"
:options="dict.type.PROPOSAL_CASE_FILING_RESULT"
:value="row.caseFilingResult"></dict-tag>
</template>
<template v-else-if="column.prop === 'merge'" scope="{row}">
<el-tag v-if="row.merge" size="small"></el-tag>
</template>
<template v-else-if="column.prop === 'instanceState'" scope="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="300px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<proposal-info ref="proposalInfoRef" @done-tasks="doneTasks">
<div v-if="showApprovalForm">
<div class="process-title">
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" label-width="120px" :rules="formRules" label-suffix="">
<el-form-item label="立案结果" prop="tf_caseFilingResult"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-radio-group v-model="formData.tf_caseFilingResult" size="small">
<el-radio v-for="item in dict.type.PROPOSAL_CASE_FILING_RESULT" :label="item.code"
border>{{item.label}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="['CONFIRM_FILING'].includes(formData.tf_caseFilingResult)" label="立案类型"
prop="tf_caseFilingType"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-radio-group v-model="formData.tf_caseFilingType" size="small">
<el-radio v-for="item in dict.type.PROPOSAL_CASE_FILING_TYPE" :label="item.code" border>
{{item.label}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="主办单位"
v-if="['CONFIRM_FILING','SUGGESTION'].includes(formData.tf_caseFilingResult)"
:rules="[{required:['CONFIRM_FILING','SUGGESTION'].includes(formData.tf_caseFilingResult),message:'必填',trigger:['change','blur']}]"
prop="tf_masterUnitId"
>
<el-select v-model="formData.tf_masterUnitId" filterable clearable style="width: 100%">
<el-option
v-for="item in underTakeOptions"
:label="item.name"
:value="item.id"
:key="item.id"
:disabled="formData && formData.tf_slaveUnitIds.includes(item.id)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="协办单位"
v-if="['CONFIRM_FILING','SUGGESTION'].includes(formData.tf_caseFilingResult)"
prop="tf_slaveUnitIds"
>
<el-select v-model="formData.tf_slaveUnitIds" filterable clearable multiple
style="width: 100%">
<el-option
v-for="item in underTakeOptions"
:label="item.name"
:value="item.id"
:key="item.id"
:disabled="item.id===formData.tf_masterUnitId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="审核意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到提案人</el-button>
<el-button @click="handleTaskAction(1)" size="small" type="primary">提交</el-button>
</el-row>
</div>
</proposal-info>
</template>
<template #public>
<merge ref="mergeRef" @close="$refs.guava.index()"></merge>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/info.js"){}#-->
const vue = new Vue({
el: "#app",
dicts: ["PROPOSAL_CASE_FILING_RESULT"],
store,
mixins: [initTableMixins],
components: {
"proposal-info": PROPOSAL_INFO_COMPONENT
},
data() {
return {
sessionOptions: [],
delegationOptions: [],
underTakeOptions: [],
formData: {
hostUnitIds: null,
helpUnitId: []
},
pageForm: {
approval: false
},
showApprovalForm: false,
//并案的提案列表
consolidationProposalTableData: [],
consolidationFormData: {},
viewDialogVisible: false
}
},
methods: {
openView(row) {
this.$refs.guava.public(() => {
this.$refs.infoRef.onOpen(row.id)
this.showApprovalForm = false
})
},
openApproval(row) {
this.$refs.guava.public(() => {
this.$refs.infoRef.onOpen(row.id)
this.formData = row.approvalParam
this.formData.isConsolidation = row.isConsolidation
this.$axios
.post(loc() + "/committeeFiling", {
processInstanceId: row.processInstanceId,
processInstanceTaskId: row.processInstanceTaskId
})
.then((res) => {
if (res.code === 0) {
this.$set(this.formData, "caseFilingResult", res.data.caseFilingResult)
this.$set(this.formData, "hostUnitId", res.data.hostUnitId)
this.$set(this.formData, "helpUnitIds", res.data.helpUnitIds || [])
this.$set(this.formData, "approvalOpinion", res.data.approvalOpinion)
this.$set(this.formData, "proposalIds", res.data.consolidationIds || [row.id])
}
})
this.showApprovalForm = true
})
},
doApproval(approvalType) {
this.formData.bpmTaskApprovalType = approvalType
this.$refs.approvalFormRef.validate((valid) => {
if (valid) {
this.$axios
.post(loc() + "/approval", {
approval: JSON.stringify(this.formData)
})
.then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
})
}
})
},
openRevoke(taskId) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
this.$axios.post(loc() + "/revoke", { taskId }).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
}
})
})
},
viewSingleProposal(row) {
this.proposalInfoVisible = true
this.$nextTick(() => {
this.$refs.infoRef.onOpen(row.id)
})
},
//打开并案审核
openConsolidationApproval() {
const selection = this.$refs.tableRef.selection
if (selection.length < 2) {
this.$message.error("并案审核至少需要选择两条提案")
return
}
this.consolidationProposalTableData = selection
this.$refs.guava.edit()
this.consolidationFormData = selection[0].approvalParam
this.$set(this.consolidationFormData, "caseFilingResult", null)
this.$set(this.consolidationFormData, "hostUnitId", null)
this.$set(this.consolidationFormData, "helpUnitIds", [])
this.$set(this.consolidationFormData, "helpUnitIds", [])
this.$set(this.consolidationFormData, "approvalOpinion", null)
this.$set(
this.consolidationFormData,
"proposalIds",
selection.map((v) => v.id)
)
},
openViewDialog(row) {
this.viewDialogVisible = true
this.$nextTick(() => {
this.$refs.infoDialogRef.onOpen(row.id)
})
},
//并案审核
doConsolidationApproval() {
this.consolidationFormData.bpmTaskApprovalType = "DYNAMIC"
this.$refs.consolidationFormRef.validate((valid) => {
if (valid) {
this.$axios
.post(loc() + "/approval", {
approval: JSON.stringify(this.consolidationFormData)
})
.then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$refs.tableRef.clearSelection()
this.$message.success(res.msg)
this.doSearch()
}
})
}
})
},
//教代会change
async meetingChange(val) {
this.formData.delegationId = null
this.formData.committeeId = null
this.delegationOptions = await proposal.getDelegation(val)
this.committeeOptions = await this.getInstitutions(val)
},
listDelegation() {
this.$axios.post("/platform/proposal/common/listDelegation", { sessionId: this.pageForm.sessionId }).then((res) => {
if (res.code === 0) {
this.delegationOptions = res.data
}
})
},
listOpenSession() {
this.$axios.post("/platform/proposal/common/listOpenSession").then((res) => {
if (res.code === 0) {
this.sessionOptions = res.data
if (this.sessionOptions) {
this.$set(this.pageForm, "sessionId", this.sessionOptions[0].id)
this.pageData()
this.listDelegation()
}
}
})
},
listUnderTake() {
this.$axios.post(loc() + "/listUnderTake").then((res) => {
if (res.code === 0) {
this.underTakeOptions = res.data
}
})
}
},
created() {
this.listOpenSession()
this.listUnderTake()
}
})
<!--#include('../../common/info.js'){}#-->
<!--#include('../committeeFiling/merge.js'){}#-->
new Vue({
el: "#app",
store,
dicts: ["PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE"],
mixins: [initTableMixins],
components: {
"proposal-info": PROPOSAL_INFO,
merge
},
data() {
return {
tableColumns: [
{label: "提案编号", prop: "code"},
{label: "提案名称", prop: "name", width: "200px"},
{label: "提案类别", prop: "typeName"},
{label: "届次", prop: "sessionName"},
{label: "立案结果", prop: "caseFilingResult"},
{label: "代表团", prop: "delegationName"},
{label: "当前节点", prop: "curTaskName"},
{label: "流程状态", prop: "instanceState"}
],
pageForm: {
approval: false
},
formData: {
tf_masterUnitId: null,
tf_slaveUnitIds: []
},
showApprovalForm: false,
sessionOptions: [],
delegationOptions: [],
underTakeOptions: [],
}
},
methods: {
doUpData(){
this.$.axios.post(loc()+"/doUpData")
},
openView(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = false
this.$refs.proposalInfoRef.onOpen(row)
})
},
doneTasks(val) {
const data = val[val.length - 1]
this.$set(this.formData, "tf_caseFilingResult", data.ext.tf_caseFilingResult)
this.$set(this.formData, "tf_caseFilingType", data.ext.tf_caseFilingType)
this.$set(this.formData, "tf_masterUnitId", data.ext.tf_masterUnitId)
this.$set(this.formData, "tf_slaveUnitIds", data.ext.tf_slaveUnitIds)
},
openAudit(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = true
this.formData = {
proposalId: row.id,
processTaskId: row.taskId,
taskName: row.curTaskName,
tf_masterUnitId: null,
tf_slaveUnitIds: []
}
this.$refs.proposalInfoRef.onOpen(row)
})
},
handleTaskAction(val) {
this.$refs.formRef.validate(valid => {
if (!valid) return
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
// 是否有协办单位
let tf_helpunitreply;
if (this.formData.tf_slaveUnitIds && this.formData.tf_slaveUnitIds.length > 0) {
tf_helpunitreply = 'HAS_HELP_UNIT'
} else {
tf_helpunitreply = 'NO_HELP_UNIT'
}
const loading = createLoading('提交中')
this.$axios.post("/platform/proposal/committeeFilingUnit/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val,
tf_masterUnitName: this.formData.tf_masterUnitId ? this.underTakeOptions.find(v => v.id === this.formData.tf_masterUnitId)?.name : null,
tf_slaveUnitNames: this.formData.tf_slaveUnitIds.map(v => this.underTakeOptions.find(v2 => v2.id === v)?.name),
tf_slaveUnitNameStr: this.formData.tf_slaveUnitIds.map(v => this.underTakeOptions.find(v2 => v2.id === v)?.name).join(','),
tf_helpunitreply: tf_helpunitreply
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
})
})
},
// 打开并案审核
openMerge() {
const selection = this.$refs.tableRef.selection
if (selection.length < 2) {
this.$message.warning('请先勾选需要并案审核的提案,至少需要两条提案')
return
}
this.$refs.guava.public(() => {
this.$refs.mergeRef.onOpen(selection, {
processTaskIds: selection.map(v => v.taskId),
taskName: selection[0].curTaskName,
tf_masterUnitId: null,
tf_slaveUnitIds: []
})
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
this.$axios.post("/platform/proposal/committeeFilingUnit/revokeTask", {
taskId: row.taskId,
proposalId: row.id
}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
}
})
})
},
// 教代会
async meetingChange(val) {
this.doSearch()
},
// 查询开启的教代会
listOpenSession() {
this.$axios.post("/platform/proposal/common/listOpenSession").then((res) => {
if (res.code === 0) {
this.sessionOptions = res.data
if (this.sessionOptions) {
this.$set(this.pageForm, "sessionId", this.sessionOptions[0].id)
this.pageData()
}
}
})
},
// 查询承办单位
listUnderTake() {
this.$axios.post("/platform/proposal/common/listUnderTake").then((res) => {
if (res.code === 0) {
this.underTakeOptions = res.data
}
})
}
},
created() {
this.pageData()
this.listOpenSession()
this.listUnderTake()
}
})
</script>
<!--#
}
#-->
@@ -107,6 +107,7 @@ layout("/layouts/platform.html"){
tableColumns: [
{label: "提案编号", prop: "code"},
{label: "提案名称", prop: "name", width: "200px"},
{label: "提案人", prop: "createUserName", width: "80px"},
{label: "提案类别", prop: "typeName"},
{label: "届次", prop: "sessionName"},
{label: "代表团", prop: "delegationName"},
@@ -22,7 +22,11 @@ layout("/layouts/platform.html"){
</search>
</el-card>
<el-card shadow="never">
<table-tool :columns.sync="tableColumns"></table-tool>
<table-tool :columns.sync="tableColumns">
<el-button class="ml5" icon="el-icon-upload2" plain type="primary"
@click="openImport">导入提案
</el-button>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" header-align="center" style="width: 100%" row-key="id">
<el-table-column label="序号" width="50" type="index" :index="indexMethod" fixed="left"></el-table-column>
<el-table-column
@@ -46,8 +50,11 @@ layout("/layouts/platform.html"){
<span>{{ (row.startTaskId) ? row.taskName : '待提交' }}</span>
</template>
<template v-else-if="column.prop === 'instanceState'" scope="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
<span v-if="row.instanceState">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</span>
<span v-else>未提交</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="400px">
@@ -75,6 +82,60 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
</el-table>
<el-dialog
title="提案导入"
:visible.sync="importVisible"
:close-on-click-modal="false"
width="50%"
>
<el-timeline-item timestamp="下载模板" placement="top">
<el-card>
<el-row :gutter="24">
<el-col :span="24">
<el-radio-group v-model="importTemplateType">
<el-radio :label="1">excel</el-radio>
<el-radio :label="2">word</el-radio>
</el-radio-group>
</el-col>
</el-row>
<el-row :gutter="24" style="margin-top: 20px;">
<el-col :span="24">
<el-button size="medium" type="" style="width: 200px"
@click="downloadTemplate"
icon="el-icon-download">下载模板
</el-button>
</el-col>
</el-row>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="上传文件" placement="top">
<el-card>
<el-upload
name="file"
ref="upload"
:on-remove="(file, fileList) => {
importData.fileList = fileHandleRemove(file, fileList)
}"
:on-change="(file, fileList) => {
if(this.importTemplateType === 2) {
importData.fileList = fileHandleChange(file, fileList,{type:['docx']})
} else {
importData.fileList = fileHandleChange(file, fileList,{type:['xlsx']})
}
}"
:auto-upload="false"
:limit="1"
:file-list="importData.fileList">
<el-button size="medium" type="" icon="el-icon-upload" style="width: 200px">选择文件
</el-button>
</el-upload>
</el-card>
</el-timeline-item>
<span slot="footer" class="dialog-footer">
<el-button @click="importVisible = false" :disabled="importLoading">取 消</el-button>
<el-button type="primary" @click="doImport" :loading="importLoading">确定</el-button>
</span>
</el-dialog>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #public>
@@ -100,16 +161,22 @@ layout("/layouts/platform.html"){
},
data() {
return {
// 将 window.location 的引用存储在响应式数据中
location: window.location,
importTemplateType: 1,
importData: {},
importVisible: false,
importLoading: false,
sessionOptions: [],
businessNo: null,
tableColumns: [
{label: "提案编号", prop: "code"},
{label: "提案名称", prop: "name", width: "200px"},
{label: "提案", prop: "createUserName"},
{label: "提案类", prop: "typeName"},
{label: "提案时间", prop: "createTime"},
{label: "提案类", prop: "typeName"},
{label: "提案方式", prop: "sourceName"},
{label: "届次", prop: "sessionName"},
{label: "代表团", prop: "delegationName"},
{label: "当前节点", prop: "taskName"},
{label: "提案状态", prop: "taskName"},
{label: "流程状态", prop: "instanceState"}
]
}
@@ -202,8 +269,53 @@ layout("/layouts/platform.html"){
}
})
}
}
},
// 打开导入模板
async openImport() {
this.importData = {
fileList: []
}
this.importVisible = true;
},
downloadTemplate() {
let templateType = '.xlsx'
if(this.importTemplateType === 2) {
templateType = '.docx'
}
this.location.href='/platform/basics/downloadTemplate?filePath=proposal/proposal' + templateType + '&fileName=教职工代表大会提案表' + templateType
},
doImport() {
if (!this.importData.fileList.length) {
this.notifyWarning("请选择文件!")
return
}
const data = new FormData();
this.importData.fileList.forEach((val) => {
data.append("file", val.raw, val.raw.name);
});
this.importLoading = false
$.ajax({
url: loc() + "/importProposal?templateType=" + this.importTemplateType,
type: "post",
data: data,
processData: false,
contentType: false,
success: (data) => {
if (!data.code) {
this.pageData();
this.importVisible = false
} else {
this.notifyWarning(data.msg)
}
this.importLoading = false
},
error: (data) => {
this.notifyWarning("导入失败")
this.importLoading = false
}
});
},
},
created() {
this.listSession()
@@ -212,6 +324,9 @@ layout("/layouts/platform.html"){
}
})
</script>
<style>
</style>
<!--#
}
#-->
@@ -0,0 +1,179 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="教代会">
<el-select @change="meetingChange" clearable filterable placeholder="所属教代会"
v-model="pageForm.sessionId">
<el-option :key="item.id" :label="item.fullName" :value="item.id"
v-for="item in sessionOptions"></el-option>
</el-select>
</search-item>
<search-item label="提案名称">
<el-input v-model="pageForm.name" placeholder="提案名称" @keyup.enter.native="doSearch" clearable
style="width: 100%"></el-input>
</search-item>
<search-item label="姓名/工号">
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.createUserKeyword"></el-input>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<table-tool :columns.sync="tableColumns">
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
<el-radio-button :label="true">已审核</el-radio-button>
<el-radio-button :label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
<el-table-column label="序号" width="50" type="index" :index="indexMethod" fixed="left"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.key"
:min-width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
v-for="column in tableColumns"
v-if="column.visible !== false"
>
<template v-if="column.prop === 'instanceState'" scope="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="300px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<proposal-info ref="proposalInfoRef">
<div v-if="showApprovalForm">
<div class="process-title">
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到提案人</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">不同意</el-button>
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意</el-button>
</el-row>
</div>
</proposal-info>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include('../../common/info.js'){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
components: {
"proposal-info": PROPOSAL_INFO
},
data() {
return {
tableColumns: [
{label: "提案编号", prop: "code"},
{label: "提案名称", prop: "name", width: "200px"},
{label: "提案人", prop: "createUserName", width: "80px"},
{label: "提案类别", prop: "typeName"},
{label: "届次", prop: "sessionName"},
{label: "代表团", prop: "delegationName"},
{label: "当前节点", prop: "curTaskName"},
{label: "流程状态", prop: "instanceState"}
],
pageForm: {
approval: false
},
showApprovalForm: false
}
},
created() {
this.pageData()
this.listOpenSession()
},
methods: {
openView(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = false
this.$refs.proposalInfoRef.onOpen(row)
})
},
openAudit(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.proposalInfoRef.onOpen(row)
})
},
// 查询开启的教代会
listOpenSession() {
this.$axios.post("/platform/proposal/common/listOpenSession").then((res) => {
if (res.code === 0) {
this.sessionOptions = res.data
if (this.sessionOptions) {
this.$set(this.pageForm, "sessionId", this.sessionOptions[0].id)
this.pageData()
this.listDelegation()
}
}
})
},
handleTaskAction(val) {
this.$refs.formRef.validate(valid => {
if (!valid) return
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
})
})
})
}
}
})
</script>
<!--#
}
#-->
@@ -54,7 +54,7 @@ layout("/layouts/platform.html"){
<el-table-column label="操作" fixed="right" width="300px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">附议
<el-button v-if="row.taskState === 10 || row.count <= 0" @click="openAudit(row)" size="mini" type="primary">附议
</el-button>
<!-- <el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回-->
<!-- </el-button>-->
@@ -77,11 +77,16 @@ layout("/layouts/platform.html"){
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-row type="flex" justify="end" v-if="row.taskKey ==='second'">
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
<el-button @click="handleTaskAction(20)" size="small" type="danger">不同意</el-button>
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意</el-button>
</el-row>
<el-row type="flex" justify="end" v-else>
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
<el-button @click="updateSecond(2)" size="small" type="danger">不同意</el-button>
<el-button @click="updateSecond(1)" size="small" type="primary">同意</el-button>
</el-row>
</div>
</proposal-info>
</template>
@@ -126,6 +131,7 @@ layout("/layouts/platform.html"){
})
},
openAudit(row) {
this.row = row
this.$refs.guava.edit(() => {
this.showApprovalForm = true
this.formData = {
@@ -155,11 +161,27 @@ layout("/layouts/platform.html"){
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
this.updateSecond(val)
}
})
})
})
},
updateSecond(submitType) {
this.$axios.post("/platform/proposal/seconded/updateInfo", {
proposalId: this.row.id,
taskActorUserId: this.row.taskActorUserId,
opinion: this.formData.tf_opinion,
submitType: submitType,
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
@@ -0,0 +1,161 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="教代会">
<el-select @change="meetingChange" clearable filterable placeholder="所属教代会"
v-model="pageForm.sessionId">
<el-option :key="item.id" :label="item.fullName" :value="item.id"
v-for="item in sessionOptions"></el-option>
</el-select>
</search-item>
<search-item>
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
style="width: 90%" v-model="pageForm.searchKeyword">
<el-select placeholder="查询类型" slot="prepend" style="width: 110px;"
v-model="pageForm.searchName">
<el-option label="提案名称" value="proposalName"></el-option>
<el-option label="编号" value="proposalCode"></el-option>
</el-select>
</el-input>
</search-item>
<search-item>
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
style="width: 90%" v-model="pageForm.searchKeyword2">
<el-select placeholder="查询类型" slot="prepend" style="width: 100px;"
v-model="pageForm.searchName2">
<el-option label="提案人" value="su.username"></el-option>
<!-- <el-option label="附议人" value="seconded.username"></el-option>-->
</el-select>
</el-input>
</search-item>
</search>
</el-card>
<el-card shadow="never">
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
<el-table-column label="序号" width="50" type="index" :index="indexMethod" fixed="left"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:key="column.key"
:min-width="column.width"
:fixed="column.fixed"
show-overflow-tooltip
v-for="column in tableColumns"
v-if="column.visible !== false"
>
<template v-if="column.prop === 'caseFilingResult'" scope="{row}">
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
:value="row.caseFilingResult"></dict-tag>
</template>
<template v-else-if="column.prop === 'merge'" scope="{row}">
<el-tag v-if="row.merge" size="small"></el-tag>
</template>
<template v-else-if="column.prop === 'instanceState'" scope="{row}">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="300px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<proposal-info ref="proposalInfoRef">
<div v-if="showApprovalForm">
<div class="process-title">
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到提案人</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">不同意</el-button>
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意</el-button>
</el-row>
</div>
</proposal-info>
</template>
</guava>
</div>
<script nonce="${cspNonce!}">
<!--#include('../../common/info.js'){}#-->
new Vue({
el: "#app",
store,
mixins: [initTableMixins],
components: {
"proposal-info": PROPOSAL_INFO
},
data() {
return {
tableColumns: [
{label: "提案编号", prop: "proposalCode"},
{label: "提案名称", prop: "proposalName", width: "200px"},
{label: "提案人", prop: "username"},
{label: "联系方式", prop: "mobile"},
{label: "单位", prop: "unitName"},
{label: "代表团", prop: "delegationName"},
{label: "提案类型", prop: "typeName"},
{label: "提交方式", prop: "mannerName"},
{label: "附议人数量", prop: "secondedNum"},
{label: "已附议", prop: "secondedAgreeNum"},
{label: "团长审核", prop: "delegationAudit"},
],
pageForm: {
approval: false
},
showApprovalForm: false,
sessionOptions: []
}
},
methods: {
// 查看
openView(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = false
this.$refs.proposalInfoRef.onOpen(row)
})
},
// 查询开启的教代会
listOpenSession() {
this.$axios.post("/platform/proposal/common/listOpenSession").then((res) => {
if (res.code === 0) {
this.sessionOptions = res.data
if (this.sessionOptions) {
this.$set(this.pageForm, "sessionId", this.sessionOptions[0].id)
this.pageData()
this.listDelegation()
}
}
})
}
},
created() {
this.pageData()
// 加载教代会信息
this.listOpenSession()
}
})
</script>
<!--#
}
#-->
@@ -172,6 +172,16 @@ layout("/layouts/platform.html"){
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="tf_attachment" label="附件">
<file-upload
:value.sync="formData.tf_attachment"
upload_mode="drag"
:upload_number="5"
upload_result_category="array"
complete_result
upload_mode="file"
></file-upload>
</el-form-item>
<el-form-item label="答复内容" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<text-editor v-model="formData.tf_opinion"></text-editor>
@@ -187,6 +197,7 @@ layout("/layouts/platform.html"){
</el-form>
<el-row type="flex" justify="end">
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button @click="handleTaskAction(1)" size="small" type="primary">提交</el-button>
</el-row>
</div>
@@ -286,8 +297,19 @@ layout("/layouts/platform.html"){
this.$refs.proposalInfoRef.onOpen(row)
})
},
openAudit(row) {
async openAudit(row) {
this.loadCandidates(row.taskId)
try{
await this.$confirm("是否已与提案代表进行充分沟通?", "提示", {
confirmButtonText: "是",
cancelButtonText: "否",
type: "info"
})
} catch (e) {
console.log(e)
return
}
this.$refs.guava.edit(() => {
this.showApprovalForm = true
@@ -304,35 +326,43 @@ layout("/layouts/platform.html"){
},
handleTaskAction(val) {
this.$refs.formRef.validate(valid => {
if (!valid) return
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading('提交中')
delete this.formData.underTakeIsMaster
delete this.formData.underTakeName
this.$axios.post("/platform/proposal/unitReply/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
})
})
if(val === 6) {
this.handleTaskConfirm(val)
}else {
this.$refs.formRef.validate(valid => {
if (!valid) return
this.handleTaskConfirm(val)
})
}
},
handleTaskConfirm(val) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
const loading = createLoading('提交中')
delete this.formData.underTakeIsMaster
delete this.formData.underTakeName
this.$axios.post("/platform/proposal/unitReply/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
})
},
// 撤销
onRevoke(row) {
@@ -7,7 +7,13 @@ layout("/layouts/platform.html"){
<div id="app" v-cloak>
<template>
<el-card shadow="never">
<snaker-start slot="header" label="撰写提案" define_key="JDHTA"></snaker-start>
<snaker-start slot="header" label="撰写提案" define_key="JDHTA">
<template slot="header-right-label">
<span style="margin-right: 15px" v-if="!formData.id">
<el-link type="success" @click="openImport">导入</el-link>
</span>
</template>
</snaker-start>
<template>
<el-form :model="formData" :rules="formRules" label-width="120px" ref="addForm">
<el-row :gutter="20" type="flex">
@@ -24,7 +30,7 @@ layout("/layouts/platform.html"){
</el-row>
<el-row :gutter="20" type="flex">
<el-col :span="12">
<el-col :span="12" v-if="false">
<el-form-item label="所属教代会" prop="sessionId">
<el-select
@change="meetingChange"
@@ -40,7 +46,7 @@ layout("/layouts/platform.html"){
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="12" v-if="false">
<el-form-item label="所属代表团" prop="delegationId">
<el-select clearable filterable placeholder="所属代表团" v-model="formData.delegationId"
style="width: 100%" disabled>
@@ -59,7 +65,7 @@ layout("/layouts/platform.html"){
</el-col>
</el-row>
<el-row :gutter="20">
<el-row :gutter="20" v-if="false">
<el-col :span="12">
<el-form-item label="单位" prop="unitName">
<el-input v-model="formData.unitName" disabled></el-input>
@@ -80,17 +86,22 @@ layout("/layouts/platform.html"){
</el-col>
<el-col :span="12">
<el-form-item label="提案方式" prop="source">
<el-select v-model="formData.source" style="width: 100%">
<el-option :key="item.code" :label="item.name" :value="item.code"
v-for="item in sourceOptions"></el-option>
</el-select>
<!-- <el-select v-model="formData.source" style="width: 100%">-->
<!-- <el-option :key="item.code" :label="item.name" :value="item.code"-->
<!-- v-for="item in sourceOptions"></el-option>-->
<!-- </el-select>-->
<el-radio :key="item.code" :label="item.code" border
size="medium"
v-for="item in sourceOptions" v-model="formData.source">
{{item.name}}
</el-radio>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" type="flex">
<el-col :span="12">
<el-form-item label="提案类" prop="typeId">
<el-form-item label="提案类" prop="typeId">
<el-select v-model="formData.typeId" style="width: 100%">
<el-option :key="item.code" :label="item.name" :value="item.id"
v-for="item in typeOptions"></el-option>
@@ -125,7 +136,7 @@ layout("/layouts/platform.html"){
<!-- ></el-input>-->
<!-- </el-form-item>-->
<el-form-item label="建议承办单位" prop="suggestUnits">
<el-form-item label="建议承办单位" prop="suggestUnits" v-if="false">
<el-select v-model="formData.suggestUnits" multiple filterable style="width: 100%"
placeholder="请选择建议承办单位">
<el-option :key="item.id" :label="item.name" :value="item.name"
@@ -169,6 +180,60 @@ layout("/layouts/platform.html"){
<el-button type="primary" @click="noticeDialogVisible = false">我已知晓</el-button>
</div>
</el-dialog>
<el-dialog
title="提案导入"
:visible.sync="importVisible"
:close-on-click-modal="false"
width="50%"
>
<el-timeline-item timestamp="下载模板" placement="top">
<el-card>
<el-row :gutter="24">
<el-col :span="24">
<el-radio-group v-model="importTemplateType">
<el-radio :label="1">excel</el-radio>
<el-radio :label="2">word</el-radio>
</el-radio-group>
</el-col>
</el-row>
<el-row :gutter="24" style="margin-top: 20px;">
<el-col :span="24">
<el-button size="medium" type="" style="width: 200px"
@click="downloadTemplate"
icon="el-icon-download">下载模板
</el-button>
</el-col>
</el-row>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="上传文件" placement="top">
<el-card>
<el-upload
name="file"
ref="upload"
:on-remove="(file, fileList) => {
importData.fileList = fileHandleRemove(file, fileList)
}"
:on-change="(file, fileList) => {
if(this.importTemplateType === 2) {
importData.fileList = fileHandleChange(file, fileList,{type:['docx']})
} else {
importData.fileList = fileHandleChange(file, fileList,{type:['xlsx']})
}
}"
:auto-upload="false"
:limit="1"
:file-list="importData.fileList">
<el-button size="medium" type="" icon="el-icon-upload" style="width: 200px">选择文件
</el-button>
</el-upload>
</el-card>
</el-timeline-item>
<span slot="footer" class="dialog-footer">
<el-button @click="importVisible = false" :disabled="importLoading">取 消</el-button>
<el-button type="primary" @click="doImport" :loading="importLoading">确定</el-button>
</span>
</el-dialog>
</div>
<script nonce="${cspNonce!}">
@@ -180,10 +245,18 @@ layout("/layouts/platform.html"){
return {
bizId: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
// 将 window.location 的引用存储在响应式数据中
location: window.location,
importTemplateType: 1,
importData: {},
importVisible: false,
importLoading: false,
formData: {},
sessionOptions: [],
sourceOptions: [],
allSourceOptions: [],
delegationOptions: [],
committeeOptions: [],
typeOptions: [],
@@ -268,6 +341,7 @@ layout("/layouts/platform.html"){
}).then(() => {
commonUtil.pjaxPush('/platform/proposal/mine?bizId=' + res.data.id + "&operation=invite")
}).catch(() => {
loading.close()
this.$message.info("请到我的提案界面邀请附议人")
commonUtil.pjaxPush('/platform/proposal/mine')
})
@@ -276,10 +350,65 @@ layout("/layouts/platform.html"){
}
}
}).catch(() => {
loading.close()
})
})
}
},
// 打开导入窗口
async openImport() {
this.importData = {
fileList: []
}
this.importVisible = true;
},
// 下载导入模板
async downloadTemplate() {
let templateType = '.xlsx'
if(this.importTemplateType === 2) {
templateType = '.docx'
}
this.location.href='/platform/basics/downloadTemplate?filePath=proposal/proposal' + templateType + '&fileName=教职工代表大会提案表' + templateType
},
// 开始导入数据
async doImport() {
if (!this.importData.fileList.length) {
this.notifyWarning("请选择文件!")
return
}
const data = new FormData();
this.importData.fileList.forEach((val) => {
data.append("file", val.raw, val.raw.name);
});
this.importLoading = false
$.ajax({
url: loc() + "/importProposal?templateType=" + this.importTemplateType,
type: "post",
data: data,
processData: false,
contentType: false,
success: (data) => {
console.log(loc(), data)
if (!data.code) {
if(data.data) {
this.formData = { ...data.data }
}
this.importVisible = false
} else {
this.notifyWarning(data.msg)
}
this.importLoading = false
},
error: (data) => {
this.notifyWarning("导入失败")
this.importLoading = false
}
});
},
// 重新提交
async onSubmitAgain() {
@@ -375,7 +504,7 @@ layout("/layouts/platform.html"){
this.checkWriteTime()
}
await this.listDelegation()
await this.listSource()
// await this.listSource()
}
})
},
@@ -388,6 +517,13 @@ layout("/layouts/platform.html"){
}
})
},
// 查询字典 撰写方式
async getDictByCode(code) {
const res = await $.get("/platform/proposal/write/listSourceByCode", {code: code})
console.log('getDictByCode', res)
return res.data;
},
//查询自己有权限的代表团
searchMineDelegation() {
@@ -412,7 +548,7 @@ layout("/layouts/platform.html"){
})
},
init() {
async init() {
if (this.bizId) {
this.$axios.post("/platform/proposal/write/detail", {id: this.bizId}).then((res) => {
if (res.code === 0) {
@@ -431,6 +567,10 @@ layout("/layouts/platform.html"){
this.$set(this.formData, "mobile", this.$store.state.user.mobile)
this.$set(this.formData, "unitName", this.$store.state.user.unit?.name)
}
// 撰写方式
this.allSourceOptions = await this.getDictByCode("PROPOSAL_SOURCE")
this.sourceOptions = this.allSourceOptions
}
},
created() {