star-horse-lowcode 2.7.65 → 2.7.67
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/README.md +3 -0
- package/dist/assets/index.css +1 -1
- package/dist/index.es.js +597 -188
- package/dist/types/index.d.ts +30 -0
- package/package.json +3 -3
- package/.env.development +0 -3
- package/.env.production +0 -3
- package/.eslintrc-auto-import.json +0 -77
- package/.gitignore +0 -27
- package/.idea/.gitignore +0 -5
- package/.idea/MarsCodeWorkspaceAppSettings.xml +0 -6
- package/.idea/inspectionProfiles/Project_Default.xml +0 -7
- package/.idea/modules.xml +0 -8
- package/.idea/testcode.iml +0 -12
- package/.idea/vcs.xml +0 -6
- package/.idea/watcherTasks.xml +0 -4
- package/.idea/workspace.xml +0 -207
- package/.npmignore +0 -21
- package/.prettierignore +0 -26
- package/auto-imports.d.ts +0 -137
- package/components.d.ts +0 -189
- package/eslint.config.js +0 -37
- package/index.html +0 -14
- package/package-lock.json +0 -8276
- package/prettier.config.js +0 -20
- package/public/logo.svg +0 -660
- package/src/App.vue +0 -11
- package/src/api/date_utils.ts +0 -219
- package/src/api/finger_utils.ts +0 -71
- package/src/api/form_utils.ts +0 -281
- package/src/api/jquery.min.js +0 -2
- package/src/api/pcas-code.json +0 -1
- package/src/api/settings.ts +0 -81
- package/src/api/star_horse_apis.ts +0 -196
- package/src/api/star_horse_utils.ts +0 -797
- package/src/api/system.ts +0 -351
- package/src/api/user_func.ts +0 -147
- package/src/api/valid_utils.ts +0 -165
- package/src/assets/css/index.scss +0 -908
- package/src/assets/icons.css +0 -574
- package/src/assets/star-horse-icons.woff +0 -0
- package/src/components/comp/ShDynamicForm.vue +0 -160
- package/src/components/comp/ShForm.vue +0 -30
- package/src/components/comp/ShTableListColumn.vue +0 -61
- package/src/components/comp/StarHorseDataSelector.vue +0 -139
- package/src/components/comp/StarHorseDataView.vue +0 -110
- package/src/components/comp/StarHorseDataViewItems.vue +0 -61
- package/src/components/comp/StarHorseDataViewTable.vue +0 -102
- package/src/components/comp/StarHorseDialog.vue +0 -383
- package/src/components/comp/StarHorseDraggable.vue +0 -401
- package/src/components/comp/StarHorseForm.vue +0 -458
- package/src/components/comp/StarHorseFormItem.vue +0 -82
- package/src/components/comp/StarHorseFormList.vue +0 -516
- package/src/components/comp/StarHorseFormTable.vue +0 -56
- package/src/components/comp/StarHorseIcon.vue +0 -76
- package/src/components/comp/StarHorseItem.vue +0 -302
- package/src/components/comp/StarHorseJsonEditor.vue +0 -115
- package/src/components/comp/StarHorsePopover.vue +0 -66
- package/src/components/comp/StarHorseSearchComp.vue +0 -253
- package/src/components/comp/StarHorseStaticTable.vue +0 -395
- package/src/components/comp/StarHorseTableColumn.vue +0 -249
- package/src/components/comp/StarHorseTableComp.vue +0 -1193
- package/src/components/comp/StarHorseTableViewColumn.vue +0 -61
- package/src/components/comp/StarHorseTree.vue +0 -494
- package/src/components/comp/index.ts +0 -22
- package/src/components/comp/items/UTableColumn.vue +0 -65
- package/src/components/comp/items/boxItem.vue +0 -98
- package/src/components/comp/items/callitem.ts +0 -9
- package/src/components/comp/items/cardItem.vue +0 -152
- package/src/components/comp/items/collapseItem.vue +0 -134
- package/src/components/comp/items/dytableItem.vue +0 -135
- package/src/components/comp/items/otherItem.vue +0 -65
- package/src/components/comp/items/tabItem.vue +0 -155
- package/src/components/comp/items/tabPanelItem.vue +0 -110
- package/src/components/comp/items/tableColumn.vue +0 -129
- package/src/components/comp/items/tableItem.vue +0 -97
- package/src/components/comp/items/tablebtn.vue +0 -158
- package/src/components/comp/items/viewBoxItem.vue +0 -55
- package/src/components/comp/items/viewCardItem.vue +0 -47
- package/src/components/comp/items/viewCollapseItem.vue +0 -71
- package/src/components/comp/items/viewDytableItem.vue +0 -77
- package/src/components/comp/items/viewOtherItem.vue +0 -55
- package/src/components/comp/items/viewTabItem.vue +0 -77
- package/src/components/comp/items/viewTabPanelItem.vue +0 -54
- package/src/components/comp/items/viewTableItem.vue +0 -74
- package/src/components/comp/selfcomp.ts +0 -9
- package/src/components/comp/utils/DataPicker.vue +0 -302
- package/src/components/comp/utils/DataTag.vue +0 -51
- package/src/components/cron/Crontab-Day.vue +0 -230
- package/src/components/cron/Crontab-Hour.vue +0 -165
- package/src/components/cron/Crontab-Min.vue +0 -166
- package/src/components/cron/Crontab-Month.vue +0 -166
- package/src/components/cron/Crontab-Result.vue +0 -615
- package/src/components/cron/Crontab-Second.vue +0 -185
- package/src/components/cron/Crontab-Week.vue +0 -208
- package/src/components/cron/Crontab-Year.vue +0 -183
- package/src/components/cron/Crontab.vue +0 -474
- package/src/components/enums/ModuleEnums.ts +0 -10
- package/src/components/enums/ServiceEnums.ts +0 -18
- package/src/components/formcomp/container/box-container.vue +0 -162
- package/src/components/formcomp/container/callitem.ts +0 -9
- package/src/components/formcomp/container/card-container.vue +0 -170
- package/src/components/formcomp/container/collapse-container.vue +0 -133
- package/src/components/formcomp/container/dytable-col.vue +0 -448
- package/src/components/formcomp/container/dytable-container.vue +0 -57
- package/src/components/formcomp/container/dytableUtils.ts +0 -358
- package/src/components/formcomp/container/group-box-container.vue +0 -331
- package/src/components/formcomp/container/index.ts +0 -6
- package/src/components/formcomp/container/tab-container.vue +0 -153
- package/src/components/formcomp/container/table-container.vue +0 -249
- package/src/components/formcomp/items/allitem.ts +0 -9
- package/src/components/formcomp/items/area-item.vue +0 -116
- package/src/components/formcomp/items/audio-item.vue +0 -163
- package/src/components/formcomp/items/autocomplete-item.vue +0 -118
- package/src/components/formcomp/items/barcode-item.vue +0 -87
- package/src/components/formcomp/items/base-json-item.vue +0 -207
- package/src/components/formcomp/items/button-item.vue +0 -228
- package/src/components/formcomp/items/cascade-item.vue +0 -113
- package/src/components/formcomp/items/checkbox-item.vue +0 -97
- package/src/components/formcomp/items/color-item.vue +0 -70
- package/src/components/formcomp/items/cron-item.vue +0 -115
- package/src/components/formcomp/items/datetime-item.vue +0 -99
- package/src/components/formcomp/items/depart-item.vue +0 -51
- package/src/components/formcomp/items/dialog-input-item.vue +0 -207
- package/src/components/formcomp/items/divider-item.vue +0 -66
- package/src/components/formcomp/items/html-item.vue +0 -65
- package/src/components/formcomp/items/htmleditor-item.vue +0 -104
- package/src/components/formcomp/items/icon-item.vue +0 -195
- package/src/components/formcomp/items/image-item.vue +0 -247
- package/src/components/formcomp/items/index.ts +0 -44
- package/src/components/formcomp/items/input-item.vue +0 -150
- package/src/components/formcomp/items/json-array-item.vue +0 -67
- package/src/components/formcomp/items/json-item.vue +0 -66
- package/src/components/formcomp/items/markdown-item.vue +0 -77
- package/src/components/formcomp/items/number-item.vue +0 -94
- package/src/components/formcomp/items/number-range-item.vue +0 -278
- package/src/components/formcomp/items/page-select-item.vue +0 -407
- package/src/components/formcomp/items/password-item.vue +0 -71
- package/src/components/formcomp/items/qrcode-item.vue +0 -84
- package/src/components/formcomp/items/radio-item.vue +0 -112
- package/src/components/formcomp/items/rate-item.vue +0 -68
- package/src/components/formcomp/items/select-item.vue +0 -133
- package/src/components/formcomp/items/signature-item.vue +0 -216
- package/src/components/formcomp/items/slider-item.vue +0 -68
- package/src/components/formcomp/items/starhorse-form-item.vue +0 -334
- package/src/components/formcomp/items/switch-item.vue +0 -77
- package/src/components/formcomp/items/tag-item.vue +0 -77
- package/src/components/formcomp/items/text-item.vue +0 -75
- package/src/components/formcomp/items/textarea-item.vue +0 -85
- package/src/components/formcomp/items/time-item.vue +0 -77
- package/src/components/formcomp/items/time-picker-item.vue +0 -74
- package/src/components/formcomp/items/transfer-item.vue +0 -93
- package/src/components/formcomp/items/tselect-item.vue +0 -121
- package/src/components/formcomp/items/unknown-item.vue +0 -51
- package/src/components/formcomp/items/upload-item.vue +0 -189
- package/src/components/formcomp/items/user-item.vue +0 -177
- package/src/components/formcomp/items/usercomp-item.vue +0 -85
- package/src/components/formcomp/items/view-markdown-item.vue +0 -77
- package/src/components/formcomp/utils/EditDataDialog.vue +0 -67
- package/src/components/formcomp/utils/FieldList.vue +0 -125
- package/src/components/formcomp/utils/ItemRelationEventUtils.ts +0 -284
- package/src/components/help.vue +0 -31
- package/src/components/menu/MenuItem.vue +0 -95
- package/src/components/menu/SubMenu.vue +0 -68
- package/src/components/menu/SubSystemMenu.vue +0 -142
- package/src/components/register.ts +0 -24
- package/src/components/system/ContentMenu.vue +0 -260
- package/src/components/system/StarHorseButtonList.vue +0 -344
- package/src/components/system/StarHorseMenu.vue +0 -97
- package/src/components/system/StarHorseSvg.vue +0 -62
- package/src/components/system/SystemComp.ts +0 -9
- package/src/components/system/index.ts +0 -4
- package/src/components/types/ApiUrls.ts +0 -168
- package/src/components/types/BtnAction.ts +0 -51
- package/src/components/types/BtnAuth.ts +0 -43
- package/src/components/types/CompInfo.ts +0 -81
- package/src/components/types/DialogProps.ts +0 -55
- package/src/components/types/DyCompField.ts +0 -23
- package/src/components/types/DynamicNode.ts +0 -42
- package/src/components/types/MenusInfo.ts +0 -45
- package/src/components/types/PageFieldInfo.ts +0 -530
- package/src/components/types/PageProps.ts +0 -25
- package/src/components/types/Params.ts +0 -93
- package/src/components/types/RuleType.ts +0 -10
- package/src/components/types/SearchProps.ts +0 -42
- package/src/components/types/ShortKey.ts +0 -30
- package/src/components/types/StarHorseType.ts +0 -18
- package/src/components/types/index.ts +0 -15
- package/src/config/element.ts +0 -15
- package/src/config/styles.ts +0 -4
- package/src/index.ts +0 -98
- package/src/install.ts +0 -33
- package/src/lang/en_US.ts +0 -81
- package/src/lang/index.ts +0 -35
- package/src/lang/zh_CN.ts +0 -84
- package/src/main.ts +0 -57
- package/src/plugins/AblesPlugin.ts +0 -618
- package/src/plugins/registerCompPlugin.ts +0 -15
- package/src/sample/test.vue +0 -9
- package/src/store/ButtonPermission.ts +0 -101
- package/src/store/ConsumerView.ts +0 -52
- package/src/store/ContinusConfig.ts +0 -78
- package/src/store/CopyerOperation.ts +0 -74
- package/src/store/DesignForm.ts +0 -481
- package/src/store/DesignPage.ts +0 -59
- package/src/store/DynamicForm.ts +0 -241
- package/src/store/GlobalConfig.ts +0 -90
- package/src/store/SelfOperation.ts +0 -95
- package/src/store/UserInfo.ts +0 -88
- package/src/store/index.ts +0 -6
- package/src/theme/localStorge.ts +0 -16
- package/src/theme/theme.ts +0 -27
- package/src/utils/FieldOperationUtils.ts +0 -91
- package/src/utils/auth.ts +0 -83
- package/src/utils/message.ts +0 -69
- package/src/utils/preview.ts +0 -125
- package/tsconfig.json +0 -39
- package/tsconfig.node.json +0 -10
- package/vite-env.d.ts +0 -16
- package/vite.config.ts +0 -162
- package/yarn.lock +0 -4627
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts" name="StarHorseTableColumn">
|
|
2
|
-
import { createDatetime } from "@/api/date_utils";
|
|
3
|
-
import { parseListData } from "@/api/form_utils";
|
|
4
|
-
import { Config } from "@/api/settings";
|
|
5
|
-
import { PropType } from "vue";
|
|
6
|
-
|
|
7
|
-
const props = defineProps({
|
|
8
|
-
batchName: { type: String, default: "" },
|
|
9
|
-
item: { type: Object as PropType<any>, required: true },
|
|
10
|
-
commonFormat: { type: Function, required: true },
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
const dataFormat = (scope: any) => {
|
|
14
|
-
let item = props.item;
|
|
15
|
-
let val: string = scope.row[item.hideName || item.fieldName];
|
|
16
|
-
if (
|
|
17
|
-
item.type == "select" ||
|
|
18
|
-
item.type == "checkbox" ||
|
|
19
|
-
item.type == "radio"
|
|
20
|
-
) {
|
|
21
|
-
return parseListData(item, val);
|
|
22
|
-
}
|
|
23
|
-
if (item.type == "date" || item.type == "datetime") {
|
|
24
|
-
return createDatetime(val);
|
|
25
|
-
}
|
|
26
|
-
if (props.commonFormat && scope.column.property) {
|
|
27
|
-
return props.commonFormat(scope.column.property, val, scope.row);
|
|
28
|
-
}
|
|
29
|
-
return val;
|
|
30
|
-
};
|
|
31
|
-
</script>
|
|
32
|
-
<template>
|
|
33
|
-
<el-table-column
|
|
34
|
-
:prop="item.hideName || item.fieldName"
|
|
35
|
-
:label="item.label"
|
|
36
|
-
sortable
|
|
37
|
-
:show-overflow-tooltip="true"
|
|
38
|
-
v-if="item.formVisible || item.listVisible || item.viewVisible"
|
|
39
|
-
:min-width="(item.minWidth || Config.defaultColumnWidth) + 'px'"
|
|
40
|
-
>
|
|
41
|
-
<template #default="scope">
|
|
42
|
-
{{ dataFormat(scope) }}
|
|
43
|
-
</template>
|
|
44
|
-
</el-table-column>
|
|
45
|
-
</template>
|
|
46
|
-
<style lang="scss">
|
|
47
|
-
tbody {
|
|
48
|
-
.cell {
|
|
49
|
-
display: flex;
|
|
50
|
-
flex-direction: row;
|
|
51
|
-
|
|
52
|
-
.el-table__expand-icon {
|
|
53
|
-
margin-top: 5px;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
p {
|
|
57
|
-
display: block;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
</style>
|
|
@@ -1,494 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {computed, ModelRef, nextTick, onMounted, PropType, reactive, ref, unref,} from "vue";
|
|
3
|
-
import SubSystemMenu from "@/components/menu/SubSystemMenu.vue";
|
|
4
|
-
import {useGlobalConfigStore} from "@/store/GlobalConfig";
|
|
5
|
-
import piniaInstance from "@/store";
|
|
6
|
-
import {PageProps} from "@/components/types/PageProps";
|
|
7
|
-
import {ApiUrls} from "@/components/types/ApiUrls";
|
|
8
|
-
import {warning} from "@/utils/message";
|
|
9
|
-
import {SearchParams} from "@/components/types/Params";
|
|
10
|
-
import {OrderByInfo} from "@/components/types/PageFieldInfo";
|
|
11
|
-
import {postRequest} from "@/api/star_horse_apis";
|
|
12
|
-
import {closeLoad, createCondition} from "@/api/star_horse_utils";
|
|
13
|
-
import {isSystemManage} from "@/utils/auth";
|
|
14
|
-
import {Config} from "@/api/settings";
|
|
15
|
-
import Help from "@/components/help.vue";
|
|
16
|
-
import {compKey} from "@/api/system";
|
|
17
|
-
|
|
18
|
-
const props = defineProps({
|
|
19
|
-
preps: {
|
|
20
|
-
type: Object as PropType<any>,
|
|
21
|
-
default: () => {
|
|
22
|
-
return {
|
|
23
|
-
value: "value",
|
|
24
|
-
label: "name",
|
|
25
|
-
children: "children",
|
|
26
|
-
};
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
helpMsg: {type: String},
|
|
30
|
-
showCollapse: {type: Boolean, default: false},
|
|
31
|
-
treeTitle: {type: String, default: "树形菜单"},
|
|
32
|
-
expand: {type: Boolean, default: false},
|
|
33
|
-
height: {type: Number, default: 600},
|
|
34
|
-
//是否显示复选框
|
|
35
|
-
showCheckBox: {type: Boolean, default: false},
|
|
36
|
-
//是否显示已选中的数据
|
|
37
|
-
showSelectData: {type: Boolean, default: false},
|
|
38
|
-
checkStrictly: {type: Boolean, default: true},
|
|
39
|
-
//是否显示搜索框
|
|
40
|
-
showSearch: {type: Boolean, default: true},
|
|
41
|
-
checkOnClickNode: {type: Boolean, default: true},
|
|
42
|
-
treeType: {type: String, default: "tree"},
|
|
43
|
-
//在标签上显示值
|
|
44
|
-
showCode: {type: Boolean, default: false},
|
|
45
|
-
//是否显示分页
|
|
46
|
-
showPageBar: {type: Boolean, default: false},
|
|
47
|
-
//是否动态数据
|
|
48
|
-
isDynamicData: {type: Boolean, default: false},
|
|
49
|
-
//是否自动加载数据
|
|
50
|
-
autoLoad: {type: Boolean, default: true},
|
|
51
|
-
//接口地址
|
|
52
|
-
compUrl: {type: Object as PropType<ApiUrls>},
|
|
53
|
-
//按钮名称
|
|
54
|
-
btnTitle: {type: String, default: "添加数据"},
|
|
55
|
-
//按钮是否可见
|
|
56
|
-
btnVisible: {type: Boolean, default: false},
|
|
57
|
-
rmvTitle: {type: String, default: "删除数据"},
|
|
58
|
-
rmvVisible: {type: Boolean, default: false},
|
|
59
|
-
//是否显示下拉按钮
|
|
60
|
-
showDropdown: {type: Boolean, default: true},
|
|
61
|
-
/**
|
|
62
|
-
* 数据共享人
|
|
63
|
-
* 拿到别人共享的信息
|
|
64
|
-
* let resultData = await loadData('/system-config/system/dataPermission/currentMenuPermissionPerson', {});
|
|
65
|
-
* 上面接口主要返回共享人的账号
|
|
66
|
-
* commonPersons.value = resultData?.data;
|
|
67
|
-
*/
|
|
68
|
-
commonPersons: {type: Array as PropType<any>, default: []},
|
|
69
|
-
});
|
|
70
|
-
const emits = defineEmits([
|
|
71
|
-
"selectData",
|
|
72
|
-
"changeCollapse",
|
|
73
|
-
"addData",
|
|
74
|
-
"removeData",
|
|
75
|
-
]);
|
|
76
|
-
let configStore = useGlobalConfigStore(piniaInstance);
|
|
77
|
-
let compSize = computed(
|
|
78
|
-
() => configStore.configFormInfo?.inputSize || Config.compSize,
|
|
79
|
-
);
|
|
80
|
-
const treeRef = ref<any>();
|
|
81
|
-
const menuTreeRef = ref<any>();
|
|
82
|
-
const searchData = ref("");
|
|
83
|
-
const treeDatas: ModelRef<any> = defineModel("treeDatas");
|
|
84
|
-
let menuIcon = ref<string>("expand");
|
|
85
|
-
let collapse = ref<boolean>(false);
|
|
86
|
-
const _compKey = compKey;
|
|
87
|
-
let pageInfo = reactive<PageProps>({
|
|
88
|
-
pageSize: 20,
|
|
89
|
-
currentPage: 1,
|
|
90
|
-
totalData: 0,
|
|
91
|
-
totalPage: 0,
|
|
92
|
-
dataList: [],
|
|
93
|
-
});
|
|
94
|
-
const onQueryChanged = (query: string) => {
|
|
95
|
-
treeRef.value!.filter(query);
|
|
96
|
-
};
|
|
97
|
-
const filterMethod = (query: string, node: any) => {
|
|
98
|
-
return node[props.preps?.label]!.toLowerCase().includes(query?.toLowerCase());
|
|
99
|
-
};
|
|
100
|
-
const changeArrow = (evt: MouseEvent) => {
|
|
101
|
-
if (evt) {
|
|
102
|
-
evt.preventDefault();
|
|
103
|
-
evt.stopPropagation();
|
|
104
|
-
}
|
|
105
|
-
collapse.value = !collapse.value;
|
|
106
|
-
menuIcon.value = unref(menuIcon) == "expand" ? "collapse" : "expand";
|
|
107
|
-
emits("changeCollapse", collapse.value);
|
|
108
|
-
};
|
|
109
|
-
const treeOperation = (cmd: string) => {
|
|
110
|
-
if (props.treeType == "tree") {
|
|
111
|
-
if (cmd == "add") {
|
|
112
|
-
emits("addData", {});
|
|
113
|
-
} else if (cmd == "collapse") {
|
|
114
|
-
Object.values(treeRef.value!.store.nodesMap).forEach((v: any) =>
|
|
115
|
-
v.collapse(),
|
|
116
|
-
);
|
|
117
|
-
} else {
|
|
118
|
-
Object.values(treeRef.value!.store.nodesMap).forEach((v: any) =>
|
|
119
|
-
v.expand(),
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
} else {
|
|
123
|
-
const getAllSubNodeIndex = (datas: any) => {
|
|
124
|
-
datas.forEach((item: any) => {
|
|
125
|
-
if (item.children && item.children.length > 0) {
|
|
126
|
-
if (cmd == "add") {
|
|
127
|
-
emits("addData", {});
|
|
128
|
-
} else if (cmd == "collapse") {
|
|
129
|
-
menuTreeRef.value.close(item[props.preps.value]);
|
|
130
|
-
} else {
|
|
131
|
-
menuTreeRef.value!.open(item[props.preps.value]);
|
|
132
|
-
}
|
|
133
|
-
getAllSubNodeIndex(item.children);
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
};
|
|
137
|
-
getAllSubNodeIndex(treeDatas.value);
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
let selectedDataList = ref<Array<any>>([]);
|
|
141
|
-
const operSelectData = (data: any, checked: boolean) => {
|
|
142
|
-
if (checked) {
|
|
143
|
-
let hasData = selectedDataList.value.find(
|
|
144
|
-
(item) => item[props.preps.value] == data[props.preps.value],
|
|
145
|
-
);
|
|
146
|
-
if (!hasData) {
|
|
147
|
-
selectedDataList.value.push(data);
|
|
148
|
-
}
|
|
149
|
-
} else {
|
|
150
|
-
for (let index in selectedDataList.value) {
|
|
151
|
-
let temp = selectedDataList.value[index];
|
|
152
|
-
if (temp[props.preps?.value] == data[props.preps?.value]) {
|
|
153
|
-
selectedDataList.value.splice(Number(index), 1);
|
|
154
|
-
break;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
treeRef.value!.setChecked(data, checked);
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
const setSelectData = (datas: Array<any>) => {
|
|
161
|
-
//设置数据选中自动会再次赋值
|
|
162
|
-
selectedDataList.value = datas;
|
|
163
|
-
datas.forEach((item) => {
|
|
164
|
-
treeRef.value!.setChecked(item, true);
|
|
165
|
-
});
|
|
166
|
-
};
|
|
167
|
-
const getSelectData = () => {
|
|
168
|
-
return selectedDataList.value;
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* 点击事件
|
|
173
|
-
* @param data
|
|
174
|
-
* @param checked
|
|
175
|
-
*/
|
|
176
|
-
const treeChange = (data: any, checked: boolean) => {
|
|
177
|
-
operSelectData(data, checked);
|
|
178
|
-
emits("selectData", data, checked);
|
|
179
|
-
};
|
|
180
|
-
const menuChange = (data: any) => {
|
|
181
|
-
emits("selectData", data);
|
|
182
|
-
};
|
|
183
|
-
const addData = (item: any) => {
|
|
184
|
-
emits("addData", item);
|
|
185
|
-
};
|
|
186
|
-
const removeData = (item: any) => {
|
|
187
|
-
emits("removeData", item);
|
|
188
|
-
};
|
|
189
|
-
const pageSizeClick = (pageSize: number) => {
|
|
190
|
-
pageInfo.pageSize = pageSize;
|
|
191
|
-
loadByPage();
|
|
192
|
-
};
|
|
193
|
-
const pageChangeClick = (currentPage: number) => {
|
|
194
|
-
pageInfo.currentPage = currentPage;
|
|
195
|
-
loadByPage();
|
|
196
|
-
};
|
|
197
|
-
let searchParams: SearchParams[] = [];
|
|
198
|
-
let orderBys: OrderByInfo[] = [];
|
|
199
|
-
const createSearchParams = (
|
|
200
|
-
params: SearchParams[] = [],
|
|
201
|
-
orderBy: OrderByInfo[] = [],
|
|
202
|
-
) => {
|
|
203
|
-
searchParams = params;
|
|
204
|
-
orderBys = orderBy;
|
|
205
|
-
loadByPage();
|
|
206
|
-
};
|
|
207
|
-
const expandData = () => {
|
|
208
|
-
if (props.expand) {
|
|
209
|
-
setTimeout(() => {
|
|
210
|
-
treeOperation("expand");
|
|
211
|
-
}, 800);
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
|
-
const loadByPage = async () => {
|
|
215
|
-
//加入共享人的信息
|
|
216
|
-
if (props.commonPersons?.length && !isSystemManage()) {
|
|
217
|
-
searchParams.push(
|
|
218
|
-
createCondition("a.createdBy", props.commonPersons, "in"),
|
|
219
|
-
);
|
|
220
|
-
}
|
|
221
|
-
let params: any = {
|
|
222
|
-
currentPage: pageInfo.currentPage,
|
|
223
|
-
pageSize: pageInfo.pageSize,
|
|
224
|
-
fieldList: searchParams,
|
|
225
|
-
orderBy: orderBys,
|
|
226
|
-
};
|
|
227
|
-
postRequest(props.compUrl?.pageListUrl!, params)
|
|
228
|
-
.then((res: any) => {
|
|
229
|
-
if (!res || res.data.code != 0) {
|
|
230
|
-
console.error(res?.data?.cnMessage || "接口异常");
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
|
-
let redata = res.data.data;
|
|
234
|
-
//如果不是分页之间显示返回的所有数据
|
|
235
|
-
treeDatas.value = redata?.dataList || redata;
|
|
236
|
-
pageInfo.totalPage = redata.totalPages;
|
|
237
|
-
pageInfo.totalData = redata.totalDatas;
|
|
238
|
-
})
|
|
239
|
-
.catch((err: any) => {
|
|
240
|
-
console.log(err);
|
|
241
|
-
})
|
|
242
|
-
.finally(() => {
|
|
243
|
-
closeLoad();
|
|
244
|
-
});
|
|
245
|
-
await nextTick();
|
|
246
|
-
expandData();
|
|
247
|
-
};
|
|
248
|
-
|
|
249
|
-
const init = async () => {
|
|
250
|
-
if (props.isDynamicData) {
|
|
251
|
-
if (!props.compUrl) {
|
|
252
|
-
warning("动态数据须配置数据获取接口");
|
|
253
|
-
return;
|
|
254
|
-
}
|
|
255
|
-
if (props.autoLoad) {
|
|
256
|
-
loadByPage();
|
|
257
|
-
}
|
|
258
|
-
} else {
|
|
259
|
-
await nextTick();
|
|
260
|
-
expandData();
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
onMounted(() => {
|
|
265
|
-
init();
|
|
266
|
-
});
|
|
267
|
-
defineExpose({
|
|
268
|
-
getSelectData,
|
|
269
|
-
setSelectData,
|
|
270
|
-
createSearchParams,
|
|
271
|
-
});
|
|
272
|
-
</script>
|
|
273
|
-
|
|
274
|
-
<template>
|
|
275
|
-
<el-card
|
|
276
|
-
class="inner_content h-full"
|
|
277
|
-
:style="{
|
|
278
|
-
width: collapse ? '60px' : 'unset',
|
|
279
|
-
padding: 'unset',
|
|
280
|
-
}"
|
|
281
|
-
>
|
|
282
|
-
<div
|
|
283
|
-
class="selected-data gap-2"
|
|
284
|
-
v-if="showSelectData && selectedDataList?.length > 0"
|
|
285
|
-
>
|
|
286
|
-
<el-tag
|
|
287
|
-
closable
|
|
288
|
-
@close="operSelectData(item, false)"
|
|
289
|
-
v-for="item in selectedDataList"
|
|
290
|
-
:key="_compKey(item, item[preps.value])"
|
|
291
|
-
>{{ item[preps.label] }}
|
|
292
|
-
</el-tag
|
|
293
|
-
>
|
|
294
|
-
</div>
|
|
295
|
-
<div class="tree-title">
|
|
296
|
-
<div class="title flex items-center">
|
|
297
|
-
{{ treeTitle }}
|
|
298
|
-
<help v-if="helpMsg" :message="helpMsg"/>
|
|
299
|
-
</div>
|
|
300
|
-
<div class="btn" v-if="showCollapse">
|
|
301
|
-
<star-horse-icon :icon-class="menuIcon" @click="changeArrow"/>
|
|
302
|
-
</div>
|
|
303
|
-
</div>
|
|
304
|
-
<div class="search-input" v-if="showSearch">
|
|
305
|
-
<el-input
|
|
306
|
-
v-model="searchData"
|
|
307
|
-
:size="compSize"
|
|
308
|
-
clearable
|
|
309
|
-
:style="{ 'margin-right': showDropdown ? 'unset' : '10px' }"
|
|
310
|
-
placeholder="请输入关键字"
|
|
311
|
-
@input="onQueryChanged"
|
|
312
|
-
>
|
|
313
|
-
<template #append>
|
|
314
|
-
<star-horse-icon
|
|
315
|
-
@click="onQueryChanged"
|
|
316
|
-
icon-class="search"
|
|
317
|
-
color="var(--star-horse-style)"
|
|
318
|
-
size="18px"
|
|
319
|
-
/>
|
|
320
|
-
</template>
|
|
321
|
-
</el-input>
|
|
322
|
-
<el-dropdown
|
|
323
|
-
placement="bottom"
|
|
324
|
-
@command="treeOperation"
|
|
325
|
-
v-if="showDropdown"
|
|
326
|
-
>
|
|
327
|
-
<star-horse-icon
|
|
328
|
-
icon-class="v-dot"
|
|
329
|
-
color="var(--star-horse-style)"
|
|
330
|
-
size="20px"
|
|
331
|
-
/>
|
|
332
|
-
<template #dropdown>
|
|
333
|
-
<el-dropdown-menu>
|
|
334
|
-
<el-dropdown-item v-if="btnVisible" command="add"
|
|
335
|
-
>添加数据
|
|
336
|
-
</el-dropdown-item
|
|
337
|
-
>
|
|
338
|
-
<el-dropdown-item command="expand">展开全部</el-dropdown-item>
|
|
339
|
-
<el-dropdown-item command="collapse">折叠全部</el-dropdown-item>
|
|
340
|
-
</el-dropdown-menu>
|
|
341
|
-
</template>
|
|
342
|
-
</el-dropdown>
|
|
343
|
-
</div>
|
|
344
|
-
<el-divider v-if="showSearch"/>
|
|
345
|
-
<div class="tree-content">
|
|
346
|
-
<el-scrollbar height="100%">
|
|
347
|
-
<el-tree
|
|
348
|
-
ref="treeRef"
|
|
349
|
-
:data="treeDatas"
|
|
350
|
-
:props="preps"
|
|
351
|
-
:node-key="preps.value"
|
|
352
|
-
v-if="treeType == 'tree'"
|
|
353
|
-
:filter-node-method="filterMethod"
|
|
354
|
-
:check-strictly="checkStrictly"
|
|
355
|
-
:show-checkbox="showCheckBox"
|
|
356
|
-
highlight-current
|
|
357
|
-
@nodeClick="treeChange"
|
|
358
|
-
@checkChange="treeChange"
|
|
359
|
-
>
|
|
360
|
-
<template #default="{ node, data }">
|
|
361
|
-
<div class="menu-title">
|
|
362
|
-
<div class="name flex items-center">
|
|
363
|
-
<star-horse-icon
|
|
364
|
-
:icon-class="
|
|
365
|
-
data.children?.length > 0 ? 'folder' : 'document'
|
|
366
|
-
"
|
|
367
|
-
/>
|
|
368
|
-
{{ node.label }}
|
|
369
|
-
<template v-if="showCode">
|
|
370
|
-
({{
|
|
371
|
-
data["code"] ||
|
|
372
|
-
data[preps.code || preps.value || "value"] ||
|
|
373
|
-
""
|
|
374
|
-
}})
|
|
375
|
-
</template>
|
|
376
|
-
</div>
|
|
377
|
-
<div v-if="btnVisible || rmvVisible" class="btn">
|
|
378
|
-
<el-tooltip :content="btnTitle">
|
|
379
|
-
<star-horse-icon
|
|
380
|
-
cursor="pointer"
|
|
381
|
-
v-if="btnVisible"
|
|
382
|
-
@click.stop="addData(data)"
|
|
383
|
-
icon-class="plus"
|
|
384
|
-
/>
|
|
385
|
-
</el-tooltip>
|
|
386
|
-
<el-tooltip :content="rmvTitle">
|
|
387
|
-
<star-horse-icon
|
|
388
|
-
cursor="pointer"
|
|
389
|
-
v-if="rmvVisible"
|
|
390
|
-
@click.stop="removeData(data)"
|
|
391
|
-
color="var(--el-color-danger)"
|
|
392
|
-
icon-class="minus"
|
|
393
|
-
/>
|
|
394
|
-
</el-tooltip>
|
|
395
|
-
</div>
|
|
396
|
-
</div>
|
|
397
|
-
</template>
|
|
398
|
-
</el-tree>
|
|
399
|
-
<el-menu
|
|
400
|
-
v-if="treeType == 'menu'"
|
|
401
|
-
ref="menuTreeRef"
|
|
402
|
-
:unique-opened="false"
|
|
403
|
-
>
|
|
404
|
-
<SubSystemMenu
|
|
405
|
-
:dataList="treeDatas"
|
|
406
|
-
:preps="preps"
|
|
407
|
-
@addData="addData"
|
|
408
|
-
@removeData="removeData"
|
|
409
|
-
@selectData="menuChange"
|
|
410
|
-
/>
|
|
411
|
-
</el-menu>
|
|
412
|
-
</el-scrollbar>
|
|
413
|
-
</div>
|
|
414
|
-
<div class="tree-footer" v-if="showPageBar">
|
|
415
|
-
<el-pagination
|
|
416
|
-
:total="pageInfo.totalData"
|
|
417
|
-
@current-change="pageChangeClick"
|
|
418
|
-
@size-change="pageSizeClick"
|
|
419
|
-
:size="compSize"
|
|
420
|
-
:page-sizes="[10,20,30,50]"
|
|
421
|
-
layout=" prev, pager, next,slot,sizes"
|
|
422
|
-
v-model:currentPage="pageInfo.currentPage"
|
|
423
|
-
v-model:page-size="pageInfo.pageSize"
|
|
424
|
-
v-model:pageCount="pageInfo.totalPage"
|
|
425
|
-
>
|
|
426
|
-
<el-button text icon="refresh" :size="compSize" @click="loadByPage" title="刷新"/>
|
|
427
|
-
</el-pagination>
|
|
428
|
-
</div>
|
|
429
|
-
</el-card>
|
|
430
|
-
</template>
|
|
431
|
-
|
|
432
|
-
<style scoped lang="scss">
|
|
433
|
-
:deep(.el-tag) {
|
|
434
|
-
margin-left: 5px;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
.selected-data {
|
|
438
|
-
display: flex;
|
|
439
|
-
flex-direction: row;
|
|
440
|
-
flex-wrap: wrap;
|
|
441
|
-
justify-content: start;
|
|
442
|
-
align-items: center;
|
|
443
|
-
margin: 8px 5px;
|
|
444
|
-
border: 1px dashed var(--star-horse-shadow);
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
.tree-title {
|
|
448
|
-
width: 100%;
|
|
449
|
-
height: 35px;
|
|
450
|
-
display: flex;
|
|
451
|
-
align-items: center;
|
|
452
|
-
font-size: 13px;
|
|
453
|
-
font-weight: 800;
|
|
454
|
-
background: rgb(229, 230, 235);
|
|
455
|
-
border: 1px solid #33272729;
|
|
456
|
-
justify-content: space-between;
|
|
457
|
-
|
|
458
|
-
.title {
|
|
459
|
-
margin-left: 15px;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
.btn,
|
|
463
|
-
svg {
|
|
464
|
-
cursor: pointer;
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
.search-input {
|
|
469
|
-
width: 98%;
|
|
470
|
-
align-items: center;
|
|
471
|
-
display: flex;
|
|
472
|
-
margin: 5px auto;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
.tree-content {
|
|
476
|
-
margin: 5px;
|
|
477
|
-
flex: 1;
|
|
478
|
-
overflow: hidden;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
:deep(.el-sub-menu__icon-arrow) {
|
|
482
|
-
width: 20px !important;
|
|
483
|
-
right: 5px;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
:deep(.el-menu-item) {
|
|
487
|
-
height: 30px;
|
|
488
|
-
line-height: 30px;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
:deep(.el-divider--horizontal) {
|
|
492
|
-
margin: 5px 0 !important;
|
|
493
|
-
}
|
|
494
|
-
</style>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export { default as ShDynamicForm } from "./ShDynamicForm.vue";
|
|
2
|
-
export { default as ShTableListColumn } from "./ShTableListColumn.vue";
|
|
3
|
-
export { default as StarHorseDataSelector } from "./StarHorseDataSelector.vue";
|
|
4
|
-
export { default as StarHorseDataView } from "./StarHorseDataView.vue";
|
|
5
|
-
export { default as StarHorseDataViewItems } from "./StarHorseDataViewItems.vue";
|
|
6
|
-
export { default as StarHorseDataViewTable } from "./StarHorseDataViewTable.vue";
|
|
7
|
-
export { default as StarHorseDialog } from "./StarHorseDialog.vue";
|
|
8
|
-
export { default as StarHorseDraggable } from "./StarHorseDraggable.vue";
|
|
9
|
-
export { default as StarHorseForm } from "./StarHorseForm.vue";
|
|
10
|
-
export { default as StarHorseFormItem } from "./StarHorseFormItem.vue";
|
|
11
|
-
export { default as StarHorseFormList } from "./StarHorseFormList.vue";
|
|
12
|
-
export { default as StarHorseFormTable } from "./StarHorseFormTable.vue";
|
|
13
|
-
export { default as StarHorseIcon } from "./StarHorseIcon.vue";
|
|
14
|
-
export { default as StarHorseJsonEditor } from "./StarHorseJsonEditor.vue";
|
|
15
|
-
export { default as StarHorsePopover } from "./StarHorsePopover.vue";
|
|
16
|
-
export { default as StarHorseSearchComp } from "./StarHorseSearchComp.vue";
|
|
17
|
-
export { default as StarHorseStaticTable } from "./StarHorseStaticTable.vue";
|
|
18
|
-
export { default as StarHorseTableColumn } from "./StarHorseTableColumn.vue";
|
|
19
|
-
export { default as StarHorseTableComp } from "./StarHorseTableComp.vue";
|
|
20
|
-
export { default as StarHorseTableViewColumn } from "./StarHorseTableViewColumn.vue";
|
|
21
|
-
export { default as StarHorseTree } from "./StarHorseTree.vue";
|
|
22
|
-
export { default as ShForm } from "./ShForm.vue";
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { Config } from "@/api/settings";
|
|
3
|
-
import { batchFieldDefaultValues } from "@/api/star_horse_utils";
|
|
4
|
-
import { PropType } from "vue";
|
|
5
|
-
import { compKey } from "@/api/system";
|
|
6
|
-
|
|
7
|
-
defineProps({
|
|
8
|
-
item: { type: Object as PropType<any>, required: true },
|
|
9
|
-
rules: { type: Object },
|
|
10
|
-
staticColumn: { type: String, default: "Y" },
|
|
11
|
-
size: { type: String, default: Config.compSize },
|
|
12
|
-
batchName: { type: String, default: "batchDataList" },
|
|
13
|
-
primaryKey: { type: [String, Object] as PropType<string | any> },
|
|
14
|
-
source: { type: Number, default: 1 },
|
|
15
|
-
});
|
|
16
|
-
const _compKey = compKey;
|
|
17
|
-
const exclusionFields: string[] = ["divider", "button", "usercomp"];
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<template>
|
|
21
|
-
<el-table-column
|
|
22
|
-
:prop="item.fieldName"
|
|
23
|
-
:label="item.label"
|
|
24
|
-
sortable
|
|
25
|
-
:min-width="item.minWidth || Config.defaultColumnWidth + 'px'"
|
|
26
|
-
v-if="item.formVisible && !exclusionFields.includes(item.type)"
|
|
27
|
-
>
|
|
28
|
-
<template #default="scope">
|
|
29
|
-
<template v-if="item.batchFieldList?.length > 0">
|
|
30
|
-
<star-horse-form-list
|
|
31
|
-
v-for="sitem in item.batchFieldList"
|
|
32
|
-
:key="_compKey(sitem, sitem.batchName)"
|
|
33
|
-
style="min-height: 100px; width: 100% !important"
|
|
34
|
-
v-model:dataForm="scope.row"
|
|
35
|
-
:compUrl="sitem['compUrl']"
|
|
36
|
-
:primaryKey="sitem['primaryKey']"
|
|
37
|
-
:batchName="sitem['batchName']"
|
|
38
|
-
:initRows="sitem['initRows']"
|
|
39
|
-
:subFlag="true"
|
|
40
|
-
:size="size"
|
|
41
|
-
:source="source"
|
|
42
|
-
:staticColumn="sitem.staticColumn ?? 'Y'"
|
|
43
|
-
:defaultValues="batchFieldDefaultValues(sitem, scope.row)"
|
|
44
|
-
:field-list="sitem['fieldList']"
|
|
45
|
-
:rules="sitem['rules'] || rules"
|
|
46
|
-
/>
|
|
47
|
-
</template>
|
|
48
|
-
<template v-else>
|
|
49
|
-
<sh-table-list-column
|
|
50
|
-
:primaryKey="primaryKey"
|
|
51
|
-
:batchName="batchName"
|
|
52
|
-
:dataForm="scope.row"
|
|
53
|
-
:size="size"
|
|
54
|
-
:source="source"
|
|
55
|
-
:rules="rules"
|
|
56
|
-
:staticColumn="staticColumn"
|
|
57
|
-
:item="item"
|
|
58
|
-
:index="scope.$index"
|
|
59
|
-
/>
|
|
60
|
-
</template>
|
|
61
|
-
</template>
|
|
62
|
-
</el-table-column>
|
|
63
|
-
</template>
|
|
64
|
-
|
|
65
|
-
<style scoped lang="scss"></style>
|