[update] 新法规导入流程

This commit is contained in:
lideqin
2024-07-11 09:31:40 +08:00
parent cd05097be0
commit 86e345ddfe
3 changed files with 99 additions and 32 deletions
@@ -134,8 +134,8 @@ import {
newRegulationImportGetDataById, newRegulationImportGetDataById,
newRegulationImportReject, newRegulationImportReject,
newRegulationImportSave, newRegulationImportSave,
newRegulationImportTurnTo, getDataDraft,
getDataDraft processTransfer
} from '../../../api/workCenter' } from '../../../api/workCenter'
export default { export default {
@@ -449,7 +449,7 @@ export default {
const param = Object.assign({}, values) const param = Object.assign({}, values)
param.userId = userIds param.userId = userIds
param.taskId = this.$route.query.taskId param.taskId = this.$route.query.taskId
newRegulationImportTurnTo(param).then(res => { processTransfer(param).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
this.goBack() this.goBack()
@@ -72,7 +72,7 @@ import { JeroListMixin } from '@/mixins/JeroListMixin'
import UserSelectModal from '@/components/selection/UserSelectModal' import UserSelectModal from '@/components/selection/UserSelectModal'
import { import {
marketListReleaseTurnTo, marketListReleaseTurnTo,
newRegulationImportTurnTo newRegulationImportTurnTo, processTransfer
} from '../../../../api/workCenter' } from '../../../../api/workCenter'
import { import {
ProcessType, ProcessType,
@@ -271,25 +271,10 @@ export default {
// 转办选完人的回调 // 转办选完人的回调
userSelectChange (value) { userSelectChange (value) {
if (value) { if (value) {
let func
const param = {} const param = {}
switch (this.currentTurnTo.prcType + '') {
// 新法规导入流程
case '1':
func = newRegulationImportTurnTo
break
// 标准解读流程
case '2':
break
// 法规符合性排查流程
case '3':
// 市场清单发布流程
case '4':
func = marketListReleaseTurnTo
}
param.userId = value param.userId = value
param.taskId = this.currentTurnTo.taskId param.taskId = this.currentTurnTo.taskId
func(param).then(res => { processTransfer(param).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
this.loadData() this.loadData()
@@ -15,7 +15,7 @@
{{ $t('workCenter.regulatoryComplianceCheckProcess.manualAddition') }} {{ $t('workCenter.regulatoryComplianceCheckProcess.manualAddition') }}
</a-button> </a-button>
<!-- 删除 --> <!-- 删除 -->
<a-button icon="delete" type="danger" ghost @click="handleDelete" :disabled="disabled"> <a-button icon="delete" type="danger" ghost @click="handleStandardDelete" :disabled="disabled">
{{ $t('delete') }} {{ $t('delete') }}
</a-button> </a-button>
<!-- 分解单模板下载 --> <!-- 分解单模板下载 -->
@@ -161,7 +161,8 @@
:dataSource="dataSource" :dataSource="dataSource"
:pagination="ipagination" :pagination="ipagination"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
:loading="loading"> :loading="loading"
@change="handleTableChange">
<!-- 标准编号标准名称 --> <!-- 标准编号标准名称 -->
<template v-slot:toDetail="{text, record}"> <template v-slot:toDetail="{text, record}">
@@ -173,7 +174,7 @@
<!-- 操作栏 --> <!-- 操作栏 -->
<div slot="action" slot-scope="{record}" class="action-span-cell"> <div slot="action" slot-scope="{record}" class="action-span-cell">
<a @click="handleDelete(record.uid)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a> <a @click="handleDelete(record.id)" class="table-ope-btn" :disabled="disabled">{{ $t('delete') }}</a>
</div> </div>
</j-table> </j-table>
@@ -202,7 +203,6 @@ import { StandardSource, AddType } from '@/enums/commonEnums'
import { regulatoryComplianceCheckGenerate } from '@/api/workCenter' import { regulatoryComplianceCheckGenerate } from '@/api/workCenter'
import { getFormDictTreeList, queryDepartTreeList } from '../../../../api/api' import { getFormDictTreeList, queryDepartTreeList } from '../../../../api/api'
import { downloadFile } from '../../../../api/manage' import { downloadFile } from '../../../../api/manage'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import MarketRegulationsListSelection from '../../../../components/selection/MarketRegulationsListSelection' import MarketRegulationsListSelection from '../../../../components/selection/MarketRegulationsListSelection'
import pick from 'lodash.pick' import pick from 'lodash.pick'
@@ -215,7 +215,6 @@ export default {
StandardSelectionModal, StandardSelectionModal,
STreeSelect STreeSelect
}, },
mixins: [JeroListMixin],
props: { props: {
disabled: { disabled: {
type: Boolean, type: Boolean,
@@ -326,6 +325,18 @@ export default {
sm: { span: 18 } sm: { span: 18 }
}, },
categoryTreeList: [], // 组织机构下拉框数据 categoryTreeList: [], // 组织机构下拉框数据
/* 分页参数 */
ipagination: {
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '30', '50', '100', '150', '200'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' ' + this.$t('total') + ' ' + total + ' ' + this.$t('strip')
},
showQuickJumper: true,
showSizeChanger: true,
total: 0
},
columns: [ columns: [
{ {
title: this.$t('serialNumber'), title: this.$t('serialNumber'),
@@ -388,7 +399,7 @@ export default {
} }
], ],
dataSource: [], dataSource: [],
clauseDataList: [], // 防止查询数据丢失 dataList: [], // 防止查询数据丢失
selectedRowKeys: [], selectedRowKeys: [],
selectionRows: [], selectionRows: [],
url: { url: {
@@ -398,7 +409,6 @@ export default {
deleteBatch: '/process/standardComplianceCheck/deleteBatch', deleteBatch: '/process/standardComplianceCheck/deleteBatch',
delete: '' delete: ''
}, },
disableMixinCreated: true,
countryOptions: [], // 适用市场下拉框 countryOptions: [], // 适用市场下拉框
model: { model: {
standardInfo: { standardInfo: {
@@ -517,7 +527,7 @@ export default {
this.$forceUpdate() this.$forceUpdate()
}, },
// 删除 // 删除
handleDelete () { handleStandardDelete () {
this.$confirm({ this.$confirm({
title: this.$t('confirmDeletion'), title: this.$t('confirmDeletion'),
content: this.$t('areYouSure'), content: this.$t('areYouSure'),
@@ -563,16 +573,15 @@ export default {
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
console.log('-----valid', valid) console.log('-----valid', valid)
if (valid) { if (valid) {
// 获取下方那个表格信息
const param = Object.assign({}, this.standardDataSource[0], this.formInline) const param = Object.assign({}, this.standardDataSource[0], this.formInline)
regulatoryComplianceCheckGenerate(param).then(res => { regulatoryComplianceCheckGenerate(param).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success(res.message)
// 显示下方列表信息
this.isGenerateAfter = true this.isGenerateAfter = true
// 获取下方列表信息 // 获取下方列表信息
this.filters.checkId = res.result this.dataSource = JSON.parse(JSON.stringify(res.result))
this.model.standardInfo.id = res.result this.dataList = JSON.parse(JSON.stringify(res.result))
this.loadData(1)
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message)
} }
@@ -587,6 +596,79 @@ export default {
marketRegulationNumberChange (value) { marketRegulationNumberChange (value) {
this.formInline.applicableMarket_dictText = value this.formInline.applicableMarket_dictText = value
}, },
// 获取部门在部门下拉框的对象
getDepartObj (departId, departList) {
for (const item of departList) {
if (item.id === departId) {
return item
}
if (item.children) {
const obj = this.getDepartObj(departId, item.children)
if (obj.id) {
return obj
}
}
}
},
// 根据传入的部门获取他的所有子集
getDepartChildren (dept) {
},
// 查询
searchQuery () {
if (this.queryParam.authDept) {
// 获取选中的部门的所有子集
// 先获取选中的部门在部门里的对象
const obj = this.getDepartObj(this.queryParam.authDept, this.categoryTreeList)
// 获取选中部门的所有子集id
this.dataSource = this.dataList.filter(item => {
return item.authDept + '' === this.queryParam.authDept + ''
})
} else {
this.dataSource = JSON.parse(JSON.stringify(this.dataList))
}
this.selectedRowKeys = []
this.selectionRows = []
},
// 重置
searchReset () {
this.dataSource = JSON.parse(JSON.stringify(this.dataList))
this.selectedRowKeys = []
this.selectionRows = []
},
batchDel () {
if (this.selectedRowKeys.length <= 0) {
this.$message.warning(this.$t('selectARecord'))
} else {
this.$confirm({
title: this.$t('confirmBatchDeletion'),
content: this.$t('deleteAData'),
onOk: () => {
this.dataSource = this.dataSource.filter(item => !this.selectedRowKeys.includes(item.id))
this.dataList = this.dataList.filter(item => !this.selectedRowKeys.includes(item.id))
}
})
}
},
onSelectChange (selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys
this.selectionRows = selectionRows
},
handleTableChange (pagination, filters, sorter) {
// 分页、排序、筛选变化时触发
this.ipagination = pagination
},
handleDelete (id) {
this.$confirm({
title: this.$t('confirmDeletion'),
content: this.$t('areYouSure'),
onOk: () => {
this.dataSource = this.dataSource.filter(item => item.id !== id)
this.dataList = this.dataList.filter(item => item.id !== 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