change
This commit is contained in:
@@ -0,0 +1,511 @@
|
||||
.proposal-view-page {
|
||||
--proposal-view-primary: #1677ee;
|
||||
--proposal-view-text: #354255;
|
||||
--proposal-view-muted: #8a97a8;
|
||||
min-height: 100%;
|
||||
padding-bottom: calc(20px + env(safe-area-inset-bottom));
|
||||
box-sizing: border-box;
|
||||
color: var(--proposal-view-text);
|
||||
background: #f3f7fc;
|
||||
}
|
||||
|
||||
/* 提案 H5 列表统一使用全屏 Popup 承载详情和办理表单。 */
|
||||
.proposal-full-popup {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: #f3f7fc;
|
||||
}
|
||||
|
||||
.proposal-full-popup__page {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
padding-top: 46px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.proposal-full-popup__page > .van-nav-bar {
|
||||
z-index: 20;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.proposal-full-popup__scroll {
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.proposal-full-popup__scroll .proposal-view-main {
|
||||
padding-top: 18px;
|
||||
}
|
||||
|
||||
.proposal-popup-form-actions {
|
||||
display: flex;
|
||||
padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
|
||||
justify-content: space-between;
|
||||
column-gap: 10px;
|
||||
}
|
||||
|
||||
/* 提案页面按需启用的圆角按钮与分页样式,不影响未声明对应 class 的组件。 */
|
||||
.proposal-soft-button,
|
||||
.proposal-soft-pagination {
|
||||
--proposal-soft-primary: #1989fa;
|
||||
}
|
||||
|
||||
/* 提案审核弹框的次要操作按钮统一使用柔和圆角,不包含阴影或漫反射效果。 */
|
||||
.proposal-rounded-button {
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
||||
.proposal-soft-pagination {
|
||||
column-gap: 2px;
|
||||
}
|
||||
|
||||
.proposal-soft-button {
|
||||
border-color: var(--proposal-soft-primary);
|
||||
border-radius: 14px;
|
||||
background-color: var(--proposal-soft-primary);
|
||||
}
|
||||
|
||||
/* 保持危险操作原有红色语义。 */
|
||||
.proposal-soft-button--danger {
|
||||
border-color: #ff4d4f;
|
||||
background-color: #ff4d4f;
|
||||
}
|
||||
|
||||
/* 保持退回类操作原有橙色语义。 */
|
||||
.proposal-soft-button--warning {
|
||||
border-color: #ff976a;
|
||||
background-color: #ff976a;
|
||||
}
|
||||
|
||||
.proposal-soft-pagination .van-pagination__item {
|
||||
color: var(--proposal-soft-primary);
|
||||
background-color: #f8fbff;
|
||||
border-radius: 12px;
|
||||
transition: color 0.2s ease, background-color 0.2s ease;
|
||||
}
|
||||
|
||||
.proposal-soft-pagination .van-pagination__item::after {
|
||||
border-color: rgba(25, 137, 250, 0.16);
|
||||
border-radius: inherit;
|
||||
}
|
||||
|
||||
.proposal-soft-pagination .van-pagination__item--active,
|
||||
.proposal-soft-pagination .van-pagination__item:not(.van-pagination__item--disabled):active {
|
||||
color: #fff;
|
||||
background-color: var(--proposal-soft-primary);
|
||||
}
|
||||
|
||||
.proposal-soft-pagination .van-pagination__item--disabled,
|
||||
.proposal-soft-pagination .van-pagination__item--disabled:active {
|
||||
color: #646566;
|
||||
background-color: #f7f8fa;
|
||||
}
|
||||
|
||||
.proposal-action-icon {
|
||||
margin-right: 6px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.reply-unit-popup {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.reply-unit-toolbar {
|
||||
display: grid;
|
||||
min-height: 48px;
|
||||
border-bottom: 1px solid #eee;
|
||||
grid-template-columns: 64px 1fr 64px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.reply-unit-toolbar button {
|
||||
height: 48px;
|
||||
padding: 0;
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.reply-unit-toolbar button:last-child {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
.reply-unit-toolbar-title {
|
||||
color: #222;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.reply-unit-list {
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.reply-unit-empty {
|
||||
padding: 48px 16px;
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.transfer-dialog {
|
||||
padding: 18px 16px 76px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.proposal-info-card {
|
||||
margin-bottom: 16px;
|
||||
padding: 16px;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.proposal-info-card .info-item {
|
||||
display: flex;
|
||||
margin-bottom: 10px;
|
||||
flex-direction: column;
|
||||
row-gap: 4px;
|
||||
}
|
||||
|
||||
.proposal-info-card .info-item label {
|
||||
color: #969799;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.proposal-full-popup__page > .button-group {
|
||||
display: flex;
|
||||
padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
|
||||
background: #fff;
|
||||
column-gap: 10px;
|
||||
}
|
||||
|
||||
.proposal-view-main {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
padding: 12px 15px 0;
|
||||
}
|
||||
|
||||
.proposal-view-card {
|
||||
margin-bottom: 11px;
|
||||
overflow: hidden;
|
||||
border: 1px solid #e9eff7;
|
||||
border-radius: 10px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 3px 11px rgba(51, 87, 126, 0.08);
|
||||
}
|
||||
|
||||
.proposal-view-card__title {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding: 12px 14px 8px 21px;
|
||||
color: #354255;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.proposal-view-card__title::before {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
bottom: 11px;
|
||||
left: 12px;
|
||||
width: 2px;
|
||||
border-radius: 2px;
|
||||
background: var(--proposal-view-primary);
|
||||
content: "";
|
||||
}
|
||||
|
||||
/* 审核、附议、反馈及答复输入框统一复用提案查询 Card 的视觉规范。 */
|
||||
.proposal-audit-card__required {
|
||||
margin-left: 4px;
|
||||
color: #ee0a24;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.proposal-view-card .van-field.proposal-audit-field {
|
||||
width: calc(100% - 28px);
|
||||
margin: 0 14px 14px;
|
||||
padding: 12px;
|
||||
border: 1px solid #c9d5e5;
|
||||
border-radius: 10px;
|
||||
background-color: #f7f9fd;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.proposal-view-card .van-field.proposal-audit-field .van-field__control {
|
||||
min-height: 150px;
|
||||
color: #253247;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.proposal-view-card .van-field.proposal-audit-field .van-field__control::placeholder {
|
||||
color: #9aa7b8;
|
||||
}
|
||||
|
||||
.proposal-view-card .van-field.proposal-audit-field .van-field__word-limit {
|
||||
color: #718096;
|
||||
}
|
||||
|
||||
.proposal-view-card .van-field.proposal-audit-field::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.proposal-view-card .van-cell-group {
|
||||
margin: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.proposal-view-card .van-cell {
|
||||
min-height: 44px;
|
||||
padding: 10px 14px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.proposal-view-card .van-cell:not(:last-child)::after {
|
||||
right: 14px;
|
||||
left: 14px;
|
||||
border-color: #eef2f7;
|
||||
}
|
||||
|
||||
.proposal-view-card .van-cell__title {
|
||||
flex: 0 0 92px;
|
||||
width: 92px;
|
||||
color: #596779;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.proposal-view-card .van-cell__value {
|
||||
min-width: 0;
|
||||
color: #4f5d70;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
text-align: left;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.proposal-view-card .proposal-view-long-cell {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.proposal-view-card .proposal-view-long-cell .van-cell__title {
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.proposal-view-card .proposal-view-long-cell .van-cell__value {
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
.proposal-view-rich-value,
|
||||
.proposal-view-rich-value * {
|
||||
max-width: 100%;
|
||||
white-space: normal;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.proposal-view-rich-value img,
|
||||
.proposal-view-rich-value image {
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.proposal-view-card .van-tag {
|
||||
font-size: 14px;
|
||||
line-height: 18px;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.proposal-view-merge-cell .van-cell__title {
|
||||
flex: 1;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.proposal-view-merge-cell .van-cell__label {
|
||||
margin-top: 4px;
|
||||
color: var(--proposal-view-muted);
|
||||
font-size: 13px;
|
||||
line-height: 20px;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.proposal-flow-card__header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.proposal-flow-card__hint {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding-right: 14px;
|
||||
color: var(--proposal-view-muted);
|
||||
font-size: 13px;
|
||||
line-height: 22px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.proposal-flow-card__hint .van-icon {
|
||||
margin-left: 4px;
|
||||
color: #7f8da0;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.proposal-flow-scroll {
|
||||
width: 100%;
|
||||
padding: 4px 14px 15px;
|
||||
overflow-x: auto;
|
||||
box-sizing: border-box;
|
||||
scroll-behavior: smooth;
|
||||
scroll-snap-type: x proximity;
|
||||
scrollbar-width: none;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.proposal-flow-scroll::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.proposal-flow-track {
|
||||
position: relative;
|
||||
display: flex;
|
||||
width: max-content;
|
||||
min-width: 100%;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.proposal-flow-track::before {
|
||||
position: absolute;
|
||||
top: 24px;
|
||||
right: 52px;
|
||||
left: 52px;
|
||||
height: 2px;
|
||||
background: #d8e9ff;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.proposal-flow-node {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
flex: 0 0 108px;
|
||||
width: 108px;
|
||||
padding: 0 6px;
|
||||
border: 0;
|
||||
outline: none;
|
||||
box-sizing: border-box;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
color: var(--proposal-view-text);
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
scroll-snap-align: center;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
.proposal-flow-node__icon {
|
||||
display: flex;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
border: 3px solid #ffffff;
|
||||
border-radius: 50%;
|
||||
box-sizing: border-box;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #ffffff;
|
||||
background: var(--proposal-view-primary);
|
||||
box-shadow: 0 2px 7px rgba(22, 119, 238, 0.22);
|
||||
transition: box-shadow 0.2s ease, transform 0.2s ease;
|
||||
}
|
||||
|
||||
.proposal-flow-node__icon .van-icon {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.proposal-flow-node__title {
|
||||
display: -webkit-box;
|
||||
min-height: 40px;
|
||||
margin-top: 8px;
|
||||
overflow: hidden;
|
||||
color: #354255;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
word-break: break-word;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
|
||||
.proposal-flow-node__handler {
|
||||
display: block;
|
||||
width: 100%;
|
||||
margin-top: 1px;
|
||||
overflow: hidden;
|
||||
color: var(--proposal-view-muted);
|
||||
font-size: 13px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.proposal-flow-node.is-active .proposal-flow-node__icon {
|
||||
box-shadow: 0 0 0 5px #e7f2ff, 0 3px 9px rgba(22, 119, 238, 0.28);
|
||||
transform: scale(1.06);
|
||||
}
|
||||
|
||||
.proposal-flow-node.is-active .proposal-flow-node__title {
|
||||
color: var(--proposal-view-primary);
|
||||
}
|
||||
|
||||
.proposal-flow-detail__name {
|
||||
margin: 0;
|
||||
padding: 4px 14px 10px;
|
||||
border-bottom: 1px solid #eef2f7;
|
||||
color: #26364a;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.proposal-flow-detail__tip {
|
||||
padding: 9px 14px 12px;
|
||||
border-top: 1px solid #eef2f7;
|
||||
color: var(--proposal-view-muted);
|
||||
font-size: 13px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.proposal-view-table-wrap {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.proposal-view-table-wrap .el-table {
|
||||
min-width: 560px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.proposal-view-slot:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (min-width: 600px) {
|
||||
.proposal-view-main {
|
||||
max-width: 520px;
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
@@ -1,247 +1,358 @@
|
||||
const PROPOSAL_INFO = {
|
||||
name: "ProposalInfo",
|
||||
template: /*language=HTML*/ `
|
||||
<van-action-sheet v-model="visible" title="查看详情">
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="基本信息">
|
||||
<van-cell title="提案名称">
|
||||
<div style="font-weight:bold;">
|
||||
{{ viewData.name }}
|
||||
<div class="proposal-info-content proposal-view-page">
|
||||
<main class="proposal-view-main">
|
||||
<!-- 编号和名称优先展示,便于手机端进入详情后快速确认当前提案。 -->
|
||||
<section class="proposal-view-card">
|
||||
<h2 class="proposal-view-card__title">提案内容</h2>
|
||||
<van-cell-group :border="false">
|
||||
<van-cell title="提案编号">{{ viewData.code || '--' }}</van-cell>
|
||||
<van-cell title="提案名称">{{ viewData.name || '--' }}</van-cell>
|
||||
<van-cell title="立案编号">{{ viewData.caseFilingCode || '暂无' }}</van-cell>
|
||||
<van-cell title="立案结果" v-if="viewData.caseFilingResult">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="viewData.caseFilingResult"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="立案类型" v-if="viewData.caseFilingType">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_TYPE"
|
||||
:value="viewData.caseFilingType"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="提案类型">{{ viewData.typeName || '--' }}</van-cell>
|
||||
<van-cell title="提案方式">{{ getDictText(dict.type.PROPOSAL_SOURCE, viewData.source) }}</van-cell>
|
||||
<van-cell title="代表姓名">{{ viewData.createUserName || '--' }}</van-cell>
|
||||
<van-cell title="所属教代会">{{ viewData.sessionName || viewData.fullName || '--' }}</van-cell>
|
||||
<van-cell :title="viewData.committeeName ? '所属委员会' : '所属代表团'">
|
||||
{{ viewData.committeeName || viewData.delegationName || '--' }}
|
||||
</van-cell>
|
||||
<van-cell title="单位">{{ viewData.unitName || '--' }}</van-cell>
|
||||
<van-cell title="联系电话">{{ viewData.mobile || '--' }}</van-cell>
|
||||
<van-cell title="提案时间">{{ viewData.createTime || '--' }}</van-cell>
|
||||
<van-cell title="提案案由" class="proposal-view-long-cell">
|
||||
<div class="proposal-view-rich-value" v-html="viewData.brief || '--'"></div>
|
||||
</van-cell>
|
||||
<van-cell title="建议措施" class="proposal-view-long-cell">
|
||||
<div class="proposal-view-rich-value" v-html="viewData.measures || '--'"></div>
|
||||
</van-cell>
|
||||
<van-cell title="附件" class="proposal-view-long-cell">
|
||||
<file-preview :files="viewData.files" complete_result></file-preview>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</section>
|
||||
|
||||
<!-- 并案信息仍支持点击切换当前公共详情组件的数据。 -->
|
||||
<section class="proposal-view-card" v-if="viewData.merges && viewData.merges.length">
|
||||
<h2 class="proposal-view-card__title">并案信息</h2>
|
||||
<van-cell-group :border="false">
|
||||
<van-cell v-for="(merge, index) in viewData.merges"
|
||||
:key="merge.id"
|
||||
class="proposal-view-merge-cell"
|
||||
:title="(index + 1) + '. ' + merge.name"
|
||||
:label="'提案编号:' + merge.code + '|提案人:' + merge.createUserName + '|类别:' + merge.typeName + '|代表团:' + merge.delegationName"
|
||||
is-link
|
||||
@click="openView(merge)">
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</section>
|
||||
|
||||
<!-- 每位委员会成员意见独立成卡片,便于手机端逐块阅读。 -->
|
||||
<section class="proposal-view-card"
|
||||
v-for="(opinion, index) in viewData.commissionerOpinions || []"
|
||||
:key="'commissioner-' + index">
|
||||
<h2 class="proposal-view-card__title">委员会成员意见 {{ index + 1 }}</h2>
|
||||
<van-cell-group :border="false">
|
||||
<van-cell title="委员">
|
||||
{{ opinion.commissionerName || '--' }}<template v-if="opinion.commissionerLoginName">({{ opinion.commissionerLoginName }})</template>
|
||||
</van-cell>
|
||||
<van-cell title="立案结果">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="opinion.caseFilingResult"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="立案类型" v-if="opinion.caseFilingType">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_TYPE"
|
||||
:value="opinion.caseFilingType"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="意见" v-if="opinion.opinionText" class="proposal-view-long-cell">
|
||||
<div class="proposal-view-rich-value">{{ opinion.opinionText }}</div>
|
||||
</van-cell>
|
||||
<van-cell title="时间" v-if="opinion.opinionTime">{{ opinion.opinionTime }}</van-cell>
|
||||
</van-cell-group>
|
||||
</section>
|
||||
|
||||
<!-- 已办 WF 任务压缩为横向时间轴,节点仅展示名称和办理人。 -->
|
||||
<section class="proposal-view-card proposal-flow-card" v-if="doneTasks && doneTasks.length">
|
||||
<div class="proposal-flow-card__header">
|
||||
<h2 class="proposal-view-card__title">审批流程</h2>
|
||||
<span class="proposal-flow-card__hint">
|
||||
左右滑动查看
|
||||
<van-icon name="exchange"></van-icon>
|
||||
</span>
|
||||
</div>
|
||||
<div class="proposal-flow-scroll" ref="workflowScroll">
|
||||
<div class="proposal-flow-track">
|
||||
<button type="button"
|
||||
ref="workflowNode"
|
||||
class="proposal-flow-node"
|
||||
:class="{'is-active': selectedTask && selectedTask.id === task.id}"
|
||||
v-for="(task, index) in doneTasks"
|
||||
:key="task.id"
|
||||
@click="selectTask(task)">
|
||||
<span class="proposal-flow-node__icon">
|
||||
<van-icon :name="getTaskNodeIcon(task, index)"></van-icon>
|
||||
</span>
|
||||
<span class="proposal-flow-node__title">{{ task.displayName || '--' }}</span>
|
||||
<span class="proposal-flow-node__handler">{{ getTaskHandlerName(task) }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell title="提案编号">{{ viewData.code }}</van-cell>
|
||||
<van-cell title="立案编号">{{ viewData.caseFilingCode || '暂无' }}</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="建议承办单位">
|
||||
{{viewData.suggestUnits}}
|
||||
</van-cell>-->
|
||||
<van-cell title="立案结果">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="viewData.caseFilingResult"></dict-tag>
|
||||
</van-cell>
|
||||
<!--<van-cell title="调研情况" class="direction-column-cell">
|
||||
<div v-html="viewData.researchFindings"></div>
|
||||
</van-cell>-->
|
||||
<van-cell title="提案案由" class="direction-column-cell">
|
||||
<div v-html="viewData.brief"></div>
|
||||
</van-cell>
|
||||
<van-cell title="建议措施" class="direction-column-cell">
|
||||
<div v-html="viewData.measures"></div>
|
||||
</van-cell>
|
||||
<van-cell title="附件" class="direction-column-cell">
|
||||
<file-preview :files="viewData.files" complete_result></file-preview>
|
||||
</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>
|
||||
|
||||
<!--并案信息-->
|
||||
<van-cell-group title="并案信息" v-if="viewData.merges && viewData.merges.length">
|
||||
<van-cell v-for="(merge, index) in viewData.merges" :key="merge.id"
|
||||
:title="(index + 1) + '. ' + merge.name"
|
||||
:label="'提案编号:' + merge.code + ' | 提案人:' + merge.createUserName + ' | 类别:' + merge.typeName + ' | 代表团:' + merge.delegationName"
|
||||
is-link
|
||||
@click="openView(merge)">
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<!--委员会成员意见-->
|
||||
<template v-if="viewData.commissionerOpinions && viewData.commissionerOpinions.length">
|
||||
<div class="process-title" style="margin-bottom: 0!important;">
|
||||
委员会成员意见
|
||||
</div>
|
||||
<div v-for="(opinion, index) in viewData.commissionerOpinions" :key="index"
|
||||
style="margin-bottom: 16px;">
|
||||
<van-cell :title="opinion.commissionerName + '(' + opinion.commissionerLoginName + ')'"
|
||||
class="direction-column-cell">
|
||||
</van-cell>
|
||||
<van-cell title="立案结果">
|
||||
<div style="display: flex;justify-content: end;">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="opinion.caseFilingResult"></dict-tag>
|
||||
<template v-if="opinion.caseFilingType">
|
||||
(
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_TYPE"
|
||||
:value="opinion.caseFilingType"></dict-tag>
|
||||
)
|
||||
</template>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell title="意见" v-if="opinion.opinionText">
|
||||
<div>{{ opinion.opinionText }}</div>
|
||||
</van-cell>
|
||||
<van-cell title="时间" v-if="opinion.opinionTime">
|
||||
{{ opinion.opinionTime }}
|
||||
</van-cell>
|
||||
</div>
|
||||
</template>
|
||||
</section>
|
||||
|
||||
<!-- 点击时间轴节点后,只在此处展示该任务原有的完整详情。 -->
|
||||
<section class="proposal-view-card proposal-flow-detail" v-if="selectedTask">
|
||||
<h2 class="proposal-view-card__title">节点详情</h2>
|
||||
<h3 class="proposal-flow-detail__name">{{ selectedTask.displayName || '--' }}</h3>
|
||||
<van-cell-group :border="false">
|
||||
<template v-if="selectedTask.ext && selectedTask.ext.isFirstTaskNode">
|
||||
<van-cell title="申请用户">
|
||||
{{ selectedTask.ext.initiatorName || '--' }}({{ selectedTask.ext.initiatorAccount || '--' }})
|
||||
</van-cell>
|
||||
<van-cell title="申请时间">{{ selectedTask.finishTime || '--' }}</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="selectedTask.ext.submitType"></dict-tag>
|
||||
</van-cell>
|
||||
</template>
|
||||
|
||||
<template v-for="task in doneTasks">
|
||||
<van-cell-group :title="task.displayName" v-if="task.ext.isFirstTaskNode">
|
||||
<van-cell title="申请用户">{{ task.ext.initiatorName }}({{task.ext.initiatorAccount}})
|
||||
</van-cell>
|
||||
<van-cell title="申请时间">{{ task.finishTime }}</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<template v-else-if="selectedTask.taskName === 'invite'">
|
||||
<van-cell title="办理用户">
|
||||
{{ selectedTask.taskFormData.userName || '--' }}({{ selectedTask.taskFormData.loginName || '--' }})
|
||||
</van-cell>
|
||||
<van-cell title="办理时间">{{ selectedTask.finishTime || '--' }}</van-cell>
|
||||
<van-cell title="附议人" class="proposal-view-long-cell">
|
||||
<div class="proposal-view-table-wrap">
|
||||
<el-table :data="selectedTask?.taskFormData?.seconder">
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="单位" prop="unitName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="分工会" prop="unionName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="代表团" prop="delegationName" show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</van-cell>
|
||||
</template>
|
||||
|
||||
<!--邀请附议人-->
|
||||
<van-cell-group :title="task.displayName"
|
||||
v-else-if="task.taskName === 'invite'">
|
||||
<van-cell title="办理用户">{{ task.taskFormData.userName }}({{task.taskFormData.loginName}})
|
||||
</van-cell>
|
||||
<van-cell title="办理时间">{{ task.finishTime }}</van-cell>
|
||||
<van-cell title="附议人" v-if="task.taskName === 'invite'"
|
||||
class="direction-column-cell">
|
||||
<el-table :data="task?.taskFormData?.seconder">
|
||||
<el-table-column label="姓名" prop="userName"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginName"></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="单位" prop="unitName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="分工会" prop="unionName"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="代表团" prop="delegationName"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<!--提案委员会立案-->
|
||||
<van-cell-group :title="task.displayName"
|
||||
v-else-if="task.taskName === 'committee'||task.taskName === 'committeeFilingUnit'">
|
||||
<van-cell title="办理用户">{{ task.taskFormData.userName }}({{task.taskFormData.loginName}})
|
||||
</van-cell>
|
||||
<van-cell title="办理时间">{{ task.finishTime }}</van-cell>
|
||||
<van-cell title="立案结果">
|
||||
<div style="display: flex;justify-content: center">
|
||||
<template v-else-if="selectedTask.taskName === 'committee' || selectedTask.taskName === 'committeeFilingUnit'">
|
||||
<van-cell title="办理用户">
|
||||
{{ selectedTask.taskFormData.userName || '--' }}({{ selectedTask.taskFormData.loginName || '--' }})
|
||||
</van-cell>
|
||||
<van-cell title="办理时间">{{ selectedTask.finishTime || '--' }}</van-cell>
|
||||
<van-cell title="立案结果">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="task.ext.tf_caseFilingResult"></dict-tag>
|
||||
|
||||
<template v-if="task.ext.tf_caseFilingType">
|
||||
(
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_TYPE"
|
||||
:value="task.ext.tf_caseFilingType"></dict-tag>
|
||||
)
|
||||
:value="selectedTask.ext.tf_caseFilingResult"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="立案类型" v-if="selectedTask.ext.tf_caseFilingType">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_TYPE"
|
||||
:value="selectedTask.ext.tf_caseFilingType"></dict-tag>
|
||||
</van-cell>
|
||||
<template v-if="['CONFIRM_FILING', 'SUGGESTION'].includes(selectedTask.ext.tf_caseFilingResult)">
|
||||
<van-cell v-if="selectedTask.ext.tf_caseFilingResult === 'SUGGESTION'" title="承办单位">
|
||||
{{ selectedTask?.ext?.tf_masterUnitNameStr || selectedTask?.ext?.tf_slaveUnitNameStr || '--' }}
|
||||
</van-cell>
|
||||
<template v-else>
|
||||
<van-cell title="主办单位">{{ selectedTask?.ext?.tf_masterUnitNameStr || '--' }}</van-cell>
|
||||
<van-cell title="协办单位">{{ selectedTask?.ext?.tf_slaveUnitNameStr || '--' }}</van-cell>
|
||||
</template>
|
||||
</div>
|
||||
</van-cell>
|
||||
<template v-if="['CONFIRM_FILING','SUGGESTION'].includes(task.ext.tf_caseFilingResult)">
|
||||
<van-cell v-if="task.ext.tf_caseFilingResult === 'SUGGESTION'" title="承办单位">{{ task?.ext?.tf_masterUnitNameStr || task?.ext?.tf_slaveUnitNameStr }}</van-cell>
|
||||
<template v-else>
|
||||
<van-cell title="主办单位">{{ task?.ext?.tf_masterUnitNameStr }}</van-cell>
|
||||
<van-cell title="协办单位">{{ task?.ext?.tf_slaveUnitNameStr }}</van-cell>
|
||||
</template>
|
||||
<van-cell title="办理意见"
|
||||
v-if="selectedTask.taskFormData.tf_opinion"
|
||||
class="proposal-view-long-cell">
|
||||
<div class="proposal-view-rich-value" v-html="selectedTask.taskFormData.tf_opinion"></div>
|
||||
</van-cell>
|
||||
</template>
|
||||
|
||||
<template v-else>
|
||||
<van-cell title="办理单位"
|
||||
v-if="['opinion_unit_reply', 'unit_reply', 'two_unit_reply', 'master_reply', 'slave_reply'].includes(selectedTask.taskName)">
|
||||
{{ selectedTask.ext.underTakeName || '--' }}
|
||||
</van-cell>
|
||||
<van-cell title="办理用户">
|
||||
{{ selectedTask.taskFormData.userName || '--' }}({{ selectedTask.taskFormData.loginName || '--' }})
|
||||
</van-cell>
|
||||
<van-cell title="办理时间">{{ selectedTask.finishTime || '--' }}</van-cell>
|
||||
<van-cell title="办理评价" v-if="selectedTask.taskName === 'feedback'">
|
||||
<dict-tag :options="dict.type.PROPOSAL_FEEDBACK"
|
||||
:value="selectedTask.ext.tf_feedback"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="办理结果" v-else>
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="selectedTask.ext.submitType"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="办理意见"
|
||||
v-if="selectedTask.taskFormData && selectedTask.taskFormData.tf_opinion"
|
||||
class="proposal-view-long-cell">
|
||||
<div class="proposal-view-rich-value" v-html="selectedTask.taskFormData.tf_opinion"></div>
|
||||
</van-cell>
|
||||
</template>
|
||||
<van-cell title="办理意见" v-if="task.taskFormData.tf_opinion" class="direction-column-cell">
|
||||
<div v-html="task.taskFormData.tf_opinion"></div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<div class="proposal-flow-detail__tip">点击其他节点查看详情</div>
|
||||
</section>
|
||||
|
||||
<van-cell-group :title="task.displayName" v-else>
|
||||
<van-cell title="办理单位" v-if="['opinion_unit_reply','unit_reply','two_unit_reply','master_reply','slave_reply'].includes(task.taskName)">
|
||||
{{task.ext.underTakeName}}
|
||||
</van-cell>
|
||||
|
||||
<van-cell title="办理用户">{{ task.taskFormData.userName }}({{task.taskFormData.loginName}})
|
||||
</van-cell>
|
||||
<van-cell title="办理时间">{{ task.finishTime }}</van-cell>
|
||||
|
||||
<van-cell title="办理评价" v-if="['feedback'].includes(task.taskName)">
|
||||
<dict-tag :options="dict.type.PROPOSAL_FEEDBACK"
|
||||
:value="task.ext.tf_feedback"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="办理结果" v-else>
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode" class="direction-column-cell">
|
||||
<div v-html="task.taskFormData.tf_opinion"></div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<slot></slot>
|
||||
</van-action-sheet>
|
||||
<!-- 审批、答复等业务页面继续通过原插槽追加表单。 -->
|
||||
<div class="proposal-view-slot">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
`,
|
||||
dicts: ["PROPOSAL_TYPE", "PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE", "PROCESS_TASK_SUBMIT_TYPE", "PROPOSAL_FEEDBACK"],
|
||||
props: {
|
||||
// bizId 为提案主键;组件根据该参数加载提案详情和对应的已办流程记录。
|
||||
bizId: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
// visible 表示承载详情的 Popup 是否打开;每次重新打开时都需要查询最新详情和流程记录。
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
dicts: ["PROPOSAL_TYPE", "PROPOSAL_SOURCE", "PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE", "PROCESS_TASK_SUBMIT_TYPE", "PROPOSAL_FEEDBACK"],
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
viewData: {},
|
||||
doneTasks: [],
|
||||
row: null,
|
||||
originalRow: null, // 用于保存原始数据,支持返回功能
|
||||
selectedTask: null,
|
||||
currentBizId: "",
|
||||
reloadPending: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
bizId: {
|
||||
immediate: true,
|
||||
handler(value) {
|
||||
if (!value) return
|
||||
this.$set(this, "currentBizId", value)
|
||||
if (this.visible) this.queueReload()
|
||||
}
|
||||
},
|
||||
visible(value) {
|
||||
if (!value || !this.bizId) return
|
||||
this.$set(this, "currentBizId", this.bizId)
|
||||
this.queueReload()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打开
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.getInfo()
|
||||
this.getDoneTasks()
|
||||
/**
|
||||
* 合并同一轮 bizId 与 Popup 显示状态变化触发的刷新。
|
||||
* 无参数;组件可见且存在提案主键时调用详情和已办流程接口,无返回值。
|
||||
*/
|
||||
queueReload() {
|
||||
if (this.reloadPending) return
|
||||
this.$set(this, "reloadPending", true)
|
||||
this.$nextTick(() => {
|
||||
this.$set(this, "reloadPending", false)
|
||||
if (!this.visible || !this.currentBizId) return
|
||||
this.getInfo()
|
||||
this.getDoneTasks()
|
||||
})
|
||||
},
|
||||
|
||||
// 关闭
|
||||
onClose(){
|
||||
this.visible = false
|
||||
/**
|
||||
* 获取字典字段的展示文本。
|
||||
* options 为 PROPOSAL_SOURCE 等字典数组,value 为业务保存的字典 code;返回名称字符串,无匹配项时返回原值或 --。
|
||||
*/
|
||||
getDictText(options, value) {
|
||||
const option = (options || []).find((item) => String(item.code) === String(value))
|
||||
return option ? (option.name || option.label || value) : (value || "--")
|
||||
},
|
||||
|
||||
// 获取申请信息
|
||||
/**
|
||||
* 获取横向流程节点的办理人名称。
|
||||
* task 为 doneTasks 接口返回的任务对象;发起节点读取 initiatorName,其他节点读取 taskFormData.userName,返回字符串。
|
||||
*/
|
||||
getTaskHandlerName(task) {
|
||||
if (!task) return "--"
|
||||
if (task.ext && task.ext.isFirstTaskNode) {
|
||||
return task.ext.initiatorName || "--"
|
||||
}
|
||||
return task.taskFormData && task.taskFormData.userName
|
||||
? task.taskFormData.userName
|
||||
: "--"
|
||||
},
|
||||
|
||||
/**
|
||||
* 根据任务类型返回 Vant 图标名称,只用于区分发起、邀请附议和普通已办节点。
|
||||
*/
|
||||
getTaskNodeIcon(task) {
|
||||
if (task && task.ext && task.ext.isFirstTaskNode) return "manager-o"
|
||||
if (task && task.taskName === "invite") return "friends-o"
|
||||
return "passed"
|
||||
},
|
||||
|
||||
/**
|
||||
* 选中流程节点并展示详情。
|
||||
* task 为 doneTasks 中的任务对象;该方法无返回值,并把对应节点滚动到横向区域中部。
|
||||
*/
|
||||
selectTask(task) {
|
||||
if (!task) return
|
||||
this.$set(this, "selectedTask", task)
|
||||
this.scrollTaskIntoView(task.id)
|
||||
},
|
||||
|
||||
/**
|
||||
* 将指定任务节点滚动至时间轴可视区域中部。
|
||||
* taskId 为流程任务主键;节点或滚动容器不存在时直接结束,无返回值。
|
||||
*/
|
||||
scrollTaskIntoView(taskId) {
|
||||
this.$nextTick(() => {
|
||||
const nodes = this.$refs.workflowNode
|
||||
const nodeList = Array.isArray(nodes) ? nodes : [nodes]
|
||||
const taskIndex = this.doneTasks.findIndex((item) => String(item.id) === String(taskId))
|
||||
const node = nodeList[taskIndex]
|
||||
const scrollContainer = this.$refs.workflowScroll
|
||||
if (!node || !scrollContainer) return
|
||||
const targetLeft = node.offsetLeft - (scrollContainer.clientWidth - node.offsetWidth) / 2
|
||||
scrollContainer.scrollLeft = Math.max(0, targetLeft)
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 使用 currentBizId 查询提案详情。
|
||||
* 接口参数 id 为提案主键;成功响应的 data 为详情对象并写入 viewData。
|
||||
*/
|
||||
getInfo() {
|
||||
this.$axios.post("/platform/proposal/common/proposalInfo", {id: this.row.id}).then((res) => {
|
||||
this.$axios.post("/platform/proposal/common/proposalInfo", {id: this.currentBizId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
this.$set(this, "viewData", res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查看提案
|
||||
openView(row) {
|
||||
// 如果传入的是并案对象,则打开新的详情页面
|
||||
if (row && typeof row === 'object' && row.id) {
|
||||
// 创建一个新的提案详情组件实例来显示并案详情
|
||||
this.$nextTick(() => {
|
||||
// 可以通过事件总线或者其他方式来打开新的详情页面
|
||||
// 这里暂时使用简单的方式,直接在当前组件中显示
|
||||
const currentRow = this.row;
|
||||
this.row = row;
|
||||
this.getInfo();
|
||||
// 保存原来的数据,以便返回时恢复
|
||||
this.originalRow = currentRow;
|
||||
})
|
||||
} else {
|
||||
// 原有的逻辑,通过ID查看
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.infoDialogRef) {
|
||||
this.$refs.infoDialogRef.onOpen(row)
|
||||
}
|
||||
})
|
||||
this.$set(this, "currentBizId", row.id)
|
||||
this.queueReload()
|
||||
}
|
||||
},
|
||||
|
||||
// 获取已办任务审批记录
|
||||
/**
|
||||
* 使用 currentBizId 查询已办流程记录。
|
||||
* 接口参数 bizId 为提案主键;成功响应的 data 为流程任务数组并写入 doneTasks。
|
||||
*/
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
this.$set(this, "doneTasks", [])
|
||||
this.$set(this, "selectedTask", null)
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.currentBizId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
const taskList = res.data || []
|
||||
const latestTask = taskList.length ? taskList[taskList.length - 1] : null
|
||||
this.$set(this, "doneTasks", taskList)
|
||||
this.$set(this, "selectedTask", latestTask)
|
||||
if (latestTask) {
|
||||
this.scrollTaskIntoView(latestTask.id)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
const PROPOSAL_TASK_POPUP = {
|
||||
template: /*language=HTML*/ `
|
||||
<van-popup v-model="visible" position="right" class="proposal-full-popup" :close-on-click-overlay="false" get-container="#app">
|
||||
<div class="proposal-full-popup__page">
|
||||
<van-nav-bar @click-left="close" left-arrow left-text="返回" :title="title" placeholder fixed></van-nav-bar>
|
||||
<div class="proposal-full-popup__scroll">
|
||||
<proposal-info v-if="bizId" :biz-id="bizId" :visible="visible">
|
||||
<div v-if="isApproval">
|
||||
<van-form ref="formRef">
|
||||
<template v-if="kind === 'delegation' || kind === 'preAudit' || kind === 'schoolLeaderApproval'">
|
||||
<section class="proposal-view-card">
|
||||
<h2 class="proposal-view-card__title">审批意见<span class="proposal-audit-card__required">*</span></h2>
|
||||
<van-field v-model="formData.tf_opinion" class="proposal-audit-field" name="tf_opinion" type="textarea" rows="6" label="" placeholder="请输入审批意见" :rules="[{required:true,message:'请填写审批意见'}]" required maxlength="100" show-word-limit></van-field>
|
||||
</section>
|
||||
</template>
|
||||
<template v-if="kind === 'feedbackEvaluation'">
|
||||
<van-field v-model="formData.tf_feedback_name" label="满意度" placeholder="请选择满意度" :rules="[{required:true,message:'请选择满意度'}]" required readonly is-link @click="openLayer('feedback-picker')"></van-field>
|
||||
<section class="proposal-view-card">
|
||||
<h2 class="proposal-view-card__title">审批意见<span class="proposal-audit-card__required">*</span></h2>
|
||||
<van-field v-model="formData.tf_opinion" class="proposal-audit-field" name="tf_opinion" type="textarea" rows="6" label="" placeholder="请输入审批意见" :rules="[{required:true,message:'请填写审批意见'}]" required maxlength="100" show-word-limit></van-field>
|
||||
</section>
|
||||
</template>
|
||||
<template v-if="kind === 'suggestion'">
|
||||
<van-field v-model="formData.result" label="承办意向" placeholder="请选择承办意向" :rules="[{required:true,message:'请选择承办意向'}]" required readonly is-link @click="openLayer('result-picker')"></van-field>
|
||||
<section class="proposal-view-card">
|
||||
<h2 class="proposal-view-card__title">反馈意见<span class="proposal-audit-card__required">*</span></h2>
|
||||
<van-field v-model="formData.opinion" class="proposal-audit-field" name="opinion" type="textarea" rows="6" label="" placeholder="请输入反馈意见" :rules="[{required:true,message:'请输入反馈意见'}]" required show-word-limit></van-field>
|
||||
</section>
|
||||
</template>
|
||||
<template v-if="kind === 'unitReply'">
|
||||
<section class="proposal-view-card">
|
||||
<van-field :value="formData.underTakeName" label="承办单位" readonly></van-field>
|
||||
<van-field v-model="formData.tf_implementStateName" label="落实情况" placeholder="请选择落实情况" :rules="[{required:true,message:'请选择落实情况'}]" required readonly is-link @click="openLayer('implement-picker')"></van-field>
|
||||
<h2 class="proposal-view-card__title">答复内容<span class="proposal-audit-card__required">*</span></h2>
|
||||
<van-field v-model="formData.tf_opinion" class="proposal-audit-field" name="tf_opinion" type="textarea" rows="6" label="" placeholder="请输入答复内容" :rules="[{required:true,message:'请填写答复内容'}]" required maxlength="100" show-word-limit></van-field>
|
||||
</section>
|
||||
<van-field v-if="supportCandidate && formData.underTakeIsMaster" v-model="formData.tf_nextNodeOperatorName" label="校领导" placeholder="请选择校领导" :rules="[{required:true,message:'请选择校领导'}]" required readonly is-link @click="openLayer('candidate-picker')"></van-field>
|
||||
</template>
|
||||
<template v-if="kind === 'caseCheck'">
|
||||
<van-field :value="formData.tf_username" label="审核人" readonly></van-field>
|
||||
<van-field :value="formData.tf_auditTime" label="审核时间" readonly></van-field>
|
||||
<van-field :value="formData.tf_caseCheckNeedSecondReply" label="二次答复" required :rules="[{validator:validateSecondReply,message:'请选择是否需要二次答复'}]">
|
||||
<template #input><van-radio-group v-model="formData.tf_caseCheckNeedSecondReply" direction="horizontal" @change="onSecondReplyChange"><van-radio :name="0">无需二次答复</van-radio><van-radio :name="1">需要二次答复</van-radio></van-radio-group></template>
|
||||
</van-field>
|
||||
<van-field v-if="formData.tf_caseCheckNeedSecondReply === 1" :value="selectedReplyUnitNames" label="答复单位" placeholder="请选择办理单位" readonly required is-link :rules="[{validator:validateSecondReplyUnits,message:'请选择需要二次答复的办理单位'}]" @click="openReplyUnitPicker"></van-field>
|
||||
<section class="proposal-view-card">
|
||||
<h2 class="proposal-view-card__title">审批意见<span class="proposal-audit-card__required">*</span></h2>
|
||||
<van-field v-model="formData.tf_opinion" class="proposal-audit-field" name="tf_opinion" type="textarea" rows="6" label="" placeholder="请输入审批意见" required maxlength="100" show-word-limit :rules="[{required:true,message:'请填写审批意见'}]"></van-field>
|
||||
</section>
|
||||
</template>
|
||||
</van-form>
|
||||
<div class="proposal-popup-form-actions" v-if="kind === 'delegation'">
|
||||
<van-button type="danger" block :loading="formLoading" class="proposal-soft-button proposal-soft-button--danger" @click="prepareSubmit(6)">退回</van-button><van-button type="danger" block :loading="formLoading" class="proposal-soft-button proposal-soft-button--danger" @click="prepareSubmit(2)">不同意</van-button><van-button type="primary" block :loading="formLoading" class="proposal-soft-button" @click="prepareSubmit(1)">同意</van-button>
|
||||
</div>
|
||||
<div class="proposal-popup-form-actions" v-else-if="kind === 'preAudit'" style="display:grid;grid-template-columns:repeat(2,minmax(0,1fr))">
|
||||
<van-button type="warning" :loading="formLoading" class="proposal-soft-button proposal-soft-button--warning" @click="prepareSubmit(4)">退回(不审核)</van-button><van-button type="warning" :loading="formLoading" class="proposal-soft-button proposal-soft-button--warning" @click="prepareSubmit(6)">退回(审核)</van-button><van-button type="danger" :loading="formLoading" class="proposal-soft-button proposal-soft-button--danger" @click="prepareSubmit(2)">不同意</van-button><van-button type="primary" :loading="formLoading" class="proposal-soft-button" @click="prepareSubmit(1)">同意</van-button>
|
||||
</div>
|
||||
<div class="proposal-popup-form-actions" v-else-if="kind === 'schoolLeaderApproval'"><van-button type="danger" block :loading="formLoading" class="proposal-soft-button proposal-soft-button--danger" @click="prepareSubmit('back')">退回答复</van-button><van-button type="primary" block :loading="formLoading" class="proposal-soft-button" @click="prepareSubmit('agree')">同意答复</van-button></div>
|
||||
<div class="proposal-popup-form-actions" v-else><van-button block :disabled="formLoading" class="proposal-rounded-button" @click="close">取消</van-button><van-button type="primary" block :loading="formLoading" class="proposal-soft-button" @click="prepareSubmit(1)">提交</van-button></div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 字典通过异步请求加载,初始化阶段可能为 null;使用空数组保证弹层首次渲染不执行 null.map。 -->
|
||||
<van-popup v-model="feedbackPickerVisible" position="bottom" :close-on-click-overlay="false"><van-picker show-toolbar :columns="(dict.type.PROPOSAL_FEEDBACK || []).map((item) => ({text:item.label,value:item.code}))" @confirm="confirmFeedback" @cancel="closeLayer('feedback-picker')"></van-picker></van-popup>
|
||||
<van-popup v-model="resultPickerVisible" position="bottom" :close-on-click-overlay="false"><van-picker show-toolbar :columns="(dict.type.UNDERTAKE_SUGGESTION || []).map((item) => item.code)" @confirm="confirmResult" @cancel="closeLayer('result-picker')"></van-picker></van-popup>
|
||||
<van-popup v-model="implementPickerVisible" position="bottom" :close-on-click-overlay="false"><van-picker show-toolbar :columns="(dict.type.PROPOSAL_REPLY_IMPLEMENT || []).map((item) => ({text:item.label,value:item.code}))" @confirm="confirmImplement" @cancel="closeLayer('implement-picker')"></van-picker></van-popup>
|
||||
<van-popup v-model="candidatePickerVisible" position="bottom" :close-on-click-overlay="false"><van-picker show-toolbar :columns="candidates.map((item) => ({text:item.userName,value:item.userId}))" @confirm="confirmCandidate" @cancel="closeLayer('candidate-picker')"></van-picker></van-popup>
|
||||
<van-popup v-model="replyUnitPickerVisible" position="bottom" round :close-on-click-overlay="false" :style="{height:'70%'}">
|
||||
<div class="reply-unit-popup"><div class="reply-unit-toolbar"><button type="button" @click="closeLayer('reply-unit-picker')">取消</button><div class="reply-unit-toolbar-title">选择答复单位</div><button type="button" @click="confirmReplyUnits">确定</button></div>
|
||||
<div class="reply-unit-list" v-if="replyUnitOptions.length"><van-checkbox-group v-model="pendingReplyUnitIds"><van-cell v-for="item in replyUnitOptions" :key="item.unitId" clickable :title="item.unitName" :label="item.isMaster ? '主办单位' : '协办单位'" @click="toggleReplyUnit(item)"><template #right-icon><van-checkbox :name="item.unitId" @click.stop></van-checkbox></template></van-cell></van-checkbox-group></div>
|
||||
<div class="reply-unit-empty" v-else>暂无可选办理单位</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
<van-dialog :value="confirmVisible" title="提示" message="您确定要提交吗?" show-cancel-button @confirm="submit" @cancel="closeLayer('submit-confirm')"></van-dialog>
|
||||
</van-popup>
|
||||
`,
|
||||
dicts: ["PROPOSAL_FEEDBACK", "UNDERTAKE_SUGGESTION", "PROPOSAL_REPLY_IMPLEMENT"],
|
||||
components: {"proposal-info": PROPOSAL_INFO},
|
||||
props: {kind: {type: String, required: true}, pageKey: {type: String, required: true}},
|
||||
data() { return {visible:false,bizId:"",action:"view",formData:{},formLoading:false,pendingSubmitType:1,feedbackPickerVisible:false,resultPickerVisible:false,implementPickerVisible:false,candidatePickerVisible:false,replyUnitPickerVisible:false,confirmVisible:false,supportCandidate:false,candidates:[],replyUnitOptions:[],pendingReplyUnitIds:[],unsubscribeHistoryLayer:null} },
|
||||
computed: {
|
||||
isApproval() { return this.action === "approval" },
|
||||
title() { const titles={delegation:"团长审核",preAudit:"校工会预审核",schoolLeaderApproval:"分管校领导审批",feedbackEvaluation:"反馈评价",suggestion:"承办单位意见",unitReply:"承办单位答复",caseCheck:"提案委员会审查"}; return this.isApproval ? titles[this.kind] : "提案详情" },
|
||||
selectedReplyUnitNames() { const ids=this.formData.tf_secondReplyUnitIds || []; return this.replyUnitOptions.filter((item) => ids.indexOf(item.unitId)>-1).map((item) => item.unitName+"("+(item.isMaster?"主办":"协办")+")").join("、") }
|
||||
},
|
||||
methods: {
|
||||
syncLayers(stack) { this.$set(this,"visible",stack.includes("detail")); this.$set(this,"feedbackPickerVisible",stack.includes("feedback-picker")); this.$set(this,"resultPickerVisible",stack.includes("result-picker")); this.$set(this,"implementPickerVisible",stack.includes("implement-picker")); this.$set(this,"candidatePickerVisible",stack.includes("candidate-picker")); this.$set(this,"replyUnitPickerVisible",stack.includes("reply-unit-picker")); this.$set(this,"confirmVisible",stack.includes("submit-confirm")) },
|
||||
openLayer(name) { window.h5HistoryLayerManager.open(name) }, closeLayer(name,callback) { window.h5HistoryLayerManager.close(name,callback) }, close() { this.closeLayer("detail") },
|
||||
/** row 提供详情主键和当前 WF 任务参数,action 为 view 或 approval。 */
|
||||
open(row,action) {
|
||||
const defaultTaskNames={delegation:"团长审核",preAudit:"校工会预审核",feedbackEvaluation:"反馈评价",unitReply:"承办单位答复",caseCheck:"提案委员会审查"}
|
||||
const taskName=this.kind === "unitReply" ? (row.taskName || defaultTaskNames[this.kind]) : (row.curTaskName || row.taskName || defaultTaskNames[this.kind] || "")
|
||||
this.$set(this,"bizId",row.id); this.$set(this,"action",action); this.$set(this,"formData",{proposalId:row.id,processTaskId:row.taskId || "",taskKey:row.taskKey || "",taskName:taskName,instanceId:row.instanceId || "",underTakeName:row.underTakeName || "",underTakeIsMaster:!!row.underTakeIsMaster,tf_opinion:"",opinion:""})
|
||||
if (action === "approval" && this.kind === "unitReply") this.loadCandidates(row.taskId || "")
|
||||
if (action === "approval" && this.kind === "caseCheck") { this.$set(this.formData,"tf_auditTime",moment().format("YYYY-MM-DD")); this.$set(this.formData,"tf_username",(this.$store.state.user && this.$store.state.user.username) || ""); this.$set(this.formData,"tf_caseCheckNeedSecondReply",0); this.$set(this.formData,"tf_secondReplyUnitIds",[]); this.loadReplyUnits(row.id) }
|
||||
this.openLayer("detail")
|
||||
},
|
||||
loadCandidates(taskId) { this.$axios.post("/flow/common/candidate",{taskId:taskId}).then((res) => { if (res.code === 0) { this.$set(this,"candidates",res.data.candidates || []); this.$set(this,"supportCandidate",res.data.support) } }) },
|
||||
confirmFeedback(value) { this.$set(this.formData,"tf_feedback_name",value.text); this.$set(this.formData,"tf_feedback",value.value); this.closeLayer("feedback-picker") },
|
||||
confirmResult(value) { this.$set(this.formData,"result",value); this.closeLayer("result-picker") },
|
||||
confirmImplement(value) { this.$set(this.formData,"tf_implementStateName",value.text); this.$set(this.formData,"tf_implementState",value.value); this.closeLayer("implement-picker") },
|
||||
confirmCandidate(value) { this.$set(this.formData,"tf_nextNodeOperatorName",value.text); this.$set(this.formData,"tf_nextNodeOperator",value.value); this.closeLayer("candidate-picker") },
|
||||
validateSecondReply(value) { return value === 0 || value === 1 },
|
||||
validateSecondReplyUnits() { return this.formData.tf_caseCheckNeedSecondReply !== 1 || (this.formData.tf_secondReplyUnitIds || []).length > 0 },
|
||||
onSecondReplyChange(value) { if (value !== 1) this.$set(this.formData,"tf_secondReplyUnitIds",[]) },
|
||||
loadReplyUnits(proposalId) { this.$axios.post("/platform/proposal/case/check/listReplyUnits",{proposalId:proposalId}).then((res) => { if (res && res.code === 0) this.$set(this,"replyUnitOptions",res.data || []) }) },
|
||||
openReplyUnitPicker() { this.$set(this,"pendingReplyUnitIds",[...(this.formData.tf_secondReplyUnitIds || [])]); this.openLayer("reply-unit-picker") },
|
||||
toggleReplyUnit(item) { const ids=[...this.pendingReplyUnitIds]; const index=ids.indexOf(item.unitId); if (index>-1) ids.splice(index,1); else ids.push(item.unitId); this.$set(this,"pendingReplyUnitIds",ids) },
|
||||
confirmReplyUnits() { this.$set(this.formData,"tf_secondReplyUnitIds",[...this.pendingReplyUnitIds]); this.closeLayer("reply-unit-picker") },
|
||||
buildCaseCheckData() { const data={...this.formData}; const units=data.tf_caseCheckNeedSecondReply === 1 ? this.replyUnitOptions.filter((item) => data.tf_secondReplyUnitIds.indexOf(item.unitId)>-1) : []; const masters=units.filter((item) => item.isMaster); const slaves=units.filter((item) => !item.isMaster); data.tf_masterUnitIds=masters.map((item) => item.unitId); data.tf_masterUnitId=data.tf_masterUnitIds[0] || ""; data.tf_masterUnitNames=masters.map((item) => item.unitName); data.tf_masterUnitName=data.tf_masterUnitNames[0] || ""; data.tf_masterUnitNameStr=data.tf_masterUnitNames.join(","); data.tf_slaveUnitIds=slaves.map((item) => item.unitId); data.tf_slaveUnitNames=slaves.map((item) => item.unitName); data.tf_slaveUnitNameStr=data.tf_slaveUnitNames.join(","); return data },
|
||||
prepareSubmit(value) {
|
||||
// 各办理页面提交前统一校验意见字段;空白字符按未填写处理,提示后不再打开确认弹框。
|
||||
const opinionConfig = this.kind === "suggestion"
|
||||
? {field: "opinion", message: "请输入反馈意见"}
|
||||
: this.kind === "unitReply"
|
||||
? {field: "tf_opinion", message: "请填写答复内容"}
|
||||
: {field: "tf_opinion", message: "请填写审批意见"}
|
||||
if (!(this.formData[opinionConfig.field] || "").trim()) {
|
||||
this.$toast(opinionConfig.message)
|
||||
return
|
||||
}
|
||||
this.$refs.formRef.validate().then(() => { this.$set(this,"pendingSubmitType",value); this.openLayer("submit-confirm") }).catch(() => {})
|
||||
},
|
||||
/** 根据页面类型保留原接口和参数分支,成功后清理全部弹层历史并通知列表刷新。 */
|
||||
submit() {
|
||||
this.$set(this,"formLoading",true)
|
||||
let request
|
||||
if (this.kind === "suggestion") request=this.$axios.post("/platform/proposal/suggestion/suggest",this.formData)
|
||||
else if (this.kind === "schoolLeaderApproval") { const data={...this.formData,tf_approval:this.pendingSubmitType}; delete data.taskKey; delete data.taskName; request=this.$axios.post("/platform/proposal/schoolLeaderApproval/executeTask",{data:JSON.stringify(data)}) }
|
||||
else {
|
||||
const data=this.kind === "caseCheck" ? {...this.buildCaseCheckData(),submitType:this.pendingSubmitType} : {...this.formData,submitType:this.pendingSubmitType}
|
||||
if (this.kind === "preAudit") { data.taskName="startTask"; if (this.pendingSubmitType === 4) { data.tf_sourceTaskKey=this.formData.taskKey; data.tf_audit=false } }
|
||||
if (this.kind === "unitReply") { delete data.underTakeIsMaster; delete data.underTakeName }
|
||||
if (this.kind === "feedbackEvaluation" && data.tf_feedback === "DISSATISFIED") request=this.$axios.post("/platform/proposal/feedbackEvaluation/caseInfo",{instId:data.instanceId}).then((res) => { if (res.code !== 0) return Promise.reject(new Error(res.msg || "查询立案信息失败")); data.tf_masterUnitId=res.data.tf_masterUnitId; return this.$axios.post("/flow/common/executeTask",{data:JSON.stringify(data)}) })
|
||||
else request=this.$axios.post("/flow/common/executeTask",{data:JSON.stringify(data)})
|
||||
}
|
||||
request.then((res) => { if (res && res.code === 0) { this.$toast.success(res.msg); window.h5HistoryLayerManager.closeAll(() => this.$emit("success")) } }).catch((error) => { if (error && error.message && error.message !== "cancel") this.$toast.fail(error.message) }).finally(() => { this.$set(this,"formLoading",false) })
|
||||
}
|
||||
},
|
||||
created() { window.h5HistoryLayerManager.ensureRegistered(this.pageKey); this.$set(this,"unsubscribeHistoryLayer",window.h5HistoryLayerManager.subscribe((stack) => this.syncLayers(stack))) },
|
||||
beforeDestroy() { if (this.unsubscribeHistoryLayer) this.unsubscribeHistoryLayer(); if (window.h5HistoryLayerManager.pageKey === this.pageKey) window.h5HistoryLayerManager.unregister(this.pageKey) }
|
||||
}
|
||||
+57
-27
@@ -1,8 +1,11 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style>
|
||||
<!--#include("../../common/info.css"){}#-->
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="提案查询" placeholder fixed></van-nav-bar>
|
||||
<van-nav-bar @click-left="handlePageBack" left-arrow left-text="返回" title="提案查询" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
v-model="pageForm.name"
|
||||
@@ -13,9 +16,9 @@ layout("/layouts/platform_h5.html"){
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item v-model="pageForm.searchSessionId" :options="sessionOptions" @change="sessionChange"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionOptions" @change="sessionChange"></van-dropdown-item>
|
||||
<van-dropdown-item
|
||||
v-if="pageForm.searchSessionId"
|
||||
v-if="pageForm.sessionId"
|
||||
v-model="pageForm.delegationId"
|
||||
:options="delegationOptions"
|
||||
@change="doSearch"
|
||||
@@ -49,7 +52,9 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-cell title="代表团" :value="row.delegationName"></van-cell>
|
||||
<van-cell title="当前节点" :value="row.processInstanceNodeName"></van-cell>
|
||||
<van-cell class="table-card-footer">
|
||||
<van-button size="small" @click="openView(row)">查看</van-button>
|
||||
<van-button size="small" @click="openView(row)">
|
||||
<van-icon class="proposal-action-icon" name="eye-o"></van-icon>查看
|
||||
</van-button>
|
||||
</van-cell>
|
||||
</div>
|
||||
</div>
|
||||
@@ -57,20 +62,26 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-empty v-else image="/assets/platform/plugins/vant-green/images/nodata/nodata.png" description="暂无数据"></van-empty>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<van-popup v-model="detailVisible" class="proposal-full-popup" position="right"
|
||||
:close-on-click-overlay="false" safe-area-inset-bottom>
|
||||
<div class="proposal-full-popup__page">
|
||||
<van-nav-bar title="提案信息" left-arrow left-text="返回" fixed
|
||||
@click-left="closeHistoryLayer('detail')"></van-nav-bar>
|
||||
<div class="proposal-full-popup__scroll">
|
||||
<proposal-info v-if="detailVisible && detailBizId" :biz-id="detailBizId" :visible="detailVisible"></proposal-info>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
@@ -78,7 +89,7 @@ layout("/layouts/platform_h5.html"){
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
name: null,
|
||||
searchSessionId: null,
|
||||
sessionId: null,
|
||||
unionId: null,
|
||||
unitId: null,
|
||||
delegationId: null
|
||||
@@ -99,17 +110,36 @@ layout("/layouts/platform_h5.html"){
|
||||
moreOptions: {},
|
||||
id: "",
|
||||
formValidSuccess: false,
|
||||
infoShow: false
|
||||
detailVisible: false,
|
||||
detailBizId: "",
|
||||
historyLayerPageKey: "proposal-query-comprehensive-h5"
|
||||
}
|
||||
},
|
||||
components: {
|
||||
info: H5_PROPOSAL_INFO_COMPONENT
|
||||
},
|
||||
methods: {
|
||||
historyBack,
|
||||
registerHistoryLayers() {
|
||||
if (!window.h5HistoryLayerManager) return
|
||||
window.h5HistoryLayerManager.register(this.historyLayerPageKey, (stack) => {
|
||||
this.$set(this, "detailVisible", stack.includes("detail"))
|
||||
})
|
||||
},
|
||||
openHistoryLayer(layerName) {
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open(layerName)) return
|
||||
if (layerName === "detail") this.$set(this, "detailVisible", true)
|
||||
},
|
||||
closeHistoryLayer(layerName) {
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.close(layerName)) return
|
||||
if (layerName === "detail") this.$set(this, "detailVisible", false)
|
||||
},
|
||||
handlePageBack() {
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.stack.length) {
|
||||
window.h5HistoryLayerManager.close()
|
||||
return
|
||||
}
|
||||
historyBack()
|
||||
},
|
||||
sessionChange(val) {
|
||||
this.pageForm.delegationId = null
|
||||
if (this.pageForm.searchSessionId) {
|
||||
if (this.pageForm.sessionId) {
|
||||
this.listDelegation()
|
||||
} else {
|
||||
this.delegationOptions = [
|
||||
@@ -130,16 +160,11 @@ layout("/layouts/platform_h5.html"){
|
||||
value: null
|
||||
}
|
||||
].concat(res.data.map((v) => ({ text: v.fullName, value: v.id })))
|
||||
// 届次接口按开始时间倒序返回,首条即最新届次;无届次时继续按全部届次查询。
|
||||
if (res.data && res.data.length > 0) {
|
||||
this.$set(this.pageForm, "searchSessionId", res.data[0].id)
|
||||
}
|
||||
this.sessionChange()
|
||||
}
|
||||
})
|
||||
},
|
||||
listDelegation() {
|
||||
this.$axios.post("/platform/proposal/common/listDelegation", { sessionId: this.pageForm.searchSessionId }).then((res) => {
|
||||
this.$axios.post("/platform/proposal/common/listDelegation", { sessionId: this.pageForm.sessionId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.delegationOptions = [
|
||||
{
|
||||
@@ -166,10 +191,8 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
openView(row) {
|
||||
this.infoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
})
|
||||
this.$set(this, "detailBizId", row.id)
|
||||
this.openHistoryLayer("detail")
|
||||
},
|
||||
|
||||
pageData() {
|
||||
@@ -197,7 +220,14 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.registerHistoryLayers()
|
||||
this.pageData()
|
||||
this.listSession()
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (window.h5HistoryLayerManager) {
|
||||
window.h5HistoryLayerManager.unregister(this.historyLayerPageKey)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+434
@@ -0,0 +1,434 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style>
|
||||
body {
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-case-check-page {
|
||||
min-height: 100vh;
|
||||
padding-bottom: calc(24px + env(safe-area-inset-bottom));
|
||||
box-sizing: border-box;
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-case-check-page .van-nav-bar {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.proposal-case-check-page .van-nav-bar__title {
|
||||
color: #172033;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.proposal-case-check-page .van-nav-bar .van-icon,
|
||||
.proposal-case-check-page .van-nav-bar__text {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
.proposal-case-check-content {
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.proposal-case-check-sticky {
|
||||
padding: 22px 12px 1px;
|
||||
box-sizing: border-box;
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-case-check-search {
|
||||
margin: 0 0 8px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
border-radius: 12px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 5px 16px rgba(43, 73, 112, .1);
|
||||
}
|
||||
|
||||
.proposal-case-check-search .van-search__content {
|
||||
height: 42px;
|
||||
padding-left: 12px;
|
||||
align-items: center;
|
||||
border-radius: 12px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.proposal-case-check-search .van-field__control {
|
||||
color: #263548;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.proposal-case-check-search .van-field__control::placeholder {
|
||||
color: #a7b0bf;
|
||||
}
|
||||
|
||||
.proposal-case-check-filter {
|
||||
margin: 0 0 10px;
|
||||
overflow: hidden;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 5px 16px rgba(43, 73, 112, .08);
|
||||
transition: border-radius .18s ease;
|
||||
}
|
||||
|
||||
.proposal-case-check-filter.is-open {
|
||||
border-radius: 10px 10px 0 0;
|
||||
}
|
||||
|
||||
.proposal-case-check-filter .van-dropdown-menu__bar,
|
||||
.proposal-case-check-filter .van-dropdown-menu__item,
|
||||
.proposal-case-check-filter .van-dropdown-menu__title {
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
.proposal-case-check-filter .van-dropdown-menu__bar {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.proposal-case-check-filter .van-dropdown-menu__item,
|
||||
.proposal-case-check-filter .van-dropdown-menu__title {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.proposal-case-check-filter .van-dropdown-menu__item {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.proposal-case-check-filter .van-dropdown-menu__title {
|
||||
display: inline-flex;
|
||||
color: #66758a;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.proposal-case-check-filter .van-dropdown-menu__title--active,
|
||||
.proposal-case-check-filter .van-dropdown-item__option--active,
|
||||
.proposal-case-check-filter .van-dropdown-item__option--active .van-dropdown-item__icon {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
.proposal-case-check-filter .van-dropdown-menu__title--down::after {
|
||||
border-color: transparent transparent #1989fa #1989fa;
|
||||
}
|
||||
|
||||
.proposal-case-check-filter .van-dropdown-item__content {
|
||||
width: calc(100% - 24px);
|
||||
margin: 0 12px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
border-radius: 0 0 12px 12px;
|
||||
box-shadow: 0 10px 24px rgba(31, 65, 108, .14);
|
||||
}
|
||||
|
||||
.proposal-case-check-filter .van-dropdown-item__option {
|
||||
display: flex;
|
||||
min-height: 48px;
|
||||
padding: 0 16px;
|
||||
align-items: center;
|
||||
color: #46566c;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.proposal-case-check-filter .van-cell::after {
|
||||
right: 16px;
|
||||
left: 16px;
|
||||
}
|
||||
|
||||
.proposal-case-check-list .empty-state {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.proposal-case-check-empty {
|
||||
display: flex;
|
||||
min-height: 280px;
|
||||
padding: 46px 18px 36px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.proposal-case-check-empty img {
|
||||
display: block;
|
||||
width: 86%;
|
||||
max-width: 290px;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.proposal-case-check-empty__title {
|
||||
margin-top: 14px;
|
||||
color: #50627a;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.proposal-case-check-empty__hint {
|
||||
margin-top: 5px;
|
||||
color: #9aa7b8;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.proposal-case-check-card-header {
|
||||
display: flex;
|
||||
margin-bottom: 7px;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.proposal-case-check-card-heading {
|
||||
min-width: 0;
|
||||
padding-right: 10px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.proposal-case-check-card-title {
|
||||
overflow: hidden;
|
||||
color: #253247;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
font-weight: 600;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.proposal-case-check-card-code {
|
||||
margin-top: 1px;
|
||||
color: #9ba6b6;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.proposal-case-check-status {
|
||||
display: inline-flex;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.proposal-case-check-status .van-tag {
|
||||
display: inline-flex;
|
||||
min-height: 24px;
|
||||
padding: 3px 9px;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
border: 0;
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@media (max-width: 350px) {
|
||||
.proposal-case-check-content,
|
||||
.proposal-case-check-sticky {
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style id="style-proposal-task-popup-h5">
|
||||
<!--#include("../../common/info.css"){}#-->
|
||||
<!--#include("../theme.css"){}#-->
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<div class="proposal-case-check-page">
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="提案委员会审查" placeholder fixed></van-nav-bar>
|
||||
<van-sticky :offset-top="46">
|
||||
<div class="proposal-case-check-sticky">
|
||||
<van-search
|
||||
v-model="pageForm.name"
|
||||
class="proposal-case-check-search"
|
||||
placeholder="请输入提案名称搜索"
|
||||
shape="round"
|
||||
clearable
|
||||
@search="doSearch"
|
||||
@clear="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu
|
||||
class="proposal-case-check-filter"
|
||||
:class="{'is-open': filterOpened}"
|
||||
active-color="#1989fa"
|
||||
>
|
||||
<van-dropdown-item
|
||||
v-model="pageForm.sessionId"
|
||||
:options="sessionOptions"
|
||||
:multiple="false"
|
||||
@change="doSearch"
|
||||
@open="onFilterOpen"
|
||||
@close="onFilterClose"
|
||||
></van-dropdown-item>
|
||||
<van-dropdown-item
|
||||
v-model="pageForm.approvalText"
|
||||
:options="approvalOptions"
|
||||
:multiple="false"
|
||||
@change="approvalChange"
|
||||
@open="onFilterOpen"
|
||||
@close="onFilterClose"
|
||||
></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
</van-sticky>
|
||||
|
||||
<main class="proposal-case-check-content">
|
||||
<div class="proposal-case-check-list">
|
||||
<!-- 列表无记录时使用提案 H5 统一空状态。 -->
|
||||
<div v-if="pageForm.totalCount === 0" class="proposal-case-check-empty">
|
||||
<img src="/assets/mobile/img/proposal/proposal-empty.png" alt="暂无提案记录插画">
|
||||
<div class="proposal-case-check-empty__title">暂无提案记录</div>
|
||||
<div class="proposal-case-check-empty__hint">当前筛选条件下暂时没有提案</div>
|
||||
</div>
|
||||
<table-list api="/platform/proposal/case/check/pageData" :page_form.sync="pageForm" @ready="onReady"
|
||||
ref="tableListRef"
|
||||
title="name">
|
||||
<template #header="{index,row}">
|
||||
<div class="proposal-case-check-card-header">
|
||||
<div class="proposal-case-check-card-heading">
|
||||
<div class="proposal-case-check-card-title">{{row.name}}</div>
|
||||
<div class="proposal-case-check-card-code">编号:{{row.code || '--'}}</div>
|
||||
</div>
|
||||
<enum-tag
|
||||
class="proposal-case-check-status"
|
||||
v-if="row.instanceState"
|
||||
:value="row.instanceState"
|
||||
name="ProcessInstanceStateEnum"
|
||||
label_key="message"
|
||||
size="small"
|
||||
></enum-tag>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="立案编号">{{row.caseFilingCode || '--'}}</table-column>
|
||||
<table-column label="提案类别">{{row.typeName || '--'}}</table-column>
|
||||
<table-column label="提案人">{{row.createUserName || '--'}}</table-column>
|
||||
<table-column label="教代会">{{row.sessionName || '--'}}</table-column>
|
||||
<table-column label="代表团">{{row.delegationName || '--'}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName || '--'}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row,index)">
|
||||
<van-icon class="proposal-action-icon" name="eye-o"></van-icon>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row,index)">
|
||||
<van-icon class="proposal-action-icon" name="edit"></van-icon>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<van-icon class="proposal-action-icon" name="revoke"></van-icon>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
<proposal-task-popup ref="taskPopup" kind="caseCheck" page-key="proposal-case-check-task" @success="doSearch"></proposal-task-popup>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
<!--#include("../../common/task-popup.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {"proposal-task-popup": PROPOSAL_TASK_POPUP},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
name: null,
|
||||
sessionId: null,
|
||||
approvalText: "0",
|
||||
approval: false
|
||||
},
|
||||
sessionOptions: [],
|
||||
filterOpened: false,
|
||||
approvalOptions: [
|
||||
{text: "未审核", value: "0"},
|
||||
{text: "已审核", value: "1"}
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onReady() {
|
||||
this.listSession(false)
|
||||
},
|
||||
|
||||
// 审核状态下拉框使用字符串值展示,查询接口使用布尔值区分已审核和未审核。
|
||||
approvalChange(value) {
|
||||
this.$set(this.pageForm, "approval", value === "1")
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
onFilterOpen() {
|
||||
this.$set(this, "filterOpened", true)
|
||||
},
|
||||
|
||||
onFilterClose() {
|
||||
this.$set(this, "filterOpened", false)
|
||||
},
|
||||
|
||||
// 缓存恢复时只加载教代会选项,不覆盖离开列表前的筛选条件和列表快照。
|
||||
listSession(skipDefaultSearch) {
|
||||
this.$axios.post("/platform/proposal/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$set(this, "sessionOptions", [{text: "全部教代会", value: null}]
|
||||
.concat(res.data.map((item) => ({text: item.fullName, value: item.id}))))
|
||||
if (skipDefaultSearch) return
|
||||
this.$set(this.pageForm, "sessionId", res.data.length > 0 ? res.data[0].id : null)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onView(row, index) {
|
||||
this.$refs.taskPopup.open(row, "view")
|
||||
},
|
||||
|
||||
onApproval(row, index) {
|
||||
this.$refs.taskPopup.open(row, "approval")
|
||||
},
|
||||
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.$set(this.pageForm, "pageNumber", 1)
|
||||
this.$set(this.pageForm, "totalCount", 0)
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const tab = new URLSearchParams(window.location.search).get("tab")
|
||||
if (tab === "done") {
|
||||
this.$set(this.pageForm, "approval", true)
|
||||
this.$set(this.pageForm, "approvalText", "1")
|
||||
} else if (tab === "todo") {
|
||||
this.$set(this.pageForm, "approval", false)
|
||||
this.$set(this.pageForm, "approvalText", "0")
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+210
-120
@@ -1,29 +1,71 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style>
|
||||
body { background-color: #f3f7fd; }
|
||||
.proposal-commissioner-page { min-height: 100vh; padding-bottom: calc(24px + env(safe-area-inset-bottom)); box-sizing: border-box; background-color: #f3f7fd; }
|
||||
.proposal-commissioner-page .van-nav-bar { background-color: #fff; }
|
||||
.proposal-commissioner-page .van-nav-bar__title { color: #172033; font-size: 16px; font-weight: 600; }
|
||||
.proposal-commissioner-page .van-nav-bar .van-icon, .proposal-commissioner-page .van-nav-bar__text { color: #1989fa; }
|
||||
.proposal-commissioner-content { padding: 0 12px; }
|
||||
.proposal-commissioner-sticky { padding: 22px 12px 1px; box-sizing: border-box; background-color: #f3f7fd; }
|
||||
.proposal-commissioner-search { margin: 0 0 8px; padding: 0; overflow: hidden; border-radius: 12px; background-color: #fff; box-shadow: 0 5px 16px rgba(43, 73, 112, .1); }
|
||||
.proposal-commissioner-search .van-search__content { height: 42px; padding-left: 12px; align-items: center; border-radius: 12px; background-color: #fff; }
|
||||
.proposal-commissioner-search .van-field__control { color: #263548; font-size: 14px; }
|
||||
.proposal-commissioner-search .van-field__control::placeholder { color: #a7b0bf; }
|
||||
.proposal-commissioner-filter { margin: 0 0 10px; overflow: hidden; border-radius: 10px; box-shadow: 0 5px 16px rgba(43, 73, 112, .08); transition: border-radius .18s ease; }
|
||||
.proposal-commissioner-filter.is-open { border-radius: 10px 10px 0 0; }
|
||||
.proposal-commissioner-filter .van-dropdown-menu__bar, .proposal-commissioner-filter .van-dropdown-menu__item, .proposal-commissioner-filter .van-dropdown-menu__title { height: 44px; }
|
||||
.proposal-commissioner-filter .van-dropdown-menu__bar { box-shadow: none; }
|
||||
.proposal-commissioner-filter .van-dropdown-menu__item, .proposal-commissioner-filter .van-dropdown-menu__title { align-items: center; }
|
||||
.proposal-commissioner-filter .van-dropdown-menu__item { justify-content: center; }
|
||||
.proposal-commissioner-filter .van-dropdown-menu__title { display: inline-flex; color: #66758a; font-size: 14px; line-height: 20px; }
|
||||
.proposal-commissioner-filter .van-dropdown-menu__title--active, .proposal-commissioner-filter .van-dropdown-item__option--active, .proposal-commissioner-filter .van-dropdown-item__option--active .van-dropdown-item__icon { color: #1989fa; }
|
||||
.proposal-commissioner-filter .van-dropdown-menu__title--down::after { border-color: transparent transparent #1989fa #1989fa; }
|
||||
.proposal-commissioner-filter .van-dropdown-item__content { width: calc(100% - 24px); margin: 0 12px; overflow: hidden; box-sizing: border-box; border-radius: 0 0 12px 12px; box-shadow: 0 10px 24px rgba(31, 65, 108, .14); }
|
||||
.proposal-commissioner-filter .van-dropdown-item__option { display: flex; min-height: 48px; padding: 0 16px; align-items: center; color: #46566c; font-size: 14px; }
|
||||
.proposal-commissioner-filter .van-cell::after { right: 16px; left: 16px; }
|
||||
.proposal-commissioner-list .empty-state { display: none; }
|
||||
.proposal-commissioner-empty { display: flex; min-height: 280px; padding: 46px 18px 36px; align-items: center; justify-content: center; flex-direction: column; box-sizing: border-box; text-align: center; }
|
||||
.proposal-commissioner-empty img { display: block; width: 86%; max-width: 290px; height: auto; object-fit: contain; }
|
||||
.proposal-commissioner-empty__title { margin-top: 14px; color: #50627a; font-size: 15px; line-height: 22px; font-weight: 600; }
|
||||
.proposal-commissioner-empty__hint { margin-top: 5px; color: #9aa7b8; font-size: 12px; line-height: 18px; }
|
||||
@media (max-width: 350px) { .proposal-commissioner-content, .proposal-commissioner-sticky { padding-right: 10px; padding-left: 10px; } }
|
||||
</style>
|
||||
<style id="style-proposal-commissioner-h5">
|
||||
<!--#include("../../common/info.css"){}#-->
|
||||
<!--#include("../theme.css"){}#-->
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="委员会成员意见" placeholder
|
||||
<div class="proposal-commissioner-page">
|
||||
<van-nav-bar @click-left="handlePageBack" left-arrow left-text="返回" title="委员会成员意见" placeholder
|
||||
fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<div class="proposal-commissioner-sticky">
|
||||
<van-search
|
||||
v-model="pageForm.name"
|
||||
class="proposal-commissioner-search"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入提案名称搜索"
|
||||
shape="round"
|
||||
clearable
|
||||
@search="doSearch"
|
||||
@clear="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-menu class="proposal-commissioner-filter" :class="{'is-open': filterOpened}" active-color="#1989fa" :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
@change="doSearch" @open="setFilterOpened(true)" @close="setFilterOpened(false)"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.approvalText" :options="approvalOptions" :multiple="false"
|
||||
@change="approvalChange" @open="setFilterOpened(true)" @close="setFilterOpened(false)"></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>
|
||||
</div>
|
||||
</van-sticky>
|
||||
|
||||
<main class="proposal-commissioner-content"><div class="proposal-commissioner-list">
|
||||
<!-- 列表无记录时展示与团长审核一致的提案专用空状态。 -->
|
||||
<div v-if="pageForm.totalCount === 0" class="proposal-commissioner-empty"><img src="/assets/mobile/img/proposal/proposal-empty.png" alt="暂无提案记录插画"><div class="proposal-commissioner-empty__title">暂无提案记录</div><div class="proposal-commissioner-empty__hint">当前筛选条件下暂时没有提案</div></div>
|
||||
<table-list api="/platform/proposal/commissioner/pageData" :page_form.sync="pageForm" @ready="onReady"
|
||||
ref="tableListRef"
|
||||
title="name">
|
||||
@@ -41,86 +83,83 @@ layout("/layouts/platform_h5.html"){
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<van-icon class="proposal-action-icon" name="eye-o"></van-icon>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="!row.pcoId" @click="onApproval(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<van-icon class="proposal-action-icon" name="edit"></van-icon>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
</div></main>
|
||||
|
||||
<proposal-info ref="proposalInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">提案委员会成员意见</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.caseFilingResultName"
|
||||
name="caseFilingResultName"
|
||||
label="立案结果"
|
||||
placeholder="请选择立案结果"
|
||||
:rules="[{ required: true, message: '请选择立案结果' }]"
|
||||
required
|
||||
is-link
|
||||
@click="showCaseFilingResultPicker = true"
|
||||
></van-field>
|
||||
<van-popup v-model="showCaseFilingResultPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="dict.type.PROPOSAL_CASE_FILING_RESULT.map(item => ({text: item.label, value: item.code}))"
|
||||
@confirm="onCaseFilingResultConfirm"
|
||||
@cancel="showCaseFilingResultPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<template v-if="['CONFIRM_FILING'].includes(formData.caseFilingResult)">
|
||||
<van-field
|
||||
v-model="formData.caseFilingTypeName"
|
||||
name="caseFilingTypeName"
|
||||
label="立案结果"
|
||||
placeholder="请选择立案类型"
|
||||
:rules="[{ required: true, message: '请选择立案类型' }]"
|
||||
required
|
||||
is-link
|
||||
@click="showCaseFilingTypePicker = true"
|
||||
></van-field>
|
||||
<van-popup v-model="showCaseFilingTypePicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="dict.type.PROPOSAL_CASE_FILING_TYPE.map(item => ({text: item.label, value: item.code}))"
|
||||
@confirm="onCaseFilingTypeConfirm"
|
||||
@cancel="showCaseFilingTypePicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
</template>
|
||||
|
||||
<van-field
|
||||
v-model="formData.opinion"
|
||||
name="opinion"
|
||||
label="审批意见"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="primary" block @click="doSubmit">提交</van-button>
|
||||
<van-button block @click="$refs.proposalInfoRef.onClose()">取消</van-button>
|
||||
<van-popup v-model="detailVisible" class="proposal-full-popup" position="right"
|
||||
:close-on-click-overlay="false" safe-area-inset-bottom>
|
||||
<div class="proposal-full-popup__page">
|
||||
<van-nav-bar :title="popupTitle" left-arrow left-text="返回" fixed
|
||||
@click-left="closeHistoryLayer('detail')"></van-nav-bar>
|
||||
<div class="proposal-full-popup__scroll">
|
||||
<proposal-info v-if="detailVisible && detailBizId" :biz-id="detailBizId" :visible="detailVisible">
|
||||
<div v-if="isApproval">
|
||||
<van-form ref="formRef">
|
||||
<van-field v-model="formData.caseFilingResultName" name="caseFilingResultName"
|
||||
label="立案结果" placeholder="请选择立案结果" readonly required is-link
|
||||
:rules="[{ required: true, message: '请选择立案结果' }]"
|
||||
@click="openHistoryLayer('result-picker')"></van-field>
|
||||
<template v-if="formData.caseFilingResult === 'CONFIRM_FILING'">
|
||||
<van-field v-model="formData.caseFilingTypeName" name="caseFilingTypeName"
|
||||
label="立案类型" placeholder="请选择立案类型" readonly required is-link
|
||||
:rules="[{ required: true, message: '请选择立案类型' }]"
|
||||
@click="openHistoryLayer('type-picker')"></van-field>
|
||||
</template>
|
||||
<section class="proposal-view-card">
|
||||
<h2 class="proposal-view-card__title">
|
||||
审批意见
|
||||
<span class="proposal-audit-card__required">*</span>
|
||||
</h2>
|
||||
<van-field v-model="formData.opinion" class="proposal-audit-field" name="opinion"
|
||||
type="textarea" rows="6" label="" placeholder="请输入审批意见"
|
||||
required maxlength="100" show-word-limit
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"></van-field>
|
||||
</section>
|
||||
</van-form>
|
||||
<div class="proposal-popup-form-actions">
|
||||
<van-button block :disabled="formLoading" @click="closeHistoryLayer('detail')">取消</van-button>
|
||||
<van-button type="primary" block :loading="formLoading" class="proposal-soft-button" @click="submitApproval">提交</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
</div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
</van-popup>
|
||||
|
||||
<van-popup v-model="showCaseFilingResultPicker" position="bottom" :close-on-click-overlay="false">
|
||||
<van-picker show-toolbar
|
||||
:columns="dict.type.PROPOSAL_CASE_FILING_RESULT.map(item => ({text: item.label, value: item.code}))"
|
||||
@confirm="onCaseFilingResultConfirm"
|
||||
@cancel="closeHistoryLayer('result-picker')"></van-picker>
|
||||
</van-popup>
|
||||
<van-popup v-model="showCaseFilingTypePicker" position="bottom" :close-on-click-overlay="false">
|
||||
<van-picker show-toolbar
|
||||
:columns="dict.type.PROPOSAL_CASE_FILING_TYPE.map(item => ({text: item.label, value: item.code}))"
|
||||
@confirm="onCaseFilingTypeConfirm"
|
||||
@cancel="closeHistoryLayer('type-picker')"></van-picker>
|
||||
</van-popup>
|
||||
<van-dialog :value="submitConfirmVisible" title="提示" message="您确定要提交吗?" show-cancel-button
|
||||
@confirm="confirmApproval" @cancel="closeHistoryLayer('submit-confirm')"></van-dialog>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ["PROPOSAL_CASE_FILING_RESULT", "PROPOSAL_CASE_FILING_TYPE"],
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
@@ -134,88 +173,133 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
sessionOptions: [],
|
||||
filterOpened: false,
|
||||
approvalOptions: [
|
||||
{text: "未审核", value: "0"},
|
||||
{text: "已审核", value: "1"}
|
||||
],
|
||||
detailVisible: false,
|
||||
detailBizId: "",
|
||||
popupAction: "view",
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
|
||||
formLoading: false,
|
||||
showCaseFilingResultPicker: false,
|
||||
showCaseFilingTypePicker: false
|
||||
showCaseFilingTypePicker: false,
|
||||
submitConfirmVisible: false,
|
||||
historyLayerPageKey: "proposal-commissioner-h5"
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
computed: {
|
||||
isApproval() {
|
||||
return this.popupAction === "approval"
|
||||
},
|
||||
popupTitle() {
|
||||
return this.isApproval ? "委员会成员意见" : "提案详情"
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
registerHistoryLayers() {
|
||||
if (!window.h5HistoryLayerManager) return
|
||||
window.h5HistoryLayerManager.register(this.historyLayerPageKey, (stack) => {
|
||||
this.$set(this, "detailVisible", stack.includes("detail"))
|
||||
this.$set(this, "showCaseFilingResultPicker", stack.includes("result-picker"))
|
||||
this.$set(this, "showCaseFilingTypePicker", stack.includes("type-picker"))
|
||||
this.$set(this, "submitConfirmVisible", stack.includes("submit-confirm"))
|
||||
})
|
||||
},
|
||||
openHistoryLayer(layerName) {
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open(layerName)) return
|
||||
this.setHistoryLayerVisible(layerName, true)
|
||||
},
|
||||
closeHistoryLayer(layerName, afterClose = null) {
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.close(layerName, afterClose)) return
|
||||
this.setHistoryLayerVisible(layerName, false)
|
||||
if (typeof afterClose === "function") afterClose()
|
||||
},
|
||||
setHistoryLayerVisible(layerName, visible) {
|
||||
if (layerName === "detail") this.$set(this, "detailVisible", visible)
|
||||
if (layerName === "result-picker") this.$set(this, "showCaseFilingResultPicker", visible)
|
||||
if (layerName === "type-picker") this.$set(this, "showCaseFilingTypePicker", visible)
|
||||
if (layerName === "submit-confirm") this.$set(this, "submitConfirmVisible", visible)
|
||||
},
|
||||
handlePageBack() {
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.stack.length) {
|
||||
window.h5HistoryLayerManager.close()
|
||||
return
|
||||
}
|
||||
this.historyBack()
|
||||
},
|
||||
setFilterOpened(value) {
|
||||
this.$set(this, "filterOpened", value)
|
||||
},
|
||||
onReady() {
|
||||
this.listSession()
|
||||
},
|
||||
// 审核状态下拉框使用字符串值展示,查询接口使用布尔值区分已审核和未审核。
|
||||
approvalChange(value) {
|
||||
this.$set(this.pageForm, "approval", value === "1")
|
||||
this.doSearch()
|
||||
},
|
||||
listSession() {
|
||||
this.$axios.post("/platform/proposal/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = [
|
||||
this.$set(this, "sessionOptions", [
|
||||
{
|
||||
text: "全部届次",
|
||||
value: null
|
||||
}
|
||||
].concat(res.data.map((v) => ({text: v.fullName, value: v.id})))
|
||||
].concat(res.data.map((v) => ({text: v.fullName, value: v.id}))))
|
||||
// 届次接口按开始时间倒序返回,首条即最新届次;无届次时继续按全部届次查询。
|
||||
if (res.data && res.data.length > 0) {
|
||||
this.$set(this.pageForm, "sessionId", res.data[0].id)
|
||||
}
|
||||
this.$set(this.pageForm, "sessionId", res.data.length > 0 ? res.data[0].id : null)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
},
|
||||
|
||||
// 确定立案类型
|
||||
onCaseFilingResultConfirm(value) {
|
||||
this.$set(this.formData, "caseFilingResultName", value.text)
|
||||
this.$set(this.formData, "caseFilingResult", value.value)
|
||||
this.showCaseFilingResultPicker = false
|
||||
},
|
||||
|
||||
// 确定立案类型
|
||||
onCaseFilingTypeConfirm(value) {
|
||||
this.$set(this.formData, "caseFilingTypeName", value.text)
|
||||
this.$set(this.formData, "caseFilingType", value.value)
|
||||
this.showCaseFilingTypePicker = false
|
||||
this.$set(this, "detailBizId", row.id)
|
||||
this.$set(this, "popupAction", "view")
|
||||
this.$set(this, "formData", {})
|
||||
this.openHistoryLayer("detail")
|
||||
},
|
||||
|
||||
onApproval(row) {
|
||||
this.showApprovalForm = true
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
this.formData = {
|
||||
this.$set(this, "detailBizId", row.id)
|
||||
this.$set(this, "popupAction", "approval")
|
||||
this.$set(this, "formData", {
|
||||
proposalId: row.id,
|
||||
caseFilingResult: null,
|
||||
caseFilingType: null,
|
||||
opinion: null
|
||||
}
|
||||
})
|
||||
this.openHistoryLayer("detail")
|
||||
},
|
||||
|
||||
async doSubmit() {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: "您确定要提交吗?",
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/proposal/commissioner/doApproval', this.formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
onCaseFilingResultConfirm(value) {
|
||||
this.$set(this.formData, "caseFilingResultName", value.text)
|
||||
this.$set(this.formData, "caseFilingResult", value.value)
|
||||
this.closeHistoryLayer("result-picker")
|
||||
},
|
||||
onCaseFilingTypeConfirm(value) {
|
||||
this.$set(this.formData, "caseFilingTypeName", value.text)
|
||||
this.$set(this.formData, "caseFilingType", value.value)
|
||||
this.closeHistoryLayer("type-picker")
|
||||
},
|
||||
submitApproval() {
|
||||
this.$refs.formRef.validate().then(() => this.openHistoryLayer("submit-confirm")).catch(() => {})
|
||||
},
|
||||
confirmApproval() {
|
||||
this.closeHistoryLayer("submit-confirm", () => this.doSubmitApproval())
|
||||
},
|
||||
doSubmitApproval() {
|
||||
this.$set(this, "formLoading", true)
|
||||
this.$axios.post("/platform/proposal/commissioner/doApproval", this.formData)
|
||||
.then((res) => {
|
||||
if (res && res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.closeHistoryLayer("detail", () => this.doSearch())
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
.finally(() => this.$set(this, "formLoading", false))
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
@@ -225,6 +309,12 @@ layout("/layouts/platform_h5.html"){
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.registerHistoryLayers()
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (window.h5HistoryLayerManager) window.h5HistoryLayerManager.unregister(this.historyLayerPageKey)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+357
-126
@@ -1,90 +1,345 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style>
|
||||
body {
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-delegation-page {
|
||||
min-height: 100vh;
|
||||
padding-bottom: calc(24px + env(safe-area-inset-bottom));
|
||||
box-sizing: border-box;
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-delegation-page .van-nav-bar {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.proposal-delegation-page .van-nav-bar__title {
|
||||
color: #172033;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.proposal-delegation-page .van-nav-bar .van-icon,
|
||||
.proposal-delegation-page .van-nav-bar__text {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
.proposal-delegation-content {
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.proposal-delegation-sticky {
|
||||
padding: 22px 12px 1px;
|
||||
box-sizing: border-box;
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-delegation-search {
|
||||
margin: 0 0 8px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
border-radius: 12px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 5px 16px rgba(43, 73, 112, .1);
|
||||
}
|
||||
|
||||
.proposal-delegation-search .van-search__content {
|
||||
height: 42px;
|
||||
padding-left: 12px;
|
||||
align-items: center;
|
||||
border-radius: 12px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.proposal-delegation-search .van-field__control {
|
||||
color: #263548;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.proposal-delegation-search .van-field__control::placeholder {
|
||||
color: #a7b0bf;
|
||||
}
|
||||
|
||||
.proposal-delegation-filter {
|
||||
margin: 0 0 10px;
|
||||
overflow: hidden;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 5px 16px rgba(43, 73, 112, .08);
|
||||
transition: border-radius .18s ease;
|
||||
}
|
||||
|
||||
.proposal-delegation-filter.is-open {
|
||||
border-radius: 10px 10px 0 0;
|
||||
}
|
||||
|
||||
.proposal-delegation-filter .van-dropdown-menu__bar,
|
||||
.proposal-delegation-filter .van-dropdown-menu__item,
|
||||
.proposal-delegation-filter .van-dropdown-menu__title {
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
.proposal-delegation-filter .van-dropdown-menu__bar {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.proposal-delegation-filter .van-dropdown-menu__item,
|
||||
.proposal-delegation-filter .van-dropdown-menu__title {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.proposal-delegation-filter .van-dropdown-menu__item {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.proposal-delegation-filter .van-dropdown-menu__title {
|
||||
display: inline-flex;
|
||||
color: #66758a;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.proposal-delegation-filter .van-dropdown-menu__title--active,
|
||||
.proposal-delegation-filter .van-dropdown-item__option--active,
|
||||
.proposal-delegation-filter .van-dropdown-item__option--active .van-dropdown-item__icon {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
.proposal-delegation-filter .van-dropdown-menu__title--down::after {
|
||||
border-color: transparent transparent #1989fa #1989fa;
|
||||
}
|
||||
|
||||
.proposal-delegation-filter .van-dropdown-item__content {
|
||||
width: calc(100% - 24px);
|
||||
margin: 0 12px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
border-radius: 0 0 12px 12px;
|
||||
box-shadow: 0 10px 24px rgba(31, 65, 108, .14);
|
||||
}
|
||||
|
||||
.proposal-delegation-filter .van-dropdown-item__option {
|
||||
display: flex;
|
||||
min-height: 48px;
|
||||
padding: 0 16px;
|
||||
align-items: center;
|
||||
color: #46566c;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.proposal-delegation-filter .van-cell::after {
|
||||
right: 16px;
|
||||
left: 16px;
|
||||
}
|
||||
|
||||
.proposal-delegation-list .empty-state {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.proposal-delegation-empty {
|
||||
display: flex;
|
||||
min-height: 280px;
|
||||
padding: 46px 18px 36px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.proposal-delegation-empty img {
|
||||
display: block;
|
||||
width: 86%;
|
||||
max-width: 290px;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.proposal-delegation-empty__title {
|
||||
margin-top: 14px;
|
||||
color: #50627a;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.proposal-delegation-empty__hint {
|
||||
margin-top: 5px;
|
||||
color: #9aa7b8;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.proposal-delegation-card-header {
|
||||
display: flex;
|
||||
margin-bottom: 7px;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.proposal-delegation-card-heading {
|
||||
min-width: 0;
|
||||
padding-right: 10px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.proposal-delegation-card-title {
|
||||
overflow: hidden;
|
||||
color: #253247;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
font-weight: 600;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.proposal-delegation-card-code {
|
||||
margin-top: 1px;
|
||||
color: #9ba6b6;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.proposal-delegation-status {
|
||||
display: inline-flex;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.proposal-delegation-status .van-tag {
|
||||
display: inline-flex;
|
||||
min-height: 24px;
|
||||
padding: 3px 9px;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
border: 0;
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@media (max-width: 350px) {
|
||||
.proposal-delegation-content,
|
||||
.proposal-delegation-sticky {
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style id="style-proposal-task-popup-h5">
|
||||
<!--#include("../../common/info.css"){}#-->
|
||||
<!--#include("../theme.css"){}#-->
|
||||
</style>
|
||||
<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
|
||||
v-model="pageForm.name"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入提案名称搜索"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionOptions" :multiple="false"
|
||||
@change="doSearch"></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>
|
||||
<div class="proposal-delegation-page">
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="团长审核" placeholder fixed></van-nav-bar>
|
||||
<van-sticky :offset-top="46">
|
||||
<div class="proposal-delegation-sticky">
|
||||
<van-search
|
||||
v-model="pageForm.name"
|
||||
class="proposal-delegation-search"
|
||||
placeholder="请输入提案名称搜索"
|
||||
shape="round"
|
||||
clearable
|
||||
@search="doSearch"
|
||||
@clear="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu
|
||||
class="proposal-delegation-filter"
|
||||
:class="{'is-open': filterOpened}"
|
||||
active-color="#1989fa"
|
||||
>
|
||||
<van-dropdown-item
|
||||
v-model="pageForm.sessionId"
|
||||
:options="sessionOptions"
|
||||
:multiple="false"
|
||||
@change="doSearch"
|
||||
@open="filterOpened = true"
|
||||
@close="filterOpened = false"
|
||||
></van-dropdown-item>
|
||||
<van-dropdown-item
|
||||
v-model="pageForm.approvalText"
|
||||
:options="approvalOptions"
|
||||
:multiple="false"
|
||||
@change="approvalChange"
|
||||
@open="filterOpened = true"
|
||||
@close="filterOpened = false"
|
||||
></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/proposal/delegation/pageData" :page_form.sync="pageForm" @ready="onReady"
|
||||
ref="tableListRef"
|
||||
title="name">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="提案编号">{{row.code}}</table-column>
|
||||
<table-column label="提案类别">{{row.typeName}}</table-column>
|
||||
<table-column label="提案人">{{row.createUserName}}</table-column>
|
||||
<table-column label="代表团">{{row.delegationName}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
<main class="proposal-delegation-content">
|
||||
<div class="proposal-delegation-list">
|
||||
<!-- 列表无记录时使用与“我的提案”一致的提案专用空状态。 -->
|
||||
<div v-if="pageForm.totalCount === 0" class="proposal-delegation-empty">
|
||||
<img src="/assets/mobile/img/proposal/proposal-empty.png" alt="暂无提案记录插画">
|
||||
<div class="proposal-delegation-empty__title">暂无提案记录</div>
|
||||
<div class="proposal-delegation-empty__hint">当前筛选条件下暂时没有提案</div>
|
||||
</div>
|
||||
<table-list api="/platform/proposal/delegation/pageData" :page_form.sync="pageForm" @ready="onReady"
|
||||
ref="tableListRef"
|
||||
title="name">
|
||||
<template #header="{index,row}">
|
||||
<div class="proposal-delegation-card-header">
|
||||
<div class="proposal-delegation-card-heading">
|
||||
<div class="proposal-delegation-card-title">{{row.name}}</div>
|
||||
<div class="proposal-delegation-card-code">编号:{{row.code || '--'}}</div>
|
||||
</div>
|
||||
<enum-tag
|
||||
class="proposal-delegation-status"
|
||||
v-if="row.instanceState"
|
||||
:value="row.instanceState"
|
||||
name="ProcessInstanceStateEnum"
|
||||
label_key="message"
|
||||
size="small"
|
||||
></enum-tag>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="提案类别">{{row.typeName || '--'}}</table-column>
|
||||
<table-column label="提案人">{{row.createUserName || '--'}}</table-column>
|
||||
<table-column label="代表团">{{row.delegationName || '--'}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName || '--'}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row,index)">
|
||||
<van-icon class="proposal-action-icon" name="eye-o"></van-icon>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row,index)">
|
||||
<van-icon class="proposal-action-icon" name="edit"></van-icon>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<van-icon class="proposal-action-icon" name="revoke"></van-icon>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-reply"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<proposal-info ref="proposalInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.taskName}}</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
name="tf_opinion"
|
||||
label="审批意见"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(2)">不同意</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
<proposal-task-popup ref="taskPopup" kind="delegation" page-key="proposal-delegation-task" @success="doSearch"></proposal-task-popup>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
<!--#include("../../common/task-popup.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {"proposal-task-popup": PROPOSAL_TASK_POPUP},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
name: null,
|
||||
sessionId: null,
|
||||
approvalText: "0",
|
||||
@@ -92,74 +347,40 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
sessionOptions: [],
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
filterOpened: false,
|
||||
approvalOptions: [
|
||||
{text: "未审核", value: "0"},
|
||||
{text: "已审核", value: "1"}
|
||||
],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
methods: {
|
||||
onReady() {
|
||||
this.listSession()
|
||||
this.listSession(false)
|
||||
},
|
||||
listSession() {
|
||||
// 审核状态下拉框使用字符串值展示,查询接口使用布尔值区分已审核和未审核。
|
||||
approvalChange(value) {
|
||||
this.$set(this.pageForm, "approval", value === "1")
|
||||
this.doSearch()
|
||||
},
|
||||
listSession(skipDefaultSearch) {
|
||||
this.$axios.post("/platform/proposal/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = [
|
||||
{
|
||||
text: "全部届次",
|
||||
value: null
|
||||
}
|
||||
].concat(res.data.map((v) => ({text: v.fullName, value: v.id})))
|
||||
// 届次接口按开始时间倒序返回,首条即最新届次;无届次时继续按全部届次查询。
|
||||
if (res.data && res.data.length > 0) {
|
||||
this.$set(this.pageForm, "sessionId", res.data[0].id)
|
||||
}
|
||||
this.sessionOptions = [{text: "全部届次", value: null}]
|
||||
.concat(res.data.map((v) => ({text: v.fullName, value: v.id})))
|
||||
if (skipDefaultSearch) return
|
||||
this.$set(this.pageForm, "sessionId", res.data.length > 0 ? res.data[0].id : null)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
onView(row, index) {
|
||||
this.$refs.taskPopup.open(row, "view")
|
||||
},
|
||||
|
||||
onApproval(row) {
|
||||
this.showApprovalForm = true
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
onApproval(row, index) {
|
||||
this.$refs.taskPopup.open(row, "approval")
|
||||
},
|
||||
|
||||
onRevoke(row){
|
||||
@@ -178,11 +399,21 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$set(this.pageForm, "pageNumber", 1)
|
||||
this.$set(this.pageForm, "totalCount", 0)
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
const tab = new URLSearchParams(window.location.search).get("tab")
|
||||
if (tab === "done") {
|
||||
this.$set(this.pageForm, "approval", true)
|
||||
this.$set(this.pageForm, "approvalText", "1")
|
||||
} else if (tab === "todo") {
|
||||
this.$set(this.pageForm, "approval", false)
|
||||
this.$set(this.pageForm, "approvalText", "0")
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+360
-202
@@ -1,244 +1,392 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style>
|
||||
body {
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-page {
|
||||
min-height: 100vh;
|
||||
padding-bottom: calc(24px + env(safe-area-inset-bottom));
|
||||
box-sizing: border-box;
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-page .van-nav-bar {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-page .van-nav-bar__title {
|
||||
color: #172033;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-page .van-nav-bar .van-icon,
|
||||
.proposal-feedback-evaluation-page .van-nav-bar__text {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-content {
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-sticky {
|
||||
padding: 22px 12px 1px;
|
||||
box-sizing: border-box;
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-search {
|
||||
margin: 0 0 8px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
border-radius: 12px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 5px 16px rgba(43, 73, 112, .1);
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-search .van-search__content {
|
||||
height: 42px;
|
||||
padding-left: 12px;
|
||||
align-items: center;
|
||||
border-radius: 12px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-search .van-field__control {
|
||||
color: #263548;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-search .van-field__control::placeholder {
|
||||
color: #a7b0bf;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-filter {
|
||||
margin: 0 0 10px;
|
||||
overflow: hidden;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 5px 16px rgba(43, 73, 112, .08);
|
||||
transition: border-radius .18s ease;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-filter.is-open {
|
||||
border-radius: 10px 10px 0 0;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-filter .van-dropdown-menu__bar,
|
||||
.proposal-feedback-evaluation-filter .van-dropdown-menu__item,
|
||||
.proposal-feedback-evaluation-filter .van-dropdown-menu__title {
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-filter .van-dropdown-menu__bar {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-filter .van-dropdown-menu__item,
|
||||
.proposal-feedback-evaluation-filter .van-dropdown-menu__title {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-filter .van-dropdown-menu__item {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-filter .van-dropdown-menu__title {
|
||||
display: inline-flex;
|
||||
color: #66758a;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-filter .van-dropdown-menu__title--active,
|
||||
.proposal-feedback-evaluation-filter .van-dropdown-item__option--active,
|
||||
.proposal-feedback-evaluation-filter .van-dropdown-item__option--active .van-dropdown-item__icon {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-filter .van-dropdown-menu__title--down::after {
|
||||
border-color: transparent transparent #1989fa #1989fa;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-filter .van-dropdown-item__content {
|
||||
width: calc(100% - 24px);
|
||||
margin: 0 12px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
border-radius: 0 0 12px 12px;
|
||||
box-shadow: 0 10px 24px rgba(31, 65, 108, .14);
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-filter .van-dropdown-item__option {
|
||||
display: flex;
|
||||
min-height: 48px;
|
||||
padding: 0 16px;
|
||||
align-items: center;
|
||||
color: #46566c;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-filter .van-cell::after {
|
||||
right: 16px;
|
||||
left: 16px;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-list .empty-state {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-empty {
|
||||
display: flex;
|
||||
min-height: 280px;
|
||||
padding: 46px 18px 36px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-empty img {
|
||||
display: block;
|
||||
width: 86%;
|
||||
max-width: 290px;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-empty__title {
|
||||
margin-top: 14px;
|
||||
color: #50627a;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-empty__hint {
|
||||
margin-top: 5px;
|
||||
color: #9aa7b8;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-card-header {
|
||||
display: flex;
|
||||
margin-bottom: 7px;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-card-heading {
|
||||
min-width: 0;
|
||||
padding-right: 10px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-card-title {
|
||||
overflow: hidden;
|
||||
color: #253247;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
font-weight: 600;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-card-code {
|
||||
margin-top: 1px;
|
||||
color: #9ba6b6;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-status {
|
||||
display: inline-flex;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.proposal-feedback-evaluation-status .van-tag {
|
||||
display: inline-flex;
|
||||
min-height: 24px;
|
||||
padding: 3px 9px;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
border: 0;
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@media (max-width: 350px) {
|
||||
.proposal-feedback-evaluation-content,
|
||||
.proposal-feedback-evaluation-sticky {
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style id="style-proposal-task-popup-h5">
|
||||
<!--#include("../../common/info.css"){}#-->
|
||||
<!--#include("../theme.css"){}#-->
|
||||
</style>
|
||||
<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
|
||||
v-model="pageForm.name"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入提案名称搜索"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionOptions" :multiple="false"
|
||||
@change="doSearch"></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>
|
||||
|
||||
<table-list api="/platform/proposal/feedbackEvaluation/pageData" :page_form.sync="pageForm" @ready="onReady"
|
||||
ref="tableListRef"
|
||||
title="name">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="提案编号">{{row.code}}</table-column>
|
||||
<table-column label="提案类别">{{row.typeName}}</table-column>
|
||||
<table-column label="提案人">{{row.createUserName}}</table-column>
|
||||
<table-column label="代表团">{{row.delegationName}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
<div class="proposal-feedback-evaluation-page">
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="反馈评价" placeholder fixed></van-nav-bar>
|
||||
<van-sticky :offset-top="46">
|
||||
<div class="proposal-feedback-evaluation-sticky">
|
||||
<van-search
|
||||
v-model="pageForm.name"
|
||||
class="proposal-feedback-evaluation-search"
|
||||
placeholder="请输入提案名称搜索"
|
||||
shape="round"
|
||||
clearable
|
||||
@search="doSearch"
|
||||
@clear="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu
|
||||
class="proposal-feedback-evaluation-filter"
|
||||
:class="{'is-open': filterOpened}"
|
||||
active-color="#1989fa"
|
||||
>
|
||||
<van-dropdown-item
|
||||
v-model="pageForm.sessionId"
|
||||
:options="sessionOptions"
|
||||
:multiple="false"
|
||||
@change="doSearch"
|
||||
@open="filterOpened = true"
|
||||
@close="filterOpened = false"
|
||||
></van-dropdown-item>
|
||||
<van-dropdown-item
|
||||
v-model="pageForm.approvalText"
|
||||
:options="approvalOptions"
|
||||
:multiple="false"
|
||||
@change="approvalChange"
|
||||
@open="filterOpened = true"
|
||||
@close="filterOpened = false"
|
||||
></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>评价</span>
|
||||
</van-sticky>
|
||||
|
||||
<main class="proposal-feedback-evaluation-content">
|
||||
<div class="proposal-feedback-evaluation-list">
|
||||
<!-- 列表无记录时使用与团长审核一致的提案专用空状态。 -->
|
||||
<div v-if="pageForm.totalCount === 0" class="proposal-feedback-evaluation-empty">
|
||||
<img src="/assets/mobile/img/proposal/proposal-empty.png" alt="暂无提案记录插画">
|
||||
<div class="proposal-feedback-evaluation-empty__title">暂无提案记录</div>
|
||||
<div class="proposal-feedback-evaluation-empty__hint">当前筛选条件下暂时没有提案</div>
|
||||
</div>
|
||||
<table-list api="/platform/proposal/feedbackEvaluation/pageData" :page_form.sync="pageForm" @ready="onReady"
|
||||
ref="tableListRef"
|
||||
title="name">
|
||||
<template #header="{index,row}">
|
||||
<div class="proposal-feedback-evaluation-card-header">
|
||||
<div class="proposal-feedback-evaluation-card-heading">
|
||||
<div class="proposal-feedback-evaluation-card-title">{{row.name}}</div>
|
||||
<div class="proposal-feedback-evaluation-card-code">编号:{{row.code || '--'}}</div>
|
||||
</div>
|
||||
<enum-tag
|
||||
class="proposal-feedback-evaluation-status"
|
||||
v-if="row.instanceState"
|
||||
:value="row.instanceState"
|
||||
name="ProcessInstanceStateEnum"
|
||||
label_key="message"
|
||||
size="small"
|
||||
></enum-tag>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="提案类别">{{row.typeName || '--'}}</table-column>
|
||||
<table-column label="提案人">{{row.createUserName || '--'}}</table-column>
|
||||
<table-column label="代表团">{{row.delegationName || '--'}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName || '--'}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row,index)">
|
||||
<van-icon class="proposal-action-icon" name="eye-o"></van-icon>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row,index)">
|
||||
<van-icon class="proposal-action-icon" name="edit"></van-icon>
|
||||
<span>评价</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<van-icon class="proposal-action-icon" name="revoke"></van-icon>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-reply"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<proposal-info ref="proposalInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.taskName}}</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.tf_feedback_name"
|
||||
name="tf_feedback_name"
|
||||
label="满意度"
|
||||
placeholder="请选择满意度"
|
||||
:rules="[{ required: true, message: '请选择满意度' }]"
|
||||
required
|
||||
is-link
|
||||
@click="showFeedBackPicker = true"
|
||||
></van-field>
|
||||
<van-popup v-model="showFeedBackPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="dict.type.PROPOSAL_FEEDBACK.map(item => ({text: item.label, value: item.code}))"
|
||||
@confirm="onFeedBackConfirm"
|
||||
@cancel="showFeedBackPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
name="tf_opinion"
|
||||
label="反馈意见"
|
||||
placeholder="请输入反馈意见"
|
||||
:rules="[{ required: true, message: '请填写反馈意见' }]"
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
|
||||
<template v-if="['SATISFIED','FAIRLY_SATISFIED'].includes(formData.tf_feedback)">
|
||||
<van-field
|
||||
v-model="formData.tf_address"
|
||||
name="tf_address"
|
||||
label="通讯地址"
|
||||
placeholder="请输入通讯地址"
|
||||
:rules="[{ required: true, message: '请输入通讯地址' }]"
|
||||
required
|
||||
show-word-limit
|
||||
></van-field>
|
||||
<!--联系电话-->
|
||||
<van-field
|
||||
v-model="formData.tf_phone"
|
||||
name="tf_phone"
|
||||
label="联系电话"
|
||||
placeholder="请输入联系电话"
|
||||
:rules="[{ required: true, message: '请输入联系电话' }]"
|
||||
required
|
||||
show-word-limit
|
||||
></van-field>
|
||||
<!--邮政编码-->
|
||||
<van-field
|
||||
v-model="formData.tf_postcode"
|
||||
name="tf_postcode"
|
||||
label="邮政编码"
|
||||
placeholder="请输入邮政编码"
|
||||
:rules="[{ required: true, message: '请输入邮政编码' }]"
|
||||
required
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</template>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">提交</van-button>
|
||||
<van-button type="danger" block @click="$refs.proposalInfoRef.onClose()">取消</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<proposal-task-popup ref="taskPopup" kind="feedbackEvaluation" page-key="proposal-feedback-task" @success="doSearch"></proposal-task-popup>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
<!--#include("../../common/task-popup.js"){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
dicts: ["PROPOSAL_FEEDBACK"],
|
||||
store,
|
||||
components: {"proposal-task-popup": PROPOSAL_TASK_POPUP},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
name: null,
|
||||
sessionId: null,
|
||||
approvalText: "0",
|
||||
approval: false
|
||||
},
|
||||
|
||||
sessionOptions: [],
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
|
||||
showFeedBackPicker: false
|
||||
filterOpened: false,
|
||||
approvalOptions: [
|
||||
{text: "未评价", value: "0"},
|
||||
{text: "已评价", value: "1"}
|
||||
],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
methods: {
|
||||
onReady() {
|
||||
this.listSession()
|
||||
this.listSession(false)
|
||||
},
|
||||
listSession() {
|
||||
|
||||
// 评价状态下拉框使用字符串值展示,查询接口使用布尔值区分已评价和未评价。
|
||||
approvalChange(value) {
|
||||
this.$set(this.pageForm, "approval", value === "1")
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
// 缓存恢复时只加载届次选项,不覆盖离开列表前的筛选条件和列表快照。
|
||||
listSession(skipDefaultSearch) {
|
||||
this.$axios.post("/platform/proposal/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = [
|
||||
{
|
||||
text: "全部届次",
|
||||
value: null
|
||||
}
|
||||
].concat(res.data.map((v) => ({text: v.fullName, value: v.id})))
|
||||
this.sessionOptions = [{text: "全部届次", value: null}]
|
||||
.concat(res.data.map((item) => ({text: item.fullName, value: item.id})))
|
||||
if (skipDefaultSearch) return
|
||||
// 届次接口按开始时间倒序返回,首条即最新届次;无届次时继续按全部届次查询。
|
||||
if (res.data && res.data.length > 0) {
|
||||
this.$set(this.pageForm, "sessionId", res.data[0].id)
|
||||
}
|
||||
this.$set(this.pageForm, "sessionId", res.data.length > 0 ? res.data[0].id : null)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
onView(row, index) {
|
||||
this.$refs.taskPopup.open(row, "view")
|
||||
},
|
||||
|
||||
onApproval(row) {
|
||||
this.showApprovalForm = true
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName,
|
||||
instanceId: row.instanceId
|
||||
}
|
||||
onApproval(row, index) {
|
||||
this.$refs.taskPopup.open(row, "approval")
|
||||
},
|
||||
|
||||
onFeedBackConfirm({value, text}) {
|
||||
this.formData.tf_feedback_name = text
|
||||
this.formData.tf_feedback = value
|
||||
this.showFeedBackPicker = false
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(async () => {
|
||||
debugger
|
||||
const formData = {
|
||||
...this.formData,
|
||||
submitType: val
|
||||
}
|
||||
// 不满意
|
||||
if (this.formData.tf_feedback === 'DISSATISFIED') {
|
||||
const caseInfo = await this.getCaseInfo(this.formData.instanceId)
|
||||
formData.tf_masterUnitId = caseInfo.tf_masterUnitId
|
||||
}
|
||||
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify(formData)
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
},
|
||||
// 获取立案信息
|
||||
async getCaseInfo(instId) {
|
||||
const {
|
||||
data,
|
||||
code
|
||||
} = await this.$axios.post('/platform/proposal/feedbackEvaluation/caseInfo', {instId})
|
||||
if (code === 0) {
|
||||
return data
|
||||
}
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
@@ -255,11 +403,21 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$set(this.pageForm, "pageNumber", 1)
|
||||
this.$set(this.pageForm, "totalCount", 0)
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const tab = new URLSearchParams(window.location.search).get("tab")
|
||||
if (tab === "done") {
|
||||
this.$set(this.pageForm, "approval", true)
|
||||
this.$set(this.pageForm, "approvalText", "1")
|
||||
} else if (tab === "todo") {
|
||||
this.$set(this.pageForm, "approval", false)
|
||||
this.$set(this.pageForm, "approvalText", "0")
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+526
-66
@@ -1,63 +1,456 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style>
|
||||
<!--#include("../../common/info.css"){}#-->
|
||||
<!--#include("../theme.css"){}#-->
|
||||
|
||||
body {
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-mine-page {
|
||||
min-height: 100vh;
|
||||
padding-bottom: calc(24px + env(safe-area-inset-bottom));
|
||||
box-sizing: border-box;
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-mine-page .van-nav-bar {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.proposal-mine-page .van-nav-bar__title {
|
||||
color: #172033;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.proposal-mine-page .van-nav-bar .van-icon,
|
||||
.proposal-mine-page .van-nav-bar__text {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
.proposal-mine-popup {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-mine-popup .van-nav-bar {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.proposal-mine-popup .van-nav-bar .van-icon,
|
||||
.proposal-mine-popup .van-nav-bar__text {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
/* 详情弹框复用项目全屏 Popup 的固定导航结构,内容区域单独滚动。 */
|
||||
.proposal-detail-popup {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.proposal-detail-popup-page {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
padding-top: 46px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.proposal-detail-popup-page .van-nav-bar {
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.proposal-detail-scroll {
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.proposal-detail-scroll .proposal-view-main {
|
||||
padding-top: 18px;
|
||||
}
|
||||
|
||||
.proposal-mine-content {
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.proposal-mine-sticky {
|
||||
padding: 22px 12px 1px;
|
||||
box-sizing: border-box;
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-mine-search {
|
||||
margin: 0 0 8px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
border-radius: 12px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 5px 16px rgba(43, 73, 112, .1);
|
||||
}
|
||||
|
||||
.proposal-mine-search .van-search__content {
|
||||
height: 42px;
|
||||
padding-left: 12px;
|
||||
align-items: center;
|
||||
border-radius: 12px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.proposal-mine-search .van-field__control {
|
||||
color: #263548;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.proposal-mine-search .van-field__control::placeholder {
|
||||
color: #a7b0bf;
|
||||
}
|
||||
|
||||
.proposal-mine-filter {
|
||||
margin: 0 0 10px;
|
||||
overflow: hidden;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 5px 16px rgba(43, 73, 112, .08);
|
||||
transition: border-radius .18s ease;
|
||||
}
|
||||
|
||||
.proposal-mine-filter.is-open {
|
||||
border-radius: 10px 10px 0 0;
|
||||
}
|
||||
|
||||
.proposal-mine-filter .van-dropdown-menu__bar {
|
||||
height: 44px;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.proposal-mine-filter .van-dropdown-menu__item {
|
||||
height: 44px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.proposal-mine-filter .van-dropdown-menu__title {
|
||||
display: inline-flex;
|
||||
height: 44px;
|
||||
align-items: center;
|
||||
line-height: 20px;
|
||||
color: #66758a;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.proposal-mine-filter .van-dropdown-menu__title--active,
|
||||
.proposal-mine-filter .van-dropdown-item__option--active,
|
||||
.proposal-mine-filter .van-dropdown-item__option--active .van-dropdown-item__icon {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
.proposal-mine-filter .van-dropdown-item__content {
|
||||
width: calc(100% - 24px);
|
||||
margin: 0 12px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
border-radius: 0 0 12px 12px;
|
||||
box-shadow: 0 10px 24px rgba(31, 65, 108, .14);
|
||||
}
|
||||
|
||||
.proposal-mine-filter .van-dropdown-item__option {
|
||||
display: flex;
|
||||
min-height: 48px;
|
||||
padding: 0 16px;
|
||||
align-items: center;
|
||||
color: #46566c;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.proposal-mine-filter .van-dropdown-item__option .van-cell__title {
|
||||
display: flex;
|
||||
min-height: 20px;
|
||||
align-items: center;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.proposal-mine-list {
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
.proposal-mine-list .empty-state {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.proposal-mine-empty {
|
||||
display: flex;
|
||||
min-height: 280px;
|
||||
padding: 46px 18px 36px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.proposal-mine-empty img {
|
||||
display: block;
|
||||
width: 86%;
|
||||
max-width: 290px;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.proposal-mine-empty__title {
|
||||
margin-top: 14px;
|
||||
color: #50627a;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.proposal-mine-empty__hint {
|
||||
margin-top: 5px;
|
||||
color: #9aa7b8;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.proposal-invite-empty {
|
||||
display: flex;
|
||||
min-height: 300px;
|
||||
padding: 40px 18px 36px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.proposal-invite-empty img {
|
||||
display: block;
|
||||
width: 82%;
|
||||
max-width: 270px;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.proposal-invite-empty__title {
|
||||
margin-top: 14px;
|
||||
color: #50627a;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.proposal-invite-empty__hint {
|
||||
margin-top: 5px;
|
||||
color: #9aa7b8;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.proposal-card-header {
|
||||
display: flex;
|
||||
margin-bottom: 7px;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.proposal-card-heading {
|
||||
min-width: 0;
|
||||
padding-right: 10px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.proposal-card-title {
|
||||
overflow: hidden;
|
||||
color: #253247;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
font-weight: 600;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.proposal-card-code {
|
||||
margin-top: 1px;
|
||||
color: #9ba6b6;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.proposal-card-status {
|
||||
display: inline-flex;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.proposal-card-status .van-tag,
|
||||
.proposal-card-status--plain {
|
||||
display: inline-flex;
|
||||
min-height: 24px;
|
||||
padding: 3px 9px;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
border: 0;
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.proposal-card-status--plain {
|
||||
color: #1989fa;
|
||||
background-color: #eaf4ff;
|
||||
}
|
||||
|
||||
.proposal-mine-page .table-list-container .table-list-item .action-btn .van-icon {
|
||||
margin-right: 6px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
@media (max-width: 350px) {
|
||||
.proposal-mine-content {
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.proposal-mine-sticky {
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<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.name"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :multiple="false" :options="sessionOptions" @change="doSearch"
|
||||
v-model="pageForm.sessionId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
<div class="proposal-mine-page">
|
||||
<van-nav-bar @click-left="handlePageBack" left-arrow left-text="返回" title="我的提案" placeholder fixed></van-nav-bar>
|
||||
|
||||
<table-list api="/platform/proposal/mine/h5/pageData" :page_form.sync="pageForm" @ready="onReady" ref="tableListRef"
|
||||
title="name">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="提案编号">{{row.code}}</table-column>
|
||||
<table-column label="提案类别">{{row.typeName}}</table-column>
|
||||
<table-column label="提案人">{{row.createUserName}}</table-column>
|
||||
<table-column label="代表团">{{row.delegationName}}</table-column>
|
||||
<table-column label="当前节点">{{ (row.startTaskId) ? row.taskName : '待提交' }}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
<van-sticky :offset-top="46">
|
||||
<div class="proposal-mine-sticky">
|
||||
<van-search
|
||||
v-model="pageForm.name"
|
||||
class="proposal-mine-search"
|
||||
placeholder="请输入提案名称搜索"
|
||||
shape="round"
|
||||
clearable
|
||||
@search="doSearch"
|
||||
@clear="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu
|
||||
class="proposal-mine-filter"
|
||||
:class="{'is-open': filterOpened}"
|
||||
active-color="#1989fa"
|
||||
:close-on-click-outside="false"
|
||||
:close-on-click-overlay="false"
|
||||
>
|
||||
<van-dropdown-item
|
||||
v-model="pageForm.sessionId"
|
||||
:multiple="false"
|
||||
:options="sessionOptions"
|
||||
@change="doSearch"
|
||||
@open="filterOpened = true"
|
||||
@close="filterOpened = false"
|
||||
></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskKey === 'startTask' || !row.instanceId"
|
||||
@click="onEdit(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>编辑</span>
|
||||
</div>
|
||||
<div class="action-btn"
|
||||
v-if="row.taskKey === 'invite' || row.taskKey === 'second'"
|
||||
@click="onInvite(row)">
|
||||
<i class="fa fa-user-plus"></i>
|
||||
<span>邀请附议人</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.taskKey === 'startTask' || !row.instanceId"
|
||||
@click="onDelete(row)">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
</van-sticky>
|
||||
|
||||
<invite-seconder @refresh="doSearch" ref="inviteSeconderRef"></invite-seconder>
|
||||
<main class="proposal-mine-content">
|
||||
<div class="proposal-mine-list">
|
||||
<div v-if="pageForm.totalCount === 0" class="proposal-mine-empty">
|
||||
<img src="/assets/mobile/img/proposal/proposal-empty.png" alt="暂无提案记录插画">
|
||||
<div class="proposal-mine-empty__title">暂无提案记录</div>
|
||||
<div class="proposal-mine-empty__hint">当前筛选条件下暂时没有提案</div>
|
||||
</div>
|
||||
<table-list api="/platform/proposal/mine/pageData" :page_form.sync="pageForm" @ready="onReady" ref="tableListRef"
|
||||
title="name">
|
||||
<template #header="{index,row}">
|
||||
<div class="proposal-card-header">
|
||||
<div class="proposal-card-heading">
|
||||
<div class="proposal-card-title">{{row.name}}</div>
|
||||
<div class="proposal-card-code">编号:{{row.code || '--'}}</div>
|
||||
</div>
|
||||
<!-- 流程已启动时显示真实实例状态,尚未启动的提案统一标记为待提交。 -->
|
||||
<enum-tag
|
||||
class="proposal-card-status"
|
||||
v-if="row.instanceState"
|
||||
:value="row.instanceState"
|
||||
name="ProcessInstanceStateEnum"
|
||||
label_key="message"
|
||||
size="small"
|
||||
></enum-tag>
|
||||
<span v-else class="proposal-card-status proposal-card-status--plain">待提交</span>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="提案类别">{{row.typeName || '--'}}</table-column>
|
||||
<table-column label="提案人">{{row.createUserName || '--'}}</table-column>
|
||||
<table-column label="代表团">{{row.delegationName || '--'}}</table-column>
|
||||
<table-column label="当前节点">{{ (row.startTaskId) ? row.taskName : '待提交' }}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<van-icon name="eye-o"></van-icon>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskKey === 'startTask' || !row.instanceId"
|
||||
@click="onEdit(row)">
|
||||
<van-icon class="proposal-action-icon" name="edit"></van-icon>
|
||||
<span>编辑</span>
|
||||
</div>
|
||||
<div class="action-btn"
|
||||
v-if="row.taskKey === 'invite' || row.taskKey === 'second'"
|
||||
@click="onInvite(row)">
|
||||
<van-icon class="proposal-action-icon" name="friends-o"></van-icon>
|
||||
<span>邀请附议人</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<van-icon class="proposal-action-icon" name="revoke"></van-icon>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.taskKey === 'startTask' || !row.instanceId"
|
||||
@click="onDelete(row)">
|
||||
<van-icon class="proposal-action-icon" name="delete-o"></van-icon>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<proposal-info ref="proposalInfoRef"></proposal-info>
|
||||
<van-popup
|
||||
v-model="detailVisible"
|
||||
class="proposal-mine-popup proposal-detail-popup"
|
||||
position="right"
|
||||
:close-on-click-overlay="false"
|
||||
safe-area-inset-bottom>
|
||||
<div class="proposal-detail-popup-page">
|
||||
<van-nav-bar
|
||||
title="提案详情"
|
||||
left-arrow
|
||||
left-text="返回"
|
||||
fixed
|
||||
@click-left="closeHistoryLayer('detail')">
|
||||
</van-nav-bar>
|
||||
<div class="proposal-detail-scroll">
|
||||
<proposal-info v-if="detailVisible && detailBizId" :biz-id="detailBizId" :visible="detailVisible"></proposal-info>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
<invite-seconder
|
||||
:visible="inviteVisible"
|
||||
:confirm-visible="inviteConfirmVisible"
|
||||
@close="closeHistoryLayer('invite')"
|
||||
@open-confirm="openHistoryLayer('invite-confirm')"
|
||||
@close-confirm="closeHistoryLayer('invite-confirm')"
|
||||
@confirm-invite="confirmInvite"
|
||||
@refresh="doSearch"
|
||||
ref="inviteSeconderRef">
|
||||
</invite-seconder>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
@@ -68,8 +461,8 @@ layout("/layouts/platform_h5.html"){
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
"invite-seconder": PROPOSAL_INVITE_SECONDER_COMPONENT,
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
"proposal-info": PROPOSAL_INFO,
|
||||
"invite-seconder": PROPOSAL_INVITE_SECONDER_COMPONENT
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -78,34 +471,85 @@ layout("/layouts/platform_h5.html"){
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
sessionId: null
|
||||
},
|
||||
|
||||
sessionOptions: [],
|
||||
infoShow: false
|
||||
filterOpened: false,
|
||||
detailVisible: false,
|
||||
detailBizId: "",
|
||||
inviteVisible: false,
|
||||
inviteConfirmVisible: false,
|
||||
historyLayerPageKey: "proposal-mine-h5"
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 注册“我的提案”页面弹层历史。
|
||||
* pageKey 使用固定页面标识;回调参数 stack 为当前弹层名称数组,无返回值。
|
||||
*/
|
||||
registerHistoryLayers() {
|
||||
if (!window.h5HistoryLayerManager) return
|
||||
window.h5HistoryLayerManager.register(this.historyLayerPageKey, (stack) => {
|
||||
this.syncHistoryLayerStack(stack)
|
||||
})
|
||||
},
|
||||
|
||||
// 根据浏览器历史栈同步详情、邀请附议和邀请确认弹层的显示状态。
|
||||
syncHistoryLayerStack(stack) {
|
||||
this.$set(this, "detailVisible", stack.includes("detail"))
|
||||
this.$set(this, "inviteVisible", stack.includes("invite"))
|
||||
this.$set(this, "inviteConfirmVisible", stack.includes("invite-confirm"))
|
||||
},
|
||||
|
||||
// 打开弹层时同步增加当前地址的浏览器历史记录。
|
||||
openHistoryLayer(layerName) {
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open(layerName)) return
|
||||
this.setHistoryLayerVisible(layerName, true)
|
||||
},
|
||||
|
||||
// 主动关闭弹层时回退对应历史记录,afterClose 在历史状态同步后执行。
|
||||
closeHistoryLayer(layerName, afterClose = null) {
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.close(layerName, afterClose)) return
|
||||
this.setHistoryLayerVisible(layerName, false)
|
||||
if (typeof afterClose === "function") afterClose()
|
||||
},
|
||||
|
||||
setHistoryLayerVisible(layerName, visible) {
|
||||
if (layerName === "detail") this.$set(this, "detailVisible", visible)
|
||||
if (layerName === "invite") this.$set(this, "inviteVisible", visible)
|
||||
if (layerName === "invite-confirm") this.$set(this, "inviteConfirmVisible", visible)
|
||||
},
|
||||
|
||||
// 页面返回时优先关闭最上层弹框,没有弹框时再返回上一业务页面。
|
||||
handlePageBack() {
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.stack.length) {
|
||||
window.h5HistoryLayerManager.close()
|
||||
return
|
||||
}
|
||||
this.historyBack()
|
||||
},
|
||||
|
||||
listSession() {
|
||||
this.$axios.post("/platform/proposal/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = res.data
|
||||
.map((v) => ({
|
||||
this.sessionOptions = [{text: "全部届次", value: null}]
|
||||
.concat(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.doSearch()
|
||||
}
|
||||
})))
|
||||
// “全部届次”固定展示在首位,但首次查询仍默认使用接口倒序返回的最新届次。
|
||||
this.$set(this.pageForm, "sessionId", res.data.length > 0 ? res.data[0].id : null)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
this.$set(this, "detailBizId", row.id)
|
||||
this.openHistoryLayer("detail")
|
||||
},
|
||||
|
||||
onEdit(row) {
|
||||
@@ -155,14 +599,30 @@ layout("/layouts/platform_h5.html"){
|
||||
onInvite(row) {
|
||||
this.$axios.post("/platform/proposal/mine/inviteCheck", {id: row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.inviteSeconderRef.onOpen(row)
|
||||
this.$refs.inviteSeconderRef.prepare(row)
|
||||
this.openHistoryLayer("invite")
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 邀请确认后先关闭确认层,再提交邀请,避免浏览器历史中残留已关闭的 Dialog。
|
||||
confirmInvite() {
|
||||
this.closeHistoryLayer("invite-confirm", () => {
|
||||
this.$refs.inviteSeconderRef.submitInvite()
|
||||
})
|
||||
},
|
||||
|
||||
onReady() {
|
||||
this.listSession()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.registerHistoryLayers()
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (window.h5HistoryLayerManager) {
|
||||
window.h5HistoryLayerManager.unregister(this.historyLayerPageKey)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+170
-102
@@ -1,55 +1,102 @@
|
||||
const PROPOSAL_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="item.loginName"
|
||||
@click="tableRowToggle(index)"
|
||||
>
|
||||
<span slot="title">
|
||||
{{item.userName}}
|
||||
({{item.loginName}})
|
||||
</span>
|
||||
<span slot="label" class="font-size0 van-color-text-assist">
|
||||
{{item.unitName}}
|
||||
</span>
|
||||
<van-checkbox
|
||||
:name="item"
|
||||
:ref="'checkboxes'+item.loginName"
|
||||
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>
|
||||
`,
|
||||
template: /*language=HTML*/ `
|
||||
<van-popup
|
||||
:value="visible"
|
||||
class="proposal-mine-popup proposal-invite-popup"
|
||||
position="right"
|
||||
:close-on-click-overlay="false"
|
||||
safe-area-inset-bottom>
|
||||
<van-nav-bar
|
||||
title="邀请附议人"
|
||||
left-arrow
|
||||
left-text="返回"
|
||||
fixed
|
||||
placeholder
|
||||
@click-left="$emit('close')">
|
||||
</van-nav-bar>
|
||||
|
||||
<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="item.loginName"
|
||||
@click="tableRowToggle(index)">
|
||||
<span slot="title">
|
||||
{{item.userName}}({{item.loginName}})
|
||||
</span>
|
||||
<span slot="label" class="font-size0 van-color-text-assist">
|
||||
{{item.unitName}}
|
||||
</span>
|
||||
<van-checkbox
|
||||
:name="item"
|
||||
:ref="'checkboxes' + item.loginName"
|
||||
slot="right-icon"
|
||||
v-if="!pageForm.isInvite">
|
||||
</van-checkbox>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<div class="p10">
|
||||
<van-pagination
|
||||
class="proposal-soft-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 proposal-soft-button">
|
||||
邀请
|
||||
</van-button>
|
||||
</div>
|
||||
</van-checkbox-group>
|
||||
|
||||
<!-- 空状态提示随“已邀请 / 可邀请”标签切换,便于用户判断当前无数据的具体范围。 -->
|
||||
<div v-else class="proposal-invite-empty">
|
||||
<img src="/assets/mobile/img/proposal/proposal-empty.png" alt="暂无附议人插画">
|
||||
<div class="proposal-invite-empty__title">暂无附议人</div>
|
||||
<div class="proposal-invite-empty__hint">
|
||||
{{ isInvite === "1" ? "当前暂无已邀请的附议人" : "当前暂无可邀请的附议人" }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<van-dialog
|
||||
:value="confirmVisible"
|
||||
title="提示"
|
||||
:message="confirmMessage"
|
||||
show-cancel-button
|
||||
@confirm="$emit('confirm-invite')"
|
||||
@cancel="$emit('close-confirm')">
|
||||
</van-dialog>
|
||||
</van-popup>
|
||||
`,
|
||||
props: {
|
||||
visible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
confirmVisible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
secondedNum: 0,
|
||||
record: {},
|
||||
tableData: [],
|
||||
@@ -57,77 +104,93 @@ const PROPOSAL_INVITE_SECONDER_COMPONENT = {
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
isInvite: false,
|
||||
searchKeyword: null
|
||||
},
|
||||
config: {},
|
||||
isInvite: "0",
|
||||
tableSelection: []
|
||||
tableSelection: [],
|
||||
confirmMessage: ""
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
visible(value) {
|
||||
if (!value || !this.record.id) return
|
||||
this.getConfig().then(() => {
|
||||
this.pageData()
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onOpen(record) {
|
||||
this.visible = true
|
||||
this.record = record
|
||||
await this.getConfig()
|
||||
this.pageData()
|
||||
|
||||
|
||||
},
|
||||
detail(id) {
|
||||
/**
|
||||
* 准备邀请附议弹框数据。
|
||||
* record 为列表当前提案对象,至少包含 id 和 sessionId;该方法只缓存提案并重置查询条件,无返回值。
|
||||
*/
|
||||
prepare(record) {
|
||||
this.$set(this, "record", record || {})
|
||||
this.$set(this, "isInvite", "0")
|
||||
this.$set(this, "tableSelection", [])
|
||||
this.$set(this.pageForm, "pageNumber", 1)
|
||||
this.$set(this.pageForm, "isInvite", false)
|
||||
this.$set(this.pageForm, "searchKeyword", null)
|
||||
},
|
||||
|
||||
// 校验勾选结果后打开确认 Dialog,实际提交在确认并回退 Dialog 历史层后执行。
|
||||
invite() {
|
||||
if (this.tableSelection.length === 0) {
|
||||
this.$toast("请先选择附议人后在点击邀请")
|
||||
this.$toast("请先选择附议人后再点击邀请")
|
||||
return
|
||||
}
|
||||
const userNames = [...new Set(this.tableSelection.map((item) => item.userName))]
|
||||
this.$set(this, "confirmMessage", "您确定要邀请" + userNames.join("、") + "代表附议吗?")
|
||||
this.$emit("open-confirm")
|
||||
},
|
||||
|
||||
const loginNames = [...new Set(this.tableSelection.map((s) => s.loginName))]
|
||||
const userName = [...new Set(this.tableSelection.map((s) => s.userName))]
|
||||
|
||||
console.log(this.tableSelection)
|
||||
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: "您确定要邀请" + userName.join("、") + "代表附议吗?",
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/proposal/mine/inviteSeconder", {
|
||||
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)
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
/**
|
||||
* 提交邀请附议人。
|
||||
* 参数 proposalId 为当前提案主键,seconders 为已勾选人员工号数组;接口返回 Result,code 为 0 表示邀请成功。
|
||||
*/
|
||||
submitInvite() {
|
||||
const loginNames = [...new Set(this.tableSelection.map((item) => item.loginName))]
|
||||
this.$axios.post("/platform/proposal/mine/inviteSeconder", {
|
||||
proposalId: this.record.id,
|
||||
seconders: JSON.stringify(loginNames)
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.pageData()
|
||||
this.$toast.success(res.msg)
|
||||
this.$set(this, "tableSelection", [])
|
||||
this.$emit("refresh")
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询邀请附议人列表。
|
||||
* 参数包含当前提案 ID、届次 ID、邀请状态、关键词及分页条件;返回分页对象并更新列表和总数。
|
||||
*/
|
||||
pageData() {
|
||||
this.$axios.post("/platform/proposal/mine/listSeconder", {
|
||||
...this.pageForm,
|
||||
sessionId: this.record.sessionId,
|
||||
proposalId: this.record.id
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$set(this, "tableData", res.data.list || [])
|
||||
this.$set(this.pageForm, "totalCount", res.data.totalCount || 0)
|
||||
this.echoCheckBox()
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
this.echoCheckBox()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 翻页回显勾选
|
||||
// 翻页后回显当前已勾选的附议人。
|
||||
echoCheckBox() {
|
||||
this.$nextTick(() => {
|
||||
this.tableData.forEach((item) => {
|
||||
const checkboxRef = this.$refs['checkboxes' + item.loginName]
|
||||
if (checkboxRef && this.tableSelection.map((s) => s.loginName).includes(item.loginName)) {
|
||||
const checkboxRef = this.$refs["checkboxes" + item.loginName]
|
||||
if (checkboxRef && this.tableSelection.map((selected) => selected.loginName).includes(item.loginName)) {
|
||||
checkboxRef[0].toggle()
|
||||
}
|
||||
})
|
||||
@@ -135,24 +198,29 @@ const PROPOSAL_INVITE_SECONDER_COMPONENT = {
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.$set(this.pageForm, "pageNumber", 1)
|
||||
this.pageData()
|
||||
},
|
||||
|
||||
isInviteClick(index, title) {
|
||||
this.pageForm.isInvite = index === "1"
|
||||
isInviteClick(name) {
|
||||
this.$set(this.pageForm, "isInvite", name === "1")
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
tableRowToggle(index) {
|
||||
console.log(index)
|
||||
if (this.pageForm.isInvite || index < 0) return
|
||||
},
|
||||
|
||||
async getConfig() {
|
||||
const {code, data} = await this.$axios.post("/platform/proposal/common/config")
|
||||
if (code === 0) {
|
||||
this.config = data
|
||||
}
|
||||
/**
|
||||
* 查询提案附议配置。
|
||||
* 接口无业务参数,返回 ProposalConfig 配置对象;Promise 用于确保配置完成后再查询人员列表。
|
||||
*/
|
||||
getConfig() {
|
||||
return this.$axios.post("/platform/proposal/common/config").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$set(this, "config", res.data || {})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+416
@@ -0,0 +1,416 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style>
|
||||
body {
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-page {
|
||||
min-height: 100vh;
|
||||
padding-bottom: calc(24px + env(safe-area-inset-bottom));
|
||||
box-sizing: border-box;
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-page .van-nav-bar {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-page .van-nav-bar__title {
|
||||
color: #172033;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-page .van-nav-bar .van-icon,
|
||||
.proposal-pre-audit-page .van-nav-bar__text {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-content {
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-sticky {
|
||||
padding: 22px 12px 1px;
|
||||
box-sizing: border-box;
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-search {
|
||||
margin: 0 0 8px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
border-radius: 12px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 5px 16px rgba(43, 73, 112, .1);
|
||||
}
|
||||
|
||||
.proposal-pre-audit-search .van-search__content {
|
||||
height: 42px;
|
||||
padding-left: 12px;
|
||||
align-items: center;
|
||||
border-radius: 12px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-search .van-field__control {
|
||||
color: #263548;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-search .van-field__control::placeholder {
|
||||
color: #a7b0bf;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-filter {
|
||||
margin: 0 0 10px;
|
||||
overflow: hidden;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 5px 16px rgba(43, 73, 112, .08);
|
||||
transition: border-radius .18s ease;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-filter.is-open {
|
||||
border-radius: 10px 10px 0 0;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-filter .van-dropdown-menu__bar,
|
||||
.proposal-pre-audit-filter .van-dropdown-menu__item,
|
||||
.proposal-pre-audit-filter .van-dropdown-menu__title {
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-filter .van-dropdown-menu__bar {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-filter .van-dropdown-menu__title {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
color: #66758a;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-filter .van-dropdown-menu__title--active,
|
||||
.proposal-pre-audit-filter .van-dropdown-item__option--active,
|
||||
.proposal-pre-audit-filter .van-dropdown-item__option--active .van-dropdown-item__icon {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-filter .van-dropdown-item__content {
|
||||
width: calc(100% - 24px);
|
||||
margin: 0 12px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
border-radius: 0 0 12px 12px;
|
||||
box-shadow: 0 10px 24px rgba(31, 65, 108, .14);
|
||||
}
|
||||
|
||||
.proposal-pre-audit-filter .van-dropdown-item__option {
|
||||
display: flex;
|
||||
min-height: 48px;
|
||||
padding: 0 16px;
|
||||
align-items: center;
|
||||
color: #46566c;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-list .empty-state {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-empty {
|
||||
display: flex;
|
||||
min-height: 280px;
|
||||
padding: 46px 18px 36px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-empty img {
|
||||
display: block;
|
||||
width: 86%;
|
||||
max-width: 290px;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-empty__title {
|
||||
margin-top: 14px;
|
||||
color: #50627a;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-empty__hint {
|
||||
margin-top: 5px;
|
||||
color: #9aa7b8;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-card-header {
|
||||
display: flex;
|
||||
margin-bottom: 7px;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-card-heading {
|
||||
min-width: 0;
|
||||
padding-right: 10px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-card-title {
|
||||
overflow: hidden;
|
||||
color: #253247;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
font-weight: 600;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-card-code {
|
||||
margin-top: 1px;
|
||||
color: #9ba6b6;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-status {
|
||||
display: inline-flex;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.proposal-pre-audit-status .van-tag {
|
||||
display: inline-flex;
|
||||
min-height: 24px;
|
||||
padding: 3px 9px;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
border: 0;
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
@media (max-width: 350px) {
|
||||
.proposal-pre-audit-content,
|
||||
.proposal-pre-audit-sticky {
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style id="style-proposal-task-popup-h5">
|
||||
<!--#include("../../common/info.css"){}#-->
|
||||
<!--#include("../theme.css"){}#-->
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<div class="proposal-pre-audit-page">
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="校工会预审核" placeholder fixed></van-nav-bar>
|
||||
<van-sticky :offset-top="46">
|
||||
<div class="proposal-pre-audit-sticky">
|
||||
<van-search
|
||||
v-model="pageForm.name"
|
||||
class="proposal-pre-audit-search"
|
||||
placeholder="请输入提案名称搜索"
|
||||
shape="round"
|
||||
clearable
|
||||
@search="doSearch"
|
||||
@clear="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu
|
||||
class="proposal-pre-audit-filter"
|
||||
:class="{'is-open': filterOpened}"
|
||||
active-color="#1989fa"
|
||||
>
|
||||
<van-dropdown-item
|
||||
v-model="pageForm.sessionId"
|
||||
:options="sessionOptions"
|
||||
:multiple="false"
|
||||
@change="doSearch"
|
||||
@open="onFilterOpen"
|
||||
@close="onFilterClose"
|
||||
></van-dropdown-item>
|
||||
<van-dropdown-item
|
||||
v-model="pageForm.approvalText"
|
||||
:options="approvalOptions"
|
||||
:multiple="false"
|
||||
@change="approvalChange"
|
||||
@open="onFilterOpen"
|
||||
@close="onFilterClose"
|
||||
></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
</van-sticky>
|
||||
|
||||
<main class="proposal-pre-audit-content">
|
||||
<div class="proposal-pre-audit-list">
|
||||
<!-- 列表无记录时使用与“我的提案”一致的提案专用空状态。 -->
|
||||
<div v-if="pageForm.totalCount === 0" class="proposal-pre-audit-empty">
|
||||
<img src="/assets/mobile/img/proposal/proposal-empty.png" alt="暂无提案记录插画">
|
||||
<div class="proposal-pre-audit-empty__title">暂无提案记录</div>
|
||||
<div class="proposal-pre-audit-empty__hint">当前筛选条件下暂时没有提案</div>
|
||||
</div>
|
||||
<table-list api="/platform/proposal/pre/audit/pageData" :page_form.sync="pageForm" @ready="onReady"
|
||||
ref="tableListRef" title="name">
|
||||
<template #header="{index,row}">
|
||||
<div class="proposal-pre-audit-card-header">
|
||||
<div class="proposal-pre-audit-card-heading">
|
||||
<div class="proposal-pre-audit-card-title">{{row.name}}</div>
|
||||
<div class="proposal-pre-audit-card-code">编号:{{row.code || '--'}}</div>
|
||||
</div>
|
||||
<enum-tag
|
||||
class="proposal-pre-audit-status"
|
||||
v-if="row.instanceState"
|
||||
:value="row.instanceState"
|
||||
name="ProcessInstanceStateEnum"
|
||||
label_key="message"
|
||||
size="small"
|
||||
></enum-tag>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="立案编号">{{row.caseFilingCode || '--'}}</table-column>
|
||||
<table-column label="提案类别">{{row.typeName || '--'}}</table-column>
|
||||
<table-column label="提案人">{{row.createUserName || '--'}}</table-column>
|
||||
<table-column label="教代会">{{row.sessionName || '--'}}</table-column>
|
||||
<table-column label="代表团">{{row.delegationName || '--'}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName || '--'}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row,index)">
|
||||
<van-icon class="proposal-action-icon" name="eye-o"></van-icon>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row,index)">
|
||||
<van-icon class="proposal-action-icon" name="edit"></van-icon>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<van-icon class="proposal-action-icon" name="revoke"></van-icon>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
<proposal-task-popup ref="taskPopup" kind="preAudit" page-key="proposal-pre-audit-task" @success="doSearch"></proposal-task-popup>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
<!--#include("../../common/task-popup.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {"proposal-task-popup": PROPOSAL_TASK_POPUP},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
name: null,
|
||||
sessionId: null,
|
||||
approvalText: "0",
|
||||
approval: false
|
||||
},
|
||||
sessionOptions: [],
|
||||
filterOpened: false,
|
||||
approvalOptions: [
|
||||
{text: "未审核", value: "0"},
|
||||
{text: "已审核", value: "1"}
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onReady() {
|
||||
this.listSession(false)
|
||||
},
|
||||
|
||||
onFilterOpen() {
|
||||
this.filterOpened = true
|
||||
},
|
||||
|
||||
onFilterClose() {
|
||||
this.filterOpened = false
|
||||
},
|
||||
|
||||
// 审核状态下拉使用字符串展示,查询接口使用布尔值区分已审核和未审核。
|
||||
approvalChange(value) {
|
||||
this.$set(this.pageForm, "approval", value === "1")
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
// 与其他提案 H5 页面一致加载全部教代会;首次进入默认选中最新一届,缓存恢复时不覆盖原筛选条件。
|
||||
listSession(skipDefaultSearch) {
|
||||
this.$axios.post("/platform/proposal/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = [{text: "全部教代会", value: null}]
|
||||
.concat(res.data.map((item) => ({text: item.fullName, value: item.id})))
|
||||
if (skipDefaultSearch) return
|
||||
this.$set(this.pageForm, "sessionId", res.data.length > 0 ? res.data[0].id : null)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onView(row, index) {
|
||||
this.$refs.taskPopup.open(row, "view")
|
||||
},
|
||||
|
||||
onApproval(row, index) {
|
||||
this.$refs.taskPopup.open(row, "approval")
|
||||
},
|
||||
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.$set(this.pageForm, "pageNumber", 1)
|
||||
this.$set(this.pageForm, "totalCount", 0)
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const tab = new URLSearchParams(window.location.search).get("tab")
|
||||
if (tab === "done") {
|
||||
this.$set(this.pageForm, "approval", true)
|
||||
this.$set(this.pageForm, "approvalText", "1")
|
||||
} else if (tab === "todo") {
|
||||
this.$set(this.pageForm, "approval", false)
|
||||
this.$set(this.pageForm, "approvalText", "0")
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+82
-180
@@ -1,196 +1,98 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style>
|
||||
body { background-color: #f3f7fd; }
|
||||
.proposal-school-leader-page { min-height: 100vh; padding-bottom: calc(24px + env(safe-area-inset-bottom)); box-sizing: border-box; background-color: #f3f7fd; }
|
||||
.proposal-school-leader-page .van-nav-bar { background-color: #fff; }
|
||||
.proposal-school-leader-page .van-nav-bar__title { color: #172033; font-size: 16px; font-weight: 600; }
|
||||
.proposal-school-leader-page .van-nav-bar .van-icon, .proposal-school-leader-page .van-nav-bar__text { color: #1989fa; }
|
||||
.proposal-school-leader-content { padding: 0 12px; }
|
||||
.proposal-school-leader-sticky { padding: 22px 12px 1px; box-sizing: border-box; background-color: #f3f7fd; }
|
||||
.proposal-school-leader-search { margin: 0 0 8px; padding: 0; overflow: hidden; border-radius: 12px; background-color: #fff; box-shadow: 0 5px 16px rgba(43, 73, 112, .1); }
|
||||
.proposal-school-leader-search .van-search__content { height: 42px; padding-left: 12px; align-items: center; border-radius: 12px; background-color: #fff; }
|
||||
.proposal-school-leader-search .van-field__control { color: #263548; font-size: 14px; }
|
||||
.proposal-school-leader-search .van-field__control::placeholder { color: #a7b0bf; }
|
||||
.proposal-school-leader-filter { margin: 0 0 10px; overflow: hidden; border-radius: 10px; box-shadow: 0 5px 16px rgba(43, 73, 112, .08); transition: border-radius .18s ease; }
|
||||
.proposal-school-leader-filter.is-open { border-radius: 10px 10px 0 0; }
|
||||
.proposal-school-leader-filter .van-dropdown-menu__bar, .proposal-school-leader-filter .van-dropdown-menu__item, .proposal-school-leader-filter .van-dropdown-menu__title { height: 44px; }
|
||||
.proposal-school-leader-filter .van-dropdown-menu__bar { box-shadow: none; }
|
||||
.proposal-school-leader-filter .van-dropdown-menu__item, .proposal-school-leader-filter .van-dropdown-menu__title { align-items: center; }
|
||||
.proposal-school-leader-filter .van-dropdown-menu__item { justify-content: center; }
|
||||
.proposal-school-leader-filter .van-dropdown-menu__title { display: inline-flex; color: #66758a; font-size: 14px; line-height: 20px; }
|
||||
.proposal-school-leader-filter .van-dropdown-menu__title--active, .proposal-school-leader-filter .van-dropdown-item__option--active, .proposal-school-leader-filter .van-dropdown-item__option--active .van-dropdown-item__icon { color: #1989fa; }
|
||||
.proposal-school-leader-filter .van-dropdown-menu__title--down::after { border-color: transparent transparent #1989fa #1989fa; }
|
||||
.proposal-school-leader-filter .van-dropdown-item__content { width: calc(100% - 24px); margin: 0 12px; overflow: hidden; box-sizing: border-box; border-radius: 0 0 12px 12px; box-shadow: 0 10px 24px rgba(31, 65, 108, .14); }
|
||||
.proposal-school-leader-filter .van-dropdown-item__option { display: flex; min-height: 48px; padding: 0 16px; align-items: center; color: #46566c; font-size: 14px; }
|
||||
.proposal-school-leader-filter .van-cell::after { right: 16px; left: 16px; }
|
||||
.proposal-school-leader-list .empty-state { display: none; }
|
||||
.proposal-school-leader-empty { display: flex; min-height: 280px; padding: 46px 18px 36px; align-items: center; justify-content: center; flex-direction: column; box-sizing: border-box; text-align: center; }
|
||||
.proposal-school-leader-empty img { display: block; width: 86%; max-width: 290px; height: auto; object-fit: contain; }
|
||||
.proposal-school-leader-empty__title { margin-top: 14px; color: #50627a; font-size: 15px; line-height: 22px; font-weight: 600; }
|
||||
.proposal-school-leader-empty__hint { margin-top: 5px; color: #9aa7b8; font-size: 12px; line-height: 18px; }
|
||||
@media (max-width: 350px) { .proposal-school-leader-content, .proposal-school-leader-sticky { padding-right: 10px; padding-left: 10px; } }
|
||||
</style>
|
||||
<style id="style-proposal-school-leader-h5">
|
||||
<!--#include("../../common/info.css"){}#-->
|
||||
<!--#include("../theme.css"){}#-->
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="分管校领导审批" placeholder fixed></van-nav-bar>
|
||||
<div class="proposal-school-leader-page">
|
||||
<van-nav-bar @click-left="handlePageBack" left-arrow left-text="返回" title="分管校领导审批" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
v-model="pageForm.name"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入提案名称搜索"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionOptions" :multiple="false"
|
||||
@change="doSearch"></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>
|
||||
<div class="proposal-school-leader-sticky">
|
||||
<van-search v-model="pageForm.name" class="proposal-school-leader-search" placeholder="请输入提案名称搜索" shape="round" clearable @search="doSearch" @clear="doSearch"></van-search>
|
||||
<van-dropdown-menu class="proposal-school-leader-filter" :class="{'is-open': filterOpened}" active-color="#1989fa" :close-on-click-outside="false" :close-on-click-overlay="false"><van-dropdown-item v-model="pageForm.sessionId" :options="sessionOptions" :multiple="false" @change="doSearch" @open="setFilterOpened(true)" @close="setFilterOpened(false)"></van-dropdown-item><van-dropdown-item v-model="pageForm.approvalText" :options="approvalOptions" :multiple="false" @change="approvalChange" @open="setFilterOpened(true)" @close="setFilterOpened(false)"></van-dropdown-item></van-dropdown-menu>
|
||||
</div>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/proposal/schoolLeaderApproval/pageData" :page_form.sync="pageForm" @ready="onReady"
|
||||
ref="tableListRef"
|
||||
title="name">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="提案编号">{{row.code}}</table-column>
|
||||
<table-column label="提案类别">{{row.typeName}}</table-column>
|
||||
<table-column label="提案人">{{row.createUserName}}</table-column>
|
||||
<table-column label="代表团">{{row.delegationName}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-reply"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
<main class="proposal-school-leader-content"><div class="proposal-school-leader-list">
|
||||
<!-- 列表无记录时展示与团长审核一致的提案专用空状态。 -->
|
||||
<div v-if="pageForm.totalCount === 0" class="proposal-school-leader-empty"><img src="/assets/mobile/img/proposal/proposal-empty.png" alt="暂无提案记录插画"><div class="proposal-school-leader-empty__title">暂无提案记录</div><div class="proposal-school-leader-empty__hint">当前筛选条件下暂时没有提案</div></div>
|
||||
<table-list api="/platform/proposal/schoolLeaderApproval/pageData" :page_form.sync="pageForm" @ready="onReady" ref="tableListRef" title="name">
|
||||
<template v-slot="{row}"><table-column label="提案编号">{{row.code}}</table-column><table-column label="提案类别">{{row.typeName}}</table-column><table-column label="提案人">{{row.createUserName}}</table-column><table-column label="代表团">{{row.delegationName}}</table-column><table-column label="当前节点">{{row.curTaskName}}</table-column></template>
|
||||
<template #actions="{row}">
|
||||
<div class="action-btn" @click="onView(row)"><van-icon class="proposal-action-icon" name="eye-o"></van-icon><span>查看</span></div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)"><van-icon class="proposal-action-icon" name="edit"></van-icon><span>审核</span></div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)"><van-icon class="proposal-action-icon" name="revoke"></van-icon><span>撤回</span></div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<proposal-info ref="proposalInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.taskName}}</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
name="tf_opinion"
|
||||
label="审批意见"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="primary" block @click="handleTaskAction('agree')">同意答复</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction('back')">退回答复</van-button>
|
||||
</div>
|
||||
</div></main>
|
||||
<van-popup v-model="detailVisible" position="right" class="proposal-full-popup" :close-on-click-overlay="false" get-container="#app">
|
||||
<div class="proposal-full-popup__page"><van-nav-bar @click-left="closeDetail" left-arrow left-text="返回" :title="popupTitle" placeholder fixed></van-nav-bar>
|
||||
<div class="proposal-full-popup__scroll"><proposal-info v-if="detailBizId" :biz-id="detailBizId" :visible="detailVisible">
|
||||
<div v-if="isApproval"><van-form ref="formRef"><section class="proposal-view-card"><h2 class="proposal-view-card__title">审批意见<span class="proposal-audit-card__required">*</span></h2><van-field v-model="formData.tf_opinion" class="proposal-audit-field" name="tf_opinion" type="textarea" rows="6" label="" placeholder="请输入审批意见" :rules="[{required:true,message:'请填写审批意见'}]" required maxlength="100" show-word-limit></van-field></section></van-form>
|
||||
<div class="proposal-popup-form-actions"><van-button type="danger" block :loading="formLoading" class="proposal-soft-button proposal-soft-button--danger" @click="handleTaskAction('back')">退回答复</van-button><van-button type="primary" block :loading="formLoading" class="proposal-soft-button" @click="handleTaskAction('agree')">同意答复</van-button></div>
|
||||
</div>
|
||||
</proposal-info></div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
|
||||
</van-popup>
|
||||
<van-dialog :value="submitConfirmVisible" title="提示" message="您确定要提交吗?" show-cancel-button @confirm="confirmTaskAction" @cancel="closeSubmitConfirm"></van-dialog>
|
||||
</div>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
name: null,
|
||||
sessionId: null,
|
||||
approvalText: "0",
|
||||
approval: false
|
||||
},
|
||||
|
||||
sessionOptions: [],
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
new Vue({
|
||||
el: "#app", store, components: {"proposal-info": PROPOSAL_INFO},
|
||||
data() { return {pageForm:{pageNumber:1,pageSize:10,totalCount:0,name:null,sessionId:null,approvalText:"0",approval:false},sessionOptions:[],filterOpened:false,approvalOptions:[{text:"未审核",value:"0"},{text:"已审核",value:"1"}],detailVisible:false,detailBizId:"",action:"view",formData:{},formLoading:false,submitConfirmVisible:false,pendingSubmitType:"",historyLayerPageKey:"proposal-school-leader-approval"} },
|
||||
computed: {isApproval() { return this.action === "approval" }, popupTitle() { return this.isApproval ? "分管校领导审批" : "提案详情" }},
|
||||
methods: {
|
||||
onReady() {
|
||||
this.listSession()
|
||||
},
|
||||
listSession() {
|
||||
this.$axios.post("/platform/proposal/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = [
|
||||
{
|
||||
text: "全部届次",
|
||||
value: null
|
||||
}
|
||||
].concat(res.data.map((v) => ({text: v.fullName, value: v.id})))
|
||||
// 届次接口按开始时间倒序返回,首条即最新届次;无届次时继续按全部届次查询。
|
||||
if (res.data && res.data.length > 0) {
|
||||
this.$set(this.pageForm, "sessionId", res.data[0].id)
|
||||
}
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
},
|
||||
|
||||
onApproval(row) {
|
||||
this.showApprovalForm = true
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskKey: row.taskKey,
|
||||
taskName: row.taskName,
|
||||
proposalId: row.id
|
||||
}
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
|
||||
const formData = {
|
||||
...this.formData,
|
||||
tf_approval: val
|
||||
}
|
||||
delete formData.taskKey
|
||||
delete formData.taskName
|
||||
|
||||
|
||||
this.$axios.post("/platform/proposal/schoolLeaderApproval/executeTask", {
|
||||
data: JSON.stringify(formData)
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
onRevoke(row){
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
}
|
||||
registerHistoryLayers() { window.h5HistoryLayerManager.register(this.historyLayerPageKey, (stack) => { this.$set(this,"detailVisible",stack.includes("detail")); this.$set(this,"submitConfirmVisible",stack.includes("submit-confirm")) }) },
|
||||
openHistoryLayer(name) { window.h5HistoryLayerManager.open(name) },
|
||||
closeHistoryLayer(name,callback) { window.h5HistoryLayerManager.close(name,callback) },
|
||||
handlePageBack() { if (window.h5HistoryLayerManager.stack.length) { window.h5HistoryLayerManager.close(); return } historyBack() },
|
||||
closeDetail() { this.closeHistoryLayer("detail") }, closeSubmitConfirm() { this.closeHistoryLayer("submit-confirm") },
|
||||
setFilterOpened(value) { this.$set(this,"filterOpened",value) },
|
||||
approvalChange(value) { this.$set(this.pageForm,"approval",value === "1"); this.doSearch() }, onReady() { this.listSession() },
|
||||
listSession() { this.$axios.post("/platform/proposal/common/listSession").then((res) => { if (res.code !== 0) return; this.$set(this,"sessionOptions",[{text:"全部届次",value:null}].concat(res.data.map((v) => ({text:v.fullName,value:v.id})))); this.$set(this.pageForm,"sessionId",res.data.length > 0 ? res.data[0].id : null); this.doSearch() }) },
|
||||
onView(row) { this.$set(this,"detailBizId",row.id); this.$set(this,"action","view"); this.$set(this,"formData",{}); this.openHistoryLayer("detail") },
|
||||
onApproval(row) { this.$set(this,"detailBizId",row.id); this.$set(this,"action","approval"); this.$set(this,"formData",{processTaskId:row.taskId,taskKey:row.taskKey || "",taskName:row.taskName || "分管校领导审批",proposalId:row.id,tf_opinion:""}); this.openHistoryLayer("detail") },
|
||||
/** val 为 back 或 agree,确认后提交分管校领导审批接口。 */
|
||||
handleTaskAction(val) { this.$refs.formRef.validate().then(() => { this.$set(this,"pendingSubmitType",val); this.openHistoryLayer("submit-confirm") }).catch(() => {}) },
|
||||
confirmTaskAction() { const submitData={...this.formData,tf_approval:this.pendingSubmitType}; delete submitData.taskKey; delete submitData.taskName; this.$set(this,"formLoading",true); this.$axios.post("/platform/proposal/schoolLeaderApproval/executeTask",{data:JSON.stringify(submitData)}).then((res) => { if (res && res.code === 0) { this.$toast.success(res.msg); window.h5HistoryLayerManager.closeAll(() => this.doSearch()) } }).finally(() => { this.$set(this,"formLoading",false) }) },
|
||||
onRevoke(row) { this.$dialog.confirm({title:"提示",message:"您确定要撤回吗?"}).then(() => this.$axios.post("/flow/common/revokeTask",{taskId:row.taskId})).then((res) => { if (res && res.code === 0) { this.$toast.success(res.msg); this.doSearch() } }).catch(() => {}) },
|
||||
doSearch() { this.$nextTick(() => { this.$set(this.pageForm,"pageNumber",1); this.$set(this.pageForm,"totalCount",0); this.$refs.tableListRef.doSearch() }) }
|
||||
},
|
||||
created() { this.registerHistoryLayers() }, beforeDestroy() { window.h5HistoryLayerManager.unregister(this.historyLayerPageKey) }
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
|
||||
+572
-141
@@ -1,98 +1,455 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style>
|
||||
<!--#include("../../common/info.css"){}#-->
|
||||
<!--#include("../theme.css"){}#-->
|
||||
|
||||
body {
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-seconded-page {
|
||||
min-height: 100vh;
|
||||
padding-bottom: calc(24px + env(safe-area-inset-bottom));
|
||||
box-sizing: border-box;
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-seconded-page .van-nav-bar {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.proposal-seconded-page .van-nav-bar__title {
|
||||
color: #172033;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.proposal-seconded-page .van-nav-bar .van-icon,
|
||||
.proposal-seconded-page .van-nav-bar__text {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
.proposal-seconded-popup {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-seconded-popup-page {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
padding-top: 46px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.proposal-seconded-popup-page .van-nav-bar {
|
||||
z-index: 20;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.proposal-seconded-popup-scroll {
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.proposal-seconded-popup-scroll .proposal-view-main {
|
||||
padding-top: 18px;
|
||||
}
|
||||
|
||||
.proposal-seconded-form-actions {
|
||||
display: flex;
|
||||
padding: 10px;
|
||||
justify-content: space-between;
|
||||
column-gap: 10px;
|
||||
}
|
||||
|
||||
.proposal-seconded-content {
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.proposal-seconded-sticky {
|
||||
padding: 22px 12px 1px;
|
||||
box-sizing: border-box;
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-seconded-search {
|
||||
margin: 0 0 8px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
border-radius: 12px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 5px 16px rgba(43, 73, 112, .1);
|
||||
}
|
||||
|
||||
.proposal-seconded-search .van-search__content {
|
||||
height: 42px;
|
||||
padding-left: 12px;
|
||||
align-items: center;
|
||||
border-radius: 12px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.proposal-seconded-search .van-field__control {
|
||||
color: #263548;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.proposal-seconded-search .van-field__control::placeholder {
|
||||
color: #a7b0bf;
|
||||
}
|
||||
|
||||
.proposal-seconded-filter {
|
||||
margin: 0 0 10px;
|
||||
overflow: hidden;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 5px 16px rgba(43, 73, 112, .08);
|
||||
transition: border-radius .18s ease;
|
||||
}
|
||||
|
||||
.proposal-seconded-filter.is-open {
|
||||
border-radius: 10px 10px 0 0;
|
||||
}
|
||||
|
||||
.proposal-seconded-filter .van-dropdown-menu__bar {
|
||||
height: 44px;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.proposal-seconded-filter .van-dropdown-menu__item {
|
||||
height: 44px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.proposal-seconded-filter .van-dropdown-menu__title {
|
||||
display: inline-flex;
|
||||
height: 44px;
|
||||
align-items: center;
|
||||
line-height: 20px;
|
||||
color: #66758a;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.proposal-seconded-filter .van-dropdown-menu__title--active,
|
||||
.proposal-seconded-filter .van-dropdown-item__option--active,
|
||||
.proposal-seconded-filter .van-dropdown-item__option--active .van-dropdown-item__icon {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
.proposal-seconded-filter .van-dropdown-menu__title--down::after {
|
||||
border-color: transparent transparent #1989fa #1989fa;
|
||||
}
|
||||
|
||||
.proposal-seconded-filter .van-dropdown-item__content {
|
||||
width: calc(100% - 24px);
|
||||
margin: 0 12px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
border-radius: 0 0 12px 12px;
|
||||
box-shadow: 0 10px 24px rgba(31, 65, 108, .14);
|
||||
}
|
||||
|
||||
.proposal-seconded-filter .van-dropdown-item__option {
|
||||
display: flex;
|
||||
min-height: 48px;
|
||||
padding: 0 16px;
|
||||
align-items: center;
|
||||
color: #46566c;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.proposal-seconded-filter .van-dropdown-item__option .van-cell__title {
|
||||
display: flex;
|
||||
min-height: 20px;
|
||||
align-items: center;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.proposal-seconded-filter .van-cell::after {
|
||||
right: 16px;
|
||||
left: 16px;
|
||||
}
|
||||
|
||||
.proposal-seconded-list .empty-state {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.proposal-seconded-empty {
|
||||
display: flex;
|
||||
min-height: 280px;
|
||||
padding: 46px 18px 36px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.proposal-seconded-empty img {
|
||||
display: block;
|
||||
width: 86%;
|
||||
max-width: 290px;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.proposal-seconded-empty__title {
|
||||
margin-top: 14px;
|
||||
color: #50627a;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.proposal-seconded-empty__hint {
|
||||
margin-top: 5px;
|
||||
color: #9aa7b8;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.proposal-seconded-card-header {
|
||||
display: flex;
|
||||
margin-bottom: 7px;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.proposal-seconded-card-heading {
|
||||
min-width: 0;
|
||||
padding-right: 10px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.proposal-seconded-card-title {
|
||||
overflow: hidden;
|
||||
color: #253247;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
font-weight: 600;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.proposal-seconded-card-code {
|
||||
margin-top: 1px;
|
||||
color: #9ba6b6;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.proposal-seconded-status {
|
||||
display: inline-flex;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.proposal-seconded-status .van-tag {
|
||||
display: inline-flex;
|
||||
min-height: 24px;
|
||||
padding: 3px 9px;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
border: 0;
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.proposal-seconded-page .table-list-container .table-list-item .action-btn .van-icon {
|
||||
margin-right: 6px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
@media (max-width: 350px) {
|
||||
.proposal-seconded-content {
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.proposal-seconded-sticky {
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<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
|
||||
v-model="pageForm.name"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入提案名称搜索"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionOptions" :multiple="false"
|
||||
@change="doSearch"></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>
|
||||
<div class="proposal-seconded-page">
|
||||
<van-nav-bar @click-left="handlePageBack" left-arrow left-text="返回" title="附议提案" placeholder fixed></van-nav-bar>
|
||||
|
||||
<table-list api="/platform/proposal/seconded/h5/pageData" :page_form.sync="pageForm" @ready="onReady"
|
||||
ref="tableListRef"
|
||||
title="name">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="提案编号">{{row.code}}</table-column>
|
||||
<table-column label="提案类别">{{row.typeName}}</table-column>
|
||||
<table-column label="提案人">{{row.createUserName}}</table-column>
|
||||
<table-column label="代表团">{{row.delegationName}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
<van-sticky :offset-top="46">
|
||||
<div class="proposal-seconded-sticky">
|
||||
<van-search
|
||||
v-model="pageForm.name"
|
||||
class="proposal-seconded-search"
|
||||
placeholder="请输入提案名称搜索"
|
||||
shape="round"
|
||||
clearable
|
||||
@search="doSearch"
|
||||
@clear="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu
|
||||
class="proposal-seconded-filter"
|
||||
:class="{'is-open': filterOpened}"
|
||||
active-color="#1989fa"
|
||||
>
|
||||
<van-dropdown-item
|
||||
v-model="pageForm.sessionId"
|
||||
:options="sessionOptions"
|
||||
:multiple="false"
|
||||
@change="doSearch"
|
||||
@open="filterOpened = true"
|
||||
@close="filterOpened = false"
|
||||
></van-dropdown-item>
|
||||
<van-dropdown-item
|
||||
v-model="pageForm.approvalText"
|
||||
:options="approvalOptions"
|
||||
:multiple="false"
|
||||
@change="approvalChange"
|
||||
@open="filterOpened = true"
|
||||
@close="filterOpened = false"
|
||||
></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<div class="action-btn" v-if="showSecondAction(row)" @click="onApproval(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>附议</span>
|
||||
</div>
|
||||
<!-- <div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">-->
|
||||
<!-- <i class="fa fa-reply"></i>-->
|
||||
<!-- <span>撤回</span>-->
|
||||
<!-- </div>-->
|
||||
</template>
|
||||
</table-list>
|
||||
</van-sticky>
|
||||
|
||||
<proposal-info ref="proposalInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">提案附议</div>
|
||||
<!-- <div class="process-title">{{formData.taskName}}</div>-->
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
name="tf_opinion"
|
||||
label="审批意见"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
<!-- <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>-->
|
||||
</van-form>
|
||||
<div v-if="row && row.curTaskCode === 'second'"
|
||||
style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(20)">不同意</van-button>
|
||||
<main class="proposal-seconded-content">
|
||||
<div class="proposal-seconded-list">
|
||||
<!-- 列表无记录时使用与“我的提案”一致的提案专用空状态。 -->
|
||||
<div v-if="pageForm.totalCount === 0" class="proposal-seconded-empty">
|
||||
<img src="/assets/mobile/img/proposal/proposal-empty.png" alt="暂无提案记录插画">
|
||||
<div class="proposal-seconded-empty__title">暂无提案记录</div>
|
||||
<div class="proposal-seconded-empty__hint">当前筛选条件下暂时没有提案</div>
|
||||
</div>
|
||||
<table-list api="/platform/proposal/seconded/pageData" :page_form.sync="pageForm" @ready="onReady"
|
||||
ref="tableListRef"
|
||||
title="name">
|
||||
<template #header="{index,row}">
|
||||
<div class="proposal-seconded-card-header">
|
||||
<div class="proposal-seconded-card-heading">
|
||||
<div class="proposal-seconded-card-title">{{row.name}}</div>
|
||||
<div class="proposal-seconded-card-code">编号:{{row.code || '--'}}</div>
|
||||
</div>
|
||||
<!-- 流程状态固定显示在卡片右上角,并使用胶囊形标签突出当前进度。 -->
|
||||
<enum-tag
|
||||
class="proposal-seconded-status"
|
||||
v-if="row.instanceState"
|
||||
:value="row.instanceState"
|
||||
name="ProcessInstanceStateEnum"
|
||||
label_key="message"
|
||||
size="small"
|
||||
></enum-tag>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="提案类别">{{row.typeName || '--'}}</table-column>
|
||||
<table-column label="提案人">{{row.createUserName || '--'}}</table-column>
|
||||
<table-column label="代表团">{{row.delegationName || '--'}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName || '--'}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<van-icon name="eye-o"></van-icon>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="showSecondAction(row)" @click="onApproval(row)">
|
||||
<van-icon name="edit"></van-icon>
|
||||
<span>附议</span>
|
||||
</div>
|
||||
<!-- <div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">-->
|
||||
<!-- <span>撤回</span>-->
|
||||
<!-- </div>-->
|
||||
</template>
|
||||
</table-list>
|
||||
</div>
|
||||
<div v-else style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="primary" block @click="updateSecond(1)">同意</van-button>
|
||||
<van-button type="danger" block @click="updateSecond(2)">不同意</van-button>
|
||||
</main>
|
||||
|
||||
<van-popup
|
||||
v-model="detailVisible"
|
||||
class="proposal-seconded-popup"
|
||||
position="right"
|
||||
:close-on-click-overlay="false"
|
||||
safe-area-inset-bottom>
|
||||
<div class="proposal-seconded-popup-page">
|
||||
<van-nav-bar
|
||||
:title="popupTitle"
|
||||
left-arrow
|
||||
left-text="返回"
|
||||
fixed
|
||||
@click-left="closeHistoryLayer('detail')">
|
||||
</van-nav-bar>
|
||||
<div class="proposal-seconded-popup-scroll">
|
||||
<proposal-info v-if="detailVisible && detailBizId" :biz-id="detailBizId" :visible="detailVisible">
|
||||
<div v-if="isApproval">
|
||||
<section class="proposal-view-card proposal-seconded-opinion-card">
|
||||
<h2 class="proposal-view-card__title">
|
||||
提案附议
|
||||
<span class="proposal-audit-card__required">*</span>
|
||||
</h2>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
class="proposal-audit-field"
|
||||
name="tf_opinion"
|
||||
type="textarea"
|
||||
rows="6"
|
||||
label=""
|
||||
placeholder="请输入附议意见"
|
||||
:rules="[{ required: true, message: '请填写附议意见' }]"
|
||||
required
|
||||
maxlength="200"
|
||||
show-word-limit>
|
||||
</van-field>
|
||||
</van-form>
|
||||
</section>
|
||||
<div class="proposal-seconded-form-actions">
|
||||
<van-button type="danger" block :loading="formLoading" class="proposal-soft-button proposal-soft-button--danger" @click="submitSeconded(false)">不同意</van-button>
|
||||
<van-button type="primary" block :loading="formLoading" class="proposal-soft-button" @click="submitSeconded(true)">同意</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
</van-popup>
|
||||
|
||||
<van-dialog
|
||||
:value="submitConfirmVisible"
|
||||
title="提示"
|
||||
message="您确定要提交吗?"
|
||||
show-cancel-button
|
||||
@confirm="confirmSubmitSeconded"
|
||||
@cancel="closeHistoryLayer('submit-confirm')">
|
||||
</van-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
// 排序字段和方向为空时,后端使用任务创建时间倒序返回分页数据。
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
name: null,
|
||||
sessionId: null,
|
||||
approvalText: "0",
|
||||
@@ -100,18 +457,76 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
sessionOptions: [],
|
||||
row: null,
|
||||
// 任一筛选项展开时,将筛选栏切换为与下拉面板衔接的上圆角样式。
|
||||
filterOpened: false,
|
||||
approvalOptions: [
|
||||
{text: "未附议", value: "0"},
|
||||
{text: "已附议", value: "1"}
|
||||
],
|
||||
detailVisible: false,
|
||||
detailBizId: "",
|
||||
popupAction: "view",
|
||||
curTaskCode: "",
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
rules: {
|
||||
approvalSignature: [{required: true, message: "请签字"}]
|
||||
}
|
||||
formLoading: false,
|
||||
submitConfirmVisible: false,
|
||||
pendingSubmitAgree: true,
|
||||
historyLayerPageKey: "proposal-seconded-h5"
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
computed: {
|
||||
isApproval() {
|
||||
return this.popupAction === "approval"
|
||||
},
|
||||
popupTitle() {
|
||||
return this.isApproval ? "提案附议" : "提案详情"
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 注册附议提案页面弹层历史。
|
||||
* pageKey 使用固定页面标识;回调参数 stack 为当前弹层名称数组,无返回值。
|
||||
*/
|
||||
registerHistoryLayers() {
|
||||
if (!window.h5HistoryLayerManager) return
|
||||
window.h5HistoryLayerManager.register(this.historyLayerPageKey, (stack) => {
|
||||
this.syncHistoryLayerStack(stack)
|
||||
})
|
||||
},
|
||||
|
||||
// 根据浏览器历史栈同步详情 Popup 和提交确认 Dialog 的显示状态。
|
||||
syncHistoryLayerStack(stack) {
|
||||
this.$set(this, "detailVisible", stack.includes("detail"))
|
||||
this.$set(this, "submitConfirmVisible", stack.includes("submit-confirm"))
|
||||
},
|
||||
|
||||
// 打开弹层时同步增加当前地址的浏览器历史记录。
|
||||
openHistoryLayer(layerName) {
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open(layerName)) return
|
||||
this.setHistoryLayerVisible(layerName, true)
|
||||
},
|
||||
|
||||
// 主动关闭弹层时回退对应历史记录,afterClose 在历史状态同步后执行。
|
||||
closeHistoryLayer(layerName, afterClose = null) {
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.close(layerName, afterClose)) return
|
||||
this.setHistoryLayerVisible(layerName, false)
|
||||
if (typeof afterClose === "function") afterClose()
|
||||
},
|
||||
|
||||
setHistoryLayerVisible(layerName, visible) {
|
||||
if (layerName === "detail") this.$set(this, "detailVisible", visible)
|
||||
if (layerName === "submit-confirm") this.$set(this, "submitConfirmVisible", visible)
|
||||
},
|
||||
|
||||
// 页面返回时优先关闭最上层弹框,没有弹框时再返回上一业务页面。
|
||||
handlePageBack() {
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.stack.length) {
|
||||
window.h5HistoryLayerManager.close()
|
||||
return
|
||||
}
|
||||
this.historyBack()
|
||||
},
|
||||
|
||||
// 附议按钮显示规则:
|
||||
// 1. 当前任务进行中(taskState=10)时显示
|
||||
// 2. 当前任务已废弃(taskState=99)时,仅 invite、second、delegation、committee 节点显示
|
||||
@@ -119,102 +534,118 @@ layout("/layouts/platform_h5.html"){
|
||||
return row.taskState === 10 || (row.taskState === 99 && ["invite", "second", "preAudit", "delegation", "committee"].includes(row.taskKey))
|
||||
},
|
||||
onReady() {
|
||||
this.listSession()
|
||||
this.listSession(false)
|
||||
},
|
||||
listSession() {
|
||||
// 附议状态下拉框使用字符串值展示,查询接口使用布尔值区分已附议和未附议。
|
||||
approvalChange(value) {
|
||||
this.$set(this.pageForm, "approval", value === "1")
|
||||
this.doSearch()
|
||||
},
|
||||
listSession(skipDefaultSearch) {
|
||||
this.$axios.post("/platform/proposal/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = [
|
||||
{
|
||||
text: "全部届次",
|
||||
value: null
|
||||
}
|
||||
].concat(res.data.map((v) => ({text: v.fullName, value: v.id})))
|
||||
// 届次接口按开始时间倒序返回,首条即最新届次;无届次时继续按全部届次查询。
|
||||
if (res.data && res.data.length > 0) {
|
||||
this.$set(this.pageForm, "sessionId", res.data[0].id)
|
||||
}
|
||||
this.sessionOptions = [{text: "全部届次", value: null}]
|
||||
.concat(res.data.map((v) => ({text: v.fullName, value: v.id})))
|
||||
if (skipDefaultSearch) return
|
||||
// “全部届次”固定展示在首位,但首次查询仍默认使用接口倒序返回的最新届次。
|
||||
this.$set(this.pageForm, "sessionId", res.data.length > 0 ? res.data[0].id : null)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
this.$set(this, "detailBizId", row.id)
|
||||
this.$set(this, "popupAction", "view")
|
||||
this.$set(this, "curTaskCode", "")
|
||||
this.$set(this, "formData", {})
|
||||
this.openHistoryLayer("detail")
|
||||
},
|
||||
|
||||
/**
|
||||
* 打开提案附议 Popup。
|
||||
* row 包含提案、任务和附议人信息;这些字段用于详情查询、任务定位、附议人校验和提交链路选择。
|
||||
*/
|
||||
onApproval(row) {
|
||||
this.row = row
|
||||
this.showApprovalForm = true
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
this.formData = {
|
||||
this.$set(this, "detailBizId", row.id)
|
||||
this.$set(this, "popupAction", "approval")
|
||||
this.$set(this, "curTaskCode", row.curTaskCode || "")
|
||||
this.$set(this, "formData", {
|
||||
processTaskId: row.taskId,
|
||||
taskId: row.taskId,
|
||||
proposalId: row.id,
|
||||
taskActorUserId: row.taskActorUserId,
|
||||
taskName: row.curTaskName,
|
||||
taskName: row.curTaskName || "提案附议",
|
||||
tf_opinion: "同意该提案"
|
||||
}
|
||||
})
|
||||
this.openHistoryLayer("detail")
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "提案一旦提交,后续将无法自行修改或撤回。请您在提交前仔细确认。"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/proposal/seconded/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
// 表单校验通过后打开提交确认 Dialog,并记录本次附议结果。
|
||||
submitSeconded(isAgree) {
|
||||
this.$refs.formRef.validate()
|
||||
.then(() => {
|
||||
this.$set(this, "pendingSubmitAgree", isAgree)
|
||||
this.openHistoryLayer("submit-confirm")
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
.catch(() => {})
|
||||
},
|
||||
|
||||
updateSecond(submitType) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "提案一旦提交,后续将无法自行修改或撤回。请您在提交前仔细确认。"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/proposal/seconded/updateInfo", {
|
||||
// 确认提交时先关闭 Dialog 历史层,再调用附议接口。
|
||||
confirmSubmitSeconded() {
|
||||
this.closeHistoryLayer("submit-confirm", () => {
|
||||
this.doSubmitSeconded()
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 提交附议结果。
|
||||
* second 节点向 executeTask 提交完整 WF 数据,其他关联节点向 updateInfo 提交提案、任务、附议人和意见;接口返回 Result。
|
||||
*/
|
||||
doSubmitSeconded() {
|
||||
const isAgree = this.pendingSubmitAgree
|
||||
this.$set(this, "formLoading", true)
|
||||
const request = this.curTaskCode === "second"
|
||||
? this.$axios.post("/platform/proposal/seconded/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: isAgree ? 1 : 20
|
||||
})
|
||||
})
|
||||
: this.$axios.post("/platform/proposal/seconded/updateInfo", {
|
||||
proposalId: this.formData.proposalId,
|
||||
taskId: this.formData.taskId,
|
||||
taskActorUserId: this.formData.taskActorUserId,
|
||||
opinion: this.formData.tf_opinion,
|
||||
submitType: submitType,
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
submitType: isAgree ? 1 : 2
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
request.then((res) => {
|
||||
if (res && res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.closeHistoryLayer("detail", () => {
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
}).finally(() => {
|
||||
this.$set(this, "formLoading", false)
|
||||
})
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$set(this.pageForm, "pageNumber", 1)
|
||||
this.$set(this.pageForm, "totalCount", 0)
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.registerHistoryLayers()
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (window.h5HistoryLayerManager) {
|
||||
window.h5HistoryLayerManager.unregister(this.historyLayerPageKey)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+91
-98
@@ -2,35 +2,75 @@
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
<style>
|
||||
body { background-color: #f3f7fd; }
|
||||
.proposal-suggestion-page { min-height: 100vh; padding-bottom: calc(24px + env(safe-area-inset-bottom)); box-sizing: border-box; background-color: #f3f7fd; }
|
||||
.proposal-suggestion-page .van-nav-bar { background-color: #fff; }
|
||||
.proposal-suggestion-page .van-nav-bar__title { color: #172033; font-size: 16px; font-weight: 600; }
|
||||
.proposal-suggestion-page .van-nav-bar .van-icon, .proposal-suggestion-page .van-nav-bar__text { color: #1989fa; }
|
||||
.proposal-suggestion-content { padding: 0 12px; }
|
||||
.proposal-suggestion-sticky { padding: 22px 12px 1px; box-sizing: border-box; background-color: #f3f7fd; }
|
||||
.proposal-suggestion-search { margin: 0 0 8px; padding: 0; overflow: hidden; border-radius: 12px; background-color: #fff; box-shadow: 0 5px 16px rgba(43, 73, 112, .1); }
|
||||
.proposal-suggestion-search .van-search__content { height: 42px; padding-left: 12px; align-items: center; border-radius: 12px; background-color: #fff; }
|
||||
.proposal-suggestion-search .van-field__control { color: #263548; font-size: 14px; }
|
||||
.proposal-suggestion-search .van-field__control::placeholder { color: #a7b0bf; }
|
||||
.proposal-suggestion-filter { margin: 0 0 10px; overflow: hidden; border-radius: 10px; box-shadow: 0 5px 16px rgba(43, 73, 112, .08); transition: border-radius .18s ease; }
|
||||
.proposal-suggestion-filter.is-open { border-radius: 10px 10px 0 0; }
|
||||
.proposal-suggestion-filter .van-dropdown-menu__bar, .proposal-suggestion-filter .van-dropdown-menu__item, .proposal-suggestion-filter .van-dropdown-menu__title { height: 44px; }
|
||||
.proposal-suggestion-filter .van-dropdown-menu__bar { box-shadow: none; }
|
||||
.proposal-suggestion-filter .van-dropdown-menu__item, .proposal-suggestion-filter .van-dropdown-menu__title { align-items: center; }
|
||||
.proposal-suggestion-filter .van-dropdown-menu__item { justify-content: center; }
|
||||
.proposal-suggestion-filter .van-dropdown-menu__title { display: inline-flex; color: #66758a; font-size: 14px; line-height: 20px; }
|
||||
.proposal-suggestion-filter .van-dropdown-menu__title--active, .proposal-suggestion-filter .van-dropdown-item__option--active, .proposal-suggestion-filter .van-dropdown-item__option--active .van-dropdown-item__icon { color: #1989fa; }
|
||||
.proposal-suggestion-filter .van-dropdown-menu__title--down::after { border-color: transparent transparent #1989fa #1989fa; }
|
||||
.proposal-suggestion-filter .van-dropdown-item__content { width: calc(100% - 24px); margin: 0 12px; overflow: hidden; box-sizing: border-box; border-radius: 0 0 12px 12px; box-shadow: 0 10px 24px rgba(31, 65, 108, .14); }
|
||||
.proposal-suggestion-filter .van-dropdown-item__option { display: flex; min-height: 48px; padding: 0 16px; align-items: center; color: #46566c; font-size: 14px; }
|
||||
.proposal-suggestion-filter .van-cell::after { right: 16px; left: 16px; }
|
||||
.proposal-suggestion-list .empty-state { display: none; }
|
||||
.proposal-suggestion-empty { display: flex; min-height: 280px; padding: 46px 18px 36px; align-items: center; justify-content: center; flex-direction: column; box-sizing: border-box; text-align: center; }
|
||||
.proposal-suggestion-empty img { display: block; width: 86%; max-width: 290px; height: auto; object-fit: contain; }
|
||||
.proposal-suggestion-empty__title { margin-top: 14px; color: #50627a; font-size: 15px; line-height: 22px; font-weight: 600; }
|
||||
.proposal-suggestion-empty__hint { margin-top: 5px; color: #9aa7b8; font-size: 12px; line-height: 18px; }
|
||||
.van-button--small {
|
||||
height: 26px;
|
||||
}
|
||||
@media (max-width: 350px) { .proposal-suggestion-content, .proposal-suggestion-sticky { padding-right: 10px; padding-left: 10px; } }
|
||||
</style>
|
||||
<style id="style-proposal-task-popup-h5">
|
||||
<!--#include("../../common/info.css"){}#-->
|
||||
<!--#include("../theme.css"){}#-->
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="承办单位意见" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
<div class="proposal-suggestion-page">
|
||||
<van-nav-bar title="承办单位意见" left-text="返回" left-arrow @click-left="handlePageBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<div class="proposal-suggestion-sticky">
|
||||
<van-search
|
||||
v-model="pageForm.name"
|
||||
class="proposal-suggestion-search"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入提案名称搜索"
|
||||
shape="round"
|
||||
clearable
|
||||
@search="doSearch"
|
||||
@clear="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-menu class="proposal-suggestion-filter" :class="{'is-open': filterOpened}" active-color="#1989fa" :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
@change="doSearch" @open="setFilterOpened(true)" @close="setFilterOpened(false)"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.approvalText" :options="approvalOptions" :multiple="false"
|
||||
@change="approvalChange" @open="setFilterOpened(true)" @close="setFilterOpened(false)"></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>
|
||||
</div>
|
||||
</van-sticky>
|
||||
|
||||
<main class="proposal-suggestion-content"><div class="proposal-suggestion-list">
|
||||
<!-- 列表无记录时展示与团长审核一致的提案专用空状态。 -->
|
||||
<div v-if="pageForm.totalCount === 0" class="proposal-suggestion-empty"><img src="/assets/mobile/img/proposal/proposal-empty.png" alt="暂无提案记录插画"><div class="proposal-suggestion-empty__title">暂无提案记录</div><div class="proposal-suggestion-empty__hint">当前筛选条件下暂时没有提案</div></div>
|
||||
<table-list api="/platform/proposal/suggestion/pageData" :page_form.sync="pageForm" ref="tableListRef" title="name" @ready="onReady">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="提案编号">{{row.code}}</table-column>
|
||||
@@ -43,67 +83,31 @@ layout("/layouts/platform_h5.html"){
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<van-icon class="proposal-action-icon" name="eye-o"></van-icon>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="openSuggestion(row)" v-if="pageForm.approval === true">
|
||||
<i class="fa fa-eye"></i>
|
||||
<van-icon class="proposal-action-icon" name="eye-o"></van-icon>
|
||||
<span>查看意见</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onAudit(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<van-icon class="proposal-action-icon" name="edit"></van-icon>
|
||||
<span>反馈意见</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
</div></main>
|
||||
|
||||
<proposal-info ref="proposalInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">承办单位意见</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.result"
|
||||
name="result"
|
||||
label="承办意向"
|
||||
placeholder="请选择承办意向"
|
||||
:rules="[{ required: true, message: '必填' }]"
|
||||
required
|
||||
is-link
|
||||
@click="showPicker = true"
|
||||
></van-field>
|
||||
<van-popup v-model="showPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="dict.type.UNDERTAKE_SUGGESTION.map(item => item.code)"
|
||||
@confirm="(val) => {formData.result = val; showPicker = false}"
|
||||
@cancel="showPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
<van-field
|
||||
v-model="formData.opinion"
|
||||
name="opinion"
|
||||
label="反馈意见"
|
||||
placeholder="请输入反馈意见"
|
||||
:rules="[{ required: true, message: '必填' }]"
|
||||
required
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="primary" block @click="doSubmit">提交</van-button>
|
||||
<van-button block @click="">取消</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
|
||||
<van-action-sheet v-model="visible" title="意见信息">
|
||||
<div class="detail-container">
|
||||
<van-popup v-model="visible" position="right" class="proposal-full-popup" :close-on-click-overlay="false" get-container="#app">
|
||||
<div class="proposal-full-popup__page">
|
||||
<van-nav-bar @click-left="closeSuggestion" left-arrow left-text="返回" title="意见信息" placeholder fixed></van-nav-bar>
|
||||
<div class="proposal-full-popup__scroll detail-container">
|
||||
<van-cell-group :key="index" v-for="item,index in suggestionList">
|
||||
<template #title>
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<div>{{ '意见' + (index + 1) }}</div>
|
||||
<div>
|
||||
<van-button type="danger" @click="onDelete(item)" size="small">删除</van-button>
|
||||
<van-button type="danger" @click="onDelete(item)" size="small"><van-icon name="delete-o"></van-icon> 删除</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -115,19 +119,20 @@ layout("/layouts/platform_h5.html"){
|
||||
<span v-html="item.opinion"></span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</van-popup>
|
||||
<proposal-task-popup ref="taskPopup" kind="suggestion" page-key="proposal-suggestion-task" @success="doSearch"></proposal-task-popup>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
<!--#include("../../common/task-popup.js"){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ["UNDERTAKE_SUGGESTION"],
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
components: {"proposal-task-popup": PROPOSAL_TASK_POPUP},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
@@ -141,15 +146,21 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
sessionOptions: [],
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
|
||||
showPicker: false,
|
||||
filterOpened: false,
|
||||
approvalOptions: [
|
||||
{text: "未反馈", value: "0"},
|
||||
{text: "已反馈", value: "1"}
|
||||
],
|
||||
suggestionList: [],
|
||||
visible: false,
|
||||
historyLayerPageKey: "proposal-suggestion-list"
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
registerHistoryLayers() { window.h5HistoryLayerManager.register(this.historyLayerPageKey, (stack) => this.$set(this, "visible", stack.includes("opinions"))) },
|
||||
handlePageBack() { if (window.h5HistoryLayerManager.stack.length) { window.h5HistoryLayerManager.close(); return } historyBack() },
|
||||
closeSuggestion() { window.h5HistoryLayerManager.close("opinions") },
|
||||
setFilterOpened(value) { this.$set(this, "filterOpened", value) },
|
||||
onDelete(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
@@ -159,7 +170,7 @@ layout("/layouts/platform_h5.html"){
|
||||
.then(res => {
|
||||
if(res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.visible = false
|
||||
this.closeSuggestion()
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.fail(res.msg)
|
||||
@@ -172,12 +183,12 @@ layout("/layouts/platform_h5.html"){
|
||||
proposalId: row.id,
|
||||
}).then(res => {
|
||||
if(res.code === 0) {
|
||||
this.suggestionList = res.data
|
||||
this.$set(this, "suggestionList", res.data)
|
||||
if(this.suggestionList.length === 0) {
|
||||
this.$toast('暂无意见数')
|
||||
return
|
||||
}
|
||||
this.visible = true
|
||||
window.h5HistoryLayerManager.open("opinions")
|
||||
} else {
|
||||
this.$toast.fail(res.msg)
|
||||
}
|
||||
@@ -186,60 +197,42 @@ layout("/layouts/platform_h5.html"){
|
||||
onReady() {
|
||||
this.listSession()
|
||||
},
|
||||
// 反馈状态下拉框使用字符串值展示,查询接口使用布尔值区分已反馈和未反馈。
|
||||
approvalChange(value) {
|
||||
this.$set(this.pageForm, "approval", value === "1")
|
||||
this.doSearch()
|
||||
},
|
||||
listSession() {
|
||||
this.$axios.post("/platform/proposal/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = [
|
||||
this.$set(this, "sessionOptions", [
|
||||
{
|
||||
text: "全部届次",
|
||||
value: null
|
||||
}
|
||||
].concat(res.data.map((v) => ({text: v.fullName, value: v.id})))
|
||||
].concat(res.data.map((v) => ({text: v.fullName, value: v.id}))))
|
||||
// 届次接口按开始时间倒序返回,首条即最新届次;无届次时继续按全部届次查询。
|
||||
if (res.data && res.data.length > 0) {
|
||||
this.$set(this.pageForm, "sessionId", res.data[0].id)
|
||||
}
|
||||
this.$set(this.pageForm, "sessionId", res.data.length > 0 ? res.data[0].id : null)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
onAudit(row) {
|
||||
this.showApprovalForm = true
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
this.formData = {
|
||||
proposalId: row.id,
|
||||
}
|
||||
},
|
||||
async doSubmit() {
|
||||
try {
|
||||
await this.$refs.formRef.validate()
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/proposal/suggestion/suggest", this.formData)
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
} catch (error) {}
|
||||
this.$refs.taskPopup.open(row, "approval")
|
||||
},
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
this.$refs.taskPopup.open(row, "view")
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$set(this.pageForm, "pageNumber", 1)
|
||||
this.$set(this.pageForm, "totalCount", 0)
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
created() { this.registerHistoryLayers() },
|
||||
beforeDestroy() { window.h5HistoryLayerManager.unregister(this.historyLayerPageKey) }
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
/* 提案办理页统一使用 #1989fa 品牌蓝,并覆盖动态弹框及 Vant 组件继承的全局主题色。 */
|
||||
:root {
|
||||
--color-primary: #1989fa;
|
||||
}
|
||||
|
||||
/* 公共提案详情组件拥有独立主题变量,需要在办理页内同步覆盖。 */
|
||||
.proposal-view {
|
||||
--proposal-view-primary: #1989fa;
|
||||
}
|
||||
|
||||
.proposal-flow-node__icon {
|
||||
box-shadow: 0 2px 7px rgba(25, 137, 250, 0.22);
|
||||
}
|
||||
|
||||
.proposal-flow-node.is-active .proposal-flow-node__icon {
|
||||
box-shadow: 0 0 0 5px #e7f2ff, 0 3px 9px rgba(25, 137, 250, 0.28);
|
||||
}
|
||||
+389
-231
@@ -1,272 +1,420 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style>
|
||||
body {
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-page {
|
||||
min-height: 100vh;
|
||||
padding-bottom: calc(24px + env(safe-area-inset-bottom));
|
||||
box-sizing: border-box;
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-page .van-nav-bar {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-page .van-nav-bar__title {
|
||||
color: #172033;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-page .van-nav-bar .van-icon,
|
||||
.proposal-unit-reply-page .van-nav-bar__text {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-content {
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-sticky {
|
||||
padding: 22px 12px 1px;
|
||||
box-sizing: border-box;
|
||||
background-color: #f3f7fd;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-search {
|
||||
margin: 0 0 8px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
border-radius: 12px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 5px 16px rgba(43, 73, 112, .1);
|
||||
}
|
||||
|
||||
.proposal-unit-reply-search .van-search__content {
|
||||
height: 42px;
|
||||
padding-left: 12px;
|
||||
align-items: center;
|
||||
border-radius: 12px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-search .van-field__control {
|
||||
color: #263548;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-search .van-field__control::placeholder {
|
||||
color: #a7b0bf;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-filter {
|
||||
margin: 0 0 10px;
|
||||
overflow: hidden;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 5px 16px rgba(43, 73, 112, .08);
|
||||
transition: border-radius .18s ease;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-filter.is-open {
|
||||
border-radius: 10px 10px 0 0;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-filter .van-dropdown-menu__bar,
|
||||
.proposal-unit-reply-filter .van-dropdown-menu__item,
|
||||
.proposal-unit-reply-filter .van-dropdown-menu__title {
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-filter .van-dropdown-menu__bar {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-filter .van-dropdown-menu__item,
|
||||
.proposal-unit-reply-filter .van-dropdown-menu__title {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-filter .van-dropdown-menu__item {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-filter .van-dropdown-menu__title {
|
||||
display: inline-flex;
|
||||
color: #66758a;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-filter .van-dropdown-menu__title--active,
|
||||
.proposal-unit-reply-filter .van-dropdown-item__option--active,
|
||||
.proposal-unit-reply-filter .van-dropdown-item__option--active .van-dropdown-item__icon {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-filter .van-dropdown-menu__title--down::after {
|
||||
border-color: transparent transparent #1989fa #1989fa;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-filter .van-dropdown-item__content {
|
||||
width: calc(100% - 24px);
|
||||
margin: 0 12px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
border-radius: 0 0 12px 12px;
|
||||
box-shadow: 0 10px 24px rgba(31, 65, 108, .14);
|
||||
}
|
||||
|
||||
.proposal-unit-reply-filter .van-dropdown-item__option {
|
||||
display: flex;
|
||||
min-height: 48px;
|
||||
padding: 0 16px;
|
||||
align-items: center;
|
||||
color: #46566c;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-filter .van-cell::after {
|
||||
right: 16px;
|
||||
left: 16px;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-list .empty-state {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-empty {
|
||||
display: flex;
|
||||
min-height: 280px;
|
||||
padding: 46px 18px 36px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-empty img {
|
||||
display: block;
|
||||
width: 86%;
|
||||
max-width: 290px;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-empty__title {
|
||||
margin-top: 14px;
|
||||
color: #50627a;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-empty__hint {
|
||||
margin-top: 5px;
|
||||
color: #9aa7b8;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-card-header {
|
||||
display: flex;
|
||||
margin-bottom: 7px;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-card-heading {
|
||||
min-width: 0;
|
||||
padding-right: 10px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-card-title {
|
||||
overflow: hidden;
|
||||
color: #253247;
|
||||
font-size: 15px;
|
||||
line-height: 22px;
|
||||
font-weight: 600;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-card-code {
|
||||
margin-top: 1px;
|
||||
color: #9ba6b6;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-status {
|
||||
display: inline-flex;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.proposal-unit-reply-status .van-tag {
|
||||
display: inline-flex;
|
||||
min-height: 24px;
|
||||
padding: 3px 9px;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
border: 0;
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* 转办弹框底部直接使用页面浅蓝底色承载操作按钮,避免出现独立白色操作栏。 */
|
||||
.proposal-full-popup__page > .button-group.proposal-transfer-button-group {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.proposal-transfer-button-group .van-button {
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
||||
.proposal-transfer-button-group .proposal-transfer-cancel-button {
|
||||
border-color: transparent;
|
||||
color: #46566c;
|
||||
background-color: rgba(255, 255, 255, .78);
|
||||
box-shadow: 0 4px 12px rgba(43, 73, 112, .08), inset 0 1px 1px rgba(255, 255, 255, .82);
|
||||
}
|
||||
|
||||
@media (max-width: 350px) {
|
||||
.proposal-unit-reply-content,
|
||||
.proposal-unit-reply-sticky {
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style id="style-proposal-task-popup-h5">
|
||||
<!--#include("../../common/info.css"){}#-->
|
||||
<!--#include("../theme.css"){}#-->
|
||||
</style>
|
||||
<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
|
||||
v-model="pageForm.name"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入提案名称搜索"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionOptions" :multiple="false"
|
||||
@change="doSearch"></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>
|
||||
|
||||
<table-list api="/platform/proposal/unitReply/pageData" :page_form.sync="pageForm" @ready="onReady"
|
||||
ref="tableListRef"
|
||||
title="name">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="提案编号">{{row.code}}</table-column>
|
||||
<table-column label="提案类别">{{row.typeName}}</table-column>
|
||||
<table-column label="提案人">{{row.createUserName}}</table-column>
|
||||
<table-column label="代表团">{{row.delegationName}}</table-column>
|
||||
<!-- 工作建议的办理单位均按“承办”展示,其他提案保留主办、协办区分。 -->
|
||||
<table-column label="承办单位">{{row.underTakeName}}({{row.caseFilingResult === 'SUGGESTION' ? '承办' : (row.underTakeIsMaster ? '主办' : '协办')}})
|
||||
</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
<div class="proposal-unit-reply-page">
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="承办单位答复" placeholder fixed></van-nav-bar>
|
||||
<van-sticky :offset-top="46">
|
||||
<div class="proposal-unit-reply-sticky">
|
||||
<van-search
|
||||
v-model="pageForm.name"
|
||||
class="proposal-unit-reply-search"
|
||||
placeholder="请输入提案名称搜索"
|
||||
shape="round"
|
||||
clearable
|
||||
@search="doSearch"
|
||||
@clear="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu
|
||||
class="proposal-unit-reply-filter"
|
||||
:class="{'is-open': filterOpened}"
|
||||
active-color="#1989fa"
|
||||
>
|
||||
<van-dropdown-item
|
||||
v-model="pageForm.sessionId"
|
||||
:options="sessionOptions"
|
||||
:multiple="false"
|
||||
@change="doSearch"
|
||||
@open="filterOpened = true"
|
||||
@close="filterOpened = false"
|
||||
></van-dropdown-item>
|
||||
<van-dropdown-item
|
||||
v-model="pageForm.approvalText"
|
||||
:options="approvalOptions"
|
||||
:multiple="false"
|
||||
@change="approvalChange"
|
||||
@open="filterOpened = true"
|
||||
@close="filterOpened = false"
|
||||
></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>答复</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-reply"></i>
|
||||
<span>撤回</span>
|
||||
</van-sticky>
|
||||
|
||||
<main class="proposal-unit-reply-content">
|
||||
<div class="proposal-unit-reply-list">
|
||||
<!-- 列表无记录时使用与团长审核一致的提案专用空状态。 -->
|
||||
<div v-if="pageForm.totalCount === 0" class="proposal-unit-reply-empty">
|
||||
<img src="/assets/mobile/img/proposal/proposal-empty.png" alt="暂无提案记录插画">
|
||||
<div class="proposal-unit-reply-empty__title">暂无提案记录</div>
|
||||
<div class="proposal-unit-reply-empty__hint">当前筛选条件下暂时没有提案</div>
|
||||
</div>
|
||||
<table-list api="/platform/proposal/unitReply/pageData" :page_form.sync="pageForm" @ready="onReady"
|
||||
ref="tableListRef"
|
||||
title="name">
|
||||
<template #header="{index,row}">
|
||||
<div class="proposal-unit-reply-card-header">
|
||||
<div class="proposal-unit-reply-card-heading">
|
||||
<div class="proposal-unit-reply-card-title">{{row.name}}</div>
|
||||
<div class="proposal-unit-reply-card-code">编号:{{row.code || '--'}}</div>
|
||||
</div>
|
||||
<enum-tag
|
||||
class="proposal-unit-reply-status"
|
||||
v-if="row.instanceState"
|
||||
:value="row.instanceState"
|
||||
name="ProcessInstanceStateEnum"
|
||||
label_key="message"
|
||||
size="small"
|
||||
></enum-tag>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="提案类别">{{row.typeName || '--'}}</table-column>
|
||||
<table-column label="提案人">{{row.createUserName || '--'}}</table-column>
|
||||
<table-column label="代表团">{{row.delegationName || '--'}}</table-column>
|
||||
<table-column label="承办单位">{{row.underTakeName || '--'}}({{row.underTakeIsMaster ? '主办' : '协办'}})</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName || '--'}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row,index)">
|
||||
<van-icon class="proposal-action-icon" name="eye-o"></van-icon>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row,index)">
|
||||
<van-icon class="proposal-action-icon" name="edit"></van-icon>
|
||||
<span>答复</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<van-icon class="proposal-action-icon" name="revoke"></van-icon>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
|
||||
<!-- 承办单位领导、超级管理员才能转办。 -->
|
||||
<div class="action-btn" v-if="!pageForm.approval && $auth.hasRoleOr('SYSADMIN,PROPOSAL_UNIT_LEADER')"
|
||||
@click="openTransfer(row)">
|
||||
<van-icon class="proposal-action-icon" name="exchange"></van-icon>
|
||||
<span>转交</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<!--承办单位领导、超级管理员才能转办-->
|
||||
<div class="action-btn" v-if="!pageForm.approval && $auth.hasRoleOr('SYSADMIN,PROPOSAL_UNIT_LEADER')"
|
||||
@click="openTransfer(row)">
|
||||
<i class="fa fa-arrow-right"></i>
|
||||
<span>转交</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<proposal-info ref="proposalInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.taskName}}</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field :value="formData.underTakeName"
|
||||
label="承办单位"
|
||||
readonly></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.tf_implementStateName"
|
||||
name="tf_implementStateName"
|
||||
label="落实情况"
|
||||
placeholder="请选择落实情况"
|
||||
:rules="[{ required: true, message: '请选择落实情况' }]"
|
||||
required
|
||||
is-link
|
||||
@click="showImplementPicker = true"
|
||||
></van-field>
|
||||
<van-popup v-model="showImplementPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="dict.type.PROPOSAL_REPLY_IMPLEMENT.map(item => ({text: item.label, value: item.code}))"
|
||||
@confirm="onImplementConfirm"
|
||||
@cancel="showImplementPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
name="tf_opinion"
|
||||
label="答复内容"
|
||||
placeholder="请输入答复内容"
|
||||
:rules="[{ required: true, message: '请填写答复内容' }]"
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-if="supportCandidate && formData.underTakeIsMaster"
|
||||
v-model="formData.tf_nextNodeOperatorName"
|
||||
name="tf_nextNodeOperatorName"
|
||||
label="校领导"
|
||||
placeholder="校领导"
|
||||
:rules="[{ required: true, message: '请选择校领导' }]"
|
||||
required
|
||||
is-link
|
||||
@click="showCandidatesPicker = true"
|
||||
></van-field>
|
||||
<van-popup v-model="showCandidatesPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="candidates.map(item => ({text: item.userName, value: item.userId}))"
|
||||
@confirm="onCandidatesConfirm"
|
||||
@cancel="showCandidatesPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">提交</van-button>
|
||||
<van-button block @click="$refs.proposalInfoRef.onClose()">取消</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</proposal-info>
|
||||
|
||||
<transfer ref="transferRef"></transfer>
|
||||
<transfer ref="transferRef" @success="doSearch"></transfer>
|
||||
<proposal-task-popup ref="taskPopup" kind="unitReply" page-key="proposal-unit-reply-task" @success="doSearch"></proposal-task-popup>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
<!--#include("transfer.js"){}#-->
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
<!--#include("../../common/task-popup.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ['PROPOSAL_REPLY_IMPLEMENT'],
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: "",
|
||||
name: null,
|
||||
sessionId: null,
|
||||
approvalText: "0",
|
||||
approval: false
|
||||
},
|
||||
|
||||
sessionOptions: [],
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
|
||||
showImplementPicker: false,
|
||||
|
||||
supportCandidate: false,
|
||||
candidates: [],
|
||||
showCandidatesPicker: false,
|
||||
|
||||
filterOpened: false,
|
||||
approvalOptions: [
|
||||
{text: "未审核", value: "0"},
|
||||
{text: "已审核", value: "1"}
|
||||
],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO,
|
||||
"transfer": transfer
|
||||
"transfer": transfer,
|
||||
"proposal-task-popup": PROPOSAL_TASK_POPUP
|
||||
},
|
||||
methods: {
|
||||
onReady() {
|
||||
this.listSession()
|
||||
this.listSession(false)
|
||||
},
|
||||
listSession() {
|
||||
|
||||
// 审核状态下拉框使用字符串值展示,查询接口使用布尔值区分已审核和未审核。
|
||||
approvalChange(value) {
|
||||
this.$set(this.pageForm, "approval", value === "1")
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
// 缓存恢复时只加载届次选项,不覆盖离开列表前的筛选条件和列表快照。
|
||||
listSession(skipDefaultSearch) {
|
||||
this.$axios.post("/platform/proposal/common/listSession").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.sessionOptions = [
|
||||
{
|
||||
text: "全部届次",
|
||||
value: null
|
||||
}
|
||||
].concat(res.data.map((v) => ({text: v.fullName, value: v.id})))
|
||||
this.sessionOptions = [{text: "全部届次", value: null}]
|
||||
.concat(res.data.map((item) => ({text: item.fullName, value: item.id})))
|
||||
if (skipDefaultSearch) return
|
||||
// 届次接口按开始时间倒序返回,首条即最新届次;无届次时继续按全部届次查询。
|
||||
if (res.data && res.data.length > 0) {
|
||||
this.$set(this.pageForm, "sessionId", res.data[0].id)
|
||||
}
|
||||
this.$set(this.pageForm, "sessionId", res.data.length > 0 ? res.data[0].id : null)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
onView(row, index) {
|
||||
this.$refs.taskPopup.open(row, "view")
|
||||
},
|
||||
|
||||
async onApproval(row) {
|
||||
// 与 PC 端答复入口保持一致,确认已沟通后才允许进入答复表单。
|
||||
try {
|
||||
await this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "是否已与提案代表进行充分沟通?",
|
||||
confirmButtonText: "是",
|
||||
cancelButtonText: "否"
|
||||
})
|
||||
} catch (error) {
|
||||
return
|
||||
}
|
||||
|
||||
this.loadCandidates(row.taskId)
|
||||
|
||||
this.showApprovalForm = true
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskKey: row.taskKey,
|
||||
taskName: row.taskName,
|
||||
proposalId: row.id,
|
||||
underTakeName: row.underTakeName,
|
||||
underTakeIsMaster: row.underTakeIsMaster
|
||||
}
|
||||
},
|
||||
|
||||
// 加载候选人列表
|
||||
loadCandidates(taskId) {
|
||||
$.get("/flow/common/candidate", {taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.candidates = res.data.candidates
|
||||
this.supportCandidate = res.data.support
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onImplementConfirm(value) {
|
||||
this.$set(this.formData, "tf_implementStateName", value.text)
|
||||
this.$set(this.formData, "tf_implementState", value.value)
|
||||
this.showImplementPicker = false
|
||||
},
|
||||
|
||||
onCandidatesConfirm(value) {
|
||||
this.$set(this.formData, "tf_nextNodeOperatorName", value.text)
|
||||
this.$set(this.formData, "tf_nextNodeOperator", value.value)
|
||||
this.showCandidatesPicker = false
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
delete this.formData.underTakeIsMaster
|
||||
delete this.formData.underTakeName
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.proposalInfoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
onApproval(row, index) {
|
||||
this.$refs.taskPopup.open(row, "approval")
|
||||
},
|
||||
|
||||
onRevoke(row) {
|
||||
@@ -283,18 +431,28 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
},
|
||||
|
||||
// 打开转办
|
||||
openTransfer(row){
|
||||
// 打开转办。
|
||||
openTransfer(row) {
|
||||
this.$refs.transferRef.openTransfer(row)
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$set(this.pageForm, "pageNumber", 1)
|
||||
this.$set(this.pageForm, "totalCount", 0)
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const tab = new URLSearchParams(window.location.search).get("tab")
|
||||
if (tab === "done") {
|
||||
this.$set(this.pageForm, "approval", true)
|
||||
this.$set(this.pageForm, "approvalText", "1")
|
||||
} else if (tab === "todo") {
|
||||
this.$set(this.pageForm, "approval", false)
|
||||
this.$set(this.pageForm, "approvalText", "0")
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+47
-136
@@ -1,147 +1,58 @@
|
||||
const transfer = {
|
||||
template: /*language=HTML*/ `
|
||||
<van-action-sheet v-model="showTransferDialog" title="提案转办">
|
||||
<div class="transfer-dialog">
|
||||
<!-- 提案信息 -->
|
||||
<div class="proposal-info-card">
|
||||
<div class="info-item"><label>提案编号:</label><span>{{transferForm.code}}</span></div>
|
||||
<div class="info-item"><label>提案名称:</label><span>{{transferForm.name}}</span></div>
|
||||
<div class="info-item"><label>代表团:</label><span>{{transferForm.delegationName}}</span></div>
|
||||
</div>
|
||||
|
||||
<!-- 用户选择 -->
|
||||
<van-field v-model="searchKeyword" label="转交给" placeholder="搜索用户" required readonly @click="showUserList=true"></van-field>
|
||||
<van-popup v-model="showUserList" position="bottom">
|
||||
<van-search v-model="keyword" placeholder="搜索用户" @search="selectTransferUser(keyword)" @cancel="showUserList=false"></van-search>
|
||||
<van-empty v-if="transferUserOptions.length === 0" class="empty-tip">请搜索需要转办的用户</van-empty>
|
||||
<van-cell v-for="item in transferUserOptions" :key="item.id" :title="item.username" @click="selectUser(item)"></van-cell>
|
||||
</van-popup>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<div class="button-group">
|
||||
<van-button block plain @click="showTransferDialog = false" class="cancel-btn">取消</van-button>
|
||||
<van-button block type="info" @click="handleTransfer" class="submit-btn">提交</van-button>
|
||||
<van-popup v-model="showTransferDialog" position="right" class="proposal-full-popup" :close-on-click-overlay="false" get-container="#app">
|
||||
<div class="proposal-full-popup__page">
|
||||
<van-nav-bar @click-left="closeTransfer" left-arrow left-text="返回" title="提案转办" placeholder fixed></van-nav-bar>
|
||||
<div class="proposal-full-popup__scroll transfer-dialog">
|
||||
<div class="proposal-info-card">
|
||||
<div class="info-item"><label>提案编号:</label><span>{{transferForm.code}}</span></div>
|
||||
<div class="info-item"><label>提案名称:</label><span>{{transferForm.name}}</span></div>
|
||||
<div class="info-item"><label>代表团:</label><span>{{transferForm.delegationName}}</span></div>
|
||||
</div>
|
||||
<div class="proposal-info-card">
|
||||
<van-field v-model="searchKeyword" label="转交给" placeholder="搜索用户" required readonly is-link @click="openUserList"></van-field>
|
||||
</div>
|
||||
</div>
|
||||
<div class="button-group proposal-transfer-button-group"><van-button block plain class="proposal-transfer-cancel-button" @click="closeTransfer">取消</van-button><van-button block type="info" class="proposal-soft-button" @click="handleTransfer">提交</van-button></div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
<van-popup v-model="showUserList" position="right" class="proposal-full-popup" :close-on-click-overlay="false" get-container="#app">
|
||||
<div class="proposal-full-popup__page">
|
||||
<van-nav-bar @click-left="closeUserList" left-arrow left-text="返回" title="选择转交人" placeholder fixed></van-nav-bar>
|
||||
<div class="proposal-full-popup__scroll">
|
||||
<van-search v-model="keyword" placeholder="搜索用户" @search="selectTransferUser(keyword)"></van-search>
|
||||
<div class="proposal-view-main">
|
||||
<div v-if="transferUserOptions.length" class="proposal-info-card"><van-cell v-for="item in transferUserOptions" :key="item.id" :title="item.username" @click="selectUser(item)"></van-cell></div>
|
||||
<van-empty v-else class="empty-tip">请搜索需要转办的用户</van-empty>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
<van-dialog :value="confirmVisible" title="提示" :message="confirmMessage" show-cancel-button @confirm="confirmTransfer" @cancel="closeConfirm"></van-dialog>
|
||||
</van-popup>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
showTransferDialog: false,
|
||||
transferForm: {},
|
||||
transferUserOptions: [],
|
||||
searchKeyword: '',
|
||||
showUserList: false,
|
||||
keyword: ''
|
||||
return {showTransferDialog:false,transferForm:{},transferUserOptions:[],searchKeyword:"",showUserList:false,keyword:"",confirmVisible:false,historyLayerPageKey:"proposal-unit-reply-transfer",unsubscribeHistoryLayer:null}
|
||||
},
|
||||
computed: {
|
||||
confirmMessage() {
|
||||
const item=this.transferUserOptions.find((option) => option.id === this.transferForm.userId)
|
||||
return "您确定要将" + (this.transferForm.name || "") + "提案转交给" + (item ? item.username : "") + "办理吗?"
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openTransfer(row) {
|
||||
this.showTransferDialog = true
|
||||
this.transferForm = { taskId: row.taskId, name: row.name, code: row.code, delegationName: row.delegationName }
|
||||
this.searchKeyword = ''
|
||||
},
|
||||
selectUser(item) {
|
||||
this.transferForm.userId = item.id
|
||||
this.searchKeyword = item.username
|
||||
this.showUserList = false
|
||||
},
|
||||
selectTransferUser(keyword) {
|
||||
this.$axios.post("/platform/proposal/unitReply/selectViceUser", {keyword}).then(res => {
|
||||
if (res.code === 0) this.transferUserOptions = res.data
|
||||
})
|
||||
},
|
||||
|
||||
// 转办
|
||||
handleTransfer() {
|
||||
if (!this.transferForm.userId) {
|
||||
this.$toast('请选择转交用户')
|
||||
return
|
||||
}
|
||||
|
||||
const transferUserName = this.transferUserOptions.find(item => item.id === this.transferForm.userId)?.username
|
||||
const name = this.transferForm.name
|
||||
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: `您确定要将` + name + `提案转交给` + transferUserName + `办理吗?`,
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/proposal/unitReply/transfer', this.transferForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.showTransferDialog = false
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
// 取消操作
|
||||
})
|
||||
}
|
||||
syncLayers(stack) { this.$set(this,"showTransferDialog",stack.includes("transfer")); this.$set(this,"showUserList",stack.includes("user-list")); this.$set(this,"confirmVisible",stack.includes("confirm")) },
|
||||
openTransfer(row) { this.$set(this,"transferForm",{taskId:row.taskId,name:row.name,code:row.code,delegationName:row.delegationName}); this.$set(this,"searchKeyword",""); window.h5HistoryLayerManager.open("transfer") },
|
||||
closeTransfer() { window.h5HistoryLayerManager.close("transfer") },
|
||||
openUserList() { window.h5HistoryLayerManager.open("user-list") },
|
||||
closeUserList() { window.h5HistoryLayerManager.close("user-list") },
|
||||
closeConfirm() { window.h5HistoryLayerManager.close("confirm") },
|
||||
selectUser(item) { this.$set(this.transferForm,"userId",item.id); this.$set(this,"searchKeyword",item.username); this.closeUserList() },
|
||||
/** keyword 为姓名关键字,接口返回可转交用户数组。 */
|
||||
selectTransferUser(keyword) { this.$axios.post("/platform/proposal/unitReply/selectViceUser",{keyword:keyword}).then((res) => { if (res.code === 0) this.$set(this,"transferUserOptions",res.data || []) }) },
|
||||
handleTransfer() { if (!this.transferForm.userId) { this.$toast("请选择转交用户"); return } window.h5HistoryLayerManager.open("confirm") },
|
||||
/** 提交 taskId 和 userId 完成转办,成功后清理弹层并通知父列表刷新。 */
|
||||
confirmTransfer() { this.$axios.post("/platform/proposal/unitReply/transfer",this.transferForm).then((res) => { if (res.code === 0) { this.$toast.success(res.msg); window.h5HistoryLayerManager.closeAll(() => this.$emit("success")) } }) }
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.transfer-dialog {
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
padding: 16px 16px 65px;
|
||||
}
|
||||
|
||||
.proposal-info-card {
|
||||
background: #f8f9fa;
|
||||
border-radius: 8px;
|
||||
padding: 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.proposal-info-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.info-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.info-item label {
|
||||
font-size: 12px;
|
||||
color: #969799;
|
||||
}
|
||||
|
||||
.info-item span {
|
||||
font-size: 14px;
|
||||
color: #323233;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.button-group {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 16px;
|
||||
background: #fff;
|
||||
border-top: 1px solid #ebedf0;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
column-gap: 10px;
|
||||
padding: 10px
|
||||
}
|
||||
|
||||
.cancel-btn,
|
||||
.submit-btn {
|
||||
|
||||
}
|
||||
|
||||
.empty-tip {
|
||||
text-align: center;
|
||||
padding: 50px 16px;
|
||||
color: #969799;
|
||||
font-size: 14px;
|
||||
}
|
||||
`
|
||||
created() { window.h5HistoryLayerManager.ensureRegistered(this.historyLayerPageKey); this.$set(this,"unsubscribeHistoryLayer",window.h5HistoryLayerManager.subscribe((stack) => this.syncLayers(stack))) },
|
||||
beforeDestroy() { if (this.unsubscribeHistoryLayer) this.unsubscribeHistoryLayer(); if (window.h5HistoryLayerManager.pageKey === this.historyLayerPageKey) window.h5HistoryLayerManager.unregister(this.historyLayerPageKey) }
|
||||
}
|
||||
|
||||
+103
-13
@@ -1,28 +1,73 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<style>
|
||||
body { background-color: #f3f7fd; }
|
||||
.proposal-vice-delegation-page { min-height: 100vh; padding-bottom: calc(24px + env(safe-area-inset-bottom)); box-sizing: border-box; background-color: #f3f7fd; }
|
||||
.proposal-vice-delegation-page .van-nav-bar { background-color: #fff; }
|
||||
.proposal-vice-delegation-page .van-nav-bar__title { color: #172033; font-size: 16px; font-weight: 600; }
|
||||
.proposal-vice-delegation-page .van-nav-bar .van-icon, .proposal-vice-delegation-page .van-nav-bar__text { color: #1989fa; }
|
||||
.proposal-vice-delegation-content { padding: 0 12px; }
|
||||
.proposal-vice-delegation-sticky { padding: 22px 12px 1px; box-sizing: border-box; background-color: #f3f7fd; }
|
||||
.proposal-vice-delegation-search { margin: 0 0 8px; padding: 0; overflow: hidden; border-radius: 12px; background-color: #fff; box-shadow: 0 5px 16px rgba(43, 73, 112, .1); }
|
||||
.proposal-vice-delegation-search .van-search__content { height: 42px; padding-left: 12px; align-items: center; border-radius: 12px; background-color: #fff; }
|
||||
.proposal-vice-delegation-search .van-field__control { color: #263548; font-size: 14px; }
|
||||
.proposal-vice-delegation-search .van-field__control::placeholder { color: #a7b0bf; }
|
||||
.proposal-vice-delegation-filter { margin: 0 0 10px; overflow: hidden; border-radius: 10px; box-shadow: 0 5px 16px rgba(43, 73, 112, .08); transition: border-radius .18s ease; }
|
||||
.proposal-vice-delegation-filter.is-open { border-radius: 10px 10px 0 0; }
|
||||
.proposal-vice-delegation-filter .van-dropdown-menu__bar, .proposal-vice-delegation-filter .van-dropdown-menu__item, .proposal-vice-delegation-filter .van-dropdown-menu__title { height: 44px; }
|
||||
.proposal-vice-delegation-filter .van-dropdown-menu__bar { box-shadow: none; }
|
||||
.proposal-vice-delegation-filter .van-dropdown-menu__item, .proposal-vice-delegation-filter .van-dropdown-menu__title { align-items: center; }
|
||||
.proposal-vice-delegation-filter .van-dropdown-menu__item { justify-content: center; }
|
||||
.proposal-vice-delegation-filter .van-dropdown-menu__title { display: inline-flex; color: #66758a; font-size: 14px; line-height: 20px; }
|
||||
.proposal-vice-delegation-filter .van-dropdown-menu__title--active, .proposal-vice-delegation-filter .van-dropdown-item__option--active, .proposal-vice-delegation-filter .van-dropdown-item__option--active .van-dropdown-item__icon { color: #1989fa; }
|
||||
.proposal-vice-delegation-filter .van-dropdown-menu__title--down::after { border-color: transparent transparent #1989fa #1989fa; }
|
||||
.proposal-vice-delegation-filter .van-dropdown-item__content { width: calc(100% - 24px); margin: 0 12px; overflow: hidden; box-sizing: border-box; border-radius: 0 0 12px 12px; box-shadow: 0 10px 24px rgba(31, 65, 108, .14); }
|
||||
.proposal-vice-delegation-filter .van-dropdown-item__option { display: flex; min-height: 48px; padding: 0 16px; align-items: center; color: #46566c; font-size: 14px; }
|
||||
.proposal-vice-delegation-filter .van-cell::after { right: 16px; left: 16px; }
|
||||
.proposal-vice-delegation-list .empty-state { display: none; }
|
||||
.proposal-vice-delegation-empty { display: flex; min-height: 280px; padding: 46px 18px 36px; align-items: center; justify-content: center; flex-direction: column; box-sizing: border-box; text-align: center; }
|
||||
.proposal-vice-delegation-empty img { display: block; width: 86%; max-width: 290px; height: auto; object-fit: contain; }
|
||||
.proposal-vice-delegation-empty__title { margin-top: 14px; color: #50627a; font-size: 15px; line-height: 22px; font-weight: 600; }
|
||||
.proposal-vice-delegation-empty__hint { margin-top: 5px; color: #9aa7b8; font-size: 12px; line-height: 18px; }
|
||||
@media (max-width: 350px) { .proposal-vice-delegation-content, .proposal-vice-delegation-sticky { padding-right: 10px; padding-left: 10px; } }
|
||||
</style>
|
||||
<style id="style-proposal-vice-delegation-h5">
|
||||
<!--#include("../../common/info.css"){}#-->
|
||||
<!--#include("../theme.css"){}#-->
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="团长审核" placeholder fixed></van-nav-bar>
|
||||
<div class="proposal-vice-delegation-page">
|
||||
<van-nav-bar @click-left="handlePageBack" left-arrow left-text="返回" title="团长审核" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<div class="proposal-vice-delegation-sticky">
|
||||
<van-search
|
||||
v-model="pageForm.name"
|
||||
class="proposal-vice-delegation-search"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入提案名称搜索"
|
||||
shape="round"
|
||||
clearable
|
||||
@search="doSearch"
|
||||
@clear="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-menu class="proposal-vice-delegation-filter" :class="{'is-open': filterOpened}" active-color="#1989fa" :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item v-model="pageForm.sessionId" :options="sessionOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
@change="doSearch" @open="setFilterOpened(true)" @close="setFilterOpened(false)"></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>-->
|
||||
</div>
|
||||
</van-sticky>
|
||||
|
||||
<main class="proposal-vice-delegation-content"><div class="proposal-vice-delegation-list">
|
||||
<!-- 列表无记录时展示与团长审核一致的提案专用空状态。 -->
|
||||
<div v-if="pageForm.totalCount === 0" class="proposal-vice-delegation-empty"><img src="/assets/mobile/img/proposal/proposal-empty.png" alt="暂无提案记录插画"><div class="proposal-vice-delegation-empty__title">暂无提案记录</div><div class="proposal-vice-delegation-empty__hint">当前筛选条件下暂时没有提案</div></div>
|
||||
<table-list api="/platform/proposal/vice/delegation/pageData" :page_form.sync="pageForm" @ready="onReady"
|
||||
ref="tableListRef"
|
||||
title="name">
|
||||
@@ -35,21 +80,33 @@ layout("/layouts/platform_h5.html"){
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<van-icon class="proposal-action-icon" name="eye-o"></van-icon>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
</div></main>
|
||||
|
||||
<proposal-info ref="proposalInfoRef"></proposal-info>
|
||||
|
||||
<van-popup v-model="detailVisible" class="proposal-full-popup" position="right"
|
||||
:close-on-click-overlay="false" safe-area-inset-bottom>
|
||||
<div class="proposal-full-popup__page">
|
||||
<van-nav-bar title="提案详情" left-arrow left-text="返回" fixed
|
||||
@click-left="closeHistoryLayer('detail')"></van-nav-bar>
|
||||
<div class="proposal-full-popup__scroll">
|
||||
<proposal-info v-if="detailVisible && detailBizId" :biz-id="detailBizId" :visible="detailVisible"></proposal-info>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
</div>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../../common/info.js"){}#-->
|
||||
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
@@ -63,14 +120,39 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
sessionOptions: [],
|
||||
filterOpened: false,
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
showApprovalForm: false,
|
||||
detailVisible: false,
|
||||
detailBizId: "",
|
||||
historyLayerPageKey: "proposal-vice-delegation-h5"
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"proposal-info": PROPOSAL_INFO
|
||||
},
|
||||
methods: {
|
||||
registerHistoryLayers() {
|
||||
if (!window.h5HistoryLayerManager) return
|
||||
window.h5HistoryLayerManager.register(this.historyLayerPageKey, (stack) => {
|
||||
this.$set(this, "detailVisible", stack.includes("detail"))
|
||||
})
|
||||
},
|
||||
openHistoryLayer(layerName) {
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open(layerName)) return
|
||||
if (layerName === "detail") this.$set(this, "detailVisible", true)
|
||||
},
|
||||
closeHistoryLayer(layerName) {
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.close(layerName)) return
|
||||
if (layerName === "detail") this.$set(this, "detailVisible", false)
|
||||
},
|
||||
handlePageBack() {
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.stack.length) {
|
||||
window.h5HistoryLayerManager.close()
|
||||
return
|
||||
}
|
||||
this.historyBack()
|
||||
},
|
||||
setFilterOpened(value) {
|
||||
this.$set(this, "filterOpened", value)
|
||||
},
|
||||
onReady() {
|
||||
this.listSession()
|
||||
},
|
||||
@@ -93,8 +175,8 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.proposalInfoRef.onOpen(row)
|
||||
this.$set(this, "detailBizId", row.id)
|
||||
this.openHistoryLayer("detail")
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
@@ -104,6 +186,14 @@ layout("/layouts/platform_h5.html"){
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.registerHistoryLayers()
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (window.h5HistoryLayerManager) {
|
||||
window.h5HistoryLayerManager.unregister(this.historyLayerPageKey)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+572
-201
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user