[update] 绑定零部件
This commit is contained in:
@@ -140,6 +140,8 @@ const getEnterpriseLevelMapList = (params) => getAction('/sys/lawsGrade/list', p
|
||||
|
||||
// 绑定零部件-获取拆分标准
|
||||
const getSplitStandardList = (params) => getAction('/laws/bindPart/selectStandard', params)
|
||||
// 绑定零部件-获取条款目录树
|
||||
const getClauseTree = (params) => getAction('/laws/bindPart/selectClause', params)
|
||||
// 根据标准拆分id获取条款列表
|
||||
const getClauseListByStandardInfoId = (params) => postAction('/laws/bindPart/selectClause', params)
|
||||
|
||||
@@ -231,6 +233,7 @@ export {
|
||||
getEnterpriseLevelMapList,
|
||||
|
||||
getSplitStandardList,
|
||||
getClauseTree,
|
||||
getClauseListByStandardInfoId,
|
||||
|
||||
getSSOUserInfo,
|
||||
|
||||
@@ -119,21 +119,21 @@ export default {
|
||||
columns: [
|
||||
{ // 条款号
|
||||
title: this.$t('clauseSelect.clauseNumber'),
|
||||
dataIndex: 'clauseNumber',
|
||||
dataIndex: 'item_num',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 条款名称
|
||||
title: this.$t('clauseSelect.clauseName'),
|
||||
dataIndex: 'clauseName',
|
||||
dataIndex: 'item_title',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 条款内容
|
||||
title: this.$t('clauseSelect.clauseContent'),
|
||||
dataIndex: 'clauseContent',
|
||||
dataIndex: 'item_content',
|
||||
align: 'center',
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'clauseContent' }
|
||||
|
||||
@@ -199,32 +199,32 @@ export default {
|
||||
methods: {
|
||||
// 使用绑定关系
|
||||
useBindingRelationship () {
|
||||
if (this.selectedRowKeys.length <= 0) {
|
||||
this.$message.warning(this.$t('selectARecord'))
|
||||
} else {
|
||||
const ids = this.selectedRowKeys.join(',')
|
||||
const that = this
|
||||
this.$confirm({
|
||||
title: this.$t('system.bindingParts.confirmUseBindRelationship'),
|
||||
content: this.$t('system.bindingParts.isUseBindRelationship'),
|
||||
onOk: () => {
|
||||
that.loading = true
|
||||
postAction(that.url.useBindingRelationship, { ids: ids }).then((res) => {
|
||||
if (res.success) {
|
||||
// 重新计算分页问题
|
||||
that.reCalculatePage(that.selectedRowKeys.length)
|
||||
that.$message.success(res.message)
|
||||
that.loadData()
|
||||
that.onClearSelected()
|
||||
} else {
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
that.loading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
// if (this.selectedRowKeys.length <= 0) {
|
||||
// this.$message.warning(this.$t('selectARecord'))
|
||||
// } else {
|
||||
// const ids = this.selectedRowKeys.join(',')
|
||||
// const that = this
|
||||
// this.$confirm({
|
||||
// title: this.$t('system.bindingParts.confirmUseBindRelationship'),
|
||||
// content: this.$t('system.bindingParts.isUseBindRelationship'),
|
||||
// onOk: () => {
|
||||
// that.loading = true
|
||||
// postAction(that.url.useBindingRelationship, { ids: ids }).then((res) => {
|
||||
// if (res.success) {
|
||||
// // 重新计算分页问题
|
||||
// that.reCalculatePage(that.selectedRowKeys.length)
|
||||
// that.$message.success(res.message)
|
||||
// that.loadData()
|
||||
// that.onClearSelected()
|
||||
// } else {
|
||||
// that.$message.warning(res.message)
|
||||
// }
|
||||
// }).finally(() => {
|
||||
// that.loading = false
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
},
|
||||
// 点击标准编号和标准名称
|
||||
handleGoDetail (record) {
|
||||
@@ -246,7 +246,7 @@ export default {
|
||||
},
|
||||
// 点击条款号
|
||||
handleGoClause (record) {
|
||||
this.$refs.clauseModalRef.open(record.infoId)
|
||||
this.$refs.clauseModalRef.open(record.docSplitId, record.clauseIds)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,25 +47,25 @@
|
||||
<!--条文号-->
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('clauseSelect.articleNumber')">
|
||||
<j-input
|
||||
<a-input
|
||||
:placeholder="$t('pleaseEnter') + $t('clauseSelect.articleNumber')"
|
||||
v-model="queryParam.articleNumber"></j-input>
|
||||
v-model="queryParam.item_num"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--条文标题-->
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('clauseSelect.articleTitle')">
|
||||
<j-input
|
||||
<a-input
|
||||
:placeholder="$t('pleaseEnter') + $t('clauseSelect.articleTitle')"
|
||||
v-model="queryParam.articleTitle"></j-input>
|
||||
v-model="queryParam.item_title"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!--条文内容-->
|
||||
<a-col :md="6" :sm="12">
|
||||
<a-form-item :label="$t('clauseSelect.articleContent')">
|
||||
<j-input
|
||||
<a-input
|
||||
:placeholder="$t('pleaseEnter') + $t('clauseSelect.articleContent')"
|
||||
v-model="queryParam.articleContent"></j-input>
|
||||
v-model="queryParam.item_content"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
@@ -108,13 +108,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getClauseTreeData
|
||||
} from '../../../../api/documentToolApi'
|
||||
import SplitClauseDetail from '../../../documentTool/documentSplit/modules/SplitClauseDetail'
|
||||
import { JeroListMixin } from '../../../../mixins/JeroListMixin'
|
||||
import JTable from '../../../../components/jero/JTable'
|
||||
import { postAction } from '../../../../api/manage'
|
||||
import { getClauseTree } from '../../../../api/api'
|
||||
|
||||
export default {
|
||||
name: 'ClauseModal',
|
||||
@@ -133,7 +131,7 @@ export default {
|
||||
searchValue: '',
|
||||
selectedKeys: [],
|
||||
url: {
|
||||
list: '/laws/DocumentTool/documentSplit/queryDocumentSplitDetail'
|
||||
list: '/laws/bindPart/selectClause'
|
||||
},
|
||||
disableMixinCreated: true,
|
||||
expandedKeys: [],
|
||||
@@ -141,25 +139,26 @@ export default {
|
||||
{ // 条文号
|
||||
title: this.$t('clauseSelect.articleNumber'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'articleNumber',
|
||||
width: 100,
|
||||
dataIndex: 'item_num',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 条文标题
|
||||
title: this.$t('clauseSelect.articleTitle'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'articleTitle',
|
||||
width: 120,
|
||||
dataIndex: 'item_title',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 条文内容
|
||||
title: this.$t('clauseSelect.articleContent'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'articleContent',
|
||||
dataIndex: 'item_content',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}
|
||||
]
|
||||
],
|
||||
clauseIds: '' // 能查看的条款ids
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -168,16 +167,16 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open (infoId) {
|
||||
open (infoId, clauseIds) {
|
||||
this.visible = true
|
||||
this.infoId = infoId
|
||||
this.clauseIds = clauseIds
|
||||
this.filters = {
|
||||
menu_id: this.menuId,
|
||||
info_id: this.infoId
|
||||
}
|
||||
this.loadData()
|
||||
this.infoId = infoId
|
||||
this.loadMenuData()
|
||||
this.loadData()
|
||||
},
|
||||
loadData (arg) {
|
||||
if (!this.url.list) {
|
||||
@@ -188,7 +187,9 @@ export default {
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1
|
||||
}
|
||||
const params = this.getQueryParams()
|
||||
const params = Object.assign({}, this.filters, this.queryParam)
|
||||
params.pageNo = this.ipagination.current
|
||||
params.pageSize = this.ipagination.pageSize
|
||||
this.loading = true
|
||||
postAction(this.url.list, params).then((res) => {
|
||||
if (res.success) {
|
||||
@@ -198,6 +199,7 @@ export default {
|
||||
return
|
||||
}
|
||||
this.dataSource = res.result.records || []
|
||||
this.selectedRowKeys = this.clauseIds ? this.clauseIds.split(',') : []
|
||||
this.ipagination.total = res.result.total
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
@@ -237,7 +239,7 @@ export default {
|
||||
name: this.searchValue
|
||||
}
|
||||
this.treeLoading = true
|
||||
getClauseTreeData(params).then(res => {
|
||||
getClauseTree(params).then(res => {
|
||||
if (res.success) {
|
||||
this.treeData = res.result || []
|
||||
this.expandedKeys = this.treeData.length > 0 ? [this.treeData[0].id] : []
|
||||
|
||||
Reference in New Issue
Block a user