【修改】 修改上传报告 修改流程中心(没完成)

This commit is contained in:
zhoulingpo
2023-05-09 15:31:50 +08:00
parent d76713dbac
commit 6c01b7f587
14 changed files with 191 additions and 72 deletions
@@ -91,7 +91,7 @@ export default {
default:''
},
prcType:{
type:String,
type:Number,
default:''
}
},
@@ -27,8 +27,8 @@
<el-col :span="9" :offset="6">
<el-form-item label="标签:" prop="department">
<el-cascader :disabled="formControl" width="100%" v-model="form.labelList" :options="cascaderOptions"
filterable
:props="{ checkStrictly: true }" clearable placeholder="请选择标签">
filterable collapse-tags
:props="{ checkStrictly: true ,multiple: true }" clearable placeholder="请选择标签">
<template slot-scope="{ node, data }">
<span :title="data.label">{{ data.label }}</span>
</template>
@@ -48,9 +48,9 @@
</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"
<el-date-picker :disabled="formControl" v-model="form.secrecyLast" type="date" value-format="yyyy-mm-dd"
placeholder="请选择保密到期日期"
prefix-icon="null" :picker-options="proOptions"/>
prefix-icon="null" />
</el-form-item>
</el-col>
</el-row>
@@ -110,9 +110,9 @@
</el-col>
<el-col :span="8">
<span class="uploadFile" v-if="form.fileName">
<span :title="form.fileName">{{form.fileName}}</span>
<i class="el-icon-cloudy iconstyle" @click="downFile(form.fileId)"></i>
<i class="el-icon-delete iconstyle" @click="delFile"></i>
<span :class="{'fontColor':formControl}" :title="form.fileName">{{form.fileName}}</span>
<i :class="{'fontColor':formControl}" class="el-icon-cloudy iconstyle" @click="downFile(form.fileId)"></i>
<i :class="{'fontColor':formControl}" class="el-icon-delete iconstyle" @click="delFile"></i>
</span>
</el-col>
</el-row>
@@ -130,6 +130,7 @@ import newTranslate from "../../../components/newTranslate";
import VueTagsInput from '@johmun/vue-tags-input';
import orgTable from '@/components/OrgTable'
import {privacyLevelOptions,confidentialLevelOptions} from '@/utils/Enum/enum'
import { downloadFile } from '@/utils/downloadFile'
export default {
dicts: ['classified_level', 'privacy_level'],
components: {
@@ -223,8 +224,27 @@ export default {
message: "报告文件不能为空", trigger: 'change'
}
],
privacyLevel:[
{
required: true,
message: "报告隐私等级不能为空", trigger: 'change'
}
],
confidentialLevel:[
{
required: true,
message: "报告涉密等级不能为空", trigger: 'change'
}
],
secrecyLast:[
{
required: true,
message: "保密到期日期不能为空", trigger: 'change'
}
]
},
q: {
pageNo: 1,
@@ -236,12 +256,28 @@ export default {
watch: {
processForm(val) {
this.form = this.processForm
if(this.form.secrecyLast){
this.isShowTime=true
this.form.secrecyLast=new Date(this.form.secrecyLast)
}
if(this.processForm.keyContent){
this.tags=JSON.parse(this.processForm.keyContent)
}
if(this.processForm.labelList && typeof this.processForm.labelList[0]=='string'){
this.form.labelList= this.processForm.labelList.map(item=>{
return JSON.parse(item)
})
}
}
},
methods: {
downFile(id){
this.$api.reportProcess.downFile(id).then(res=>{
if(this.formControl) return
this.$api.report.reportDownload({reportId:'',fileId:id}).then(res=>{
downloadFile(res)
})
},
handleClick(){
@@ -250,18 +286,21 @@ export default {
this.visibleOrgTable=true
},
isTreeOk(checkedList){
const parts = []
const partsName = []
checkedList.map((item, index) => {
parts.push(item.id)
parts.push(item.orgCode)
partsName.push(item.orgName)
})
debugger
this.qcrList = checkedList
this.form.department = parts.toString()
this.form.departmentName = partsName.toString()
},
delFile() {
if(this.formControl) return
this.fileList=[]
this.form.fileName = '';
this.form.fileId = '';
@@ -270,8 +309,15 @@ export default {
let imList=['普通商密','核心商密']
if( imList.indexOf(this.form.confidentialLevel)>-1){
let currentDate=new Date()
let futureDate
if(item=='普通商密')
futureDate= new Date(currentDate.getFullYear() + 5, currentDate.getMonth(), currentDate.getDate());
else
futureDate = new Date(currentDate.getFullYear() + 10, currentDate.getMonth(), currentDate.getDate());
this.isShowTime=true
this.form.secrecyLast = ''
this.form.secrecyLast = futureDate
}else{
this.isShowTime=false
this.form.secrecyLast = ''
@@ -497,6 +543,9 @@ export default {
color: #555;
cursor: pointer;
}
.fontColor{
color: #ccc;
}
}
</style>
+2 -1
View File
@@ -164,7 +164,8 @@ export default {
submitJson,
taskId: this.taskId,
userId: this.$store.getters.userInfo.usid,
prcType: this.prcType
prcType: this.prcType,
reportId: this.processOld.dataId
})
}
})
+8 -3
View File
@@ -129,7 +129,7 @@ export default {
this.prcNum = this.$store.getters.handleProcess?.prcNum
this.prcId = this.$store.getters.handleProcess?.prcId
this.prcName = this.$store.getters.handleProcess?.prcName
this.getDraftDetail().then(res => {
this.getProcessDetail().then(res => {
if(this.processOld.submitJson !== '{}'){
let submitJson=JSON.parse(this.processOld.submitJson)
this.processForm=JSON.parse(this.processOld.dataJson)
@@ -227,6 +227,7 @@ export default {
},
// 树点击
isTreeOk(checkedList) {
// console.log(checkedList)
const parts = []
const partsName = []
@@ -251,7 +252,7 @@ export default {
let submitJson = JSON.stringify({...this.assignForm, userId: this.$store.getters.userInfo.usid})
let dataJson = JSON.stringify(this.processForm)
let params = {
prcName: this.processForm.prcName,
prcName: this.processForm.name,
userId: this.$store.getters.userInfo.usid,
prcType: this.prcType,
createUserName: this.$store.getters.userInfo.usname,
@@ -280,7 +281,10 @@ export default {
console.log(this.$store.getters.userInfo.usid, " this.$store.getters.userInfo.USID")
this.$refs.assignFormRef.validate(async v => {
this.processForm=this.$refs.basMes.form
this.processForm.keyContent = JSON.stringify(this.$refs.basMes.tags)
this.processForm.prcName=this.processForm.name
// this.processForm.labelList= JSON.stringify(this.processForm.labelList)
let z=this.$refs.basMes.submit()
if (v && z) {
//如果不是第一次
@@ -294,7 +298,8 @@ export default {
submitJson,
taskId: this.taskId,
userId: this.$store.getters.userInfo.usid,
prcType: this.prcType
prcType: this.prcType,
reportId:''
})
}
} else {