leisure-core 0.6.83 → 0.6.86
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 +22 -38
- package/le-media/src/main.vue +28 -3
- package/le-media-list/src/main.vue +6 -2
- package/le-media-upload/src/main.vue +26 -8
- 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-button-select-media/index.js +0 -7
- package/le-button-select-media/src/main.vue +0 -74
- package/le-button-upload/index.js +0 -7
- package/le-button-upload/src/main.vue +0 -50
- package/le-image-container/index.js +0 -7
- package/le-image-container/src/main.vue +0 -155
- 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
|
-
|
|
22
|
-
import LeButtonUpload from "./le-button-upload/index.js";
|
|
23
|
-
import LeButtonSelectMedia from "./le-button-select-media/index.js";
|
|
18
|
+
|
|
19
|
+
// import LeButtonUpload from "./le-button-upload/index.js";
|
|
20
|
+
// import LeButtonSelectMedia from "./le-button-select-media/index.js";
|
|
24
21
|
import LeImage from "./le-image/index.js";
|
|
25
|
-
import LeImageContainer from "./le-image-container/index.js";
|
|
26
|
-
|
|
22
|
+
// import LeImageContainer from "./le-image-container/index.js";
|
|
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
|
-
|
|
71
|
-
LeButtonUpload,
|
|
72
|
-
LeButtonSelectMedia,
|
|
73
|
-
LeImageContainer,
|
|
62
|
+
|
|
63
|
+
// LeButtonUpload,
|
|
64
|
+
// LeButtonSelectMedia,
|
|
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
|
-
|
|
188
|
-
LeButtonUpload,
|
|
189
|
-
LeButtonSelectMedia,
|
|
190
|
-
LeImageContainer,
|
|
175
|
+
|
|
176
|
+
// LeButtonUpload,
|
|
177
|
+
// LeButtonSelectMedia,
|
|
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/le-media/src/main.vue
CHANGED
|
@@ -79,16 +79,41 @@
|
|
|
79
79
|
v-if="uploadMediaShow"
|
|
80
80
|
@cancel="cancelUploadMedia"
|
|
81
81
|
:mediaObj="mediaObj"
|
|
82
|
+
:systemMaterialCreateApi="systemMaterialCreateApi"
|
|
83
|
+
:systemMaterialEditApi="systemMaterialEditApi"
|
|
84
|
+
:uploadFileApi="uploadFileApi"
|
|
82
85
|
></le-media-upload>
|
|
83
86
|
</el-dialog>
|
|
84
87
|
</div>
|
|
85
88
|
</template>
|
|
86
89
|
<script>
|
|
87
|
-
import { systemMaterialDel, systemMaterialList } from "@/api/media";
|
|
90
|
+
// import { systemMaterialDel, systemMaterialList } from "@/api/media";
|
|
88
91
|
import { mapGetters } from "vuex";
|
|
89
92
|
|
|
90
93
|
export default {
|
|
91
94
|
name: "le-media",
|
|
95
|
+
props: {
|
|
96
|
+
systemMaterialDelApi: {
|
|
97
|
+
type: Function,
|
|
98
|
+
required: true,
|
|
99
|
+
},
|
|
100
|
+
systemMaterialListApi: {
|
|
101
|
+
type: Function,
|
|
102
|
+
required: true,
|
|
103
|
+
},
|
|
104
|
+
systemMaterialCreateApi: {
|
|
105
|
+
type: Function,
|
|
106
|
+
required: true,
|
|
107
|
+
},
|
|
108
|
+
systemMaterialEditApi: {
|
|
109
|
+
type: Function,
|
|
110
|
+
required: true,
|
|
111
|
+
},
|
|
112
|
+
uploadFileApi: {
|
|
113
|
+
type: Function,
|
|
114
|
+
required: true,
|
|
115
|
+
},
|
|
116
|
+
},
|
|
92
117
|
data() {
|
|
93
118
|
return {
|
|
94
119
|
tableData: [],
|
|
@@ -124,7 +149,7 @@ export default {
|
|
|
124
149
|
type: "error",
|
|
125
150
|
})
|
|
126
151
|
.then(() => {
|
|
127
|
-
|
|
152
|
+
this.systemMaterialDelApi({ id: id }).then((res) => {
|
|
128
153
|
this.list();
|
|
129
154
|
if (res.data.code == "10000") {
|
|
130
155
|
this.$message.success("删除成功");
|
|
@@ -166,7 +191,7 @@ export default {
|
|
|
166
191
|
group: this.group,
|
|
167
192
|
title: this.title,
|
|
168
193
|
};
|
|
169
|
-
|
|
194
|
+
this.systemMaterialListApi(params).then((res) => {
|
|
170
195
|
if (res.data.code == "10000") {
|
|
171
196
|
this.mediaList = res.data.data.list;
|
|
172
197
|
this.total = res.data.data.count;
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
</div>
|
|
84
84
|
</template>
|
|
85
85
|
<script>
|
|
86
|
-
import { systemMaterialList } from "@/api/media";
|
|
86
|
+
// import { systemMaterialList } from "@/api/media";
|
|
87
87
|
import leMixins from "../../le-libs/mixins/main"; //
|
|
88
88
|
export default {
|
|
89
89
|
name: "le-media-list",
|
|
@@ -93,6 +93,10 @@ export default {
|
|
|
93
93
|
type: Boolean,
|
|
94
94
|
default: true,
|
|
95
95
|
},
|
|
96
|
+
systemMaterialListApi: {
|
|
97
|
+
type: Function,
|
|
98
|
+
required: true,
|
|
99
|
+
},
|
|
96
100
|
},
|
|
97
101
|
data() {
|
|
98
102
|
return {
|
|
@@ -146,7 +150,7 @@ export default {
|
|
|
146
150
|
title: this.title,
|
|
147
151
|
types: this.types,
|
|
148
152
|
};
|
|
149
|
-
|
|
153
|
+
this.systemMaterialListApi(params).then((res) => {
|
|
150
154
|
if (res.data.code == "10000") {
|
|
151
155
|
this.resultData = res.data.data.list;
|
|
152
156
|
this.total = res.data.data.count;
|
|
@@ -98,11 +98,29 @@
|
|
|
98
98
|
</el-form>
|
|
99
99
|
</template>
|
|
100
100
|
<script>
|
|
101
|
-
import { uploadFile } from "@/api/upload";
|
|
102
|
-
import { systemMaterialCreate, systemMaterialEdit } from "@/api/media";
|
|
101
|
+
// import { uploadFile } from "@/api/upload";
|
|
102
|
+
// import { systemMaterialCreate, systemMaterialEdit } from "@/api/media";
|
|
103
103
|
export default {
|
|
104
104
|
name: "le-media-upload",
|
|
105
|
-
props: ["mediaObj"],
|
|
105
|
+
// props: ["mediaObj"],
|
|
106
|
+
props: {
|
|
107
|
+
mediaObj: {
|
|
108
|
+
type: Object,
|
|
109
|
+
required: true,
|
|
110
|
+
},
|
|
111
|
+
systemMaterialCreateApi: {
|
|
112
|
+
type: Function,
|
|
113
|
+
required: true,
|
|
114
|
+
},
|
|
115
|
+
systemMaterialEditApi: {
|
|
116
|
+
type: Function,
|
|
117
|
+
required: true,
|
|
118
|
+
},
|
|
119
|
+
uploadFileApi: {
|
|
120
|
+
type: Function,
|
|
121
|
+
required: true,
|
|
122
|
+
},
|
|
123
|
+
},
|
|
106
124
|
data() {
|
|
107
125
|
return {
|
|
108
126
|
form: {
|
|
@@ -164,7 +182,7 @@ export default {
|
|
|
164
182
|
}
|
|
165
183
|
} else {
|
|
166
184
|
this.$message.error(
|
|
167
|
-
"请上传素材" + (this.form.types == 1 ? "图片" : "视频")
|
|
185
|
+
"请上传素材" + (this.form.types == 1 ? "图片" : "视频"),
|
|
168
186
|
);
|
|
169
187
|
}
|
|
170
188
|
},
|
|
@@ -196,7 +214,7 @@ export default {
|
|
|
196
214
|
this.$message.error("上传图片总大小不能超过 100MB!");
|
|
197
215
|
return;
|
|
198
216
|
}
|
|
199
|
-
|
|
217
|
+
this.uploadFileApi(formData).then((res) => {
|
|
200
218
|
let address = res.data.data;
|
|
201
219
|
if (address && address.length > 0) {
|
|
202
220
|
if (this.form.id) {
|
|
@@ -223,7 +241,7 @@ export default {
|
|
|
223
241
|
this.$message.error("上传视频总大小不能超过 100MB!");
|
|
224
242
|
return;
|
|
225
243
|
}
|
|
226
|
-
|
|
244
|
+
this.uploadFileApi(formData).then((res) => {
|
|
227
245
|
let address = res.data.data;
|
|
228
246
|
if (address && address.length > 0) {
|
|
229
247
|
if (this.form.id) {
|
|
@@ -245,7 +263,7 @@ export default {
|
|
|
245
263
|
};
|
|
246
264
|
this.$refs["ruleForm"].validate((valid) => {
|
|
247
265
|
if (valid) {
|
|
248
|
-
|
|
266
|
+
this.systemMaterialCreateApi(params).then((res) => {
|
|
249
267
|
if (res.data.code == "10000") {
|
|
250
268
|
this.$emit("callMdiaUrl", urls);
|
|
251
269
|
this.$message.success("创建素材成功");
|
|
@@ -276,7 +294,7 @@ export default {
|
|
|
276
294
|
};
|
|
277
295
|
this.$refs["ruleForm"].validate((valid) => {
|
|
278
296
|
if (valid) {
|
|
279
|
-
|
|
297
|
+
this.systemMaterialEditApi(params).then((res) => {
|
|
280
298
|
if (res.data.code == "10000") {
|
|
281
299
|
this.$emit("callMdiaUrl", urls);
|
|
282
300
|
this.$message.success("修改素材成功");
|
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>
|