[update] ASMS接口管理完善
This commit is contained in:
+7
-1
@@ -136,6 +136,10 @@ const getEnterpriseLevelMapList = (params) => getAction('/sys/lawsGrade/list', p
|
|||||||
const addAsmsInterface = (params) => postAction('/docking/asms/api/lawsAsmsOpenApi/add', params)
|
const addAsmsInterface = (params) => postAction('/docking/asms/api/lawsAsmsOpenApi/add', params)
|
||||||
// ASMS接口管理-编辑
|
// ASMS接口管理-编辑
|
||||||
const editAsmsInterface = (params) => postAction('/docking/asms/api/lawsAsmsOpenApi/edit', params)
|
const editAsmsInterface = (params) => postAction('/docking/asms/api/lawsAsmsOpenApi/edit', params)
|
||||||
|
// ASMS接口管理-查看
|
||||||
|
const getAsmsInterfaceById = (params) => getAction('/docking/asms/api/lawsAsmsOpenApi/getInfoById', params)
|
||||||
|
// ASMS接口管理-同步
|
||||||
|
const syncAsmsInterface = (params) => getAction('/docking/asms/api/lawsAsmsOpenApi/syncBatch', params)
|
||||||
|
|
||||||
export {
|
export {
|
||||||
addRole,
|
addRole,
|
||||||
@@ -214,5 +218,7 @@ export {
|
|||||||
getSSOUserInfo,
|
getSSOUserInfo,
|
||||||
|
|
||||||
addAsmsInterface,
|
addAsmsInterface,
|
||||||
editAsmsInterface
|
editAsmsInterface,
|
||||||
|
getAsmsInterfaceById,
|
||||||
|
syncAsmsInterface
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
<!-- 操作区域 -->
|
<!-- 操作区域 -->
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<a-button @click="handleAdd" type="primary" icon="plus">{{ $t('newlyAdded') }}</a-button>
|
<a-button @click="handleAdd" type="primary" icon="plus">{{ $t('newlyAdded') }}</a-button>
|
||||||
|
<a-button @click="handleSync" type="primary">批量同步</a-button>
|
||||||
<!-- 批量删除 -->
|
<!-- 批量删除 -->
|
||||||
<a-button icon="delete" type="primary" ghost @click="batchDel">
|
<a-button icon="delete" type="primary" ghost @click="batchDel">
|
||||||
{{ $t('batchDelete') }}
|
{{ $t('batchDelete') }}
|
||||||
@@ -51,12 +52,14 @@
|
|||||||
@change="handleTableChange">
|
@change="handleTableChange">
|
||||||
<!-- 操作栏 -->
|
<!-- 操作栏 -->
|
||||||
<div slot="action" class="table-action" slot-scope="{text, record}">
|
<div slot="action" class="table-action" slot-scope="{text, record}">
|
||||||
<a class="action-edit" @click="handleEdit(record)" v-has="'sys:dict:operation'">{{ $t('edit') }}</a>
|
<a class="action-edit" @click="handleEdit(record)" >{{ $t('edit') }}</a>
|
||||||
<a class="action-delete" @click="handleDelete(record.id)" v-has="'sys:dict:operation'">{{ $t('delete') }}</a>
|
<a class="action-delete" @click="handleDelete(record.id)">{{ $t('delete') }}</a>
|
||||||
|
<a class="action-delete" @click="handleShow(record.id)">查看</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</j-table>
|
</j-table>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 添加、编辑 -->
|
||||||
<asms-interface-modal ref="modalForm" @ok="modalFormOk"/>
|
<asms-interface-modal ref="modalForm" @ok="modalFormOk"/>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
@@ -65,6 +68,7 @@
|
|||||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||||
import JTable from '@comp/jero/JTable'
|
import JTable from '@comp/jero/JTable'
|
||||||
import AsmsInterfaceModal from '@views/system/modules/AsmsInterfaceModal'
|
import AsmsInterfaceModal from '@views/system/modules/AsmsInterfaceModal'
|
||||||
|
import { getAsmsInterfaceById, syncAsmsInterface } from '@api/api'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AsmsInterfaceList',
|
name: 'AsmsInterfaceList',
|
||||||
@@ -83,14 +87,14 @@ export default {
|
|||||||
{
|
{
|
||||||
title: 'api名称',
|
title: 'api名称',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180,
|
width: 150,
|
||||||
dataIndex: 'apiName',
|
dataIndex: 'apiName',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '接口类型',
|
title: '接口类型',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180,
|
width: 120,
|
||||||
dataIndex: 'apiType_dictText',
|
dataIndex: 'apiType_dictText',
|
||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
},
|
},
|
||||||
@@ -129,6 +133,50 @@ export default {
|
|||||||
deleteBatch: '/docking/asms/api/lawsAsmsOpenApi/deleteBatch'
|
deleteBatch: '/docking/asms/api/lawsAsmsOpenApi/deleteBatch'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleSync () {
|
||||||
|
if (this.selectedRowKeys.length <= 0) {
|
||||||
|
this.$message.warning(this.$t('selectARecord'))
|
||||||
|
} else {
|
||||||
|
const ids = this.selectedRowKeys.join(',')
|
||||||
|
const that = this
|
||||||
|
this.$confirm({
|
||||||
|
title: '同步',
|
||||||
|
content: '确认进行同步',
|
||||||
|
onOk: function () {
|
||||||
|
that.loading = true
|
||||||
|
syncAsmsInterface({ 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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleShow (id) {
|
||||||
|
getAsmsInterfaceById({ id }).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
const arr = res.result || []
|
||||||
|
this.$success({
|
||||||
|
width: 800,
|
||||||
|
title: '查看',
|
||||||
|
content: arr.map(item => (<p>{(JSON.stringify(item) + '\n')}</p>))
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.warn(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -37,7 +37,8 @@
|
|||||||
:wrapperCol="wrapperCol"
|
:wrapperCol="wrapperCol"
|
||||||
prop="apiType"
|
prop="apiType"
|
||||||
label="数据字典id">
|
label="数据字典id">
|
||||||
<a-select v-model="model.dictId" placeholder="请选择数据字典id">
|
<a-select v-model="model.dictId" placeholder="请选择数据字典id"
|
||||||
|
show-search :filter-option="filterOption">
|
||||||
<a-select-option v-for="item in dictList" :value="item.id" :key="item.id">{{ item.dictName }}</a-select-option>
|
<a-select-option v-for="item in dictList" :value="item.id" :key="item.id">{{ item.dictName }}</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
@@ -126,6 +127,11 @@ export default {
|
|||||||
this.visible = false
|
this.visible = false
|
||||||
this.$refs.form.resetFields()
|
this.$refs.form.resetFields()
|
||||||
},
|
},
|
||||||
|
filterOption (input, option) {
|
||||||
|
return (
|
||||||
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
|
)
|
||||||
|
},
|
||||||
getDictList () {
|
getDictList () {
|
||||||
getAction('/sys/dict/page', {
|
getAction('/sys/dict/page', {
|
||||||
pageNo: -1,
|
pageNo: -1,
|
||||||
|
|||||||
Reference in New Issue
Block a user