【修改】修改报告上传流程

This commit is contained in:
zhoulingpo
2023-05-09 09:20:54 +08:00
parent 4bd06f2360
commit 64bee0eb7d
15 changed files with 660 additions and 368 deletions
@@ -19,18 +19,6 @@
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="审批结果:" prop="flag"
label-width="132px" class="add-form-item"
:class="{'form-item-disabled': formdisableflag}">
<el-radio-group :disabled="formdisableflag" v-model="examineForm.flag" >
<el-radio :label="'1'">同意</el-radio>
<el-radio :label="'2'">不同意</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item :prop="!formdisableflag?'approvalOpinion':''" label-width="132px" class="add-form-item">
@@ -44,6 +32,17 @@
</el-form-item>
</el-col>
</el-row>
<process-footer
v-if="!isDisable"
showCancel
:show-transfer="isShowTran"
:show-agree="isAgree"
:show-no-agree="isNoAgree"
:btyLoading="isBty"
:tyLoading="isTy"
@transfer="handleTransfer"
@submit="handleSubmit"
></process-footer>
<!-- <el-row :gutter="24">-->
<!-- <el-col :span="24">-->
<!-- <el-form-item label="附件" prop="entStandText" label-width="132px" class="add-form-item"-->
@@ -63,12 +62,18 @@
</el-form>
</div>
</template>
<script>
import processFooter from '@/components/ProcessFooter'
export default {
name: 'AuditOperation',
components:{
processFooter,
},
props: {
isDisable:{
type:Boolean,
@@ -76,11 +81,32 @@ export default {
},
examine:{
type:Object
},
taskId:{
type:String,
default:''
},
prcId:{
type:String,
default:''
},
prcType:{
type:String,
default:''
}
},
data () {
return {
isBty:false,
isTy:false,
isNoAgree: true,
isAgree: true,
visibleTree: false,
isSubmit: false,
tranLoading: false,
isShowTran: true,
isShowSubmit: true,
examineForm: {
planReasonFile: '',
oldName: '',
@@ -107,19 +133,42 @@ export default {
}
},
methods: {
handleTransfer(){
debugger
this.$emit('handleTransfer')
},
handleSubmit(type) {
debugger
if(type=='n'){
// 校验原因是否填写
this.examineForm.flag=2
if(this.examineForm.approvalOpinion==''){
this.$message.warning("请您填写原因")
return
}
}else{
this.examineForm.flag=1
}
this.$emit('handleSubmit')
// if (this.$refs.operationRef.submit()) {
// 通过了校验 需要整合参数 拿到原来的dataJson 再把新添加的增进去 在拼成dataJson
},
/** 在提交表单的校验 通过继续执行 */
submit () {
this.isSubmit = false
let v
this.$refs.examineForm.validate((valid) => {
v=valid
if (valid) {
this.isSubmit = true
return true
} else {
this.$message.warning('请检查表单是否填写正确')
return false
}
})
return v
}
}
+224 -179
View File
@@ -2,14 +2,6 @@
<div>
<el-form ref="processFormRef" :model="form" 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 :disabled="formControl || formControlname" v-model="form.prcName"
placeholder="请输入流程名称"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="报告名称:" prop="name">
@@ -28,22 +20,52 @@
<el-row>
<el-col :span="9">
<el-form-item label="报告所属部门:" prop="department">
<el-input :disabled="formControl" v-model="form.department" placeholder="请选择报告所属部门"
maxlength="100"></el-input>
<el-input readonly :disabled="formControl" v-model="form.departmentName" @click.na.native="handleClick" placeholder="请选择报告所属部门"
></el-input>
</el-form-item>
</el-col>
<el-col :span="9" :offset="6">
<el-form-item label="报告涉密等级:" prop="confidentialLevel">
<el-select :disabled="formControl" v-model="form.confidentialLevel" placeholder="请选择报告涉密等级">
<el-option v-for="item in dict['classified_level']" :key="item.itemValue" :label="item.itemName"
:value="item.itemValue">
</el-option>
</el-select>
<el-form-item label="标签:" prop="department">
<el-cascader :disabled="formControl" width="100%" v-model="form.labelList" :options="cascaderOptions"
filterable
:props="{ checkStrictly: true }" clearable placeholder="请选择标签">
<template slot-scope="{ node, data }">
<span :title="data.label">{{ data.label }}</span>
</template>
</el-cascader>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-col :span="9" >
<el-form-item label="报告涉密等级:" prop="confidentialLevel">
<el-select :disabled="formControl" v-model="form.confidentialLevel" placeholder="请选择报告涉密等级" @change="reportLevel">
<el-option v-for="item in privacyLevelOptions " :key="item.value" :label="item.value"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="9" :offset="6" v-if="isShowTime">
<el-form-item label="保密到期日期:" prop="secrecyLast">
<el-date-picker :disabled="formControl" v-model="form.secrecyLast" type="year" value-format="yyyy"
placeholder="请选择保密到期日期"
prefix-icon="null" :picker-options="proOptions"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9" >
<el-form-item label="报告隐私等级:" prop="privacyLevel">
<el-select :disabled="formControl" v-model="form.privacyLevel" placeholder="请选择报告隐私等级">
<el-option v-for="item in confidentialLevelOptions" :key="item.value" :label="item.value"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="9" :offset="6">
<el-form-item label="关键词:" prop="tags">
<vue-tags-input :disabled="formControl" :class="{'is-diable':formControl}" placeholder="请输入关键词"
v-model="form.tags" :tags="tags"
@@ -64,30 +86,10 @@
}"/>
</el-form-item>
</el-col>
<el-col :span="9" :offset="6">
<el-form-item label="报告隐私等级:" prop="privacyLevelOptions">
<el-select :disabled="formControl" v-model="form.privacyLevelOptions" placeholder="请选择报告隐私等级">
<el-option v-for="item in dict['privacy_level']" :key="item.itemValue" :label="item.itemName" :value="item.itemValue">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="标签:" prop="department">
<el-cascader :disabled="formControl" width="100%" v-model="form.labelList" :options="cascaderOptions"
filterable
:props="{ checkStrictly: true }" clearable placeholder="请选择标签">
<template slot-scope="{ node, data }">
<span :title="data.label">{{ data.label }}</span>
</template>
</el-cascader>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="18">
<el-col :span="24">
<el-form-item label="内容摘要:" prop="mainContent">
<el-input :disabled="formControl" v-model="form.mainContent" placeholder="请填写内容摘要" type="textarea"
maxlength="500"></el-input>
@@ -95,63 +97,45 @@
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-col :span="5">
<el-form-item label="上传报告:" prop="fileId">
<el-upload action="#" :http-request="(params) => uploadFile(params)" :show-file-list="true"
<el-upload action="#" :http-request="(params) => uploadFile(params)" :show-file-list="false"
:before-upload="beforeUploadFile" :on-remove="handleRemove"
:file-list="fileList">
<el-button :disabled="formControl">选择文件</el-button>
</el-upload>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="权限设置:" required>
<el-button :disabled="formControl" @click="openDialog">权限设置</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-dialog title="权限设置" :visible.sync="dialogUser" width="950px" :close-on-click-modal="false"
:close-on-press-escape="false" modal-append-to-body append-to-body>
<div class="user-form">
<div style="text-align: center">
<newTranslate
@loadMore="loadMore"
style="text-align: left; display: inline-block"
filterable
v-model="listOne"
:titles="['全部人员', '预览权限人员','预览和下载权限人员']"
:props="{
key: 'value',
label: 'desc'
}"
:loadingMore="loadingMore"
:data="allUser"
:listTwo.sync="listTwo"
:button-texts="['全部', '预览', '预览与下载']"
></newTranslate>
</div>
<div class="done">
<el-button type="default" @click="closeD">取消</el-button>
<el-button type="primary" v-if="!formControl" @click="saveCheck">确定</el-button>
<el-button class="uploadBtn" :disabled="formControl">选择文件</el-button>
</div>
</div>
</el-dialog>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="8">
<span class="uploadFile" v-if="form.fileName">
<span :title="fileList[0].name">{{fileList[0].name}}</span>
<i class="el-icon-cloudy iconstyle"></i>
<i class="el-icon-delete iconstyle" @click="delFile"></i>
</span>
</el-col>
</el-row>
</el-form>
<orgTable :visible.sync="visibleOrgTable" title="人员列表" dialog-model :config="{
value: orgTableVal,
valueName: orgTableValName
}" :workNumFlag="true" :isOrg="true" :maxSelected="100" @confirm="isTreeOk"></orgTable>
</div>
</template>
<script>
import {fileType} from '@/utils/fileType'
import newTranslate from "../../../components/newTranslate";
import VueTagsInput from '@johmun/vue-tags-input';
import orgTable from '@/components/OrgTable'
import {privacyLevelOptions,confidentialLevelOptions} from '@/utils/Enum/enum'
export default {
dicts:['classified_level','privacy_level'],
dicts: ['classified_level', 'privacy_level'],
components: {
VueTagsInput,
newTranslate
newTranslate,
orgTable
},
props: {
@@ -169,14 +153,18 @@ export default {
},
data() {
return {
loadingMore:false,
privacyLevelOptions,
confidentialLevelOptions,
orgTableVal:'',
orgTableValName: '',
visibleOrgTable:false,
isShowTime:false, //是否显示日期
loadingMore: false,
listTwo: [], //存储下载预览的
allUser: [], //存储全部的
listOne: [1],
dialogUser: false,
confidentialLevelOptions: [],
cascaderOptions: [],
privacyLevelOptions: [],
tags: [],
pickerOptions: {
disabledDate(time) {
@@ -185,7 +173,7 @@ export default {
},
form: {},
processFormRule: {
fileId:[
fileId: [
{
required: true,
message: "上传报告不能为空",
@@ -242,25 +230,57 @@ export default {
pageNo: 1,
pageSize: 10
},
fileList:[]
fileList: []
}
},
watch:{
processForm(val){
debugger
this.form=this.processForm
watch: {
processForm(val) {
this.form = this.processForm
}
},
methods: {
loadMore(){
handleClick(){
this.orgTableVal=this.form.department
this.orgTableValName=this.form.departmentName
this.visibleOrgTable=true
},
isTreeOk(checkedList){
const parts = []
const partsName = []
checkedList.map((item, index) => {
parts.push(item.id)
partsName.push(item.orgName)
})
this.qcrList = checkedList
this.form.department = parts.toString()
this.form.departmentName = partsName.toString()
},
delFile() {
this.fileList=[]
this.form.fileName = '';
this.form.fileId = '';
},
reportLevel(item){
let imList=['普通商密','核心商密']
if( imList.indexOf(this.form.confidentialLevel)>-1){
this.isShowTime=true
this.form.secrecyLast = ''
}else{
this.isShowTime=false
this.form.secrecyLast = ''
}
},
loadMore() {
this.q.pageNo++
this.getAllPerson()
},
closeD() {
if (this.$route.query.isBegin || this.$route.query.isDraft) {
this.listOne=[]
this.listTwo=[]
}else{
this.listOne = []
this.listTwo = []
} else {
}
this.dialogUser = false
@@ -284,30 +304,31 @@ export default {
}
return obj
})
this.form.powerList=[...list1,...list2]
this.form.powerList = [...list1, ...list2]
this.dialogUser = false
} else {
//如果是发起人编辑节点
let list1 = this.listOne.map(item => {
let obj = {
userId: item.id,
power: 1
}
return obj
})
let list2 = this.listTwo.map(item => {
let obj = {
userId: item.id,
power: 2
}
return obj
})
this.form.powerList = [...list1, ...list2]
//如果是发起人编辑节点
let list1 = this.listOne.map(item => {
let obj = {
userId: item.id,
power: 1
}
return obj
})
let list2 = this.listTwo.map(item => {
let obj = {
userId: item.id,
power: 2
}
return obj
})
this.form.powerList = [...list1, ...list2]
}
} else {
}
}else{}
},
//获取全部人员
},
//获取全部人员
getAllPerson() {
this.$api.user.sysUserList(this.q).then(({data}) => {
let newlist = data.records.map(item => {
@@ -318,7 +339,7 @@ export default {
}
return obj
})
this.allUser=[...this.allUser,...newlist]
this.allUser = [...this.allUser, ...newlist]
this.total = data.total
this.q.pageNo = data.current
this.q.pageSize = data.size
@@ -326,77 +347,76 @@ export default {
this.q.pageNo = 1
this.sysUserList()
}
this.loadingMore=false
this.loadingMore = false
})
},
handleChange(value, direction, movedKeys) {
console.log(value, direction, movedKeys);
},
openDialog() {
this.dialogUser = true
},
handleChange(value, direction, movedKeys) {
console.log(value, direction, movedKeys);
},
openDialog() {
this.dialogUser = true
},
handleRemove(file, fileList) {
console.log(file, fileList);
this.form.fileName ='';
this.form.fileName = '';
this.form.fileId = '';
this.fileList=[]
this.fileList = []
},
//用递归方式去除children
getTreeData(data) {
for (var i = 0; i < data.length; i++) {
if (data[i].children.length < 1) {
// children若为空数组,则将children设为undefined
data[i].children = undefined;
} else {
// children若不为空数组,则继续 递归调用 本方法
this.getTreeData(data[i].children);
//用递归方式去除children
getTreeData(data) {
for (var i = 0; i < data.length; i++) {
if (data[i].children.length < 1) {
// children若为空数组,则将children设为undefined
data[i].children = undefined;
} else {
// children若不为空数组,则继续 递归调用 本方法
this.getTreeData(data[i].children);
}
}
return data;
},
updateList() {
this.$api.report.labelList().then(res => {
this.cascaderOptions = this.getTreeData(res.data)
})
this.$forceUpdate()
},
// 上传文件
uploadFile(params) {
let fd = new FormData();
fd.append('file', params.file);
this.$api.report.reportUploadFile(fd).then(({data}) => {
this.form.fileName = data.name;
this.form.fileId = data.key;
this.fileList = [data]
})
},
// 上传文件前
beforeUploadFile(file) {
let realFileType = file.name.split('.')[file.name.split('.').length - 1];
const isType = (
file.type === fileType.pdf || file.type === fileType.xls || file.type === fileType.xlsx || file.type === fileType.doc || file.type === fileType.docx || file.type === fileType.ppt || file.type === fileType.pptx
|| realFileType === 'pdf' || realFileType === 'xls' || realFileType === 'xlsx' || realFileType === 'doc' || realFileType === 'docx' || realFileType === 'ppt' || realFileType === 'pptx'
);
const isSize = file.size / 1024 / 1024 < 200;
if (!isType) {
this.$message.error('仅能上传 pdfxlsxlsxdocdocxpptpptx 格式文件');
}
if (!isSize) {
this.$message.error('您最大可上传200M文件');
}
return isType && isSize;
},
submit() {
let flag
this.$refs.processFormRef.validate(v => {
flag = v
return v
})
return flag
}
return data;
},
updateList() {
this.$api.report.labelList().then(res => {
this.cascaderOptions = this.getTreeData(res.data)
})
this.$forceUpdate()
},
// 上传文件
uploadFile(params) {
let fd = new FormData();
fd.append('file', params.file);
this.$api.report.reportUploadFile(fd).then(({data}) => {
this.form.fileName = data.name;
this.form.fileId = data.key;
this.fileList=[data]
})
},
// 上传文件前
beforeUploadFile(file) {
let realFileType = file.name.split('.')[file.name.split('.').length - 1];
const isType = (
file.type === fileType.pdf || file.type === fileType.xls || file.type === fileType.xlsx || file.type === fileType.doc || file.type === fileType.docx || file.type === fileType.ppt || file.type === fileType.pptx
|| realFileType === 'pdf' || realFileType === 'xls' || realFileType === 'xlsx' || realFileType === 'doc' || realFileType === 'docx' || realFileType === 'ppt' || realFileType === 'pptx'
);
const isSize = file.size / 1024 / 1024 < 200;
if (!isType) {
this.$message.error('仅能上传 pdfxlsxlsxdocdocxpptpptx 格式文件');
}
if (!isSize) {
this.$message.error('您最大可上传200M文件');
}
return isType && isSize;
},
submit() {
let flag
this.$refs.processFormRef.validate(v => {
flag = v
return v
})
return flag
}
},
mounted()
{
mounted() {
this.updateList()
this.getAllPerson()
}
@@ -448,5 +468,30 @@ export default {
}
}
}
.uploadBtn {
vertical-align: super;
}
.uploadFile{
margin-left: -35px;
height: 36px;
display: inline-block;
span{
display: inline-block;
color:#555;
max-width: 200px;
font-size: 15px;
word-break: keep-all;
text-overflow: ellipsis;
overflow: hidden;
}
.iconstyle{
margin-left: 5px;
font-size: 25px;
vertical-align: center;
line-height: 40px;
color: #555;
cursor: pointer;
}
}
</style>
+48 -57
View File
@@ -12,26 +12,19 @@
:process-form="processForm"></report-form>
</div>
<div class="process_content" v-if="$route.query.type !=='yiban'">
<span class="base_title">审核信息</span>
<audit-operation ref="operationRef" :prcId="prcId" :prcType="prcType" :taskId="taskId"
:examine="submitjson" :is-disable="disabled" @handleSubmit="handleSubmit" @handleTransfer="handleTransfer"></audit-operation>
</div>
<div class="process_content">
<span class="base_title">审批历史</span>
<process-approval-history :prcNum="prcNum"></process-approval-history>
</div>
<!-- v-if="$route.query.type !=='yiban'"-->
<div class="process_content" v-if="$route.query.type !=='yiban'">
<span class="base_title">审核信息</span>
<audit-operation ref="operationRef" :examine="submitjson" :is-disable="disabled"></audit-operation>
</div>
</div>
<process-footer
v-if="!disabled"
showCancel
:show-transfer="isShowTran"
:show-submit="isShowSubmit"
:submitLoading="isSubmit"
:TransferLoading="tranLoading"
@transfer="handleTransfer"
@submit="handleSubmit"
></process-footer>
<!-- <process-choose-tree-->
<!-- dialog-model-->
<!-- :visible.sync="visibleTree"-->
@@ -49,8 +42,7 @@
<script>
import processHeader from '@/components/ProcessHeader'
import processFooter from '@/components/ProcessFooter'
import processChooseTree from '../../components/OrgTable'
import processChooseTree from '@//components/OrgTable'
import processApprovalHistory from '@/components/ProcessApprovalHistory'
import auditOperation from './components/AuditOperation'
import reportTable from './components/reportForm'
@@ -63,11 +55,10 @@ export default {
components: {
processHeader,
reportTable,
processFooter,
processApprovalHistory,
auditOperation,
processChooseTree,
reportForm
reportForm,
processChooseTree
},
data () {
return {
@@ -83,11 +74,8 @@ export default {
}]
},
processForm: { prcName : ''},
visibleTree: false,
isSubmit: false,
tranLoading: false,
isShowTran: true,
isShowSubmit: true,
formControl: true,
disabled:false,
assignForm: {},
@@ -102,7 +90,7 @@ export default {
},
PERMISSION,
submitjson:{},
prcType:2
prcType: 4
}
},
created () {
@@ -142,22 +130,22 @@ export default {
// 选择转办
handleDblClick(treeNode) {
this.JuggleSub(this.taskId).then(res=> {
if(res){
if( treeNode[0].USID == this.$store.getters.userInfo.usid){
this.$message.warning("您不能转办给自己")
}else{
this.$api.process.changeAssignee({
taskId: this.taskId,
assignee: treeNode[0].USID,
userId: this.$store.getters.userInfo.usid,
pId: this.prcId
}).then(() => {
this.$message.success('转办成功')
this.$router.push({path: '/userCenter/processCenter', query: {id: this.$route.query.id}})
this.visibleTree = false
})
}
if(res){
if( treeNode[0].USID == this.$store.getters.userInfo.usid){
this.$message.warning("您不能转办给自己")
}else{
this.$api.process.changeAssignee({
taskId: this.taskId,
assignee: treeNode[0].USID,
userId: this.$store.getters.userInfo.usid,
pId: this.prcId
}).then(() => {
this.$message.success('转办成功')
this.$router.push({path: '/userCenter/processCenter', query: {id: this.$route.query.id}})
this.visibleTree = false
})
}
}
})
// taskId: this.$store.getters.getHandleInfo.taskId, // 任务id
// assignee: treeNode[0].userId, // 转办人
@@ -166,25 +154,28 @@ export default {
},
handleSubmit() {
this.JuggleSub(this.taskId).then(res=> {
if(res){
let submit = JSON.parse(this.processOld.submitJson)
let dataJson = this.processOld.dataJson
let submitJson = JSON.stringify({...submit, ...this.$refs.operationRef.examineForm})
this.completeProcess({
dataJson,
submitJson,
taskId: this.taskId,
userId: this.$store.getters.userInfo.usid,
prcType: this.prcType
})
}
})
// if (this.$refs.operationRef.submit()) {
// 通过了校验 需要整合参数 拿到原来的dataJson 再把新添加的增进去 在拼成dataJson
handleSubmit(type) {
if(this.$refs.operationRef.submit()){
this.JuggleSub(this.taskId).then(res=> {
if(res){
let submit = JSON.parse(this.processOld.submitJson)
let dataJson = this.processOld.dataJson
let submitJson = JSON.stringify({...submit, ...this.$refs.operationRef.examineForm})
this.completeProcess({
dataJson,
submitJson,
taskId: this.taskId,
userId: this.$store.getters.userInfo.usid,
prcType: this.prcType
})
}
})
}
}
// if (this.$refs.operationRef.submit()) {
// 通过了校验 需要整合参数 拿到原来的dataJson 再把新添加的增进去 在拼成dataJson
},
}
}
+41 -94
View File
@@ -3,7 +3,9 @@
<div class="process_box">
<process-header v-if="$route.query.isBegin || $route.query.isDraft" :title="'发起流程'"></process-header>
<process-header v-else-if="$route.query.type == 'yiban'" :title="'已办流程'" :proceesNum="prcNum"></process-header>
<process-header v-else :title="'发起人修改'" :proceesNum="prcNum"></process-header>
<process-header v-else-if=" $route.query.taskDefinitionKey == 'reEdit'" :title="'发起人修改'" :proceesNum="prcNum"></process-header>
<process-header v-else="" :title="'发起流程'" ></process-header>
<div class="procedure">
<div class="process_content">
@@ -23,29 +25,16 @@
:rules="assignFormRules" class="label-input-form" size="medium">
<el-row>
<el-col :span="9">
<el-form-item label="选择一级审批人:" prop="oneApprove">
<el-form-item label="选择审批人:" prop="oneApprove">
<el-input readonly :disabled="formControl" v-model="assignForm.oneApproveName"
@click.native="handleCheck('spr1')"
placeholder="请选择一级审批人员"></el-input>
placeholder="请选择审批人"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<el-form-item label="选择二级审批人员:" prop="twoApprove">
<el-input readonly :disabled="formControl" v-model="assignForm.twoApproveName"
@click.native="handleCheck('spr2')"
placeholder="请选择二级审批人员"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="说明:" prop="remark">
<el-input type="textarea" :disabled="formControl" v-model="assignForm.remark" placeholder="请输入说明"></el-input>
</el-form-item>
<el-col :span="9" style="margin-left: 5px">
<el-button size="medium" type="primary" @click="handleCheck('spr1')">选取</el-button>
</el-col>
</el-row>
</el-form>
</div>
</div>
@@ -113,55 +102,26 @@ export default {
prcName: '',
privacyLevel: '',
},
processFormRule: {
prcName: [{
required: true,
message: '请输入流程名称',
trigger: 'change'
}, {
max: 100,
message: '申请原因最多填写100字符',
trigger: 'change'
}]
},
applicationFormRule: {
applyReason: [{
max: 500, message: '申请原因最多填写500字符'
}],
power: [{
required: true,
message: '请选择申请权限'
}]
},
assignFormRules: {
oneApprove: [{
required: true,
message: '请选择一级审批人',
message: '请选择审批人',
trigger: 'change'
}],
twoApprove: [{
required: true,
message: '请选择二级审批人员',
trigger: 'change'
}],
remark: [{
max: 500, message: '说明最多填写500字符'
}]
},
prcType: 2,
prcType: 4,
prcName:''
}
},
async created() {
// 第一次进入此页面 需要清楚校验
if (this.$route.query.isBegin) {
// if (this.$route.query.isBegin) {
// if (this.$route.query.ids.split(',').length > 0) {
// this.reportList(this.$route.query.ids)
// }
this.isShowSave = true
this.$store.commit('setHandleProcess','')
this.handleReset()
}
// 如果是从草稿进入的
if (this.$route.query.isDraft) {
this.isShowSave = true
@@ -170,16 +130,11 @@ export default {
this.prcId = this.$store.getters.handleProcess?.prcId
this.prcName = this.$store.getters.handleProcess?.prcName
this.getDraftDetail().then(res => {
this.$set(this.processForm,'prcName', this.prcName)
if(this.processOld.submitJson !== '{}'){
let submitJson=JSON.parse(this.processOld.submitJson)
this.processForm=JSON.parse(this.processOld.dataJson)
this.$set(this.assignForm,'oneApprove',submitJson.oneApprove)
this.$set(this.assignForm,'oneApproveName',submitJson.oneApproveName)
this.$set(this.assignForm,'twoApprove',submitJson.twoApprove)
this.$set(this.assignForm,'twoApproveName',submitJson.twoApproveName)
this.$set(this.assignForm,'remark',submitJson.remark)
}
this.$nextTick(()=>{
this.$refs.processFormRef.clearValidate()
@@ -188,51 +143,56 @@ export default {
})
}
if (this.$route.query.taskDefinitionKey == 'reEdit' ) {
else if (this.$route.query.taskDefinitionKey == 'reEdit' ) {
this.taskId = this.$store.getters.handleProcess.taskId
this.prcNum = this.$store.getters.handleProcess.prcNum
this.prcId = this.$store.getters.handleProcess.prcId
this.prcName = this.$store.getters.handleProcess.prcName
this.prcName = JSON.stringify(this.prcName)
this.initShow = true
this.formControlname = true
this.$set(this.processForm,'prcName',this.$route.query.prcName)
await this.getProcessDetail()
let submitJson = JSON.parse(this.processOld.submitJson)
// this.applicationForm.applyReason = applyReason.applyReason
this.processForm=JSON.parse(this.processOld.dataJson)
this.$set(this.assignForm,'oneApprove',submitJson.oneApprove)
this.$set(this.assignForm,'oneApproveName',submitJson.oneApproveName)
this.$set(this.assignForm,'twoApprove',submitJson.twoApprove)
this.$set(this.assignForm,'twoApproveName',submitJson.twoApproveName)
this.$set(this.assignForm,'remark',submitJson.remark)
}
if (this.$route.query.type == 'yiban') {
else if (this.$route.query.type == 'yiban') {
this.taskId = this.$store.getters.handleProcess.taskId
this.prcNum = this.$store.getters.handleProcess.prcNum
this.prcId = this.$store.getters.handleProcess.prcId
this.prcName = this.$store.getters.handleProcess.prcName
this.formControl = true
this.initShow = true
this.showTableD = true
this.$set(this.processForm,'prcName', this.prcName)
this.getProcessDetail().then((res) => {
let submitJson = JSON.parse(this.processOld.submitJson)
this.processForm=JSON.parse(this.processOld.dataJson)
// this.applicationForm.applyReason = applyReason.applyReason
this.$set(this.assignForm,'oneApprove',submitJson.oneApprove)
this.$set(this.assignForm,'oneApproveName',submitJson.oneApproveName)
this.$set(this.assignForm,'twoApprove',submitJson.twoApprove)
this.$set(this.assignForm,'twoApproveName',submitJson.twoApproveName)
this.$set(this.assignForm,'remark',submitJson.remark)
})
}else{
// 第一次进入此页面 需要清楚校验
this.isShowSave = true
this.$store.commit('setHandleProcess','')
this.handleReset()
}
},
methods: {
handleReset() {
this.processForm.prcName = ''
if(this.$route.query.taskDefinitionKey == 'reEdit'){
this.processForm.prcName = this.prcName
this.processForm={
departmentName:'',
department:'',
name:'',
year:'',
labelList:'',
confidentialLevel:'',
secrecyLast:'',
privacyLevel:'',
tags:'',
mainContent:'',
fileId:'',
fileName:'',
}
this.applicationForm = {
applyReason: '',
@@ -244,6 +204,7 @@ export default {
twoApprove: ''
}
this.$nextTick(() => {
this.$refs.applicationFormRef.clearValidate()
this.$refs.assignFormRef.clearValidate()
})
@@ -283,25 +244,11 @@ export default {
}
// console.log(this.assignForm.name1Id, this.assignForm.name2Id)
},
// 获取表格列表 吧查询到的值传给子组件
reportList(ids) {
this.$api.permissionProcess.getReportLisy({
pageSize:1000,
pageNo:1,
ids: ids.split(',')
}).then(({data}) => {
this.tableData = data.records.map(item => {
item.reportId = item['id']
delete item['id']
return item
})
})
},
// 保存
handleSave(){
this.saveLoading = true
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark})
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid})
let dataJson = JSON.stringify(this.processForm)
let params = {
prcName: this.processForm.prcName,
@@ -332,8 +279,8 @@ export default {
handleSubmit() {
console.log(this.$store.getters.userInfo.usid, " this.$store.getters.userInfo.USID")
this.$refs.assignFormRef.validate(async v => {
debugger
this.processForm=this.$refs.basMes.form
this.processForm.prcName=this.processForm.name
let z=this.$refs.basMes.submit()
if (v && z) {
//如果不是第一次
@@ -341,7 +288,7 @@ export default {
let flag=await this.JuggleSub(this.taskId)
if(flag){
let dataJson = JSON.stringify(this.processForm)
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid,approvalOpinion:this.assignForm.remark})
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid})
this.completeProcess({
dataJson,
submitJson,
@@ -371,7 +318,7 @@ export default {
}
form.approvalOpinion = this.assignForm.remark
form.prcType = this.prcType
form.prcName = this.processForm.prcName
form.prcName = this.processForm.name
form.userId = this.$store.getters.userInfo.usid
form.bpnId = this.$store.getters.handleProcess?.id
//...this.applicationForm,...this.processForm,