|
|
|
@ -128,6 +128,7 @@ import { |
|
|
|
insertToolInfo, |
|
|
|
modifyToolInfo, |
|
|
|
getNextToolId, |
|
|
|
getBaseConfigData, |
|
|
|
} from '@/api/tool/com_tool_info_add_update.js'; |
|
|
|
|
|
|
|
/*组件*/ |
|
|
|
@ -152,7 +153,7 @@ export default { |
|
|
|
toolDesc: '', |
|
|
|
toolType: '', |
|
|
|
toolTypeDesc: '', |
|
|
|
calendarId: '', |
|
|
|
calendarId: 'CN_2', |
|
|
|
schedCapacity: 'Infinite capacity', |
|
|
|
alternateToolId: '', |
|
|
|
alternateToolDesc: '', |
|
|
|
@ -330,7 +331,7 @@ export default { |
|
|
|
this.pageData.toolType = ''; |
|
|
|
this.pageData.toolDesc = ''; |
|
|
|
this.pageData.toolTypeDesc = ''; |
|
|
|
this.pageData.calendarId = ''; |
|
|
|
this.pageData.calendarId = 'CN_2'; |
|
|
|
this.pageData.schedCapacity = 'Infinite capacity'; |
|
|
|
this.pageData.alternateToolId = ''; |
|
|
|
this.pageData.alternateToolDesc = ''; |
|
|
|
@ -340,9 +341,12 @@ export default { |
|
|
|
this.pageData.propertyNo = ''; |
|
|
|
this.pageData.lastUsed = ''; |
|
|
|
this.pageData.noteText = ''; |
|
|
|
//新增结束调用获取默认的方法 |
|
|
|
this.changeToolPrefix(); |
|
|
|
}else{ |
|
|
|
this.titleCon = '工具修改'; |
|
|
|
this.pageData = JSON.parse(JSON.stringify(toolInfo)); |
|
|
|
this.pageData.username = this.$store.state.user.name; |
|
|
|
} |
|
|
|
this.addFlag = addFlag; |
|
|
|
}, |
|
|
|
@ -375,6 +379,7 @@ export default { |
|
|
|
getBaseData (val) { |
|
|
|
if (this.tagNo === 1017) { |
|
|
|
this.pageData.site = val.SiteID; |
|
|
|
this.changeToolPrefix(); |
|
|
|
}else if (this.tagNo === 1016) { |
|
|
|
this.pageData.toolType = val.tool_type; |
|
|
|
this.pageData.toolTypeDesc = val.tool_type_desc; |
|
|
|
@ -463,12 +468,26 @@ export default { |
|
|
|
getNextToolId(this.pageData).then(({data}) =>{ |
|
|
|
if(data.code === 200){ |
|
|
|
//如果获取成功 |
|
|
|
debugger |
|
|
|
this.pageData.toolId = data.resultRow.toolId; |
|
|
|
}else{ |
|
|
|
this.$message.error(data.msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
/*修改工具的前缀*/ |
|
|
|
changeToolPrefix(){ |
|
|
|
let requestData = {'site': this.pageData.site, 'firstType': 'tool', 'secondType': 'default_tool_prefix'} |
|
|
|
getBaseConfigData(requestData).then(({data}) =>{ |
|
|
|
if(data.code === '200'){ |
|
|
|
//如果获取成功 |
|
|
|
this.pageData.toolId = data.resultRow.baseData; |
|
|
|
}else{ |
|
|
|
this.pageData.toolId = ''; |
|
|
|
this.$message.error(data.msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|