【修改】权限申请流程修改页面
This commit is contained in:
@@ -5,6 +5,17 @@
|
||||
<div class="procedure">
|
||||
<div class="process_content">
|
||||
<span class="base_title">基础信息</span>
|
||||
<el-form ref="processFormRef" :model="processForm" label-width="150px"
|
||||
:rules="processFormRule" class="label-input-form" size="medium">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="流程名称:" prop="prcName">
|
||||
<el-input readonly :disabled="formControl || formControlname" v-model="processForm.prcName" @click.native="handleCheck('spr1')"
|
||||
placeholder="请输入流程名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row>
|
||||
<report-table v-model="tableData" @updateTable="(newValue)=>{tableData=newValue}"></report-table>
|
||||
</el-row>
|
||||
@@ -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() {
|
||||
|
||||
},
|
||||
//获取流程详细信息
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user