zsysview 0.1.34 → 0.1.37

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.
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, reactive, onMounted, resolveComponent, createElementBlock, openBlock, Fragment, createVNode, createElementVNode, withCtx, createTextVNode, createCommentVNode } from "vue";
2
- import { H as HttpApiV1, i as _sfc_main$1, k as _sfc_main$2, Z as ZSYSMessage } from "./index-AWs6yDvi.js";
2
+ import { H as HttpApiV1, i as _sfc_main$1, k as _sfc_main$2, Z as ZSYSMessage } from "./index-AG3yhDG9.js";
3
3
  const _hoisted_1 = { style: { padding: "0px 20px" } }, _hoisted_2 = { key: 0 }, _hoisted_3 = { key: 0 }, _sfc_main = /* @__PURE__ */ defineComponent({
4
4
  __name: "backup",
5
5
  setup(__props) {
@@ -1,5 +1,5 @@
1
1
  import { resolveComponent, createElementBlock, openBlock, Fragment, createVNode, createElementVNode, withCtx } from "vue";
2
- import { _ as _export_sfc } from "./index-AWs6yDvi.js";
2
+ import { _ as _export_sfc } from "./index-AG3yhDG9.js";
3
3
  const _sfc_main = {}, _hoisted_1 = { style: { padding: "0px 20px", "margin-top": "20px" } };
4
4
  function _sfc_render(_ctx, _cache) {
5
5
  const _component_breadcrumb = resolveComponent("breadcrumb"), _component_el_result = resolveComponent("el-result");
@@ -0,0 +1,17 @@
1
+ import { defineComponent, createElementBlock, openBlock, Fragment, createVNode, createElementVNode } from "vue";
2
+ import { i as _sfc_main$1 } from "./index-AG3yhDG9.js";
3
+ import { _ as _sfc_main$2 } from "./change_password_panel.vue_vue_type_script_setup_true_lang-AKEQjIc3.js";
4
+ const _hoisted_1 = { style: { padding: "0px 20px", "margin-top": "20px" } }, _sfc_main = /* @__PURE__ */ defineComponent({
5
+ __name: "change_password",
6
+ setup(__props) {
7
+ return (_ctx, _cache) => (openBlock(), createElementBlock(Fragment, null, [
8
+ createVNode(_sfc_main$1),
9
+ createElementVNode("div", _hoisted_1, [
10
+ createVNode(_sfc_main$2)
11
+ ])
12
+ ], 64));
13
+ }
14
+ });
15
+ export {
16
+ _sfc_main as default
17
+ };
@@ -0,0 +1,186 @@
1
+ import { defineComponent, ref, reactive, onMounted, resolveComponent, createBlock, openBlock, withCtx, createCommentVNode, createVNode, createElementVNode, createTextVNode } from "vue";
2
+ import { e as useRouter, Z as ZSYSMessage, H as HttpApiV1 } from "./index-AG3yhDG9.js";
3
+ import { h } from "./index.es-DrN1BLo5.js";
4
+ const _hoisted_1 = ["src"], _sfc_main = /* @__PURE__ */ defineComponent({
5
+ __name: "change_password_panel",
6
+ props: {
7
+ after_login: { type: Boolean, default: !0 },
8
+ //预选数据
9
+ username: { type: String, default: "" },
10
+ old_p: { type: String, default: "" }
11
+ },
12
+ setup(__props) {
13
+ const props = __props, ruleFormRef = ref(), r = useRouter(), goBack = () => {
14
+ r.back();
15
+ }, view = reactive({
16
+ isloading: !1,
17
+ b64Captcha: ""
18
+ }), form_data = reactive({
19
+ username: "",
20
+ old_p: "",
21
+ new_p1: "",
22
+ new_p2: "",
23
+ vid: "",
24
+ v: ""
25
+ });
26
+ props.username != "" && (form_data.username = props.username), props.old_p != "" && (form_data.old_p = props.old_p);
27
+ const rules = reactive({
28
+ old_p: [{ required: !0, message: "请输入旧密码", trigger: "blur" }],
29
+ new_p1: [
30
+ { required: !0, message: "请输入新密码", trigger: "blur" },
31
+ { min: 6, max: 18, message: "密码长度为6-18位", trigger: "blur" }
32
+ ],
33
+ new_p2: [
34
+ { required: !0, message: "请输入新密码", trigger: "blur" },
35
+ { min: 6, max: 18, message: "密码长度为6-18位", trigger: "blur" }
36
+ ]
37
+ }), submitForm = (formEl) => {
38
+ formEl && formEl.validate((valid) => {
39
+ if (valid) {
40
+ if (form_data.new_p1 != form_data.new_p2) {
41
+ ZSYSMessage.ShowError("两次密码不一致,请重新输入");
42
+ return;
43
+ }
44
+ view.isloading = !0, props.after_login ? HttpApiV1.Post(HttpApiV1.url_change_password, {
45
+ old_p: h.hashStr(form_data.old_p),
46
+ new_p: h.hashStr(form_data.new_p1)
47
+ }).then((res) => {
48
+ res.IsSuccess ? (ZSYSMessage.ShowSuccess("密码修改成功"), r.back()) : ZSYSMessage.ShowError(res.message);
49
+ }).catch((err) => {
50
+ console.log(err);
51
+ }).finally(() => {
52
+ view.isloading = !1;
53
+ }) : HttpApiV1.Post(HttpApiV1.url_user_change_pwd_by_username, {
54
+ username: props.username,
55
+ old_p: h.hashStr(form_data.old_p),
56
+ new_p: h.hashStr(form_data.new_p1),
57
+ vid: form_data.vid,
58
+ v: form_data.v
59
+ }).then((res) => {
60
+ res.IsSuccess ? (ZSYSMessage.ShowSuccess("修改成功,请用新密码登录"), setTimeout(() => {
61
+ location.href = "/";
62
+ }, 1500)) : ZSYSMessage.ShowError(res.message);
63
+ }).catch((err) => {
64
+ console.log(err);
65
+ }).finally(() => {
66
+ view.isloading = !1;
67
+ });
68
+ } else
69
+ console.log("error submit!");
70
+ });
71
+ };
72
+ async function getVC() {
73
+ let res = await HttpApiV1.Post(HttpApiV1.url_user_change_pwd_by_username_vc, {});
74
+ if (res.IsSuccess) {
75
+ let data = res.data;
76
+ form_data.vid = data.key, view.b64Captcha = data.b64Captcha;
77
+ }
78
+ }
79
+ return onMounted(() => {
80
+ getVC();
81
+ }), (_ctx, _cache) => {
82
+ const _component_el_input = resolveComponent("el-input"), _component_el_form_item = resolveComponent("el-form-item"), _component_el_button = resolveComponent("el-button"), _component_el_form = resolveComponent("el-form");
83
+ return openBlock(), createBlock(_component_el_form, {
84
+ ref_key: "ruleFormRef",
85
+ ref: ruleFormRef,
86
+ "label-width": "auto",
87
+ style: { "max-width": "400px", "margin-left": "80px" },
88
+ rules,
89
+ model: form_data,
90
+ "status-icon": ""
91
+ }, {
92
+ default: withCtx(() => [
93
+ props.after_login ? (openBlock(), createBlock(_component_el_form_item, {
94
+ key: 0,
95
+ label: "旧密码",
96
+ prop: "old_p"
97
+ }, {
98
+ default: withCtx(() => [
99
+ createVNode(_component_el_input, {
100
+ modelValue: form_data.old_p,
101
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => form_data.old_p = $event),
102
+ size: "large",
103
+ "show-password": ""
104
+ }, null, 8, ["modelValue"])
105
+ ]),
106
+ _: 1
107
+ })) : createCommentVNode("", !0),
108
+ createVNode(_component_el_form_item, {
109
+ label: "新密码",
110
+ prop: "new_p1"
111
+ }, {
112
+ default: withCtx(() => [
113
+ createVNode(_component_el_input, {
114
+ modelValue: form_data.new_p1,
115
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => form_data.new_p1 = $event),
116
+ size: "large",
117
+ "show-password": ""
118
+ }, null, 8, ["modelValue"])
119
+ ]),
120
+ _: 1
121
+ }),
122
+ createVNode(_component_el_form_item, {
123
+ label: "再次输入新密码",
124
+ prop: "new_p2"
125
+ }, {
126
+ default: withCtx(() => [
127
+ createVNode(_component_el_input, {
128
+ modelValue: form_data.new_p2,
129
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => form_data.new_p2 = $event),
130
+ size: "large",
131
+ "show-password": ""
132
+ }, null, 8, ["modelValue"])
133
+ ]),
134
+ _: 1
135
+ }),
136
+ createVNode(_component_el_form_item, { label: "验证码" }, {
137
+ default: withCtx(() => [
138
+ createVNode(_component_el_input, {
139
+ size: "large",
140
+ modelValue: form_data.v,
141
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => form_data.v = $event),
142
+ clearable: "",
143
+ style: { width: "150px" }
144
+ }, null, 8, ["modelValue"]),
145
+ createElementVNode("img", {
146
+ src: view.b64Captcha,
147
+ style: { height: "40px", width: "100px", "margin-left": "4px", cursor: "pointer" },
148
+ onClick: getVC
149
+ }, null, 8, _hoisted_1)
150
+ ]),
151
+ _: 1
152
+ }),
153
+ createVNode(_component_el_form_item, { style: { "margin-left": "120px" } }, {
154
+ default: withCtx(() => [
155
+ createVNode(_component_el_button, {
156
+ type: "primary",
157
+ onClick: _cache[4] || (_cache[4] = ($event) => submitForm(ruleFormRef.value)),
158
+ loading: view.isloading
159
+ }, {
160
+ default: withCtx(() => [..._cache[5] || (_cache[5] = [
161
+ createTextVNode("确认修改", -1)
162
+ ])]),
163
+ _: 1
164
+ }, 8, ["loading"]),
165
+ props.after_login ? (openBlock(), createBlock(_component_el_button, {
166
+ key: 0,
167
+ onClick: goBack,
168
+ disabled: view.isloading
169
+ }, {
170
+ default: withCtx(() => [..._cache[6] || (_cache[6] = [
171
+ createTextVNode("返回", -1)
172
+ ])]),
173
+ _: 1
174
+ }, 8, ["disabled"])) : createCommentVNode("", !0)
175
+ ]),
176
+ _: 1
177
+ })
178
+ ]),
179
+ _: 1
180
+ }, 8, ["rules", "model"]);
181
+ };
182
+ }
183
+ });
184
+ export {
185
+ _sfc_main as _
186
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, watch, reactive, resolveComponent, resolveDirective, createBlock, openBlock, withCtx, withDirectives, withModifiers, createVNode, createElementVNode, createCommentVNode, createTextVNode, onMounted, onUnmounted, createElementBlock, Fragment, unref } from "vue";
2
- import { z as zsysEventBus, l as useMagicKeys, w as whenever, H as HttpApiV1, Z as ZSYSMessage, i as _sfc_main$2, n as refresh_default, m as _sfc_main$3 } from "./index-AWs6yDvi.js";
2
+ import { z as zsysEventBus, l as useMagicKeys, w as whenever, H as HttpApiV1, Z as ZSYSMessage, i as _sfc_main$2, p as refresh_default, m as _sfc_main$3 } from "./index-AG3yhDG9.js";
3
3
  const _hoisted_1$1 = { style: { display: "flex", "justify-content": "right" } }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
4
4
  __name: "department_edit_dialog",
5
5
  props: {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, reactive, onMounted, resolveComponent, createElementBlock, openBlock, Fragment, createVNode, createElementVNode, withCtx, createTextVNode, toDisplayString } from "vue";
2
- import { i as _sfc_main$1 } from "./index-AWs6yDvi.js";
2
+ import { i as _sfc_main$1 } from "./index-AG3yhDG9.js";
3
3
  const _hoisted_1 = { style: { padding: "0px 20px" } }, _sfc_main = /* @__PURE__ */ defineComponent({
4
4
  __name: "help",
5
5
  setup(__props) {