对接法规/认证任务计划、设定

This commit is contained in:
qq787203167
2022-04-21 18:35:25 +08:00
parent 4b90f6308b
commit 714efbcf08
4 changed files with 39 additions and 17 deletions
@@ -135,7 +135,7 @@
</template>
<script>
import { getAction, postAction } from '@/api/manage'
import { getAction, postAction, putAction } from '@/api/manage'
import moment from 'moment'
export default {
@@ -153,19 +153,35 @@
mounted() {
},
methods: {
edit(data) {
edit() {
this.visible = true
this.$nextTick(() => {
this.ids = data || []
this.formInline = {}
this.settingQueryForm()
},
settingQueryForm() {
getAction(this.url.settingQueryForm, { projectId: this.$route.query.id }).then((res) => {
if (res.success) {
this.$nextTick(() => {
this.formInline = res.result || {}
})
}
})
},
handleOk() {
let query = {
...this.formInline
...this.formInline,
projectId: this.$route.query.id
}
let url = ''
let Action
if (this.formInline.id) {
url = this.url.editSettingUrl
Action = putAction
} else {
url = this.url.addSettingUrl
Action = postAction
}
this.confirmLoading = true
postAction(this.url.editSettingUrl, query).then((res) => {
Action(url, query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false