first commit
This commit is contained in:
@@ -0,0 +1,228 @@
|
||||
const H5_SUGGESTION_TC_INFO_COMPONENT = {
|
||||
name: "ProposalInfo",
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<div class="process-title">基本信息</div>
|
||||
<van-cell-group>
|
||||
<van-cell title="意见编号">{{ viewData.code }}</van-cell>
|
||||
<van-cell title="撰写人">{{ viewData.createUserName }}</van-cell>
|
||||
<van-cell title="撰写时间">{{ viewData.createTime }}</van-cell>
|
||||
<van-cell title="教代会届次">{{ viewData.fullName }}</van-cell>
|
||||
<van-cell title="撰写人单位">{{ viewData.unitName }}</van-cell>
|
||||
<van-cell :title="viewData.mannerCode!=='W03'?'代表团名称':'委员会名称'">
|
||||
{{ viewData.mannerCode !== 'W03' ? viewData.delegationName : viewData.committeeName }}
|
||||
</van-cell>
|
||||
<van-cell title="意见类别">
|
||||
{{viewData.typeName}}
|
||||
</van-cell>
|
||||
<van-cell title="意见内容">
|
||||
<div slot="label" class="font-size1 van-color-text-primary break-all" style="white-space: normal;">
|
||||
<div v-html="viewData.brief"></div>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell title="附件">
|
||||
<div slot="label">
|
||||
{{viewData.files}}
|
||||
</div>
|
||||
</van-cell>
|
||||
<!-- <van-cell title="签字">-->
|
||||
<!-- <div slot="label">-->
|
||||
<!-- <van-image :src="viewData.signature"-->
|
||||
<!-- style="width: 100%;height: 150px;border: 1px dashed"></van-image>-->
|
||||
<!-- </div>-->
|
||||
<!-- </van-cell>-->
|
||||
</van-cell-group>
|
||||
|
||||
<div class="process-title">
|
||||
附议人信息
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-cell title="提案名称" v-for="item in viewData.seconders">
|
||||
<template slot="title">
|
||||
<span class="font-size1">{{item.createVariable.userName}}</span>
|
||||
<span class="margin-left10 font-size1 van-color-text-regular">/ {{item.createVariable.loginName}}</span>
|
||||
</template>
|
||||
<template slot="label">
|
||||
<span class="font-size0 van-color-text-assist">{{item.createVariable.unitName}}</span>
|
||||
</template>
|
||||
<template>
|
||||
<span class="font-size2 van-color-text-placeholder bold">
|
||||
<span v-if="item.extVariable && item.extVariable.bpmTaskApprovalType">
|
||||
<van-tag size="mini" type="success"
|
||||
v-if="item.extVariable.bpmTaskApprovalType==='PASS'">同意</van-tag>
|
||||
<van-tag size="mini" type="danger" v-if="item.extVariable.bpmTaskApprovalType==='REJECT'">拒绝</van-tag>
|
||||
</span>
|
||||
<span v-else>
|
||||
<van-tag size="mini">未附议</van-tag>
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<div>
|
||||
<div v-for="nodeTask in viewData.nodeTasks" :key="nodeTask.id">
|
||||
<div class="process-title" v-if="nodeTask.nodeCode !== 20">
|
||||
{{nodeTask.nodeName}}
|
||||
</div>
|
||||
<div v-if="nodeTask.nodeCode === 30">
|
||||
<van-cell-group v-for="task in nodeTask.tasks" :key="task.id">
|
||||
<van-cell title="审核人">{{ task.actualOwnerLoginName + '-' + task.actualOwnerUserName}}
|
||||
</van-cell>
|
||||
<van-cell title="审核时间">{{ task.endOn}}</van-cell>
|
||||
<van-cell title="审核结果">
|
||||
<div v-if="task.extVariable">
|
||||
<van-tag type="success" size="mini"
|
||||
v-if="task.extVariable.bpmTaskApprovalType === 'PASS'">同意
|
||||
</van-tag>
|
||||
<van-tag type="danger" size="mini"
|
||||
v-if="task.extVariable.bpmTaskApprovalType === 'BACK'">退回重新填写
|
||||
</van-tag>
|
||||
<van-tag type="danger" size="mini"
|
||||
v-if="task.extVariable.bpmTaskApprovalType === 'REJECT'">建议撤销
|
||||
</van-tag>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell title="审核意见">
|
||||
<div style="white-space: normal">
|
||||
{{ task.extVariable.approvalOpinion}}
|
||||
</div>
|
||||
</van-cell>
|
||||
<!-- <van-cell title="签字">-->
|
||||
<!-- <van-image :src="task.extVariable.approvalSignature"-->
|
||||
<!-- v-if="task.extVariable && task.extVariable.approvalSignature"-->
|
||||
<!-- class="signature-image"></van-image>-->
|
||||
<!-- </van-cell>-->
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
<div v-if="nodeTask.nodeCode === 60 || nodeTask.nodeCode === 70">
|
||||
<van-cell-group v-for="task in nodeTask.tasks" :key="task.id">
|
||||
<van-cell title="审核人">{{ task.actualOwnerLoginName + '-' + task.actualOwnerUserName}}
|
||||
</van-cell>
|
||||
<van-cell title="审核时间">{{ task.endOn}}</van-cell>
|
||||
<van-cell title="审核结果">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="task.extVariable.caseFilingResult">
|
||||
</dict-tag>
|
||||
</van-cell>
|
||||
<template
|
||||
v-if="task.extVariable.caseFilingResult!=='NOT' && task.extVariable.caseFilingResult!==''">
|
||||
<van-cell title="主办单位" :span="3">{{ task.extVariable.hostUnit}}</van-cell>
|
||||
<van-cell title="协办单位" :span="3">
|
||||
<div style="white-space: normal">
|
||||
{{ task.extVariable.helpUnits.join(',')}}
|
||||
</div>
|
||||
</van-cell>
|
||||
</template>
|
||||
<van-cell title="审核意见">
|
||||
<div style="white-space: normal">
|
||||
{{ task.extVariable.approvalOpinion}}
|
||||
</div>
|
||||
</van-cell>
|
||||
<!-- <van-cell title="签字">-->
|
||||
<!-- <van-image :src="task.extVariable.approvalSignature"-->
|
||||
<!-- v-if="task.extVariable && task.extVariable.approvalSignature"-->
|
||||
<!-- class="signature-image"></van-image>-->
|
||||
<!-- </van-cell>-->
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
<div v-if="nodeTask.nodeCode === 80">
|
||||
<van-cell-group v-for="task in nodeTask.tasks" :key="task.id">
|
||||
<van-cell title="承办单位">
|
||||
{{ task.createVariable.underTakeName}}
|
||||
({{ task.createVariable.isMaster ? '主办' : '协办'}})
|
||||
</van-cell>
|
||||
<van-cell title="答复人">{{ task.actualOwnerLoginName + '-' + task.actualOwnerUserName}}
|
||||
</van-cell>
|
||||
<van-cell title="答复时间">{{ task.endOn}}</van-cell>
|
||||
<van-cell title="答复内容">
|
||||
<div v-html="task.extVariable.approvalOpinion"></div>
|
||||
</van-cell>
|
||||
<!-- <van-cell title="签字">-->
|
||||
<!-- <van-image :src="task.extVariable.approvalSignature"-->
|
||||
<!-- v-if="task.extVariable && task.extVariable.approvalSignature"-->
|
||||
<!-- class="signature-image"></van-image>-->
|
||||
<!-- </van-cell>-->
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
<div v-if="nodeTask.nodeCode === 90">
|
||||
<van-cell-group v-for="task in nodeTask.tasks" :key="task.id">
|
||||
<van-cell title="承办单位">
|
||||
{{ task.createVariable.underTakeName}}
|
||||
({{ task.createVariable.isMaster ? '主办' : '协办'}})
|
||||
</van-cell>
|
||||
<van-cell title="校领导">{{ task.actualOwnerLoginName + '-' + task.actualOwnerUserName}}
|
||||
</van-cell>
|
||||
<van-cell title="审批时间">{{ task.endOn}}</van-cell>
|
||||
<van-cell title="审批结果" :span="3">
|
||||
<van-tag size="mini" type="success"
|
||||
v-if="task.extVariable.bpmTaskApprovalType==='PASS'">同意
|
||||
</van-tag>
|
||||
<van-tag size="mini" type="danger"
|
||||
v-if="task.extVariable.bpmTaskApprovalType==='BACK_OTHER_NODE'">退回重新答复
|
||||
</van-tag>
|
||||
</van-cell>
|
||||
<van-cell title="审批意见">
|
||||
<div style="white-space: normal">
|
||||
{{ task.extVariable.approvalOpinion}}
|
||||
</div>
|
||||
</van-cell>
|
||||
<!-- <van-cell title="签字">-->
|
||||
<!-- <van-image :src="task.extVariable.approvalSignature"-->
|
||||
<!-- v-if="task.extVariable && task.extVariable.approvalSignature"-->
|
||||
<!-- class="signature-image"></van-image>-->
|
||||
<!-- </van-cell>-->
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
<div v-if="nodeTask.nodeCode === 100">
|
||||
<van-cell-group v-for="task in nodeTask.tasks" :key="task.id">
|
||||
<van-cell title="反馈人">{{ task.actualOwnerLoginName + '-' + task.actualOwnerUserName}}
|
||||
</van-cell>
|
||||
<van-cell title="反馈时间">{{ task.endOn}}</van-cell>
|
||||
<van-cell title="反馈结果">
|
||||
{{ task.extVariable.feedBackScore}}
|
||||
</van-cell>
|
||||
<van-cell title="反馈意见">
|
||||
<div style="white-space: normal">
|
||||
{{ task.extVariable.approvalOpinion}}
|
||||
</div>
|
||||
</van-cell>
|
||||
<!-- <van-cell title="签字">-->
|
||||
<!-- <van-image :src="task.extVariable.approvalSignature"-->
|
||||
<!-- v-if="task.extVariable && task.extVariable.approvalSignature"-->
|
||||
<!-- class="signature-image"></van-image>-->
|
||||
<!-- </van-cell>-->
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
dicts: ["SUGGESTION_CASE_FILING_RESULT"],
|
||||
data() {
|
||||
return {
|
||||
viewData: {},
|
||||
viewDialogVisible: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(id) {
|
||||
this.$axios.post("/platform/suggestion/tc/common/suggestionInfo", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(id) {
|
||||
// this.viewDialogVisible = true
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.infoDialogRef.onOpen(id)
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
+236
@@ -0,0 +1,236 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="团长审核" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
:reverse-color="false"
|
||||
:show-action="false"
|
||||
@search="doSearch"
|
||||
input-align="left"
|
||||
placeholder="请输入意见内容搜索"
|
||||
v-model="pageForm.brief"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :multiple="false" :options="sessionOptions" @change="sessionChange" v-model="pageForm.sessionId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
<van-tabs v-model="pageForm.approvalText" @change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<van-pull-refresh v-model="tableRefreshing" @refresh="doSearch" style="min-height: calc(100vh - 90px)">
|
||||
<van-list v-if="tableData && tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="" @load="pageData">
|
||||
<div v-for="row in tableData" class="list-card">
|
||||
<div class="list-card-body">
|
||||
<div class="van-multi-ellipsis--l2" style="padding: 0 16px; font-weight: bold">{{row.brief}}</div>
|
||||
<van-cell :value="row.code" title="意见编号"></van-cell>
|
||||
<van-cell :value="row.createUserName" title="撰写人"></van-cell>
|
||||
<van-cell :value="row.typeName" title="意见类别"></van-cell>
|
||||
<van-cell :value="row.sessionName" title="届次"></van-cell>
|
||||
<van-cell :value="row.delegationName" title="代表团"></van-cell>
|
||||
<van-cell :value="row.processInstanceNodeName" title="当前节点"></van-cell>
|
||||
<div class="list-card-footer">
|
||||
<van-button @click="openView(row)" size="small">查看</van-button>
|
||||
<van-button v-if="row.processInstanceTaskStatus==='ACTIVE'" @click="openApproval(row)" size="small" type="primary">
|
||||
审核
|
||||
</van-button>
|
||||
<van-button
|
||||
v-if="row.processInstanceTaskStatus==='COMPLETE' && !row.nextTaskIsComplete"
|
||||
@click="openRevoke(row.processInstanceTaskId)"
|
||||
size="small"
|
||||
type="danger"
|
||||
>
|
||||
撤回
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="tableData.length===0"
|
||||
image="/assets/platform/plugins/vant-green/images/nodata/nodata.png"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</van-pull-refresh>
|
||||
|
||||
<van-popup :style="{ height: '100%', width: '100%' }" position="right" safe-area-inset-bottom v-model="infoShow">
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="infoShow=false" left-arrow left-text="返回" title="详细信息"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<div style="height: calc(100vh - 44px); overflow-y: auto">
|
||||
<info ref="infoRef"></info>
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.processInstanceNodeName}}</div>
|
||||
<van-form ref="vanFormRef">
|
||||
<van-field
|
||||
label="审核意见"
|
||||
name="approvalOpinion"
|
||||
v-model="formData.approvalOpinion"
|
||||
required
|
||||
:rules="[{ required: true, message: '请输入审核意见' }]"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="danger" block @click.submit="doApproval('BACK')">退回重新填写</van-button>
|
||||
<van-button type="danger" block @click.submit="doApproval('REJECT')">建议撤销</van-button>
|
||||
<van-button type="primary" block @click.submit="doApproval('PASS')">同意</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
info: H5_SUGGESTION_TC_INFO_COMPONENT
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
sessionId: null,
|
||||
approvalText: "0",
|
||||
approval: false
|
||||
},
|
||||
tableData: [],
|
||||
tableLoading: false,
|
||||
tableFinished: false,
|
||||
tableRefreshing: false,
|
||||
|
||||
sessionOptions: [],
|
||||
infoShow: false,
|
||||
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
rules: {
|
||||
approvalSignature: [{ required: true, message: "请签字" }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
})
|
||||
},
|
||||
|
||||
openApproval(row) {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
this.formData = row.approvalParam
|
||||
this.showApprovalForm = true
|
||||
})
|
||||
},
|
||||
doApproval(approvalType) {
|
||||
this.formData.bpmTaskApprovalType = approvalType
|
||||
|
||||
this.$refs.vanFormRef
|
||||
.validate()
|
||||
.then(() => {
|
||||
this.$axios
|
||||
.post("/platform/suggestion/tc/delegation/approval", {
|
||||
approval: JSON.stringify(this.formData)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.infoShow = false
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch((err) => {})
|
||||
},
|
||||
|
||||
openRevoke(taskId) {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "撤回",
|
||||
message: "您确定要撤回吗?",
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/suggestion/tc/delegation/revoke", { taskId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
sessionChange(val) {
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
listSession() {
|
||||
this.$axios.post("/platform/proposal/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = res.data
|
||||
.map((v) => ({
|
||||
text: v.fullName,
|
||||
value: v.id
|
||||
}))
|
||||
.concat([{ text: "全部届次", value: null }])
|
||||
if (this.sessionOptions.length > 0) {
|
||||
this.pageForm.sessionId = this.sessionOptions[0].value
|
||||
this.pageData()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
const loading = createListLoading()
|
||||
this.$axios
|
||||
.post("/platform/suggestion/tc/delegation/pageData", this.pageForm)
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length >= this.pageForm.totalCount) {
|
||||
this.tableFinished = true
|
||||
}
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
loading.close()
|
||||
this.tableLoading = false
|
||||
this.tableRefreshing = false
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
this.listSession()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+197
@@ -0,0 +1,197 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="我的意见" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
:reverse-color="false"
|
||||
:show-action="false"
|
||||
@search="doSearch"
|
||||
input-align="left"
|
||||
placeholder="请输入意见内容搜索"
|
||||
v-model="pageForm.brief"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :multiple="false" :options="sessionOptions" @change="sessionChange" v-model="pageForm.sessionId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<van-pull-refresh v-model="tableRefreshing" @refresh="doSearch" style="min-height: calc(100vh - 90px)">
|
||||
<van-list v-if="tableData && tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="" @load="pageData">
|
||||
<div v-for="row in tableData" :key="row.id" class="list-card">
|
||||
<div class="list-card-body">
|
||||
<div class="van-multi-ellipsis--l2" style="padding: 0 16px; font-weight: bold">{{row.brief}}</div>
|
||||
<van-cell :value="row.code" title="意见编号"></van-cell>
|
||||
<van-cell :value="row.createUserName" title="撰写人"></van-cell>
|
||||
<van-cell :value="row.typeName" title="意见类别"></van-cell>
|
||||
<van-cell :value="row.sessionName" title="届次"></van-cell>
|
||||
<van-cell :value="row.delegationName" title="代表团"></van-cell>
|
||||
<van-cell :value="row.processInstanceNodeName" title="当前节点"></van-cell>
|
||||
<div class="list-card-footer">
|
||||
<van-button @click="openView(row)" size="small">查看</van-button>
|
||||
<van-button @click="openEdit(row)" v-if="[10,40].includes(row.processInstanceNodeCode)" size="small">编辑</van-button>
|
||||
<van-button
|
||||
@click="$refs.inviteSeconderRef.onOpen(row)"
|
||||
v-if="[10,20].includes(row.processInstanceNodeCode)"
|
||||
size="small"
|
||||
type="primary"
|
||||
>
|
||||
邀请附议人
|
||||
</van-button>
|
||||
<van-button
|
||||
@click="openRevoke(row)"
|
||||
v-if="[20].includes(row.processInstanceNodeCode) && !row.nextTaskIsComplete"
|
||||
size="small"
|
||||
type="danger"
|
||||
>
|
||||
撤销
|
||||
</van-button>
|
||||
<van-button v-if="[10,40,50].includes(row.processInstanceNodeCode)" @click="del(row.id)" size="small" type="danger">
|
||||
删除
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-if="tableData.length===0" description="没有更多了"></van-empty>
|
||||
</van-pull-refresh>
|
||||
|
||||
<invite-seconder @refresh="doSearch" ref="inviteSeconderRef"></invite-seconder>
|
||||
|
||||
<van-popup :style="{ height: '100%', width: '100%' }" position="right" safe-area-inset-bottom v-model="infoShow">
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="infoShow=false" left-arrow left-text="返回" title="提案信息"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<div style="height: calc(100vh - 44px); overflow-y: auto">
|
||||
<info ref="infoRef"></info>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("inviteSeconder.js"){}#-->
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
"invite-seconder": SUGGESTION_TC_INVITE_SECONDER_COMPONENT,
|
||||
info: H5_SUGGESTION_TC_INFO_COMPONENT
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
sessionId: null
|
||||
},
|
||||
tableData: [],
|
||||
tableLoading: false,
|
||||
tableFinished: false,
|
||||
tableRefreshing: false,
|
||||
|
||||
sessionOptions: [],
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
sessionChange(val) {
|
||||
this.doSearch()
|
||||
},
|
||||
listSession() {
|
||||
this.$axios.post("/platform/proposal/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = res.data
|
||||
.map((v) => ({
|
||||
text: v.fullName,
|
||||
value: v.id
|
||||
}))
|
||||
.concat([{ text: "全部届次", value: null }])
|
||||
if (this.sessionOptions.length > 0) {
|
||||
this.pageForm.sessionId = this.sessionOptions[0].value
|
||||
this.pageData()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
openView(row) {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
})
|
||||
},
|
||||
openEdit(row) {
|
||||
this.$pjaxReplace("/platform/h5/suggestion/tc/write?id=" + row.id)
|
||||
},
|
||||
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
const loading = createListLoading()
|
||||
this.$axios
|
||||
.post("/platform/suggestion/tc/mine/pageData", this.pageForm)
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length >= this.pageForm.totalCount) {
|
||||
this.tableFinished = true
|
||||
}
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
loading.close()
|
||||
this.tableLoading = false
|
||||
this.tableRefreshing = false
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
openRevoke(row) {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤销申请吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/suggestion/tc/mine/revokeApply", { id: row.id }).then((resp) => {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
})
|
||||
},
|
||||
del(id) {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/suggestion/tc/mine/delete", { id }).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.listSession()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
const SUGGESTION_TC_INVITE_SECONDER_COMPONENT = {
|
||||
template: `
|
||||
<van-action-sheet v-model="visible" title="邀请附议人" class="height100">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
:show-action="false"
|
||||
placeholder="请输入工号或者姓名查询"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-tabs v-model="isInvite" @click="isInviteClick">
|
||||
<van-tab title="已邀请" name="1"></van-tab>
|
||||
<van-tab title="可邀请" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<van-checkbox-group v-model="tableSelection" v-if="tableData && tableData.length>0">
|
||||
<van-cell-group >
|
||||
<van-cell
|
||||
v-for="(item, index) in tableData"
|
||||
clickable
|
||||
:key="pageForm.isInvite +':'+ item.loginName"
|
||||
@click="tableRowToggle(index)"
|
||||
>
|
||||
<span slot="title">
|
||||
{{item.userName}}
|
||||
({{item.loginName}})
|
||||
<van-tag :plain="false">
|
||||
{{item.sex || '未知'}}
|
||||
</van-tag>
|
||||
</span>
|
||||
<span slot="label" class="font-size0 van-color-text-assist">
|
||||
{{item.unitName}}
|
||||
</span>
|
||||
<van-checkbox
|
||||
:name="item"
|
||||
ref="checkboxes"
|
||||
slot="right-icon"
|
||||
v-if="!pageForm.isInvite"></van-checkbox>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<div class="p10">
|
||||
<van-pagination
|
||||
v-model="pageForm.pageNumber"
|
||||
:total-items="pageForm.totalCount"
|
||||
:items-per-page="pageForm.pageSize"
|
||||
@change="pageData"
|
||||
></van-pagination>
|
||||
<van-button @click="invite" type="primary" block :disabled="pageForm.isInvite" class="mt10">邀请</van-button>
|
||||
</div>
|
||||
</van-checkbox-group>
|
||||
<van-empty v-else :figure="2"></van-empty>
|
||||
</van-action-sheet>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
secondedNum: 0,
|
||||
record: {},
|
||||
tableData: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0,
|
||||
isInvite: false,
|
||||
searchKeyword: null
|
||||
},
|
||||
isInvite: "0",
|
||||
tableSelection: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(record) {
|
||||
this.visible = true
|
||||
this.record = record
|
||||
this.pageData()
|
||||
},
|
||||
detail(id) {},
|
||||
invite() {
|
||||
if (this.tableSelection.length === 0) {
|
||||
this.$toast("请先选择附议人后在点击邀请")
|
||||
return
|
||||
}
|
||||
|
||||
/* this.visible = false
|
||||
this.$emit("refresh", null)*/
|
||||
|
||||
const loginNames = this.tableSelection.map((s) => s.loginName)
|
||||
this.$axios
|
||||
.post("/platform/suggestion/tc/mine/inviteSeconder", {
|
||||
task: JSON.stringify({
|
||||
processTaskId: this.record.processTaskId,
|
||||
processInstId: this.record.processInstId
|
||||
}),
|
||||
proposalId: this.record.id,
|
||||
seconders: JSON.stringify(loginNames)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.pageData()
|
||||
this.$toast.success(res.msg)
|
||||
this.tableSelection = []
|
||||
// this.visible = false
|
||||
this.$emit("refresh", null)
|
||||
}
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
this.$axios
|
||||
.post("/platform/suggestion/tc/mine/listSeconder", {
|
||||
...this.pageForm,
|
||||
sessionId: this.record.sessionId,
|
||||
proposalId: this.record.id
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
|
||||
isInviteClick(index, title) {
|
||||
this.pageForm.isInvite = index === "1"
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
tableRowToggle(index) {
|
||||
console.log(index)
|
||||
}
|
||||
}
|
||||
}
|
||||
+198
@@ -0,0 +1,198 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="意见附议" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
:reverse-color="false"
|
||||
:show-action="false"
|
||||
@search="doSearch"
|
||||
input-align="left"
|
||||
placeholder="请输入意见内容搜索"
|
||||
v-model="pageForm.brief"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :multiple="false" :options="sessionOptions" @change="sessionChange" v-model="pageForm.sessionId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
<van-tabs v-model="pageForm.approvalText" @change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已附议" name="1"></van-tab>
|
||||
<van-tab title="未附议" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<van-pull-refresh v-model="tableRefreshing" @refresh="doSearch" style="min-height: calc(100vh - 90px)">
|
||||
<van-list v-if="tableData && tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="" @load="pageData">
|
||||
<div v-for="row in tableData" class="list-card">
|
||||
<div class="list-card-body">
|
||||
<div class="van-multi-ellipsis--l2" style="padding: 0 16px; font-weight: bold">{{row.brief}}</div>
|
||||
<van-cell :value="row.code" title="意见编号"></van-cell>
|
||||
<van-cell :value="row.createUserName" title="撰写人"></van-cell>
|
||||
<van-cell :value="row.typeName" title="意见类别"></van-cell>
|
||||
<van-cell :value="row.sessionName" title="届次"></van-cell>
|
||||
<van-cell :value="row.delegationName" title="代表团"></van-cell>
|
||||
<van-cell :value="row.processInstanceNodeName" title="当前节点"></van-cell>
|
||||
<div class="list-card-footer">
|
||||
<van-button @click="openView(row)" size="small">查看</van-button>
|
||||
<van-button v-if="row.processInstanceTaskStatus==='ACTIVE'" @click="openApproval(row)" type="primary" size="small">
|
||||
附议
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-if="tableData.length===0" description="没有更多了"></van-empty>
|
||||
</van-pull-refresh>
|
||||
|
||||
<van-popup :style="{ height: '100%', width: '100%' }" position="right" safe-area-inset-bottom v-model="infoShow">
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="infoShow=false" left-arrow left-text="返回" title="详细信息"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<div style="height: calc(100vh - 44px); overflow-y: auto">
|
||||
<info ref="infoRef"></info>
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.processInstanceNodeName}}</div>
|
||||
<form @submit.prevent="">
|
||||
<van-field label="签字" name="approvalSignature" v-model="formData.signature" required class="direction-column-field">
|
||||
<h5-signature v-model="formData.approvalSignature" slot="input"></h5-signature>
|
||||
</van-field>
|
||||
</form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="danger" block @click.submit="doApproval('REJECT')">拒绝</van-button>
|
||||
<van-button type="primary" block @click.submit="doApproval('PASS')">同意</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
info: H5_SUGGESTION_TC_INFO_COMPONENT
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
sessionId: null,
|
||||
approvalText: "0",
|
||||
approval: false
|
||||
},
|
||||
tableData: [],
|
||||
tableLoading: false,
|
||||
tableFinished: false,
|
||||
tableRefreshing: false,
|
||||
|
||||
sessionOptions: [],
|
||||
infoShow: false,
|
||||
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
rules: {
|
||||
approvalSignature: [{ required: true, message: "请签字" }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
})
|
||||
},
|
||||
|
||||
openApproval(row) {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
this.formData = row.approvalParam
|
||||
this.showApprovalForm = true
|
||||
})
|
||||
},
|
||||
doApproval(approvalType) {
|
||||
this.formData.bpmTaskApprovalType = approvalType
|
||||
formRules(this.rules, this.formData, (valid) => {
|
||||
if (valid) {
|
||||
this.$axios
|
||||
.post("/platform/suggestion/tc/seconded/approval", {
|
||||
approval: JSON.stringify(this.formData)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.infoShow = false
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
sessionChange(val) {
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
listSession() {
|
||||
this.$axios.post("/platform/proposal/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = res.data
|
||||
.map((v) => ({
|
||||
text: v.fullName,
|
||||
value: v.id
|
||||
}))
|
||||
.concat([{ text: "全部届次", value: null }])
|
||||
if (this.sessionOptions.length > 0) {
|
||||
this.pageForm.sessionId = this.sessionOptions[0].value
|
||||
this.pageData()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
const loading = createListLoading()
|
||||
this.$axios
|
||||
.post("/platform/suggestion/tc/seconded/pageData", this.pageForm)
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length >= this.pageForm.totalCount) {
|
||||
this.tableFinished = true
|
||||
}
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
loading.close()
|
||||
this.tableLoading = false
|
||||
this.tableRefreshing = false
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
this.listSession()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+274
@@ -0,0 +1,274 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="撰写意见" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
|
||||
<van-cell-group>
|
||||
<van-form @submit="doSave">
|
||||
<van-field v-model="formData.createUserName" name="createUserName" label="代表姓名" readonly></van-field>
|
||||
<van-field v-model="formData.createTime" name="createTime" label="提案时间" readonly></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.sessionName"
|
||||
name="sessionName"
|
||||
label="所属教代会"
|
||||
required
|
||||
readonly
|
||||
clickable
|
||||
@click="showSessionPicker = true"
|
||||
placeholder="请选择"
|
||||
:rules="[{ required: true, message: '请选择教代会' }]"
|
||||
></van-field>
|
||||
<van-popup v-model="showSessionPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="sessionOptions"
|
||||
value-key="fullName"
|
||||
@cancel="showSessionPicker = false"
|
||||
@confirm="sessionConfirm"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
v-model="formData.delegationName"
|
||||
name="delegationName"
|
||||
label="所属代表团"
|
||||
required
|
||||
readonly
|
||||
clickable
|
||||
@click="showDelegationPicker = true"
|
||||
placeholder="请选择"
|
||||
:rules="[{ required: true, message: '请选择代表团' }]"
|
||||
></van-field>
|
||||
<van-popup v-model="showDelegationPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="delegationOptions"
|
||||
value-key="name"
|
||||
@cancel="showDelegationPicker = false"
|
||||
@confirm="delegationConfirm"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field v-model="formData.unitName" name="unitName" label="单位" readonly></van-field>
|
||||
<van-field
|
||||
v-model="formData.mobile"
|
||||
name="mobile"
|
||||
label="联系电话"
|
||||
required
|
||||
readonly
|
||||
:rules="[{ required: true, message: '请填写联系电话' }]"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.typeName"
|
||||
name="typeName"
|
||||
label="意见类别"
|
||||
required
|
||||
readonly
|
||||
clickable
|
||||
@click="showTypePicker = true"
|
||||
placeholder="请选择"
|
||||
:rules="[{ required: true, message: '请选择意见类别' }]"
|
||||
></van-field>
|
||||
<van-popup v-model="showTypePicker" position="bottom">
|
||||
<van-picker show-toolbar :columns="typeOptions" value-key="name" @cancel="showTypePicker = false" @confirm="typeConfirm"></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="意见内容" name="brief" v-model="formData.brief" required class="direction-column-field">
|
||||
<template #input>
|
||||
<text-editor v-model="formData.brief"></text-editor>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field label="附件" name="files" class="direction-column-field">
|
||||
<h5-file-upload
|
||||
slot="input"
|
||||
:value.sync="formData.files"
|
||||
:upload_number="5"
|
||||
upload_mode="file"
|
||||
upload_result_category="array"
|
||||
upload_result_type="url"
|
||||
complete_result
|
||||
></h5-file-upload>
|
||||
</van-field>
|
||||
|
||||
<van-cell cell-class="form-button-cell" v-if="showButton">
|
||||
<van-button type="primary" size="large" block native-type="submit">保存到我的意见</van-button>
|
||||
</van-cell>
|
||||
</van-form>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
formData: {},
|
||||
showSourcePicker: false,
|
||||
showSessionPicker: false,
|
||||
showDelegationPicker: false,
|
||||
showCommitteePicker: false,
|
||||
showTypePicker: false,
|
||||
|
||||
sourceOptions: [],
|
||||
sessionOptions: [],
|
||||
delegationOptions: [],
|
||||
typeOptions: [],
|
||||
|
||||
proposalConfig: {},
|
||||
noticeDialogVisible: false,
|
||||
|
||||
showButton: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSave(values) {
|
||||
if (!this.formData.brief) {
|
||||
this.$toast("请填写意见内容")
|
||||
return
|
||||
}
|
||||
const briefLength = removeHTMLTag(this.formData.brief)
|
||||
if (briefLength < this.suggestionConfig.briefMinLength) {
|
||||
this.$toast("意见内容最少" + this.suggestionConfig.briefMinLength + "个字")
|
||||
return
|
||||
}
|
||||
|
||||
const loading = createListLoading()
|
||||
this.$axios
|
||||
.post("/platform/suggestion/tc/write/save", { info: JSON.stringify(this.formData) })
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.$pjaxReplace("/platform/h5/suggestion/tc/mine")
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
loading.clear()
|
||||
})
|
||||
},
|
||||
|
||||
sessionConfirm(val) {
|
||||
this.showSessionPicker = false
|
||||
this.formData.sessionName = val.fullName
|
||||
this.formData.sessionId = val.id
|
||||
},
|
||||
delegationConfirm(val) {
|
||||
this.showDelegationPicker = false
|
||||
this.formData.delegationId = val.id
|
||||
this.formData.delegationName = val.name
|
||||
},
|
||||
typeConfirm(val) {
|
||||
this.showTypePicker = false
|
||||
this.formData.typeId = val.id
|
||||
this.formData.typeName = val.name
|
||||
},
|
||||
|
||||
listSuggestionType() {
|
||||
this.$axios.post("/platform/suggestion/tc/common/listProposalType").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.typeOptions = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getSuggestionConfig() {
|
||||
return this.$axios.post("/platform/suggestion/tc/common/config").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.suggestionConfig = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//教代会change
|
||||
async meetingChange(val) {
|
||||
this.$set(this.formData, "delegationId", null)
|
||||
this.formData.delegationOptions = []
|
||||
this.listDelegation()
|
||||
this.searchSelfDelegation()
|
||||
},
|
||||
|
||||
// 查询当前用户所在代表团
|
||||
listDelegation() {
|
||||
return this.$axios.post("/platform/proposal/common/listDelegation", { sessionId: this.formData.sessionId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.delegationOptions = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查询开放的教代会届次
|
||||
listOpenSession(isModify = false) {
|
||||
return this.$axios.post("/platform/suggestion/tc/common/listOpenSession").then(async (res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = res.data
|
||||
if (!isModify && this.sessionOptions) {
|
||||
this.$set(this.formData, "sessionId", this.sessionOptions[0].id)
|
||||
this.$set(this.formData, "sessionName", this.sessionOptions[0].fullName)
|
||||
await this.listDelegation()
|
||||
await this.searchSelfDelegation()
|
||||
}
|
||||
|
||||
if (isModify) {
|
||||
const session = this.sessionOptions.find((v) => v.id === this.formData.sessionId)
|
||||
this.$set(this.formData, "sessionName", session?.fullName)
|
||||
await this.listDelegation()
|
||||
const delegation = this.delegationOptions.find((v) => v.id === this.formData.delegationId)
|
||||
this.$set(this.formData, "delegationName", delegation?.name)
|
||||
|
||||
if (this.formData.typeId) {
|
||||
this.typeConfirm(this.typeOptions.find((v) => v.id === this.formData.typeId))
|
||||
}
|
||||
}
|
||||
|
||||
// await this.listDelegation()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//查询自己有权限的代表团
|
||||
searchSelfDelegation() {
|
||||
return this.$axios.post("/platform/suggestion/tc/write/selfDelegation", { sessionId: this.formData.sessionId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$set(this.formData, "delegationId", res.data)
|
||||
this.$set(this.formData, "delegationName", this.delegationOptions.find((item) => item.id === res.data)?.name)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
init() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.$axios.post("/platform/suggestion/tc/write/detail", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
this.listOpenSession(true)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.noticeDialogVisible = true
|
||||
this.listOpenSession(false)
|
||||
this.$set(this.formData, "createUserId", this.$store.state.user.id)
|
||||
this.$set(this.formData, "createUserName", this.$store.state.user.username)
|
||||
this.$set(this.formData, "createUserLoginName", this.$store.state.user.loginname)
|
||||
this.$set(this.formData, "createTime", this.$moment().format("YYYY-MM-DD"))
|
||||
this.$set(this.formData, "mobile", this.$store.state.user.mobile)
|
||||
this.$set(this.formData, "unitName", this.$store.state.user.unit?.name)
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
this.listSuggestionType()
|
||||
this.getSuggestionConfig()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,228 @@
|
||||
const H5_SUGGESTION_WC_INFO_COMPONENT = {
|
||||
name: "ProposalInfo",
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<div class="process-title">基本信息</div>
|
||||
<van-cell-group>
|
||||
<van-cell title="意见编号">{{ viewData.code }}</van-cell>
|
||||
<van-cell title="撰写人">{{ viewData.createUserName }}</van-cell>
|
||||
<van-cell title="撰写时间">{{ viewData.createTime }}</van-cell>
|
||||
<van-cell title="工代会届次">{{ viewData.fullName }}</van-cell>
|
||||
<van-cell title="撰写人单位">{{ viewData.unitName }}</van-cell>
|
||||
<van-cell :title="viewData.mannerCode!=='W03'?'代表团名称':'委员会名称'">
|
||||
{{ viewData.mannerCode !== 'W03' ? viewData.delegationName : viewData.committeeName }}
|
||||
</van-cell>
|
||||
<van-cell title="意见类别">
|
||||
{{viewData.typeName}}
|
||||
</van-cell>
|
||||
<van-cell title="意见内容">
|
||||
<div slot="label" class="font-size1 van-color-text-primary break-all" style="white-space: normal;">
|
||||
<div v-html="viewData.brief"></div>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell title="附件">
|
||||
<div slot="label">
|
||||
{{viewData.files}}
|
||||
</div>
|
||||
</van-cell>
|
||||
<!-- <van-cell title="签字">-->
|
||||
<!-- <div slot="label">-->
|
||||
<!-- <van-image :src="viewData.signature"-->
|
||||
<!-- style="width: 100%;height: 150px;border: 1px dashed"></van-image>-->
|
||||
<!-- </div>-->
|
||||
<!-- </van-cell>-->
|
||||
</van-cell-group>
|
||||
|
||||
<div class="process-title">
|
||||
附议人信息
|
||||
</div>
|
||||
<van-cell-group>
|
||||
<van-cell title="提案名称" v-for="item in viewData.seconders">
|
||||
<template slot="title">
|
||||
<span class="font-size1">{{item.createVariable.userName}}</span>
|
||||
<span class="margin-left10 font-size1 van-color-text-regular">/ {{item.createVariable.loginName}}</span>
|
||||
</template>
|
||||
<template slot="label">
|
||||
<span class="font-size0 van-color-text-assist">{{item.createVariable.unitName}}</span>
|
||||
</template>
|
||||
<template>
|
||||
<span class="font-size2 van-color-text-placeholder bold">
|
||||
<span v-if="item.extVariable && item.extVariable.bpmTaskApprovalType">
|
||||
<van-tag size="mini" type="success"
|
||||
v-if="item.extVariable.bpmTaskApprovalType==='PASS'">同意</van-tag>
|
||||
<van-tag size="mini" type="danger" v-if="item.extVariable.bpmTaskApprovalType==='REJECT'">拒绝</van-tag>
|
||||
</span>
|
||||
<span v-else>
|
||||
<van-tag size="mini">未附议</van-tag>
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<div>
|
||||
<div v-for="nodeTask in viewData.nodeTasks" :key="nodeTask.id">
|
||||
<div class="process-title" v-if="nodeTask.nodeCode !== 20">
|
||||
{{nodeTask.nodeName}}
|
||||
</div>
|
||||
<div v-if="nodeTask.nodeCode === 30">
|
||||
<van-cell-group v-for="task in nodeTask.tasks" :key="task.id">
|
||||
<van-cell title="审核人">{{ task.actualOwnerLoginName + '-' + task.actualOwnerUserName}}
|
||||
</van-cell>
|
||||
<van-cell title="审核时间">{{ task.endOn}}</van-cell>
|
||||
<van-cell title="审核结果">
|
||||
<div v-if="task.extVariable">
|
||||
<van-tag type="success" size="mini"
|
||||
v-if="task.extVariable.bpmTaskApprovalType === 'PASS'">同意
|
||||
</van-tag>
|
||||
<van-tag type="danger" size="mini"
|
||||
v-if="task.extVariable.bpmTaskApprovalType === 'BACK'">退回重新填写
|
||||
</van-tag>
|
||||
<van-tag type="danger" size="mini"
|
||||
v-if="task.extVariable.bpmTaskApprovalType === 'REJECT'">建议撤销
|
||||
</van-tag>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell title="审核意见">
|
||||
<div style="white-space: normal">
|
||||
{{ task.extVariable.approvalOpinion}}
|
||||
</div>
|
||||
</van-cell>
|
||||
<!-- <van-cell title="签字">-->
|
||||
<!-- <van-image :src="task.extVariable.approvalSignature"-->
|
||||
<!-- v-if="task.extVariable && task.extVariable.approvalSignature"-->
|
||||
<!-- class="signature-image"></van-image>-->
|
||||
<!-- </van-cell>-->
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
<div v-if="nodeTask.nodeCode === 60 || nodeTask.nodeCode === 70">
|
||||
<van-cell-group v-for="task in nodeTask.tasks" :key="task.id">
|
||||
<van-cell title="审核人">{{ task.actualOwnerLoginName + '-' + task.actualOwnerUserName}}
|
||||
</van-cell>
|
||||
<van-cell title="审核时间">{{ task.endOn}}</van-cell>
|
||||
<van-cell title="审核结果">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="task.extVariable.caseFilingResult">
|
||||
</dict-tag>
|
||||
</van-cell>
|
||||
<template
|
||||
v-if="task.extVariable.caseFilingResult!=='NOT' && task.extVariable.caseFilingResult!==''">
|
||||
<van-cell title="主办单位" :span="3">{{ task.extVariable.hostUnit}}</van-cell>
|
||||
<van-cell title="协办单位" :span="3">
|
||||
<div style="white-space: normal">
|
||||
{{ task.extVariable.helpUnits.join(',')}}
|
||||
</div>
|
||||
</van-cell>
|
||||
</template>
|
||||
<van-cell title="审核意见">
|
||||
<div style="white-space: normal">
|
||||
{{ task.extVariable.approvalOpinion}}
|
||||
</div>
|
||||
</van-cell>
|
||||
<!-- <van-cell title="签字">-->
|
||||
<!-- <van-image :src="task.extVariable.approvalSignature"-->
|
||||
<!-- v-if="task.extVariable && task.extVariable.approvalSignature"-->
|
||||
<!-- class="signature-image"></van-image>-->
|
||||
<!-- </van-cell>-->
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
<div v-if="nodeTask.nodeCode === 80">
|
||||
<van-cell-group v-for="task in nodeTask.tasks" :key="task.id">
|
||||
<van-cell title="承办单位">
|
||||
{{ task.createVariable.underTakeName}}
|
||||
({{ task.createVariable.isMaster ? '主办' : '协办'}})
|
||||
</van-cell>
|
||||
<van-cell title="答复人">{{ task.actualOwnerLoginName + '-' + task.actualOwnerUserName}}
|
||||
</van-cell>
|
||||
<van-cell title="答复时间">{{ task.endOn}}</van-cell>
|
||||
<van-cell title="答复内容">
|
||||
<div v-html="task.extVariable.approvalOpinion"></div>
|
||||
</van-cell>
|
||||
<!-- <van-cell title="签字">-->
|
||||
<!-- <van-image :src="task.extVariable.approvalSignature"-->
|
||||
<!-- v-if="task.extVariable && task.extVariable.approvalSignature"-->
|
||||
<!-- class="signature-image"></van-image>-->
|
||||
<!-- </van-cell>-->
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
<div v-if="nodeTask.nodeCode === 90">
|
||||
<van-cell-group v-for="task in nodeTask.tasks" :key="task.id">
|
||||
<van-cell title="承办单位">
|
||||
{{ task.createVariable.underTakeName}}
|
||||
({{ task.createVariable.isMaster ? '主办' : '协办'}})
|
||||
</van-cell>
|
||||
<van-cell title="校领导">{{ task.actualOwnerLoginName + '-' + task.actualOwnerUserName}}
|
||||
</van-cell>
|
||||
<van-cell title="审批时间">{{ task.endOn}}</van-cell>
|
||||
<van-cell title="审批结果" :span="3">
|
||||
<van-tag size="mini" type="success"
|
||||
v-if="task.extVariable.bpmTaskApprovalType==='PASS'">同意
|
||||
</van-tag>
|
||||
<van-tag size="mini" type="danger"
|
||||
v-if="task.extVariable.bpmTaskApprovalType==='BACK_OTHER_NODE'">退回重新答复
|
||||
</van-tag>
|
||||
</van-cell>
|
||||
<van-cell title="审批意见">
|
||||
<div style="white-space: normal">
|
||||
{{ task.extVariable.approvalOpinion}}
|
||||
</div>
|
||||
</van-cell>
|
||||
<!-- <van-cell title="签字">-->
|
||||
<!-- <van-image :src="task.extVariable.approvalSignature"-->
|
||||
<!-- v-if="task.extVariable && task.extVariable.approvalSignature"-->
|
||||
<!-- class="signature-image"></van-image>-->
|
||||
<!-- </van-cell>-->
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
<div v-if="nodeTask.nodeCode === 100">
|
||||
<van-cell-group v-for="task in nodeTask.tasks" :key="task.id">
|
||||
<van-cell title="反馈人">{{ task.actualOwnerLoginName + '-' + task.actualOwnerUserName}}
|
||||
</van-cell>
|
||||
<van-cell title="反馈时间">{{ task.endOn}}</van-cell>
|
||||
<van-cell title="反馈结果">
|
||||
{{ task.extVariable.feedBackScore}}
|
||||
</van-cell>
|
||||
<van-cell title="反馈意见">
|
||||
<div style="white-space: normal">
|
||||
{{ task.extVariable.approvalOpinion}}
|
||||
</div>
|
||||
</van-cell>
|
||||
<!-- <van-cell title="签字">-->
|
||||
<!-- <van-image :src="task.extVariable.approvalSignature"-->
|
||||
<!-- v-if="task.extVariable && task.extVariable.approvalSignature"-->
|
||||
<!-- class="signature-image"></van-image>-->
|
||||
<!-- </van-cell>-->
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
dicts: ["SUGGESTION_CASE_FILING_RESULT"],
|
||||
data() {
|
||||
return {
|
||||
viewData: {},
|
||||
viewDialogVisible: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(id) {
|
||||
this.$axios.post("/platform/suggestion/tc/common/suggestionInfo", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
openView(id) {
|
||||
// this.viewDialogVisible = true
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.infoDialogRef.onOpen(id)
|
||||
// })
|
||||
}
|
||||
}
|
||||
}
|
||||
+236
@@ -0,0 +1,236 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="团长审核" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
:reverse-color="false"
|
||||
:show-action="false"
|
||||
@search="doSearch"
|
||||
input-align="left"
|
||||
placeholder="请输入意见内容搜索"
|
||||
v-model="pageForm.brief"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :multiple="false" :options="sessionOptions" @change="sessionChange" v-model="pageForm.sessionId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
<van-tabs v-model="pageForm.approvalText" @change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<van-pull-refresh v-model="tableRefreshing" @refresh="doSearch" style="min-height: calc(100vh - 90px)">
|
||||
<van-list v-if="tableData && tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="" @load="pageData">
|
||||
<div v-for="row in tableData" class="list-card">
|
||||
<div class="list-card-body">
|
||||
<div class="van-multi-ellipsis--l2" style="padding: 0 16px; font-weight: bold">{{row.brief}}</div>
|
||||
<van-cell :value="row.code" title="意见编号"></van-cell>
|
||||
<van-cell :value="row.createUserName" title="撰写人"></van-cell>
|
||||
<van-cell :value="row.typeName" title="意见类别"></van-cell>
|
||||
<van-cell :value="row.sessionName" title="届次"></van-cell>
|
||||
<van-cell :value="row.delegationName" title="代表团"></van-cell>
|
||||
<van-cell :value="row.processInstanceNodeName" title="当前节点"></van-cell>
|
||||
<div class="list-card-footer">
|
||||
<van-button @click="openView(row)" size="small">查看</van-button>
|
||||
<van-button v-if="row.processInstanceTaskStatus==='ACTIVE'" @click="openApproval(row)" size="small" type="primary">
|
||||
审核
|
||||
</van-button>
|
||||
<van-button
|
||||
v-if="row.processInstanceTaskStatus==='COMPLETE' && !row.nextTaskIsComplete"
|
||||
@click="openRevoke(row.processInstanceTaskId)"
|
||||
size="small"
|
||||
type="danger"
|
||||
>
|
||||
撤回
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="tableData.length===0"
|
||||
image="/assets/platform/plugins/vant-green/images/nodata/nodata.png"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</van-pull-refresh>
|
||||
|
||||
<van-popup :style="{ height: '100%', width: '100%' }" position="right" safe-area-inset-bottom v-model="infoShow">
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="infoShow=false" left-arrow left-text="返回" title="详细信息"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<div style="height: calc(100vh - 44px); overflow-y: auto">
|
||||
<info ref="infoRef"></info>
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.processInstanceNodeName}}</div>
|
||||
<van-form ref="vanFormRef">
|
||||
<van-field
|
||||
label="审核意见"
|
||||
name="approvalOpinion"
|
||||
v-model="formData.approvalOpinion"
|
||||
required
|
||||
:rules="[{ required: true, message: '请输入审核意见' }]"
|
||||
placeholder="请输入审核意见"
|
||||
></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="danger" block @click.submit="doApproval('BACK')">退回重新填写</van-button>
|
||||
<van-button type="danger" block @click.submit="doApproval('REJECT')">建议撤销</van-button>
|
||||
<van-button type="primary" block @click.submit="doApproval('PASS')">同意</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
info: H5_SUGGESTION_WC_INFO_COMPONENT
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
sessionId: null,
|
||||
approvalText: "0",
|
||||
approval: false
|
||||
},
|
||||
tableData: [],
|
||||
tableLoading: false,
|
||||
tableFinished: false,
|
||||
tableRefreshing: false,
|
||||
|
||||
sessionOptions: [],
|
||||
infoShow: false,
|
||||
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
rules: {
|
||||
approvalSignature: [{ required: true, message: "请签字" }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
})
|
||||
},
|
||||
|
||||
openApproval(row) {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
this.formData = row.approvalParam
|
||||
this.showApprovalForm = true
|
||||
})
|
||||
},
|
||||
doApproval(approvalType) {
|
||||
this.formData.bpmTaskApprovalType = approvalType
|
||||
|
||||
this.$refs.vanFormRef
|
||||
.validate()
|
||||
.then(() => {
|
||||
this.$axios
|
||||
.post("/platform/suggestion/wc/delegation/approval", {
|
||||
approval: JSON.stringify(this.formData)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.infoShow = false
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch((err) => {})
|
||||
},
|
||||
|
||||
openRevoke(taskId) {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "撤回",
|
||||
message: "您确定要撤回吗?",
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/suggestion/wc/delegation/revoke", { taskId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
sessionChange(val) {
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
listSession() {
|
||||
this.$axios.post("/platform/suggestion/wc/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = res.data
|
||||
.map((v) => ({
|
||||
text: v.fullName,
|
||||
value: v.id
|
||||
}))
|
||||
.concat([{ text: "全部届次", value: null }])
|
||||
if (this.sessionOptions.length > 0) {
|
||||
this.pageForm.sessionId = this.sessionOptions[0].value
|
||||
this.pageData()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
const loading = createListLoading()
|
||||
this.$axios
|
||||
.post("/platform/suggestion/tc/delegation/pageData", this.pageForm)
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length >= this.pageForm.totalCount) {
|
||||
this.tableFinished = true
|
||||
}
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
loading.close()
|
||||
this.tableLoading = false
|
||||
this.tableRefreshing = false
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
this.listSession()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+197
@@ -0,0 +1,197 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="我的意见" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
:reverse-color="false"
|
||||
:show-action="false"
|
||||
@search="doSearch"
|
||||
input-align="left"
|
||||
placeholder="请输入意见内容搜索"
|
||||
v-model="pageForm.brief"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :multiple="false" :options="sessionOptions" @change="sessionChange" v-model="pageForm.sessionId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<van-pull-refresh v-model="tableRefreshing" @refresh="doSearch" style="min-height: calc(100vh - 90px)">
|
||||
<van-list v-if="tableData && tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="" @load="pageData">
|
||||
<div v-for="row in tableData" class="list-card">
|
||||
<div class="list-card-body">
|
||||
<div class="van-multi-ellipsis--l2" style="padding: 0 16px; font-weight: bold">{{row.brief}}</div>
|
||||
<van-cell :value="row.code" title="意见编号"></van-cell>
|
||||
<van-cell :value="row.createUserName" title="撰写人"></van-cell>
|
||||
<van-cell :value="row.typeName" title="意见类别"></van-cell>
|
||||
<van-cell :value="row.sessionName" title="届次"></van-cell>
|
||||
<van-cell :value="row.delegationName" title="代表团"></van-cell>
|
||||
<van-cell :value="row.processInstanceNodeName" title="当前节点"></van-cell>
|
||||
<div class="list-card-footer">
|
||||
<van-button @click="openView(row)" size="small">查看</van-button>
|
||||
<van-button @click="openEdit(row)" v-if="[10,40].includes(row.processInstanceNodeCode)" size="small">编辑</van-button>
|
||||
<van-button
|
||||
@click="$refs.inviteSeconderRef.onOpen(row)"
|
||||
v-if="[10,20].includes(row.processInstanceNodeCode)"
|
||||
size="small"
|
||||
type="primary"
|
||||
>
|
||||
邀请附议人
|
||||
</van-button>
|
||||
<van-button
|
||||
@click="openRevoke(row)"
|
||||
v-if="[20].includes(row.processInstanceNodeCode) && !row.nextTaskIsComplete"
|
||||
size="small"
|
||||
type="danger"
|
||||
>
|
||||
撤销
|
||||
</van-button>
|
||||
<van-button v-if="[10,40,50].includes(row.processInstanceNodeCode)" @click="del(row.id)" size="small" type="danger">
|
||||
删除
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty v-if="tableData.length===0" description="没有更多了"></van-empty>
|
||||
</van-pull-refresh>
|
||||
|
||||
<invite-seconder @refresh="doSearch" ref="inviteSeconderRef"></invite-seconder>
|
||||
|
||||
<van-popup :style="{ height: '100%', width: '100%' }" position="right" safe-area-inset-bottom v-model="infoShow">
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="infoShow=false" left-arrow left-text="返回" title="提案信息"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<div style="height: calc(100vh - 44px); overflow-y: auto">
|
||||
<info ref="infoRef"></info>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("inviteSeconder.js"){}#-->
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
"invite-seconder": SUGGESTION_WC_INVITE_SECONDER_COMPONENT,
|
||||
info: H5_SUGGESTION_WC_INFO_COMPONENT
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
sessionId: null
|
||||
},
|
||||
tableData: [],
|
||||
tableLoading: false,
|
||||
tableFinished: false,
|
||||
tableRefreshing: false,
|
||||
|
||||
sessionOptions: [],
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
sessionChange(val) {
|
||||
this.doSearch()
|
||||
},
|
||||
listSession() {
|
||||
this.$axios.post("/platform/suggestion/wc/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = res.data
|
||||
.map((v) => ({
|
||||
text: v.fullName,
|
||||
value: v.id
|
||||
}))
|
||||
.concat([{ text: "全部届次", value: null }])
|
||||
if (this.sessionOptions.length > 0) {
|
||||
this.pageForm.sessionId = this.sessionOptions[0].value
|
||||
this.pageData()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
openView(row) {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
})
|
||||
},
|
||||
openEdit(row) {
|
||||
this.$pjaxReplace("/platform/h5/suggestion/wc/write?id=" + row.id)
|
||||
},
|
||||
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
const loading = createListLoading()
|
||||
this.$axios
|
||||
.post("/platform/suggestion/wc/mine/pageData", this.pageForm)
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length >= this.pageForm.totalCount) {
|
||||
this.tableFinished = true
|
||||
}
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
loading.close()
|
||||
this.tableLoading = false
|
||||
this.tableRefreshing = false
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
},
|
||||
openRevoke(row) {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤销申请吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/suggestion/wc/mine/revokeApply", { id: row.id }).then((resp) => {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
})
|
||||
},
|
||||
del(id) {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/suggestion/wc/mine/delete", { id }).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.listSession()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
const SUGGESTION_WC_INVITE_SECONDER_COMPONENT = {
|
||||
template: `
|
||||
<van-action-sheet v-model="visible" title="邀请附议人" class="height100">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
:show-action="false"
|
||||
placeholder="请输入工号或者姓名查询"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-tabs v-model="isInvite" @click="isInviteClick">
|
||||
<van-tab title="已邀请" name="1"></van-tab>
|
||||
<van-tab title="可邀请" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<van-checkbox-group v-model="tableSelection" v-if="tableData && tableData.length>0">
|
||||
<van-cell-group >
|
||||
<van-cell
|
||||
v-for="(item, index) in tableData"
|
||||
clickable
|
||||
:key="pageForm.isInvite +':'+ item.loginName"
|
||||
@click="tableRowToggle(index)"
|
||||
>
|
||||
<span slot="title">
|
||||
{{item.userName}}
|
||||
({{item.loginName}})
|
||||
<van-tag :plain="false">
|
||||
{{item.sex || '未知'}}
|
||||
</van-tag>
|
||||
</span>
|
||||
<span slot="label" class="font-size0 van-color-text-assist">
|
||||
{{item.unitName}}
|
||||
</span>
|
||||
<van-checkbox
|
||||
:name="item"
|
||||
ref="checkboxes"
|
||||
slot="right-icon"
|
||||
v-if="!pageForm.isInvite"></van-checkbox>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<div class="p10">
|
||||
<van-pagination
|
||||
v-model="pageForm.pageNumber"
|
||||
:total-items="pageForm.totalCount"
|
||||
:items-per-page="pageForm.pageSize"
|
||||
@change="pageData"
|
||||
></van-pagination>
|
||||
<van-button @click="invite" type="primary" block :disabled="pageForm.isInvite" class="mt10">邀请</van-button>
|
||||
</div>
|
||||
</van-checkbox-group>
|
||||
<van-empty v-else :figure="2"></van-empty>
|
||||
</van-action-sheet>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
secondedNum: 0,
|
||||
record: {},
|
||||
tableData: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0,
|
||||
isInvite: false,
|
||||
searchKeyword: null
|
||||
},
|
||||
isInvite: "0",
|
||||
tableSelection: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(record) {
|
||||
this.visible = true
|
||||
this.record = record
|
||||
this.pageData()
|
||||
},
|
||||
detail(id) {},
|
||||
invite() {
|
||||
if (this.tableSelection.length === 0) {
|
||||
this.$toast("请先选择附议人后在点击邀请")
|
||||
return
|
||||
}
|
||||
|
||||
/* this.visible = false
|
||||
this.$emit("refresh", null)*/
|
||||
|
||||
const loginNames = this.tableSelection.map((s) => s.loginName)
|
||||
this.$axios
|
||||
.post("/platform/suggestion/wc/mine/inviteSeconder", {
|
||||
task: JSON.stringify({
|
||||
processTaskId: this.record.processTaskId,
|
||||
processInstId: this.record.processInstId
|
||||
}),
|
||||
proposalId: this.record.id,
|
||||
seconders: JSON.stringify(loginNames)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.pageData()
|
||||
this.$toast.success(res.msg)
|
||||
this.tableSelection = []
|
||||
// this.visible = false
|
||||
this.$emit("refresh", null)
|
||||
}
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
this.$axios
|
||||
.post("/platform/suggestion/wc/mine/listSeconder", {
|
||||
...this.pageForm,
|
||||
sessionId: this.record.sessionId,
|
||||
proposalId: this.record.id
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
|
||||
isInviteClick(index, title) {
|
||||
this.pageForm.isInvite = index === "1"
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
tableRowToggle(index) {
|
||||
console.log(index)
|
||||
}
|
||||
}
|
||||
}
|
||||
+209
@@ -0,0 +1,209 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="意见附议" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
:reverse-color="false"
|
||||
:show-action="false"
|
||||
@search="doSearch"
|
||||
input-align="left"
|
||||
placeholder="请输入意见内容搜索"
|
||||
v-model="pageForm.brief"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :multiple="false" :options="sessionOptions" @change="sessionChange" v-model="pageForm.sessionId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
<van-tabs v-model="pageForm.approvalText" @change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已附议" name="1"></van-tab>
|
||||
<van-tab title="未附议" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<van-pull-refresh v-model="tableRefreshing" @refresh="doSearch" style="min-height: calc(100vh - 90px)">
|
||||
<van-list v-if="tableData && tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="" @load="pageData">
|
||||
<div v-for="row in tableData" class="list-card">
|
||||
<div class="list-card-body">
|
||||
<div class="van-multi-ellipsis--l2" style="padding: 0 16px; font-weight: bold">{{row.brief}}</div>
|
||||
<van-cell :value="row.code" title="意见编号"></van-cell>
|
||||
<van-cell :value="row.createUserName" title="撰写人"></van-cell>
|
||||
<van-cell :value="row.typeName" title="意见类别"></van-cell>
|
||||
<van-cell :value="row.sessionName" title="届次"></van-cell>
|
||||
<van-cell :value="row.delegationName" title="代表团"></van-cell>
|
||||
<van-cell :value="row.processInstanceNodeName" title="当前节点"></van-cell>
|
||||
<div class="list-card-footer">
|
||||
<van-button @click="openView(row)" size="small">查看</van-button>
|
||||
<van-button v-if="row.processInstanceTaskStatus==='ACTIVE'" @click="openApproval(row)" type="primary" size="small">
|
||||
附议
|
||||
</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty
|
||||
v-if="tableData.length===0"
|
||||
image="/assets/platform/plugins/vant-green/images/nodata/nodata.png"
|
||||
description="暂无数据"
|
||||
></van-empty>
|
||||
</van-pull-refresh>
|
||||
|
||||
<van-popup :style="{ height: '100%', width: '100%' }" position="right" safe-area-inset-bottom v-model="infoShow">
|
||||
<van-sticky>
|
||||
<van-nav-bar @click-left="infoShow=false" left-arrow left-text="返回" title="详细信息"></van-nav-bar>
|
||||
</van-sticky>
|
||||
<div style="height: calc(100vh - 44px); overflow-y: auto">
|
||||
<info ref="infoRef"></info>
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.processInstanceNodeName}}</div>
|
||||
<van-form ref="vanFormRef">
|
||||
<van-field
|
||||
label="签字"
|
||||
name="approvalSignature"
|
||||
v-model="formData.signature"
|
||||
required
|
||||
:rules="[{ required: true, message: '请签字' }]"
|
||||
class="direction-column-field"
|
||||
>
|
||||
<h5-signature v-model="formData.approvalSignature" slot="input"></h5-signature>
|
||||
</van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="danger" block @click.submit="doApproval('REJECT')">拒绝</van-button>
|
||||
<van-button type="primary" block @click.submit="doApproval('PASS')">同意</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
info: H5_SUGGESTION_WC_INFO_COMPONENT
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
sessionId: null,
|
||||
approvalText: "0",
|
||||
approval: false
|
||||
},
|
||||
tableData: [],
|
||||
tableLoading: false,
|
||||
tableFinished: false,
|
||||
tableRefreshing: false,
|
||||
|
||||
sessionOptions: [],
|
||||
infoShow: false,
|
||||
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
})
|
||||
},
|
||||
|
||||
openApproval(row) {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
this.formData = row.approvalParam
|
||||
this.showApprovalForm = true
|
||||
})
|
||||
},
|
||||
|
||||
doApproval(approvalType) {
|
||||
this.formData.bpmTaskApprovalType = approvalType
|
||||
this.$refs.vanFormRef
|
||||
.validate()
|
||||
.then(() => {
|
||||
this.$axios
|
||||
.post("/platform/suggestion/wc/seconded/approval", {
|
||||
approval: JSON.stringify(this.formData)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.infoShow = false
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
|
||||
sessionChange(val) {
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
listSession() {
|
||||
this.$axios.post("/platform/suggestion/wc/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = res.data
|
||||
.map((v) => ({
|
||||
text: v.fullName,
|
||||
value: v.id
|
||||
}))
|
||||
.concat([{ text: "全部届次", value: null }])
|
||||
if (this.sessionOptions.length > 0) {
|
||||
this.pageForm.sessionId = this.sessionOptions[0].value
|
||||
this.pageData()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
const loading = createListLoading()
|
||||
this.$axios
|
||||
.post("/platform/suggestion/wc/delegation/pageData", this.pageForm)
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length >= this.pageForm.totalCount) {
|
||||
this.tableFinished = true
|
||||
}
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
loading.close()
|
||||
this.tableLoading = false
|
||||
this.tableRefreshing = false
|
||||
})
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
this.listSession()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+273
@@ -0,0 +1,273 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="撰写意见" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
|
||||
<van-cell-group>
|
||||
<van-form @submit="doSave">
|
||||
<van-field v-model="formData.createUserName" name="createUserName" label="代表姓名" readonly></van-field>
|
||||
<van-field v-model="formData.createTime" name="createTime" label="提案时间" readonly></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.sessionName"
|
||||
name="sessionName"
|
||||
label="所属教代会"
|
||||
required
|
||||
readonly
|
||||
clickable
|
||||
@click="showSessionPicker = true"
|
||||
placeholder="请选择"
|
||||
:rules="[{ required: true, message: '请选择教代会' }]"
|
||||
></van-field>
|
||||
<van-popup v-model="showSessionPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="sessionOptions"
|
||||
value-key="fullName"
|
||||
@cancel="showSessionPicker = false"
|
||||
@confirm="sessionConfirm"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
v-model="formData.delegationName"
|
||||
name="delegationName"
|
||||
label="所属代表团"
|
||||
required
|
||||
readonly
|
||||
clickable
|
||||
@click="showDelegationPicker = true"
|
||||
placeholder="请选择"
|
||||
:rules="[{ required: true, message: '请选择代表团' }]"
|
||||
></van-field>
|
||||
<van-popup v-model="showDelegationPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="delegationOptions"
|
||||
value-key="name"
|
||||
@cancel="showDelegationPicker = false"
|
||||
@confirm="delegationConfirm"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field v-model="formData.unitName" name="unitName" label="单位" readonly></van-field>
|
||||
<van-field
|
||||
v-model="formData.mobile"
|
||||
name="mobile"
|
||||
label="联系电话"
|
||||
required
|
||||
readonly
|
||||
:rules="[{ required: true, message: '请填写联系电话' }]"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.typeName"
|
||||
name="typeName"
|
||||
label="意见类别"
|
||||
required
|
||||
readonly
|
||||
clickable
|
||||
@click="showTypePicker = true"
|
||||
placeholder="请选择"
|
||||
:rules="[{ required: true, message: '请选择意见类别' }]"
|
||||
></van-field>
|
||||
<van-popup v-model="showTypePicker" position="bottom">
|
||||
<van-picker show-toolbar :columns="typeOptions" value-key="name" @cancel="showTypePicker = false" @confirm="typeConfirm"></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="意见内容" name="brief" v-model="formData.brief" required class="direction-column-field">
|
||||
<template #input>
|
||||
<text-editor v-model="formData.brief"></text-editor>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-field label="附件" name="files" class="direction-column-field">
|
||||
<h5-file-upload
|
||||
slot="input"
|
||||
:value.sync="formData.files"
|
||||
:upload_number="5"
|
||||
upload_mode="file"
|
||||
upload_result_category="array"
|
||||
upload_result_type="url"
|
||||
complete_result
|
||||
></h5-file-upload>
|
||||
</van-field>
|
||||
|
||||
<van-cell cell-class="form-button-cell" v-if="showButton">
|
||||
<van-button type="primary" size="large" block native-type="submit">保存到我的意见</van-button>
|
||||
</van-cell>
|
||||
</van-form>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
formData: {},
|
||||
showSourcePicker: false,
|
||||
showSessionPicker: false,
|
||||
showDelegationPicker: false,
|
||||
showCommitteePicker: false,
|
||||
showTypePicker: false,
|
||||
|
||||
sourceOptions: [],
|
||||
sessionOptions: [],
|
||||
delegationOptions: [],
|
||||
typeOptions: [],
|
||||
|
||||
proposalConfig: {},
|
||||
noticeDialogVisible: false,
|
||||
|
||||
showButton: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSave(values) {
|
||||
if (!this.formData.brief) {
|
||||
this.$toast("请填写意见内容")
|
||||
return
|
||||
}
|
||||
const briefLength = removeHTMLTag(this.formData.brief)
|
||||
if (briefLength < this.suggestionConfig.briefMinLength) {
|
||||
this.$toast("意见内容最少" + this.suggestionConfig.briefMinLength + "个字")
|
||||
return
|
||||
}
|
||||
|
||||
const loading = createListLoading()
|
||||
this.$axios
|
||||
.post("/platform/suggestion/wc/write/save", { info: JSON.stringify(this.formData) })
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.$pjaxReplace("/platform/h5/suggestion/wc/mine")
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
loading.clear()
|
||||
})
|
||||
},
|
||||
|
||||
sessionConfirm(val) {
|
||||
this.showSessionPicker = false
|
||||
this.formData.sessionName = val.fullName
|
||||
this.formData.sessionId = val.id
|
||||
},
|
||||
delegationConfirm(val) {
|
||||
this.showDelegationPicker = false
|
||||
this.formData.delegationId = val.id
|
||||
this.formData.delegationName = val.name
|
||||
},
|
||||
typeConfirm(val) {
|
||||
this.showTypePicker = false
|
||||
this.formData.typeId = val.id
|
||||
this.formData.typeName = val.name
|
||||
},
|
||||
|
||||
listSuggestionType() {
|
||||
this.$axios.post("/platform/suggestion/tc/common/listProposalType").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.typeOptions = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getSuggestionConfig() {
|
||||
return this.$axios.post("/platform/suggestion/tc/common/config").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.suggestionConfig = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//教代会change
|
||||
async meetingChange(val) {
|
||||
this.$set(this.formData, "delegationId", null)
|
||||
this.formData.delegationOptions = []
|
||||
this.listDelegation()
|
||||
this.searchSelfDelegation()
|
||||
},
|
||||
|
||||
listDelegation() {
|
||||
return this.$axios.post("/platform/suggestion/wc/common/listDelegation", { sessionId: this.formData.sessionId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.delegationOptions = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查询开放的教代会届次
|
||||
listOpenSession(isModify = false) {
|
||||
return this.$axios.post("/platform/suggestion/wc/common/listOpenSession").then(async (res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = res.data
|
||||
if (!isModify && this.sessionOptions) {
|
||||
this.$set(this.formData, "sessionId", this.sessionOptions[0].id)
|
||||
this.$set(this.formData, "sessionName", this.sessionOptions[0].fullName)
|
||||
await this.listDelegation()
|
||||
await this.searchSelfDelegation()
|
||||
}
|
||||
|
||||
if (isModify) {
|
||||
const session = this.sessionOptions.find((v) => v.id === this.formData.sessionId)
|
||||
this.$set(this.formData, "sessionName", session?.fullName)
|
||||
await this.listDelegation()
|
||||
const delegation = this.delegationOptions.find((v) => v.id === this.formData.delegationId)
|
||||
this.$set(this.formData, "delegationName", delegation?.name)
|
||||
|
||||
if (this.formData.typeId) {
|
||||
this.typeConfirm(this.typeOptions.find((v) => v.id === this.formData.typeId))
|
||||
}
|
||||
}
|
||||
|
||||
// await this.listDelegation()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//查询自己有权限的代表团
|
||||
searchSelfDelegation() {
|
||||
return this.$axios.post("/platform/suggestion/wc/write/selfDelegation", { sessionId: this.formData.sessionId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$set(this.formData, "delegationId", res.data)
|
||||
this.$set(this.formData, "delegationName", this.delegationOptions.find((item) => item.id === res.data)?.name)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
init() {
|
||||
const id = GetQueryString("id")
|
||||
if (id) {
|
||||
this.$axios.post("/platform/suggestion/wc/write/detail", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
this.listOpenSession(true)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.noticeDialogVisible = true
|
||||
this.listOpenSession(false)
|
||||
this.$set(this.formData, "createUserId", this.$store.state.user.id)
|
||||
this.$set(this.formData, "createUserName", this.$store.state.user.username)
|
||||
this.$set(this.formData, "createUserLoginName", this.$store.state.user.loginname)
|
||||
this.$set(this.formData, "createTime", this.$moment().format("YYYY-MM-DD"))
|
||||
this.$set(this.formData, "mobile", this.$store.state.user.mobile)
|
||||
this.$set(this.formData, "unitName", this.$store.state.user.unit?.name)
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
this.listSuggestionType()
|
||||
this.getSuggestionConfig()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user