update 法规合规评估、零部件选择弹框

This commit is contained in:
赵霄
2024-01-19 14:36:37 +08:00
parent 208133026b
commit 36afe6597c
7 changed files with 302 additions and 85 deletions
+14 -6
View File
@@ -60,7 +60,7 @@
<script>
import { getAction } from '../../api/manage'
import { getDictTreeList, getDictByCode } from '../../api/api'
import { getDictByCode } from '../../api/api'
export default {
name: 'TreeSelectModal',
@@ -80,6 +80,12 @@ export default {
type: Boolean,
required: false,
default: false
},
// 获取数据的接口
optionsHref: {
type: String,
required: false,
default: ''
}
},
data () {
@@ -111,7 +117,7 @@ export default {
columns: [
{
title: this.$t('system.tag.name'),
dataIndex: 'itemText'
dataIndex: 'title'
}
],
dataSource: [],
@@ -121,9 +127,8 @@ export default {
methods: {
open (values) {
this.visible = true
this.filters.dictId = this.dictId
this.selectedRowKeys = values ? values.split(',') : []
this.loadData()
this.loadData(1)
this.getSelectedList(values)
},
handleCancel () {
@@ -154,12 +159,15 @@ export default {
this.queryParam = {}
this.loadData(1)
},
loadData () {
loadData (arg) {
if (arg) {
this.ipagination.current = 1
}
this.confirmLoading = true
const params = Object.assign({}, this.queryParam, this.filters)
params.pageNo = this.ipagination.current
params.pageSize = this.ipagination.pageSize
getDictTreeList(params).then(res => {
getAction(this.optionsHref, params).then(res => {
if (res.success) {
this.dataSource = res.result.records || res.result
if (res.result.total) {