[update] 不符合项库
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
import { getAction, postAction } from './manage'
|
||||
|
||||
// 不符合项库-关闭
|
||||
const nonmatchItemClose = (params) => postAction('', params)
|
||||
// 不符合项库-批量关闭
|
||||
// 不符合项库-批量关闭-关闭
|
||||
const nonmatchItemBatchClose = (params) => postAction('/assessment/lawsEvaluationNotMet/batchClose', params)
|
||||
|
||||
export {
|
||||
nonmatchItemClose,
|
||||
nonmatchItemBatchClose
|
||||
}
|
||||
|
||||
@@ -274,13 +274,16 @@ export default {
|
||||
{
|
||||
text: this.$t('view'),
|
||||
clickEvent: 'handleLook',
|
||||
has: ''
|
||||
has: 'lawsEvaluationNotMet:look'
|
||||
},
|
||||
// 关闭
|
||||
{
|
||||
text: this.$t('close'),
|
||||
clickEvent: 'handleClose',
|
||||
has: ''
|
||||
has: 'lawsEvaluationNotMet:batchClose',
|
||||
show: (record) => {
|
||||
return record.rectifyStatus === RectificationState.TO_BE_RECTIFIED.value
|
||||
}
|
||||
}
|
||||
],
|
||||
url: {
|
||||
@@ -344,13 +347,13 @@ export default {
|
||||
// 批量关闭
|
||||
batchClose () {
|
||||
// 只有待整改状态的可以关闭
|
||||
const isHaveClosed = this.selectionRows.includes(i => i.rectifyStatus === RectificationState.TARGET_IS_CLOSED.value)
|
||||
const isHaveClosed = this.selectionRows.find(i => i.rectifyStatus !== RectificationState.TO_BE_RECTIFIED.value)
|
||||
if (isHaveClosed) {
|
||||
// 存在已关闭的数据
|
||||
this.$message.warning(this.$t('regulatoryComplianceAssessmentDatabase.nonmatchItem.isHaveClosed'))
|
||||
return
|
||||
}
|
||||
this.$refs.nonmatchItemCloseModal.open({ ids: this.selectedRowKeys.join(',') })
|
||||
this.$refs.nonmatchItemCloseModal.open(this.selectedRowKeys.join(','))
|
||||
},
|
||||
previewFile (record) {
|
||||
// 截取文件后缀名
|
||||
@@ -394,12 +397,12 @@ export default {
|
||||
},
|
||||
// 关闭
|
||||
handleClose (record) {
|
||||
this.$refs.nonmatchItemCloseModal.open({ id: record.id })
|
||||
this.$refs.nonmatchItemCloseModal.open(record.id)
|
||||
},
|
||||
filterTreeOption (input, option) {
|
||||
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
|
||||
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
+4
-12
@@ -86,11 +86,10 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open (object) {
|
||||
open (ids) {
|
||||
this.visible = true
|
||||
this.form.resetFields()
|
||||
this.model.ids = object.ids
|
||||
this.model.id = object.id
|
||||
this.model.ids = ids
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
@@ -101,15 +100,8 @@ export default {
|
||||
if (!err) {
|
||||
this.confirmLoading = true
|
||||
const param = Object.assign({}, values)
|
||||
let func
|
||||
if (this.model.ids) {
|
||||
func = nonmatchItemBatchClose
|
||||
param.ids = this.model.ids
|
||||
} else if (this.model.id) {
|
||||
func = nonmatchItemClose
|
||||
param.id = this.model.id
|
||||
}
|
||||
func(param).then(res => {
|
||||
param.ids = this.model.ids
|
||||
nonmatchItemBatchClose(param).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.$emit('ok')
|
||||
|
||||
Reference in New Issue
Block a user