[add] 接口对接
This commit is contained in:
@@ -124,10 +124,16 @@ export default {
|
|||||||
spinLoading: false,
|
spinLoading: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
templatetitle: '',
|
templatetitle: '',
|
||||||
selectedRowKeys: []
|
selectedRowKeys: [],
|
||||||
|
ParameterCollectionRow: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
authenticationParameterCollection: {
|
||||||
|
type: Object,
|
||||||
|
default: {},
|
||||||
|
require: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loadData()
|
this.loadData()
|
||||||
@@ -135,8 +141,14 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
loadData() {
|
loadData() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
let _tt = {
|
||||||
|
paramsManifestId: this.ParameterCollectionRow.id,
|
||||||
|
paramsTemplateId: this.ParameterCollectionRow.paramsTemplateId,
|
||||||
|
paramsTemplatePublishVersion: this.ParameterCollectionRow.paramsTemplatePublishVersion
|
||||||
|
}
|
||||||
let params = {
|
let params = {
|
||||||
...this.form
|
...this.form,
|
||||||
|
..._tt
|
||||||
}
|
}
|
||||||
getAction(`params/collectManifest/paramsInfoList`, params).then(res => {
|
getAction(`params/collectManifest/paramsInfoList`, params).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@@ -283,8 +295,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
templateTitle(val) {
|
authenticationParameterCollection(val) {
|
||||||
this.templatetitle = val
|
this.ParameterCollectionRow = val
|
||||||
},
|
},
|
||||||
selectedRowKeyS(val) {
|
selectedRowKeyS(val) {
|
||||||
this.selectedRowKeys = val
|
this.selectedRowKeys = val
|
||||||
|
|||||||
@@ -124,7 +124,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 添加 -->
|
<!-- 添加 -->
|
||||||
<a-modal v-model="areaVisible" :title="$t('ParameterLibrary')" width='750px' :footer="null">
|
<a-modal v-model="areaVisible" :title="$t('ParameterLibrary')" width='750px' :footer="null">
|
||||||
<parameter-library v-if='areaVisible' @addselectedRowKeys='addselectedRowKeys'/>
|
<parameter-library v-if='areaVisible' @addselectedRowKeys='addselectedRowKeys' :authenticationParameterCollection='authenticationParameterCollection'/>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
@@ -212,7 +212,8 @@ export default {
|
|||||||
rowId: '',
|
rowId: '',
|
||||||
version: 0,
|
version: 0,
|
||||||
itemId: '',
|
itemId: '',
|
||||||
selectedRowKeysValue: []
|
selectedRowKeysValue: [],
|
||||||
|
authenticationParameterCollection: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@@ -223,6 +224,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.authenticationParameterCollection = JSON.parse(localStorage.getItem('paramsManifest'))
|
||||||
|
// console.log(JSON.parse(localStorage.getItem('paramsManifest')))
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
addselectedRowKeys() {
|
addselectedRowKeys() {
|
||||||
@@ -254,10 +257,11 @@ export default {
|
|||||||
postDateobj.id = item.id
|
postDateobj.id = item.id
|
||||||
postDate.push(postDateobj)
|
postDate.push(postDateobj)
|
||||||
})
|
})
|
||||||
|
let configDataList = { configDataList: postDate }
|
||||||
if(this.selectedRowKeys.length == 0) {
|
if(this.selectedRowKeys.length == 0) {
|
||||||
this.$message.warning(this.$t('selectLeastOne'))
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
}else {
|
}else {
|
||||||
postAction(this.url.add, postDate).then((res) => {
|
postAction(this.url.add, configDataList).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.$message.success(this.$t('OperationSuccessful'))
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
// _this.getlist()
|
// _this.getlist()
|
||||||
|
|||||||
Reference in New Issue
Block a user