Skip to content

Commit e4fd2f5

Browse files
authored
releases 1.1.5
upgrade:ver 1.1.5
2 parents e24148d + 660f087 commit e4fd2f5

File tree

10 files changed

+385
-23
lines changed

10 files changed

+385
-23
lines changed

.env.production

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
ENV = 'production'
33

44
# base api
5-
VUE_APP_BASE_API = '/'
5+
VUE_APP_BASE_API = 'http://www.zhangwj.com:8000'
66

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "go-admin",
3-
"version": "1.1.4",
3+
"version": "1.1.5",
44
"description": "A magical vue admin. An out-of-box UI solution for enterprise applications. Newest development stack of vue. Lots of awesome features",
55
"author": "https://github.com/wenjianzhang/go-admin-ui",
66
"license": "MIT",
@@ -73,6 +73,7 @@
7373
"vue-count-to": "1.0.13",
7474
"vue-cropper": "^0.5.5",
7575
"vue-particles": "^1.0.9",
76+
"vue-quill-editor": "^3.0.6",
7677
"vue-router": "3.4.2",
7778
"vue-splitpane": "1.0.6",
7879
"vuedraggable": "2.24.0",

src/App.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ export default {
99
name: 'App'
1010
}
1111
</script>
12+
<script>
13+
var _hmt = _hmt || [];
14+
(function() {
15+
var hm = document.createElement("script");
16+
hm.src = "https://hm.baidu.com/hm.js?1d2d61263f13e4b288c8da19ad3ff56d";
17+
var s = document.getElementsByTagName("script")[0];
18+
s.parentNode.insertBefore(hm, s);
19+
})();
20+
</script>
1221

1322
<style lang="scss">
1423
.el-dialog__wrapper{

src/api/sysconfig.js

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import request from '@/utils/request'
2+
3+
// 查询SysConfig列表
4+
export function listSysConfig(query) {
5+
return request({
6+
url: '/api/v1/sysconfigList',
7+
method: 'get',
8+
params: query
9+
})
10+
}
11+
12+
// 查询SysConfig详细
13+
export function getSysConfig(configId) {
14+
return request({
15+
url: '/api/v1/sysconfig/' + configId,
16+
method: 'get'
17+
})
18+
}
19+
20+
// 新增SysConfig
21+
export function addSysConfig(data) {
22+
return request({
23+
url: '/api/v1/sysconfig',
24+
method: 'post',
25+
data: data
26+
})
27+
}
28+
29+
// 修改SysConfig
30+
export function updateSysConfig(data) {
31+
return request({
32+
url: '/api/v1/sysconfig',
33+
method: 'put',
34+
data: data
35+
})
36+
}
37+
38+
// 删除SysConfig
39+
export function delSysConfig(configId) {
40+
return request({
41+
url: '/api/v1/sysconfig/' + configId,
42+
method: 'delete'
43+
})
44+
}
45+

src/api/sysjob.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function updateSysJob(data) {
3939
export function delSysJob(jobId) {
4040
return request({
4141
url: '/api/v1/sysjob/' + jobId,
42-
method: 'get'
42+
method: 'delete'
4343
})
4444
}
4545

src/views/sysconfig/index.vue

Lines changed: 279 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,279 @@
1+
2+
<template>
3+
<BasicLayout>
4+
<template #wrapper>
5+
<el-card class="box-card">
6+
<el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px">
7+
8+
<el-form-item>
9+
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
10+
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
11+
</el-form-item>
12+
</el-form>
13+
14+
<el-row :gutter="10" class="mb8">
15+
<el-col :span="1.5">
16+
<el-button
17+
v-permisaction="['sysconfig:sysconfig:add']"
18+
type="primary"
19+
icon="el-icon-plus"
20+
size="mini"
21+
@click="handleAdd"
22+
>新增
23+
</el-button>
24+
</el-col>
25+
<el-col :span="1.5">
26+
<el-button
27+
v-permisaction="['sysconfig:sysconfig:edit']"
28+
type="success"
29+
icon="el-icon-edit"
30+
size="mini"
31+
:disabled="single"
32+
@click="handleUpdate"
33+
>修改
34+
</el-button>
35+
</el-col>
36+
<el-col :span="1.5">
37+
<el-button
38+
v-permisaction="['sysconfig:sysconfig:remove']"
39+
type="danger"
40+
icon="el-icon-delete"
41+
size="mini"
42+
:disabled="multiple"
43+
@click="handleDelete"
44+
>删除
45+
</el-button>
46+
</el-col>
47+
</el-row>
48+
49+
<el-table v-loading="loading" :data="sysconfigList" @selection-change="handleSelectionChange">
50+
<el-table-column type="selection" width="55" align="center" />
51+
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
52+
<template slot-scope="scope">
53+
<el-button
54+
v-permisaction="['sysconfig:sysconfig:edit']"
55+
size="mini"
56+
type="text"
57+
icon="el-icon-edit"
58+
@click="handleUpdate(scope.row)"
59+
>修改
60+
</el-button>
61+
<el-button
62+
v-permisaction="['sysconfig:sysconfig:remove']"
63+
size="mini"
64+
type="text"
65+
icon="el-icon-delete"
66+
@click="handleDelete(scope.row)"
67+
>删除
68+
</el-button>
69+
</template>
70+
</el-table-column>
71+
</el-table>
72+
73+
<pagination
74+
v-show="total>0"
75+
:total="total"
76+
:page.sync="queryParams.pageIndex"
77+
:limit.sync="queryParams.pageSize"
78+
@pagination="getList"
79+
/>
80+
81+
<!-- 添加或修改对话框 -->
82+
<el-dialog :title="title" :visible.sync="open" width="500px">
83+
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
84+
85+
<el-form-item label="" prop="configName">
86+
<el-input
87+
v-model="form.configName"
88+
placeholder=""
89+
/>
90+
</el-form-item>
91+
<el-form-item label="" prop="configKey">
92+
<el-input
93+
v-model="form.configKey"
94+
placeholder=""
95+
/>
96+
</el-form-item>
97+
<el-form-item label="" prop="configValue">
98+
<el-input
99+
v-model="form.configValue"
100+
placeholder=""
101+
/>
102+
</el-form-item>
103+
<el-form-item label="" prop="configType">
104+
<el-input
105+
v-model="form.configType"
106+
placeholder=""
107+
/>
108+
</el-form-item>
109+
<el-form-item label="" prop="remark">
110+
<el-input
111+
v-model="form.remark"
112+
placeholder=""
113+
/>
114+
</el-form-item>
115+
</el-form>
116+
<div slot="footer" class="dialog-footer">
117+
<el-button type="primary" @click="submitForm">确 定</el-button>
118+
<el-button @click="cancel">取 消</el-button>
119+
</div>
120+
</el-dialog>
121+
</el-card>
122+
</template>
123+
</BasicLayout>
124+
</template>
125+
126+
<script>
127+
import { addSysConfig, delSysConfig, getSysConfig, listSysConfig, updateSysConfig } from '@/api/sysconfig'
128+
129+
export default {
130+
name: 'Config',
131+
data() {
132+
return {
133+
// 遮罩层
134+
loading: true,
135+
// 选中数组
136+
ids: [],
137+
// 非单个禁用
138+
single: true,
139+
// 非多个禁用
140+
multiple: true,
141+
// 总条数
142+
total: 0,
143+
// 弹出层标题
144+
title: '',
145+
// 是否显示弹出层
146+
open: false,
147+
isEdit: false,
148+
// 类型数据字典
149+
typeOptions: [],
150+
sysconfigList: [],
151+
152+
// 查询参数
153+
queryParams: {
154+
pageIndex: 1,
155+
pageSize: 10
156+
157+
},
158+
// 表单参数
159+
form: {
160+
},
161+
// 表单校验
162+
rules: {}
163+
}
164+
},
165+
created() {
166+
this.getList()
167+
},
168+
methods: {
169+
/** 查询参数列表 */
170+
getList() {
171+
this.loading = true
172+
listSysConfig(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
173+
this.sysconfigList = response.data.list
174+
this.total = response.data.count
175+
this.loading = false
176+
}
177+
)
178+
},
179+
// 取消按钮
180+
cancel() {
181+
this.open = false
182+
this.reset()
183+
},
184+
// 表单重置
185+
reset() {
186+
this.form = {
187+
188+
configId: undefined,
189+
configName: undefined,
190+
configKey: undefined,
191+
configValue: undefined,
192+
configType: undefined,
193+
remark: undefined
194+
}
195+
this.resetForm('form')
196+
},
197+
198+
/** 搜索按钮操作 */
199+
handleQuery() {
200+
this.queryParams.pageIndex = 1
201+
this.getList()
202+
},
203+
/** 重置按钮操作 */
204+
resetQuery() {
205+
this.dateRange = []
206+
this.resetForm('queryForm')
207+
this.handleQuery()
208+
},
209+
/** 新增按钮操作 */
210+
handleAdd() {
211+
this.reset()
212+
this.open = true
213+
this.title = '添加SysConfig'
214+
this.isEdit = false
215+
},
216+
// 多选框选中数据
217+
handleSelectionChange(selection) {
218+
this.ids = selection.map(item => item.configId)
219+
this.single = selection.length !== 1
220+
this.multiple = !selection.length
221+
},
222+
/** 修改按钮操作 */
223+
handleUpdate(row) {
224+
this.reset()
225+
const configId =
226+
row.configId || this.ids
227+
getSysConfig(configId).then(response => {
228+
this.form = response.data
229+
this.open = true
230+
this.title = '修改SysConfig'
231+
this.isEdit = true
232+
})
233+
},
234+
/** 提交按钮 */
235+
submitForm: function() {
236+
this.$refs['form'].validate(valid => {
237+
if (valid) {
238+
if (this.form.configId !== undefined) {
239+
updateSysConfig(this.form).then(response => {
240+
if (response.code === 200) {
241+
this.msgSuccess('修改成功')
242+
this.open = false
243+
this.getList()
244+
} else {
245+
this.msgError(response.msg)
246+
}
247+
})
248+
} else {
249+
addSysConfig(this.form).then(response => {
250+
if (response.code === 200) {
251+
this.msgSuccess('新增成功')
252+
this.open = false
253+
this.getList()
254+
} else {
255+
this.msgError(response.msg)
256+
}
257+
})
258+
}
259+
}
260+
})
261+
},
262+
/** 删除按钮操作 */
263+
handleDelete(row) {
264+
const Ids = row.configId || this.ids
265+
this.$confirm('是否确认删除编号为"' + Ids + '"的数据项?', '警告', {
266+
confirmButtonText: '确定',
267+
cancelButtonText: '取消',
268+
type: 'warning'
269+
}).then(function() {
270+
return delSysConfig(Ids)
271+
}).then(() => {
272+
this.getList()
273+
this.msgSuccess('删除成功')
274+
}).catch(function() {
275+
})
276+
}
277+
}
278+
}
279+
</script>

src/views/sysjob/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ export default {
405405
misfirePolicy: 1,
406406
concurrent: 1,
407407
jobType: 1,
408-
status: 0
408+
status: undefined
409409
}
410410
this.resetForm('form')
411411
},

src/views/sysuser/index.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,10 @@ import { getToken } from '@/utils/auth'
314314
import { treeselect } from '@/api/system/dept'
315315
import Treeselect from '@riophae/vue-treeselect'
316316
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
317-
import BasicLayout from "@/layout/BasicLayout";
318317
319318
export default {
320319
name: 'User',
321-
components: { Treeselect, BasicLayout },
320+
components: { Treeselect },
322321
data() {
323322
return {
324323
// 遮罩层

0 commit comments

Comments
 (0)