diff --git a/jero-web/src/components/ParameterLibrary/index.vue b/jero-web/src/components/ParameterLibrary/index.vue index 8de962466..7301d2ed0 100644 --- a/jero-web/src/components/ParameterLibrary/index.vue +++ b/jero-web/src/components/ParameterLibrary/index.vue @@ -125,11 +125,10 @@ export default { confirmLoading: false, templatetitle: '', selectedRowKeys: [], - ParameterCollectionRow: {} } }, props: { - authenticationParameterCollection: { + paramsManifest: { type: Object, default: {}, require: true @@ -142,9 +141,9 @@ export default { loadData() { this.loading = true let _tt = { - paramsManifestId: this.ParameterCollectionRow.id, - paramsTemplateId: this.ParameterCollectionRow.paramsTemplateId, - paramsTemplatePublishVersion: this.ParameterCollectionRow.paramsTemplatePublishVersion + paramsManifestId: this.paramsManifest.id, + paramsTemplateId: this.paramsManifest.paramsTemplateId, + paramsTemplatePublishVersion: this.paramsManifest.paramsTemplatePublishVersion } let params = { ...this.form, @@ -295,12 +294,9 @@ export default { } }, watch: { - authenticationParameterCollection(val) { - this.ParameterCollectionRow = val + paramsManifest(val) { + this.loadData() }, - selectedRowKeyS(val) { - this.selectedRowKeys = val - } } } diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index 8f88318b7..fa0dd5be9 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -124,7 +124,7 @@ - + @@ -133,6 +133,9 @@ import TableCollection from '@/components/tableCollection/index' import { getAction,postAction } from '../../../api/manage' import ParameterLibrary from '@/components/ParameterLibrary/index' +import axios from 'axios' +import { ACCESS_TOKEN } from '@/store/mutation-types' +import Vue from 'vue' export default { name: 'ParameterItemCollectionList', components:{ @@ -213,7 +216,7 @@ export default { version: 0, itemId: '', selectedRowKeysValue: [], - authenticationParameterCollection: {}, + token:Vue.ls.get(ACCESS_TOKEN), } }, props: { @@ -223,10 +226,7 @@ export default { require: true } }, - mounted() { - this.authenticationParameterCollection = JSON.parse(localStorage.getItem('paramsManifest')) - // console.log(JSON.parse(localStorage.getItem('paramsManifest'))) - }, + mounted() {}, methods:{ addselectedRowKeys() { console.log('llll') @@ -293,14 +293,35 @@ export default { this.$confirm({ content: _this.$t('ConfirmBatchDeletion'), onOk() { - postAction(_this.url.deleteAll, param).then((res) => { - if (res.success) { - _this.$message.success(_this.$t('OperationSuccessful')) - // _this.getlist() - } else { - _this.$message.warning(_this.$t('operationFailed')) + axios({ + url: '/jero-boot/params/paramsInfo/deleteBatch', + method: 'post', + data: param, + transformRequest: [function (data) { + let ret = '' + for (let it in data) { + ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&' + } + return ret + }], + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + 'X-Access-Token':_this.token } }) + .then( (res) =>{ + if (res.data.success) { + _this.$message.success(_this.$t('OperationSuccessful')) + _this.selectedRowKeys = [] + _this.$refs.CollectionTabel.getData() + _this.$refs.CollectionTabel.getTableList() + }else{ + _this.$message.warning(_this.$t('operationFailed')) + } + }) + .catch( (error) =>{ + console.log(error); + }); } }) } else {