first commit

This commit is contained in:
2026-08-26 14:25:17 +08:00
commit 06debfd1fc
10595 changed files with 1836924 additions and 0 deletions
@@ -0,0 +1,91 @@
const SUGGESTION_BOX_INFO = {
template: /*language=HTML*/ `
<van-action-sheet v-model="visible" title="查看详情">
<div class="detail-container">
<van-cell-group title="基本信息">
<van-cell title="姓名">{{viewData.userName}}</van-cell>
<van-cell title="工号">{{viewData.loginName}}</van-cell>
<van-cell title="单位">{{viewData.unitName}}</van-cell>
<van-cell title="工会">{{viewData.unionName}}</van-cell>
<van-cell title="标题">{{viewData.title}}</van-cell>
<van-cell title="意见建议内容" class="direction-column-cell">{{viewData.content}}</van-cell>
</van-cell-group>
<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>
<van-cell-group :title="task.displayName" v-else>
<van-cell title="办理用户">{{ task.taskFormData.userName }}({{task.taskFormData.loginName}})
</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 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>
`,
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
data(){
return{
visible: false,
viewData: {},
doneTasks: [],
row: null,
}
},
methods: {
// 打开
onOpen(row) {
this.row = row
this.visible = true
this.getInfo()
this.getDoneTasks()
},
// 关闭
onClose(){
this.visible = false
},
// 获取申请信息
getInfo() {
this.$axios.post('/platform/suggestionBox/common/info', {id: this.row.id}).then((res) => {
if (res.code === 0) {
this.viewData = res.data || {}
}
})
},
// 查看提案
openView(id) {
this.$nextTick(() => {
this.$refs.infoDialogRef.onOpen(id)
})
},
// 获取已办任务审批记录
getDoneTasks() {
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
if (res.code === 0) {
this.doneTasks = res.data
}
})
},
}
}
@@ -0,0 +1,133 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak>
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="我的建言献策" placeholder
fixed></van-nav-bar>
<van-sticky offset-top="46px">
<van-search
v-model="pageForm.searchKeyword"
:show-action="false"
:reverse-color="false"
input-align="left"
placeholder="请输入关键字搜索"
@search="doSearch"
></van-search>
</van-sticky>
<table-list api="/platform/suggestionBox/mine/pageData" :page_form.sync="pageForm" @ready="onReady" ref="tableListRef" title="title">
<template v-slot="{index,row}">
<table-column label="申请人">{{row.userName}}</table-column>
<table-column label="申请时间">{{row.submitTime}}</table-column>
<!-- <table-column label="当前节点">{{row.taskName}}</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.taskKey === 'startTask' || !row.instanceId"
@click="onEdit(row)">
<i class="fa fa-edit"></i>
<span>编辑</span>
</div>
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(item)">
<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>
<suggestion-box-info ref="suggestionBoxInfoRef"></suggestion-box-info>
</div>
<script nonce="${cspNonce!}">
<!--#include('../info.js'){}#-->
new Vue({
el: '#app',
store,
components: {
'suggestion-box-info': SUGGESTION_BOX_INFO
},
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: "",
sessionId: null
},
}
},
methods: {
historyBack,
onReady(){
this.doSearch()
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
// 查看详情
onView(row) {
this.showApprovalForm = false
this.$refs.suggestionBoxInfoRef.onOpen(row)
},
// 编辑
onEdit(row) {
this.$pjaxReplace("/platform/suggestionBox/write/h5?bizId=" + row.id + "&taskId=" + (row.startTaskId || ''))
},
// 撤回
onRevoke(row) {
this.$dialog.confirm({
title: '提示',
message: '您确定要撤回吗?',
}).then(() => {
this.$axios.post('/flow/common/revokeTask', {taskId: row.startTaskId}).then(res => {
if (res.code === 0) {
this.$toast.success('撤回成功');
this.doSearch();
}
})
}).catch(() => {
});
},
onDelete(id) {
this.$dialog.confirm({
title: '提示',
message: '您确定要删除吗?',
}).then(() => {
this.$axios.post('/platform/suggestionBox/mine/delete', {id}).then(res => {
if (res.code === 0) {
this.$toast.success('删除成功');
this.doSearch();
}
})
}).catch(() => {
});
}
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,83 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak>
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="建言献策查询" placeholder
fixed></van-nav-bar>
<van-sticky offset-top="46px">
<van-search
v-model="pageForm.searchKeyword"
:show-action="false"
:reverse-color="false"
input-align="left"
placeholder="请输入关键字搜索"
@search="doSearch"
></van-search>
</van-sticky>
<table-list api="/platform/suggestionBox/query/pageData" :page_form.sync="pageForm" @ready="onReady"
ref="tableListRef" title="title">
<template v-slot="{index,row}">
<table-column label="申请人">{{row.userName}}</table-column>
<table-column label="申请时间">{{row.submitTime}}</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>
</template>
</table-list>
<suggestion-box-info ref="suggestionBoxInfoRef"></suggestion-box-info>
</div>
<script nonce="${cspNonce!}">
<!--#include('../info.js'){}#-->
new Vue({
el: '#app',
store,
components: {
'suggestion-box-info': SUGGESTION_BOX_INFO
},
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: "",
},
}
},
methods: {
historyBack,
onReady() {
this.doSearch()
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
// 查看详情
onView(row) {
this.showApprovalForm = false
this.$refs.suggestionBoxInfoRef.onOpen(row)
}
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,167 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak>
<van-nav-bar title="填写建言献策" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<div class="form-container">
<van-form ref="formRef">
<van-cell-group title="基本信息">
<van-field v-model="formData.userName" label="姓名" readonly></van-field>
<van-field v-model="formData.loginName" label="工号" readonly></van-field>
<van-field v-model="formData.unitName" label="单位" readonly></van-field>
<van-field v-model="formData.unionName" label="工会" readonly></van-field>
<van-field
v-model="formData.title"
name="title"
label="标题"
placeholder="请输入标题"
:rules="[{ required: true, message: '请填写标题' }]"
required
maxlength="100"
show-word-limit
></van-field>
<van-field
v-model="formData.content"
name="content"
label="意见建议内容"
type="textarea"
placeholder="请输入内容"
:rules="[{ required: true, message: '请填写内容' }]"
maxlength="500"
show-word-limit
rows="5"
></van-field>
</van-cell-group>
<!-- 按钮区域 -->
<div class="form-actions">
<van-button plain type="info" @click="onSave">保存</van-button>
<van-button type="primary" @click="onSubmit" v-if="!taskId">提交</van-button>
<van-button type="primary" @click="onFinishTask" v-else>提交</van-button>
</div>
</van-form>
</div>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: '#app',
store,
data() {
return {
bizId: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
formData: {},
formRules: {
title: [{required: true, message: "必填", trigger: ["change", "blur"]}],
content: [{required: true, message: "必填", trigger: ["change", "blur"]}]
}
}
},
methods: {
historyBack,
// 保存
async onSave() {
try {
await this.$refs.formRef.validate();
this.$dialog.confirm({
title: '提示',
message: '您确定保存吗?',
}).then(() => {
this.$axios.post('/platform/suggestionBox/write/save', {data: JSON.stringify(this.formData)}).then(res => {
if (res.code === 0) {
this.$toast.success("保存成功");
pjaxReplace("/platform/suggestionBox/mine/h5")
}
})
}).catch(() => {
// 取消操作
});
} catch (e) {
// 表单验证失败
console.log('表单验证失败', error);
}
},
// 提交
async onSubmit() {
try {
await this.$refs.formRef.validate();
this.$dialog.confirm({
title: '提示',
message: '您确定提交吗?',
}).then(() => {
this.$axios.post('/platform/suggestionBox/write/submit', {data: JSON.stringify(this.formData)}).then(res => {
if (res.code === 0) {
this.$toast.success("提交成功");
pjaxReplace("/platform/suggestionBox/mine/h5")
}
})
}).catch(() => {
// 取消操作
});
} catch (e) {
// 表单验证失败
console.log('表单验证失败', error);
}
},
// 再次提交
async onFinishTask() {
try {
await this.$refs.formRef.validate();
this.$dialog.confirm({
title: '提示',
message: '您确定要提交吗?',
}).then(() => {
this.$axios.post('/platform/suggestionBox/write/submitAgain', {
data: JSON.stringify(this.formData),
taskId: GetQueryString("taskId")
}).then(res => {
if (res.code === 0) {
this.$toast.success("提交成功");
pjaxReplace("/platform/h5/suggestionBox/mine")
}
})
}).catch(() => {
// 取消操作
});
} catch (e) {
// 表单验证失败
console.log('表单验证失败', error);
}
},
// 初始化
init() {
if (this.bizId) {
this.$axios.post("/platform/suggestionBox/write/info", {id: this.bizId}).then((res) => {
if (res.code === 0) {
this.formData = res.data;
}
})
} else {
const {username, loginname, id, unit, union, mobile} = this.$store.state.user;
this.formData = {
userName: username,
loginName: loginname,
submitterId: id,
unitId: unit?.id,
unitName: unit?.name,
unionId: union?.id,
unionName: union?.name,
concat: mobile
}
}
}
},
created() {
this.init();
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,176 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak>
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="建言献策审核" placeholder
fixed></van-nav-bar>
<van-sticky offset-top="46px">
<van-search
v-model="pageForm.searchKeyword"
:show-action="false"
:reverse-color="false"
input-align="left"
placeholder="请输入关键字搜索"
@search="doSearch"
></van-search>
<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/suggestionBox/xgh/pageData" :page_form.sync="pageForm" @ready="onReady"
ref="tableListRef" title="title">
<template v-slot="{index,row}">
<table-column label="申请人">{{row.userName}}</table-column>
<table-column label="申请时间">{{row.submitTime}}</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(item)">
<i class="fa fa-undo"></i>
<span>撤回</span>
</div>
</template>
</table-list>
<suggestion-box-info ref="suggestionBoxInfoRef">
<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>
</suggestion-box-info>
</div>
<script nonce="${cspNonce!}">
<!--#include('../info.js'){}#-->
new Vue({
el: '#app',
store,
components: {
'suggestion-box-info': SUGGESTION_BOX_INFO
},
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: "",
sessionId: null,
approvalText: "0",
approval: false
},
formData: {},
showApprovalForm: false
}
},
methods: {
historyBack,
onReady() {
this.doSearch()
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
// 查看详情
onView(row) {
this.showApprovalForm = false
this.$refs.suggestionBoxInfoRef.onOpen(row)
},
onApproval(row) {
this.showApprovalForm = true
this.$refs.suggestionBoxInfoRef.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.suggestionBoxInfoRef.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.startTaskId}).then(res => {
if (res.code === 0) {
this.$toast.success('撤回成功');
this.doSearch();
}
})
}).catch(() => {
});
}
}
})
</script>
<!--#
}
#-->