xyvcard-ste 0.0.2 → 0.0.4
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/dist/_plugin-vue_export-helper-BH6JvfR0.mjs +150 -0
- package/dist/edit-BINVNgun.mjs +2477 -0
- package/dist/edit-DYItKRnD.mjs +177 -0
- package/dist/index-BZ5uA6Yl.mjs +363 -0
- package/dist/{index-C5DhiXL9.mjs → index-GUZGhsDl.mjs} +2 -2
- package/dist/index.mjs +4 -2
- package/dist/style.css +1 -1
- package/dts/src/api/ste/dict.d.ts +4 -0
- package/dts/src/api/ste/index.d.ts +2 -0
- package/dts/src/api/ste/ste-question-category/index.d.ts +2 -6
- package/dts/src/api/ste/ste-question-category/types.d.ts +10 -2
- package/dts/src/api/ste/ste-questions/index.d.ts +1 -7
- package/dts/src/lang/ste/zh-cn.d.ts +2 -0
- package/dts/src/utils/returnBizLay.d.ts +2 -0
- package/dts/src/views/ste/ste-question-category/edit.vue.d.ts +1 -1
- package/dts/src/views/ste/ste-questions/edit.vue.d.ts +1 -1
- package/package.json +2 -1
- package/dist/_plugin-vue_export-helper-Dwa-kS_k.mjs +0 -1444
- package/dist/constant-CZS4pAOH.mjs +0 -17
- package/dist/edit-ZDEt7oQ4.mjs +0 -1043
- package/dist/edit-dr3RT3zy.mjs +0 -315
- package/dist/index-CYNy3sEq.mjs +0 -398
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var d = (s, t, e) => t in s ? m(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
|
+
var r = (s, t, e) => d(s, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { ref as y } from "vue";
|
|
5
|
+
import { useUserStore as i, clearEmpty as o, request as u, BizLayDict as g, EnumDict as p, CustomBizDict as v } from "jmash-core";
|
|
6
|
+
class E {
|
|
7
|
+
getKey(t) {
|
|
8
|
+
return {
|
|
9
|
+
categoryId: t.categoryId
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
// 查询翻页信息题库分类
|
|
13
|
+
// findPage(query?: QuestionCategoryReq): AxiosPromise<QuestionCategoryPage> {
|
|
14
|
+
// const tenant=useUserStore().user.tenant;
|
|
15
|
+
// clearEmpty(query);
|
|
16
|
+
// return request({
|
|
17
|
+
// url: "/v1/ste/question_category/page/"+tenant,
|
|
18
|
+
// method: "get",
|
|
19
|
+
// params: query,
|
|
20
|
+
// });
|
|
21
|
+
// }
|
|
22
|
+
// 查询列表信息题库分类
|
|
23
|
+
findList(t) {
|
|
24
|
+
const e = i().user.tenant;
|
|
25
|
+
return o(t), u({
|
|
26
|
+
url: "/v1/ste/question_category/list/" + e,
|
|
27
|
+
method: "get",
|
|
28
|
+
params: t
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
// 查询题库分类
|
|
32
|
+
findById(t) {
|
|
33
|
+
const e = i().user.tenant;
|
|
34
|
+
return o(t), u({
|
|
35
|
+
url: "/v1/ste/question_category/id/" + e + "/" + t.categoryId,
|
|
36
|
+
method: "get"
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
// 题库分类树形列表
|
|
40
|
+
findQuestionTreeListApi(t) {
|
|
41
|
+
return o(t), u({
|
|
42
|
+
url: "/v1/ste/question_category/treelist",
|
|
43
|
+
method: "get",
|
|
44
|
+
params: t
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
// 创建实体题库分类
|
|
48
|
+
create(t) {
|
|
49
|
+
return t.tenant = i().user.tenant, o(t), u({
|
|
50
|
+
url: "/v1/ste/question_category",
|
|
51
|
+
method: "post",
|
|
52
|
+
data: t
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
// 修改实体题库分类
|
|
56
|
+
update(t) {
|
|
57
|
+
return t.tenant = i().user.tenant, o(t), u({
|
|
58
|
+
url: "/v1/ste/question_category",
|
|
59
|
+
method: "patch",
|
|
60
|
+
data: t
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
// 上移下移
|
|
64
|
+
move(t, e) {
|
|
65
|
+
let n = { ...t };
|
|
66
|
+
return n.tenant = i().user.tenant, n.up = e, o(n), u({
|
|
67
|
+
url: "/v1/ste/question_category/move",
|
|
68
|
+
method: "put",
|
|
69
|
+
data: n
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
// 启用/禁用
|
|
73
|
+
// enable(key: QuestionCategoryKey, enable: boolean): AxiosPromise<boolean> {
|
|
74
|
+
// let data: QuestionCategoryEnableKey = { ...key };
|
|
75
|
+
// data.tenant = useUserStore().user.tenant;
|
|
76
|
+
// data.enable = enable;
|
|
77
|
+
// clearEmpty(data);
|
|
78
|
+
// return request({
|
|
79
|
+
// url: "/v1/ste/question_category/enable",
|
|
80
|
+
// method: "put",
|
|
81
|
+
// data: data,
|
|
82
|
+
// });
|
|
83
|
+
// }
|
|
84
|
+
// 删除题库分类
|
|
85
|
+
delete(t) {
|
|
86
|
+
return t.tenant = i().user.tenant, o(t), u({
|
|
87
|
+
url: "/v1/ste/question_category/id",
|
|
88
|
+
method: "delete",
|
|
89
|
+
params: t
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
// 批量删除题库分类
|
|
93
|
+
batchDelete(t) {
|
|
94
|
+
const e = t.map((c) => c.categoryId), n = {
|
|
95
|
+
tenant: i().user.tenant,
|
|
96
|
+
categoryId: e
|
|
97
|
+
};
|
|
98
|
+
return o(n), u({
|
|
99
|
+
url: "/v1/ste/question_category/batch",
|
|
100
|
+
method: "put",
|
|
101
|
+
data: n
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
const h = new E();
|
|
106
|
+
class a {
|
|
107
|
+
}
|
|
108
|
+
//模块
|
|
109
|
+
r(a, "MODULE_STE", "ste"), // 题型
|
|
110
|
+
r(a, "QUESTION_TYPE", "xyvcard.ste.protobuf.QuestionType"), // 难易级别
|
|
111
|
+
r(a, "COMPLEXITY", "xyvcard.ste.protobuf.ComplexityLevel"), // 启用禁用
|
|
112
|
+
r(a, "ENABLE", y([
|
|
113
|
+
{ key: !0, value: "启用" },
|
|
114
|
+
{ key: !1, value: "禁用" }
|
|
115
|
+
]));
|
|
116
|
+
class _ extends g {
|
|
117
|
+
// 实现 useValues 方法
|
|
118
|
+
useValues() {
|
|
119
|
+
return new Promise((t, e) => {
|
|
120
|
+
const n = { tenant: i().user.tenant };
|
|
121
|
+
h.findQuestionTreeListApi(n).then(({ data: c }) => {
|
|
122
|
+
this.values.length = 0, this.values.push(...c.results), t(this.values);
|
|
123
|
+
}).catch(e);
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
class l {
|
|
128
|
+
}
|
|
129
|
+
// 题型
|
|
130
|
+
r(l, "quTypeEnum", new p(
|
|
131
|
+
a.MODULE_STE,
|
|
132
|
+
a.QUESTION_TYPE
|
|
133
|
+
)), // 难易级别
|
|
134
|
+
r(l, "complexityEnum", new p(
|
|
135
|
+
a.MODULE_STE,
|
|
136
|
+
a.COMPLEXITY
|
|
137
|
+
)), // 启用禁用
|
|
138
|
+
r(l, "enable", new v(a.ENABLE, {})), // 题库树形分类
|
|
139
|
+
r(l, "questionCategoryTree", new _({}));
|
|
140
|
+
const I = (s, t) => {
|
|
141
|
+
const e = s.__vccOpts || s;
|
|
142
|
+
for (const [n, c] of t)
|
|
143
|
+
e[n] = c;
|
|
144
|
+
return e;
|
|
145
|
+
};
|
|
146
|
+
export {
|
|
147
|
+
l as D,
|
|
148
|
+
I as _,
|
|
149
|
+
h as q
|
|
150
|
+
};
|