[add] 接口对接
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
</div>
|
||||
<!-- 添加 -->
|
||||
<a-modal v-model="areaVisible" :title="$t('ParameterLibrary')" width='750px' :footer="null">
|
||||
<parameter-library v-if='areaVisible' @addselectedRowKeys='addselectedRowKeys' :authenticationParameterCollection='authenticationParameterCollection'/>
|
||||
<parameter-library v-if='areaVisible' :paramsManifest='paramsManifest'/>
|
||||
</a-modal>
|
||||
</a-card>
|
||||
</template>
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user