下拉端口列表调通

This commit is contained in:
aoshiguchen
2022-09-01 23:27:25 +08:00
parent 99edb29765
commit 84d72b613f
15 changed files with 54 additions and 31 deletions
+7
View File
@@ -8,6 +8,13 @@ export function fetchList(query) {
})
}
export function licenseList() {
return request({
url: '/license/list',
method: 'get'
})
}
export function createLicense(data) {
return request({
url: '/license/create',
@@ -42,23 +42,13 @@
return {
countryColumns: [
{
prop: 'NameCn',
label: '中文名',
prop: 'userName',
label: '用户名',
align: 'center'
},
{
prop: 'NameEn',
label: '英文名',
align: 'center'
},
{
prop: 'FeeItemCode',
label: '费用项编码',
align: 'center'
},
{
prop: 'FeeItemTypeStr',
label: '费用类型',
prop: 'name',
label: 'License',
align: 'center'
}
],
@@ -71,12 +71,12 @@
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
<el-form :rules="rules" ref="dataForm" :model="temp" label-position="left" label-width="120px" style='width: 400px; margin-left:50px;'>
<el-form-item :label="$t('License')" prop="licenseId">
<el-select style="width: 280px;" class="filter-item" v-model="temp.licenseId" placeholder="请选择" :disabled="dialogStatus=='update'">
<el-option v-for="item in licenseList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item :label="$t('License')" prop="licenseId">-->
<!-- <el-select style="width: 280px;" class="filter-item" v-model="temp.licenseId" placeholder="请选择" :disabled="dialogStatus=='update'">-->
<!-- <el-option v-for="item in licenseList" :key="item.id" :label="item.name" :value="item.id">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item :label="$t('License')" prop="licenseId">
<DropdownTable
@@ -85,6 +85,7 @@
:tableData= "licenseList"
@selectedData="selectedFeeItem"
placeholder="请选择"
:width="280"
/>
</el-form-item>
@@ -124,6 +125,7 @@
<script>
import { fetchList, createUserPortMapping, updateUserPortMapping, updateEnableStatus, deletePortMapping } from '@/api/portMapping'
import { portPoolList } from '@/api/portPool'
import { licenseList } from '@/api/license'
import waves from '@/directive/waves' // 水波纹指令
import { parseTime } from '@/utils'
import ButtonPopover from '../../components/Button/buttonPopover'
@@ -168,10 +170,7 @@
calendarTypeOptions,
sortOptions: [{ label: 'ID Ascending', key: '+id' }, { label: 'ID Descending', key: '-id' }],
statusOptions: ['published', 'draft', 'deleted'],
licenseList: [
{ id: 1, name: '我的Mac' },
{ id: 2, name: '我的台式机' }
],
licenseList: [],
serverPortList: [],
showReviewer: false,
temp: {
@@ -228,6 +227,7 @@
created() {
this.getList()
this.getPortPoolList()
this.getLicenseList()
},
methods: {
getList() {
@@ -243,6 +243,11 @@
this.serverPortList = response.data.data
})
},
getLicenseList() {
licenseList().then(response => {
this.licenseList = response.data.data
})
},
handleFilter() {
this.listQuery.currentPage = 1
this.getList()
@@ -270,12 +275,11 @@
resetTemp() {
this.temp = {
id: undefined,
importance: 1,
remark: '',
timestamp: new Date(),
title: '',
status: 'published',
type: ''
licenseId: undefined,
licenseName: undefined,
serverPort: undefined,
clientIp: undefined,
clientPort: undefined
}
},
handleCreate() {
@@ -23,6 +23,7 @@ package fun.asgc.neutrino.proxy.server.dal;
import fun.asgc.neutrino.core.annotation.Component;
import fun.asgc.neutrino.core.annotation.Param;
import fun.asgc.neutrino.core.aop.Intercept;
import fun.asgc.neutrino.core.db.annotation.Delete;
import fun.asgc.neutrino.core.db.annotation.ResultType;
import fun.asgc.neutrino.core.db.annotation.Select;
@@ -43,6 +44,7 @@ import java.util.Set;
* @author: aoshiguchen
* @date: 2022/8/6
*/
@Intercept(ignoreGlobal = true)
@Component
public interface LicenseMapper extends SqlMapper {
@@ -23,6 +23,7 @@ package fun.asgc.neutrino.proxy.server.dal;
import fun.asgc.neutrino.core.annotation.Component;
import fun.asgc.neutrino.core.annotation.Param;
import fun.asgc.neutrino.core.aop.Intercept;
import fun.asgc.neutrino.core.db.annotation.Delete;
import fun.asgc.neutrino.core.db.annotation.ResultType;
import fun.asgc.neutrino.core.db.annotation.Select;
@@ -41,6 +42,7 @@ import java.util.Set;
* @author: aoshiguchen
* @date: 2022/8/8
*/
@Intercept(ignoreGlobal = true)
@Component
public interface PortMappingMapper extends SqlMapper {
@@ -23,6 +23,7 @@ package fun.asgc.neutrino.proxy.server.dal;
import fun.asgc.neutrino.core.annotation.Component;
import fun.asgc.neutrino.core.annotation.Param;
import fun.asgc.neutrino.core.aop.Intercept;
import fun.asgc.neutrino.core.db.annotation.*;
import fun.asgc.neutrino.core.db.mapper.SqlMapper;
import fun.asgc.neutrino.core.db.page.Page;
@@ -38,6 +39,7 @@ import java.util.List;
* @author: aoshiguchen
* @date: 2022/8/7
*/
@Intercept(ignoreGlobal = true)
@Component
public interface PortPoolMapper extends SqlMapper {
@@ -22,6 +22,7 @@
package fun.asgc.neutrino.proxy.server.dal;
import fun.asgc.neutrino.core.annotation.Component;
import fun.asgc.neutrino.core.aop.Intercept;
import fun.asgc.neutrino.core.db.mapper.SqlMapper;
/**
@@ -29,6 +30,7 @@ import fun.asgc.neutrino.core.db.mapper.SqlMapper;
* @author: aoshiguchen
* @date: 2022/8/31
*/
@Intercept(ignoreGlobal = true)
@Component
public interface UserConnectRecordMapper extends SqlMapper {
@@ -22,6 +22,7 @@
package fun.asgc.neutrino.proxy.server.dal;
import fun.asgc.neutrino.core.annotation.Component;
import fun.asgc.neutrino.core.aop.Intercept;
import fun.asgc.neutrino.core.db.annotation.Insert;
import fun.asgc.neutrino.core.db.mapper.SqlMapper;
import fun.asgc.neutrino.proxy.server.dal.entity.UserLoginRecordDO;
@@ -31,6 +32,7 @@ import fun.asgc.neutrino.proxy.server.dal.entity.UserLoginRecordDO;
* @author: aoshiguchen
* @date: 2022/8/2
*/
@Intercept(ignoreGlobal = true)
@Component
public interface UserLoginRecordMapper extends SqlMapper {
/**
@@ -23,6 +23,7 @@ package fun.asgc.neutrino.proxy.server.dal;
import fun.asgc.neutrino.core.annotation.Component;
import fun.asgc.neutrino.core.annotation.Param;
import fun.asgc.neutrino.core.aop.Intercept;
import fun.asgc.neutrino.core.db.annotation.*;
import fun.asgc.neutrino.core.db.mapper.SqlMapper;
import fun.asgc.neutrino.core.db.page.Page;
@@ -40,6 +41,7 @@ import java.util.Set;
* @author: aoshiguchen
* @date: 2022/8/1
*/
@Intercept(ignoreGlobal = true)
@Component
public interface UserMapper extends SqlMapper {
@@ -23,6 +23,7 @@ package fun.asgc.neutrino.proxy.server.dal;
import fun.asgc.neutrino.core.annotation.Component;
import fun.asgc.neutrino.core.annotation.Param;
import fun.asgc.neutrino.core.aop.Intercept;
import fun.asgc.neutrino.core.db.annotation.Delete;
import fun.asgc.neutrino.core.db.annotation.Insert;
import fun.asgc.neutrino.core.db.annotation.Select;
@@ -37,6 +38,7 @@ import java.util.Date;
* @author: aoshiguchen
* @date: 2022/8/1
*/
@Intercept(ignoreGlobal = true)
@Component
public interface UserTokenMapper extends SqlMapper {
/**
@@ -24,6 +24,7 @@ package fun.asgc.neutrino.proxy.server.service;
import com.google.common.collect.Sets;
import fun.asgc.neutrino.core.annotation.Autowired;
import fun.asgc.neutrino.core.annotation.Component;
import fun.asgc.neutrino.core.annotation.NonIntercept;
import fun.asgc.neutrino.core.db.page.Page;
import fun.asgc.neutrino.core.db.page.PageQuery;
import fun.asgc.neutrino.core.util.CollectionUtil;
@@ -51,6 +52,7 @@ import java.util.stream.Collectors;
* @author: aoshiguchen
* @date: 2022/8/6
*/
@NonIntercept
@Component
public class LicenseService {
@@ -24,6 +24,7 @@ package fun.asgc.neutrino.proxy.server.service;
import com.google.common.collect.Sets;
import fun.asgc.neutrino.core.annotation.Autowired;
import fun.asgc.neutrino.core.annotation.Component;
import fun.asgc.neutrino.core.annotation.NonIntercept;
import fun.asgc.neutrino.core.db.page.Page;
import fun.asgc.neutrino.core.db.page.PageQuery;
import fun.asgc.neutrino.core.util.CollectionUtil;
@@ -58,6 +59,7 @@ import java.util.stream.Collectors;
* @author: aoshiguchen
* @date: 2022/8/8
*/
@NonIntercept
@Component
public class PortMappingService {
@Autowired
@@ -23,6 +23,7 @@ package fun.asgc.neutrino.proxy.server.service;
import fun.asgc.neutrino.core.annotation.Autowired;
import fun.asgc.neutrino.core.annotation.Component;
import fun.asgc.neutrino.core.annotation.NonIntercept;
import fun.asgc.neutrino.core.db.page.Page;
import fun.asgc.neutrino.core.db.page.PageQuery;
import fun.asgc.neutrino.proxy.server.constant.EnableStatusEnum;
@@ -45,6 +46,7 @@ import java.util.List;
* @author: aoshiguchen
* @date: 2022/8/7
*/
@NonIntercept
@Component
public class PortPoolService {
@@ -23,6 +23,7 @@ package fun.asgc.neutrino.proxy.server.service;
import fun.asgc.neutrino.core.annotation.Autowired;
import fun.asgc.neutrino.core.annotation.Component;
import fun.asgc.neutrino.core.annotation.NonIntercept;
import fun.asgc.neutrino.core.db.page.Page;
import fun.asgc.neutrino.core.db.page.PageQuery;
import fun.asgc.neutrino.core.util.DateUtil;
@@ -50,6 +51,7 @@ import java.util.UUID;
* @author: aoshiguchen
* @date: 2022/7/31
*/
@NonIntercept
@Component
public class UserService {
private static final String DEFAULT_PASSWORD = "123456";
@@ -26,7 +26,7 @@
</encoder>
</appender>
<root level="DEBUG">
<root level="INFO">
<appender-ref ref="console"/>
<appender-ref ref="file"/>
</root>