[add] 接口对接
This commit is contained in:
@@ -97,7 +97,7 @@ export default {
|
||||
},
|
||||
{
|
||||
title: this.$t('areaOfResponsibility'),
|
||||
dataIndex: 'dutyTerritory',
|
||||
dataIndex: 'dutyTerritory_dictText',
|
||||
align: 'center',
|
||||
ellipsis: true
|
||||
}
|
||||
@@ -181,63 +181,30 @@ export default {
|
||||
handleSubmit() {
|
||||
if (this.selectedRowKeys.length == 0) {
|
||||
this.$message.warning(this.$t('pleaseSelectData'))
|
||||
} else if (this.selectedRowKeys.length > 1) {
|
||||
this.$message.warning(this.$t('OnlyOneSelected'))
|
||||
} else {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.flag = true
|
||||
this.spinLoading = true
|
||||
// 新增編輯之前 判断 标题唯一
|
||||
getAction(`params/manifest/verifyTitle?projectId=${this.$route.query.id}
|
||||
&title=${this.templatetitle}`, {})
|
||||
.then(res => {
|
||||
if (res.success) {
|
||||
let postDate = {
|
||||
title: this.templatetitle,
|
||||
paramsTemplateId: this.rowId || this.selectedRowKeysDate[0].id,
|
||||
paramsTemplatePublishVersion: this.version || this.selectedRowKeysDate[0].version,
|
||||
projectId: this.projectId
|
||||
}
|
||||
if (this.rowId) {
|
||||
//编辑
|
||||
postAction(`params/manifest/edit`, postDate).then(res => {
|
||||
if (res.success) {
|
||||
this.newVisible = false
|
||||
this.$emit('areaVisible', false)
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}
|
||||
).finally(() => {
|
||||
this.flag = false
|
||||
this.spinLoading = false
|
||||
this.newVisible = false
|
||||
})
|
||||
//新增
|
||||
let postDate = {
|
||||
paramsInfoPublishEOList: this.selectedRowKeysDate,
|
||||
paramsManifestId: this.paramsManifest.id,
|
||||
projectId: this.$route.query.id
|
||||
}
|
||||
postAction(`params/collectManifest/add`, postDate).then(res => {
|
||||
if (res.success) {
|
||||
this.newVisible = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
} else {
|
||||
//新增
|
||||
postAction(`params/manifest/add`, postDate).then(res => {
|
||||
if (res.success) {
|
||||
this.newVisible = false
|
||||
this.$emit('areaVisible', false)
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}
|
||||
).finally(() => {
|
||||
this.flag = false
|
||||
this.spinLoading = false
|
||||
this.newVisible = false
|
||||
})
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
).finally(() => {
|
||||
this.flag = false
|
||||
this.spinLoading = false
|
||||
this.newVisible = false
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div class="doc-detail">
|
||||
<!-- 认证参数收集——清单信息-->
|
||||
<div class="Virtual-detail-header" style="position: fixed;top: 0">
|
||||
<div class="Virtual-detail-title">
|
||||
<span style="line-height: 74px;display: inline-block;float: left">
|
||||
@@ -98,6 +99,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.textColor()
|
||||
// 清单信息
|
||||
this.paramsManifest = JSON.parse(localStorage.getItem('paramsManifest'))
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<div class="table-page-search-wrapper">
|
||||
<!-- 认证参数收集-参数项收集清单-10控件-->
|
||||
<a-row :gutter="24">
|
||||
<a-col :md="6" :sm="8">
|
||||
<div class="box-title-text">
|
||||
@@ -119,10 +120,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%">
|
||||
<!-- 表格-->
|
||||
<!-- 表格-10控件-->
|
||||
<table-collection ref="CollectionTabel" :url='url' :paramsManifest='paramsManifest' @rowValue='rowValue' @value='value'/>
|
||||
</div>
|
||||
<!-- 添加 -->
|
||||
<!-- 添加--->
|
||||
<a-modal v-model="areaVisible" :title="$t('ParameterLibrary')" width='750px' :footer="null">
|
||||
<parameter-library v-if='areaVisible' :paramsManifest='paramsManifest'/>
|
||||
</a-modal>
|
||||
@@ -228,9 +229,6 @@ export default {
|
||||
},
|
||||
mounted() {},
|
||||
methods:{
|
||||
addselectedRowKeys() {
|
||||
console.log('llll')
|
||||
},
|
||||
// 表格所选中得行内容
|
||||
rowValue(val) {
|
||||
this.selectedRowKeysValue = val
|
||||
@@ -275,7 +273,7 @@ export default {
|
||||
|
||||
},
|
||||
handleCody() {
|
||||
|
||||
console.log(this.paramsManifest,'paramsManifestparamsManifestparamsManifestparamsManifest')
|
||||
},
|
||||
searchQuery() {
|
||||
this.pageNo = 1
|
||||
@@ -334,7 +332,10 @@ export default {
|
||||
SizeChange() {
|
||||
|
||||
},
|
||||
}
|
||||
},
|
||||
// watch: {
|
||||
//
|
||||
// }
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user