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)
|
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';
|
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>>>{
|
public selectById(id:any,showLoading?:boolean):Promise<AxiosResponse<ActionResult<any>>>{
|
||||||
const url = this.prefix.prevention+'/danger/task/'+id;
|
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.tableService.addOrUpdate(this.updateParams,!this.updateParams.id).then(res=>{
|
||||||
this.$message.success(!this.updateParams.id?"新增成功":"编辑成功");
|
this.$message.success(!this.updateParams.id?"新增成功":"编辑成功");
|
||||||
if(!preStatus){
|
if(!preStatus && isSubmit){
|
||||||
this.startWorkFlow([res.data],[this.updateParams.reformUserId])
|
this.startWorkFlow([res.data],[this.updateParams.reformUserId])
|
||||||
}else{
|
}else{
|
||||||
this.workFlowService.taskHandle(handleParams).then((data)=>{
|
this.workFlowService.taskHandle(handleParams).then((data)=>{
|
||||||
|
|
|
@ -386,8 +386,10 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
}else if(data.value === "selectAll"){
|
}else if(data.value === "selectAll"){
|
||||||
this.selectAll()
|
this.selectAll()
|
||||||
}else if(data.value === "delete"){
|
}else if(data.value === "delete"){
|
||||||
this.deleteData(this.selectData.map((item:any)=>item.id))
|
this.deleteData(this.selectData.map((item:any)=>item.id));
|
||||||
this.getTroubleList();
|
setTimeout(()=>{
|
||||||
|
this.getTroubleList()
|
||||||
|
})
|
||||||
}else if(data.value ==="fixed"){
|
}else if(data.value ==="fixed"){
|
||||||
this.showMap = true
|
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(){
|
public doSave(){
|
||||||
this.updateParams.resourceId = this.photoList.map(item=>item.id).join(",")
|
this.updateParams.resourceId = this.photoList.map(item=>item.id).join(",")
|
||||||
this.updateParams.resourceName = this.photoList.map(item=>item.name).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;
|
delete this.updateParams.photo;
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.assign(this.updateParams,{
|
this.updateParams = Object.assign({
|
||||||
classifyName:this.$store.getters.prevention_dangrous_type_map[row.classify],
|
classifyName:this.$store.getters.prevention_dangrous_type_map[row.classify],
|
||||||
dangerTypeName:this.$store.getters.prevention_danger_type_map[row.dangerType],
|
dangerTypeName:this.$store.getters.prevention_danger_type_map[row.dangerType],
|
||||||
inspectTypeName:this.$store.getters.prevention_danger_check_type_map[row.inspectType],
|
inspectTypeName:this.$store.getters.prevention_danger_check_type_map[row.inspectType],
|
||||||
|
@ -615,7 +634,6 @@ export default class RulesManagerComponent extends BaseRecordComponent<any> {
|
||||||
public getTroubleList(){
|
public getTroubleList(){
|
||||||
this.tableService.getTroubleList(this.recordParams).then((res:any)=>{
|
this.tableService.getTroubleList(this.recordParams).then((res:any)=>{
|
||||||
this.troubleTableData =res.data.map(data=>{
|
this.troubleTableData =res.data.map(data=>{
|
||||||
|
|
||||||
data.urls = data.resources.map(source=>source.resourceUrl) || [];
|
data.urls = data.resources.map(source=>source.resourceUrl) || [];
|
||||||
return data
|
return data
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue