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