feat: There is no way the, BUSS PROCESS

This commit is contained in:
super_liu
2021-12-16 18:16:31 +08:00
parent f5cf717bea
commit 95818728c8
7 changed files with 275 additions and 126 deletions
+8
View File
@@ -448,6 +448,14 @@ export function processModelHisOne (data) {
}) })
} }
export function processModelHisOneCount (data) {
return axios({
url: '/api/lawss/activiti/processModelHisOneCount',
method: 'get',
params: data
})
}
export function evaluationHisList (data) { export function evaluationHisList (data) {
return axios({ return axios({
url: '/api/lawss/activiti/evaluationHisList', url: '/api/lawss/activiti/evaluationHisList',
+2 -1
View File
@@ -76,6 +76,7 @@
</template> </template>
<script> <script>
import { onlyOfficeUrl } from '@/sysConfig'
import { getConvertFileByAttId,getBusStandFileByAttId } from 'api/process' import { getConvertFileByAttId,getBusStandFileByAttId } from 'api/process'
let Base64 = require('js-base64').Base64; let Base64 = require('js-base64').Base64;
export default { export default {
@@ -365,7 +366,7 @@ export default {
}else { }else {
const nowTime = new Date().getTime() const nowTime = new Date().getTime()
// window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl))); // window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)));
window.open('/static/onlyOffice/onlinePreview.html?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName) window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
} }
// window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id)) // window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id))
} }
@@ -993,6 +993,7 @@
</template> </template>
<script> <script>
import { onlyOfficeUrl } from '@/sysConfig'
import ProcessHeader from '../../components/ProcessHeader' import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter' import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle' import ProcessTitle from '../../components/ProcessTitle'
@@ -2246,8 +2247,8 @@
window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl) window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl)
}else { }else {
const nowTime = new Date().getTime() const nowTime = new Date().getTime()
// window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl))); window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
window.open('/static/onlyOffice/onlinePreview.html?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
} }
} }
}).catch(e => { }).catch(e => {
@@ -804,6 +804,7 @@
</template> </template>
<script> <script>
import { onlyOfficeUrl } from '@/sysConfig'
import ProcessHeader from '../../components/ProcessHeader' import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter' import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle' import ProcessTitle from '../../components/ProcessTitle'
@@ -2295,7 +2296,7 @@
editFileInfo.fileName = editFilePath[2] editFileInfo.fileName = editFilePath[2]
editFileInfo.userName = this.$store.getters.userInfo.userName editFileInfo.userName = this.$store.getters.userInfo.userName
const nowTime = new Date().getTime() const nowTime = new Date().getTime()
window.open('http://127.0.0.1:8080/editor?oldFileName=' + showName + '&fileType=' + 'docx' + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName+'&userId='+editFileInfo.userId+'&userName='+editFileInfo.userName) window.open(onlyOfficeUrl+'/editor?pid='+this.pId+'&taskIds='+this.taskIds+'&editType='+editFileInfo.editType+'&oldFileName=' + showName + '&fileType=' + 'docx' + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName+'&userId='+editFileInfo.userId+'&userName='+editFileInfo.userName)
this.isSubmit = false this.isSubmit = false
} }
}).catch(e => { }).catch(e => {
@@ -2437,6 +2438,11 @@
// } // }
this.$refs['formTongGuo'].validate((valid) => { this.$refs['formTongGuo'].validate((valid) => {
if (valid) { if (valid) {
this.processModelHisOne(this.pId,this.taskIds)
.then(res => {
if(res){
const editFileInfo = res
if(editFileInfo && editFileInfo.editStatus === '1'){
this.isSubmit = true this.isSubmit = true
this.saveLoading = true this.saveLoading = true
this.form.commentText = this.formTongGuo.commentText this.form.commentText = this.formTongGuo.commentText
@@ -2467,6 +2473,15 @@
this.$message.success(res.message) this.$message.success(res.message)
} }
}) })
}else {
this.$message.warning('请先在线编辑,再提交流程')
}
}
}).catch(e => {
console.log(e)
// this.$message.warning('文件不存在,预览失败')
})
}}) }})
}, },
busVsFunc(){ busVsFunc(){
@@ -803,10 +803,11 @@
</template> </template>
<script> <script>
import { onlyOfficeUrl } from '@/sysConfig'
import ProcessHeader from '../../components/ProcessHeader' import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter' import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle' import ProcessTitle from '../../components/ProcessTitle'
import {saveTaskFirst, queryTaskFirst, getBusStandFileByAttId,inboundLiaisonDetail,processModelHisOne} from "api/process"; import {saveTaskFirst, queryTaskFirst, getBusStandFileByAttId,inboundLiaisonDetail,processModelHisOneCount} from "api/process";
import TreeSelect from '@/components/treeSelect/treeSelect.vue'; import TreeSelect from '@/components/treeSelect/treeSelect.vue';
import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue'; import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue';
let Base64 = require('js-base64').Base64; let Base64 = require('js-base64').Base64;
@@ -2264,11 +2265,10 @@
handleTabs(name) { handleTabs(name) {
this.active = name this.active = name
}, },
processModelHisOne(pId,taskIds) { processModelHisOneCount(pId) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
processModelHisOne({ processModelHisOneCount({
pid: pId, pid: pId
taskId: taskIds
}).then(res => { }).then(res => {
if (res) { if (res) {
resolve(res) resolve(res)
@@ -2283,7 +2283,7 @@
// 在线编辑 // 在线编辑
handleOnLineEdit(){ handleOnLineEdit(){
this.isSubmit = true this.isSubmit = true
this.processModelHisOne(this.pId,this.taskIds) this.processModelHisOneCount(this.pId,this.taskIds)
.then(res => { .then(res => {
console.log(res) console.log(res)
if(res){ if(res){
@@ -2294,7 +2294,7 @@
editFileInfo.fileName = editFilePath[2] editFileInfo.fileName = editFilePath[2]
editFileInfo.userName = this.$store.getters.userInfo.userName editFileInfo.userName = this.$store.getters.userInfo.userName
const nowTime = new Date().getTime() const nowTime = new Date().getTime()
window.open('http://127.0.0.1:8080/editor?oldFileName=' + showName + '&fileType=' + 'docx' + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName+'&userId='+editFileInfo.userId+'&userName='+editFileInfo.userName) window.open(onlyOfficeUrl+'/editor?pid='+this.pId+'&taskIds='+this.taskIds+'&editType='+editFileInfo.editType+'&oldFileName=' + showName + '&fileType=' + 'docx' + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName+'&userId='+editFileInfo.userId+'&userName='+editFileInfo.userName)
this.isSubmit = false this.isSubmit = false
} }
}).catch(e => { }).catch(e => {
@@ -2436,6 +2436,11 @@
// } // }
this.$refs['formTongGuo'].validate((valid) => { this.$refs['formTongGuo'].validate((valid) => {
if (valid) { if (valid) {
this.processModelHisOneCount(this.pId)
.then(res => {
if(res){
const editFileInfo = res
if(editFileInfo && editFileInfo.editStatus === '1'){
this.isSubmit = true this.isSubmit = true
this.saveLoading = true this.saveLoading = true
this.form.commentText = this.formTongGuo.commentText this.form.commentText = this.formTongGuo.commentText
@@ -2450,11 +2455,10 @@
}, res => { }, res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
// 流程提交之后,应该流转至待办任务页面
this.isSubmit = false this.isSubmit = false
this.saveLoading = false this.saveLoading = false
// 流程提交之后,应该流转至待办任务页面
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
// if(this.formTongGuo.approvalOpinion === '1'){ // if(this.formTongGuo.approvalOpinion === '1'){
// this.$message.warning("驳回成功") // this.$message.warning("驳回成功")
// this.isSubmit = false // this.isSubmit = false
@@ -2467,6 +2471,15 @@
this.$message.success(res.message) this.$message.success(res.message)
} }
}) })
}else {
this.$message.warning('请先在线编辑,再提交流程')
}
}
}).catch(e => {
console.log(e)
// this.$message.warning('文件不存在,预览失败')
})
}}) }})
}, },
busVsFunc(){ busVsFunc(){
@@ -497,8 +497,10 @@
v-show="verifySarStandard" v-show="verifySarStandard"
show-save show-save
show-submit show-submit
show-edit
:saveLoading="saveLoading" :saveLoading="saveLoading"
:submitLoading="isSubmit" :submitLoading="isSubmit"
@onLineEdit="handleOnLineEdit"
@save="handleSave" @save="handleSave"
@submit="handleSubmit" @submit="handleSubmit"
> >
@@ -844,10 +846,11 @@
</template> </template>
<script> <script>
import { onlyOfficeUrl } from '@/sysConfig'
import ProcessHeader from '../../components/ProcessHeader' import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter' import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle' import ProcessTitle from '../../components/ProcessTitle'
import {saveTaskFirst, queryTaskFirst, getBusStandFileByAttId,inboundLiaisonDetail} from "api/process"; import {saveTaskFirst, queryTaskFirst, getBusStandFileByAttId,inboundLiaisonDetail,processModelHisOneCount} from "api/process";
import TreeSelect from '@/components/treeSelect/treeSelect.vue'; import TreeSelect from '@/components/treeSelect/treeSelect.vue';
import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue'; import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue';
let Base64 = require('js-base64').Base64; let Base64 = require('js-base64').Base64;
@@ -2368,6 +2371,43 @@
handleTabs(name) { handleTabs(name) {
this.active = name this.active = name
}, },
processModelHisOneCount(pId) {
return new Promise((resolve, reject) => {
processModelHisOneCount({
pid: pId
}).then(res => {
if (res) {
resolve(res)
} else {
reject()
}
}).catch(e => {
reject(e)
})
})
},
// 在线编辑
handleOnLineEdit(){
this.isSubmit = true
this.processModelHisOneCount(this.pId,this.taskIds)
.then(res => {
console.log(res)
if(res){
const editFileInfo = res
const showName = this.$store.getters.userInfo.userName + editFileInfo.taskInfo
const editFilePath = editFileInfo.editFilePath.split("/")
editFileInfo.filePath = editFilePath[0]+'/'+editFilePath[1]+'/'
editFileInfo.fileName = editFilePath[2]
editFileInfo.userName = this.$store.getters.userInfo.userName
const nowTime = new Date().getTime()
window.open(onlyOfficeUrl+'/editor?pid='+this.pId+'&taskIds='+this.taskIds+'&editType='+editFileInfo.editType+'&oldFileName=' + showName + '&fileType=' + 'docx' + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName+'&userId='+editFileInfo.userId+'&userName='+editFileInfo.userName)
this.isSubmit = false
}
}).catch(e => {
console.log(e)
// this.$message.warning('文件不存在,预览失败')
})
},
//保存 //保存
handleSave() { handleSave() {
this.form.country=this.countryArr; this.form.country=this.countryArr;
@@ -2502,6 +2542,11 @@
// } // }
this.$refs['formTongGuo'].validate((valid) => { this.$refs['formTongGuo'].validate((valid) => {
if (valid) { if (valid) {
this.processModelHisOneCount(this.pId)
.then(res => {
if(res){
const editFileInfo = res
if(editFileInfo && editFileInfo.editStatus === '1'){
this.isSubmit = true this.isSubmit = true
this.saveLoading = true this.saveLoading = true
this.form.commentText = this.formTongGuo.commentText this.form.commentText = this.formTongGuo.commentText
@@ -2532,6 +2577,15 @@
this.$message.success(res.message) this.$message.success(res.message)
} }
}) })
}else {
this.$message.warning('请先在线编辑,再提交流程')
}
}
}).catch(e => {
console.log(e)
// this.$message.warning('文件不存在,预览失败')
})
}}) }})
}, },
busVsFunc(){ busVsFunc(){
@@ -455,7 +455,9 @@
v-show="verifySarStandard" v-show="verifySarStandard"
show-save show-save
show-submit show-submit
show-edit
:saveLoading="saveLoading" :saveLoading="saveLoading"
@onLineEdit="handleOnLineEdit"
@save="handleSave" @save="handleSave"
@submit="handleSubmit" @submit="handleSubmit"
> >
@@ -801,10 +803,11 @@
</template> </template>
<script> <script>
import { onlyOfficeUrl } from '@/sysConfig'
import ProcessHeader from '../../components/ProcessHeader' import ProcessHeader from '../../components/ProcessHeader'
import ProcessFooter from '../../components/ProcessFooter' import ProcessFooter from '../../components/ProcessFooter'
import ProcessTitle from '../../components/ProcessTitle' import ProcessTitle from '../../components/ProcessTitle'
import {saveTaskFirst, queryTaskFirst, getBusStandFileByAttId,inboundLiaisonDetail} from "api/process"; import {saveTaskFirst, queryTaskFirst, getBusStandFileByAttId,inboundLiaisonDetail,processModelHisOneCount} from "api/process";
import TreeSelect from '@/components/treeSelect/treeSelect.vue'; import TreeSelect from '@/components/treeSelect/treeSelect.vue';
import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue'; import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue';
let Base64 = require('js-base64').Base64; let Base64 = require('js-base64').Base64;
@@ -2256,6 +2259,43 @@
handleTabs(name) { handleTabs(name) {
this.active = name this.active = name
}, },
processModelHisOneCount(pId) {
return new Promise((resolve, reject) => {
processModelHisOneCount({
pid: pId
}).then(res => {
if (res) {
resolve(res)
} else {
reject()
}
}).catch(e => {
reject(e)
})
})
},
// 在线编辑
handleOnLineEdit(){
this.isSubmit = true
this.processModelHisOneCount(this.pId,this.taskIds)
.then(res => {
console.log(res)
if(res){
const editFileInfo = res
const showName = this.$store.getters.userInfo.userName + editFileInfo.taskInfo
const editFilePath = editFileInfo.editFilePath.split("/")
editFileInfo.filePath = editFilePath[0]+'/'+editFilePath[1]+'/'
editFileInfo.fileName = editFilePath[2]
editFileInfo.userName = this.$store.getters.userInfo.userName
const nowTime = new Date().getTime()
window.open(onlyOfficeUrl+'/editor?pid='+this.pId+'&taskIds='+this.taskIds+'&editType='+editFileInfo.editType+'&oldFileName=' + showName + '&fileType=' + 'docx' + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName+'&userId='+editFileInfo.userId+'&userName='+editFileInfo.userName)
this.isSubmit = false
}
}).catch(e => {
console.log(e)
// this.$message.warning('文件不存在,预览失败')
})
},
//保存 //保存
handleSave() { handleSave() {
this.form.country=this.countryArr; this.form.country=this.countryArr;
@@ -2396,7 +2436,13 @@
// } // }
this.$refs['formTongGuo'].validate((valid) => { this.$refs['formTongGuo'].validate((valid) => {
if (valid) { if (valid) {
this.processModelHisOneCount(this.pId)
.then(res => {
if(res){
const editFileInfo = res
if(editFileInfo && editFileInfo.editStatus === '1'){
this.isSubmit = true this.isSubmit = true
this.saveLoading = true
this.form.commentText = this.formTongGuo.commentText this.form.commentText = this.formTongGuo.commentText
this.form.approvalOpinion = this.formTongGuo.approvalOpinion this.form.approvalOpinion = this.formTongGuo.approvalOpinion
const json = JSON.stringify(this.form); const json = JSON.stringify(this.form);
@@ -2410,6 +2456,8 @@
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
// 流程提交之后,应该流转至待办任务页面 // 流程提交之后,应该流转至待办任务页面
this.isSubmit = false
this.saveLoading = false
this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) this.$router.push({path:'/processCenter?tabsName=ProcessCenter'})
// if(this.formTongGuo.approvalOpinion === '1'){ // if(this.formTongGuo.approvalOpinion === '1'){
// this.$message.warning("驳回成功") // this.$message.warning("驳回成功")
@@ -2423,6 +2471,15 @@
this.$message.success(res.message) this.$message.success(res.message)
} }
}) })
}else {
this.$message.warning('请先在线编辑,再提交流程')
}
}
}).catch(e => {
console.log(e)
// this.$message.warning('文件不存在,预览失败')
})
}}) }})
}, },
busVsFunc(){ busVsFunc(){