【修改】修改bug
This commit is contained in:
@@ -9,14 +9,7 @@ export default {
|
||||
data: data
|
||||
})
|
||||
},
|
||||
// 查询报告如果已经发起了 就不能再发起了
|
||||
selectReport (data) {
|
||||
return request({
|
||||
url: '/api/report/isAct',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
|
||||
deletReport(data){
|
||||
return request({
|
||||
url: '/api/report/powerApply/deleteAct',
|
||||
|
||||
@@ -116,7 +116,7 @@ export default {
|
||||
params: data
|
||||
})
|
||||
},
|
||||
// 停用流程发起
|
||||
// 流程发起
|
||||
startProcess(data) {
|
||||
return request({
|
||||
url: '/api/startProcess',
|
||||
@@ -125,7 +125,7 @@ export default {
|
||||
|
||||
})
|
||||
},
|
||||
// 停用流程发起
|
||||
// 流程发起
|
||||
startProcessALL(data) {
|
||||
return request({
|
||||
url: '/api/batchStartProcess',
|
||||
@@ -162,5 +162,14 @@ export default {
|
||||
params: data
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
// 查询报告如果已经发起了 就不能再发起了
|
||||
selectReport (data) {
|
||||
return request({
|
||||
url: '/api/report/isAct',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ export default {
|
||||
// 新增或编辑报告
|
||||
reportAdd (data) {
|
||||
return request({
|
||||
url: '/api/report/add',
|
||||
url: '/api/report/saveOrUpdate',
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
|
||||
@@ -7,4 +7,12 @@ export default {
|
||||
params:data
|
||||
})
|
||||
},
|
||||
// 判断报告名称是否重复
|
||||
JggleName(data) {
|
||||
return request({
|
||||
url: '/api/report/isReportNameOccupy',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<el-dialog
|
||||
v-if="isOrg"
|
||||
append-to-body
|
||||
:title="showTitle"
|
||||
title="组织机构"
|
||||
:visible.sync="isVisible"
|
||||
:close-on-click-modal="false"
|
||||
class="org-table"
|
||||
|
||||
@@ -213,8 +213,6 @@
|
||||
this.$message.warning("您没有当前流程的操作权限")
|
||||
resolve(false)
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -62,7 +62,8 @@
|
||||
</div>
|
||||
<div class="report-jug">
|
||||
<div class="report-jug-left">
|
||||
报告满意度:
|
||||
<div>报告满意度</div>
|
||||
|
||||
<el-rate allow-half :max="5" v-model="userRating" @click.native="saveScore"></el-rate>
|
||||
</div>
|
||||
<div class="pointclick">
|
||||
@@ -386,7 +387,12 @@ export default {
|
||||
|
||||
.report-jug-left {
|
||||
display: flex;
|
||||
|
||||
&>div{
|
||||
margin-right: 10px;
|
||||
}
|
||||
::v-deep .el-rate__item{
|
||||
vertical-align: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -316,6 +316,7 @@ export default {
|
||||
console.log("发送数据")
|
||||
// 处理表格数据
|
||||
|
||||
|
||||
//如果不是第一次
|
||||
if (this.initShow) {
|
||||
let flag= this.JuggleSub(this.taskId)
|
||||
@@ -324,23 +325,24 @@ export default {
|
||||
this.completeProcess(this.params[0])
|
||||
}
|
||||
} else {
|
||||
// 先判断数据完整
|
||||
if(this.JuggleTableAll()){
|
||||
|
||||
this.organizeData()
|
||||
this.startProcess()
|
||||
// 完整判断草稿发起的在不在流程
|
||||
if(this.$route.query.isDraft){
|
||||
this.isSendDraft().then((res)=>{
|
||||
this.organizeData()
|
||||
this.startProcess()
|
||||
})
|
||||
}else{
|
||||
this.organizeData()
|
||||
this.startProcess()
|
||||
}
|
||||
}else{
|
||||
this.$message.warning("请把表格数据填写完整")
|
||||
}
|
||||
// this.isSendDraft().then(()=>{
|
||||
|
||||
// })
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
//修改参数
|
||||
changeParam() {
|
||||
|
||||
},
|
||||
// 草稿发起 需要先调用这个接口
|
||||
isSendDraft(){
|
||||
@@ -348,7 +350,7 @@ export default {
|
||||
return item.reportId
|
||||
})
|
||||
return new Promise((resolve,reject)=>{
|
||||
this.$api.permissionProcess.selectReport({ids:ids}).then((res)=>{
|
||||
this.$api.process.selectReport({usid:this.userId,ids:ids}).then((res)=>{
|
||||
if(res.data.length==0){
|
||||
resolve(true)
|
||||
}else{
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="4">
|
||||
<el-form-item label="标签:" prop="department">
|
||||
<el-form-item label="标签:" >
|
||||
<el-cascader :disabled="formControl" width="100%" v-model="form.labelList" :options="cascaderOptions"
|
||||
filterable collapse-tags
|
||||
:props="{ checkStrictly: true ,multiple: true }" clearable placeholder="请选择标签">
|
||||
@@ -265,9 +265,9 @@ export default {
|
||||
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)
|
||||
})
|
||||
}
|
||||
@@ -284,8 +284,10 @@ export default {
|
||||
})
|
||||
},
|
||||
handleClick(){
|
||||
this.orgTableVal=this.form.department
|
||||
this.orgTableValName=this.form.departmentName
|
||||
if(this.form.departmentName){
|
||||
this.orgTableVal=this.form.departmentId
|
||||
this.orgTableValName=this.form.departmentName
|
||||
}
|
||||
this.visibleOrgTable=true
|
||||
},
|
||||
isTreeOk(checkedList){
|
||||
|
||||
@@ -173,17 +173,20 @@ export default {
|
||||
this.isShowSave = true
|
||||
this.$store.commit('setHandleProcess','')
|
||||
this.handleReset()
|
||||
if(this.$store.getters.userInfo.levelId=='0.5'){
|
||||
this.isShowSave = false
|
||||
this.isLevel=false
|
||||
}else{
|
||||
this.isLevel = true
|
||||
this.isShowSave = true
|
||||
}
|
||||
// 第一次进入此页面 需要依据ids区分是新增还是编辑流程
|
||||
if(this.$route.query.ids){
|
||||
this.prcType=5
|
||||
// 调用接口
|
||||
this.ids=this.$route.query.ids
|
||||
// 如果该用户的levelId==5 就直接编辑 并且不显示指派信息
|
||||
if(this.$store.getters.userInfo.levelId=='0.5'){
|
||||
this.isLevel=false
|
||||
}else{
|
||||
this.isLevel = true
|
||||
}
|
||||
|
||||
this.getReportDetail()
|
||||
}else{
|
||||
this.prcType=4
|
||||
@@ -209,10 +212,13 @@ export default {
|
||||
this.$api.report.getReportDetail(this.ids).then(res=>{
|
||||
this.processForm=res.data
|
||||
this.processForm.reportId=this.processForm.id
|
||||
delete this.processForm['id']
|
||||
if(this.processForm.fileId){
|
||||
this.getFileName()
|
||||
if(this.isLevel){
|
||||
delete this.processForm['id']
|
||||
if(this.processForm.fileId){
|
||||
this.getFileName()
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
handleReset() {
|
||||
@@ -300,7 +306,8 @@ export default {
|
||||
createUser: this.$store.getters.userInfo.usid,
|
||||
submitJson,
|
||||
dataJson,
|
||||
id: this.$store.getters.handleProcess?.id
|
||||
id: this.$store.getters.handleProcess?.id,
|
||||
reportId: this.processForm.reportId || ''
|
||||
}
|
||||
this.saveProcess(params).then(
|
||||
()=>{
|
||||
@@ -320,8 +327,9 @@ export default {
|
||||
// 提交
|
||||
handleSubmit() {
|
||||
console.log(this.$store.getters.userInfo.usid, " this.$store.getters.userInfo.USID")
|
||||
|
||||
if(this.isLevel){
|
||||
this.$refs.assignFormRef.validate(async v => {
|
||||
this.$refs.assignFormRef.validate( v => {
|
||||
this.processForm=this.$refs.basMes.form
|
||||
this.processForm.keyContent = JSON.stringify(this.$refs.basMes.tags)
|
||||
this.processForm.prcName=this.processForm.name
|
||||
@@ -329,26 +337,42 @@ export default {
|
||||
|
||||
let z=this.$refs.basMes.submit()
|
||||
if (v && z) {
|
||||
this.processForm.createUserId=this.userId
|
||||
//如果不是第一次
|
||||
if (this.initShow) {
|
||||
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})
|
||||
this.completeProcess({
|
||||
dataJson,
|
||||
submitJson,
|
||||
taskId: this.taskId,
|
||||
userId: this.$store.getters.userInfo.usid,
|
||||
prcType: this.prcType,
|
||||
reportId: this.processForm.reportId|| ''
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.startProcess()
|
||||
}
|
||||
console.log(this.processForm,"his.processFormhis.processFormhis.processForm")
|
||||
// 判断报告名称是否重复
|
||||
this.$api.reportProcess.JggleName({
|
||||
id:this.processForm.reportId || '',
|
||||
name:this.processForm.name
|
||||
}).then(async res=>{
|
||||
|
||||
this.processForm.createUserId=this.userId
|
||||
//如果不是第一次
|
||||
if (this.initShow) {
|
||||
// 判断当前提交人是不是审批人
|
||||
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})
|
||||
this.completeProcess({
|
||||
dataJson,
|
||||
submitJson,
|
||||
taskId: this.taskId,
|
||||
userId: this.$store.getters.userInfo.usid,
|
||||
prcType: this.prcType,
|
||||
reportId: this.processForm.reportId|| ''
|
||||
})
|
||||
}
|
||||
} else {
|
||||
// 如果草稿发起 判断在不在流程中
|
||||
if(this.$route.query.isDraft && this.prcType==5) {
|
||||
this.isSendDraft().then((res)=> {
|
||||
this.startProcess()
|
||||
})
|
||||
}else{
|
||||
this.startProcess()
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请检查表单填写完整')
|
||||
}
|
||||
@@ -364,13 +388,19 @@ export default {
|
||||
this.processForm=this.$refs.basMes.form
|
||||
this.processForm.id=this.processForm.reportId
|
||||
this.processForm.keyContent = JSON.stringify(this.$refs.basMes.tags)
|
||||
this.$api.report.reportAdd(this.processForm).then(_ => {
|
||||
this.$message.success('编辑成功');
|
||||
this.$router.push({
|
||||
path:"/userCenter/processCenter",
|
||||
query:{
|
||||
id:'AEHJB8YNJ3'
|
||||
}
|
||||
// 先判断名称是不是重复
|
||||
this.$api.reportProcess.JggleName({
|
||||
id:this.processForm.reportId || '',
|
||||
name:this.processForm.name
|
||||
}).then( res=>{
|
||||
this.$api.report.reportAdd(this.processForm).then(_ => {
|
||||
this.$message.success('操作成功');
|
||||
this.$router.push({
|
||||
path:"/report/manager",
|
||||
query:{
|
||||
id:'AEHJB8YNJ3'
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}else{
|
||||
@@ -378,6 +408,21 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
// 草稿发起 需要先调用这个接口
|
||||
isSendDraft() {
|
||||
let ids = this.processForm.reportId || ''
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$api.process.selectReport({usid: this.userId, ids: [ids]}).then((res) => {
|
||||
if (res.data.length == 0) {
|
||||
resolve(true)
|
||||
} else {
|
||||
this.$message.warning("报告" + res.data.join(',') + "已经在流程中")
|
||||
reject()
|
||||
}
|
||||
|
||||
})
|
||||
})
|
||||
},
|
||||
startProcess() {
|
||||
//把表单都整合到form中
|
||||
// dataJson与submitJson需要发到completeProcess
|
||||
|
||||
@@ -145,6 +145,9 @@ import tabs from '../userCenter/processCenter/tabs.vue'
|
||||
}else{
|
||||
this.flag=1
|
||||
}
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.examineForm.clearValidate()
|
||||
})
|
||||
|
||||
}else{
|
||||
this.$message.warning("请至少选择一条数据")
|
||||
|
||||
@@ -158,7 +158,9 @@ export default {
|
||||
}else{
|
||||
this.flag=1
|
||||
}
|
||||
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.examineForm.clearValidate()
|
||||
})
|
||||
},
|
||||
selectAllEvent({checked}) {
|
||||
const records = this.$refs.xTable.getCheckboxRecords()
|
||||
|
||||
Reference in New Issue
Block a user