[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
@@ -2,7 +2,10 @@ import { getAction, postAction } from './manage'
// 不符合项库-关闭 // 不符合项库-关闭
const nonmatchItemClose = (params) => postAction('', params) const nonmatchItemClose = (params) => postAction('', params)
// 不符合项库-批量关闭
const nonmatchItemBatchClose = (params) => postAction('/assessment/lawsEvaluationNotMet/batchClose', params)
export { export {
nonmatchItemClose nonmatchItemClose,
nonmatchItemBatchClose
} }
@@ -36,6 +36,7 @@ module.exports = {
rectificationCost: 'Rectification cost', rectificationCost: 'Rectification cost',
sharedWithOtherProjects: 'Shared with other projects', sharedWithOtherProjects: 'Shared with other projects',
costOfThisItemAfterSharing: 'Cost of this item after sharing', costOfThisItemAfterSharing: 'Cost of this item after sharing',
isHaveClosed: 'Select the data whose rectification status is to be rectified and close it' isHaveClosed: 'Select the data whose rectification status is to be rectified and close it',
exportName: 'non match item library table'
} }
} }
@@ -36,6 +36,7 @@ module.exports = {
rectificationCost: '整改费用', rectificationCost: '整改费用',
sharedWithOtherProjects: '与其他项目共用性', sharedWithOtherProjects: '与其他项目共用性',
costOfThisItemAfterSharing: '共用后本项目所需费用', costOfThisItemAfterSharing: '共用后本项目所需费用',
isHaveClosed: '请选择整改状态为待整改的数据进行关闭' isHaveClosed: '请选择整改状态为待整改的数据进行关闭',
exportName: '不符合项库表'
} }
} }
@@ -37,18 +37,16 @@
<a-form-item :label="$t('regulatoryComplianceAssessmentDatabase.nonmatchItem.responsibleDepartment')" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item :label="$t('regulatoryComplianceAssessmentDatabase.nonmatchItem.responsibleDepartment')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-tree-select <a-tree-select
tree-node-filter-prop="title" tree-node-filter-prop="title"
v-model="queryParam.responsibleDepartment" v-model="queryParam.authDept"
:maxTagCount="1" :maxTagCount="1"
allowClear allowClear
:getPopupContainer="triggerNode=> triggerNode.parentNode" :getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input" class="box-input"
style="width: 100%" style="width: 100%"
:tree-data="categoryTreeList" :tree-data="categoryTreeList"
:placeholder="$t('pleaseSelect') + $t('regulatoryComplianceAssessmentDatabase.nonmatchItem.responsibleDepartment')"
treeCheckable
treeCheckStrictly
show-search show-search
:filterTreeNode="filterTreeOption" :filterTreeNode="filterTreeOption"
:placeholder="$t('pleaseSelect') + $t('regulatoryComplianceAssessmentDatabase.nonmatchItem.responsibleDepartment')"
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -87,11 +85,12 @@
<div class="table-operator"> <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') }} {{ $t('export') }}
</a-button> </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> </div>
<!-- table区域-begin --> <!-- table区域-begin -->
@@ -285,7 +284,8 @@ export default {
} }
], ],
url: { url: {
list: '/assessment/lawsEvaluationNotMet/page' list: '/assessment/lawsEvaluationNotMet/page',
exportXlsUrl: '/assessment/lawsEvaluationNotMet/exportXls'
}, },
image: false, image: false,
imageUrl: '' imageUrl: ''
@@ -350,7 +350,7 @@ export default {
this.$message.warning(this.$t('regulatoryComplianceAssessmentDatabase.nonmatchItem.isHaveClosed')) this.$message.warning(this.$t('regulatoryComplianceAssessmentDatabase.nonmatchItem.isHaveClosed'))
return return
} }
this.$refs.nonmatchItemCloseModal.open(this.selectedRowKeys) this.$refs.nonmatchItemCloseModal.open({ ids: this.selectedRowKeys.join(',') })
}, },
previewFile (record) { previewFile (record) {
// 截取文件后缀名 // 截取文件后缀名
@@ -390,13 +390,16 @@ export default {
}, },
// 查看 // 查看
handleLook (record) { handleLook (record) {
console.log('----', record)
this.$refs.nonmatchItemLookModal.open(record) this.$refs.nonmatchItemLookModal.open(record)
}, },
// 关闭 // 关闭
handleClose (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> </script>
@@ -41,7 +41,7 @@
</template> </template>
<script> <script>
import { nonmatchItemClose } from '@/api/regulatoryComplianceAssessmentDatabase' import { nonmatchItemClose, nonmatchItemBatchClose } from '@/api/regulatoryComplianceAssessmentDatabase'
export default { export default {
name: 'NonmatchItemCloseModal', name: 'NonmatchItemCloseModal',
@@ -86,10 +86,11 @@ export default {
} }
}, },
methods: { methods: {
open (ids) { open (object) {
this.visible = true this.visible = true
this.form.resetFields() this.form.resetFields()
this.model.ids = ids this.model.ids = object.ids
this.model.id = object.id
}, },
handleCancel () { handleCancel () {
this.close() this.close()
@@ -100,8 +101,15 @@ export default {
if (!err) { if (!err) {
this.confirmLoading = true this.confirmLoading = true
const param = Object.assign({}, values) const param = Object.assign({}, values)
param.ids = this.model.ids let func
nonmatchItemClose(param).then(res => { 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) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
this.$emit('ok') this.$emit('ok')