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