..
This commit is contained in:
+49
@@ -0,0 +1,49 @@
|
||||
<!--#
|
||||
layout("/layouts/v4/baseLayout.html"){
|
||||
#-->
|
||||
|
||||
<div id="approvalApp" v-cloak>
|
||||
<snaker-flow
|
||||
:task_id="taskId"
|
||||
:instance_id="instanceId"
|
||||
:business_id="businessId"
|
||||
:pjax_urls="{
|
||||
applicationInfo: '/platform/article/write/index_',
|
||||
taskForm: '/platform/article/write/index_'
|
||||
}"
|
||||
:pjax_config="{
|
||||
push: false,
|
||||
replace: false,
|
||||
timeout: 10000
|
||||
}"
|
||||
></snaker-flow>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: "#approvalApp",
|
||||
data() {
|
||||
return {
|
||||
taskId: null,
|
||||
instanceId: null,
|
||||
businessId: null,
|
||||
formConfig: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleTaskSubmitted() {},
|
||||
handleCancel() {
|
||||
window.history.back()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.taskId = new URLSearchParams(window.location.search).get("taskId")
|
||||
this.instanceId = new URLSearchParams(window.location.search).get("instanceId")
|
||||
this.businessId = new URLSearchParams(window.location.search).get("businessId")
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
<div id="article_branch_union_approval_form">
|
||||
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px">
|
||||
<el-form-item label="审批意见" prop="approvalOpinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="电子签名" prop="approvalSignature" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">-->
|
||||
<!-- <pc-signature v-model="formData.approvalSignature"></pc-signature>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
<snaker-flow-task-form-action @task-action="handleTaskAction"
|
||||
@cancel="handleCancel">
|
||||
</snaker-flow-task-form-action>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: "#article_branch_union_approval_form",
|
||||
data() {
|
||||
return {
|
||||
taskId: GetQueryString("taskId"),
|
||||
formData: {
|
||||
approval: "",
|
||||
approvalOpinion: ""
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleTaskAction(val) {
|
||||
console.log(val)
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify(val)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("操作成功")
|
||||
// 发送完成消息
|
||||
window.parent.postMessage({
|
||||
type: "task-complete"
|
||||
}, "*")
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel(val) {
|
||||
console.log(val)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
+29
-20
@@ -36,11 +36,17 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column prop="unitName" label="投稿人单位"></el-table-column>
|
||||
<el-table-column prop="unionName" label="投稿人工会"></el-table-column>
|
||||
<el-table-column prop="submitTime" label="投稿时间"></el-table-column>
|
||||
<el-table-column label="当前节点" prop="processInstanceNodeName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="操作" fixed="right">
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200px" fixed="right">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onOpen(row.id)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.processInstanceTaskStatus==='ACTIVE'" @click="openApproval(row)" size="mini" type="primary">
|
||||
<el-button v-if="row.taskState === 10" @click="openApproval(row)" size="mini" type="primary">
|
||||
审核
|
||||
</el-button>
|
||||
<el-button
|
||||
@@ -57,19 +63,25 @@ layout("/layouts/platform.html"){
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #public>
|
||||
<el-dialog title="" :visible.sync="showApprovalForm" width="90%">
|
||||
<info ref="infoRef"></info>
|
||||
<el-row type="flex">
|
||||
<flow-form-button :task_id="taskId"></flow-form-button>
|
||||
|
||||
<!-- <el-button plain @click="$refs.guava.index()">取消</el-button>-->
|
||||
<!-- <el-button type="danger" @click="doApproval('BACK')">退回修改</el-button>-->
|
||||
<!-- <el-button type="primary" @click="doApproval('PASS')">同意</el-button>-->
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
<template #public>
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.processInstanceNodeName}}</div>
|
||||
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px">
|
||||
<el-form-item label="审核意见" prop="approvalOpinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button plain @click="$refs.guava.index()">取消</el-button>
|
||||
<el-button type="danger" @click="doApproval('BACK')">退回修改</el-button>
|
||||
<el-button type="primary" @click="doApproval('PASS')">同意</el-button>
|
||||
<el-row type="flex">
|
||||
<flow-form-button :task_id="taskId"></flow-form-button>
|
||||
|
||||
<!-- <el-button plain @click="$refs.guava.index()">取消</el-button>-->
|
||||
<!-- <el-button type="danger" @click="doApproval('BACK')">退回修改</el-button>-->
|
||||
<!-- <el-button type="primary" @click="doApproval('PASS')">同意</el-button>-->
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
@@ -89,7 +101,8 @@ layout("/layouts/platform.html"){
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
showApprovalForm: false
|
||||
showApprovalForm: false,
|
||||
taskId: ""
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -100,11 +113,7 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
openApproval(row) {
|
||||
this.$refs.guava.public(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
this.formData = row.approvalParam
|
||||
this.showApprovalForm = true
|
||||
})
|
||||
window.open("/flow/common/approval/form?taskId=" + row.taskId + "&instanceId=" + row.instanceId + "&businessId=" + row.businessNo)
|
||||
},
|
||||
doApproval(approvalType) {
|
||||
this.formData.bpmTaskApprovalType = approvalType
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
<div id="article-full-form">
|
||||
<el-descriptions :column="2" border class="flow-task-form">
|
||||
<el-descriptions-item label="投稿人姓名">{{ viewData.userName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="投稿人工号">{{ viewData.loginName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="投稿人单位">{{ viewData.unitName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="投稿人工会">{{ viewData.unionName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="投稿人联系方式">{{ viewData.mobile }}</el-descriptions-item>
|
||||
<el-descriptions-item label="稿件修改人联系方式">{{ viewData.mobile2 }}</el-descriptions-item>
|
||||
<el-descriptions-item label="投稿标题" :span="2">{{ viewData.title }}</el-descriptions-item>
|
||||
<el-descriptions-item label="投稿说明" :span="2">{{ viewData.excerpt }}</el-descriptions-item>
|
||||
<el-descriptions-item label="稿件" :span="2">
|
||||
<file-preview :files="viewData.files" complete_result></file-preview>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<template v-for="task in doneTasks">
|
||||
<div class="task-panel mt10">
|
||||
<div class="task-panel-header">
|
||||
{{ task.displayName }}
|
||||
</div>
|
||||
<el-descriptions border class="flow-task-form" :column="2" :key="task.id">
|
||||
<el-descriptions-item label="办理用户">{{ task.operator }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: "#article-full-form",
|
||||
data() {
|
||||
return {
|
||||
businessId: GetQueryString("businessId"),
|
||||
instanceId: GetQueryString("instanceId"),
|
||||
viewData: {},
|
||||
doneTasks: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
info() {
|
||||
this.$axios.post("/platform/article/common/info", { id: this.businessId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", { instanceId: this.instanceId }).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.info()
|
||||
this.getDoneTasks()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.task-panel{
|
||||
background: white;
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.task-panel-header{
|
||||
background: rgb(250, 250, 250);
|
||||
border: 1px solid rgb(228, 231, 237);
|
||||
border-bottom: none;
|
||||
padding: 12px 16px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
@@ -41,16 +41,19 @@ const info = {
|
||||
v-if="task.extVariable.bpmTaskApprovalType === 'REJECT'">拒绝
|
||||
</el-tag>
|
||||
<template v-if="task.extVariable.bpmTaskApprovalType === 'DYNAMIC'">
|
||||
<el-tag v-if="task.extVariable.RESULT === 'BACK_TO_START'" type="danger" size="mini">
|
||||
<el-tag v-if="task.extVariable.RESULT === 'BACK_TO_START'" type="danger"
|
||||
size="mini">
|
||||
退回至投稿人
|
||||
<span v-if="task.extVariable.processAgain===false">不需要重新走流程</span>
|
||||
<span v-if="task.extVariable.processAgain===true">需要重新走流程</span>
|
||||
</el-tag>
|
||||
<el-tag v-if="task.extVariable.RESULT === 'PASS'" type="success" size="mini">同意</el-tag>
|
||||
<el-tag v-if="task.extVariable.RESULT === 'PASS'" type="success" size="mini">同意
|
||||
</el-tag>
|
||||
<el-tag v-if="task.extVariable.RESULT === 'BACK_TO_CLUB'" type="danger" size="mini">
|
||||
退回到协会
|
||||
</el-tag>
|
||||
<el-tag v-if="task.extVariable.RESULT === 'BACK_TO_UNION'" type="danger" size="mini">
|
||||
<el-tag v-if="task.extVariable.RESULT === 'BACK_TO_UNION'" type="danger"
|
||||
size="mini">
|
||||
退回到分工会
|
||||
</el-tag>
|
||||
</template>
|
||||
@@ -72,8 +75,8 @@ const info = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(id) {
|
||||
this.$axios.post("/platform/article/common/info", { id }).then((res) => {
|
||||
onOpen(row) {
|
||||
this.$axios.post("/platform/article/common/info", { id: row.businessKey }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
|
||||
@@ -7,7 +7,8 @@ layout("/layouts/platform.html"){
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度" style="width: 100%"></el-date-picker>
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="标题">
|
||||
<el-input v-model="pageForm.title" placeholder="标题" clearable></el-input>
|
||||
@@ -25,27 +26,25 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column prop="unitName" label="投稿人单位"></el-table-column>
|
||||
<el-table-column prop="unionName" label="投稿人工会"></el-table-column>
|
||||
<el-table-column prop="submitTime" label="投稿时间"></el-table-column>
|
||||
<el-table-column label="当前节点" prop="processInstanceNodeName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onOpen(row.id)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="[10,30,34,38,50,65].includes(row.processInstanceNodeCode)" @click="onEdit(row.id)" size="mini" type="primary">
|
||||
<el-button v-if="row.taskKey === 'apply' || !row.instanceId" @click="onEdit(row)" size="mini"
|
||||
type="primary">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="[20].includes(row.processInstanceNodeCode) && !row.nextTaskIsComplete"
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="onRevoke(row.id)"
|
||||
>
|
||||
撤销
|
||||
<el-button v-if="['waiting'].includes(row.flow_status)" size="mini" type="danger"
|
||||
@click="onRevoke(row.id)">撤销
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="[10,30,34,50,70].includes(row.processInstanceNodeCode)||$auth.hasRoleOr('SYSADMIN')"
|
||||
@click="onDelete(row.id)"
|
||||
size="mini"
|
||||
type="danger"
|
||||
>
|
||||
<el-button v-if="row.taskKey === 'apply' || !row.instanceId"
|
||||
@click="onDelete(row.id)" size="mini" type="danger">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -77,8 +76,19 @@ layout("/layouts/platform.html"){
|
||||
this.$refs.infoRef.onOpen(id)
|
||||
})
|
||||
},
|
||||
onEdit(id) {
|
||||
this.$store.dispatch("pjaxRoute", "/platform/article/write?id=" + id)
|
||||
onEdit(row) {
|
||||
window.open("/flow/common/approval/form?taskId=" + (row.taskId || "") + "&instanceId=" + (row.instanceId || "") + "&businessId=" + row.id
|
||||
+ "&defineKey=XWTG")
|
||||
|
||||
// $.pjax({
|
||||
// url: "/platform/article/write?id=" + businessNo + "&taskId=" + taskId + "&instanceId=" + instanceId,
|
||||
// container: "#sub-app-container-main-content",
|
||||
// maxCacheLength: 0,
|
||||
// push: false,
|
||||
// replace: true,
|
||||
// fragment: "#sub-app-container-main-content",
|
||||
// timeout: 8000
|
||||
// })
|
||||
},
|
||||
onRevoke(id) {
|
||||
this.$confirm("您确定要撤销申请吗?", "提示", {
|
||||
@@ -86,7 +96,7 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/article/mine/revokeApply", { id }).then((resp) => {
|
||||
this.$axios.post("/platform/article/write/revokeApply", { id }).then((resp) => {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
<div id="article_school_union_approval_form">
|
||||
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px">
|
||||
<el-form-item label="审批意见" prop="approvalOpinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="电子签名" prop="approvalSignature" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">-->
|
||||
<!-- <pc-signature v-model="formData.approvalSignature"></pc-signature>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
<snaker-flow-task-form-action @task-action="handleTaskAction"
|
||||
@cancel="handleCancel">
|
||||
</snaker-flow-task-form-action>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: "#article_school_union_approval_form",
|
||||
data() {
|
||||
return {
|
||||
taskId: GetQueryString("taskId"),
|
||||
formData: {
|
||||
approval: "",
|
||||
approvalOpinion: ""
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleTaskAction(val) {
|
||||
console.log(val)
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify(val)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("操作成功")
|
||||
// 发送完成消息
|
||||
window.parent.postMessage({
|
||||
type: "task-complete"
|
||||
}, "*")
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel(val) {
|
||||
console.log(val)
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
+39
-53
@@ -7,26 +7,18 @@ layout("/layouts/platform.html"){
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度" style="width: 100%"></el-date-picker>
|
||||
<el-date-picker
|
||||
:clearable="true"
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="年度"
|
||||
style="width: 100%"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="标题">
|
||||
<el-input v-model="pageForm.title" placeholder="标题" clearable></el-input>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable style="width: 100%">
|
||||
<el-option v-for="item in unionOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属单位:">
|
||||
<el-select v-model="pageForm.unitId" placeholder="请选择所属单位" filterable clearable style="width: 100%">
|
||||
<el-option v-for="item in unitOptions" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="投稿来源:">
|
||||
<el-select v-model="pageForm.origin" placeholder="请选择投稿来源" filterable clearable style="width: 100%">
|
||||
<el-option v-for="item in dict.type.ARTICLE_ORIGIN" :key="item.code" :label="item.label" :value="item.code"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
@@ -42,25 +34,19 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column prop="loginName" label="投稿人工号"></el-table-column>
|
||||
<el-table-column prop="userName" label="投稿人姓名"></el-table-column>
|
||||
<el-table-column prop="unitName" label="投稿人单位"></el-table-column>
|
||||
<el-table-column
|
||||
prop="unionName"
|
||||
label="投稿人工会"
|
||||
v-if="$auth.hasRoleOr(['SCHOOL_UNION_ARTICLE_FGH_ADMIN','SYSADMIN'])"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="clubName"
|
||||
label="投稿人协会"
|
||||
v-if="$auth.hasRoleOr(['SCHOOL_UNION_ARTICLE_CLUB_ADMIN','SYSADMIN'])"
|
||||
></el-table-column>
|
||||
<el-table-column prop="unionName" label="投稿人工会"></el-table-column>
|
||||
<el-table-column prop="submitTime" label="投稿时间"></el-table-column>
|
||||
<el-table-column prop="mode" label="投稿来源">
|
||||
<template slot-scope="{row}">{{dict.type.ARTICLE_ORIGIN.find(v=>v.code===row.origin)?.label}}</template>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前节点" prop="processInstanceNodeName" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<el-table-column label="操作" width="200px" fixed="right">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onOpen(row.id)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.processInstanceTaskStatus==='ACTIVE'" @click="openApproval(row)" size="mini" type="primary">
|
||||
<el-button v-if="row.taskState === 10" @click="openApproval(row)" size="mini" type="primary">
|
||||
审核
|
||||
</el-button>
|
||||
<el-button
|
||||
@@ -77,19 +63,25 @@ layout("/layouts/platform.html"){
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #public>
|
||||
<el-dialog title="" :visible.sync="showApprovalForm" width="90%">
|
||||
<info ref="infoRef"></info>
|
||||
<el-row type="flex">
|
||||
<flow-form-button :task_id="taskId"></flow-form-button>
|
||||
|
||||
<!-- <el-button plain @click="$refs.guava.index()">取消</el-button>-->
|
||||
<!-- <el-button type="danger" @click="doApproval('BACK')">退回修改</el-button>-->
|
||||
<!-- <el-button type="primary" @click="doApproval('PASS')">同意</el-button>-->
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
<template #public>
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.processInstanceNodeName}}</div>
|
||||
<el-form :model="formData" ref="approvalFormRef" label-position="left" label-width="80px">
|
||||
<el-form-item label="审核意见" prop="approvalOpinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.approvalOpinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button plain @click="$refs.guava.index()">取消</el-button>
|
||||
<el-button type="danger" @click="doApproval('BACK')">退回到编辑初审</el-button>
|
||||
<el-button type="primary" @click="doApproval('PASS')">同意</el-button>
|
||||
<el-row type="flex">
|
||||
<flow-form-button :task_id="taskId"></flow-form-button>
|
||||
|
||||
<!-- <el-button plain @click="$refs.guava.index()">取消</el-button>-->
|
||||
<!-- <el-button type="danger" @click="doApproval('BACK')">退回修改</el-button>-->
|
||||
<!-- <el-button type="primary" @click="doApproval('PASS')">同意</el-button>-->
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
@@ -103,14 +95,14 @@ layout("/layouts/platform.html"){
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
dicts: ["ARTICLE_ORIGIN"],
|
||||
components: { info },
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
showApprovalForm: false
|
||||
showApprovalForm: false,
|
||||
taskId: ""
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -121,18 +113,14 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
openApproval(row) {
|
||||
this.$refs.guava.public(() => {
|
||||
this.$refs.infoRef.onOpen(row.id)
|
||||
this.formData = row.approvalParam
|
||||
this.showApprovalForm = true
|
||||
})
|
||||
window.open("/flow/common/approval/form?taskId=" + row.taskId + "&instanceId=" + row.instanceId + "&businessId=" + row.businessNo)
|
||||
},
|
||||
doApproval(approvalType) {
|
||||
this.formData.bpmTaskApprovalType = approvalType
|
||||
this.$refs.approvalFormRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$axios
|
||||
.post("/platform/article/schoolUnionApproval/approval", {
|
||||
.post("/platform/article/branchUnionApproval/approval", {
|
||||
approval: JSON.stringify(this.formData)
|
||||
})
|
||||
.then((res) => {
|
||||
@@ -151,7 +139,7 @@ layout("/layouts/platform.html"){
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/article/schoolUnionApproval/revoke", { taskId }).then((res) => {
|
||||
this.$axios.post("/platform/article/branchUnionApproval/revoke", { taskId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
@@ -161,8 +149,6 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -55,11 +55,11 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
<el-form-item prop="files" label="稿件">
|
||||
<file-upload
|
||||
:value.sync="formData.files"
|
||||
:upload_number="5"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
upload_mode="drag"
|
||||
:value.sync="formData.files"
|
||||
:upload_number="5"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
upload_mode="drag"
|
||||
></file-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -86,15 +86,17 @@ layout("/layouts/platform.html"){
|
||||
data() {
|
||||
return {
|
||||
id: GetQueryString("id"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
instanceId: GetQueryString("instanceId"),
|
||||
formData: {},
|
||||
formRules: {
|
||||
title: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||
excerpt: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||
clubId: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||
files: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||
origin: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||
mobile: [{required: true, message: "必填", trigger: ["change", "blur"]}],
|
||||
mobile2: [{required: true, message: "必填", trigger: ["change", "blur"]}]
|
||||
title: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
excerpt: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
clubId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
files: [{ required: false, message: "必填", trigger: ["change", "blur"] }],
|
||||
origin: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
mobile: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
mobile2: [{ required: true, message: "必填", trigger: ["change", "blur"] }]
|
||||
},
|
||||
permission: {}
|
||||
}
|
||||
@@ -106,7 +108,11 @@ layout("/layouts/platform.html"){
|
||||
this.$message.warning("请填写标题")
|
||||
return
|
||||
}
|
||||
this.$axios.post("/platform/article/write/save", {article: JSON.stringify(this.formData)}).then((res) => {
|
||||
this.$axios.post("/platform/article/write/save", {
|
||||
article: JSON.stringify(this.formData),
|
||||
taskId: this.taskId,
|
||||
instanceId: this.instanceId
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("保存成功")
|
||||
this.$store.dispatch("pjaxRoute", "/platform/article/mine")
|
||||
@@ -117,7 +123,11 @@ layout("/layouts/platform.html"){
|
||||
doSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$axios.post("/platform/article/write/submit", {article: JSON.stringify(this.formData)}).then((res) => {
|
||||
this.$axios.post("/platform/article/write/submit", {
|
||||
article: JSON.stringify(this.formData),
|
||||
taskId: this.taskId,
|
||||
instanceId: this.instanceId
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
this.$store.dispatch("pjaxRoute", "/platform/article/mine")
|
||||
@@ -137,13 +147,13 @@ layout("/layouts/platform.html"){
|
||||
|
||||
init() {
|
||||
if (this.id) {
|
||||
this.$axios.post("/platform/article/write/get", {id: this.id}).then((res) => {
|
||||
this.$axios.post("/platform/article/write/get", { id: this.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const {username, loginname, id, unit, union, mobile} = this.$store.state.user
|
||||
const { username, loginname, id, unit, union, mobile } = this.$store.state.user
|
||||
this.formData = {
|
||||
userName: username,
|
||||
loginName: loginname,
|
||||
@@ -153,7 +163,7 @@ layout("/layouts/platform.html"){
|
||||
unionId: union?.id,
|
||||
unionName: union?.name,
|
||||
mobile: mobile,
|
||||
mobile2: mobile,
|
||||
mobile2: mobile
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
<div id="artile_write">
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":" class="flow-task-form">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="投稿人姓名">{{formData.userName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="投稿人工号">{{formData.loginName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="投稿人单位">{{formData.unitName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="投稿人工会">{{formData.unionName}}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="投稿来源" :span="2">
|
||||
<el-form-item prop="origin" label="投稿来源" label-width="0">
|
||||
<el-radio-group v-model="formData.origin" size="small">
|
||||
<el-radio border v-for="item in origins" :label="item.code" :key="item.code">{{item.name}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="投稿人协会" v-if="formData.origin === 'ARTICLE_ORIGIN_CLUB'">
|
||||
<el-form-item prop="clubId" label="投稿人协会" v-if="formData.origin === 'ARTICLE_ORIGIN_CLUB'">
|
||||
<el-select v-model="formData.clubId" placeholder="请选择" style="width: 100%">
|
||||
<el-option v-for="item in permission?.clubs" :key="item.id" :label="item.clubName" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="投稿人联系方式" :span="2">
|
||||
<el-form-item prop="title" label="投稿标题">
|
||||
<el-input v-model="formData.title" maxlength="100" show-word-limit placeholder="请输入标题"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="投稿人联系方式" :span="2">
|
||||
<el-form-item prop="mobile" label="投稿人联系方式">
|
||||
<el-input v-model="formData.mobile" placeholder="请输入投稿人联系方式"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="修改人联系方式" :span="2">
|
||||
<el-form-item prop="mobile2" label="修改人联系方式">
|
||||
<el-input v-model="formData.mobile2" placeholder="请输入修改人联系方式"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="投稿说明" :span="2">
|
||||
<el-form-item prop="excerpt" label="投稿说明">
|
||||
<el-input v-model="formData.excerpt" type="textarea" maxlength="500" show-word-limit placeholder="请输入投稿说明"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="稿件" :span="2">
|
||||
<file-upload
|
||||
:value.sync="formData.files"
|
||||
:upload_number="5"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
upload_mode="drag"
|
||||
></file-upload>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
<snaker-flow-task-form-action @task-action="handleTaskAction" @save-draft="handleSaveDraft" @cancel="handleCancel"></snaker-flow-task-form-action>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: "#artile_write",
|
||||
store,
|
||||
dicts: ["ARTICLE_ORIGIN"],
|
||||
computed: {
|
||||
origins() {
|
||||
if (this.dict?.type?.ARTICLE_ORIGIN && this.permission && this.permission.roles) {
|
||||
return this.dict.type.ARTICLE_ORIGIN.filter((item) => this.permission && this.permission.roles.includes(item.code))
|
||||
}
|
||||
return []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
id: GetQueryString("businessId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
instanceId: GetQueryString("instanceId"),
|
||||
formData: {},
|
||||
formRules: {
|
||||
title: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
excerpt: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
clubId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
files: [{ required: false, message: "必填", trigger: ["change", "blur"] }],
|
||||
origin: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
mobile: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
mobile2: [{ required: true, message: "必填", trigger: ["change", "blur"] }]
|
||||
},
|
||||
permission: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
if (this.id) {
|
||||
this.$axios.post("/platform/article/write/get", { id: this.id }).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,
|
||||
userId: id,
|
||||
unitId: unit?.id,
|
||||
unitName: unit?.name,
|
||||
unionId: union?.id,
|
||||
unionName: union?.name,
|
||||
mobile: mobile,
|
||||
mobile2: mobile
|
||||
}
|
||||
}
|
||||
},
|
||||
checkPermission() {
|
||||
this.$axios.post("/platform/article/write/checkPermission").then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.permission = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
handleTaskAction(val) {
|
||||
console.log(val)
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$axios
|
||||
.post("/flow/common/startInstanceAndExecute", {
|
||||
...val,
|
||||
bizData: JSON.stringify(this.formData)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("操作成功")
|
||||
// 发送完成消息
|
||||
window.parent.postMessage(
|
||||
{
|
||||
type: "task-complete"
|
||||
},
|
||||
"*"
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
handleSaveDraft() {
|
||||
this.$message.success("保存成功")
|
||||
this.$refs.formRef.validateField(["title"], (errMsg) => {
|
||||
if (errMsg) {
|
||||
this.$message.warning("请填写标题")
|
||||
return
|
||||
}
|
||||
this.$axios
|
||||
.post("/flow/common/startInstance", {
|
||||
...val,
|
||||
bizData: JSON.stringify(this.formData)
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("操作成功")
|
||||
// 发送完成消息
|
||||
window.parent.postMessage(
|
||||
{
|
||||
type: "task-complete"
|
||||
},
|
||||
"*"
|
||||
)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
handleCancel() {}
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
this.checkPermission()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,18 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak></div>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: "#app",
|
||||
data() {
|
||||
return {}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user