|
|
|
@ -126,7 +126,7 @@
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
size="small"
|
|
|
|
|
@click.native.stop="handleDel(scope.row)"
|
|
|
|
|
@click.native.stop="handleDel(scope.$index, scope.row)"
|
|
|
|
|
>删除
|
|
|
|
|
</el-button
|
|
|
|
|
>
|
|
|
|
@ -309,10 +309,10 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
createLayerCode(lastLayer) {
|
|
|
|
|
let code
|
|
|
|
|
code = lastLayer.code.replace(this.formData.code, '')
|
|
|
|
|
code = lastLayer.code.slice(lastLayer.code.indexOf('-') + 1);
|
|
|
|
|
code = parseInt(code, 10) + 1
|
|
|
|
|
let incrementedValue = code.toString().padStart(2, '0')
|
|
|
|
|
code = this.formData.code + incrementedValue
|
|
|
|
|
code = this.formData.code + "-" + incrementedValue
|
|
|
|
|
return code
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
@ -353,7 +353,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handleDel(row){
|
|
|
|
|
handleDel(index,row){
|
|
|
|
|
if (this.saveStatus == true){
|
|
|
|
|
return this.$message.error("请保存数据")
|
|
|
|
|
}
|
|
|
|
@ -369,6 +369,8 @@ export default {
|
|
|
|
|
if (res.code == 20000){
|
|
|
|
|
this.getLayers()
|
|
|
|
|
this.$message.success("删除成功")
|
|
|
|
|
}else if (res.code == 501){
|
|
|
|
|
this.layerList.splice(index, 1);
|
|
|
|
|
}else {
|
|
|
|
|
this.$message.error("删除失败")
|
|
|
|
|
}
|
|
|
|
|