|
@@ -118,6 +118,7 @@ export default {
|
|
|
visible: false,
|
|
|
display: false,
|
|
|
isEdit: false, // 是否是编辑页面
|
|
|
+ isCopy: false,
|
|
|
fileList: [],
|
|
|
dataList: [],
|
|
|
id: 0,
|
|
@@ -183,7 +184,7 @@ export default {
|
|
|
lineList: []
|
|
|
}
|
|
|
},
|
|
|
- async init (id, display, isEdit) {
|
|
|
+ async init (id, display, isEdit, isCopy) {
|
|
|
this.fileList = []
|
|
|
this.dataForm = {
|
|
|
techName: '',
|
|
@@ -193,7 +194,8 @@ export default {
|
|
|
}
|
|
|
this.visible = true
|
|
|
this.display = display
|
|
|
- this.isEdit = isEdit
|
|
|
+ this.isEdit = isEdit && !isCopy
|
|
|
+ this.isCopy = isCopy
|
|
|
|
|
|
await getProduct({ current: 1, size: 20000 }).then(({ data }) => {
|
|
|
if (data && data.code === '200') {
|
|
@@ -266,10 +268,25 @@ export default {
|
|
|
}
|
|
|
|
|
|
let url = `/biz-service/technology/submit`
|
|
|
- if (this.isEdit) {
|
|
|
+ if (this.isEdit && !this.isCopy) {
|
|
|
url = `/biz-service/technology/update`
|
|
|
}
|
|
|
|
|
|
+ if (this.isCopy) {
|
|
|
+ this.dataForm.id = 0
|
|
|
+ this.dataForm.techId = null
|
|
|
+ if (flowData.lineList != null && flowData.lineList.length > 0) {
|
|
|
+ for (let index = 0; index < flowData.lineList.length; index++) {
|
|
|
+ flowData.lineList[index].techId = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (flowData.nodeList != null && flowData.nodeList.length > 0) {
|
|
|
+ for (let index = 0; index < flowData.nodeList.length; index++) {
|
|
|
+ flowData.nodeList[index].techId = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
this.$http({
|
|
|
url: this.$http.adornUrl(url),
|
|
|
method: 'post',
|