Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
wenjianzhang committed Jun 17, 2021
2 parents 7f12fbe + b1a51cd commit 548cab6
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 87 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "go-admin",
"version": "2.0.0-bate.3",
"version": "2.0.0-beta.5",
"description": "A magical vue admin. An out-of-box UI solution for enterprise applications. Newest development stack of vue. Lots of awesome features",
"author": "https://github.com/wenjianzhang",
"license": "MIT",
Expand Down
10 changes: 5 additions & 5 deletions src/api/syschinaareadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询SysChinaAreaData列表
export function listSysChinaAreaData(query) {
return request({
url: '/api/v1/sys_china_area_data',
url: '/api/v1/sys-area-data',
method: 'get',
params: query
})
Expand All @@ -12,15 +12,15 @@ export function listSysChinaAreaData(query) {
// 查询SysChinaAreaData详细
export function getSysChinaAreaData(id) {
return request({
url: '/api/v1/sys_china_area_data/' + id,
url: '/api/v1/sys-area-data/' + id,
method: 'get'
})
}

// 新增SysChinaAreaData
export function addSysChinaAreaData(data) {
return request({
url: '/api/v1/sys_china_area_data',
url: '/api/v1/sys-area-data',
method: 'post',
data: data
})
Expand All @@ -29,7 +29,7 @@ export function addSysChinaAreaData(data) {
// 修改SysChinaAreaData
export function updateSysChinaAreaData(data) {
return request({
url: '/api/v1/sys_china_area_data/' + data.id,
url: '/api/v1/sys-area-data/' + data.id,
method: 'put',
data: data
})
Expand All @@ -38,7 +38,7 @@ export function updateSysChinaAreaData(data) {
// 删除SysChinaAreaData
export function delSysChinaAreaData(data) {
return request({
url: '/api/v1/sys_china_area_data',
url: '/api/v1/sys-area-data',
method: 'delete',
data: data
})
Expand Down
8 changes: 6 additions & 2 deletions src/utils/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,12 @@ service.interceptors.response.use(
duration: 5 * 1000
})
} else if (code !== 200) {
Notification.error({
title: response.data.msg
// Notification.error({
// title: response.data.msg
// })
Message({
message: response.data.msg,
type: 'error'
})
return Promise.reject('error')
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/views/admin/dict/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<el-table-column label="字典名称" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="字典类型" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
<router-link :to="{name:'DictData', params: {dictId:scope.row.id}}" class="link-type">
<router-link :to="{name:'SysDictDataManage', params: {dictId:scope.row.id}}" class="link-type">
<span>{{ scope.row.dictType }}</span>
</router-link>
</template>
Expand Down
44 changes: 17 additions & 27 deletions src/views/admin/sys-login-log/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,32 +84,21 @@
label="ip地址"
align="center"
prop="ipaddr"
:show-overflow-tooltip="true"
/>
<el-table-column
label="归属地"
align="center"
prop="loginLocation"
:show-overflow-tooltip="true"
/>
<el-table-column
label="浏览器"
align="center"
prop="browser"
:show-overflow-tooltip="true"
/>
<el-table-column
label="系统"
align="center"
prop="os"
:show-overflow-tooltip="true"
/>
<el-table-column
label="固件"
align="center"
prop="platform"
:show-overflow-tooltip="true"
/>
>
<template slot-scope="scope">
<el-popover trigger="hover" placement="top">
<p>IP: {{ scope.row.ipaddr }}</p>
<p>归属地: {{ scope.row.loginLocation }}</p>
<p>浏览器: {{ scope.row.browser }}</p>
<p>系统: {{ scope.row.os }}</p>
<p>固件: {{ scope.row.platform }}</p>
<div slot="reference" class="name-wrapper">
{{ scope.row.ipaddr }}
</div>
</el-popover>
</template>
</el-table-column>

<el-table-column
label="登录时间"
align="center"
Expand Down Expand Up @@ -185,7 +174,8 @@ export default {
username: undefined,
status: undefined,
ipaddr: undefined,
loginLocation: undefined
loginLocation: undefined,
createdAtOrder: 'desc'
},
// 表单参数
form: {
Expand Down
2 changes: 1 addition & 1 deletion src/views/admin/sys-menu/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ export default {
margin-left:0;
}
.panel .el-transfer-panel{
width: 310px;
width: 300px;
}
.el-col {
Expand Down
4 changes: 2 additions & 2 deletions src/views/admin/sys-oper-log/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
<el-table-column
label="Request info"
prop="operUrl"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<el-popover trigger="hover" placement="top">
Expand Down Expand Up @@ -219,7 +218,8 @@ export default {
title: undefined,
operName: undefined,
businessType: undefined,
status: undefined
status: undefined,
createdAtOrder: 'desc'
}
}
},
Expand Down
76 changes: 28 additions & 48 deletions src/views/sys-tools/sys-china-area-data/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
<template #wrapper>
<el-card class="box-card">
<el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px">
<el-form-item label="上级编码" prop="pId"><el-input
v-model="queryParams.pId"
placeholder="请输入上级编码"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
<el-form-item label="上级编码" prop="pId">
<el-cascader
v-model="queryParams.pId"
:options="syschinaareadataList"
:props="defaultProps"
style="width:260px;"
size="small"
@change="handleChange"
/>
</el-form-item>
<el-form-item label="名称" prop="name"><el-input
v-model="queryParams.name"
Expand Down Expand Up @@ -62,18 +64,20 @@
</el-col>
</el-row>

<el-table v-loading="loading" :data="syschinaareadataList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /><el-table-column
<el-table
v-loading="loading"
:data="syschinaareadataList"
border
row-key="id"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
<el-table-column
label="编码"
align="center"
prop="id"
:show-overflow-tooltip="true"
/><el-table-column
label="上级编码"
align="center"
prop="pId"
:show-overflow-tooltip="true"
/><el-table-column
/>
<el-table-column
label="名称"
align="center"
prop="name"
Expand Down Expand Up @@ -101,14 +105,6 @@
</el-table-column>
</el-table>

<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageIndex"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>

<!-- 添加或修改对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
Expand Down Expand Up @@ -164,20 +160,17 @@
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<FileChoose ref="fileChoose" :dialog-form-visible="fileOpen" @confirm="getImgList" @close="fileClose" />
</el-card>
</template>
</BasicLayout>
</template>

<script>
import { addSysChinaAreaData, delSysChinaAreaData, getSysChinaAreaData, listSysChinaAreaData, updateSysChinaAreaData } from '@/api/syschinaareadata'
import FileChoose from '@/components/FileChoose'
export default {
name: 'SysChinaAreaData',
components: {
FileChoose
},
data() {
return {
Expand All @@ -189,41 +182,35 @@ export default {
single: true,
// 非多个禁用
multiple: true,
// 总条数
total: 0,
// 弹出层标题
title: '',
// 是否显示弹出层
open: false,
isEdit: false,
fileOpen: false,
fileIndex: undefined,
defaultProps: {
children: 'children',
label: 'name',
value: 'id'
},
// 类型数据字典
typeOptions: [],
syschinaareadataList: [],
// 关系表类型
// 查询参数
queryParams: {
pageIndex: 1,
pageSize: 10,
pId: undefined,
name: undefined
},
// 表单参数
form: {
},
// 表单校验
rules: { pId:
[
{ required: true, message: '上级编码不能为空', trigger: 'blur' }
],
name:
[
{ required: true, message: '名称不能为空', trigger: 'blur' }
]
rules: {
pId: [{ required: true, message: '上级编码不能为空', trigger: 'blur' }],
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }]
}
}
},
Expand All @@ -235,8 +222,7 @@ export default {
getList() {
this.loading = true
listSysChinaAreaData(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.syschinaareadataList = response.data.list
this.total = response.data.count
this.syschinaareadataList = response.data
this.loading = false
}
)
Expand All @@ -259,12 +245,6 @@ export default {
}
this.resetForm('form')
},
getImgList: function() {
this.form[this.fileIndex] = this.$refs['fileChoose'].resultList[0].fullUrl
},
fileClose: function() {
this.fileOpen = false
},
// 关系
// 文件
/** 搜索按钮操作 */
Expand Down

0 comments on commit 548cab6

Please sign in to comment.