@utogether/udp-core 1.0.1-beta.9 → 1.0.2
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/build/plugins.ts +37 -39
- package/dist/{403-BOzKHdlm.js → 403-B1rIjAAu.js} +6 -6
- package/dist/{404-uwgt4Nll.js → 404-mBqc2y4t.js} +4 -4
- package/dist/{500-4HBf6V9m.js → 500-BoI45Zdh.js} +2 -2
- package/dist/{AuthorityInfo-DvbIh1vT.js → AuthorityInfo-B08NBIIn.js} +1 -1
- package/dist/{AuthorityInfo.vue_vue_type_style_index_0_lang-BlCPvwXU.js → AuthorityInfo.vue_vue_type_style_index_0_lang-BLP1SaiH.js} +3 -3
- package/dist/{Company-D7Q9BFmr.js → Company-JGGyWEWH.js} +3 -3
- package/dist/{CompanyPanel-C0-PJlrt.js → CompanyPanel-BQ_cCmDx.js} +7 -7
- package/dist/{Department-h2hlXACv.js → Department-z2iO6hwM.js} +10 -10
- package/dist/{DepartmentPanel-B6hDEQpG.js → DepartmentPanel-BtQe7zwU.js} +108 -78
- package/dist/{DesignPanel-cS58-1v9.js → DesignPanel-7mhtVWas.js} +1 -1
- package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-LdvLC8VU.js → DesignPanel.vue_vue_type_style_index_0_lang-4EsHemj_.js} +6 -6
- package/dist/{DictView-T3TmpBa8.js → DictView-CjchV2Yk.js} +15 -16
- package/dist/InvOrganization-Pn1O_XP0.js +74 -0
- package/dist/{Org-CnCBDGKF.js → Org-BqytV_vi.js} +1 -1
- package/dist/{Preview-BaktKXB1.js → Preview-CLpUUMay.js} +2 -2
- package/dist/{ReportDefine-5Rb0PO9A.js → ReportDefine-Cz1KtEUF.js} +1 -1
- package/dist/{ReportDesign-DYdkVREA.js → ReportDesign-BaORYud4.js} +13 -13
- package/dist/{ReportQuery-BwhzIXMt.js → ReportQuery-CPCPXiXz.js} +1 -1
- package/dist/{ReportQueryFrom-PHtWwlOe.js → ReportQueryFrom-C_AcrfkJ.js} +1 -1
- package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-BE5yZNPM.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-Bm67ejay.js} +1 -1
- package/dist/{ReportTemplate-DaadVXIi.js → ReportTemplate-CFiNMz79.js} +11 -11
- package/dist/{Role-Dtg3nAmG.js → Role-B-XDoJd5.js} +3 -3
- package/dist/{RoleAssign-DEGtLssH.js → RoleAssign-BolW8YVs.js} +8 -8
- package/dist/{RolePanel-DpUzfE_o.js → RolePanel-2kfs5tw9.js} +1 -1
- package/dist/{RolePanel-CT7BTPmy.js → RolePanel-HilSuYns.js} +1 -1
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-Xyo0YEI0.js → RolePanel.vue_vue_type_script_setup_true_lang-CE4gApUY.js} +7 -7
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-Dg2A6DJu.js → RolePanel.vue_vue_type_script_setup_true_lang-DPzgfAyV.js} +13 -13
- package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-CyutzDZS.js → ScrollPanel.vue_vue_type_style_index_0_lang-CCTH4RkH.js} +4 -4
- package/dist/{Staff-_NlAGkrh.js → Staff-BTk3whFC.js} +3 -3
- package/dist/{StaffInfo-DVgUvVgd.js → StaffInfo-d3AuSzlA.js} +1 -1
- package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-C8hmlFgX.js → StaffInfo.vue_vue_type_script_setup_true_lang-eOL4VlfE.js} +5 -5
- package/dist/{StaffPanel-DKNZE3IE.js → StaffPanel-DV-D4jjz.js} +1 -1
- package/dist/StaffPanel.vue_vue_type_script_setup_true_lang-4sFq3CEo.js +135 -0
- package/dist/{SysUser-kQUf7XKz.js → SysUser-BnjYytws.js} +2 -2
- package/dist/{SysUserPanel-C191uX3U.js → SysUserPanel-CBoyD-Qi.js} +1 -1
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-PrTlTZR-.js +341 -0
- package/dist/{SystemMenu-DwuSvHnj.js → SystemMenu-kYB_ZaUt.js} +36 -36
- package/dist/{UserInfo-DIsInFld.js → UserInfo-4dx97VBL.js} +1 -1
- package/dist/{UserInfo.vue_vue_type_style_index_0_lang-CnvGdbej.js → UserInfo.vue_vue_type_style_index_0_lang-BpbC_ZDm.js} +10 -10
- package/dist/{childView-3Bs2UBEw.js → childView-CHPNfTEb.js} +1 -1
- package/dist/{childView-BawyULD7.js → childView-CKA_JgVZ.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-YpWF-p2F.js → childView.vue_vue_type_style_index_0_lang-Bym2fQRd.js} +7 -7
- package/dist/childView.vue_vue_type_style_index_0_lang-W7bCtXeu.js +177 -0
- package/dist/{code-rule-DVaYcn8S.js → code-rule-CbxuZg0-.js} +40 -38
- package/dist/core.es.js +18 -12
- package/dist/{cron-task-xuzP-BpE.js → cron-task-nTOpqQYf.js} +7 -7
- package/dist/flow-task-B07st2aD.js +10 -0
- package/dist/{frameView-Cudt06qS.js → frameView-Z1tPUyCh.js} +1 -1
- package/dist/index-C3q8HoJM.js +4650 -0
- package/dist/{layoutView-BlFTV2jX.js → layoutView--MGA9zUB.js} +1766 -1760
- package/dist/{log-in-e7D5Ss1P.js → log-in-CSYJDA6m.js} +36 -29
- package/dist/log-out-DiwGCg7p.js +130 -0
- package/dist/login-C6Y0ajDp.js +251 -0
- package/dist/{login-log-kqKzKTto.js → login-log-C0V-_l3F.js} +5 -3
- package/dist/{lov-view-B2HaxyMs.js → lov-view-Cmv7wZZ9.js} +6 -6
- package/dist/{menuInfo-BxCTJ1VW.js → menuInfo-UeutJpOa.js} +1 -1
- package/dist/{menuInfo.vue_vue_type_style_index_0_lang-CLOPNeUW.js → menuInfo.vue_vue_type_style_index_0_lang-CWX4Mu67.js} +118 -98
- package/dist/{pda-app-DPsAFNiw.js → pda-app-B6w99SJo.js} +10 -10
- package/dist/{resource-Dibb7t8u.js → resource-BybJvUv0.js} +4 -4
- package/dist/{su-welcome-DejR0KkM.js → su-welcome-C1bmxHoY.js} +119 -121
- package/dist/sys-config-BnmIDnCj.js +370 -0
- package/dist/udp-core.css +1 -9
- package/dist/utogether-MlnyYtNS.js +4 -0
- package/index.ts +49 -40
- package/package.json +18 -18
- package/src/App.vue +65 -65
- package/src/api/http.ts +1 -4
- package/src/api/index.ts +4 -2
- package/src/api/user.ts +2 -2
- package/src/components/SuCharts/src/UserInfo.vue +78 -78
- package/src/components/SuScrollTree/ScrollPanel.vue +1 -6
- package/src/components/udp/content/index.vue +88 -0
- package/src/components/udp/{form.vue → form/form.vue} +13 -16
- package/src/components/udp/{grid.vue → grid/index.vue} +56 -27
- package/src/components/udp/index.ts +4 -9
- package/src/components/udp/ut-stamp-badge/index.vue +271 -0
- package/src/components/udp/utils.ts +66 -105
- package/src/layout/components/lay-navbar/index.vue +8 -6
- package/src/layout/components/lay-panel/index.vue +150 -150
- package/src/layout/components/lay-search/index.vue +25 -25
- package/src/layout/components/lay-select-org/index.vue +4 -9
- package/src/layout/components/lay-setting/index.vue +503 -510
- package/src/layout/components/lay-sidebar/horizontal.vue +8 -6
- package/src/layout/components/lay-sidebar/mixNav.vue +260 -258
- package/src/layout/components/lay-sidebar/sidebar-logo.vue +101 -98
- package/src/layout/components/lay-tag/index.vue +24 -51
- package/src/layout/hooks/useDataThemeChange.ts +1 -1
- package/src/layout/hooks/useNav.ts +176 -173
- package/src/layout/hooks/useTag.ts +227 -233
- package/src/layout/types.ts +93 -92
- package/src/main.ts +115 -119
- package/src/plugins/i18n/en.ts +302 -302
- package/src/plugins/i18n/module/u-workflow.ts +1 -1
- package/src/plugins/i18n/zh.ts +21 -6
- package/src/plugins/vxe-table/index.ts +116 -53
- package/src/plugins/vxe-table/render.tsx +945 -956
- package/src/router/index.ts +17 -17
- package/src/router/modules/flow.ts +35 -0
- package/src/router/modules/home.ts +32 -32
- package/src/router/modules/remaining.ts +58 -58
- package/src/router/utils.ts +420 -377
- package/src/store/modules/app.ts +2 -4
- package/src/store/modules/epTheme.ts +48 -49
- package/src/store/modules/multiTags.ts +15 -14
- package/src/store/modules/permission.ts +25 -15
- package/src/store/modules/system.ts +1 -3
- package/src/style/button.scss +85 -85
- package/src/style/login.css +1 -1
- package/src/style/vxetable.scss +61 -2
- package/src/utils/dataFormat/index.ts +223 -223
- package/src/utils/index.ts +3 -1
- package/src/utils/lifecycle.ts +39 -20
- package/src/utils/propTypes.ts +1 -6
- package/src/utils/storage/index.ts +2 -2
- package/src/utils/udp/http/index.ts +24 -11
- package/src/utils/udp/http/types.d.ts +3 -10
- package/src/views/login/login-view.vue +4 -18
- package/src/views/organization/company/CompanyPanel.vue +259 -259
- package/src/views/organization/department/Department.vue +58 -58
- package/src/views/organization/department/DepartmentPanel.vue +303 -283
- package/src/views/organization/inv-org/InvOrganization.vue +22 -7
- package/src/views/organization/staff/StaffInfo.vue +127 -133
- package/src/views/organization/staff/StaffPanel.vue +162 -145
- package/src/views/system/cron/cron-task.vue +2 -12
- package/src/views/system/menu/SystemMenu.vue +185 -183
- package/src/views/system/menu/menuInfo.vue +384 -363
- package/src/views/system/role/UserInfo.vue +195 -195
- package/src/views/system/role-assign/RoleAssign.vue +57 -57
- package/src/views/system/role-assign/RolePanel.vue +139 -139
- package/src/views/system/sys/sys-config.vue +69 -20
- package/src/views/system/sysUser/SysUserPanel.vue +97 -28
- package/src/views/uapp/pda/pda-app.vue +208 -208
- package/src/views/udev/coderule/code-rule.vue +132 -121
- package/src/views/udev/dict/DictView.vue +2 -2
- package/src/views/udev/dict/childView.vue +183 -222
- package/src/views/udev/lov/childView.vue +1 -7
- package/src/views/udev/lov/lov-view.vue +91 -91
- package/src/views/uhome/components/menu-favorite.vue +314 -331
- package/src/views/uhome/su-welcome.vue +319 -339
- package/src/views/ulogin/login.vue +325 -321
- package/src/views/upms/interface/log-in.vue +100 -106
- package/src/views/upms/interface/log-out.vue +104 -107
- package/src/views/upms/user/login-log.vue +54 -60
- package/src/views/urpt/design/DesignPanel.vue +507 -507
- package/src/views/urpt/design/Preview.vue +1 -0
- package/src/views/urpt/design/ReportDesign.vue +2 -4
- package/src/views/utask/flow-task.vue +18 -0
- package/types/global.d.ts +231 -236
- package/dist/InvOrganization-BVuOhzbt.js +0 -66
- package/dist/StaffPanel.vue_vue_type_script_setup_true_lang-BOOO6Cek.js +0 -111
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-SwNbAEvW.js +0 -294
- package/dist/childView.vue_vue_type_style_index_0_lang-DWIFCX3X.js +0 -187
- package/dist/index-CKnq5xIa.js +0 -2623
- package/dist/log-out--RRncZhN.js +0 -120
- package/dist/login-CpKykfdf.js +0 -253
- package/dist/sys-config-DiySRWns.js +0 -277
- package/dist/utogether-Dct_14Zk.js +0 -182
- package/src/components/udp/count-down.vue +0 -536
- package/src/components/udp/flip-down/FlipCard/flip-card.vue +0 -251
- package/src/components/udp/flip-down/FlipCard/interfaces.ts +0 -4
- package/src/components/udp/flip-down/FlipClock/flip-clock.vue +0 -113
- package/src/components/udp/form-upload.vue +0 -482
- package/src/components/udp/lov.vue +0 -388
- package/src/components/udp/modal-form.vue +0 -189
- package/src/components/udp/modal-grid.vue +0 -288
- package/src/components/udp/upload.vue +0 -423
- package/src/utils/udp/useRender.ts +0 -431
|
@@ -1,139 +1,139 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div v-spinning="data.loading" class="page-content">
|
|
3
|
-
<ut-grid
|
|
4
|
-
ref="xgrid"
|
|
5
|
-
:items="formItems"
|
|
6
|
-
:columns="gridCol"
|
|
7
|
-
:default-params="data.fetchExtParam"
|
|
8
|
-
:default-value="data.fetchExtParam"
|
|
9
|
-
:buttons="buttons"
|
|
10
|
-
:auto-load="false"
|
|
11
|
-
:url="url"
|
|
12
|
-
:check-method="checkMethod"
|
|
13
|
-
mode="form"
|
|
14
|
-
@buttonClick="onButtonClick"
|
|
15
|
-
/>
|
|
16
|
-
<ut-modal-grid
|
|
17
|
-
v-if="data.showModalView"
|
|
18
|
-
ref="xmodal"
|
|
19
|
-
:items="formItems"
|
|
20
|
-
:columns="columns"
|
|
21
|
-
:show-footer="true"
|
|
22
|
-
:editable="false"
|
|
23
|
-
:title="$t('message.udp.roleList')"
|
|
24
|
-
url="/uums/role"
|
|
25
|
-
width="60%"
|
|
26
|
-
height="75%"
|
|
27
|
-
@close="data.showModalView = false"
|
|
28
|
-
@confirm="onConfirm"
|
|
29
|
-
/>
|
|
30
|
-
</div>
|
|
31
|
-
</template>
|
|
32
|
-
|
|
33
|
-
<script setup lang="tsx">
|
|
34
|
-
import { useI18n } from 'vue-i18n';
|
|
35
|
-
import { ref, reactive, watch, inject, nextTick } from 'vue';
|
|
36
|
-
import { clone } from 'xe-utils';
|
|
37
|
-
import { VxeUI } from 'vxe-pc-ui';
|
|
38
|
-
import to from 'await-to-js';
|
|
39
|
-
import { successMessage } from '@utogether/utils';
|
|
40
|
-
import { getServiceApi } from '../../../api';
|
|
41
|
-
|
|
42
|
-
const data = reactive<IRecord>({
|
|
43
|
-
record: {},
|
|
44
|
-
loading: false,
|
|
45
|
-
showModalView: false
|
|
46
|
-
});
|
|
47
|
-
const { t } = useI18n();
|
|
48
|
-
|
|
49
|
-
const xgrid = ref(null);
|
|
50
|
-
const xmodal = ref(null);
|
|
51
|
-
const active: IRecord = inject('active');
|
|
52
|
-
|
|
53
|
-
const url = '/uums/orgRole';
|
|
54
|
-
watch(
|
|
55
|
-
() => active.value,
|
|
56
|
-
() => {
|
|
57
|
-
if (!active?.value.id) return;
|
|
58
|
-
data.fetchExtParam = { orgId: active?.value.id };
|
|
59
|
-
nextTick(() => {
|
|
60
|
-
xgrid.value.refreshData();
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
);
|
|
64
|
-
|
|
65
|
-
const buttons = [{ code: 'del', auth: '/' }];
|
|
66
|
-
|
|
67
|
-
const formItems = [
|
|
68
|
-
{ field: 'roleName', title: 'message.udp.roleName', span: 9 },
|
|
69
|
-
{ field: 'roleCode', title: 'message.udp.roleCode', span: 9 }
|
|
70
|
-
];
|
|
71
|
-
|
|
72
|
-
const columns = [
|
|
73
|
-
{ type: 'checkbox', width: 40 },
|
|
74
|
-
{ field: 'roleCode', title: 'message.udp.roleCode' },
|
|
75
|
-
{ field: 'roleName', title: 'message.udp.roleName' },
|
|
76
|
-
{ field: 'roleDesc', title: 'message.udp.roleDesc' },
|
|
77
|
-
{ field: 'enabled', width: 100, formatter: ['formatDict', 'SU.ENABLE'] }
|
|
78
|
-
];
|
|
79
|
-
|
|
80
|
-
const gridCol: any[] = clone(columns, true);
|
|
81
|
-
gridCol.push({
|
|
82
|
-
field: 'operate',
|
|
83
|
-
width: 80,
|
|
84
|
-
fixed: 'right',
|
|
85
|
-
slots: {
|
|
86
|
-
default: ({ row }) => {
|
|
87
|
-
if (row.roleCode === 'admin') return null;
|
|
88
|
-
return [
|
|
89
|
-
<ut-button icon="ri-delete-bin-5-fill" content="del" status="danger" auth="del" onTap={() => handleDel(row)} />
|
|
90
|
-
];
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
// 新增
|
|
96
|
-
const handleAdd = () => {
|
|
97
|
-
data.record = {};
|
|
98
|
-
data.record.orgId = active.value.id;
|
|
99
|
-
data.showModalView = true;
|
|
100
|
-
};
|
|
101
|
-
// 删除
|
|
102
|
-
const handleDel = async row => {
|
|
103
|
-
const type = await VxeUI.modal.confirm(t('message.tip.del'));
|
|
104
|
-
if (type === 'confirm') {
|
|
105
|
-
const param = { orgId: active.value.id, roleId: row.id };
|
|
106
|
-
data.loading = true;
|
|
107
|
-
const [err] = await to(getServiceApi().delete(url, param));
|
|
108
|
-
if (!err) {
|
|
109
|
-
successMessage(t('message.operateSuccess'));
|
|
110
|
-
}
|
|
111
|
-
xgrid.value.refreshData();
|
|
112
|
-
data.loading = false;
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
const onConfirm = async records => {
|
|
116
|
-
const orgRoleList = [];
|
|
117
|
-
records.forEach(m => {
|
|
118
|
-
m.orgId = active.value.id;
|
|
119
|
-
m.roleId = m.id;
|
|
120
|
-
orgRoleList.push(m);
|
|
121
|
-
});
|
|
122
|
-
const param = { orgRoleList };
|
|
123
|
-
xmodal.value.showLoading();
|
|
124
|
-
const [err] = await to(getServiceApi().post(url, param));
|
|
125
|
-
if (!err) {
|
|
126
|
-
successMessage();
|
|
127
|
-
xgrid.value.refreshData();
|
|
128
|
-
data.showModalView = false;
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
const checkMethod = row => {
|
|
133
|
-
return row.roleCode !== 'admin';
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
const onButtonClick = code => {
|
|
137
|
-
code === 'add' && handleAdd();
|
|
138
|
-
};
|
|
139
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div v-spinning="data.loading" class="page-content">
|
|
3
|
+
<ut-grid
|
|
4
|
+
ref="xgrid"
|
|
5
|
+
:items="formItems"
|
|
6
|
+
:columns="gridCol"
|
|
7
|
+
:default-params="data.fetchExtParam"
|
|
8
|
+
:default-value="data.fetchExtParam"
|
|
9
|
+
:buttons="buttons"
|
|
10
|
+
:auto-load="false"
|
|
11
|
+
:url="url"
|
|
12
|
+
:check-method="checkMethod"
|
|
13
|
+
mode="form"
|
|
14
|
+
@buttonClick="onButtonClick"
|
|
15
|
+
/>
|
|
16
|
+
<ut-modal-grid
|
|
17
|
+
v-if="data.showModalView"
|
|
18
|
+
ref="xmodal"
|
|
19
|
+
:items="formItems"
|
|
20
|
+
:columns="columns"
|
|
21
|
+
:show-footer="true"
|
|
22
|
+
:editable="false"
|
|
23
|
+
:title="$t('message.udp.roleList')"
|
|
24
|
+
url="/uums/role"
|
|
25
|
+
width="60%"
|
|
26
|
+
height="75%"
|
|
27
|
+
@close="data.showModalView = false"
|
|
28
|
+
@confirm="onConfirm"
|
|
29
|
+
/>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script setup lang="tsx">
|
|
34
|
+
import { useI18n } from 'vue-i18n';
|
|
35
|
+
import { ref, reactive, watch, inject, nextTick } from 'vue';
|
|
36
|
+
import { clone } from 'xe-utils';
|
|
37
|
+
import { VxeUI } from 'vxe-pc-ui';
|
|
38
|
+
import to from 'await-to-js';
|
|
39
|
+
import { successMessage } from '@utogether/utils';
|
|
40
|
+
import { getServiceApi } from '../../../api';
|
|
41
|
+
|
|
42
|
+
const data = reactive<IRecord>({
|
|
43
|
+
record: {},
|
|
44
|
+
loading: false,
|
|
45
|
+
showModalView: false
|
|
46
|
+
});
|
|
47
|
+
const { t } = useI18n();
|
|
48
|
+
|
|
49
|
+
const xgrid = ref(null);
|
|
50
|
+
const xmodal = ref(null);
|
|
51
|
+
const active: IRecord = inject('active');
|
|
52
|
+
|
|
53
|
+
const url = '/uums/orgRole';
|
|
54
|
+
watch(
|
|
55
|
+
() => active.value,
|
|
56
|
+
() => {
|
|
57
|
+
if (!active?.value.id) return;
|
|
58
|
+
data.fetchExtParam = { orgId: active?.value.id };
|
|
59
|
+
nextTick(() => {
|
|
60
|
+
xgrid.value.refreshData();
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
const buttons = [{ code: 'del', auth: '/' }];
|
|
66
|
+
|
|
67
|
+
const formItems = [
|
|
68
|
+
{ field: 'roleName', title: 'message.udp.roleName', span: 9 },
|
|
69
|
+
{ field: 'roleCode', title: 'message.udp.roleCode', span: 9 }
|
|
70
|
+
];
|
|
71
|
+
|
|
72
|
+
const columns = [
|
|
73
|
+
{ type: 'checkbox', width: 40 },
|
|
74
|
+
{ field: 'roleCode', title: 'message.udp.roleCode' },
|
|
75
|
+
{ field: 'roleName', title: 'message.udp.roleName' },
|
|
76
|
+
{ field: 'roleDesc', title: 'message.udp.roleDesc' },
|
|
77
|
+
{ field: 'enabled', width: 100, formatter: ['formatDict', 'SU.ENABLE'] }
|
|
78
|
+
];
|
|
79
|
+
|
|
80
|
+
const gridCol: any[] = clone(columns, true);
|
|
81
|
+
gridCol.push({
|
|
82
|
+
field: 'operate',
|
|
83
|
+
width: 80,
|
|
84
|
+
fixed: 'right',
|
|
85
|
+
slots: {
|
|
86
|
+
default: ({ row }) => {
|
|
87
|
+
if (row.roleCode === 'admin') return null;
|
|
88
|
+
return [
|
|
89
|
+
<ut-button icon="ri-delete-bin-5-fill" content="del" status="danger" auth="del" onTap={() => handleDel(row)} />
|
|
90
|
+
];
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
// 新增
|
|
96
|
+
const handleAdd = () => {
|
|
97
|
+
data.record = {};
|
|
98
|
+
data.record.orgId = active.value.id;
|
|
99
|
+
data.showModalView = true;
|
|
100
|
+
};
|
|
101
|
+
// 删除
|
|
102
|
+
const handleDel = async row => {
|
|
103
|
+
const type = await VxeUI.modal.confirm(t('message.tip.del'));
|
|
104
|
+
if (type === 'confirm') {
|
|
105
|
+
const param = { orgId: active.value.id, roleId: row.id };
|
|
106
|
+
data.loading = true;
|
|
107
|
+
const [err] = await to(getServiceApi().delete(url, param));
|
|
108
|
+
if (!err) {
|
|
109
|
+
successMessage(t('message.operateSuccess'));
|
|
110
|
+
}
|
|
111
|
+
xgrid.value.refreshData();
|
|
112
|
+
data.loading = false;
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
const onConfirm = async records => {
|
|
116
|
+
const orgRoleList = [];
|
|
117
|
+
records.forEach(m => {
|
|
118
|
+
m.orgId = active.value.id;
|
|
119
|
+
m.roleId = m.id;
|
|
120
|
+
orgRoleList.push(m);
|
|
121
|
+
});
|
|
122
|
+
const param = { orgRoleList };
|
|
123
|
+
xmodal.value.showLoading();
|
|
124
|
+
const [err] = await to(getServiceApi().post(url, param));
|
|
125
|
+
if (!err) {
|
|
126
|
+
successMessage();
|
|
127
|
+
xgrid.value.refreshData();
|
|
128
|
+
data.showModalView = false;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
const checkMethod = row => {
|
|
133
|
+
return row.roleCode !== 'admin';
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
const onButtonClick = code => {
|
|
137
|
+
code === 'add' && handleAdd();
|
|
138
|
+
};
|
|
139
|
+
</script>
|
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div v-spinning="loading" class="flex flex-col items-center bg-white u-system-config">
|
|
3
|
-
<div class="flex
|
|
4
|
-
<el-
|
|
5
|
-
{{ $t('message.btn.confirm') }}
|
|
6
|
-
</el-button>
|
|
7
|
-
</div>
|
|
8
|
-
<div class="flex w-1/2 p-2 overflow-y-auto border border-gray-300 rounded-md">
|
|
9
|
-
<el-form
|
|
10
|
-
ref="xfrom"
|
|
11
|
-
:model="record"
|
|
12
|
-
:rules="rules"
|
|
13
|
-
label-width="90"
|
|
14
|
-
size="small"
|
|
15
|
-
status-icon
|
|
16
|
-
class="w-full"
|
|
17
|
-
>
|
|
2
|
+
<div v-spinning="loading" class="flex flex-col items-center pt-20 bg-white u-system-config">
|
|
3
|
+
<div class="flex w-1/2 p-3 overflow-y-auto border border-gray-300 rounded-md">
|
|
4
|
+
<el-form ref="xfrom" :model="record" :rules="rules" label-width="90" size="small" status-icon class="w-full">
|
|
18
5
|
<el-form-item :label="$t('message.udp.systemTitle')" prop="title">
|
|
19
6
|
<el-input v-model="record.title" />
|
|
20
7
|
</el-form-item>
|
|
@@ -33,6 +20,26 @@
|
|
|
33
20
|
<el-form-item :label="$t('message.udp.i18nEnabled')" prop="i18nEnabled">
|
|
34
21
|
<el-switch v-model="record.i18nEnabled" active-value="Y" inactive-value="N" />
|
|
35
22
|
</el-form-item>
|
|
23
|
+
<el-form-item :label="$t('message.udp.orgTaggle')" prop="orgTaggle">
|
|
24
|
+
<el-switch v-model="record.orgTaggle" active-value="Y" inactive-value="N" />
|
|
25
|
+
</el-form-item>
|
|
26
|
+
<el-form-item :label="$t('message.udp.showTitle')" prop="showTitle">
|
|
27
|
+
<el-switch v-model="record.showTitle" active-value="Y" inactive-value="N" />
|
|
28
|
+
</el-form-item>
|
|
29
|
+
<el-form-item
|
|
30
|
+
v-if="['liwei', 'yanhuaijun', 'phr', 'zhonglijun', 'ccl'].includes(cookies.get(kLOGINER))"
|
|
31
|
+
:label="$t('message.udp.techSupport')"
|
|
32
|
+
prop="techSupport"
|
|
33
|
+
>
|
|
34
|
+
<el-switch v-model="record.techSupport" active-value="Y" inactive-value="N" />
|
|
35
|
+
</el-form-item>
|
|
36
|
+
<el-form-item
|
|
37
|
+
v-if="['liwei', 'yanhuaijun', 'phr', 'zhonglijun', 'ccl'].includes(cookies.get(kLOGINER))"
|
|
38
|
+
:label="$t('message.udp.baseColor')"
|
|
39
|
+
prop="baseColor"
|
|
40
|
+
>
|
|
41
|
+
<vxe-color-picker v-model="record.baseColor" :colors="colorList" type="hex" clearable transfer />
|
|
42
|
+
</el-form-item>
|
|
36
43
|
<el-form-item :label="$t('message.udp.systemLogo')">
|
|
37
44
|
<el-upload
|
|
38
45
|
v-model:file-list="record.logo"
|
|
@@ -100,6 +107,11 @@
|
|
|
100
107
|
</el-form-item>
|
|
101
108
|
</el-form>
|
|
102
109
|
</div>
|
|
110
|
+
<div class="flex justify-end w-1/2 p-2">
|
|
111
|
+
<el-button type="primary" @click="submitForm(xfrom)">
|
|
112
|
+
{{ $t('message.btn.confirm') }}
|
|
113
|
+
</el-button>
|
|
114
|
+
</div>
|
|
103
115
|
</div>
|
|
104
116
|
</template>
|
|
105
117
|
|
|
@@ -110,7 +122,7 @@ import { useI18n } from 'vue-i18n';
|
|
|
110
122
|
import to from 'await-to-js';
|
|
111
123
|
import { successMessage, cookies, warnMessage } from '@utogether/utils';
|
|
112
124
|
import { isArray } from 'xe-utils';
|
|
113
|
-
import { kTOKEN } from '../../../contant';
|
|
125
|
+
import { kTOKEN, kLOGINER } from '../../../contant';
|
|
114
126
|
import { getServiceApi, getBaseURL } from '../../../api';
|
|
115
127
|
|
|
116
128
|
const xfrom = ref<FormInstance>();
|
|
@@ -119,7 +131,11 @@ const record = reactive({
|
|
|
119
131
|
defaultLanguage: 'zh',
|
|
120
132
|
title: 'U-DP',
|
|
121
133
|
ispTitle: 'U-DP',
|
|
134
|
+
baseColor: '#FFF',
|
|
122
135
|
i18nEnabled: 'N',
|
|
136
|
+
orgTaggle: 'Y',
|
|
137
|
+
showTitle: 'Y',
|
|
138
|
+
techSupport: 'Y',
|
|
123
139
|
copyright: '深圳友聚信息技术有限公司',
|
|
124
140
|
logo: [],
|
|
125
141
|
backgroundImg: [],
|
|
@@ -134,6 +150,39 @@ const baseUrl = ref(getBaseURL());
|
|
|
134
150
|
const url = '/upfm/v1/sysConfig';
|
|
135
151
|
let dataList = [];
|
|
136
152
|
|
|
153
|
+
const colorList = [
|
|
154
|
+
'#DC143C',
|
|
155
|
+
'#FF1493',
|
|
156
|
+
'#FF00FF',
|
|
157
|
+
'#9932CC',
|
|
158
|
+
'#6A5ACD',
|
|
159
|
+
'#0000FF',
|
|
160
|
+
'#00008B',
|
|
161
|
+
'#778899',
|
|
162
|
+
'#1E90FF',
|
|
163
|
+
'#00BFFF',
|
|
164
|
+
'#5F9EA0',
|
|
165
|
+
'#00FFFF',
|
|
166
|
+
'#008080',
|
|
167
|
+
'#7FFFAA',
|
|
168
|
+
'#3CB371',
|
|
169
|
+
'#8FBC8F',
|
|
170
|
+
'#008000',
|
|
171
|
+
'#7CFC00',
|
|
172
|
+
'#556B2F',
|
|
173
|
+
'#FFFFE0',
|
|
174
|
+
'#FFFF00',
|
|
175
|
+
'#808000',
|
|
176
|
+
'#EEE8AA',
|
|
177
|
+
'#FFD700',
|
|
178
|
+
'#FFA500',
|
|
179
|
+
'#FF4500',
|
|
180
|
+
'#FA8072',
|
|
181
|
+
'#FF0000',
|
|
182
|
+
'#800000',
|
|
183
|
+
'#C0C0C0'
|
|
184
|
+
];
|
|
185
|
+
|
|
137
186
|
const rules = reactive<FormRules>({
|
|
138
187
|
defaultLanguage: [
|
|
139
188
|
{
|
|
@@ -142,9 +191,7 @@ const rules = reactive<FormRules>({
|
|
|
142
191
|
trigger: 'blur'
|
|
143
192
|
}
|
|
144
193
|
],
|
|
145
|
-
title: [
|
|
146
|
-
{ required: true, message: t('message.required') + t('message.udp.systemTitle'), trigger: 'blur' }
|
|
147
|
-
]
|
|
194
|
+
title: [{ required: true, message: t('message.required') + t('message.udp.systemTitle'), trigger: 'blur' }]
|
|
148
195
|
});
|
|
149
196
|
|
|
150
197
|
const headers = computed(() => {
|
|
@@ -266,6 +313,8 @@ onMounted(() => {
|
|
|
266
313
|
</script>
|
|
267
314
|
<style lang="scss">
|
|
268
315
|
.u-system-config {
|
|
316
|
+
padding-top: 48px;
|
|
317
|
+
|
|
269
318
|
.el-select,
|
|
270
319
|
.el-select--small {
|
|
271
320
|
width: 100%;
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
:url="url"
|
|
8
8
|
:auto-load="false"
|
|
9
9
|
:default-params="defaultParams"
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
mode="form"
|
|
11
|
+
@buttonClick="onButtonClick"
|
|
12
12
|
/>
|
|
13
13
|
<!-- 编辑用户信息 -->
|
|
14
14
|
<vxe-modal v-model="data.showModelView" title="用户信息" width="300">
|
|
@@ -72,6 +72,21 @@
|
|
|
72
72
|
/>
|
|
73
73
|
</template>
|
|
74
74
|
</vxe-modal>
|
|
75
|
+
|
|
76
|
+
<ut-modal-form
|
|
77
|
+
v-if="data.showModal"
|
|
78
|
+
:record="data.record"
|
|
79
|
+
:items="data.items"
|
|
80
|
+
:width="360"
|
|
81
|
+
:height="data.height"
|
|
82
|
+
:method="!data.record.id ? 'post' : 'put'"
|
|
83
|
+
:data-process-method="dataProcessMethod"
|
|
84
|
+
:title="$t('message.title.userInfo')"
|
|
85
|
+
data-status="update"
|
|
86
|
+
:url="url"
|
|
87
|
+
@close="data.showModal = false"
|
|
88
|
+
@confirm="onConfirm"
|
|
89
|
+
/>
|
|
75
90
|
</div>
|
|
76
91
|
</template>
|
|
77
92
|
|
|
@@ -79,9 +94,9 @@
|
|
|
79
94
|
import { useI18n } from 'vue-i18n';
|
|
80
95
|
import { ref, reactive, inject, onMounted } from 'vue';
|
|
81
96
|
import to from 'await-to-js';
|
|
82
|
-
import { useRender, errorMessage, warnMessage, delay } from '@utogether/utils';
|
|
97
|
+
import { useRender, errorMessage, warnMessage, delay, getDictChildren } from '@utogether/utils';
|
|
83
98
|
import { VxeUI, VxeFormPropTypes } from 'vxe-pc-ui';
|
|
84
|
-
import { isEmpty } from 'xe-utils';
|
|
99
|
+
import { clone, isEmpty } from 'xe-utils';
|
|
85
100
|
import { getServiceApi } from '../../../api';
|
|
86
101
|
|
|
87
102
|
const data = reactive<IRecord>({
|
|
@@ -89,9 +104,11 @@ const data = reactive<IRecord>({
|
|
|
89
104
|
listQuery: {},
|
|
90
105
|
dataList: [],
|
|
91
106
|
roleList: [],
|
|
107
|
+
items: [],
|
|
92
108
|
submitLoading: false,
|
|
93
109
|
showModelView: false,
|
|
94
110
|
showUserRole: false,
|
|
111
|
+
showModal: false,
|
|
95
112
|
showAuth: false,
|
|
96
113
|
dataStatus: ''
|
|
97
114
|
});
|
|
@@ -131,44 +148,37 @@ const treeList: IRecord[] = inject('treeList');
|
|
|
131
148
|
const loading = ref(false);
|
|
132
149
|
|
|
133
150
|
const url = '/uums/user';
|
|
151
|
+
let defaultPassword = '';
|
|
134
152
|
|
|
135
153
|
const xgrid = ref(null);
|
|
136
154
|
|
|
137
155
|
const formItems = [
|
|
138
156
|
{ field: 'name', title: 'message.udp.userName' },
|
|
139
|
-
{ field: 'userName', title: 'message.udp.userCode' }
|
|
157
|
+
{ field: 'userName', title: 'message.udp.userCode' },
|
|
158
|
+
{ field: 'type', title: 'message.udp.userType', code: 'SU.USER.TYPE' }
|
|
140
159
|
];
|
|
141
160
|
|
|
142
161
|
const columns = [
|
|
143
162
|
{ type: 'checkbox', width: 40, align: 'center' },
|
|
144
|
-
{ field: 'userName', title: 'message.udp.userCode'
|
|
145
|
-
{ field: 'name', title: 'message.udp.userName'
|
|
163
|
+
{ field: 'userName', title: 'message.udp.userCode' },
|
|
164
|
+
{ field: 'name', title: 'message.udp.userName' },
|
|
146
165
|
{
|
|
147
166
|
field: 'type',
|
|
148
167
|
title: 'message.udp.userType',
|
|
149
|
-
formatter: ['formatDict', 'SU.USER.TYPE']
|
|
150
|
-
editRender: renderHook.renderDict('SU.USER.TYPE')
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
field: 'userPwd',
|
|
154
|
-
required: true,
|
|
155
|
-
width: 150,
|
|
156
|
-
editRender: renderHook.renderInput(),
|
|
157
|
-
formatter: () => '*******'
|
|
168
|
+
formatter: ['formatDict', 'SU.USER.TYPE']
|
|
158
169
|
},
|
|
159
170
|
{ field: 'enabled', width: 80, cellRender: renderHook.renderEnabled(handleClick) },
|
|
160
171
|
{
|
|
161
172
|
field: 'operate',
|
|
162
|
-
width:
|
|
173
|
+
width: 150,
|
|
163
174
|
fixed: 'right',
|
|
164
175
|
slots: {
|
|
165
176
|
default: ({ row }) => {
|
|
166
|
-
if (!row.id) return null;
|
|
167
177
|
return [
|
|
168
178
|
<>
|
|
169
|
-
<ut-button icon="ri-
|
|
170
|
-
|
|
171
|
-
<ut-
|
|
179
|
+
<ut-button content="edit" icon="ri-edit-line" onTap={() => handleEdit(row)} />
|
|
180
|
+
|
|
181
|
+
<ut-dropdown buttons={getButtons()} onCommand={code => handleCommand(row, code)} />
|
|
172
182
|
</>
|
|
173
183
|
];
|
|
174
184
|
}
|
|
@@ -176,6 +186,59 @@ const columns = [
|
|
|
176
186
|
}
|
|
177
187
|
];
|
|
178
188
|
|
|
189
|
+
const handleCommand = (row, code) => {
|
|
190
|
+
code === 'role' && handleRole(row);
|
|
191
|
+
code === 'auth' && handleAuth(row);
|
|
192
|
+
code === 'passwordReset' && handleResetPwd(row);
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
const getButtons = () => {
|
|
196
|
+
// 项目延期
|
|
197
|
+
const buttons = [
|
|
198
|
+
{ code: 'role', icon: 'ri-user-fill' },
|
|
199
|
+
{ code: 'auth', icon: 'ri-lock-fill' },
|
|
200
|
+
{ code: 'passwordReset', icon: 'ri-lock-password-line' }
|
|
201
|
+
];
|
|
202
|
+
return buttons;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
const items = [
|
|
206
|
+
{ field: 'userName', title: 'message.udp.userCode', required: true, disabled: false },
|
|
207
|
+
{ field: 'name', title: 'message.udp.userName', required: true },
|
|
208
|
+
{ field: 'type', required: true, title: 'message.udp.userType', code: 'SU.USER.TYPE' },
|
|
209
|
+
{ field: 'userPwd', required: true, visibleMethod: ({ data }) => !data.id }
|
|
210
|
+
];
|
|
211
|
+
|
|
212
|
+
const handleAdd = () => {
|
|
213
|
+
data.record = {
|
|
214
|
+
userPwd: defaultPassword,
|
|
215
|
+
...defaultParams.value,
|
|
216
|
+
type: 'system'
|
|
217
|
+
};
|
|
218
|
+
data.items = clone(items, true);
|
|
219
|
+
data.height = 280;
|
|
220
|
+
data.showModal = true;
|
|
221
|
+
};
|
|
222
|
+
const handleEdit = row => {
|
|
223
|
+
data.record = clone(row, true);
|
|
224
|
+
data.items = clone(items, true);
|
|
225
|
+
data.items[0].disabled = true;
|
|
226
|
+
data.height = 240;
|
|
227
|
+
data.showModal = true;
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
const handleDel = () => {
|
|
231
|
+
xgrid.value.getInstance().commitProxy('delete');
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
const dataProcessMethod = data => {
|
|
235
|
+
return [data];
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
const onConfirm = () => {
|
|
239
|
+
xgrid.value.refreshData();
|
|
240
|
+
};
|
|
241
|
+
|
|
179
242
|
// 启用/禁用
|
|
180
243
|
async function handleClick({ row }) {
|
|
181
244
|
await to(serviceApi.put(url, [row]));
|
|
@@ -204,7 +267,7 @@ const handleRole = async (row: any) => {
|
|
|
204
267
|
*/
|
|
205
268
|
const handleResetPwd = async (row: Object) => {
|
|
206
269
|
await serviceApi.put(url + '/resetPwd', row);
|
|
207
|
-
await VxeUI.modal.alert(t('message.tip.initPassword'));
|
|
270
|
+
await VxeUI.modal.alert(t('message.tip.initPassword', { code: defaultPassword }));
|
|
208
271
|
};
|
|
209
272
|
// 启用/禁用
|
|
210
273
|
// const handleUpdate = async (record: IRecord) => {
|
|
@@ -233,12 +296,6 @@ const handleAuth = async row => {
|
|
|
233
296
|
}
|
|
234
297
|
};
|
|
235
298
|
|
|
236
|
-
const onGridEvents = {
|
|
237
|
-
editActived({ row }) {
|
|
238
|
-
columns[1].editRender.props.disabled = !!row.id;
|
|
239
|
-
columns[4].editRender.props.disabled = !!row.id;
|
|
240
|
-
}
|
|
241
|
-
};
|
|
242
299
|
const xForm = ref(null);
|
|
243
300
|
// const xSarchFrom = ref(null);
|
|
244
301
|
|
|
@@ -259,6 +316,12 @@ const onSubmit = () => {
|
|
|
259
316
|
const handleClose = () => {
|
|
260
317
|
data.showModelView = false;
|
|
261
318
|
};
|
|
319
|
+
|
|
320
|
+
const onButtonClick = code => {
|
|
321
|
+
code === 'add' && handleAdd();
|
|
322
|
+
code === 'del' && handleDel();
|
|
323
|
+
};
|
|
324
|
+
|
|
262
325
|
const getUnitList = () => {
|
|
263
326
|
serviceApi
|
|
264
327
|
.get('/uums/unit', { pageSize: 10 })
|
|
@@ -272,7 +335,13 @@ const getUnitList = () => {
|
|
|
272
335
|
});
|
|
273
336
|
};
|
|
274
337
|
|
|
338
|
+
const getDefaultPassword = () => {
|
|
339
|
+
const dict = getDictChildren('SU.DEFAULT_PASSWORD')?.find(f => f.dictCode === 'default');
|
|
340
|
+
defaultPassword = dict.dictName;
|
|
341
|
+
};
|
|
342
|
+
|
|
275
343
|
onMounted(() => {
|
|
344
|
+
getDefaultPassword();
|
|
276
345
|
getUnitList();
|
|
277
346
|
});
|
|
278
347
|
</script>
|