forked from xxhjsb/hbt-prevention-ui
fix:修复草稿会发起流程的问题
parent
b154d1bf45
commit
5dc82ff6ee
|
@ -11,9 +11,9 @@ export default class TaskService extends BaseService<any>{
|
|||
return this.get(url,params,true)
|
||||
}
|
||||
// 批量删除
|
||||
public deleteByIds(params):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
public deleteByIds(params,showLoading?):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.prevention+'/danger/trouble';
|
||||
return this.deleteBatch(url,params,{},true)
|
||||
return this.deleteBatch(url,params,{},showLoading)
|
||||
}
|
||||
public selectById(id:any,showLoading?:boolean):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.prevention+'/danger/task/'+id;
|
||||
|
|
|
@ -983,7 +983,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent<an
|
|||
|
||||
this.tableService.addOrUpdate(this.updateParams,!this.updateParams.id).then(res=>{
|
||||
this.$message.success(!this.updateParams.id?"新增成功":"编辑成功");
|
||||
if(!preStatus){
|
||||
if(!preStatus && isSubmit){
|
||||
this.startWorkFlow([res.data],[this.updateParams.reformUserId])
|
||||
}else{
|
||||
this.workFlowService.taskHandle(handleParams).then((data)=>{
|
||||
|
|
|
@ -386,8 +386,10 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
|||
}else if(data.value === "selectAll"){
|
||||
this.selectAll()
|
||||
}else if(data.value === "delete"){
|
||||
this.deleteData(this.selectData.map((item:any)=>item.id))
|
||||
this.getTroubleList();
|
||||
this.deleteData(this.selectData.map((item:any)=>item.id));
|
||||
setTimeout(()=>{
|
||||
this.getTroubleList()
|
||||
})
|
||||
}else if(data.value ==="fixed"){
|
||||
this.showMap = true
|
||||
|
||||
|
@ -398,6 +400,23 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
|||
}
|
||||
}
|
||||
|
||||
public deleteData(ids){
|
||||
if(!ids.length){
|
||||
return
|
||||
}else{
|
||||
this.$confirm("确认删除所选数据?","确认数据",{
|
||||
type: 'warning'
|
||||
}).then(()=>{
|
||||
this.tableService.deleteByIds(ids,true).then((res:any)=>{
|
||||
this.$message.success("删除成功!");
|
||||
this.getTroubleList();
|
||||
})
|
||||
}).catch(()=>{
|
||||
//
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
public doSave(){
|
||||
this.updateParams.resourceId = this.photoList.map(item=>item.id).join(",")
|
||||
this.updateParams.resourceName = this.photoList.map(item=>item.name).join(",")
|
||||
|
@ -532,7 +551,7 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
|||
delete this.updateParams.photo;
|
||||
}
|
||||
|
||||
Object.assign(this.updateParams,{
|
||||
this.updateParams = Object.assign({
|
||||
classifyName:this.$store.getters.prevention_dangrous_type_map[row.classify],
|
||||
dangerTypeName:this.$store.getters.prevention_danger_type_map[row.dangerType],
|
||||
inspectTypeName:this.$store.getters.prevention_danger_check_type_map[row.inspectType],
|
||||
|
@ -615,7 +634,6 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
|||
public getTroubleList(){
|
||||
this.tableService.getTroubleList(this.recordParams).then((res:any)=>{
|
||||
this.troubleTableData =res.data.map(data=>{
|
||||
|
||||
data.urls = data.resources.map(source=>source.resourceUrl) || [];
|
||||
return data
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue