leisure-core 0.6.83 → 0.6.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +13 -29
- package/package.json +1 -1
- package/le-area/index.js +0 -7
- package/le-area/src/main.vue +0 -112
- package/le-backup/index.js +0 -7
- package/le-backup/src/main.vue +0 -160
- package/le-backup/src/records.vue +0 -79
- package/le-backup/src/sub.vue +0 -107
- package/le-menu/index.js +0 -7
- package/le-menu/src/main.vue +0 -248
- package/le-mpurl/index.js +0 -7
- package/le-mpurl/src/main.vue +0 -76
- package/le-rich-text/index.js +0 -7
- package/le-rich-text/src/main.vue +0 -162
- package/le-role/index.js +0 -7
- package/le-role/src/main.vue +0 -191
- package/le-role/src/sub.vue +0 -79
- package/le-role-user/index.js +0 -7
- package/le-role-user/src/main.vue +0 -160
- package/le-role-user/src/sub.vue +0 -90
- package/le-select-user/index.js +0 -7
- package/le-select-user/src/main.vue +0 -87
- package/le-user/index.js +0 -7
- package/le-user/src/add.vue +0 -197
- package/le-user/src/main.vue +0 -448
- package/le-user/src/sub.vue +0 -241
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import LeDrag from "./le-libs/js/drag.js";
|
|
2
|
-
import leMixins from "./le-libs/mixins/main.js";
|
|
2
|
+
// import leMixins from "./le-libs/mixins/main.js";
|
|
3
3
|
import {
|
|
4
4
|
parseTime,
|
|
5
5
|
formatMoney,
|
|
@@ -11,24 +11,20 @@ import LeButton from "./le-button/index.js";
|
|
|
11
11
|
import LeButtonQr from "./le-button-qr/index.js";
|
|
12
12
|
import LeButtonMsg from "./le-button-msg/index.js";
|
|
13
13
|
import LeDialogContainer from "./le-dialog-container/index.js";
|
|
14
|
-
|
|
15
|
-
import LeMenu from "./le-menu/index.js";
|
|
16
|
-
import LeRoleUser from "./le-role-user/index.js";
|
|
17
|
-
import LeUser from "./le-user/index.js";
|
|
14
|
+
|
|
18
15
|
import LeMedia from "./le-media/index.js";
|
|
19
16
|
import LeMediaUpload from "./le-media-upload/index.js";
|
|
20
17
|
import LeMediaList from "./le-media-list/index.js";
|
|
21
|
-
|
|
18
|
+
|
|
22
19
|
import LeButtonUpload from "./le-button-upload/index.js";
|
|
23
20
|
import LeButtonSelectMedia from "./le-button-select-media/index.js";
|
|
24
21
|
import LeImage from "./le-image/index.js";
|
|
25
22
|
import LeImageContainer from "./le-image-container/index.js";
|
|
26
|
-
|
|
23
|
+
|
|
27
24
|
import LeUpload from "./le-upload/index.js";
|
|
28
|
-
|
|
25
|
+
|
|
29
26
|
import { LeHelp, LeHelpDetail } from "./le-help/index.js";
|
|
30
|
-
|
|
31
|
-
import LeArea from "./le-area/index.js";
|
|
27
|
+
|
|
32
28
|
import LeSelect from "./le-select/index.js";
|
|
33
29
|
import LeSelectSearch from "./le-select-search/index.js";
|
|
34
30
|
import LeInput from "./le-input/index.js";
|
|
@@ -53,31 +49,27 @@ import LeUploadTable from "./le-upload-table/index.js";
|
|
|
53
49
|
import LeReport from "./le-report/index.js";
|
|
54
50
|
|
|
55
51
|
const components = [
|
|
56
|
-
LeArea,
|
|
57
52
|
LeButton,
|
|
58
53
|
LeButtonQr,
|
|
59
54
|
LeButtonMsg,
|
|
60
55
|
LeDialogContainer,
|
|
61
56
|
LeLogin,
|
|
62
57
|
LeHome,
|
|
63
|
-
|
|
64
|
-
LeRole,
|
|
65
|
-
LeRoleUser,
|
|
66
|
-
LeUser,
|
|
58
|
+
|
|
67
59
|
LeMedia,
|
|
68
60
|
LeMediaUpload,
|
|
69
61
|
LeMediaList,
|
|
70
|
-
|
|
62
|
+
|
|
71
63
|
LeButtonUpload,
|
|
72
64
|
LeButtonSelectMedia,
|
|
73
65
|
LeImageContainer,
|
|
74
66
|
LeImage,
|
|
75
|
-
|
|
67
|
+
|
|
76
68
|
LeUpload,
|
|
77
|
-
|
|
69
|
+
|
|
78
70
|
LeHelp,
|
|
79
71
|
LeHelpDetail,
|
|
80
|
-
|
|
72
|
+
|
|
81
73
|
LeSelect,
|
|
82
74
|
LeSelectSearch,
|
|
83
75
|
LeInput,
|
|
@@ -170,31 +162,24 @@ if (typeof window !== "undefined" && window.Vue) {
|
|
|
170
162
|
|
|
171
163
|
export default {
|
|
172
164
|
install,
|
|
173
|
-
LeArea,
|
|
174
165
|
LeButton,
|
|
175
166
|
LeButtonQr,
|
|
176
167
|
LeButtonMsg,
|
|
177
168
|
LeDialogContainer,
|
|
178
169
|
LeLogin,
|
|
179
170
|
LeHome,
|
|
180
|
-
|
|
181
|
-
LeRole,
|
|
182
|
-
LeRoleUser,
|
|
183
|
-
LeUser,
|
|
171
|
+
|
|
184
172
|
LeMedia,
|
|
185
173
|
LeMediaUpload,
|
|
186
174
|
LeMediaList,
|
|
187
|
-
|
|
175
|
+
|
|
188
176
|
LeButtonUpload,
|
|
189
177
|
LeButtonSelectMedia,
|
|
190
178
|
LeImageContainer,
|
|
191
179
|
LeImage,
|
|
192
|
-
LeBackUp,
|
|
193
180
|
LeUpload,
|
|
194
|
-
LeMpurl,
|
|
195
181
|
LeHelp,
|
|
196
182
|
LeHelpDetail,
|
|
197
|
-
LeSelectUser,
|
|
198
183
|
LeSelect,
|
|
199
184
|
LeSelectSearch,
|
|
200
185
|
LeInput,
|
|
@@ -210,7 +195,6 @@ export default {
|
|
|
210
195
|
LeSpan,
|
|
211
196
|
LeInputAdvanced,
|
|
212
197
|
// LeButtonAudit,
|
|
213
|
-
leMixins,
|
|
214
198
|
LeInputValidate,
|
|
215
199
|
LeDatePickerAuto,
|
|
216
200
|
LeTableEdit,
|
package/package.json
CHANGED
package/le-area/index.js
DELETED
package/le-area/src/main.vue
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-cascader
|
|
3
|
-
v-model="value"
|
|
4
|
-
v-bind="$attrs"
|
|
5
|
-
v-on="$listeners"
|
|
6
|
-
clearable
|
|
7
|
-
:ref="elcascader"
|
|
8
|
-
:props="props"
|
|
9
|
-
@change="handleChange"
|
|
10
|
-
></el-cascader>
|
|
11
|
-
</template>
|
|
12
|
-
<script>
|
|
13
|
-
import { getAreas } from "@/api/system-area.js";
|
|
14
|
-
export default {
|
|
15
|
-
name: "le-area",
|
|
16
|
-
props: {
|
|
17
|
-
level: {
|
|
18
|
-
type: [String, Number],
|
|
19
|
-
default: "2",
|
|
20
|
-
},
|
|
21
|
-
initCode: {
|
|
22
|
-
type: [String, Number],
|
|
23
|
-
default: "0",
|
|
24
|
-
},
|
|
25
|
-
isAny: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: false,
|
|
28
|
-
},
|
|
29
|
-
initArea: {
|
|
30
|
-
type: Array,
|
|
31
|
-
default: () => [],
|
|
32
|
-
},
|
|
33
|
-
elcascader: {
|
|
34
|
-
type: String,
|
|
35
|
-
default: "",
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
data() {
|
|
39
|
-
return {
|
|
40
|
-
value: [],
|
|
41
|
-
props: {
|
|
42
|
-
label: "name",
|
|
43
|
-
value: "code",
|
|
44
|
-
checkStrictly: false,
|
|
45
|
-
lazy: true,
|
|
46
|
-
lazyLoad: this.LoadData,
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
},
|
|
50
|
-
watch: {
|
|
51
|
-
isAny: {
|
|
52
|
-
handler(val) {
|
|
53
|
-
this.props.checkStrictly = val;
|
|
54
|
-
},
|
|
55
|
-
immediate: true,
|
|
56
|
-
},
|
|
57
|
-
initArea: {
|
|
58
|
-
handler(val) {
|
|
59
|
-
this.value = val;
|
|
60
|
-
},
|
|
61
|
-
immediate: true,
|
|
62
|
-
deep: true,
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
mounted() {
|
|
67
|
-
if (this.initArea && this.initArea.length > 0) {
|
|
68
|
-
this.value = this.initArea;
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
methods: {
|
|
72
|
-
setInitArea(initArea) {
|
|
73
|
-
this.value = initArea;
|
|
74
|
-
},
|
|
75
|
-
clearInitArea() {
|
|
76
|
-
this.value = [];
|
|
77
|
-
},
|
|
78
|
-
LoadData(node, resolve) {
|
|
79
|
-
let nodes = [];
|
|
80
|
-
let { level } = node;
|
|
81
|
-
let param = {};
|
|
82
|
-
param.pcode = level == 0 ? this.initCode : node.value;
|
|
83
|
-
getAreas(param).then((res) => {
|
|
84
|
-
nodes = res.data.data;
|
|
85
|
-
nodes.forEach((item) => {
|
|
86
|
-
item.leaf = item.type == this.level ? true : false;
|
|
87
|
-
});
|
|
88
|
-
resolve(nodes);
|
|
89
|
-
});
|
|
90
|
-
},
|
|
91
|
-
handleChange(currentValue) {
|
|
92
|
-
let selectValue = {};
|
|
93
|
-
selectValue.code = currentValue;
|
|
94
|
-
if (!selectValue.code || selectValue.code.length <= 0) return;
|
|
95
|
-
let cascader = this.$refs[this.elcascader];
|
|
96
|
-
if (cascader) {
|
|
97
|
-
const nodes = cascader.getCheckedNodes();
|
|
98
|
-
if (nodes && nodes.length > 0) {
|
|
99
|
-
console.log(nodes[0].pathLabels);
|
|
100
|
-
const labels = nodes[0].pathLabels;
|
|
101
|
-
selectValue.name = labels.join("");
|
|
102
|
-
this.$emit("areaChange", selectValue);
|
|
103
|
-
} else {
|
|
104
|
-
console.log("area control node 不存:");
|
|
105
|
-
}
|
|
106
|
-
} else {
|
|
107
|
-
console.log("area control err:", "elcascader ref 不存在");
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
};
|
|
112
|
-
</script>
|
package/le-backup/index.js
DELETED
package/le-backup/src/main.vue
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-form :inline="true">
|
|
4
|
-
<el-form-item>
|
|
5
|
-
<el-button type="primary" @click="backRecord">查看备份记录</el-button>
|
|
6
|
-
</el-form-item>
|
|
7
|
-
</el-form>
|
|
8
|
-
<el-table
|
|
9
|
-
:data="tableData"
|
|
10
|
-
border
|
|
11
|
-
row-key="id"
|
|
12
|
-
:header-cell-style="{ 'text-align': 'center' }"
|
|
13
|
-
stripe
|
|
14
|
-
style="width: 100%"
|
|
15
|
-
>
|
|
16
|
-
<el-table-column prop="back_dir" label="备份目录" width="180">
|
|
17
|
-
</el-table-column>
|
|
18
|
-
<el-table-column prop="mysqldump_dir" label="dump目录" width="180">
|
|
19
|
-
</el-table-column>
|
|
20
|
-
<el-table-column prop="back_formatter" label="文件名称格式" width="150">
|
|
21
|
-
</el-table-column>
|
|
22
|
-
<el-table-column prop="back_pre" label="文件前缀" width="80">
|
|
23
|
-
</el-table-column>
|
|
24
|
-
<el-table-column prop="back_suf" label="文件后缀" width="80">
|
|
25
|
-
</el-table-column>
|
|
26
|
-
<el-table-column
|
|
27
|
-
prop="is_enabled"
|
|
28
|
-
align="center"
|
|
29
|
-
label="是否启用"
|
|
30
|
-
width="80"
|
|
31
|
-
>
|
|
32
|
-
<template slot-scope="scope">
|
|
33
|
-
<span v-if="scope.row.is_enabled == 0">否</span>
|
|
34
|
-
<span v-if="scope.row.is_enabled == 1">是</span>
|
|
35
|
-
</template>
|
|
36
|
-
</el-table-column>
|
|
37
|
-
<el-table-column label="操作" align="center" row>
|
|
38
|
-
<template slot-scope="scope">
|
|
39
|
-
<el-button
|
|
40
|
-
id="btnEdit"
|
|
41
|
-
type="primary"
|
|
42
|
-
size="small"
|
|
43
|
-
v-permission="$route.params.btns"
|
|
44
|
-
@click="openEditWindow(scope.row)"
|
|
45
|
-
>编辑</el-button
|
|
46
|
-
>
|
|
47
|
-
<el-button
|
|
48
|
-
id="btnEnable"
|
|
49
|
-
type="primary"
|
|
50
|
-
size="small"
|
|
51
|
-
@click="statusChange(scope.row)"
|
|
52
|
-
>{{ btnEabelText(scope.row) }}</el-button
|
|
53
|
-
>
|
|
54
|
-
<el-button
|
|
55
|
-
id="btnEnable"
|
|
56
|
-
type="primary"
|
|
57
|
-
size="small"
|
|
58
|
-
v-if="scope.row.is_enabled == 1"
|
|
59
|
-
@click="backDb(scope.row)"
|
|
60
|
-
>备份</el-button
|
|
61
|
-
>
|
|
62
|
-
</template>
|
|
63
|
-
</el-table-column>
|
|
64
|
-
</el-table>
|
|
65
|
-
<el-dialog
|
|
66
|
-
width="80%"
|
|
67
|
-
v-el-drag-dialog
|
|
68
|
-
title="备份记录"
|
|
69
|
-
:visible.sync="showRecord"
|
|
70
|
-
:close-on-click-modal="false"
|
|
71
|
-
@close="closeRecordDialog"
|
|
72
|
-
>
|
|
73
|
-
<records @close="closeRecordDialog" v-if="showRecord"></records>
|
|
74
|
-
</el-dialog>
|
|
75
|
-
<el-dialog
|
|
76
|
-
width="60%"
|
|
77
|
-
v-el-drag-dialog
|
|
78
|
-
title="备份配置编辑"
|
|
79
|
-
:visible.sync="showUpdateConfig"
|
|
80
|
-
:close-on-click-modal="false"
|
|
81
|
-
@close="closeUpdateConfigDialog"
|
|
82
|
-
>
|
|
83
|
-
<le-backup-sub
|
|
84
|
-
@close="closeUpdateConfigDialog"
|
|
85
|
-
:rowData="detailDb"
|
|
86
|
-
v-if="showUpdateConfig"
|
|
87
|
-
></le-backup-sub>
|
|
88
|
-
</el-dialog>
|
|
89
|
-
</div>
|
|
90
|
-
</template>
|
|
91
|
-
<script>
|
|
92
|
-
import { configList, configUpdate, backup } from "@/api/database";
|
|
93
|
-
import records from "./records.vue";
|
|
94
|
-
import LeBackupSub from "./sub.vue";
|
|
95
|
-
export default {
|
|
96
|
-
name: "le-backup",
|
|
97
|
-
components: {
|
|
98
|
-
records,
|
|
99
|
-
LeBackupSub,
|
|
100
|
-
},
|
|
101
|
-
data() {
|
|
102
|
-
return {
|
|
103
|
-
tableData: [],
|
|
104
|
-
detailDb: {},
|
|
105
|
-
showRecord: false,
|
|
106
|
-
showUpdateConfig: false,
|
|
107
|
-
};
|
|
108
|
-
},
|
|
109
|
-
computed: {},
|
|
110
|
-
mounted() {
|
|
111
|
-
this.list();
|
|
112
|
-
},
|
|
113
|
-
methods: {
|
|
114
|
-
list() {
|
|
115
|
-
configList().then((res) => {
|
|
116
|
-
this.tableData = res.data.data;
|
|
117
|
-
});
|
|
118
|
-
},
|
|
119
|
-
backDb() {
|
|
120
|
-
backup()
|
|
121
|
-
.then((res) => {
|
|
122
|
-
this.$message.success(res.data.info);
|
|
123
|
-
})
|
|
124
|
-
.catch(() => {
|
|
125
|
-
this.$message.success("备份失败");
|
|
126
|
-
});
|
|
127
|
-
},
|
|
128
|
-
backRecord() {
|
|
129
|
-
this.showRecord = true;
|
|
130
|
-
},
|
|
131
|
-
closeRecordDialog() {
|
|
132
|
-
this.showRecord = false;
|
|
133
|
-
},
|
|
134
|
-
closeUpdateConfigDialog() {
|
|
135
|
-
this.showUpdateConfig = false;
|
|
136
|
-
},
|
|
137
|
-
statusChange(item) {
|
|
138
|
-
item.is_enabled = !item.is_enabled;
|
|
139
|
-
if (item.is_enabled) {
|
|
140
|
-
item.is_enabled = 1;
|
|
141
|
-
} else {
|
|
142
|
-
item.is_enabled = 0;
|
|
143
|
-
}
|
|
144
|
-
configUpdate(item).then((res) => {
|
|
145
|
-
this.$message.success(res.data.info);
|
|
146
|
-
});
|
|
147
|
-
},
|
|
148
|
-
btnEabelText(item) {
|
|
149
|
-
if (item.is_enabled) {
|
|
150
|
-
return "停用";
|
|
151
|
-
}
|
|
152
|
-
return "启用";
|
|
153
|
-
},
|
|
154
|
-
openEditWindow(item) {
|
|
155
|
-
this.detailDb = item;
|
|
156
|
-
this.showUpdateConfig = true;
|
|
157
|
-
},
|
|
158
|
-
},
|
|
159
|
-
};
|
|
160
|
-
</script>
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-table
|
|
4
|
-
:data="tableData"
|
|
5
|
-
border
|
|
6
|
-
row-key="id"
|
|
7
|
-
:header-cell-style="{ 'text-align': 'center' }"
|
|
8
|
-
:cell-style="{ 'text-align': 'center' }"
|
|
9
|
-
stripe
|
|
10
|
-
style="width: 100%"
|
|
11
|
-
>
|
|
12
|
-
<el-table-column prop="bdir" label="备份目录"> </el-table-column>
|
|
13
|
-
<el-table-column prop="bfile" label="备份文件"> </el-table-column>
|
|
14
|
-
<el-table-column prop="bsdate" label="备份开始时间">
|
|
15
|
-
<template slot-scope="scope">
|
|
16
|
-
<span>{{ dateFormat(scope.row.bsdate) }}</span>
|
|
17
|
-
</template>
|
|
18
|
-
</el-table-column>
|
|
19
|
-
<el-table-column prop="bedate" label="备份结束时间">
|
|
20
|
-
<template slot-scope="scope">
|
|
21
|
-
<span>{{ dateFormat(scope.row.bedate) }}</span>
|
|
22
|
-
</template>
|
|
23
|
-
</el-table-column>
|
|
24
|
-
<el-table-column prop="bstatus" label="备份状态">
|
|
25
|
-
<template slot-scope="scope">
|
|
26
|
-
<span v-if="scope.row.bstatus == 0">失败</span>
|
|
27
|
-
<span v-if="scope.row.bstatus == 1">成功</span>
|
|
28
|
-
</template>
|
|
29
|
-
</el-table-column>
|
|
30
|
-
<el-table-column label="操作" align="center" row>
|
|
31
|
-
<template slot-scope="scope">
|
|
32
|
-
<el-button
|
|
33
|
-
id="btndel"
|
|
34
|
-
type="primary"
|
|
35
|
-
size="small"
|
|
36
|
-
v-permission="$route.params.btns"
|
|
37
|
-
@click="btnBackupdel(scope.row)"
|
|
38
|
-
>删除</el-button
|
|
39
|
-
>
|
|
40
|
-
</template>
|
|
41
|
-
</el-table-column>
|
|
42
|
-
</el-table>
|
|
43
|
-
</div>
|
|
44
|
-
</template>
|
|
45
|
-
<script>
|
|
46
|
-
import { backupRecords, backupdel } from "@/api/database";
|
|
47
|
-
import moment from "moment";
|
|
48
|
-
export default {
|
|
49
|
-
data() {
|
|
50
|
-
return {
|
|
51
|
-
tableData: [],
|
|
52
|
-
};
|
|
53
|
-
},
|
|
54
|
-
computed: {},
|
|
55
|
-
mounted() {
|
|
56
|
-
this.list();
|
|
57
|
-
},
|
|
58
|
-
methods: {
|
|
59
|
-
dateFormat(data) {
|
|
60
|
-
if (data) {
|
|
61
|
-
return moment.unix(data).format("YYYY-MM-DD HH:mm:ss");
|
|
62
|
-
} else return "";
|
|
63
|
-
},
|
|
64
|
-
btnBackupdel(item) {
|
|
65
|
-
let params = [];
|
|
66
|
-
params.push(item.id);
|
|
67
|
-
backupdel(params).then((res) => {
|
|
68
|
-
this.list();
|
|
69
|
-
this.$message.success(res.data.info);
|
|
70
|
-
});
|
|
71
|
-
},
|
|
72
|
-
list() {
|
|
73
|
-
backupRecords().then((res) => {
|
|
74
|
-
this.tableData = res.data.data;
|
|
75
|
-
});
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
</script>
|
package/le-backup/src/sub.vue
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-form ref="form" :model="rowData" :rules="rules" label-width="100px">
|
|
3
|
-
<el-form-item label="备份目录" prop="back_dir">
|
|
4
|
-
<el-input v-model="rowData.back_dir"></el-input>
|
|
5
|
-
</el-form-item>
|
|
6
|
-
<el-form-item label="dump目录" prop="mysqldump_dir">
|
|
7
|
-
<el-input v-model="rowData.mysqldump_dir"></el-input>
|
|
8
|
-
</el-form-item>
|
|
9
|
-
<el-form-item label="文件格式" prop="back_formatter">
|
|
10
|
-
<el-input v-model="rowData.back_formatter"></el-input>
|
|
11
|
-
</el-form-item>
|
|
12
|
-
<el-form-item label="文件前缀" prop="back_pre">
|
|
13
|
-
<el-input v-model="rowData.back_pre"></el-input>
|
|
14
|
-
</el-form-item>
|
|
15
|
-
<el-form-item label="文件后缀" prop="back_suf">
|
|
16
|
-
<el-input v-model="rowData.back_suf"></el-input>
|
|
17
|
-
</el-form-item>
|
|
18
|
-
<el-form-item>
|
|
19
|
-
<el-button type="primary" @click="onSubmit">保存</el-button>
|
|
20
|
-
</el-form-item>
|
|
21
|
-
</el-form>
|
|
22
|
-
</template>
|
|
23
|
-
<script>
|
|
24
|
-
import { configUpdate } from "@/api/database";
|
|
25
|
-
|
|
26
|
-
export default {
|
|
27
|
-
name: "le-backup-sub",
|
|
28
|
-
props: {
|
|
29
|
-
rowData: {
|
|
30
|
-
type: Object,
|
|
31
|
-
default: () => {},
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
data() {
|
|
36
|
-
return {
|
|
37
|
-
form: {
|
|
38
|
-
id: "",
|
|
39
|
-
back_dir: "",
|
|
40
|
-
mysqldump_dir: "",
|
|
41
|
-
back_pre: "",
|
|
42
|
-
back_suf: "",
|
|
43
|
-
back_formatter: "",
|
|
44
|
-
},
|
|
45
|
-
rules: {
|
|
46
|
-
back_dir: [
|
|
47
|
-
{ required: true, message: "备份目录必须输入", trigger: "blur" },
|
|
48
|
-
{
|
|
49
|
-
min: 1,
|
|
50
|
-
max: 300,
|
|
51
|
-
message: "长度在 1 到 300 个字符",
|
|
52
|
-
trigger: "blur",
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
mysqldump_dir: [
|
|
56
|
-
{ required: true, message: "dump文件位置必须输入", trigger: "blur" },
|
|
57
|
-
{
|
|
58
|
-
min: 1,
|
|
59
|
-
max: 300,
|
|
60
|
-
message: "长度在 1 到 300 个字符",
|
|
61
|
-
trigger: "blur",
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
back_formatter: [
|
|
65
|
-
{ required: true, message: "备份文件格式必须输入", trigger: "blur" },
|
|
66
|
-
{
|
|
67
|
-
max: 20,
|
|
68
|
-
message: "长度在 0 到 20个字符",
|
|
69
|
-
trigger: "blur",
|
|
70
|
-
},
|
|
71
|
-
],
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
},
|
|
75
|
-
mounted() {
|
|
76
|
-
// if (this.$route.params.status === 0 || this.$route.params.status === 0) {
|
|
77
|
-
// this.form.id = this.$route.params.id;
|
|
78
|
-
// this.form.name = this.$route.params.name;
|
|
79
|
-
// this.form.note = this.$route.params.note;
|
|
80
|
-
// this.form.phone = this.$route.params.phone;
|
|
81
|
-
// this.form.title = this.$route.params.title;
|
|
82
|
-
// }
|
|
83
|
-
console.log(this.rowData);
|
|
84
|
-
},
|
|
85
|
-
methods: {
|
|
86
|
-
onSubmit() {
|
|
87
|
-
this.$refs["form"].validate((valid) => {
|
|
88
|
-
if (valid) {
|
|
89
|
-
let param = {
|
|
90
|
-
id: this.rowData.id,
|
|
91
|
-
back_dir: this.rowData.back_dir,
|
|
92
|
-
mysqldump_dir: this.rowData.mysqldump_dir,
|
|
93
|
-
back_pre: this.rowData.back_pre,
|
|
94
|
-
back_suf: this.rowData.back_suf,
|
|
95
|
-
back_formatter: this.rowData.back_formatter,
|
|
96
|
-
};
|
|
97
|
-
configUpdate(param).then((res) => {
|
|
98
|
-
this.$message.success(res.data.info);
|
|
99
|
-
});
|
|
100
|
-
} else {
|
|
101
|
-
return false;
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
};
|
|
107
|
-
</script>
|