基础信息
+
+
+
+
+
+
+
+
+
{tableData=newValue}">
@@ -106,6 +117,7 @@ import processApprovalHistory from '@/components/ProcessApprovalHistory'
import reportTable from './components/reportTable'
import { PERMISSION } from '@/utils/Enum/enum'
import orgTable from '../../components/OrgTable'
+import processMixin from "../../components/ProcessMixin";
export default {
name: 'launch',
components: {
@@ -115,9 +127,10 @@ export default {
processApprovalHistory,
orgTable
},
+ mixins: [processMixin],
data () {
return {
- initShow: false, // 控制审批历史是否显示
+ initShow: false, // 控制审批历史是否显示 只有在不是第一次的时候才是true
treeType: '',
orgTableVal: '',
orgTableValName: '',
@@ -127,17 +140,35 @@ export default {
isShowReset: true,
isShowSubmit: true,
formControl: false,
+ formControlname: false,
assignForm: {
oneApprove: '',
twoApprove: ''
},
tableData: [],
- applicationForm: {},
+ applicationForm: {
+ name:'',
+ send:''
+ },
q: {
pageSize: 10000,
pageNo: 1
},
PERMISSION,
+ processForm: {
+ prcName:''
+ },
+ processFormRule: {
+ prcName: [{
+ required: true,
+ message: '请输入流程名称',
+ trigger: 'change'
+ },{
+ max: 100,
+ message: '申请原因最多填写100字符',
+ trigger: 'change'
+ }]
+ },
applicationFormRule: {
name: [{
max: 1000, message: '申请原因最多填写1000字符'
@@ -169,6 +200,22 @@ export default {
if (this.$route.query.ids) {
this.reportList(this.$route.query.ids)
this.handleReset()
+ }
+ if(this.$route.query.taskDefinitionKey){
+ this.initShow = true
+ this.formControlname=true
+ this.getProcessDetail().then(res =>{
+ //指派信息
+ this.applicationForm.name = JSON.parse(this.processOld.dataJson).name
+ this.applicationForm.send = JSON.parse(this.processOld.dataJson).send
+ this.tableData = JSON.parse(this.processOld.dataJson).tableData
+ this.processForm.prcName = JSON.parse(this.processOld.dataJson).prcName
+ //基础信息
+ this.assignForm=JSON.parse(this.processOld.submitJson)
+ })
+ }
+ if(this.$route.query.yiban){
+
}
console.log(this.PERMISSION, 'ddd')
},
@@ -215,7 +262,10 @@ export default {
},
handleReset () {
this.applicationForm = {
+ name:'',
+ send:''
}
+ this.processForm.prcName=''
this.assignForm = {
oneApprove: '',
twoApprove: ''
@@ -223,25 +273,49 @@ export default {
this.$refs.applicationFormRef.clearValidate()
this.$refs.assignFormRef.clearValidate()
},
+ // 整理数据
+ organizeData() {
+ let userId = this.$store.getters.userInfo.USID
+ this.tableData=this.tableData.map(item=>{
+ item = {...item, ... this.applicationForm,userId:userId}
+ return item
+ })
+ },
// 提交
handleSubmit () {
this.$refs.assignFormRef.validate(v => {
this.$refs.applicationFormRef.validate(m => {
- if (v && m) {
- // 过了校验 需要把数据都整合 this.tableData this.applicationForm this.assignForm
- // 表格数据没有不能提交 需要提示
- if (this.tableData.length == 0) {
- this.$message.warning('至少需要选择一条报告数据')
+ this.$refs.processFormRef.validate(z =>{
+ if (v && m && z) {
+ // 过了校验 需要把数据都整合 this.tableData this.applicationForm this.assignForm
+ // 表格数据没有不能提交 需要提示
+ if (this.tableData.length == 0) {
+ this.$message.warning('至少需要选择一条报告数据')
+ } else {
+ // 调用流程数据
+ console.log("发送数据")
+ // 处理表格数据
+ this.organizeData()
+ //如果不是第一次
+ if(this.initShow){
+ this.completeProcess()
+ }else{
+ this.startProcess()
+ this.completeProcess()
+ }
+ }
} else {
- // 调用流程数据
- console.log("发送数据")
+ this.$message.warning('请检查表单填写完整')
}
- } else {
- this.$message.warning('请检查表单填写完整')
- }
+ })
})
})
- }
+ },
+ startProcess() {
+
+ },
+ //获取流程详细信息
+
}
}
diff --git a/src/views/userCenter/processCenter.vue b/src/views/userCenter/processCenter.vue
index 0913d61..671172f 100644
--- a/src/views/userCenter/processCenter.vue
+++ b/src/views/userCenter/processCenter.vue
@@ -8,9 +8,13 @@
-
+
-
+
+
+
+
+
@@ -28,9 +32,11 @@
diff --git a/src/views/userCenter/processCenter/monitorProcesses.vue b/src/views/userCenter/processCenter/monitorProcesses.vue
index 996bf9b..7095465 100644
--- a/src/views/userCenter/processCenter/monitorProcesses.vue
+++ b/src/views/userCenter/processCenter/monitorProcesses.vue
@@ -9,7 +9,11 @@
-
+
+
+ {{getPrcName(row.prcName)}}
+
+
@@ -50,13 +54,21 @@ export default {
}
},
props:{
- fourthData:{
- type:Array,
- default:[],
+ form:{
+ type:Object,
+ default:{},
}
},
+ watch:{
+ form:{
+ handler(){
+ console.log("我见他",this.form)
+ this.loadData()
+ },
+ deep:true
+ }
+ },
mounted () {
- this.search()
this.loadData()
},
methods: {
diff --git a/src/views/userCenter/processCenter/sentProcess.vue b/src/views/userCenter/processCenter/sentProcess.vue
index ca121cd..dce3d5f 100644
--- a/src/views/userCenter/processCenter/sentProcess.vue
+++ b/src/views/userCenter/processCenter/sentProcess.vue
@@ -12,7 +12,7 @@
title="流程编号">
- {{prcName}}
+ {{getPrcName(row.prcName)}}
{
+ this.$api.processCenter.sentProcessPage({...this.q,...this.form,userId:userId}).then(res=>{
this.tableData = res.data.list.length>0 ?res.data.list:[{name:1}]
this.total = res.data.count
}).catch(err=>{
diff --git a/src/views/userCenter/processCenter/tabs.vue b/src/views/userCenter/processCenter/tabs.vue
index d46b67a..34c33b8 100644
--- a/src/views/userCenter/processCenter/tabs.vue
+++ b/src/views/userCenter/processCenter/tabs.vue
@@ -2,16 +2,16 @@
-
+
-
+
-
+
-
+
@@ -37,6 +37,7 @@ export default {
secondData:[],
thirdData:[],
fourthData:[],
+ form:[]
};
},
watch: {
@@ -45,19 +46,21 @@ export default {
created () {
},
mounted () {
+ this.$bus.$on('getSearchItem',(data)=>{
+ this.form = JSON.parse(JSON.stringify(data))
+ console.log(this.form,"hhh")
+ })
this.activeName=this.$store.getters.activeTab ?this.$store.getters.activeTab:'first'
},
methods: {
handleClick(tab, event) {
- this.$router.push({
- path: '/userCenter/processCenter',
- query: {
- id:'AEHJB8YNJ3'
- }
- })
this.$emit('clearForm')
this.$store.commit('setActiveTabIndex','')
}
+ },
+ beforeDestroy(){
+ console.log("我不监听了")
+ this.$bus.$off('getSearchItem')
}
}