first commit
This commit is contained in:
commit
db5762abd4
687 files changed
+171307
No files matched your search
@@ -0,0 +1,119 @@
|
||||
<script>
|
||||
import { toDisplayString } from "vue";
|
||||
import { onMounted } from "vue";
|
||||
import { onBeforeUnmount } from "vue";
|
||||
import { createBlock } from "vue";
|
||||
import { ref } from "vue";
|
||||
import { withCtx } from "vue";
|
||||
import { createCommentVNode } from "vue";
|
||||
import { createElementVNode } from "vue";
|
||||
import { createTextVNode } from "vue";
|
||||
import { unref } from "vue";
|
||||
import { defineComponent } from "vue";
|
||||
import { createVNode } from "vue";
|
||||
import { openBlock } from "vue";
|
||||
import { useApi } from "~/lib/auth.js";
|
||||
import button from "primevue/button";
|
||||
import message from "primevue/message";
|
||||
import { n as sanitize_n } from "~/lib/sanitize.js";
|
||||
var _ = [`innerHTML`],
|
||||
v = Object.assign(
|
||||
defineComponent({
|
||||
__name: `TicketNotice`,
|
||||
setup(u) {
|
||||
let v = useApi(),
|
||||
y = ref(``),
|
||||
b = ref(``),
|
||||
x = ref(!1),
|
||||
S = !1;
|
||||
async function C() {
|
||||
if (!x.value) {
|
||||
((x.value = !0), (b.value = ``));
|
||||
try {
|
||||
let e = await v.get(`/ticket/config`);
|
||||
if (S) return;
|
||||
y.value =
|
||||
Number(e.ticket_notice_open) === 1
|
||||
? sanitize_n(e.ticket_notice_description || ``)
|
||||
: ``;
|
||||
} catch (e) {
|
||||
S ||
|
||||
(b.value =
|
||||
e instanceof Error ? e.message : `工单通知说明加载失败`);
|
||||
} finally {
|
||||
S || (x.value = !1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return (
|
||||
onMounted(C),
|
||||
onBeforeUnmount(() => {
|
||||
S = !0;
|
||||
}),
|
||||
(t, n) => {
|
||||
let i = message,
|
||||
u = button;
|
||||
return unref(y)
|
||||
? (openBlock(),
|
||||
createBlock(
|
||||
i,
|
||||
{
|
||||
key: 0,
|
||||
severity: `info`,
|
||||
closable: !1,
|
||||
},
|
||||
{
|
||||
default: withCtx(() => [
|
||||
createElementVNode(
|
||||
`div`,
|
||||
{
|
||||
innerHTML: unref(y),
|
||||
},
|
||||
null,
|
||||
8,
|
||||
_,
|
||||
),
|
||||
]),
|
||||
_: 1,
|
||||
},
|
||||
))
|
||||
: unref(b)
|
||||
? (openBlock(),
|
||||
createBlock(
|
||||
i,
|
||||
{
|
||||
key: 1,
|
||||
severity: `warn`,
|
||||
closable: !1,
|
||||
},
|
||||
{
|
||||
default: withCtx(() => [
|
||||
createTextVNode(toDisplayString(unref(b)) + ` `, 1),
|
||||
createVNode(
|
||||
u,
|
||||
{
|
||||
label: `重试通知说明`,
|
||||
text: ``,
|
||||
loading: unref(x),
|
||||
onClick: C,
|
||||
},
|
||||
null,
|
||||
8,
|
||||
[`loading`],
|
||||
),
|
||||
]),
|
||||
_: 1,
|
||||
},
|
||||
))
|
||||
: createCommentVNode(``, !0);
|
||||
}
|
||||
);
|
||||
},
|
||||
}),
|
||||
{
|
||||
__name: `TicketNotice`,
|
||||
},
|
||||
);
|
||||
export {};
|
||||
export default v;
|
||||
</script>
|
||||
Reference in new issue
Block a user