@jx3box/jx3box-common-ui 8.3.1 → 8.3.3
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/package.json +4 -4
- package/service/design.js +9 -0
- package/src/Breadcrumb.vue +7 -4
- package/src/bread/AdminDrop.vue +116 -0
- package/src/bread/DesignTask.vue +115 -0
- package/src/header/shop.vue +1 -1
- package/src/header/vip.vue +1 -1
- package/vue.config.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jx3box/jx3box-common-ui",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.3",
|
|
4
4
|
"description": "JX3BOX UI",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@jx3box/jx3box-comment-ui": "^1.8.7",
|
|
34
|
-
"@jx3box/jx3box-common": "^8.2.
|
|
35
|
-
"@jx3box/jx3box-data": "^3.5.
|
|
36
|
-
"@jx3box/jx3box-editor": "^2.1.
|
|
34
|
+
"@jx3box/jx3box-common": "^8.2.11",
|
|
35
|
+
"@jx3box/jx3box-data": "^3.5.8",
|
|
36
|
+
"@jx3box/jx3box-editor": "^2.1.9",
|
|
37
37
|
"@jx3box/reporter": "^0.0.4",
|
|
38
38
|
"axios": "^0.26.1",
|
|
39
39
|
"dayjs": "^1.11.0",
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { $cms } from "@jx3box/jx3box-common/js/https";
|
|
2
|
+
|
|
3
|
+
export const createDesignTask = (data) => {
|
|
4
|
+
return $cms().post(`/api/cms/design/task`, data);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const getDesignTask = (params) => {
|
|
8
|
+
return $cms().get(`/api/cms/design/task/log`, { params });
|
|
9
|
+
}
|
package/src/Breadcrumb.vue
CHANGED
|
@@ -45,9 +45,10 @@
|
|
|
45
45
|
<i class="el-icon-info"></i>
|
|
46
46
|
<span>反馈</span>
|
|
47
47
|
</a>
|
|
48
|
-
<Adminbutton v-if="adminEnable" class="u-admin" />
|
|
49
|
-
<ListAdmin v-if="topicEnable" />
|
|
48
|
+
<!-- <Adminbutton v-if="adminEnable" class="u-admin" /> -->
|
|
49
|
+
<!-- <ListAdmin v-if="topicEnable" /> -->
|
|
50
50
|
<Admin v-if="adminEnable" :marksOptions="adminMarks" :show-extend="showExtend" :app="slug" :subtypeMap="subtypeMap" />
|
|
51
|
+
<AdminDrop v-if="adminEnable" />
|
|
51
52
|
<slot name="op-prepend"></slot>
|
|
52
53
|
</div>
|
|
53
54
|
</div>
|
|
@@ -62,6 +63,7 @@ import Admin from "./bread/Admin";
|
|
|
62
63
|
import Crumb from "./bread/Crumb";
|
|
63
64
|
import Adminbutton from "./bread/Adminbutton";
|
|
64
65
|
import ListAdmin from "./bread/ListAdmin";
|
|
66
|
+
import AdminDrop from "./bread/AdminDrop";
|
|
65
67
|
|
|
66
68
|
import { isApp } from "../assets/js/app.js";
|
|
67
69
|
import Bus from "../service/bus";
|
|
@@ -145,8 +147,9 @@ export default {
|
|
|
145
147
|
components: {
|
|
146
148
|
Admin,
|
|
147
149
|
Crumb,
|
|
148
|
-
Adminbutton,
|
|
149
|
-
ListAdmin,
|
|
150
|
+
// Adminbutton,
|
|
151
|
+
// ListAdmin,
|
|
152
|
+
AdminDrop,
|
|
150
153
|
},
|
|
151
154
|
};
|
|
152
155
|
</script>
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="c-admin-drop">
|
|
3
|
+
<el-dropdown trigger="click" @command="handleCommand">
|
|
4
|
+
<el-button type="primary" class="c-admin-button c-admin-drop__button" :size="buttonSize"
|
|
5
|
+
><i class="el-icon-setting"></i> 管理<i class="el-icon-arrow-down el-icon--right"></i>
|
|
6
|
+
</el-button>
|
|
7
|
+
<el-dropdown-menu slot="dropdown">
|
|
8
|
+
<el-dropdown-item v-if="isEditor" command="toggleAdminPanel" icon="el-icon-setting">
|
|
9
|
+
<span>设置</span>
|
|
10
|
+
</el-dropdown-item>
|
|
11
|
+
<el-dropdown-item v-if="isEditor" command="directMessage" icon="el-icon-message">
|
|
12
|
+
<span>私信</span>
|
|
13
|
+
</el-dropdown-item>
|
|
14
|
+
<el-dropdown-item icon="el-icon-upload" command="designTask">
|
|
15
|
+
<span>推送</span>
|
|
16
|
+
</el-dropdown-item>
|
|
17
|
+
</el-dropdown-menu>
|
|
18
|
+
</el-dropdown>
|
|
19
|
+
|
|
20
|
+
<design-task v-model="showDesignTask" :post="post"></design-task>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
import Bus from "../../service/bus";
|
|
26
|
+
import User from "@jx3box/jx3box-common/js/user";
|
|
27
|
+
import DesignTask from "./DesignTask.vue";
|
|
28
|
+
export default {
|
|
29
|
+
name: "AdminDrop",
|
|
30
|
+
components: {
|
|
31
|
+
DesignTask
|
|
32
|
+
},
|
|
33
|
+
props: {
|
|
34
|
+
buttonSize: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: "medium",
|
|
37
|
+
},
|
|
38
|
+
post: {
|
|
39
|
+
type: Object,
|
|
40
|
+
default: () => {},
|
|
41
|
+
},
|
|
42
|
+
userId: {
|
|
43
|
+
type: Number,
|
|
44
|
+
default: 0,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
data() {
|
|
48
|
+
return {
|
|
49
|
+
showDesignTask: false,
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
computed: {
|
|
53
|
+
isEditor() {
|
|
54
|
+
return User.isEditor();
|
|
55
|
+
},
|
|
56
|
+
sourceId() {
|
|
57
|
+
return this.post?.ID
|
|
58
|
+
},
|
|
59
|
+
sourceType() {
|
|
60
|
+
return this.post?.post_type
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
methods: {
|
|
64
|
+
handleCommand(command) {
|
|
65
|
+
this[command]();
|
|
66
|
+
},
|
|
67
|
+
toggleAdminPanel() {
|
|
68
|
+
Bus.$emit("toggleAdminPanel");
|
|
69
|
+
},
|
|
70
|
+
directMessage() {
|
|
71
|
+
this.$prompt("请输入私信内容", "管理私信", {
|
|
72
|
+
confirmButtonText: "确定",
|
|
73
|
+
cancelButtonText: "取消",
|
|
74
|
+
inputPlaceholder: "请输入私信内容",
|
|
75
|
+
inputValidator: (value) => {
|
|
76
|
+
if (!value) {
|
|
77
|
+
return "请输入私信内容";
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
beforeClose: (action, instance, done) => {
|
|
81
|
+
if (action === "confirm") {
|
|
82
|
+
const data = {
|
|
83
|
+
source_id: this.sourceId,
|
|
84
|
+
source_type: this.sourceType,
|
|
85
|
+
user_id: this.userId,
|
|
86
|
+
content: "运营通知:" + instance.inputValue,
|
|
87
|
+
type: "system",
|
|
88
|
+
subtype: "admin_message"
|
|
89
|
+
};
|
|
90
|
+
sendMessage(data).then(() => {
|
|
91
|
+
this.$message.success("私信成功");
|
|
92
|
+
done();
|
|
93
|
+
})
|
|
94
|
+
} else {
|
|
95
|
+
done();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}).catch(() => {})
|
|
99
|
+
},
|
|
100
|
+
designTask() {
|
|
101
|
+
this.showDesignTask = true;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
</script>
|
|
106
|
+
|
|
107
|
+
<style lang="less">
|
|
108
|
+
.c-admin-drop {
|
|
109
|
+
float: right;
|
|
110
|
+
margin-top: -2px;
|
|
111
|
+
margin-right: 10px;
|
|
112
|
+
}
|
|
113
|
+
.c-admin-drop__button {
|
|
114
|
+
padding: 8px 18px !important;
|
|
115
|
+
}
|
|
116
|
+
</style>
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog custom-class="m-design-task" :visible="modelValue" @close="close" title="快捷推送" append-to-body>
|
|
3
|
+
<el-form :model="form" :rules="rules" ref="form" label-position="left" label-width="80px">
|
|
4
|
+
<el-form-item label="标题" required>
|
|
5
|
+
<el-input v-model="form.title" placeholder="请输入标题"></el-input>
|
|
6
|
+
</el-form-item>
|
|
7
|
+
<el-form-item label="备注">
|
|
8
|
+
<el-input v-model="form.remark" placeholder="请输入备注"></el-input>
|
|
9
|
+
</el-form-item>
|
|
10
|
+
<el-form-item label="星级" class="m-star-line">
|
|
11
|
+
<el-rate v-model="form.star" :colors="colors"></el-rate>
|
|
12
|
+
</el-form-item>
|
|
13
|
+
</el-form>
|
|
14
|
+
<template #footer>
|
|
15
|
+
<el-button @click="close">取 消</el-button>
|
|
16
|
+
<el-button type="primary" @click="onConfirm">确 定</el-button>
|
|
17
|
+
</template>
|
|
18
|
+
</el-dialog>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
import { createDesignTask, getDesignTask } from "../../service/design";
|
|
23
|
+
import {pick} from "lodash";
|
|
24
|
+
export default {
|
|
25
|
+
name: "DesignTask",
|
|
26
|
+
props: {
|
|
27
|
+
modelValue: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false
|
|
30
|
+
},
|
|
31
|
+
post: {
|
|
32
|
+
type: Object,
|
|
33
|
+
default: () => {}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
model: {
|
|
37
|
+
prop: "modelValue",
|
|
38
|
+
event: "update:modelValue"
|
|
39
|
+
},
|
|
40
|
+
emits: ["update:modelValue"],
|
|
41
|
+
data() {
|
|
42
|
+
return {
|
|
43
|
+
form: {
|
|
44
|
+
title: "",
|
|
45
|
+
remark: "",
|
|
46
|
+
star: 0,
|
|
47
|
+
},
|
|
48
|
+
colors: ['#99A9BF', '#F7BA2A', '#FF9900'],
|
|
49
|
+
|
|
50
|
+
logs: [],
|
|
51
|
+
rules: {
|
|
52
|
+
title: [
|
|
53
|
+
{ required: true, message: "请输入标题", trigger: "blur" },
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
watch: {
|
|
59
|
+
modelValue(val) {
|
|
60
|
+
if (val) {
|
|
61
|
+
this.loadLogs();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
methods: {
|
|
66
|
+
close(){
|
|
67
|
+
this.$emit("update:modelValue",false)
|
|
68
|
+
},
|
|
69
|
+
clearForm() {
|
|
70
|
+
this.form = {
|
|
71
|
+
title: "",
|
|
72
|
+
remark: "",
|
|
73
|
+
star: 0,
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
this.$refs?.form?.clearValidate();
|
|
77
|
+
},
|
|
78
|
+
onConfirm() {
|
|
79
|
+
if (!this.post?.ID) return;
|
|
80
|
+
const data = pick(this.post, ["client", "author"]);
|
|
81
|
+
data.title = this.form.title;
|
|
82
|
+
data.remark = this.form.remark;
|
|
83
|
+
data.star = this.form.star;
|
|
84
|
+
data.source_type = this.post?.post_type;
|
|
85
|
+
data.source_id = this.post?.ID;
|
|
86
|
+
data.link = `/${this.post?.post_type}/${this.post?.ID}`;
|
|
87
|
+
data.flow = 0;
|
|
88
|
+
|
|
89
|
+
createDesignTask(data).then(() => {
|
|
90
|
+
this.$message.success("提交成功");
|
|
91
|
+
this.close();
|
|
92
|
+
})
|
|
93
|
+
},
|
|
94
|
+
onCancel() {
|
|
95
|
+
this.close();
|
|
96
|
+
this.clearForm();
|
|
97
|
+
},
|
|
98
|
+
loadLogs() {
|
|
99
|
+
getDesignTask().then(res => {
|
|
100
|
+
this.logs = res.data.data || [];
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
</script>
|
|
106
|
+
|
|
107
|
+
<style lang="less">
|
|
108
|
+
.m-design-task {
|
|
109
|
+
.m-star-line {
|
|
110
|
+
.el-form-item__content {
|
|
111
|
+
top: 10px;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
</style>
|
package/src/header/shop.vue
CHANGED
package/src/header/vip.vue
CHANGED
package/vue.config.js
CHANGED
|
@@ -98,7 +98,7 @@ module.exports = {
|
|
|
98
98
|
.rule("images")
|
|
99
99
|
.use("url-loader")
|
|
100
100
|
.loader("url-loader")
|
|
101
|
-
.tap((options) => Object.assign(options, { limit: 10240 }));
|
|
101
|
+
.tap((options) => Object.assign(options, { limit: 10240, esModule: false }));
|
|
102
102
|
|
|
103
103
|
//💝 in-line svg imgs ~
|
|
104
104
|
config.module
|