[update 标准解读流程] 发起
This commit is contained in:
+1
-1
@@ -467,7 +467,7 @@ export default {
|
||||
})
|
||||
|
||||
// 所有删除的id
|
||||
params.processAllDelIds = compData.processAllDelIds
|
||||
params.processAllDelIds = compData.processAllDelIds.filter(id => id)
|
||||
// 保存草稿信息
|
||||
params.infoJsonStr = JSON.stringify({
|
||||
// 人员信息(要重新获取,流程里的信息不能直接用,后端需要多选人员处理成数组了)
|
||||
|
||||
+13
-2
@@ -529,7 +529,14 @@ export default {
|
||||
methods: {
|
||||
// 设置组件内数据
|
||||
setData (data = []) {
|
||||
this.dataSource = data
|
||||
this.dataSource = data.map(item => {
|
||||
// 没有id就添加uuid,和标记,最后返回的时候去掉
|
||||
if (!item.id) {
|
||||
item.id = randomUUID()
|
||||
item[uuidFlag] = true
|
||||
}
|
||||
return item
|
||||
})
|
||||
},
|
||||
// 获取组件内数据
|
||||
getData () {
|
||||
@@ -765,9 +772,9 @@ export default {
|
||||
if (that.ipagination.current > 1 && ((that.ipagination.current - 1) * that.ipagination.pageSize) + 1 === that.ipagination.total) {
|
||||
that.ipagination.current -= 1
|
||||
}
|
||||
this.ipagination.total = this.dataSource.length
|
||||
}
|
||||
})
|
||||
this.ipagination.total = this.dataSource.length
|
||||
},
|
||||
/**
|
||||
* 批量删除
|
||||
@@ -806,6 +813,10 @@ export default {
|
||||
if (currentIndex < this.ipagination.current) {
|
||||
this.ipagination.current = currentIndex
|
||||
}
|
||||
// 当前页数小于1
|
||||
if (this.ipagination.current < 1) {
|
||||
this.ipagination.current = 1
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 显示条款内容、条文解读弹框
|
||||
|
||||
+17
-13
@@ -45,7 +45,7 @@
|
||||
</div>
|
||||
<template v-if="showClauseTable">
|
||||
<!-- 条款的表格 -->
|
||||
<interpretation-clause-table ref="interpretationClauseTable" row-key="uuid" :disabled="disabled" :current-node-id="currentNodeId"/>
|
||||
<interpretation-clause-table ref="interpretationClauseTable" :disabled="disabled" :current-node-id="currentNodeId"/>
|
||||
</template>
|
||||
</a-spin>
|
||||
<!-- 添加标准弹框-只选择已拆分的数据 -->
|
||||
@@ -61,7 +61,6 @@
|
||||
<script>
|
||||
import StandardSelectionModal from '@comp/selection/StandardSelectionModal'
|
||||
import { interpretGetClauseList, interpretGetFileByStandardId } from '@api/workCenter'
|
||||
import { randomUUID } from '@/utils/util'
|
||||
import { DecompositionSource, StandardSource } from '@/enums/commonEnums'
|
||||
import InterpretationClauseTable
|
||||
from '@views/workCenter/standardInterpretationProcess/modules/InterpretationClauseTable'
|
||||
@@ -138,7 +137,9 @@ export default {
|
||||
dataSource: [],
|
||||
decompositionSourceList: [], // 标准分解单下拉
|
||||
// 是否显示条款的表格部分
|
||||
showClauseTable: false
|
||||
showClauseTable: false,
|
||||
// 删除的数据id
|
||||
delIds: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -186,8 +187,13 @@ export default {
|
||||
if (this.showClauseTable) {
|
||||
obj.clauseData = this.$refs.interpretationClauseTable.getData()
|
||||
}
|
||||
// 父组件的ids和子组件的合并返回
|
||||
const delIds = this.delIds
|
||||
if (this.$refs.interpretationClauseTable) {
|
||||
delIds.push(...this.$refs.interpretationClauseTable.processAllDelIds)
|
||||
}
|
||||
// 获取所有删除的id
|
||||
obj.processAllDelIds = this.$refs.interpretationClauseTable && this.$refs.interpretationClauseTable.processAllDelIds
|
||||
obj.processAllDelIds = delIds
|
||||
return obj
|
||||
},
|
||||
// 更新组件内的数据
|
||||
@@ -220,13 +226,16 @@ export default {
|
||||
return
|
||||
}
|
||||
// 如果有条款的表格,就清空然后隐藏
|
||||
this.$refs.interpretationClauseTable && this.$refs.interpretationClauseTable.setData([])
|
||||
if (this.$refs.interpretationClauseTable) {
|
||||
// 清空上次的数据,需要记录删除的id
|
||||
this.delIds.push(...this.$refs.interpretationClauseTable.getData().map(item => item.id))
|
||||
this.$refs.interpretationClauseTable.setData([])
|
||||
}
|
||||
this.showClauseTable = true
|
||||
// 如果是不带入,不需要请求,直接将标准数据带入
|
||||
if (this.dataSource[0].decompositionSource === DecompositionSource.NO_INPUT.value) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.interpretationClauseTable.setData([{
|
||||
uuid: randomUUID(),
|
||||
clauseId: this.dataSource[0].standardId,
|
||||
itemTitle: this.dataSource[0].standardName,
|
||||
itemNum: this.dataSource[0].standardNumber
|
||||
@@ -236,16 +245,11 @@ export default {
|
||||
}
|
||||
this.loading = true
|
||||
interpretGetClauseList({
|
||||
standardId: this.dataSource[0].id,
|
||||
standardId: this.dataSource[0].standardId,
|
||||
fileType: this.dataSource[0].decompositionSource
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
const clauseDataSource = (res.result || []).map(item => {
|
||||
item.uuid = randomUUID()
|
||||
return item
|
||||
})
|
||||
// 处理好数据把表格数据传给子组件
|
||||
this.$refs.interpretationClauseTable.setData(clauseDataSource)
|
||||
this.$refs.interpretationClauseTable.setData(res.result || [])
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
|
||||
Reference in New Issue
Block a user