@ajaxjs/ui 1.5.9 → 1.6.1
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/ajaxjs-ui.cjs.js +2 -2
- package/dist/ajaxjs-ui.es.js +1504 -1505
- package/dist/ajaxjs-ui.umd.js +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/ui.css +1 -1
- package/package.json +1 -1
package/dist/ajaxjs-ui.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import require$$0, { openBlock, createElementBlock, defineComponent, createElementVNode, createStaticVNode, normalizeClass, resolveComponent, createVNode, withCtx, toDisplayString, createTextVNode,
|
|
1
|
+
import require$$0, { openBlock, createElementBlock, defineComponent, createElementVNode, createStaticVNode, normalizeClass, resolveComponent, createVNode, withCtx, toDisplayString, createTextVNode, withDefaults, defineProps, createBlock, createCommentVNode, Fragment, renderList, h, ref, renderSlot, withDirectives, vShow } from "vue";
|
|
2
2
|
const _sfc_main$c = {}, _export_sfc = (m, f) => {
|
|
3
3
|
const p = m.__vccOpts || m;
|
|
4
4
|
for (const [t, $] of f)
|
|
@@ -540,595 +540,107 @@ function _sfc_render$8(m, f, p, t, $, O) {
|
|
|
540
540
|
}, 8, ["onOnSubmit"])
|
|
541
541
|
]);
|
|
542
542
|
}
|
|
543
|
-
const Login = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-2149b790"]])
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
},
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
543
|
+
const Login = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8], ["__scopeId", "data-v-2149b790"]]);
|
|
544
|
+
var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, viewuiplus_min$1 = { exports: {} }, viewuiplus_min = viewuiplus_min$1.exports, hasRequiredViewuiplus_min;
|
|
545
|
+
function requireViewuiplus_min() {
|
|
546
|
+
return hasRequiredViewuiplus_min || (hasRequiredViewuiplus_min = 1, (function(m, f) {
|
|
547
|
+
(function(p, t) {
|
|
548
|
+
t(f, require$$0);
|
|
549
|
+
})(viewuiplus_min, function(p, t) {
|
|
550
|
+
const $ = typeof window < "u", O = (function() {
|
|
551
|
+
return $ && document.addEventListener ? function(e, n, i, a = !1) {
|
|
552
|
+
e && n && i && e.addEventListener(n, i, a);
|
|
553
|
+
} : function(e, n, i) {
|
|
554
|
+
e && n && i && e.attachEvent("on" + n, i);
|
|
555
|
+
};
|
|
556
|
+
})(), N = (function() {
|
|
557
|
+
return $ && document.removeEventListener ? function(e, n, i, a = !1) {
|
|
558
|
+
e && n && e.removeEventListener(n, i, a);
|
|
559
|
+
} : function(e, n, i) {
|
|
560
|
+
e && n && e.detachEvent("on" + n, i);
|
|
561
|
+
};
|
|
562
|
+
})();
|
|
563
|
+
var S = (e, n) => {
|
|
564
|
+
const i = e.__vccOpts || e;
|
|
565
|
+
for (const [a, o] of n) i[a] = o;
|
|
566
|
+
return i;
|
|
567
|
+
};
|
|
568
|
+
const ye = "ivu-affix";
|
|
569
|
+
function Ee(e, n) {
|
|
570
|
+
const i = n ? "pageYOffset" : "pageXOffset", a = n ? "scrollTop" : "scrollLeft";
|
|
571
|
+
let o = e[i];
|
|
572
|
+
return $ && typeof o != "number" && (o = window.document.documentElement[a]), o;
|
|
570
573
|
}
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
// width: 120
|
|
642
|
-
// },
|
|
643
|
-
{
|
|
644
|
-
title: "编辑",
|
|
645
|
-
align: "center",
|
|
646
|
-
width: 270,
|
|
647
|
-
slot: "action"
|
|
648
|
-
}
|
|
649
|
-
];
|
|
650
|
-
return {
|
|
651
|
-
isCreateTop: !1,
|
|
652
|
-
isUpdate: !1,
|
|
653
|
-
edit: {
|
|
654
|
-
isShowEdit: !1,
|
|
655
|
-
row: {},
|
|
656
|
-
// 正在编辑的对象,如果新建的时候,这个值为 null
|
|
657
|
-
parent: "",
|
|
658
|
-
parentId: 0
|
|
659
|
-
},
|
|
660
|
-
columns16: m,
|
|
661
|
-
data: [
|
|
662
|
-
{
|
|
663
|
-
id: "100",
|
|
664
|
-
name: "John Brown",
|
|
665
|
-
age: 18,
|
|
666
|
-
address: "New York No. 1 Lake Park"
|
|
667
|
-
},
|
|
668
|
-
{
|
|
669
|
-
id: "101",
|
|
670
|
-
name: "Jim Green",
|
|
671
|
-
age: 24,
|
|
672
|
-
address: "London No. 1 Lake Park",
|
|
673
|
-
_showChildren: !0,
|
|
674
|
-
children: [
|
|
675
|
-
{
|
|
676
|
-
id: "10100",
|
|
677
|
-
name: "John Brown",
|
|
678
|
-
age: 18,
|
|
679
|
-
address: "New York No. 1 Lake Park"
|
|
680
|
-
},
|
|
681
|
-
{
|
|
682
|
-
id: "10101",
|
|
683
|
-
name: "Joe Blackn",
|
|
684
|
-
age: 30,
|
|
685
|
-
address: "Sydney No. 1 Lake Park"
|
|
686
|
-
},
|
|
687
|
-
{
|
|
688
|
-
id: "10102",
|
|
689
|
-
name: "Jon Snow",
|
|
690
|
-
age: 26,
|
|
691
|
-
address: "Ottawa No. 2 Lake Park",
|
|
692
|
-
children: [
|
|
693
|
-
{
|
|
694
|
-
id: "1010200",
|
|
695
|
-
name: "Jim Green",
|
|
696
|
-
age: 24,
|
|
697
|
-
address: "New York No. 1 Lake Park"
|
|
698
|
-
}
|
|
699
|
-
]
|
|
700
|
-
}
|
|
701
|
-
]
|
|
702
|
-
},
|
|
703
|
-
{
|
|
704
|
-
id: "102",
|
|
705
|
-
name: "Joe Black",
|
|
706
|
-
age: 30,
|
|
707
|
-
address: "Sydney No. 1 Lake Park"
|
|
708
|
-
},
|
|
709
|
-
{
|
|
710
|
-
id: "103",
|
|
711
|
-
name: "Jon Snow",
|
|
712
|
-
age: 26,
|
|
713
|
-
address: "Ottawa No. 2 Lake Park"
|
|
714
|
-
}
|
|
715
|
-
]
|
|
716
|
-
};
|
|
717
|
-
},
|
|
718
|
-
mounted() {
|
|
719
|
-
this.getData();
|
|
720
|
-
},
|
|
721
|
-
methods: {
|
|
722
|
-
getData() {
|
|
723
|
-
xhr_fetch.get(`${this.api.list}`, (m) => {
|
|
724
|
-
this.data = tranListToTreeData(m.result);
|
|
725
|
-
});
|
|
726
|
-
},
|
|
727
|
-
/**
|
|
728
|
-
* 新建子节点
|
|
729
|
-
*
|
|
730
|
-
* @param name 父节点的名称
|
|
731
|
-
* @param id 父节点的 id
|
|
732
|
-
*/
|
|
733
|
-
createTreeNode(m, f, p) {
|
|
734
|
-
this.isCreateTop = !1, this.isUpdate = !1, this.edit.isShowEdit = !0, this.edit.parent = m, this.edit.parentId = f, this.edit.row = {}, this.$refs.selectParent.selectId = f;
|
|
735
|
-
},
|
|
736
|
-
/**
|
|
737
|
-
* 编辑节点
|
|
738
|
-
*
|
|
739
|
-
* @param name 父节点的名称
|
|
740
|
-
* @param id 父节点的 id
|
|
741
|
-
*/
|
|
742
|
-
editTreeNode(m) {
|
|
743
|
-
this.isCreateTop = !1, this.isUpdate = !0, this.edit.isShowEdit = !0, this.edit.parent = m.name, this.edit.parentId = m.id, this.edit.row = m, this.$refs.selectParent.selectId = m.parentId;
|
|
744
|
-
},
|
|
745
|
-
/**
|
|
746
|
-
* 创建顶级节点
|
|
747
|
-
*/
|
|
748
|
-
createTop() {
|
|
749
|
-
this.isUpdate = !1, this.isCreateTop = !0, this.edit.isShowEdit = !0, this.edit.row = {};
|
|
750
|
-
},
|
|
751
|
-
/**
|
|
752
|
-
* 保存
|
|
753
|
-
*/
|
|
754
|
-
save() {
|
|
755
|
-
if (this.isUpdate) {
|
|
756
|
-
let m = Object.assign({}, this.edit.row);
|
|
757
|
-
delete m._index, delete m._rowKey, delete m.children, delete m._showChildren, m.parentId = this.$refs.selectParent.selectId, xhr_fetch.put(`${this.api.update}`, (f) => {
|
|
758
|
-
f.status ? (this.getData(), this.$Message.success(f.message)) : this.$Message.error(f.message || "修改失败");
|
|
759
|
-
}, m);
|
|
760
|
-
} else if (this.isCreateTop)
|
|
761
|
-
this.edit.row.parentId = 0, xhr_fetch.post(`${this.api.create}`, (m) => {
|
|
762
|
-
m.status ? (this.getData(), this.$Message.success(m.message)) : this.$Message.error(m.message || "创建失败");
|
|
763
|
-
}, this.edit.row);
|
|
764
|
-
else {
|
|
765
|
-
let m = Object.assign({}, this.edit.row);
|
|
766
|
-
m.parentId = this.$refs.selectParent.selectId, xhr_fetch.post(`${this.api.create}`, (f) => {
|
|
767
|
-
f.status ? (this.getData(), this.$Message.success(f.message)) : this.$Message.error(f.message || "创建失败");
|
|
768
|
-
}, m);
|
|
769
|
-
}
|
|
770
|
-
},
|
|
771
|
-
delTreeNode({ id: m }) {
|
|
772
|
-
xhr_fetch.del(`${this.api.delete}`, (f) => {
|
|
773
|
-
f.status ? (this.getData(), this.$Message.success(f.message)) : this.$Message.error(f.message || "创建失败");
|
|
774
|
-
}, { id: m });
|
|
775
|
-
},
|
|
776
|
-
delAllTreeNode() {
|
|
777
|
-
alert(9);
|
|
778
|
-
}
|
|
779
|
-
},
|
|
780
|
-
computed: {
|
|
781
|
-
getTitle() {
|
|
782
|
-
return this.isUpdate ? "编辑[" + this.edit.row.name + "]" : this.isCreateTop ? "新建顶级节点" : "新建子" + this.name;
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
};
|
|
786
|
-
function tranListToTreeData(m) {
|
|
787
|
-
let f = [], p = {};
|
|
788
|
-
return m.forEach((t) => {
|
|
789
|
-
t.children || (t.children = []), t._showChildren = !0, p[t.id] = t;
|
|
790
|
-
}), m.forEach((t) => {
|
|
791
|
-
let $ = p[t.parentId];
|
|
792
|
-
$ ? $.children.push(t) : f.push(t);
|
|
793
|
-
}), f;
|
|
794
|
-
}
|
|
795
|
-
const _hoisted_1$3 = { style: { "text-align": "center" } }, _hoisted_2$3 = { key: 0 }, _hoisted_3$2 = { key: 1 };
|
|
796
|
-
function _sfc_render$6(m, f, p, t, $, O) {
|
|
797
|
-
const N = resolveComponent("Button"), S = resolveComponent("Poptip"), ye = resolveComponent("Table"), Ee = resolveComponent("TreeSelector"), _e = resolveComponent("FormItem"), Nt = resolveComponent("Input"), cn = resolveComponent("Form"), He = resolveComponent("Modal");
|
|
798
|
-
return openBlock(), createElementBlock("div", null, [
|
|
799
|
-
createVNode(N, {
|
|
800
|
-
type: "primary",
|
|
801
|
-
style: { "margin-bottom": "10px" },
|
|
802
|
-
onClick: m.createTop
|
|
803
|
-
}, {
|
|
804
|
-
default: withCtx(() => [
|
|
805
|
-
createTextVNode("新建顶级" + toDisplayString(m.name), 1)
|
|
806
|
-
]),
|
|
807
|
-
_: 1
|
|
808
|
-
}, 8, ["onClick"]),
|
|
809
|
-
createVNode(ye, {
|
|
810
|
-
"row-key": "id",
|
|
811
|
-
columns: m.columns16,
|
|
812
|
-
data: m.data,
|
|
813
|
-
border: "",
|
|
814
|
-
size: "small"
|
|
815
|
-
}, {
|
|
816
|
-
action: withCtx(({ row: Ce }) => [
|
|
817
|
-
createVNode(N, {
|
|
818
|
-
size: "small",
|
|
819
|
-
icon: "md-add",
|
|
820
|
-
type: "success",
|
|
821
|
-
onClick: (kt) => m.createTreeNode(Ce.name, Ce.id, Ce.parentId)
|
|
822
|
-
}, {
|
|
823
|
-
default: withCtx(() => [...f[4] || (f[4] = [
|
|
824
|
-
createTextVNode("新建", -1)
|
|
825
|
-
])]),
|
|
826
|
-
_: 1
|
|
827
|
-
}, 8, ["onClick"]),
|
|
828
|
-
createVNode(N, {
|
|
829
|
-
size: "small",
|
|
830
|
-
icon: "md-create",
|
|
831
|
-
type: "info",
|
|
832
|
-
onClick: (kt) => m.editTreeNode(Ce)
|
|
833
|
-
}, {
|
|
834
|
-
default: withCtx(() => [...f[5] || (f[5] = [
|
|
835
|
-
createTextVNode("编辑", -1)
|
|
836
|
-
])]),
|
|
837
|
-
_: 1
|
|
838
|
-
}, 8, ["onClick"]),
|
|
839
|
-
createVNode(S, {
|
|
840
|
-
transfer: "",
|
|
841
|
-
placement: "left"
|
|
842
|
-
}, {
|
|
843
|
-
content: withCtx(() => [
|
|
844
|
-
f[7] || (f[7] = createElementVNode("b", null, "请选择删除模式:", -1)),
|
|
845
|
-
createElementVNode("p", null, "- 删除该" + toDisplayString(m.name) + ",如有子" + toDisplayString(m.name) + "调整到原父亲" + toDisplayString(m.name) + "上;", 1),
|
|
846
|
-
createElementVNode("p", null, "- 删除该" + toDisplayString(m.name) + "以及所有子" + toDisplayString(m.name) + ",删除该节点并包括下级" + toDisplayString(m.name), 1),
|
|
847
|
-
f[8] || (f[8] = createElementVNode("br", null, null, -1)),
|
|
848
|
-
createElementVNode("div", _hoisted_1$3, [
|
|
849
|
-
createVNode(N, {
|
|
850
|
-
size: "small",
|
|
851
|
-
type: "primary",
|
|
852
|
-
onClick: (kt) => m.delTreeNode(Ce)
|
|
853
|
-
}, {
|
|
854
|
-
default: withCtx(() => [
|
|
855
|
-
createTextVNode("删除该" + toDisplayString(m.name), 1)
|
|
856
|
-
]),
|
|
857
|
-
_: 1
|
|
858
|
-
}, 8, ["onClick"]),
|
|
859
|
-
createVNode(N, {
|
|
860
|
-
size: "small",
|
|
861
|
-
type: "primary",
|
|
862
|
-
onClick: m.delAllTreeNode
|
|
863
|
-
}, {
|
|
864
|
-
default: withCtx(() => [
|
|
865
|
-
createTextVNode("删除所有" + toDisplayString(m.name), 1)
|
|
866
|
-
]),
|
|
867
|
-
_: 1
|
|
868
|
-
}, 8, ["onClick"])
|
|
869
|
-
])
|
|
870
|
-
]),
|
|
871
|
-
default: withCtx(() => [
|
|
872
|
-
createVNode(N, {
|
|
873
|
-
size: "small",
|
|
874
|
-
icon: "md-trash",
|
|
875
|
-
type: "error"
|
|
876
|
-
}, {
|
|
877
|
-
default: withCtx(() => [...f[6] || (f[6] = [
|
|
878
|
-
createTextVNode("删除", -1)
|
|
879
|
-
])]),
|
|
880
|
-
_: 1
|
|
881
|
-
})
|
|
882
|
-
]),
|
|
883
|
-
_: 2
|
|
884
|
-
}, 1024)
|
|
885
|
-
]),
|
|
886
|
-
_: 1
|
|
887
|
-
}, 8, ["columns", "data"]),
|
|
888
|
-
createVNode(He, {
|
|
889
|
-
modelValue: m.edit.isShowEdit,
|
|
890
|
-
"onUpdate:modelValue": f[3] || (f[3] = (Ce) => m.edit.isShowEdit = Ce),
|
|
891
|
-
title: m.getTitle,
|
|
892
|
-
width: "650",
|
|
893
|
-
"ok-text": "保存",
|
|
894
|
-
onOnOk: m.save
|
|
895
|
-
}, {
|
|
896
|
-
default: withCtx(() => [
|
|
897
|
-
m.isCreateTop ? (openBlock(), createElementBlock("p", _hoisted_2$3, "你将新建顶级的" + toDisplayString(m.name) + "。", 1)) : createCommentVNode("", !0),
|
|
898
|
-
!m.isUpdate && !m.isCreateTop ? (openBlock(), createElementBlock("p", _hoisted_3$2, "你将在" + toDisplayString(m.name) + "[" + toDisplayString(m.edit.parent) + "]下面传新建子" + toDisplayString(m.name) + "。", 1)) : createCommentVNode("", !0),
|
|
899
|
-
createVNode(cn, {
|
|
900
|
-
"label-width": 100,
|
|
901
|
-
modelValue: m.edit.row,
|
|
902
|
-
"onUpdate:modelValue": f[2] || (f[2] = (Ce) => m.edit.row = Ce),
|
|
903
|
-
style: { margin: "5%" }
|
|
904
|
-
}, {
|
|
905
|
-
default: withCtx(() => [
|
|
906
|
-
withDirectives(createVNode(_e, {
|
|
907
|
-
label: "父亲" + m.name
|
|
908
|
-
}, {
|
|
909
|
-
default: withCtx(() => [
|
|
910
|
-
createVNode(Ee, {
|
|
911
|
-
ref: "selectParent",
|
|
912
|
-
"tree-json": m.data
|
|
913
|
-
}, null, 8, ["tree-json"])
|
|
914
|
-
]),
|
|
915
|
-
_: 1
|
|
916
|
-
}, 8, ["label"]), [
|
|
917
|
-
[vShow, !m.isCreateTop]
|
|
918
|
-
]),
|
|
919
|
-
createVNode(_e, {
|
|
920
|
-
label: m.name + "名称",
|
|
921
|
-
prop: "name"
|
|
922
|
-
}, {
|
|
923
|
-
default: withCtx(() => [
|
|
924
|
-
createVNode(Nt, {
|
|
925
|
-
type: "text",
|
|
926
|
-
modelValue: m.edit.row.name,
|
|
927
|
-
"onUpdate:modelValue": f[0] || (f[0] = (Ce) => m.edit.row.name = Ce),
|
|
928
|
-
placeholder: "名称为必填"
|
|
929
|
-
}, null, 8, ["modelValue"])
|
|
930
|
-
]),
|
|
931
|
-
_: 1
|
|
932
|
-
}, 8, ["label"]),
|
|
933
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(m.formFields, (Ce, kt) => (openBlock(), createBlock(_e, {
|
|
934
|
-
key: kt,
|
|
935
|
-
label: Ce.name,
|
|
936
|
-
prop: Ce.prop
|
|
937
|
-
}, {
|
|
938
|
-
default: withCtx(() => [
|
|
939
|
-
createVNode(Nt, {
|
|
940
|
-
type: "text",
|
|
941
|
-
modelValue: m.edit.row[Ce.key],
|
|
942
|
-
"onUpdate:modelValue": (un) => m.edit.row[Ce.key] = un,
|
|
943
|
-
placeholder: Ce.placeholder
|
|
944
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
945
|
-
]),
|
|
946
|
-
_: 2
|
|
947
|
-
}, 1032, ["label", "prop"]))), 128)),
|
|
948
|
-
createVNode(_e, {
|
|
949
|
-
label: m.name + "说明",
|
|
950
|
-
prop: "content"
|
|
951
|
-
}, {
|
|
952
|
-
default: withCtx(() => [
|
|
953
|
-
createVNode(Nt, {
|
|
954
|
-
type: "textarea",
|
|
955
|
-
modelValue: m.edit.row.content,
|
|
956
|
-
"onUpdate:modelValue": f[1] || (f[1] = (Ce) => m.edit.row.content = Ce),
|
|
957
|
-
rows: 4,
|
|
958
|
-
placeholder: "简介、说明、备注,选填"
|
|
959
|
-
}, null, 8, ["modelValue"])
|
|
960
|
-
]),
|
|
961
|
-
_: 1
|
|
962
|
-
}, 8, ["label"])
|
|
963
|
-
]),
|
|
964
|
-
_: 1
|
|
965
|
-
}, 8, ["modelValue"])
|
|
966
|
-
]),
|
|
967
|
-
_: 1
|
|
968
|
-
}, 8, ["modelValue", "title", "onOnOk"])
|
|
969
|
-
]);
|
|
970
|
-
}
|
|
971
|
-
const TreeTable = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6], ["__scopeId", "data-v-80f72d55"]]), _sfc_main$6 = {
|
|
972
|
-
components: { TreeTable },
|
|
973
|
-
data() {
|
|
974
|
-
return {
|
|
975
|
-
api: "dd",
|
|
976
|
-
list: [
|
|
977
|
-
{
|
|
978
|
-
title: "名称",
|
|
979
|
-
key: "name",
|
|
980
|
-
align: "left",
|
|
981
|
-
tree: !0,
|
|
982
|
-
maxWidth: 200
|
|
983
|
-
},
|
|
984
|
-
{
|
|
985
|
-
title: "值(value)",
|
|
986
|
-
key: "value",
|
|
987
|
-
align: "center"
|
|
988
|
-
},
|
|
989
|
-
{
|
|
990
|
-
title: "说明",
|
|
991
|
-
align: "center",
|
|
992
|
-
key: "content"
|
|
993
|
-
},
|
|
994
|
-
{
|
|
995
|
-
title: "扩展属性",
|
|
996
|
-
align: "center",
|
|
997
|
-
key: "extraData"
|
|
998
|
-
},
|
|
999
|
-
{
|
|
1000
|
-
title: "创建日期",
|
|
1001
|
-
align: "center",
|
|
1002
|
-
width: 150,
|
|
1003
|
-
render(m, { row: f }) {
|
|
1004
|
-
if (f.createDate) {
|
|
1005
|
-
let p = f.createDate.split(":");
|
|
1006
|
-
return p.pop(), m("span", p.join(":"));
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
1009
|
-
// key: 'createDate'
|
|
1010
|
-
}
|
|
1011
|
-
],
|
|
1012
|
-
formFields: [{
|
|
1013
|
-
name: "值(Value)",
|
|
1014
|
-
key: "value"
|
|
1015
|
-
}]
|
|
1016
|
-
};
|
|
1017
|
-
}
|
|
1018
|
-
};
|
|
1019
|
-
function _sfc_render$5(m, f, p, t, $, O) {
|
|
1020
|
-
const N = resolveComponent("TreeTable");
|
|
1021
|
-
return openBlock(), createElementBlock("div", null, [
|
|
1022
|
-
f[0] || (f[0] = createElementVNode("h1", null, "数据字典", -1)),
|
|
1023
|
-
createVNode(N, {
|
|
1024
|
-
name: "组织机构",
|
|
1025
|
-
list: $.list,
|
|
1026
|
-
api: $.api,
|
|
1027
|
-
"form-fields": $.formFields
|
|
1028
|
-
}, null, 8, ["list", "api", "form-fields"])
|
|
1029
|
-
]);
|
|
1030
|
-
}
|
|
1031
|
-
const DataDict = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5]]);
|
|
1032
|
-
var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, viewuiplus_min$1 = { exports: {} }, viewuiplus_min = viewuiplus_min$1.exports, hasRequiredViewuiplus_min;
|
|
1033
|
-
function requireViewuiplus_min() {
|
|
1034
|
-
return hasRequiredViewuiplus_min || (hasRequiredViewuiplus_min = 1, (function(m, f) {
|
|
1035
|
-
(function(p, t) {
|
|
1036
|
-
t(f, require$$0);
|
|
1037
|
-
})(viewuiplus_min, function(p, t) {
|
|
1038
|
-
const $ = typeof window < "u", O = (function() {
|
|
1039
|
-
return $ && document.addEventListener ? function(e, n, i, a = !1) {
|
|
1040
|
-
e && n && i && e.addEventListener(n, i, a);
|
|
1041
|
-
} : function(e, n, i) {
|
|
1042
|
-
e && n && i && e.attachEvent("on" + n, i);
|
|
1043
|
-
};
|
|
1044
|
-
})(), N = (function() {
|
|
1045
|
-
return $ && document.removeEventListener ? function(e, n, i, a = !1) {
|
|
1046
|
-
e && n && e.removeEventListener(n, i, a);
|
|
1047
|
-
} : function(e, n, i) {
|
|
1048
|
-
e && n && e.detachEvent("on" + n, i);
|
|
1049
|
-
};
|
|
1050
|
-
})();
|
|
1051
|
-
var S = (e, n) => {
|
|
1052
|
-
const i = e.__vccOpts || e;
|
|
1053
|
-
for (const [a, o] of n) i[a] = o;
|
|
1054
|
-
return i;
|
|
1055
|
-
};
|
|
1056
|
-
const ye = "ivu-affix";
|
|
1057
|
-
function Ee(e, n) {
|
|
1058
|
-
const i = n ? "pageYOffset" : "pageXOffset", a = n ? "scrollTop" : "scrollLeft";
|
|
1059
|
-
let o = e[i];
|
|
1060
|
-
return $ && typeof o != "number" && (o = window.document.documentElement[a]), o;
|
|
1061
|
-
}
|
|
1062
|
-
function _e(e) {
|
|
1063
|
-
if (!$) return;
|
|
1064
|
-
const n = e.getBoundingClientRect(), i = Ee(window, !0), a = Ee(window), o = window.document.body, l = o.clientTop || 0, r = o.clientLeft || 0;
|
|
1065
|
-
return { top: n.top + i - l, left: n.left + a - r };
|
|
1066
|
-
}
|
|
1067
|
-
const Nt = { name: "Affix", emits: ["on-change"], props: { offsetTop: { type: Number, default: 0 }, offsetBottom: { type: Number }, useCapture: { type: Boolean, default: !1 } }, data() {
|
|
1068
|
-
return { affix: !1, styles: {}, slot: !1, slotStyle: {} };
|
|
1069
|
-
}, computed: { offsetType() {
|
|
1070
|
-
let e = "top";
|
|
1071
|
-
return this.offsetBottom >= 0 && (e = "bottom"), e;
|
|
1072
|
-
}, classes() {
|
|
1073
|
-
return [{ [`${ye}`]: this.affix }];
|
|
1074
|
-
} }, mounted() {
|
|
1075
|
-
O(window, "scroll", this.handleScroll, this.useCapture), O(window, "resize", this.handleScroll, this.useCapture), t.nextTick(() => {
|
|
1076
|
-
this.handleScroll();
|
|
1077
|
-
});
|
|
1078
|
-
}, beforeUnmount() {
|
|
1079
|
-
N(window, "scroll", this.handleScroll, this.useCapture), N(window, "resize", this.handleScroll, this.useCapture);
|
|
1080
|
-
}, methods: { handleScroll() {
|
|
1081
|
-
if (!$) return;
|
|
1082
|
-
const e = this.affix, n = Ee(window, !0), i = _e(this.$el), a = window.innerHeight, o = this.$el.getElementsByTagName("div")[0].offsetHeight;
|
|
1083
|
-
i.top - this.offsetTop < n && this.offsetType == "top" && !e ? (this.affix = !0, this.slotStyle = { width: this.$refs.point.clientWidth + "px", height: this.$refs.point.clientHeight + "px" }, this.slot = !0, this.styles = { top: `${this.offsetTop}px`, left: `${i.left}px`, width: `${this.$el.offsetWidth}px` }, this.$emit("on-change", !0)) : i.top - this.offsetTop > n && this.offsetType == "top" && e && (this.slot = !1, this.slotStyle = {}, this.affix = !1, this.styles = null, this.$emit("on-change", !1)), i.top + this.offsetBottom + o > n + a && this.offsetType == "bottom" && !e ? (this.affix = !0, this.styles = { bottom: `${this.offsetBottom}px`, left: `${i.left}px`, width: `${this.$el.offsetWidth}px` }, this.$emit("on-change", !0)) : i.top + this.offsetBottom + o < n + a && this.offsetType == "bottom" && e && (this.affix = !1, this.styles = null, this.$emit("on-change", !1));
|
|
1084
|
-
} } };
|
|
1085
|
-
function cn(e, n, i, a, o, l) {
|
|
1086
|
-
return t.openBlock(), t.createElementBlock("div", null, [t.createElementVNode("div", { ref: "point", class: t.normalizeClass(l.classes), style: t.normalizeStyle(o.styles) }, [t.renderSlot(e.$slots, "default")], 6), t.withDirectives(t.createElementVNode("div", { style: t.normalizeStyle(o.slotStyle) }, null, 4), [[t.vShow, o.slot]])]);
|
|
1087
|
-
}
|
|
1088
|
-
var He = S(Nt, [["render", cn]]);
|
|
1089
|
-
const Ce = "ivu-icon", kt = { name: "Icon", props: { type: { type: String, default: "" }, size: [Number, String], color: String, custom: { type: String, default: "" } }, computed: { classes() {
|
|
1090
|
-
return [`${Ce}`, { [`${Ce}-${this.type}`]: this.type !== "", [`${this.custom}`]: this.custom !== "" }];
|
|
1091
|
-
}, styles() {
|
|
1092
|
-
let e = {};
|
|
1093
|
-
return this.size && (e["font-size"] = `${this.size}px`), this.color && (e.color = this.color), e;
|
|
1094
|
-
} } };
|
|
1095
|
-
function un(e, n, i, a, o, l) {
|
|
1096
|
-
return t.openBlock(), t.createElementBlock("i", { class: t.normalizeClass(l.classes), style: t.normalizeStyle(l.styles) }, null, 6);
|
|
1097
|
-
}
|
|
1098
|
-
var ne = S(kt, [["render", un]]);
|
|
1099
|
-
function D(e, n) {
|
|
1100
|
-
for (let i = 0; i < n.length; i++) if (e === n[i]) return !0;
|
|
1101
|
-
return !1;
|
|
1102
|
-
}
|
|
1103
|
-
let dn;
|
|
1104
|
-
function ue(e) {
|
|
1105
|
-
if ($ && dn === void 0) {
|
|
1106
|
-
const n = document.createElement("div");
|
|
1107
|
-
n.style.width = "100%", n.style.height = "200px";
|
|
1108
|
-
const i = document.createElement("div"), a = i.style;
|
|
1109
|
-
a.position = "absolute", a.top = 0, a.left = 0, a.pointerEvents = "none", a.visibility = "hidden", a.width = "200px", a.height = "150px", a.overflow = "hidden", i.appendChild(n), document.body.appendChild(i);
|
|
1110
|
-
const o = n.offsetWidth;
|
|
1111
|
-
i.style.overflow = "scroll";
|
|
1112
|
-
let l = n.offsetWidth;
|
|
1113
|
-
o === l && (l = i.clientWidth), document.body.removeChild(i), dn = o - l;
|
|
1114
|
-
}
|
|
1115
|
-
return dn;
|
|
1116
|
-
}
|
|
1117
|
-
const hn = $ && (window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver) || !1, Jc = /([\:\-\_]+(.))/g, Xc = /^moz([A-Z])/;
|
|
1118
|
-
function Zc(e) {
|
|
1119
|
-
return e.replace(Jc, function(n, i, a, o) {
|
|
1120
|
-
return o ? a.toUpperCase() : a;
|
|
1121
|
-
}).replace(Xc, "Moz$1");
|
|
1122
|
-
}
|
|
1123
|
-
function wt(e, n) {
|
|
1124
|
-
if ($) {
|
|
1125
|
-
if (!e || !n) return null;
|
|
1126
|
-
n = Zc(n), n === "float" && (n = "cssFloat");
|
|
1127
|
-
try {
|
|
1128
|
-
const i = document.defaultView.getComputedStyle(e, "");
|
|
1129
|
-
return e.style[n] || i ? i[n] : null;
|
|
1130
|
-
} catch {
|
|
1131
|
-
return e.style[n];
|
|
574
|
+
function _e(e) {
|
|
575
|
+
if (!$) return;
|
|
576
|
+
const n = e.getBoundingClientRect(), i = Ee(window, !0), a = Ee(window), o = window.document.body, l = o.clientTop || 0, r = o.clientLeft || 0;
|
|
577
|
+
return { top: n.top + i - l, left: n.left + a - r };
|
|
578
|
+
}
|
|
579
|
+
const Nt = { name: "Affix", emits: ["on-change"], props: { offsetTop: { type: Number, default: 0 }, offsetBottom: { type: Number }, useCapture: { type: Boolean, default: !1 } }, data() {
|
|
580
|
+
return { affix: !1, styles: {}, slot: !1, slotStyle: {} };
|
|
581
|
+
}, computed: { offsetType() {
|
|
582
|
+
let e = "top";
|
|
583
|
+
return this.offsetBottom >= 0 && (e = "bottom"), e;
|
|
584
|
+
}, classes() {
|
|
585
|
+
return [{ [`${ye}`]: this.affix }];
|
|
586
|
+
} }, mounted() {
|
|
587
|
+
O(window, "scroll", this.handleScroll, this.useCapture), O(window, "resize", this.handleScroll, this.useCapture), t.nextTick(() => {
|
|
588
|
+
this.handleScroll();
|
|
589
|
+
});
|
|
590
|
+
}, beforeUnmount() {
|
|
591
|
+
N(window, "scroll", this.handleScroll, this.useCapture), N(window, "resize", this.handleScroll, this.useCapture);
|
|
592
|
+
}, methods: { handleScroll() {
|
|
593
|
+
if (!$) return;
|
|
594
|
+
const e = this.affix, n = Ee(window, !0), i = _e(this.$el), a = window.innerHeight, o = this.$el.getElementsByTagName("div")[0].offsetHeight;
|
|
595
|
+
i.top - this.offsetTop < n && this.offsetType == "top" && !e ? (this.affix = !0, this.slotStyle = { width: this.$refs.point.clientWidth + "px", height: this.$refs.point.clientHeight + "px" }, this.slot = !0, this.styles = { top: `${this.offsetTop}px`, left: `${i.left}px`, width: `${this.$el.offsetWidth}px` }, this.$emit("on-change", !0)) : i.top - this.offsetTop > n && this.offsetType == "top" && e && (this.slot = !1, this.slotStyle = {}, this.affix = !1, this.styles = null, this.$emit("on-change", !1)), i.top + this.offsetBottom + o > n + a && this.offsetType == "bottom" && !e ? (this.affix = !0, this.styles = { bottom: `${this.offsetBottom}px`, left: `${i.left}px`, width: `${this.$el.offsetWidth}px` }, this.$emit("on-change", !0)) : i.top + this.offsetBottom + o < n + a && this.offsetType == "bottom" && e && (this.affix = !1, this.styles = null, this.$emit("on-change", !1));
|
|
596
|
+
} } };
|
|
597
|
+
function cn(e, n, i, a, o, l) {
|
|
598
|
+
return t.openBlock(), t.createElementBlock("div", null, [t.createElementVNode("div", { ref: "point", class: t.normalizeClass(l.classes), style: t.normalizeStyle(o.styles) }, [t.renderSlot(e.$slots, "default")], 6), t.withDirectives(t.createElementVNode("div", { style: t.normalizeStyle(o.slotStyle) }, null, 4), [[t.vShow, o.slot]])]);
|
|
599
|
+
}
|
|
600
|
+
var He = S(Nt, [["render", cn]]);
|
|
601
|
+
const Ce = "ivu-icon", kt = { name: "Icon", props: { type: { type: String, default: "" }, size: [Number, String], color: String, custom: { type: String, default: "" } }, computed: { classes() {
|
|
602
|
+
return [`${Ce}`, { [`${Ce}-${this.type}`]: this.type !== "", [`${this.custom}`]: this.custom !== "" }];
|
|
603
|
+
}, styles() {
|
|
604
|
+
let e = {};
|
|
605
|
+
return this.size && (e["font-size"] = `${this.size}px`), this.color && (e.color = this.color), e;
|
|
606
|
+
} } };
|
|
607
|
+
function un(e, n, i, a, o, l) {
|
|
608
|
+
return t.openBlock(), t.createElementBlock("i", { class: t.normalizeClass(l.classes), style: t.normalizeStyle(l.styles) }, null, 6);
|
|
609
|
+
}
|
|
610
|
+
var ne = S(kt, [["render", un]]);
|
|
611
|
+
function D(e, n) {
|
|
612
|
+
for (let i = 0; i < n.length; i++) if (e === n[i]) return !0;
|
|
613
|
+
return !1;
|
|
614
|
+
}
|
|
615
|
+
let dn;
|
|
616
|
+
function ue(e) {
|
|
617
|
+
if ($ && dn === void 0) {
|
|
618
|
+
const n = document.createElement("div");
|
|
619
|
+
n.style.width = "100%", n.style.height = "200px";
|
|
620
|
+
const i = document.createElement("div"), a = i.style;
|
|
621
|
+
a.position = "absolute", a.top = 0, a.left = 0, a.pointerEvents = "none", a.visibility = "hidden", a.width = "200px", a.height = "150px", a.overflow = "hidden", i.appendChild(n), document.body.appendChild(i);
|
|
622
|
+
const o = n.offsetWidth;
|
|
623
|
+
i.style.overflow = "scroll";
|
|
624
|
+
let l = n.offsetWidth;
|
|
625
|
+
o === l && (l = i.clientWidth), document.body.removeChild(i), dn = o - l;
|
|
626
|
+
}
|
|
627
|
+
return dn;
|
|
628
|
+
}
|
|
629
|
+
const hn = $ && (window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver) || !1, Jc = /([\:\-\_]+(.))/g, Xc = /^moz([A-Z])/;
|
|
630
|
+
function Zc(e) {
|
|
631
|
+
return e.replace(Jc, function(n, i, a, o) {
|
|
632
|
+
return o ? a.toUpperCase() : a;
|
|
633
|
+
}).replace(Xc, "Moz$1");
|
|
634
|
+
}
|
|
635
|
+
function wt(e, n) {
|
|
636
|
+
if ($) {
|
|
637
|
+
if (!e || !n) return null;
|
|
638
|
+
n = Zc(n), n === "float" && (n = "cssFloat");
|
|
639
|
+
try {
|
|
640
|
+
const i = document.defaultView.getComputedStyle(e, "");
|
|
641
|
+
return e.style[n] || i ? i[n] : null;
|
|
642
|
+
} catch {
|
|
643
|
+
return e.style[n];
|
|
1132
644
|
}
|
|
1133
645
|
}
|
|
1134
646
|
}
|
|
@@ -12382,1018 +11894,1505 @@ function requireViewuiplus_min() {
|
|
|
12382
11894
|
});
|
|
12383
11895
|
})(viewuiplus_min$1, viewuiplus_min$1.exports)), viewuiplus_min$1.exports;
|
|
12384
11896
|
}
|
|
12385
|
-
var viewuiplus_minExports = requireViewuiplus_min();
|
|
12386
|
-
const _sfc_main$
|
|
11897
|
+
var viewuiplus_minExports = requireViewuiplus_min();
|
|
11898
|
+
const _sfc_main$8 = {
|
|
11899
|
+
props: {
|
|
11900
|
+
value: {
|
|
11901
|
+
required: !0
|
|
11902
|
+
},
|
|
11903
|
+
uploadUrl: {
|
|
11904
|
+
type: String,
|
|
11905
|
+
required: !0
|
|
11906
|
+
}
|
|
11907
|
+
},
|
|
11908
|
+
data() {
|
|
11909
|
+
return { _v: this.value };
|
|
11910
|
+
},
|
|
11911
|
+
watch: {
|
|
11912
|
+
value(m) {
|
|
11913
|
+
this._v = m;
|
|
11914
|
+
}
|
|
11915
|
+
},
|
|
11916
|
+
methods: {
|
|
11917
|
+
downloadFile() {
|
|
11918
|
+
downloadFile(this._v);
|
|
11919
|
+
},
|
|
11920
|
+
showFile(m) {
|
|
11921
|
+
console.log(m);
|
|
11922
|
+
},
|
|
11923
|
+
onSuccess(m, f) {
|
|
11924
|
+
console.log(m);
|
|
11925
|
+
let p = f.size;
|
|
11926
|
+
p = p / 1024;
|
|
11927
|
+
const t = p.toFixed(2);
|
|
11928
|
+
this.$Message.success(`上传成功:${f.name},大小:${t}kb`), m.status && (this._v = m.data.url);
|
|
11929
|
+
},
|
|
11930
|
+
fireData() {
|
|
11931
|
+
this._v && this.$emit("update:modelValue", this._v);
|
|
11932
|
+
}
|
|
11933
|
+
}
|
|
11934
|
+
};
|
|
11935
|
+
function downloadFile(m) {
|
|
11936
|
+
if (!window.open(m, "_blank"))
|
|
11937
|
+
throw console.warn("Pop-up window was blocked. Please allow pop-ups for this site."), new Error("Download failed: Pop-up window was blocked by the browser.");
|
|
11938
|
+
}
|
|
11939
|
+
function _sfc_render$7(m, f, p, t, $, O) {
|
|
11940
|
+
const N = resolveComponent("Button"), S = resolveComponent("Upload"), ye = resolveComponent("Space"), Ee = resolveComponent("Input");
|
|
11941
|
+
return openBlock(), createElementBlock("span", null, [
|
|
11942
|
+
createVNode(Ee, {
|
|
11943
|
+
readonly: "",
|
|
11944
|
+
placeholder: "请上传文件",
|
|
11945
|
+
modelValue: $._v,
|
|
11946
|
+
"onUpdate:modelValue": f[1] || (f[1] = (_e) => $._v = _e),
|
|
11947
|
+
"on-change": O.fireData()
|
|
11948
|
+
}, {
|
|
11949
|
+
append: withCtx(() => [
|
|
11950
|
+
createVNode(ye, {
|
|
11951
|
+
split: "",
|
|
11952
|
+
size: 0
|
|
11953
|
+
}, {
|
|
11954
|
+
default: withCtx(() => [
|
|
11955
|
+
createVNode(S, {
|
|
11956
|
+
action: p.uploadUrl,
|
|
11957
|
+
"before-upload": O.showFile,
|
|
11958
|
+
"show-upload-list": !1,
|
|
11959
|
+
"on-success": O.onSuccess
|
|
11960
|
+
}, {
|
|
11961
|
+
default: withCtx(() => [
|
|
11962
|
+
createVNode(N, {
|
|
11963
|
+
icon: "ios-cloud-upload",
|
|
11964
|
+
title: "上传文件",
|
|
11965
|
+
onClick: f[0] || (f[0] = () => {
|
|
11966
|
+
})
|
|
11967
|
+
}, {
|
|
11968
|
+
default: withCtx(() => [...f[2] || (f[2] = [
|
|
11969
|
+
createTextVNode("上传文件", -1)
|
|
11970
|
+
])]),
|
|
11971
|
+
_: 1
|
|
11972
|
+
})
|
|
11973
|
+
]),
|
|
11974
|
+
_: 1
|
|
11975
|
+
}, 8, ["action", "before-upload", "on-success"]),
|
|
11976
|
+
createVNode(N, {
|
|
11977
|
+
icon: "ios-cloud-download",
|
|
11978
|
+
title: "上传文件",
|
|
11979
|
+
onClick: O.downloadFile
|
|
11980
|
+
}, {
|
|
11981
|
+
default: withCtx(() => [...f[3] || (f[3] = [
|
|
11982
|
+
createTextVNode("下载文件", -1)
|
|
11983
|
+
])]),
|
|
11984
|
+
_: 1
|
|
11985
|
+
}, 8, ["onClick"])
|
|
11986
|
+
]),
|
|
11987
|
+
_: 1
|
|
11988
|
+
})
|
|
11989
|
+
]),
|
|
11990
|
+
_: 1
|
|
11991
|
+
}, 8, ["modelValue", "on-change"]),
|
|
11992
|
+
f[4] || (f[4] = createElementVNode("div", { class: "msg" }, null, -1))
|
|
11993
|
+
]);
|
|
11994
|
+
}
|
|
11995
|
+
const FileUpload = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7]]);
|
|
11996
|
+
withDefaults(defineProps(), {
|
|
11997
|
+
item: () => ({}),
|
|
11998
|
+
// 为 object 类型提供默认空对象
|
|
11999
|
+
data: () => ({}),
|
|
12000
|
+
status: 0
|
|
12001
|
+
// 为 number 类型提供默认值
|
|
12002
|
+
});
|
|
12003
|
+
const _sfc_main$7 = {
|
|
12004
|
+
components: { FileUpload },
|
|
12005
|
+
props: {
|
|
12006
|
+
item: { type: Object },
|
|
12007
|
+
data: Object,
|
|
12008
|
+
status: Number
|
|
12009
|
+
},
|
|
12010
|
+
methods: {
|
|
12011
|
+
/**
|
|
12012
|
+
* 打开数据字典选择器
|
|
12013
|
+
* @param fieldName 字段名
|
|
12014
|
+
*/
|
|
12015
|
+
showDataDict(m) {
|
|
12016
|
+
const { dataDictId: f, dataDictIdField: p } = this.item?.ext_attribs;
|
|
12017
|
+
console.log(f), console.log(this.data), console.log(m);
|
|
12018
|
+
},
|
|
12019
|
+
/**
|
|
12020
|
+
* 子组件触发父组件的事件,保存值。该函数可通用
|
|
12021
|
+
*
|
|
12022
|
+
* @param e
|
|
12023
|
+
* @param name
|
|
12024
|
+
*/
|
|
12025
|
+
handleModelUpdate(m, f) {
|
|
12026
|
+
this.data[f] = m;
|
|
12027
|
+
}
|
|
12028
|
+
}
|
|
12029
|
+
}, _hoisted_1$3 = { key: 0 }, _hoisted_2$3 = ["innerHTML"], _hoisted_3$2 = { key: 1 }, _hoisted_4$1 = { key: 1 }, _hoisted_5$1 = { key: 7 }, _hoisted_6$1 = { key: 12 }, _hoisted_7$1 = { key: 14 }, _hoisted_8 = ["src"];
|
|
12030
|
+
function _sfc_render$6(m, f, p, t, $, O) {
|
|
12031
|
+
const N = resolveComponent("Input"), S = resolveComponent("DatePicker"), ye = resolveComponent("Slider"), Ee = resolveComponent("i-Switch"), _e = resolveComponent("Tooltip"), Nt = resolveComponent("Option"), cn = resolveComponent("Select"), He = resolveComponent("Radio"), Ce = resolveComponent("RadioGroup"), kt = resolveComponent("Button"), un = resolveComponent("Checkbox"), ne = resolveComponent("CheckboxGroup"), D = resolveComponent("FileUpload"), dn = resolveComponent("FormItem");
|
|
12032
|
+
return openBlock(), createBlock(dn, {
|
|
12033
|
+
label: p.item.label
|
|
12034
|
+
}, {
|
|
12035
|
+
default: withCtx(() => [
|
|
12036
|
+
p.status === 0 ? (openBlock(), createElementBlock("span", _hoisted_1$3, [
|
|
12037
|
+
p.item.uiType == 8 ? (openBlock(), createElementBlock("span", {
|
|
12038
|
+
key: 0,
|
|
12039
|
+
innerHTML: p.data[p.item.name],
|
|
12040
|
+
class: "html-content"
|
|
12041
|
+
}, null, 8, _hoisted_2$3)) : (openBlock(), createElementBlock("span", _hoisted_3$2, toDisplayString(p.data[p.item.name]), 1))
|
|
12042
|
+
])) : createCommentVNode("", !0),
|
|
12043
|
+
p.status !== 0 ? (openBlock(), createElementBlock("span", _hoisted_4$1, [
|
|
12044
|
+
p.item.uiType == 1 ? (openBlock(), createBlock(N, {
|
|
12045
|
+
key: 0,
|
|
12046
|
+
type: "text",
|
|
12047
|
+
modelValue: p.data[p.item.name],
|
|
12048
|
+
"onUpdate:modelValue": f[0] || (f[0] = (ue) => p.data[p.item.name] = ue),
|
|
12049
|
+
placeholder: p.item.comment,
|
|
12050
|
+
readonly: p.item.ext_attribs && p.item.ext_attribs.isReadonly
|
|
12051
|
+
}, null, 8, ["modelValue", "placeholder", "readonly"])) : createCommentVNode("", !0),
|
|
12052
|
+
p.item.uiType == 6 ? (openBlock(), createBlock(N, {
|
|
12053
|
+
key: 1,
|
|
12054
|
+
type: "textarea",
|
|
12055
|
+
modelValue: p.data[p.item.name],
|
|
12056
|
+
"onUpdate:modelValue": f[1] || (f[1] = (ue) => p.data[p.item.name] = ue),
|
|
12057
|
+
placeholder: p.item.comment
|
|
12058
|
+
}, null, 8, ["modelValue", "placeholder"])) : createCommentVNode("", !0),
|
|
12059
|
+
p.item.uiType == 11 ? (openBlock(), createBlock(N, {
|
|
12060
|
+
key: 2,
|
|
12061
|
+
type: "number",
|
|
12062
|
+
modelValue: p.data[p.item.name],
|
|
12063
|
+
"onUpdate:modelValue": f[2] || (f[2] = (ue) => p.data[p.item.name] = ue),
|
|
12064
|
+
placeholder: p.item.comment
|
|
12065
|
+
}, null, 8, ["modelValue", "placeholder"])) : createCommentVNode("", !0),
|
|
12066
|
+
p.item.uiType == 18 ? (openBlock(), createBlock(N, {
|
|
12067
|
+
key: 3,
|
|
12068
|
+
type: "password",
|
|
12069
|
+
modelValue: p.data[p.item.name],
|
|
12070
|
+
"onUpdate:modelValue": f[3] || (f[3] = (ue) => p.data[p.item.name] = ue),
|
|
12071
|
+
placeholder: p.item.comment
|
|
12072
|
+
}, null, 8, ["modelValue", "placeholder"])) : createCommentVNode("", !0),
|
|
12073
|
+
p.item.uiType == 12 ? (openBlock(), createBlock(N, {
|
|
12074
|
+
key: 4,
|
|
12075
|
+
type: "email",
|
|
12076
|
+
modelValue: p.data[p.item.name],
|
|
12077
|
+
"onUpdate:modelValue": f[4] || (f[4] = (ue) => p.data[p.item.name] = ue),
|
|
12078
|
+
placeholder: p.item.comment
|
|
12079
|
+
}, null, 8, ["modelValue", "placeholder"])) : createCommentVNode("", !0),
|
|
12080
|
+
p.item.uiType == 5 ? (openBlock(), createBlock(S, {
|
|
12081
|
+
key: 5,
|
|
12082
|
+
type: "date",
|
|
12083
|
+
modelValue: p.data[p.item.name],
|
|
12084
|
+
"onUpdate:modelValue": f[5] || (f[5] = (ue) => p.data[p.item.name] = ue),
|
|
12085
|
+
placeholder: "选择日期",
|
|
12086
|
+
style: { width: "200px" }
|
|
12087
|
+
}, null, 8, ["modelValue"])) : createCommentVNode("", !0),
|
|
12088
|
+
p.item.uiType == 10 ? (openBlock(), createBlock(ye, {
|
|
12089
|
+
key: 6,
|
|
12090
|
+
modelValue: m.value2,
|
|
12091
|
+
"onUpdate:modelValue": f[6] || (f[6] = (ue) => m.value2 = ue),
|
|
12092
|
+
range: ""
|
|
12093
|
+
}, null, 8, ["modelValue"])) : createCommentVNode("", !0),
|
|
12094
|
+
p.item.uiType == 7 ? (openBlock(), createElementBlock("span", _hoisted_5$1, [
|
|
12095
|
+
createVNode(Ee, {
|
|
12096
|
+
modelValue: p.data[p.item.name],
|
|
12097
|
+
"onUpdate:modelValue": f[7] || (f[7] = (ue) => p.data[p.item.name] = ue),
|
|
12098
|
+
size: "middle"
|
|
12099
|
+
}, null, 8, ["modelValue"]),
|
|
12100
|
+
f[17] || (f[17] = createTextVNode(" ", -1)),
|
|
12101
|
+
p.item.comment ? (openBlock(), createBlock(_e, {
|
|
12102
|
+
key: 0,
|
|
12103
|
+
content: p.item.comment,
|
|
12104
|
+
placement: "right"
|
|
12105
|
+
}, {
|
|
12106
|
+
default: withCtx(() => [...f[16] || (f[16] = [
|
|
12107
|
+
createElementVNode("i", { class: "ivu-icon ivu-icon-ios-help-circle-outline" }, null, -1)
|
|
12108
|
+
])]),
|
|
12109
|
+
_: 1
|
|
12110
|
+
}, 8, ["content"])) : createCommentVNode("", !0)
|
|
12111
|
+
])) : createCommentVNode("", !0),
|
|
12112
|
+
p.item.uiType == 2 && p.item.ext_attribs ? (openBlock(), createBlock(cn, {
|
|
12113
|
+
key: 8,
|
|
12114
|
+
modelValue: p.data[p.item.name],
|
|
12115
|
+
"onUpdate:modelValue": f[8] || (f[8] = (ue) => p.data[p.item.name] = ue)
|
|
12116
|
+
}, {
|
|
12117
|
+
default: withCtx(() => [
|
|
12118
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(p.item.ext_attribs.candidateData, (ue, hn) => (openBlock(), createBlock(Nt, {
|
|
12119
|
+
key: hn,
|
|
12120
|
+
value: ue.value
|
|
12121
|
+
}, {
|
|
12122
|
+
default: withCtx(() => [
|
|
12123
|
+
createTextVNode(toDisplayString(ue.name), 1)
|
|
12124
|
+
]),
|
|
12125
|
+
_: 2
|
|
12126
|
+
}, 1032, ["value"]))), 128))
|
|
12127
|
+
]),
|
|
12128
|
+
_: 1
|
|
12129
|
+
}, 8, ["modelValue"])) : createCommentVNode("", !0),
|
|
12130
|
+
p.item.uiType == 3 && p.item.ext_attribs ? (openBlock(), createBlock(Ce, {
|
|
12131
|
+
key: 9,
|
|
12132
|
+
modelValue: p.data[p.item.name],
|
|
12133
|
+
"onUpdate:modelValue": f[9] || (f[9] = (ue) => p.data[p.item.name] = ue)
|
|
12134
|
+
}, {
|
|
12135
|
+
default: withCtx(() => [
|
|
12136
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(p.item.ext_attribs.candidateData, (ue, hn) => (openBlock(), createBlock(He, {
|
|
12137
|
+
key: hn,
|
|
12138
|
+
label: ue.value
|
|
12139
|
+
}, {
|
|
12140
|
+
default: withCtx(() => [
|
|
12141
|
+
createElementVNode("span", null, toDisplayString(ue.name), 1)
|
|
12142
|
+
]),
|
|
12143
|
+
_: 2
|
|
12144
|
+
}, 1032, ["label"]))), 128))
|
|
12145
|
+
]),
|
|
12146
|
+
_: 1
|
|
12147
|
+
}, 8, ["modelValue"])) : createCommentVNode("", !0),
|
|
12148
|
+
p.item.uiType == 15 ? (openBlock(), createBlock(Ce, {
|
|
12149
|
+
key: 10,
|
|
12150
|
+
modelValue: p.data[p.item.name],
|
|
12151
|
+
"onUpdate:modelValue": f[10] || (f[10] = (ue) => p.data[p.item.name] = ue)
|
|
12152
|
+
}, {
|
|
12153
|
+
default: withCtx(() => [
|
|
12154
|
+
createVNode(He, { label: "1" }, {
|
|
12155
|
+
default: withCtx(() => [...f[18] || (f[18] = [
|
|
12156
|
+
createElementVNode("span", null, "男", -1)
|
|
12157
|
+
])]),
|
|
12158
|
+
_: 1
|
|
12159
|
+
}),
|
|
12160
|
+
createVNode(He, { label: "2" }, {
|
|
12161
|
+
default: withCtx(() => [...f[19] || (f[19] = [
|
|
12162
|
+
createElementVNode("span", null, "女", -1)
|
|
12163
|
+
])]),
|
|
12164
|
+
_: 1
|
|
12165
|
+
}),
|
|
12166
|
+
createVNode(He, { label: "0" }, {
|
|
12167
|
+
default: withCtx(() => [...f[20] || (f[20] = [
|
|
12168
|
+
createElementVNode("span", null, "未知", -1)
|
|
12169
|
+
])]),
|
|
12170
|
+
_: 1
|
|
12171
|
+
})
|
|
12172
|
+
]),
|
|
12173
|
+
_: 1
|
|
12174
|
+
}, 8, ["modelValue"])) : createCommentVNode("", !0),
|
|
12175
|
+
p.item.uiType == 19 ? (openBlock(), createBlock(Ce, {
|
|
12176
|
+
key: 11,
|
|
12177
|
+
modelValue: p.data[p.item.name],
|
|
12178
|
+
"onUpdate:modelValue": f[11] || (f[11] = (ue) => p.data[p.item.name] = ue)
|
|
12179
|
+
}, {
|
|
12180
|
+
default: withCtx(() => [
|
|
12181
|
+
createVNode(He, { label: -1 }, {
|
|
12182
|
+
default: withCtx(() => [...f[21] || (f[21] = [
|
|
12183
|
+
createElementVNode("span", null, "草稿", -1)
|
|
12184
|
+
])]),
|
|
12185
|
+
_: 1
|
|
12186
|
+
}),
|
|
12187
|
+
createVNode(He, { label: 0 }, {
|
|
12188
|
+
default: withCtx(() => [...f[22] || (f[22] = [
|
|
12189
|
+
createElementVNode("span", null, "正常", -1)
|
|
12190
|
+
])]),
|
|
12191
|
+
_: 1
|
|
12192
|
+
}),
|
|
12193
|
+
createVNode(He, { label: 1 }, {
|
|
12194
|
+
default: withCtx(() => [...f[23] || (f[23] = [
|
|
12195
|
+
createElementVNode("span", null, "已删除", -1)
|
|
12196
|
+
])]),
|
|
12197
|
+
_: 1
|
|
12198
|
+
}),
|
|
12199
|
+
createVNode(He, { label: 2 }, {
|
|
12200
|
+
default: withCtx(() => [...f[24] || (f[24] = [
|
|
12201
|
+
createElementVNode("span", null, "已禁用", -1)
|
|
12202
|
+
])]),
|
|
12203
|
+
_: 1
|
|
12204
|
+
})
|
|
12205
|
+
]),
|
|
12206
|
+
_: 1
|
|
12207
|
+
}, 8, ["modelValue"])) : createCommentVNode("", !0),
|
|
12208
|
+
p.item.uiType == 21 ? (openBlock(), createElementBlock("span", _hoisted_6$1, toDisplayString(p.data[p.item.name] | m.formatDateLong), 1)) : createCommentVNode("", !0),
|
|
12209
|
+
p.item.uiType == 22 ? (openBlock(), createBlock(N, {
|
|
12210
|
+
key: 13,
|
|
12211
|
+
readonly: "",
|
|
12212
|
+
modelValue: p.data[p.item.name],
|
|
12213
|
+
"onUpdate:modelValue": f[13] || (f[13] = (ue) => p.data[p.item.name] = ue),
|
|
12214
|
+
placeholder: p.item.comment
|
|
12215
|
+
}, {
|
|
12216
|
+
append: withCtx(() => [
|
|
12217
|
+
createVNode(kt, {
|
|
12218
|
+
icon: "md-bookmarks",
|
|
12219
|
+
title: "数据字典",
|
|
12220
|
+
onClick: f[12] || (f[12] = (ue) => O.showDataDict(p.item.name))
|
|
12221
|
+
})
|
|
12222
|
+
]),
|
|
12223
|
+
_: 1
|
|
12224
|
+
}, 8, ["modelValue", "placeholder"])) : createCommentVNode("", !0),
|
|
12225
|
+
p.item.uiType == 17 ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
|
|
12226
|
+
createElementVNode("img", {
|
|
12227
|
+
src: p.data[p.item.name],
|
|
12228
|
+
alt: "图片",
|
|
12229
|
+
style: { "max-width": "90%" }
|
|
12230
|
+
}, null, 8, _hoisted_8)
|
|
12231
|
+
])) : createCommentVNode("", !0),
|
|
12232
|
+
p.item.uiType == 4 && p.item.ext_attribs ? (openBlock(), createBlock(ne, {
|
|
12233
|
+
key: 15,
|
|
12234
|
+
modelValue: p.data[p.item.name],
|
|
12235
|
+
"onUpdate:modelValue": f[14] || (f[14] = (ue) => p.data[p.item.name] = ue)
|
|
12236
|
+
}, {
|
|
12237
|
+
default: withCtx(() => [
|
|
12238
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(p.item.ext_attribs.candidateData, (ue, hn) => (openBlock(), createBlock(un, {
|
|
12239
|
+
key: hn,
|
|
12240
|
+
label: ue.value
|
|
12241
|
+
}, {
|
|
12242
|
+
default: withCtx(() => [
|
|
12243
|
+
createTextVNode(toDisplayString(ue.name), 1)
|
|
12244
|
+
]),
|
|
12245
|
+
_: 2
|
|
12246
|
+
}, 1032, ["label"]))), 128))
|
|
12247
|
+
]),
|
|
12248
|
+
_: 1
|
|
12249
|
+
}, 8, ["modelValue"])) : createCommentVNode("", !0),
|
|
12250
|
+
p.item.uiType == 9 ? (openBlock(), createBlock(D, {
|
|
12251
|
+
key: 16,
|
|
12252
|
+
"upload-url": p.item.ext_attribs.uploadUrl,
|
|
12253
|
+
value: p.data[p.item.name],
|
|
12254
|
+
"onUpdate:modelValue": f[15] || (f[15] = (ue) => O.handleModelUpdate(ue, p.item.name))
|
|
12255
|
+
}, null, 8, ["upload-url", "value"])) : createCommentVNode("", !0)
|
|
12256
|
+
])) : createCommentVNode("", !0)
|
|
12257
|
+
]),
|
|
12258
|
+
_: 1
|
|
12259
|
+
}, 8, ["label"]);
|
|
12260
|
+
}
|
|
12261
|
+
const ItemRender = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6]]), _sfc_main$6 = {
|
|
12262
|
+
components: { ItemRender },
|
|
12387
12263
|
props: {
|
|
12388
|
-
|
|
12389
|
-
required: !0
|
|
12390
|
-
},
|
|
12391
|
-
uploadUrl: {
|
|
12392
|
-
type: String,
|
|
12393
|
-
required: !0
|
|
12394
|
-
}
|
|
12264
|
+
cfg: { type: Object, required: !0 }
|
|
12395
12265
|
},
|
|
12396
12266
|
data() {
|
|
12397
|
-
return {
|
|
12267
|
+
return {
|
|
12268
|
+
index: 1,
|
|
12269
|
+
formDynamic: {
|
|
12270
|
+
fields: this.cfg.fields
|
|
12271
|
+
},
|
|
12272
|
+
data: {},
|
|
12273
|
+
// 数据
|
|
12274
|
+
status: 1
|
|
12275
|
+
// 0=查看/1=新增/2=修改
|
|
12276
|
+
};
|
|
12398
12277
|
},
|
|
12399
|
-
|
|
12400
|
-
|
|
12401
|
-
|
|
12278
|
+
render() {
|
|
12279
|
+
if (!this.cfg.fields || !this.cfg.fields.length)
|
|
12280
|
+
return;
|
|
12281
|
+
let m = [], f = [], p = [];
|
|
12282
|
+
for (let $ = 0, O = this.cfg.fields.length; $ < O; $++) {
|
|
12283
|
+
let N = this.cfg.fields[$];
|
|
12284
|
+
if (N.isShow) {
|
|
12285
|
+
let S = N.uiLayout, ye = [h(ItemRender, { item: N, data: this.data, status: this.status })];
|
|
12286
|
+
S == 1 ? m.push([h(viewuiplus_minExports.Col, { span: 24 }, { default: () => ye })]) : S == 2 ? (f.push([h(viewuiplus_minExports.Col, { span: 12 }, { default: () => ye })]), f.length == 2 && (m.push(f), f = [])) : S == 3 && (p.push([h(viewuiplus_minExports.Col, { span: 8 }, { default: () => ye })]), p.length == 3 && (m.push(p), p = []));
|
|
12287
|
+
}
|
|
12402
12288
|
}
|
|
12289
|
+
const t = [];
|
|
12290
|
+
return m.forEach(($) => t.push(h(viewuiplus_minExports.Row, $))), h(viewuiplus_minExports.Form, { ref: "formDynamic", "label-width": this.cfg.labelWidth || 80, "label-colon": this.status === 0 }, { default: () => t });
|
|
12403
12291
|
},
|
|
12404
12292
|
methods: {
|
|
12405
|
-
|
|
12406
|
-
|
|
12293
|
+
handleAdd() {
|
|
12294
|
+
this.index++, this.formDynamic.fields.push({
|
|
12295
|
+
value: "",
|
|
12296
|
+
index: this.index,
|
|
12297
|
+
status: 1
|
|
12298
|
+
});
|
|
12299
|
+
}
|
|
12300
|
+
}
|
|
12301
|
+
}, _sfc_main$5 = defineComponent({
|
|
12302
|
+
setup() {
|
|
12303
|
+
return { FromRenderer: ref() };
|
|
12304
|
+
},
|
|
12305
|
+
components: { FromRenderer: _sfc_main$6 },
|
|
12306
|
+
props: {
|
|
12307
|
+
id: { type: Number, required: !1 },
|
|
12308
|
+
// 表单配置 id
|
|
12309
|
+
isShowInfoBtn: { type: Boolean, required: !1, default: !1 },
|
|
12310
|
+
// 是否显示加载 info,以便于调试
|
|
12311
|
+
isShowBtns: { type: Boolean, required: !1, default: !0 }
|
|
12312
|
+
// 是否显示按钮,还是自定义按钮?
|
|
12313
|
+
},
|
|
12314
|
+
data() {
|
|
12315
|
+
return {
|
|
12316
|
+
formId: this.id || 0,
|
|
12317
|
+
// 表单定义 id
|
|
12318
|
+
entityId: 0,
|
|
12319
|
+
// 实体 id
|
|
12320
|
+
cfg: { fields: [] },
|
|
12321
|
+
status: 1,
|
|
12322
|
+
// 0=查看/1=新增/2=修改
|
|
12323
|
+
oldJson: null
|
|
12324
|
+
// JSON Based 下的旧 JSON 完整数据。因为 data 只有部分
|
|
12325
|
+
};
|
|
12326
|
+
},
|
|
12327
|
+
mounted() {
|
|
12328
|
+
this.$route.query.id && (this.entityId = Number(this.$route.query.id)), this.formId && this.load();
|
|
12329
|
+
},
|
|
12330
|
+
methods: {
|
|
12331
|
+
/**
|
|
12332
|
+
* 加载表单配置
|
|
12333
|
+
*/
|
|
12334
|
+
load() {
|
|
12335
|
+
console.log("加载表单配置"), this.entityId ? this.status = 2 : (this.status = 1, this.FromRenderer.data = {}), xhr_fetch.get(`${window.config.dsApiRoot}/common_api/ds_widget_config/${this.formId}`, (m) => {
|
|
12336
|
+
m && m.status ? (this.cfg = m.data.config, this.entityId && this.loadInfo()) : this.$Message.error("获取表单配置失败");
|
|
12337
|
+
});
|
|
12407
12338
|
},
|
|
12408
|
-
|
|
12409
|
-
|
|
12339
|
+
/**
|
|
12340
|
+
* 重置表单,但没作用
|
|
12341
|
+
*/
|
|
12342
|
+
resetFields() {
|
|
12343
|
+
this.FromRenderer.$refs.formDynamic.resetFields();
|
|
12410
12344
|
},
|
|
12411
|
-
|
|
12412
|
-
|
|
12413
|
-
|
|
12414
|
-
|
|
12415
|
-
const
|
|
12416
|
-
|
|
12345
|
+
/**
|
|
12346
|
+
* 创建
|
|
12347
|
+
*/
|
|
12348
|
+
create() {
|
|
12349
|
+
const m = this.cfg.infoApi;
|
|
12350
|
+
if (!m) {
|
|
12351
|
+
console.error("API doesn't exist");
|
|
12352
|
+
return;
|
|
12353
|
+
}
|
|
12354
|
+
const f = this._getSaveData();
|
|
12355
|
+
delete f.id, xhr_fetch.post(window.config.dsApiRoot + m, f, (p) => {
|
|
12356
|
+
p.status ? (this.status = 2, this.$Message.success("创建成功")) : this.$Message.error(p.message || "失败,原因未知!");
|
|
12357
|
+
});
|
|
12358
|
+
},
|
|
12359
|
+
/**
|
|
12360
|
+
* 更新
|
|
12361
|
+
*/
|
|
12362
|
+
update() {
|
|
12363
|
+
const m = this.cfg.infoApi;
|
|
12364
|
+
if (!m) {
|
|
12365
|
+
console.error("API doesn't exist");
|
|
12366
|
+
return;
|
|
12367
|
+
}
|
|
12368
|
+
const f = this._getSaveData();
|
|
12369
|
+
xhr_fetch.put(window.config.dsApiRoot + m, f, (p) => {
|
|
12370
|
+
p.status ? this.$Message.success("保存成功") : this.$Message.error(p.message || "失败,原因未知!");
|
|
12371
|
+
});
|
|
12417
12372
|
},
|
|
12418
|
-
|
|
12419
|
-
|
|
12373
|
+
_getSaveData() {
|
|
12374
|
+
let m = {};
|
|
12375
|
+
Object.assign(m, this.FromRenderer.data);
|
|
12376
|
+
for (let f in m) {
|
|
12377
|
+
const p = m[f];
|
|
12378
|
+
p instanceof Date && (m[f] = date_format.formatDate.call(p));
|
|
12379
|
+
}
|
|
12380
|
+
return delete m.creator, delete m.creatorId, delete m.createDate, delete m.updater, delete m.createDate, delete m.updaterId, delete m.updateDate, m = camelToSnake(m), m;
|
|
12381
|
+
},
|
|
12382
|
+
/**
|
|
12383
|
+
* 加载详情
|
|
12384
|
+
*/
|
|
12385
|
+
loadInfo() {
|
|
12386
|
+
const m = this.cfg.infoApi;
|
|
12387
|
+
if (!m) {
|
|
12388
|
+
console.error("API doesn't exist");
|
|
12389
|
+
return;
|
|
12390
|
+
}
|
|
12391
|
+
xhr_fetch.get(window.config.dsApiRoot + m + "/" + this.entityId, (f) => {
|
|
12392
|
+
f && f.status && (console.log(f.data), this.FromRenderer.data = f.data, this.status = 2);
|
|
12393
|
+
});
|
|
12420
12394
|
}
|
|
12421
12395
|
}
|
|
12422
|
-
};
|
|
12423
|
-
function
|
|
12424
|
-
if (
|
|
12425
|
-
|
|
12396
|
+
});
|
|
12397
|
+
function camelToSnake(m) {
|
|
12398
|
+
if (m == null || typeof m != "object")
|
|
12399
|
+
return m;
|
|
12400
|
+
if (Array.isArray(m))
|
|
12401
|
+
return m.map((p) => camelToSnake(p));
|
|
12402
|
+
const f = {};
|
|
12403
|
+
for (const [p, t] of Object.entries(m)) {
|
|
12404
|
+
const $ = p.replace(/[A-Z]/g, (O) => `_${O.toLowerCase()}`);
|
|
12405
|
+
f[$] = camelToSnake(t);
|
|
12406
|
+
}
|
|
12407
|
+
return f;
|
|
12426
12408
|
}
|
|
12427
|
-
|
|
12428
|
-
|
|
12429
|
-
|
|
12430
|
-
|
|
12431
|
-
|
|
12432
|
-
|
|
12433
|
-
|
|
12434
|
-
|
|
12435
|
-
"
|
|
12436
|
-
|
|
12437
|
-
|
|
12409
|
+
const _hoisted_1$2 = {
|
|
12410
|
+
key: 0,
|
|
12411
|
+
class: "btns"
|
|
12412
|
+
}, _hoisted_2$2 = { key: 0 };
|
|
12413
|
+
function _sfc_render$5(m, f, p, t, $, O) {
|
|
12414
|
+
const N = resolveComponent("FromRenderer"), S = resolveComponent("Input"), ye = resolveComponent("Button");
|
|
12415
|
+
return openBlock(), createElementBlock("div", null, [
|
|
12416
|
+
createVNode(N, {
|
|
12417
|
+
ref: "FromRenderer",
|
|
12418
|
+
cfg: m.cfg
|
|
12419
|
+
}, null, 8, ["cfg"]),
|
|
12420
|
+
m.isShowBtns ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
12421
|
+
m.isShowInfoBtn ? (openBlock(), createElementBlock("span", _hoisted_2$2, [
|
|
12422
|
+
createVNode(S, {
|
|
12423
|
+
style: { width: "50px" },
|
|
12424
|
+
modelValue: m.entityId,
|
|
12425
|
+
"onUpdate:modelValue": f[0] || (f[0] = (Ee) => m.entityId = Ee)
|
|
12426
|
+
}, null, 8, ["modelValue"]),
|
|
12427
|
+
f[3] || (f[3] = createTextVNode()),
|
|
12438
12428
|
createVNode(ye, {
|
|
12439
|
-
|
|
12440
|
-
|
|
12429
|
+
style: { width: "90px" },
|
|
12430
|
+
onClick: m.loadInfo
|
|
12441
12431
|
}, {
|
|
12442
|
-
default: withCtx(() => [
|
|
12443
|
-
|
|
12444
|
-
|
|
12445
|
-
"before-upload": O.showFile,
|
|
12446
|
-
"show-upload-list": !1,
|
|
12447
|
-
"on-success": O.onSuccess
|
|
12448
|
-
}, {
|
|
12449
|
-
default: withCtx(() => [
|
|
12450
|
-
createVNode(N, {
|
|
12451
|
-
icon: "ios-cloud-upload",
|
|
12452
|
-
title: "上传文件",
|
|
12453
|
-
onClick: f[0] || (f[0] = () => {
|
|
12454
|
-
})
|
|
12455
|
-
}, {
|
|
12456
|
-
default: withCtx(() => [...f[2] || (f[2] = [
|
|
12457
|
-
createTextVNode("上传文件", -1)
|
|
12458
|
-
])]),
|
|
12459
|
-
_: 1
|
|
12460
|
-
})
|
|
12461
|
-
]),
|
|
12462
|
-
_: 1
|
|
12463
|
-
}, 8, ["action", "before-upload", "on-success"]),
|
|
12464
|
-
createVNode(N, {
|
|
12465
|
-
icon: "ios-cloud-download",
|
|
12466
|
-
title: "上传文件",
|
|
12467
|
-
onClick: O.downloadFile
|
|
12468
|
-
}, {
|
|
12469
|
-
default: withCtx(() => [...f[3] || (f[3] = [
|
|
12470
|
-
createTextVNode("下载文件", -1)
|
|
12471
|
-
])]),
|
|
12472
|
-
_: 1
|
|
12473
|
-
}, 8, ["onClick"])
|
|
12474
|
-
]),
|
|
12432
|
+
default: withCtx(() => [...f[2] || (f[2] = [
|
|
12433
|
+
createTextVNode("加载", -1)
|
|
12434
|
+
])]),
|
|
12475
12435
|
_: 1
|
|
12476
|
-
})
|
|
12477
|
-
]),
|
|
12478
|
-
|
|
12479
|
-
|
|
12480
|
-
|
|
12436
|
+
}, 8, ["onClick"])
|
|
12437
|
+
])) : createCommentVNode("", !0),
|
|
12438
|
+
m.status === 1 ? (openBlock(), createBlock(ye, {
|
|
12439
|
+
key: 1,
|
|
12440
|
+
type: "primary",
|
|
12441
|
+
onClick: m.create
|
|
12442
|
+
}, {
|
|
12443
|
+
default: withCtx(() => [...f[4] || (f[4] = [
|
|
12444
|
+
createTextVNode("创建", -1)
|
|
12445
|
+
])]),
|
|
12446
|
+
_: 1
|
|
12447
|
+
}, 8, ["onClick"])) : createCommentVNode("", !0),
|
|
12448
|
+
m.status === 2 ? (openBlock(), createBlock(ye, {
|
|
12449
|
+
key: 2,
|
|
12450
|
+
type: "primary",
|
|
12451
|
+
onClick: m.update
|
|
12452
|
+
}, {
|
|
12453
|
+
default: withCtx(() => [...f[5] || (f[5] = [
|
|
12454
|
+
createTextVNode("保存", -1)
|
|
12455
|
+
])]),
|
|
12456
|
+
_: 1
|
|
12457
|
+
}, 8, ["onClick"])) : createCommentVNode("", !0),
|
|
12458
|
+
m.status !== 0 ? (openBlock(), createBlock(ye, {
|
|
12459
|
+
key: 3,
|
|
12460
|
+
onClick: m.resetFields
|
|
12461
|
+
}, {
|
|
12462
|
+
default: withCtx(() => [...f[6] || (f[6] = [
|
|
12463
|
+
createTextVNode("重置", -1)
|
|
12464
|
+
])]),
|
|
12465
|
+
_: 1
|
|
12466
|
+
}, 8, ["onClick"])) : createCommentVNode("", !0),
|
|
12467
|
+
createVNode(ye, {
|
|
12468
|
+
onClick: f[1] || (f[1] = (Ee) => m.$router.back())
|
|
12469
|
+
}, {
|
|
12470
|
+
default: withCtx(() => [...f[7] || (f[7] = [
|
|
12471
|
+
createTextVNode("返回", -1)
|
|
12472
|
+
])]),
|
|
12473
|
+
_: 1
|
|
12474
|
+
})
|
|
12475
|
+
])) : createCommentVNode("", !0)
|
|
12481
12476
|
]);
|
|
12482
12477
|
}
|
|
12483
|
-
const
|
|
12484
|
-
|
|
12485
|
-
|
|
12486
|
-
// 为 object 类型提供默认空对象
|
|
12487
|
-
data: () => ({}),
|
|
12488
|
-
status: 0
|
|
12489
|
-
// 为 number 类型提供默认值
|
|
12490
|
-
});
|
|
12491
|
-
const _sfc_main$4 = {
|
|
12492
|
-
components: { FileUpload },
|
|
12478
|
+
const FormLoader = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5], ["__scopeId", "data-v-6ef96497"]]), _sfc_main$4 = defineComponent({
|
|
12479
|
+
name: "ListLoader",
|
|
12480
|
+
components: { FormLoader },
|
|
12493
12481
|
props: {
|
|
12494
|
-
|
|
12495
|
-
|
|
12496
|
-
|
|
12482
|
+
apiPrefix: { type: String, required: !1 },
|
|
12483
|
+
// API 前缀
|
|
12484
|
+
createRoute: { type: String, required: !1 },
|
|
12485
|
+
// 新建事件触发时候,进入的路由地址
|
|
12486
|
+
editRoute: { type: String, required: !1 },
|
|
12487
|
+
// 编辑事件触发时候,进入的路由地址
|
|
12488
|
+
defaultAction: { type: Boolean, required: !1, default: !0 },
|
|
12489
|
+
id: { type: Number, required: !1, default: 0 },
|
|
12490
|
+
showSearch: { type: Boolean, required: !1, default: !0 },
|
|
12491
|
+
modalInfo: { type: Boolean, required: !1, default: !0 },
|
|
12492
|
+
// 是否弹窗显示详情,false 为进入新页面
|
|
12493
|
+
showCreateBtn: { type: Boolean, default: !1 },
|
|
12494
|
+
// 是否显示创建按钮
|
|
12495
|
+
showEditBtn: { type: Boolean, default: !0 },
|
|
12496
|
+
// 是否显示 编辑 按钮
|
|
12497
|
+
editBtnAsView: { type: Boolean, default: !1 }
|
|
12498
|
+
// 是否改编辑按钮为查看按钮
|
|
12499
|
+
},
|
|
12500
|
+
data() {
|
|
12501
|
+
return {
|
|
12502
|
+
widgetName_: "",
|
|
12503
|
+
cfg: { fields: [] },
|
|
12504
|
+
listApiUrl_: "",
|
|
12505
|
+
colDefId: this.id,
|
|
12506
|
+
list: {
|
|
12507
|
+
columns: [],
|
|
12508
|
+
data: [],
|
|
12509
|
+
total: 0,
|
|
12510
|
+
start: 0,
|
|
12511
|
+
limit: 9,
|
|
12512
|
+
pageNo: 1,
|
|
12513
|
+
pageSize: 9,
|
|
12514
|
+
loading: !1,
|
|
12515
|
+
search: {
|
|
12516
|
+
name: ""
|
|
12517
|
+
}
|
|
12518
|
+
},
|
|
12519
|
+
isShowForm: !1,
|
|
12520
|
+
bindingFormId: 0
|
|
12521
|
+
};
|
|
12522
|
+
},
|
|
12523
|
+
mounted() {
|
|
12524
|
+
this.id && this.getRemoteColDef();
|
|
12497
12525
|
},
|
|
12498
12526
|
methods: {
|
|
12499
12527
|
/**
|
|
12500
|
-
*
|
|
12501
|
-
|
|
12528
|
+
* 加载列定义
|
|
12529
|
+
*/
|
|
12530
|
+
getRemoteColDef() {
|
|
12531
|
+
xhr_fetch.get(`${window.config.dsApiRoot}/common_api/ds_widget_config/${this.colDefId}`, (m) => {
|
|
12532
|
+
this.list.loading = !1, m.status ? (this.widgetName_ = m.data.name, this.renderConfig(m.data.config)) : this.$Message.warning(m.message || "获取列表失败");
|
|
12533
|
+
});
|
|
12534
|
+
},
|
|
12535
|
+
renderConfig(m) {
|
|
12536
|
+
this.bindingFormId = m.bindingFormId || 0, this.listApiUrl_ = m.dataBinding.url.replace("{project_prefix}", this.apiPrefix);
|
|
12537
|
+
const f = m.fields;
|
|
12538
|
+
this.list.columns = [], f.forEach((p) => {
|
|
12539
|
+
if (p.isShow) {
|
|
12540
|
+
const t = { title: p.title, key: p.key, width: p.width, minWidth: p.minWidth, align: p.align };
|
|
12541
|
+
cellRender(t, p), this.list.columns.push(t);
|
|
12542
|
+
}
|
|
12543
|
+
}), this.defaultAction && this.list.columns.push({ title: "操作", slot: "action", align: "center", width: 200 }), this.getData();
|
|
12544
|
+
},
|
|
12545
|
+
getData() {
|
|
12546
|
+
this.list.loading = !0;
|
|
12547
|
+
let m = this.listApiUrl_;
|
|
12548
|
+
m += (m.indexOf("?") > -1 ? "&" : "?") + `pageNo=${this.list.pageNo}&pageSize=${this.list.pageSize}`, xhr_fetch.get(m, (f) => {
|
|
12549
|
+
this.list.loading = !1, f.status ? f.data.zero ? this.$Message.warning("暂无数据") : (this.list.data = f.data.list, this.list.total = f.data.totalCount) : this.$Message.warning(f.message || "获取列表失败");
|
|
12550
|
+
});
|
|
12551
|
+
},
|
|
12552
|
+
onPageNoChange(m) {
|
|
12553
|
+
this.list.pageNo = m, this.getData();
|
|
12554
|
+
},
|
|
12555
|
+
/**
|
|
12556
|
+
* 分页记录数
|
|
12557
|
+
*/
|
|
12558
|
+
handleChangePageSize(m) {
|
|
12559
|
+
this.list.limit = this.list.pageSize = m, this.getData();
|
|
12560
|
+
},
|
|
12561
|
+
reset() {
|
|
12562
|
+
for (const m in this.search)
|
|
12563
|
+
this.search[m] = "";
|
|
12564
|
+
this.getData();
|
|
12565
|
+
},
|
|
12566
|
+
/**
|
|
12567
|
+
* 新建
|
|
12568
|
+
*/
|
|
12569
|
+
onCreate(m) {
|
|
12570
|
+
if (this.createRoute)
|
|
12571
|
+
this.$router.push({ path: this.createRoute });
|
|
12572
|
+
else if (this.$parent.onCreate)
|
|
12573
|
+
this.$parent.edit(m);
|
|
12574
|
+
else if (this.modalInfo) {
|
|
12575
|
+
this.isShowForm = !0;
|
|
12576
|
+
const f = this.$refs.FormLoader;
|
|
12577
|
+
f.formId = this.bindingFormId, f.load();
|
|
12578
|
+
}
|
|
12579
|
+
},
|
|
12580
|
+
/**
|
|
12581
|
+
* 编辑
|
|
12502
12582
|
*/
|
|
12503
|
-
|
|
12504
|
-
|
|
12505
|
-
|
|
12506
|
-
|
|
12583
|
+
onEdit(m) {
|
|
12584
|
+
if (this.editRoute)
|
|
12585
|
+
this.$router.push({ path: this.editRoute, query: { id: m } });
|
|
12586
|
+
else if (this.$parent.onEdit)
|
|
12587
|
+
this.$parent.edit(m);
|
|
12588
|
+
else {
|
|
12589
|
+
this.isShowForm = !0;
|
|
12590
|
+
const f = this.$refs.FormLoader;
|
|
12591
|
+
this.modalInfo ? (f.formId = this.bindingFormId, f.entityId = m, f.load()) : setTimeout(() => {
|
|
12592
|
+
this.$refs.FormLoader2a.formId = this.bindingFormId, this.$refs.FormLoader2a.load();
|
|
12593
|
+
});
|
|
12594
|
+
}
|
|
12595
|
+
}
|
|
12596
|
+
},
|
|
12597
|
+
watch: {
|
|
12507
12598
|
/**
|
|
12508
|
-
*
|
|
12599
|
+
* 分页
|
|
12509
12600
|
*
|
|
12510
|
-
* @param
|
|
12511
|
-
* @param name
|
|
12601
|
+
* @param v
|
|
12512
12602
|
*/
|
|
12513
|
-
|
|
12514
|
-
|
|
12515
|
-
|
|
12516
|
-
|
|
12517
|
-
|
|
12518
|
-
|
|
12519
|
-
|
|
12520
|
-
|
|
12521
|
-
|
|
12522
|
-
|
|
12523
|
-
|
|
12524
|
-
|
|
12525
|
-
|
|
12526
|
-
|
|
12527
|
-
|
|
12528
|
-
|
|
12529
|
-
|
|
12530
|
-
|
|
12531
|
-
|
|
12532
|
-
|
|
12533
|
-
|
|
12534
|
-
|
|
12535
|
-
|
|
12536
|
-
|
|
12537
|
-
|
|
12538
|
-
|
|
12539
|
-
|
|
12540
|
-
|
|
12541
|
-
|
|
12542
|
-
|
|
12543
|
-
|
|
12544
|
-
|
|
12545
|
-
|
|
12546
|
-
|
|
12547
|
-
|
|
12548
|
-
|
|
12549
|
-
|
|
12550
|
-
|
|
12551
|
-
|
|
12552
|
-
|
|
12553
|
-
|
|
12554
|
-
|
|
12555
|
-
|
|
12556
|
-
|
|
12557
|
-
|
|
12558
|
-
|
|
12559
|
-
|
|
12560
|
-
|
|
12561
|
-
|
|
12562
|
-
|
|
12563
|
-
|
|
12564
|
-
|
|
12565
|
-
|
|
12566
|
-
|
|
12567
|
-
|
|
12568
|
-
|
|
12569
|
-
|
|
12570
|
-
|
|
12571
|
-
|
|
12572
|
-
|
|
12573
|
-
|
|
12574
|
-
|
|
12575
|
-
|
|
12576
|
-
|
|
12577
|
-
|
|
12578
|
-
|
|
12579
|
-
|
|
12580
|
-
|
|
12581
|
-
|
|
12582
|
-
|
|
12583
|
-
|
|
12584
|
-
|
|
12585
|
-
|
|
12586
|
-
|
|
12587
|
-
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
|
|
12591
|
-
|
|
12592
|
-
|
|
12593
|
-
|
|
12594
|
-
|
|
12595
|
-
|
|
12596
|
-
|
|
12597
|
-
|
|
12598
|
-
|
|
12599
|
-
|
|
12600
|
-
|
|
12601
|
-
|
|
12602
|
-
|
|
12603
|
-
|
|
12604
|
-
|
|
12605
|
-
|
|
12606
|
-
|
|
12607
|
-
|
|
12608
|
-
|
|
12609
|
-
|
|
12610
|
-
|
|
12611
|
-
|
|
12612
|
-
|
|
12613
|
-
|
|
12614
|
-
|
|
12615
|
-
|
|
12616
|
-
|
|
12617
|
-
|
|
12618
|
-
|
|
12619
|
-
|
|
12620
|
-
|
|
12621
|
-
|
|
12622
|
-
|
|
12623
|
-
|
|
12624
|
-
|
|
12625
|
-
|
|
12626
|
-
|
|
12627
|
-
|
|
12628
|
-
|
|
12629
|
-
|
|
12630
|
-
|
|
12631
|
-
|
|
12632
|
-
|
|
12633
|
-
|
|
12634
|
-
|
|
12635
|
-
|
|
12636
|
-
|
|
12637
|
-
|
|
12638
|
-
|
|
12639
|
-
|
|
12640
|
-
|
|
12641
|
-
|
|
12642
|
-
|
|
12643
|
-
|
|
12644
|
-
|
|
12645
|
-
|
|
12646
|
-
|
|
12647
|
-
|
|
12648
|
-
|
|
12649
|
-
|
|
12650
|
-
|
|
12651
|
-
|
|
12652
|
-
|
|
12653
|
-
|
|
12654
|
-
|
|
12655
|
-
|
|
12656
|
-
|
|
12657
|
-
|
|
12658
|
-
|
|
12659
|
-
|
|
12660
|
-
|
|
12661
|
-
|
|
12662
|
-
|
|
12663
|
-
|
|
12664
|
-
|
|
12665
|
-
|
|
12666
|
-
|
|
12667
|
-
|
|
12668
|
-
|
|
12669
|
-
|
|
12670
|
-
|
|
12671
|
-
|
|
12672
|
-
|
|
12673
|
-
|
|
12674
|
-
|
|
12675
|
-
|
|
12676
|
-
|
|
12677
|
-
|
|
12678
|
-
|
|
12679
|
-
|
|
12680
|
-
|
|
12681
|
-
|
|
12682
|
-
|
|
12683
|
-
|
|
12684
|
-
|
|
12685
|
-
|
|
12686
|
-
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
|
|
12690
|
-
|
|
12691
|
-
|
|
12692
|
-
|
|
12693
|
-
|
|
12694
|
-
_: 1
|
|
12695
|
-
}, 8, ["modelValue"])) : createCommentVNode("", !0),
|
|
12696
|
-
p.item.uiType == 21 ? (openBlock(), createElementBlock("span", _hoisted_6$1, toDisplayString(p.data[p.item.name] | m.formatDateLong), 1)) : createCommentVNode("", !0),
|
|
12697
|
-
p.item.uiType == 22 ? (openBlock(), createBlock(N, {
|
|
12698
|
-
key: 13,
|
|
12699
|
-
readonly: "",
|
|
12700
|
-
modelValue: p.data[p.item.name],
|
|
12701
|
-
"onUpdate:modelValue": f[13] || (f[13] = (ue) => p.data[p.item.name] = ue),
|
|
12702
|
-
placeholder: p.item.comment
|
|
12703
|
-
}, {
|
|
12704
|
-
append: withCtx(() => [
|
|
12705
|
-
createVNode(kt, {
|
|
12706
|
-
icon: "md-bookmarks",
|
|
12707
|
-
title: "数据字典",
|
|
12708
|
-
onClick: f[12] || (f[12] = (ue) => O.showDataDict(p.item.name))
|
|
12709
|
-
})
|
|
12710
|
-
]),
|
|
12711
|
-
_: 1
|
|
12712
|
-
}, 8, ["modelValue", "placeholder"])) : createCommentVNode("", !0),
|
|
12713
|
-
p.item.uiType == 17 ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
|
|
12714
|
-
createElementVNode("img", {
|
|
12715
|
-
src: p.data[p.item.name],
|
|
12716
|
-
alt: "图片",
|
|
12717
|
-
style: { "max-width": "90%" }
|
|
12718
|
-
}, null, 8, _hoisted_8)
|
|
12719
|
-
])) : createCommentVNode("", !0),
|
|
12720
|
-
p.item.uiType == 4 && p.item.ext_attribs ? (openBlock(), createBlock(ne, {
|
|
12721
|
-
key: 15,
|
|
12722
|
-
modelValue: p.data[p.item.name],
|
|
12723
|
-
"onUpdate:modelValue": f[14] || (f[14] = (ue) => p.data[p.item.name] = ue)
|
|
12724
|
-
}, {
|
|
12725
|
-
default: withCtx(() => [
|
|
12726
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(p.item.ext_attribs.candidateData, (ue, hn) => (openBlock(), createBlock(un, {
|
|
12727
|
-
key: hn,
|
|
12728
|
-
label: ue.value
|
|
12729
|
-
}, {
|
|
12730
|
-
default: withCtx(() => [
|
|
12731
|
-
createTextVNode(toDisplayString(ue.name), 1)
|
|
12603
|
+
// current(v: number): void {
|
|
12604
|
+
// this.start = (v - 1) * this.list.limit;
|
|
12605
|
+
// this.getData();
|
|
12606
|
+
// },
|
|
12607
|
+
// 'list.pageNo'(v: number): void {
|
|
12608
|
+
// this.list.start = (v - 1) * this.list.limit;
|
|
12609
|
+
// this.getData();
|
|
12610
|
+
// },
|
|
12611
|
+
colDefId(m) {
|
|
12612
|
+
this.getRemoteColDef();
|
|
12613
|
+
},
|
|
12614
|
+
cfg: {
|
|
12615
|
+
handler(m) {
|
|
12616
|
+
this.renderConfig(m);
|
|
12617
|
+
},
|
|
12618
|
+
deep: !0
|
|
12619
|
+
}
|
|
12620
|
+
}
|
|
12621
|
+
});
|
|
12622
|
+
function cellRender(rendererColDef, item) {
|
|
12623
|
+
if (item.isOneLine && (rendererColDef.ellipsis = !0, rendererColDef.tooltip = !0), item.render && item.render != "raw") {
|
|
12624
|
+
if (item.render == "email" && (rendererColDef.render = email), item.render == "link" && (rendererColDef.render = link), item.render == "link_http" && (rendererColDef.render = link_http, item.isOneLine = !0, rendererColDef.ellipsis = !0, rendererColDef.tooltip = !0, rendererColDef.minWidth = item.minWidth = 150), item.render == "sex" && (rendererColDef.render = sex), item.render == "date" && (rendererColDef.render = date), item.render == "short_date" && (rendererColDef.render = short_date), item.render == "long_date" && (rendererColDef.render = long_date), item.render == "thumb" && (rendererColDef.render = thumb), item.render == "stat" && (rendererColDef.render = state), item.render == "boolean_value" && (rendererColDef.render = booleanValue), item.render == "price" && (rendererColDef.render = price), item.render == "clk_event" && item.clkEvent)
|
|
12625
|
+
try {
|
|
12626
|
+
rendererColDef.render = clk_event(eval(item.clkEvent));
|
|
12627
|
+
} catch (m) {
|
|
12628
|
+
alert("eval 代码错误,请检查配置 code: " + item.clkEvent);
|
|
12629
|
+
}
|
|
12630
|
+
item.render == "render" && (item.isCode && item.customRender && (rendererColDef.render = eval(item.customRender)), !item.isCode && item.customRenderKV && (rendererColDef.render = customRender(item.customRenderKV)));
|
|
12631
|
+
}
|
|
12632
|
+
}
|
|
12633
|
+
function state(m, f) {
|
|
12634
|
+
const p = f.row[f.column.key], t = "•";
|
|
12635
|
+
switch (p) {
|
|
12636
|
+
case 0:
|
|
12637
|
+
return m("div", {
|
|
12638
|
+
style: { color: "#52c41a", fontSize: "20px" },
|
|
12639
|
+
attrs: { title: "正常" }
|
|
12640
|
+
}, t);
|
|
12641
|
+
case -1:
|
|
12642
|
+
return m("div", {
|
|
12643
|
+
style: { color: "red", fontSize: "20px" },
|
|
12644
|
+
attrs: { title: "已删除" }
|
|
12645
|
+
}, t);
|
|
12646
|
+
default:
|
|
12647
|
+
return m("div", {
|
|
12648
|
+
style: { color: "yellow", fontSize: "20px" },
|
|
12649
|
+
attrs: { title: "已禁用/已下线" }
|
|
12650
|
+
}, t);
|
|
12651
|
+
}
|
|
12652
|
+
}
|
|
12653
|
+
function sex(m, f) {
|
|
12654
|
+
const p = f.row[f.column.key];
|
|
12655
|
+
let t = "";
|
|
12656
|
+
switch (p) {
|
|
12657
|
+
case "MALE":
|
|
12658
|
+
t = "男";
|
|
12659
|
+
break;
|
|
12660
|
+
case "FEMALE":
|
|
12661
|
+
t = "女";
|
|
12662
|
+
break;
|
|
12663
|
+
default:
|
|
12664
|
+
t = "未知";
|
|
12665
|
+
}
|
|
12666
|
+
return m("span", t);
|
|
12667
|
+
}
|
|
12668
|
+
function email(m, f) {
|
|
12669
|
+
const p = f.row[f.column.key];
|
|
12670
|
+
return p ? m("a", { href: "mailto://" + p }, p) : "";
|
|
12671
|
+
}
|
|
12672
|
+
function link(m, f) {
|
|
12673
|
+
const p = f.row[f.column.key];
|
|
12674
|
+
return p ? m("a", { href: p, target: "_blank", title: p }, "超链接") : "";
|
|
12675
|
+
}
|
|
12676
|
+
function link_http(m, f) {
|
|
12677
|
+
const p = f.row[f.column.key];
|
|
12678
|
+
return p ? m("a", { href: p, target: "_blank", title: p }, p) : "";
|
|
12679
|
+
}
|
|
12680
|
+
function date(m, f) {
|
|
12681
|
+
const p = f.row[f.column.key];
|
|
12682
|
+
if (p)
|
|
12683
|
+
if (p.indexOf(":") != -1) {
|
|
12684
|
+
const t = p.split(":");
|
|
12685
|
+
return t.pop(), t.pop(), p ? t.join("").replace(/\s\d+$/, "") : "";
|
|
12686
|
+
} else
|
|
12687
|
+
return p;
|
|
12688
|
+
else
|
|
12689
|
+
return "";
|
|
12690
|
+
}
|
|
12691
|
+
function long_date(m, f) {
|
|
12692
|
+
const p = f.row[f.column.key];
|
|
12693
|
+
return p && isoDateTimeRegex.test(p) ? m("span", convertDateLong(p)) : p ? m("span", p) : "";
|
|
12694
|
+
}
|
|
12695
|
+
const isoDateTimeRegex = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:.\d*)?)$/;
|
|
12696
|
+
function convertDate(m) {
|
|
12697
|
+
const f = new Date(m), p = f.getFullYear(), t = f.getMonth() + 1, $ = f.getDate(), O = f.getHours(), N = f.getMinutes() === 0 ? "00" : f.getMinutes();
|
|
12698
|
+
return `${p}-${t}-${$} ${O}:${N}`;
|
|
12699
|
+
}
|
|
12700
|
+
function convertDateLong(m) {
|
|
12701
|
+
const f = new Date(m), p = f.getFullYear(), t = f.getMonth() + 1, $ = f.getDate(), O = f.getHours(), N = f.getMinutes() === 0 ? "00" : f.getMinutes(), S = f.getSeconds();
|
|
12702
|
+
return `${p}-${t}-${$} ${O}:${N}:${S}`;
|
|
12703
|
+
}
|
|
12704
|
+
function short_date(m, f) {
|
|
12705
|
+
const p = f.row[f.column.key];
|
|
12706
|
+
if (p) {
|
|
12707
|
+
if (isoDateTimeRegex.test(p))
|
|
12708
|
+
return m("span", convertDate(p));
|
|
12709
|
+
const t = p.split(":");
|
|
12710
|
+
return t.pop(), p ? m("span", t.join(":")) : "";
|
|
12711
|
+
} else
|
|
12712
|
+
return "";
|
|
12713
|
+
}
|
|
12714
|
+
function thumb(m, f) {
|
|
12715
|
+
const p = f.row[f.column.key];
|
|
12716
|
+
if (!p)
|
|
12717
|
+
return "";
|
|
12718
|
+
const t = p.startsWith("iVBOR") || p.startsWith("/9j");
|
|
12719
|
+
return m("a", t ? { href: "javascript:void(0);" } : { href: p, target: "_blank", title: p }, [
|
|
12720
|
+
m("img", {
|
|
12721
|
+
src: t ? "data:image/;base64," + p : p,
|
|
12722
|
+
// 对于内联样式,可以直接传递字符串或对象
|
|
12723
|
+
style: "max-width:100px;max-height:50px;margin-top:5px"
|
|
12724
|
+
})
|
|
12725
|
+
]);
|
|
12726
|
+
}
|
|
12727
|
+
function clk_event(m) {
|
|
12728
|
+
return (f, p) => {
|
|
12729
|
+
const t = p.row[p.column.key];
|
|
12730
|
+
return t ? f("a", {
|
|
12731
|
+
on: { click: () => m(p.row) }
|
|
12732
|
+
}, t) : "";
|
|
12733
|
+
};
|
|
12734
|
+
}
|
|
12735
|
+
function booleanValue(m, f) {
|
|
12736
|
+
return f.row[f.column.key] ? "是" : "否";
|
|
12737
|
+
}
|
|
12738
|
+
function price(m, f) {
|
|
12739
|
+
const p = f.row[f.column.key];
|
|
12740
|
+
return p ? (p / 100).toFixed(2) : "";
|
|
12741
|
+
}
|
|
12742
|
+
function customRender(m) {
|
|
12743
|
+
const f = {};
|
|
12744
|
+
return m.forEach((p) => f[p.value + ""] = p.name), (p, t) => {
|
|
12745
|
+
const $ = t.row[t.column.key];
|
|
12746
|
+
return $ == "0" || $ ? p("span", f[$]) : "";
|
|
12747
|
+
};
|
|
12748
|
+
}
|
|
12749
|
+
const _hoisted_1$1 = { key: 0 }, _hoisted_2$1 = { style: { margin: "20px 0", overflow: "hidden" } }, _hoisted_3$1 = {
|
|
12750
|
+
key: 0,
|
|
12751
|
+
class: "common-search-panel"
|
|
12752
|
+
}, _hoisted_4 = { style: { float: "right" } }, _hoisted_5 = { class: "toolbar" }, _hoisted_6 = ["onClick"], _hoisted_7 = { key: 2 };
|
|
12753
|
+
function _sfc_render$4(m, f, p, t, $, O) {
|
|
12754
|
+
const N = resolveComponent("Button"), S = resolveComponent("Input"), ye = resolveComponent("Icon"), Ee = resolveComponent("Tooltip"), _e = resolveComponent("Divider"), Nt = resolveComponent("Poptip"), cn = resolveComponent("Table"), He = resolveComponent("Page"), Ce = resolveComponent("Card"), kt = resolveComponent("FormLoader"), un = resolveComponent("Modal");
|
|
12755
|
+
return openBlock(), createElementBlock("div", null, [
|
|
12756
|
+
m.modalInfo || !m.isShowForm ? (openBlock(), createElementBlock("span", _hoisted_1$1, [
|
|
12757
|
+
createVNode(Ce, {
|
|
12758
|
+
bordered: !1,
|
|
12759
|
+
"dis-hover": ""
|
|
12760
|
+
}, {
|
|
12761
|
+
default: withCtx(() => [
|
|
12762
|
+
createElementVNode("div", _hoisted_2$1, [
|
|
12763
|
+
m.showSearch ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
|
|
12764
|
+
createElementVNode("span", _hoisted_4, [
|
|
12765
|
+
createVNode(N, {
|
|
12766
|
+
type: "primary",
|
|
12767
|
+
icon: "ios-search",
|
|
12768
|
+
onClick: f[0] || (f[0] = (ne) => m.$parent.getData())
|
|
12769
|
+
}, {
|
|
12770
|
+
default: withCtx(() => [...f[4] || (f[4] = [
|
|
12771
|
+
createTextVNode("查询", -1)
|
|
12772
|
+
])]),
|
|
12773
|
+
_: 1
|
|
12774
|
+
}),
|
|
12775
|
+
createVNode(N, {
|
|
12776
|
+
style: { "margin-left": "10px" },
|
|
12777
|
+
onClick: m.reset
|
|
12778
|
+
}, {
|
|
12779
|
+
default: withCtx(() => [...f[5] || (f[5] = [
|
|
12780
|
+
createTextVNode("重置", -1)
|
|
12781
|
+
])]),
|
|
12782
|
+
_: 1
|
|
12783
|
+
}, 8, ["onClick"])
|
|
12732
12784
|
]),
|
|
12733
|
-
|
|
12734
|
-
|
|
12785
|
+
createVNode(S, {
|
|
12786
|
+
suffix: "ios-search",
|
|
12787
|
+
modelValue: m.list.search.name,
|
|
12788
|
+
"onUpdate:modelValue": f[1] || (f[1] = (ne) => m.list.search.name = ne),
|
|
12789
|
+
onOnEnter: m.getData,
|
|
12790
|
+
clearable: "",
|
|
12791
|
+
placeholder: "请输入" + m.widgetName_ + "名称"
|
|
12792
|
+
}, null, 8, ["modelValue", "onOnEnter", "placeholder"])
|
|
12793
|
+
])) : createCommentVNode("", !0),
|
|
12794
|
+
createElementVNode("div", _hoisted_5, [
|
|
12795
|
+
createVNode(Ee, {
|
|
12796
|
+
class: "ivu-ml",
|
|
12797
|
+
content: "刷新",
|
|
12798
|
+
placement: "top"
|
|
12799
|
+
}, {
|
|
12800
|
+
default: withCtx(() => [
|
|
12801
|
+
createVNode(ye, {
|
|
12802
|
+
size: "20",
|
|
12803
|
+
type: "ios-refresh",
|
|
12804
|
+
onClick: m.getData,
|
|
12805
|
+
style: { cursor: "pointer" }
|
|
12806
|
+
}, null, 8, ["onClick"])
|
|
12807
|
+
]),
|
|
12808
|
+
_: 1
|
|
12809
|
+
}),
|
|
12810
|
+
renderSlot(m.$slots, "toolbar", {}, void 0, !0),
|
|
12811
|
+
m.showCreateBtn ? (openBlock(), createBlock(N, {
|
|
12812
|
+
key: 0,
|
|
12813
|
+
type: "primary",
|
|
12814
|
+
icon: "md-add",
|
|
12815
|
+
onClick: m.onCreate
|
|
12816
|
+
}, {
|
|
12817
|
+
default: withCtx(() => [
|
|
12818
|
+
createTextVNode("新建" + toDisplayString(m.widgetName_), 1)
|
|
12819
|
+
]),
|
|
12820
|
+
_: 1
|
|
12821
|
+
}, 8, ["onClick"])) : createCommentVNode("", !0)
|
|
12822
|
+
])
|
|
12735
12823
|
]),
|
|
12736
|
-
|
|
12737
|
-
|
|
12738
|
-
|
|
12739
|
-
|
|
12740
|
-
|
|
12741
|
-
|
|
12742
|
-
|
|
12743
|
-
|
|
12744
|
-
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
|
|
12824
|
+
createVNode(cn, {
|
|
12825
|
+
style: { clear: "both" },
|
|
12826
|
+
columns: m.list.columns,
|
|
12827
|
+
data: m.list.data,
|
|
12828
|
+
loading: m.list.loading
|
|
12829
|
+
}, {
|
|
12830
|
+
action: withCtx(({ row: ne, index: D }) => [
|
|
12831
|
+
renderSlot(m.$slots, "list_action", { item: ne }, void 0, !0),
|
|
12832
|
+
m.showEditBtn ? (openBlock(), createElementBlock("a", {
|
|
12833
|
+
key: 0,
|
|
12834
|
+
style: { color: "green" },
|
|
12835
|
+
onClick: (dn) => m.onEdit(ne.id)
|
|
12836
|
+
}, toDisplayString(m.editBtnAsView ? "查看" : "编辑"), 9, _hoisted_6)) : createCommentVNode("", !0),
|
|
12837
|
+
m.showEditBtn ? (openBlock(), createBlock(_e, {
|
|
12838
|
+
key: 1,
|
|
12839
|
+
type: "vertical"
|
|
12840
|
+
})) : createCommentVNode("", !0),
|
|
12841
|
+
createVNode(Nt, {
|
|
12842
|
+
confirm: "",
|
|
12843
|
+
transfer: "",
|
|
12844
|
+
title: "是否要删除此行?",
|
|
12845
|
+
onOnOk: (dn) => m.deleteInfo(ne.id, D)
|
|
12846
|
+
}, {
|
|
12847
|
+
default: withCtx(() => [...f[6] || (f[6] = [
|
|
12848
|
+
createElementVNode("a", { style: { color: "red" } }, "删除", -1)
|
|
12849
|
+
])]),
|
|
12850
|
+
_: 1
|
|
12851
|
+
}, 8, ["onOnOk"])
|
|
12852
|
+
]),
|
|
12853
|
+
_: 3
|
|
12854
|
+
}, 8, ["columns", "data", "loading"]),
|
|
12855
|
+
createVNode(He, {
|
|
12856
|
+
class: "ivu-mt ivu-text-right",
|
|
12857
|
+
total: m.list.total,
|
|
12858
|
+
current: m.list.pageNo,
|
|
12859
|
+
"show-total": "",
|
|
12860
|
+
"show-sizer": "",
|
|
12861
|
+
"page-size": m.list.limit,
|
|
12862
|
+
onOnChange: m.onPageNoChange,
|
|
12863
|
+
onOnPageSizeChange: m.handleChangePageSize
|
|
12864
|
+
}, null, 8, ["total", "current", "page-size", "onOnChange", "onOnPageSizeChange"])
|
|
12865
|
+
]),
|
|
12866
|
+
_: 3
|
|
12867
|
+
})
|
|
12868
|
+
])) : createCommentVNode("", !0),
|
|
12869
|
+
m.modalInfo ? (openBlock(), createBlock(un, {
|
|
12870
|
+
key: 1,
|
|
12871
|
+
modelValue: m.isShowForm,
|
|
12872
|
+
"onUpdate:modelValue": f[2] || (f[2] = (ne) => m.isShowForm = ne),
|
|
12873
|
+
title: "预览",
|
|
12874
|
+
width: "800",
|
|
12875
|
+
"ok-text": "关闭",
|
|
12876
|
+
"cancel-text": ""
|
|
12877
|
+
}, {
|
|
12878
|
+
default: withCtx(() => [
|
|
12879
|
+
createVNode(kt, {
|
|
12880
|
+
ref: "FormLoader",
|
|
12881
|
+
"api-prefix": m.apiPrefix
|
|
12882
|
+
}, null, 8, ["api-prefix"])
|
|
12883
|
+
]),
|
|
12884
|
+
_: 1
|
|
12885
|
+
}, 8, ["modelValue"])) : createCommentVNode("", !0),
|
|
12886
|
+
!m.modalInfo && m.isShowForm ? (openBlock(), createElementBlock("span", _hoisted_7, [
|
|
12887
|
+
createElementVNode("a", {
|
|
12888
|
+
href: "#",
|
|
12889
|
+
onClick: f[3] || (f[3] = (ne) => m.isShowForm = !1)
|
|
12890
|
+
}, "返回列表")
|
|
12891
|
+
])) : createCommentVNode("", !0)
|
|
12892
|
+
]);
|
|
12748
12893
|
}
|
|
12749
|
-
const
|
|
12750
|
-
components: {
|
|
12894
|
+
const ListLoader = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4], ["__scopeId", "data-v-ed548002"]]), _sfc_main$3 = {
|
|
12895
|
+
components: {
|
|
12896
|
+
ListLoader
|
|
12897
|
+
}
|
|
12898
|
+
};
|
|
12899
|
+
function _sfc_render$3(m, f, p, t, $, O) {
|
|
12900
|
+
const N = resolveComponent("ListLoader");
|
|
12901
|
+
return openBlock(), createBlock(N, {
|
|
12902
|
+
id: 103,
|
|
12903
|
+
"edit-route": "/resource/article_edit"
|
|
12904
|
+
});
|
|
12905
|
+
}
|
|
12906
|
+
const Article = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]), _sfc_main$2 = {
|
|
12751
12907
|
props: {
|
|
12752
|
-
|
|
12908
|
+
treeJson: { type: Array, required: !0 }
|
|
12753
12909
|
},
|
|
12754
12910
|
data() {
|
|
12755
12911
|
return {
|
|
12756
|
-
|
|
12757
|
-
|
|
12758
|
-
fields: this.cfg.fields
|
|
12759
|
-
},
|
|
12760
|
-
data: {},
|
|
12761
|
-
// 数据
|
|
12762
|
-
status: 1
|
|
12763
|
-
// 0=查看/1=新增/2=修改
|
|
12912
|
+
data: [],
|
|
12913
|
+
selectId: 14
|
|
12764
12914
|
};
|
|
12765
12915
|
},
|
|
12766
|
-
|
|
12767
|
-
|
|
12768
|
-
|
|
12769
|
-
|
|
12770
|
-
for (let $ = 0, O = this.cfg.fields.length; $ < O; $++) {
|
|
12771
|
-
let N = this.cfg.fields[$];
|
|
12772
|
-
if (N.isShow) {
|
|
12773
|
-
let S = N.uiLayout, ye = [h(ItemRender, { item: N, data: this.data, status: this.status })];
|
|
12774
|
-
S == 1 ? m.push([h(viewuiplus_minExports.Col, { span: 24 }, { default: () => ye })]) : S == 2 ? (f.push([h(viewuiplus_minExports.Col, { span: 12 }, { default: () => ye })]), f.length == 2 && (m.push(f), f = [])) : S == 3 && (p.push([h(viewuiplus_minExports.Col, { span: 8 }, { default: () => ye })]), p.length == 3 && (m.push(p), p = []));
|
|
12775
|
-
}
|
|
12776
|
-
}
|
|
12777
|
-
const t = [];
|
|
12778
|
-
return m.forEach(($) => t.push(h(viewuiplus_minExports.Row, $))), h(viewuiplus_minExports.Form, { ref: "formDynamic", "label-width": this.cfg.labelWidth || 80, "label-colon": this.status === 0 }, { default: () => t });
|
|
12779
|
-
},
|
|
12780
|
-
methods: {
|
|
12781
|
-
handleAdd() {
|
|
12782
|
-
this.index++, this.formDynamic.fields.push({
|
|
12783
|
-
value: "",
|
|
12784
|
-
index: this.index,
|
|
12785
|
-
status: 1
|
|
12786
|
-
});
|
|
12916
|
+
watch: {
|
|
12917
|
+
treeJson(m) {
|
|
12918
|
+
let f = JSON.parse(JSON.stringify(this.treeJson));
|
|
12919
|
+
prepare(f), this.data = [], plat(this.data, f);
|
|
12787
12920
|
}
|
|
12788
12921
|
}
|
|
12789
|
-
},
|
|
12790
|
-
|
|
12791
|
-
|
|
12792
|
-
|
|
12793
|
-
|
|
12794
|
-
|
|
12795
|
-
|
|
12796
|
-
|
|
12797
|
-
|
|
12798
|
-
|
|
12799
|
-
|
|
12800
|
-
// 是否显示按钮,还是自定义按钮?
|
|
12801
|
-
},
|
|
12802
|
-
data() {
|
|
12803
|
-
return {
|
|
12804
|
-
formId: this.id || 0,
|
|
12805
|
-
// 表单定义 id
|
|
12806
|
-
entityId: 0,
|
|
12807
|
-
// 实体 id
|
|
12808
|
-
cfg: { fields: [] },
|
|
12809
|
-
status: 1,
|
|
12810
|
-
// 0=查看/1=新增/2=修改
|
|
12811
|
-
oldJson: null
|
|
12812
|
-
// JSON Based 下的旧 JSON 完整数据。因为 data 只有部分
|
|
12813
|
-
};
|
|
12814
|
-
},
|
|
12815
|
-
mounted() {
|
|
12816
|
-
this.$route.query.id && (this.entityId = Number(this.$route.query.id)), this.formId && this.load();
|
|
12817
|
-
},
|
|
12818
|
-
methods: {
|
|
12819
|
-
/**
|
|
12820
|
-
* 加载表单配置
|
|
12821
|
-
*/
|
|
12822
|
-
load() {
|
|
12823
|
-
console.log("加载表单配置"), this.entityId ? this.status = 2 : (this.status = 1, this.FromRenderer.data = {}), xhr_fetch.get(`${window.config.dsApiRoot}/common_api/ds_widget_config/${this.formId}`, (m) => {
|
|
12824
|
-
m && m.status ? (this.cfg = m.data.config, this.entityId && this.loadInfo()) : this.$Message.error("获取表单配置失败");
|
|
12825
|
-
});
|
|
12826
|
-
},
|
|
12827
|
-
/**
|
|
12828
|
-
* 重置表单,但没作用
|
|
12829
|
-
*/
|
|
12830
|
-
resetFields() {
|
|
12831
|
-
this.FromRenderer.$refs.formDynamic.resetFields();
|
|
12832
|
-
},
|
|
12833
|
-
/**
|
|
12834
|
-
* 创建
|
|
12835
|
-
*/
|
|
12836
|
-
create() {
|
|
12837
|
-
const m = this.cfg.infoApi;
|
|
12838
|
-
if (!m) {
|
|
12839
|
-
console.error("API doesn't exist");
|
|
12840
|
-
return;
|
|
12841
|
-
}
|
|
12842
|
-
const f = this._getSaveData();
|
|
12843
|
-
delete f.id, xhr_fetch.post(window.config.dsApiRoot + m, f, (p) => {
|
|
12844
|
-
p.status ? (this.status = 2, this.$Message.success("创建成功")) : this.$Message.error(p.message || "失败,原因未知!");
|
|
12845
|
-
});
|
|
12846
|
-
},
|
|
12847
|
-
/**
|
|
12848
|
-
* 更新
|
|
12849
|
-
*/
|
|
12850
|
-
update() {
|
|
12851
|
-
const m = this.cfg.infoApi;
|
|
12852
|
-
if (!m) {
|
|
12853
|
-
console.error("API doesn't exist");
|
|
12854
|
-
return;
|
|
12855
|
-
}
|
|
12856
|
-
const f = this._getSaveData();
|
|
12857
|
-
xhr_fetch.put(window.config.dsApiRoot + m, f, (p) => {
|
|
12858
|
-
p.status ? this.$Message.success("保存成功") : this.$Message.error(p.message || "失败,原因未知!");
|
|
12859
|
-
});
|
|
12860
|
-
},
|
|
12861
|
-
_getSaveData() {
|
|
12862
|
-
let m = {};
|
|
12863
|
-
Object.assign(m, this.FromRenderer.data);
|
|
12864
|
-
for (let f in m) {
|
|
12865
|
-
const p = m[f];
|
|
12866
|
-
p instanceof Date && (m[f] = date_format.formatDate.call(p));
|
|
12867
|
-
}
|
|
12868
|
-
return delete m.creator, delete m.creatorId, delete m.createDate, delete m.updater, delete m.createDate, delete m.updaterId, delete m.updateDate, m = camelToSnake(m), m;
|
|
12869
|
-
},
|
|
12870
|
-
/**
|
|
12871
|
-
* 加载详情
|
|
12872
|
-
*/
|
|
12873
|
-
loadInfo() {
|
|
12874
|
-
const m = this.cfg.infoApi;
|
|
12875
|
-
if (!m) {
|
|
12876
|
-
console.error("API doesn't exist");
|
|
12877
|
-
return;
|
|
12922
|
+
}, stack = [];
|
|
12923
|
+
function prepare(m) {
|
|
12924
|
+
if (!(!m || !m.length)) {
|
|
12925
|
+
stack.push(m);
|
|
12926
|
+
for (let f = 0, p = m.length; f < p; f++) {
|
|
12927
|
+
let t = m[f], $ = stack.length;
|
|
12928
|
+
if (t.level = $, $ == 1) t.indent = "";
|
|
12929
|
+
else {
|
|
12930
|
+
console.log(Math.pow($ - 1, 2));
|
|
12931
|
+
let O = new Array(Math.pow($ + 1, 2)), N = new Array(Math.pow($ - 2, 2));
|
|
12932
|
+
t.indent = O.join(" ") + "└─" + N.join("─");
|
|
12878
12933
|
}
|
|
12879
|
-
|
|
12880
|
-
f && f.status && (console.log(f.data), this.FromRenderer.data = f.data, this.status = 2);
|
|
12881
|
-
});
|
|
12934
|
+
prepare(t.children);
|
|
12882
12935
|
}
|
|
12936
|
+
stack.pop();
|
|
12883
12937
|
}
|
|
12884
|
-
}
|
|
12885
|
-
function
|
|
12886
|
-
|
|
12887
|
-
|
|
12888
|
-
|
|
12889
|
-
return m.map((p) => camelToSnake(p));
|
|
12890
|
-
const f = {};
|
|
12891
|
-
for (const [p, t] of Object.entries(m)) {
|
|
12892
|
-
const $ = p.replace(/[A-Z]/g, (O) => `_${O.toLowerCase()}`);
|
|
12893
|
-
f[$] = camelToSnake(t);
|
|
12938
|
+
}
|
|
12939
|
+
function plat(m, f) {
|
|
12940
|
+
for (let p = 0, t = f.length; p < t; p++) {
|
|
12941
|
+
let $ = f[p];
|
|
12942
|
+
m.push($), $.children && $.children.length && plat(m, $.children);
|
|
12894
12943
|
}
|
|
12895
|
-
return f;
|
|
12896
12944
|
}
|
|
12897
|
-
|
|
12898
|
-
|
|
12899
|
-
|
|
12900
|
-
|
|
12901
|
-
|
|
12902
|
-
|
|
12903
|
-
|
|
12904
|
-
|
|
12905
|
-
|
|
12906
|
-
|
|
12907
|
-
|
|
12908
|
-
m.isShowBtns ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
12909
|
-
m.isShowInfoBtn ? (openBlock(), createElementBlock("span", _hoisted_2$1, [
|
|
12910
|
-
createVNode(S, {
|
|
12911
|
-
style: { width: "50px" },
|
|
12912
|
-
modelValue: m.entityId,
|
|
12913
|
-
"onUpdate:modelValue": f[0] || (f[0] = (Ee) => m.entityId = Ee)
|
|
12914
|
-
}, null, 8, ["modelValue"]),
|
|
12915
|
-
f[3] || (f[3] = createTextVNode()),
|
|
12916
|
-
createVNode(ye, {
|
|
12917
|
-
style: { width: "90px" },
|
|
12918
|
-
onClick: m.loadInfo
|
|
12919
|
-
}, {
|
|
12920
|
-
default: withCtx(() => [...f[2] || (f[2] = [
|
|
12921
|
-
createTextVNode("加载", -1)
|
|
12922
|
-
])]),
|
|
12923
|
-
_: 1
|
|
12924
|
-
}, 8, ["onClick"])
|
|
12925
|
-
])) : createCommentVNode("", !0),
|
|
12926
|
-
m.status === 1 ? (openBlock(), createBlock(ye, {
|
|
12927
|
-
key: 1,
|
|
12928
|
-
type: "primary",
|
|
12929
|
-
onClick: m.create
|
|
12930
|
-
}, {
|
|
12931
|
-
default: withCtx(() => [...f[4] || (f[4] = [
|
|
12932
|
-
createTextVNode("创建", -1)
|
|
12933
|
-
])]),
|
|
12934
|
-
_: 1
|
|
12935
|
-
}, 8, ["onClick"])) : createCommentVNode("", !0),
|
|
12936
|
-
m.status === 2 ? (openBlock(), createBlock(ye, {
|
|
12937
|
-
key: 2,
|
|
12938
|
-
type: "primary",
|
|
12939
|
-
onClick: m.update
|
|
12940
|
-
}, {
|
|
12941
|
-
default: withCtx(() => [...f[5] || (f[5] = [
|
|
12942
|
-
createTextVNode("保存", -1)
|
|
12943
|
-
])]),
|
|
12944
|
-
_: 1
|
|
12945
|
-
}, 8, ["onClick"])) : createCommentVNode("", !0),
|
|
12946
|
-
m.status !== 0 ? (openBlock(), createBlock(ye, {
|
|
12947
|
-
key: 3,
|
|
12948
|
-
onClick: m.resetFields
|
|
12949
|
-
}, {
|
|
12950
|
-
default: withCtx(() => [...f[6] || (f[6] = [
|
|
12951
|
-
createTextVNode("重置", -1)
|
|
12952
|
-
])]),
|
|
12953
|
-
_: 1
|
|
12954
|
-
}, 8, ["onClick"])) : createCommentVNode("", !0),
|
|
12955
|
-
createVNode(ye, {
|
|
12956
|
-
onClick: f[1] || (f[1] = (Ee) => m.$router.back())
|
|
12945
|
+
function _sfc_render$2(m, f, p, t, $, O) {
|
|
12946
|
+
const N = resolveComponent("Option"), S = resolveComponent("Select");
|
|
12947
|
+
return openBlock(), createBlock(S, {
|
|
12948
|
+
modelValue: $.selectId,
|
|
12949
|
+
"onUpdate:modelValue": f[0] || (f[0] = (ye) => $.selectId = ye)
|
|
12950
|
+
}, {
|
|
12951
|
+
default: withCtx(() => [
|
|
12952
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList($.data, (ye, Ee) => (openBlock(), createBlock(N, {
|
|
12953
|
+
value: ye.id,
|
|
12954
|
+
key: Ee,
|
|
12955
|
+
size: "small"
|
|
12957
12956
|
}, {
|
|
12958
|
-
default: withCtx(() => [
|
|
12959
|
-
createTextVNode(
|
|
12960
|
-
])
|
|
12961
|
-
_:
|
|
12962
|
-
})
|
|
12963
|
-
])
|
|
12964
|
-
|
|
12957
|
+
default: withCtx(() => [
|
|
12958
|
+
createTextVNode(toDisplayString(ye.indent) + toDisplayString(ye.name), 1)
|
|
12959
|
+
]),
|
|
12960
|
+
_: 2
|
|
12961
|
+
}, 1032, ["value"]))), 128))
|
|
12962
|
+
]),
|
|
12963
|
+
_: 1
|
|
12964
|
+
}, 8, ["modelValue"]);
|
|
12965
12965
|
}
|
|
12966
|
-
const
|
|
12967
|
-
|
|
12968
|
-
components: { FormLoader },
|
|
12966
|
+
const TreeSelector = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]), _sfc_main$1 = {
|
|
12967
|
+
components: { TreeSelector },
|
|
12969
12968
|
props: {
|
|
12970
|
-
|
|
12971
|
-
|
|
12972
|
-
|
|
12973
|
-
|
|
12974
|
-
|
|
12975
|
-
|
|
12976
|
-
|
|
12977
|
-
|
|
12978
|
-
showSearch: { type: Boolean, required: !1, default: !0 },
|
|
12979
|
-
modalInfo: { type: Boolean, required: !1, default: !0 },
|
|
12980
|
-
// 是否弹窗显示详情,false 为进入新页面
|
|
12981
|
-
showCreateBtn: { type: Boolean, default: !1 },
|
|
12982
|
-
// 是否显示创建按钮
|
|
12983
|
-
showEditBtn: { type: Boolean, default: !0 },
|
|
12984
|
-
// 是否显示 编辑 按钮
|
|
12985
|
-
editBtnAsView: { type: Boolean, default: !1 }
|
|
12986
|
-
// 是否改编辑按钮为查看按钮
|
|
12969
|
+
name: { type: String, require: !0 },
|
|
12970
|
+
list: { type: Array, default() {
|
|
12971
|
+
return [];
|
|
12972
|
+
} },
|
|
12973
|
+
api: { type: Object, require: !0 },
|
|
12974
|
+
formFields: { type: Array, default() {
|
|
12975
|
+
return [];
|
|
12976
|
+
} }
|
|
12987
12977
|
},
|
|
12988
12978
|
data() {
|
|
12989
|
-
|
|
12990
|
-
|
|
12991
|
-
|
|
12992
|
-
|
|
12993
|
-
|
|
12994
|
-
|
|
12995
|
-
|
|
12996
|
-
|
|
12997
|
-
|
|
12998
|
-
|
|
12999
|
-
|
|
13000
|
-
|
|
13001
|
-
|
|
13002
|
-
|
|
13003
|
-
|
|
13004
|
-
|
|
12979
|
+
let m = [
|
|
12980
|
+
// 动态传入 列配置
|
|
12981
|
+
{
|
|
12982
|
+
title: "#",
|
|
12983
|
+
width: 100,
|
|
12984
|
+
align: "center",
|
|
12985
|
+
key: "id"
|
|
12986
|
+
},
|
|
12987
|
+
...this.list,
|
|
12988
|
+
{
|
|
12989
|
+
title: "修改日期",
|
|
12990
|
+
align: "center",
|
|
12991
|
+
width: 150,
|
|
12992
|
+
render(f, { row: p }) {
|
|
12993
|
+
if (p.updateDate) {
|
|
12994
|
+
let t = p.updateDate.split(":");
|
|
12995
|
+
return t.pop(), f("span", t.join(":"));
|
|
12996
|
+
}
|
|
13005
12997
|
}
|
|
12998
|
+
// key: 'createDate'
|
|
13006
12999
|
},
|
|
13007
|
-
|
|
13008
|
-
|
|
13000
|
+
// {
|
|
13001
|
+
// title: '顺序',
|
|
13002
|
+
// key: 'index',
|
|
13003
|
+
// align: 'center',
|
|
13004
|
+
// width: 120
|
|
13005
|
+
// },
|
|
13006
|
+
{
|
|
13007
|
+
title: "编辑",
|
|
13008
|
+
align: "center",
|
|
13009
|
+
width: 270,
|
|
13010
|
+
slot: "action"
|
|
13011
|
+
}
|
|
13012
|
+
];
|
|
13013
|
+
return {
|
|
13014
|
+
isCreateTop: !1,
|
|
13015
|
+
isUpdate: !1,
|
|
13016
|
+
edit: {
|
|
13017
|
+
isShowEdit: !1,
|
|
13018
|
+
row: {},
|
|
13019
|
+
// 正在编辑的对象,如果新建的时候,这个值为 null
|
|
13020
|
+
parent: "",
|
|
13021
|
+
parentId: 0
|
|
13022
|
+
},
|
|
13023
|
+
columns16: m,
|
|
13024
|
+
data: [
|
|
13025
|
+
{
|
|
13026
|
+
id: "100",
|
|
13027
|
+
name: "John Brown",
|
|
13028
|
+
age: 18,
|
|
13029
|
+
address: "New York No. 1 Lake Park"
|
|
13030
|
+
},
|
|
13031
|
+
{
|
|
13032
|
+
id: "101",
|
|
13033
|
+
name: "Jim Green",
|
|
13034
|
+
age: 24,
|
|
13035
|
+
address: "London No. 1 Lake Park",
|
|
13036
|
+
_showChildren: !0,
|
|
13037
|
+
children: [
|
|
13038
|
+
{
|
|
13039
|
+
id: "10100",
|
|
13040
|
+
name: "John Brown",
|
|
13041
|
+
age: 18,
|
|
13042
|
+
address: "New York No. 1 Lake Park"
|
|
13043
|
+
},
|
|
13044
|
+
{
|
|
13045
|
+
id: "10101",
|
|
13046
|
+
name: "Joe Blackn",
|
|
13047
|
+
age: 30,
|
|
13048
|
+
address: "Sydney No. 1 Lake Park"
|
|
13049
|
+
},
|
|
13050
|
+
{
|
|
13051
|
+
id: "10102",
|
|
13052
|
+
name: "Jon Snow",
|
|
13053
|
+
age: 26,
|
|
13054
|
+
address: "Ottawa No. 2 Lake Park",
|
|
13055
|
+
children: [
|
|
13056
|
+
{
|
|
13057
|
+
id: "1010200",
|
|
13058
|
+
name: "Jim Green",
|
|
13059
|
+
age: 24,
|
|
13060
|
+
address: "New York No. 1 Lake Park"
|
|
13061
|
+
}
|
|
13062
|
+
]
|
|
13063
|
+
}
|
|
13064
|
+
]
|
|
13065
|
+
},
|
|
13066
|
+
{
|
|
13067
|
+
id: "102",
|
|
13068
|
+
name: "Joe Black",
|
|
13069
|
+
age: 30,
|
|
13070
|
+
address: "Sydney No. 1 Lake Park"
|
|
13071
|
+
},
|
|
13072
|
+
{
|
|
13073
|
+
id: "103",
|
|
13074
|
+
name: "Jon Snow",
|
|
13075
|
+
age: 26,
|
|
13076
|
+
address: "Ottawa No. 2 Lake Park"
|
|
13077
|
+
}
|
|
13078
|
+
]
|
|
13009
13079
|
};
|
|
13010
13080
|
},
|
|
13011
13081
|
mounted() {
|
|
13012
|
-
this.
|
|
13082
|
+
this.getData();
|
|
13013
13083
|
},
|
|
13014
13084
|
methods: {
|
|
13015
|
-
/**
|
|
13016
|
-
* 加载列定义
|
|
13017
|
-
*/
|
|
13018
|
-
getRemoteColDef() {
|
|
13019
|
-
xhr_fetch.get(`${window.config.dsApiRoot}/common_api/ds_widget_config/${this.colDefId}`, (m) => {
|
|
13020
|
-
this.list.loading = !1, m.status ? (this.widgetName_ = m.data.name, this.renderConfig(m.data.config)) : this.$Message.warning(m.message || "获取列表失败");
|
|
13021
|
-
});
|
|
13022
|
-
},
|
|
13023
|
-
renderConfig(m) {
|
|
13024
|
-
this.bindingFormId = m.bindingFormId || 0, this.listApiUrl_ = m.dataBinding.url.replace("{project_prefix}", this.apiPrefix);
|
|
13025
|
-
const f = m.fields;
|
|
13026
|
-
this.list.columns = [], f.forEach((p) => {
|
|
13027
|
-
if (p.isShow) {
|
|
13028
|
-
const t = { title: p.title, key: p.key, width: p.width, minWidth: p.minWidth, align: p.align };
|
|
13029
|
-
cellRender(t, p), this.list.columns.push(t);
|
|
13030
|
-
}
|
|
13031
|
-
}), this.defaultAction && this.list.columns.push({ title: "操作", slot: "action", align: "center", width: 200 }), this.getData();
|
|
13032
|
-
},
|
|
13033
13085
|
getData() {
|
|
13034
|
-
this.list
|
|
13035
|
-
|
|
13036
|
-
m += (m.indexOf("?") > -1 ? "&" : "?") + `pageNo=${this.list.pageNo}&pageSize=${this.list.pageSize}`, xhr_fetch.get(m, (f) => {
|
|
13037
|
-
this.list.loading = !1, f.status ? f.data.zero ? this.$Message.warning("暂无数据") : (this.list.data = f.data.list, this.list.total = f.data.totalCount) : this.$Message.warning(f.message || "获取列表失败");
|
|
13086
|
+
xhr_fetch.get(`${this.api.list}`, (m) => {
|
|
13087
|
+
this.data = tranListToTreeData(m.result);
|
|
13038
13088
|
});
|
|
13039
13089
|
},
|
|
13040
|
-
onPageNoChange(m) {
|
|
13041
|
-
this.list.pageNo = m, this.getData();
|
|
13042
|
-
},
|
|
13043
13090
|
/**
|
|
13044
|
-
*
|
|
13091
|
+
* 新建子节点
|
|
13092
|
+
*
|
|
13093
|
+
* @param name 父节点的名称
|
|
13094
|
+
* @param id 父节点的 id
|
|
13045
13095
|
*/
|
|
13046
|
-
|
|
13047
|
-
this.
|
|
13096
|
+
createTreeNode(m, f, p) {
|
|
13097
|
+
this.isCreateTop = !1, this.isUpdate = !1, this.edit.isShowEdit = !0, this.edit.parent = m, this.edit.parentId = f, this.edit.row = {}, this.$refs.selectParent.selectId = f;
|
|
13048
13098
|
},
|
|
13049
|
-
|
|
13050
|
-
|
|
13051
|
-
|
|
13052
|
-
|
|
13099
|
+
/**
|
|
13100
|
+
* 编辑节点
|
|
13101
|
+
*
|
|
13102
|
+
* @param name 父节点的名称
|
|
13103
|
+
* @param id 父节点的 id
|
|
13104
|
+
*/
|
|
13105
|
+
editTreeNode(m) {
|
|
13106
|
+
this.isCreateTop = !1, this.isUpdate = !0, this.edit.isShowEdit = !0, this.edit.parent = m.name, this.edit.parentId = m.id, this.edit.row = m, this.$refs.selectParent.selectId = m.parentId;
|
|
13053
13107
|
},
|
|
13054
13108
|
/**
|
|
13055
|
-
*
|
|
13109
|
+
* 创建顶级节点
|
|
13056
13110
|
*/
|
|
13057
|
-
|
|
13058
|
-
|
|
13059
|
-
this.$router.push({ path: this.createRoute });
|
|
13060
|
-
else if (this.$parent.onCreate)
|
|
13061
|
-
this.$parent.edit(m);
|
|
13062
|
-
else if (this.modalInfo) {
|
|
13063
|
-
this.isShowForm = !0;
|
|
13064
|
-
const f = this.$refs.FormLoader;
|
|
13065
|
-
f.formId = this.bindingFormId, f.load();
|
|
13066
|
-
}
|
|
13111
|
+
createTop() {
|
|
13112
|
+
this.isUpdate = !1, this.isCreateTop = !0, this.edit.isShowEdit = !0, this.edit.row = {};
|
|
13067
13113
|
},
|
|
13068
13114
|
/**
|
|
13069
|
-
*
|
|
13115
|
+
* 保存
|
|
13070
13116
|
*/
|
|
13071
|
-
|
|
13072
|
-
if (this.
|
|
13073
|
-
|
|
13074
|
-
|
|
13075
|
-
|
|
13076
|
-
|
|
13077
|
-
|
|
13078
|
-
|
|
13079
|
-
|
|
13080
|
-
|
|
13081
|
-
|
|
13117
|
+
save() {
|
|
13118
|
+
if (this.isUpdate) {
|
|
13119
|
+
let m = Object.assign({}, this.edit.row);
|
|
13120
|
+
delete m._index, delete m._rowKey, delete m.children, delete m._showChildren, m.parentId = this.$refs.selectParent.selectId, xhr_fetch.put(`${this.api.update}`, (f) => {
|
|
13121
|
+
f.status ? (this.getData(), this.$Message.success(f.message)) : this.$Message.error(f.message || "修改失败");
|
|
13122
|
+
}, m);
|
|
13123
|
+
} else if (this.isCreateTop)
|
|
13124
|
+
this.edit.row.parentId = 0, xhr_fetch.post(`${this.api.create}`, (m) => {
|
|
13125
|
+
m.status ? (this.getData(), this.$Message.success(m.message)) : this.$Message.error(m.message || "创建失败");
|
|
13126
|
+
}, this.edit.row);
|
|
13127
|
+
else {
|
|
13128
|
+
let m = Object.assign({}, this.edit.row);
|
|
13129
|
+
m.parentId = this.$refs.selectParent.selectId, xhr_fetch.post(`${this.api.create}`, (f) => {
|
|
13130
|
+
f.status ? (this.getData(), this.$Message.success(f.message)) : this.$Message.error(f.message || "创建失败");
|
|
13131
|
+
}, m);
|
|
13082
13132
|
}
|
|
13133
|
+
},
|
|
13134
|
+
delTreeNode({ id: m }) {
|
|
13135
|
+
xhr_fetch.del(`${this.api.delete}`, (f) => {
|
|
13136
|
+
f.status ? (this.getData(), this.$Message.success(f.message)) : this.$Message.error(f.message || "创建失败");
|
|
13137
|
+
}, { id: m });
|
|
13138
|
+
},
|
|
13139
|
+
delAllTreeNode() {
|
|
13140
|
+
alert(9);
|
|
13083
13141
|
}
|
|
13084
13142
|
},
|
|
13085
|
-
|
|
13086
|
-
|
|
13087
|
-
|
|
13088
|
-
*
|
|
13089
|
-
* @param v
|
|
13090
|
-
*/
|
|
13091
|
-
// current(v: number): void {
|
|
13092
|
-
// this.start = (v - 1) * this.list.limit;
|
|
13093
|
-
// this.getData();
|
|
13094
|
-
// },
|
|
13095
|
-
// 'list.pageNo'(v: number): void {
|
|
13096
|
-
// this.list.start = (v - 1) * this.list.limit;
|
|
13097
|
-
// this.getData();
|
|
13098
|
-
// },
|
|
13099
|
-
colDefId(m) {
|
|
13100
|
-
this.getRemoteColDef();
|
|
13101
|
-
},
|
|
13102
|
-
cfg: {
|
|
13103
|
-
handler(m) {
|
|
13104
|
-
this.renderConfig(m);
|
|
13105
|
-
},
|
|
13106
|
-
deep: !0
|
|
13143
|
+
computed: {
|
|
13144
|
+
getTitle() {
|
|
13145
|
+
return this.isUpdate ? "编辑[" + this.edit.row.name + "]" : this.isCreateTop ? "新建顶级节点" : "新建子" + this.name;
|
|
13107
13146
|
}
|
|
13108
13147
|
}
|
|
13109
|
-
}
|
|
13110
|
-
function
|
|
13111
|
-
|
|
13112
|
-
|
|
13113
|
-
|
|
13114
|
-
|
|
13115
|
-
|
|
13116
|
-
|
|
13117
|
-
|
|
13118
|
-
item.render == "render" && (item.isCode && item.customRender && (rendererColDef.render = eval(item.customRender)), !item.isCode && item.customRenderKV && (rendererColDef.render = customRender(item.customRenderKV)));
|
|
13119
|
-
}
|
|
13120
|
-
}
|
|
13121
|
-
function state(m, f) {
|
|
13122
|
-
const p = f.row[f.column.key], t = "•";
|
|
13123
|
-
switch (p) {
|
|
13124
|
-
case 0:
|
|
13125
|
-
return m("div", {
|
|
13126
|
-
style: { color: "#52c41a", fontSize: "20px" },
|
|
13127
|
-
attrs: { title: "正常" }
|
|
13128
|
-
}, t);
|
|
13129
|
-
case -1:
|
|
13130
|
-
return m("div", {
|
|
13131
|
-
style: { color: "red", fontSize: "20px" },
|
|
13132
|
-
attrs: { title: "已删除" }
|
|
13133
|
-
}, t);
|
|
13134
|
-
default:
|
|
13135
|
-
return m("div", {
|
|
13136
|
-
style: { color: "yellow", fontSize: "20px" },
|
|
13137
|
-
attrs: { title: "已禁用/已下线" }
|
|
13138
|
-
}, t);
|
|
13139
|
-
}
|
|
13140
|
-
}
|
|
13141
|
-
function sex(m, f) {
|
|
13142
|
-
const p = f.row[f.column.key];
|
|
13143
|
-
let t = "";
|
|
13144
|
-
switch (p) {
|
|
13145
|
-
case "MALE":
|
|
13146
|
-
t = "男";
|
|
13147
|
-
break;
|
|
13148
|
-
case "FEMALE":
|
|
13149
|
-
t = "女";
|
|
13150
|
-
break;
|
|
13151
|
-
default:
|
|
13152
|
-
t = "未知";
|
|
13153
|
-
}
|
|
13154
|
-
return m("span", t);
|
|
13155
|
-
}
|
|
13156
|
-
function email(m, f) {
|
|
13157
|
-
const p = f.row[f.column.key];
|
|
13158
|
-
return p ? m("a", { href: "mailto://" + p }, p) : "";
|
|
13159
|
-
}
|
|
13160
|
-
function link(m, f) {
|
|
13161
|
-
const p = f.row[f.column.key];
|
|
13162
|
-
return p ? m("a", { href: p, target: "_blank", title: p }, "超链接") : "";
|
|
13163
|
-
}
|
|
13164
|
-
function link_http(m, f) {
|
|
13165
|
-
const p = f.row[f.column.key];
|
|
13166
|
-
return p ? m("a", { href: p, target: "_blank", title: p }, p) : "";
|
|
13167
|
-
}
|
|
13168
|
-
function date(m, f) {
|
|
13169
|
-
const p = f.row[f.column.key];
|
|
13170
|
-
if (p)
|
|
13171
|
-
if (p.indexOf(":") != -1) {
|
|
13172
|
-
const t = p.split(":");
|
|
13173
|
-
return t.pop(), t.pop(), p ? t.join("").replace(/\s\d+$/, "") : "";
|
|
13174
|
-
} else
|
|
13175
|
-
return p;
|
|
13176
|
-
else
|
|
13177
|
-
return "";
|
|
13178
|
-
}
|
|
13179
|
-
function long_date(m, f) {
|
|
13180
|
-
const p = f.row[f.column.key];
|
|
13181
|
-
return p && isoDateTimeRegex.test(p) ? m("span", convertDateLong(p)) : p ? m("span", p) : "";
|
|
13182
|
-
}
|
|
13183
|
-
const isoDateTimeRegex = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:.\d*)?)$/;
|
|
13184
|
-
function convertDate(m) {
|
|
13185
|
-
const f = new Date(m), p = f.getFullYear(), t = f.getMonth() + 1, $ = f.getDate(), O = f.getHours(), N = f.getMinutes() === 0 ? "00" : f.getMinutes();
|
|
13186
|
-
return `${p}-${t}-${$} ${O}:${N}`;
|
|
13187
|
-
}
|
|
13188
|
-
function convertDateLong(m) {
|
|
13189
|
-
const f = new Date(m), p = f.getFullYear(), t = f.getMonth() + 1, $ = f.getDate(), O = f.getHours(), N = f.getMinutes() === 0 ? "00" : f.getMinutes(), S = f.getSeconds();
|
|
13190
|
-
return `${p}-${t}-${$} ${O}:${N}:${S}`;
|
|
13191
|
-
}
|
|
13192
|
-
function short_date(m, f) {
|
|
13193
|
-
const p = f.row[f.column.key];
|
|
13194
|
-
if (p) {
|
|
13195
|
-
if (isoDateTimeRegex.test(p))
|
|
13196
|
-
return m("span", convertDate(p));
|
|
13197
|
-
const t = p.split(":");
|
|
13198
|
-
return t.pop(), p ? m("span", t.join(":")) : "";
|
|
13199
|
-
} else
|
|
13200
|
-
return "";
|
|
13201
|
-
}
|
|
13202
|
-
function thumb(m, f) {
|
|
13203
|
-
const p = f.row[f.column.key];
|
|
13204
|
-
if (!p)
|
|
13205
|
-
return "";
|
|
13206
|
-
const t = p.startsWith("iVBOR") || p.startsWith("/9j");
|
|
13207
|
-
return m("a", t ? { href: "javascript:void(0);" } : { href: p, target: "_blank", title: p }, [
|
|
13208
|
-
m("img", {
|
|
13209
|
-
src: t ? "data:image/;base64," + p : p,
|
|
13210
|
-
// 对于内联样式,可以直接传递字符串或对象
|
|
13211
|
-
style: "max-width:100px;max-height:50px;margin-top:5px"
|
|
13212
|
-
})
|
|
13213
|
-
]);
|
|
13214
|
-
}
|
|
13215
|
-
function clk_event(m) {
|
|
13216
|
-
return (f, p) => {
|
|
13217
|
-
const t = p.row[p.column.key];
|
|
13218
|
-
return t ? f("a", {
|
|
13219
|
-
on: { click: () => m(p.row) }
|
|
13220
|
-
}, t) : "";
|
|
13221
|
-
};
|
|
13222
|
-
}
|
|
13223
|
-
function booleanValue(m, f) {
|
|
13224
|
-
return f.row[f.column.key] ? "是" : "否";
|
|
13225
|
-
}
|
|
13226
|
-
function price(m, f) {
|
|
13227
|
-
const p = f.row[f.column.key];
|
|
13228
|
-
return p ? (p / 100).toFixed(2) : "";
|
|
13229
|
-
}
|
|
13230
|
-
function customRender(m) {
|
|
13231
|
-
const f = {};
|
|
13232
|
-
return m.forEach((p) => f[p.value + ""] = p.name), (p, t) => {
|
|
13233
|
-
const $ = t.row[t.column.key];
|
|
13234
|
-
return $ == "0" || $ ? p("span", f[$]) : "";
|
|
13235
|
-
};
|
|
13148
|
+
};
|
|
13149
|
+
function tranListToTreeData(m) {
|
|
13150
|
+
let f = [], p = {};
|
|
13151
|
+
return m.forEach((t) => {
|
|
13152
|
+
t.children || (t.children = []), t._showChildren = !0, p[t.id] = t;
|
|
13153
|
+
}), m.forEach((t) => {
|
|
13154
|
+
let $ = p[t.parentId];
|
|
13155
|
+
$ ? $.children.push(t) : f.push(t);
|
|
13156
|
+
}), f;
|
|
13236
13157
|
}
|
|
13237
|
-
const _hoisted_1 = {
|
|
13238
|
-
key: 0,
|
|
13239
|
-
class: "common-search-panel"
|
|
13240
|
-
}, _hoisted_4 = { style: { float: "right" } }, _hoisted_5 = { class: "toolbar" }, _hoisted_6 = ["onClick"], _hoisted_7 = { key: 2 };
|
|
13158
|
+
const _hoisted_1 = { style: { "text-align": "center" } }, _hoisted_2 = { key: 0 }, _hoisted_3 = { key: 1 };
|
|
13241
13159
|
function _sfc_render$1(m, f, p, t, $, O) {
|
|
13242
|
-
const N = resolveComponent("Button"), S = resolveComponent("
|
|
13160
|
+
const N = resolveComponent("Button"), S = resolveComponent("Poptip"), ye = resolveComponent("Table"), Ee = resolveComponent("TreeSelector"), _e = resolveComponent("FormItem"), Nt = resolveComponent("Input"), cn = resolveComponent("Form"), He = resolveComponent("Modal");
|
|
13243
13161
|
return openBlock(), createElementBlock("div", null, [
|
|
13244
|
-
|
|
13245
|
-
|
|
13246
|
-
|
|
13247
|
-
|
|
13248
|
-
|
|
13249
|
-
|
|
13250
|
-
|
|
13251
|
-
|
|
13252
|
-
|
|
13253
|
-
|
|
13254
|
-
|
|
13255
|
-
|
|
13256
|
-
|
|
13257
|
-
|
|
13258
|
-
|
|
13259
|
-
|
|
13260
|
-
|
|
13261
|
-
|
|
13262
|
-
|
|
13263
|
-
|
|
13264
|
-
|
|
13265
|
-
|
|
13266
|
-
|
|
13267
|
-
|
|
13268
|
-
|
|
13269
|
-
|
|
13270
|
-
|
|
13271
|
-
|
|
13272
|
-
|
|
13273
|
-
|
|
13274
|
-
|
|
13275
|
-
|
|
13276
|
-
|
|
13277
|
-
|
|
13278
|
-
|
|
13279
|
-
|
|
13280
|
-
|
|
13281
|
-
|
|
13282
|
-
|
|
13283
|
-
|
|
13284
|
-
|
|
13285
|
-
|
|
13286
|
-
|
|
13162
|
+
createVNode(N, {
|
|
13163
|
+
type: "primary",
|
|
13164
|
+
style: { "margin-bottom": "10px" },
|
|
13165
|
+
onClick: m.createTop
|
|
13166
|
+
}, {
|
|
13167
|
+
default: withCtx(() => [
|
|
13168
|
+
createTextVNode("新建顶级" + toDisplayString(m.name), 1)
|
|
13169
|
+
]),
|
|
13170
|
+
_: 1
|
|
13171
|
+
}, 8, ["onClick"]),
|
|
13172
|
+
createVNode(ye, {
|
|
13173
|
+
"row-key": "id",
|
|
13174
|
+
columns: m.columns16,
|
|
13175
|
+
data: m.data,
|
|
13176
|
+
border: "",
|
|
13177
|
+
size: "small"
|
|
13178
|
+
}, {
|
|
13179
|
+
action: withCtx(({ row: Ce }) => [
|
|
13180
|
+
createVNode(N, {
|
|
13181
|
+
size: "small",
|
|
13182
|
+
icon: "md-add",
|
|
13183
|
+
type: "success",
|
|
13184
|
+
onClick: (kt) => m.createTreeNode(Ce.name, Ce.id, Ce.parentId)
|
|
13185
|
+
}, {
|
|
13186
|
+
default: withCtx(() => [...f[4] || (f[4] = [
|
|
13187
|
+
createTextVNode("新建", -1)
|
|
13188
|
+
])]),
|
|
13189
|
+
_: 1
|
|
13190
|
+
}, 8, ["onClick"]),
|
|
13191
|
+
createVNode(N, {
|
|
13192
|
+
size: "small",
|
|
13193
|
+
icon: "md-create",
|
|
13194
|
+
type: "info",
|
|
13195
|
+
onClick: (kt) => m.editTreeNode(Ce)
|
|
13196
|
+
}, {
|
|
13197
|
+
default: withCtx(() => [...f[5] || (f[5] = [
|
|
13198
|
+
createTextVNode("编辑", -1)
|
|
13199
|
+
])]),
|
|
13200
|
+
_: 1
|
|
13201
|
+
}, 8, ["onClick"]),
|
|
13202
|
+
createVNode(S, {
|
|
13203
|
+
transfer: "",
|
|
13204
|
+
placement: "left"
|
|
13205
|
+
}, {
|
|
13206
|
+
content: withCtx(() => [
|
|
13207
|
+
f[7] || (f[7] = createElementVNode("b", null, "请选择删除模式:", -1)),
|
|
13208
|
+
createElementVNode("p", null, "- 删除该" + toDisplayString(m.name) + ",如有子" + toDisplayString(m.name) + "调整到原父亲" + toDisplayString(m.name) + "上;", 1),
|
|
13209
|
+
createElementVNode("p", null, "- 删除该" + toDisplayString(m.name) + "以及所有子" + toDisplayString(m.name) + ",删除该节点并包括下级" + toDisplayString(m.name), 1),
|
|
13210
|
+
f[8] || (f[8] = createElementVNode("br", null, null, -1)),
|
|
13211
|
+
createElementVNode("div", _hoisted_1, [
|
|
13212
|
+
createVNode(N, {
|
|
13213
|
+
size: "small",
|
|
13214
|
+
type: "primary",
|
|
13215
|
+
onClick: (kt) => m.delTreeNode(Ce)
|
|
13287
13216
|
}, {
|
|
13288
13217
|
default: withCtx(() => [
|
|
13289
|
-
|
|
13290
|
-
size: "20",
|
|
13291
|
-
type: "ios-refresh",
|
|
13292
|
-
onClick: m.getData,
|
|
13293
|
-
style: { cursor: "pointer" }
|
|
13294
|
-
}, null, 8, ["onClick"])
|
|
13218
|
+
createTextVNode("删除该" + toDisplayString(m.name), 1)
|
|
13295
13219
|
]),
|
|
13296
13220
|
_: 1
|
|
13297
|
-
}),
|
|
13298
|
-
|
|
13299
|
-
|
|
13300
|
-
key: 0,
|
|
13221
|
+
}, 8, ["onClick"]),
|
|
13222
|
+
createVNode(N, {
|
|
13223
|
+
size: "small",
|
|
13301
13224
|
type: "primary",
|
|
13302
|
-
|
|
13303
|
-
onClick: m.onCreate
|
|
13225
|
+
onClick: m.delAllTreeNode
|
|
13304
13226
|
}, {
|
|
13305
13227
|
default: withCtx(() => [
|
|
13306
|
-
createTextVNode("
|
|
13228
|
+
createTextVNode("删除所有" + toDisplayString(m.name), 1)
|
|
13307
13229
|
]),
|
|
13308
13230
|
_: 1
|
|
13309
|
-
}, 8, ["onClick"])
|
|
13231
|
+
}, 8, ["onClick"])
|
|
13310
13232
|
])
|
|
13311
13233
|
]),
|
|
13312
|
-
|
|
13313
|
-
|
|
13314
|
-
|
|
13315
|
-
|
|
13316
|
-
|
|
13317
|
-
|
|
13318
|
-
|
|
13319
|
-
|
|
13320
|
-
|
|
13321
|
-
|
|
13322
|
-
|
|
13323
|
-
|
|
13324
|
-
|
|
13325
|
-
|
|
13326
|
-
|
|
13327
|
-
|
|
13328
|
-
|
|
13329
|
-
|
|
13330
|
-
|
|
13331
|
-
|
|
13332
|
-
|
|
13333
|
-
|
|
13334
|
-
|
|
13335
|
-
|
|
13336
|
-
createElementVNode("a", { style: { color: "red" } }, "删除", -1)
|
|
13337
|
-
])]),
|
|
13338
|
-
_: 1
|
|
13339
|
-
}, 8, ["onOnOk"])
|
|
13340
|
-
]),
|
|
13341
|
-
_: 3
|
|
13342
|
-
}, 8, ["columns", "data", "loading"]),
|
|
13343
|
-
createVNode(He, {
|
|
13344
|
-
class: "ivu-mt ivu-text-right",
|
|
13345
|
-
total: m.list.total,
|
|
13346
|
-
current: m.list.pageNo,
|
|
13347
|
-
"show-total": "",
|
|
13348
|
-
"show-sizer": "",
|
|
13349
|
-
"page-size": m.list.limit,
|
|
13350
|
-
onOnChange: m.onPageNoChange,
|
|
13351
|
-
onOnPageSizeChange: m.handleChangePageSize
|
|
13352
|
-
}, null, 8, ["total", "current", "page-size", "onOnChange", "onOnPageSizeChange"])
|
|
13353
|
-
]),
|
|
13354
|
-
_: 3
|
|
13355
|
-
})
|
|
13356
|
-
])) : createCommentVNode("", !0),
|
|
13357
|
-
m.modalInfo ? (openBlock(), createBlock(un, {
|
|
13358
|
-
key: 1,
|
|
13359
|
-
modelValue: m.isShowForm,
|
|
13360
|
-
"onUpdate:modelValue": f[2] || (f[2] = (ne) => m.isShowForm = ne),
|
|
13361
|
-
title: "预览",
|
|
13362
|
-
width: "800",
|
|
13363
|
-
"ok-text": "关闭",
|
|
13364
|
-
"cancel-text": ""
|
|
13234
|
+
default: withCtx(() => [
|
|
13235
|
+
createVNode(N, {
|
|
13236
|
+
size: "small",
|
|
13237
|
+
icon: "md-trash",
|
|
13238
|
+
type: "error"
|
|
13239
|
+
}, {
|
|
13240
|
+
default: withCtx(() => [...f[6] || (f[6] = [
|
|
13241
|
+
createTextVNode("删除", -1)
|
|
13242
|
+
])]),
|
|
13243
|
+
_: 1
|
|
13244
|
+
})
|
|
13245
|
+
]),
|
|
13246
|
+
_: 2
|
|
13247
|
+
}, 1024)
|
|
13248
|
+
]),
|
|
13249
|
+
_: 1
|
|
13250
|
+
}, 8, ["columns", "data"]),
|
|
13251
|
+
createVNode(He, {
|
|
13252
|
+
modelValue: m.edit.isShowEdit,
|
|
13253
|
+
"onUpdate:modelValue": f[3] || (f[3] = (Ce) => m.edit.isShowEdit = Ce),
|
|
13254
|
+
title: m.getTitle,
|
|
13255
|
+
width: "650",
|
|
13256
|
+
"ok-text": "保存",
|
|
13257
|
+
onOnOk: m.save
|
|
13365
13258
|
}, {
|
|
13366
13259
|
default: withCtx(() => [
|
|
13367
|
-
|
|
13368
|
-
|
|
13369
|
-
|
|
13370
|
-
|
|
13260
|
+
m.isCreateTop ? (openBlock(), createElementBlock("p", _hoisted_2, "你将新建顶级的" + toDisplayString(m.name) + "。", 1)) : createCommentVNode("", !0),
|
|
13261
|
+
!m.isUpdate && !m.isCreateTop ? (openBlock(), createElementBlock("p", _hoisted_3, "你将在" + toDisplayString(m.name) + "[" + toDisplayString(m.edit.parent) + "]下面传新建子" + toDisplayString(m.name) + "。", 1)) : createCommentVNode("", !0),
|
|
13262
|
+
createVNode(cn, {
|
|
13263
|
+
"label-width": 100,
|
|
13264
|
+
modelValue: m.edit.row,
|
|
13265
|
+
"onUpdate:modelValue": f[2] || (f[2] = (Ce) => m.edit.row = Ce),
|
|
13266
|
+
style: { margin: "5%" }
|
|
13267
|
+
}, {
|
|
13268
|
+
default: withCtx(() => [
|
|
13269
|
+
withDirectives(createVNode(_e, {
|
|
13270
|
+
label: "父亲" + m.name
|
|
13271
|
+
}, {
|
|
13272
|
+
default: withCtx(() => [
|
|
13273
|
+
createVNode(Ee, {
|
|
13274
|
+
ref: "selectParent",
|
|
13275
|
+
"tree-json": m.data
|
|
13276
|
+
}, null, 8, ["tree-json"])
|
|
13277
|
+
]),
|
|
13278
|
+
_: 1
|
|
13279
|
+
}, 8, ["label"]), [
|
|
13280
|
+
[vShow, !m.isCreateTop]
|
|
13281
|
+
]),
|
|
13282
|
+
createVNode(_e, {
|
|
13283
|
+
label: m.name + "名称",
|
|
13284
|
+
prop: "name"
|
|
13285
|
+
}, {
|
|
13286
|
+
default: withCtx(() => [
|
|
13287
|
+
createVNode(Nt, {
|
|
13288
|
+
type: "text",
|
|
13289
|
+
modelValue: m.edit.row.name,
|
|
13290
|
+
"onUpdate:modelValue": f[0] || (f[0] = (Ce) => m.edit.row.name = Ce),
|
|
13291
|
+
placeholder: "名称为必填"
|
|
13292
|
+
}, null, 8, ["modelValue"])
|
|
13293
|
+
]),
|
|
13294
|
+
_: 1
|
|
13295
|
+
}, 8, ["label"]),
|
|
13296
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(m.formFields, (Ce, kt) => (openBlock(), createBlock(_e, {
|
|
13297
|
+
key: kt,
|
|
13298
|
+
label: Ce.name,
|
|
13299
|
+
prop: Ce.prop
|
|
13300
|
+
}, {
|
|
13301
|
+
default: withCtx(() => [
|
|
13302
|
+
createVNode(Nt, {
|
|
13303
|
+
type: "text",
|
|
13304
|
+
modelValue: m.edit.row[Ce.key],
|
|
13305
|
+
"onUpdate:modelValue": (un) => m.edit.row[Ce.key] = un,
|
|
13306
|
+
placeholder: Ce.placeholder
|
|
13307
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
13308
|
+
]),
|
|
13309
|
+
_: 2
|
|
13310
|
+
}, 1032, ["label", "prop"]))), 128)),
|
|
13311
|
+
createVNode(_e, {
|
|
13312
|
+
label: m.name + "说明",
|
|
13313
|
+
prop: "content"
|
|
13314
|
+
}, {
|
|
13315
|
+
default: withCtx(() => [
|
|
13316
|
+
createVNode(Nt, {
|
|
13317
|
+
type: "textarea",
|
|
13318
|
+
modelValue: m.edit.row.content,
|
|
13319
|
+
"onUpdate:modelValue": f[1] || (f[1] = (Ce) => m.edit.row.content = Ce),
|
|
13320
|
+
rows: 4,
|
|
13321
|
+
placeholder: "简介、说明、备注,选填"
|
|
13322
|
+
}, null, 8, ["modelValue"])
|
|
13323
|
+
]),
|
|
13324
|
+
_: 1
|
|
13325
|
+
}, 8, ["label"])
|
|
13326
|
+
]),
|
|
13327
|
+
_: 1
|
|
13328
|
+
}, 8, ["modelValue"])
|
|
13371
13329
|
]),
|
|
13372
13330
|
_: 1
|
|
13373
|
-
}, 8, ["modelValue"
|
|
13374
|
-
!m.modalInfo && m.isShowForm ? (openBlock(), createElementBlock("span", _hoisted_7, [
|
|
13375
|
-
createElementVNode("a", {
|
|
13376
|
-
href: "#",
|
|
13377
|
-
onClick: f[3] || (f[3] = (ne) => m.isShowForm = !1)
|
|
13378
|
-
}, "返回列表")
|
|
13379
|
-
])) : createCommentVNode("", !0)
|
|
13331
|
+
}, 8, ["modelValue", "title", "onOnOk"])
|
|
13380
13332
|
]);
|
|
13381
13333
|
}
|
|
13382
|
-
const
|
|
13383
|
-
components: {
|
|
13384
|
-
|
|
13334
|
+
const TreeTable = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-80f72d55"]]), _sfc_main = {
|
|
13335
|
+
components: { TreeTable },
|
|
13336
|
+
data() {
|
|
13337
|
+
return {
|
|
13338
|
+
api: "dd",
|
|
13339
|
+
list: [
|
|
13340
|
+
{
|
|
13341
|
+
title: "名称",
|
|
13342
|
+
key: "name",
|
|
13343
|
+
align: "left",
|
|
13344
|
+
tree: !0,
|
|
13345
|
+
maxWidth: 200
|
|
13346
|
+
},
|
|
13347
|
+
{
|
|
13348
|
+
title: "值(value)",
|
|
13349
|
+
key: "value",
|
|
13350
|
+
align: "center"
|
|
13351
|
+
},
|
|
13352
|
+
{
|
|
13353
|
+
title: "说明",
|
|
13354
|
+
align: "center",
|
|
13355
|
+
key: "content"
|
|
13356
|
+
},
|
|
13357
|
+
{
|
|
13358
|
+
title: "扩展属性",
|
|
13359
|
+
align: "center",
|
|
13360
|
+
key: "extraData"
|
|
13361
|
+
},
|
|
13362
|
+
{
|
|
13363
|
+
title: "创建日期",
|
|
13364
|
+
align: "center",
|
|
13365
|
+
width: 150,
|
|
13366
|
+
render(m, { row: f }) {
|
|
13367
|
+
if (f.createDate) {
|
|
13368
|
+
let p = f.createDate.split(":");
|
|
13369
|
+
return p.pop(), m("span", p.join(":"));
|
|
13370
|
+
}
|
|
13371
|
+
}
|
|
13372
|
+
// key: 'createDate'
|
|
13373
|
+
}
|
|
13374
|
+
],
|
|
13375
|
+
formFields: [{
|
|
13376
|
+
name: "值(Value)",
|
|
13377
|
+
key: "value"
|
|
13378
|
+
}]
|
|
13379
|
+
};
|
|
13385
13380
|
}
|
|
13386
13381
|
};
|
|
13387
13382
|
function _sfc_render(m, f, p, t, $, O) {
|
|
13388
|
-
const N = resolveComponent("
|
|
13389
|
-
return openBlock(),
|
|
13390
|
-
|
|
13391
|
-
|
|
13392
|
-
|
|
13383
|
+
const N = resolveComponent("TreeTable");
|
|
13384
|
+
return openBlock(), createElementBlock("div", null, [
|
|
13385
|
+
f[0] || (f[0] = createElementVNode("h1", null, "数据字典", -1)),
|
|
13386
|
+
createVNode(N, {
|
|
13387
|
+
name: "组织机构",
|
|
13388
|
+
list: $.list,
|
|
13389
|
+
api: $.api,
|
|
13390
|
+
"form-fields": $.formFields
|
|
13391
|
+
}, null, 8, ["list", "api", "form-fields"])
|
|
13392
|
+
]);
|
|
13393
13393
|
}
|
|
13394
|
-
const
|
|
13394
|
+
const DataDict = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]), admin = { HomePage, Login }, system = { Article, DataDict };
|
|
13395
13395
|
export {
|
|
13396
|
-
Article,
|
|
13397
13396
|
HtmlEditor,
|
|
13398
13397
|
MyButton,
|
|
13399
13398
|
admin,
|