[update] 不符合项库联调

This commit is contained in:
lideqin
2024-06-26 09:36:46 +08:00
parent 1e11d79e02
commit 9ef9e4837c
5 changed files with 35 additions and 19 deletions
@@ -37,18 +37,16 @@
<a-form-item :label="$t('regulatoryComplianceAssessmentDatabase.nonmatchItem.responsibleDepartment')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-tree-select
tree-node-filter-prop="title"
v-model="queryParam.responsibleDepartment"
v-model="queryParam.authDept"
:maxTagCount="1"
allowClear
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
style="width: 100%"
:tree-data="categoryTreeList"
:placeholder="$t('pleaseSelect') + $t('regulatoryComplianceAssessmentDatabase.nonmatchItem.responsibleDepartment')"
treeCheckable
treeCheckStrictly
show-search
:filterTreeNode="filterTreeOption"
:placeholder="$t('pleaseSelect') + $t('regulatoryComplianceAssessmentDatabase.nonmatchItem.responsibleDepartment')"
/>
</a-form-item>
</a-col>
@@ -87,11 +85,12 @@
<div class="table-operator">
<!-- 导出 -->
<a-button icon="upload" type="primary" ghost @click="handleExportXls($t('regulatoryComplianceAssessmentDatabase.assessmentLibrary.exportName'))">
<a-button icon="upload" type="primary" ghost v-has="'lawsEvaluationNotMet:export'"
@click="handleExportXls($t('regulatoryComplianceAssessmentDatabase.nonmatchItem.exportName'))">
{{ $t('export') }}
</a-button>
<!-- 批量关闭 -->
<a-button icon="close" type="primary" ghost @click="batchClose">{{ $t('batchClose') }}</a-button>
<a-button icon="close" type="primary" ghost @click="batchClose" v-has="'lawsEvaluationNotMet:batchClose'">{{ $t('batchClose') }}</a-button>
</div>
<!-- table区域-begin -->
@@ -285,7 +284,8 @@ export default {
}
],
url: {
list: '/assessment/lawsEvaluationNotMet/page'
list: '/assessment/lawsEvaluationNotMet/page',
exportXlsUrl: '/assessment/lawsEvaluationNotMet/exportXls'
},
image: false,
imageUrl: ''
@@ -350,7 +350,7 @@ export default {
this.$message.warning(this.$t('regulatoryComplianceAssessmentDatabase.nonmatchItem.isHaveClosed'))
return
}
this.$refs.nonmatchItemCloseModal.open(this.selectedRowKeys)
this.$refs.nonmatchItemCloseModal.open({ ids: this.selectedRowKeys.join(',') })
},
previewFile (record) {
// 截取文件后缀名
@@ -390,13 +390,16 @@ export default {
},
// 查看
handleLook (record) {
console.log('----', record)
this.$refs.nonmatchItemLookModal.open(record)
},
// 关闭
handleClose (record) {
this.$refs.nonmatchItemCloseModal.open(record.id)
}
this.$refs.nonmatchItemCloseModal.open({ id: record.id })
},
filterTreeOption (input, option) {
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
}
</script>
@@ -41,7 +41,7 @@
</template>
<script>
import { nonmatchItemClose } from '@/api/regulatoryComplianceAssessmentDatabase'
import { nonmatchItemClose, nonmatchItemBatchClose } from '@/api/regulatoryComplianceAssessmentDatabase'
export default {
name: 'NonmatchItemCloseModal',
@@ -86,10 +86,11 @@ export default {
}
},
methods: {
open (ids) {
open (object) {
this.visible = true
this.form.resetFields()
this.model.ids = ids
this.model.ids = object.ids
this.model.id = object.id
},
handleCancel () {
this.close()
@@ -100,8 +101,15 @@ export default {
if (!err) {
this.confirmLoading = true
const param = Object.assign({}, values)
param.ids = this.model.ids
nonmatchItemClose(param).then(res => {
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 => {
if (res.success) {
this.$message.success(res.message)
this.$emit('ok')