cloud-web-corejs-haier 1.0.4 → 1.0.6
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/package.json +7 -4
- package/src/App.vue +30 -34
- package/src/api/user.js +8 -0
- package/src/components/Tinymce/index.vue +112 -71
- package/src/components/VabUpload/image-viewer.vue +2 -2
- package/src/components/VabUpload/index.js +1 -1
- package/src/components/VabUpload/mixins.js +1 -1
- package/src/components/VabUpload/privateProfileDialogMixins.js +1 -1063
- package/src/components/VabUpload/view.vue +6 -2
- package/src/components/base-textarea/index.vue +104 -0
- package/src/components/baseAlert/mixins.js +1 -1
- package/src/components/baseAttachment/mixins.js +2 -1
- package/src/components/baseInputExport/index.vue +19 -12
- package/src/components/baseInputExport/mixins.js +1 -1
- package/src/components/baseTabs/mixins.js +1 -1
- package/src/components/code-editor/index.vue +102 -63
- package/src/components/confirmDialog/index.vue +24 -17
- package/src/components/confirmDialog/mixins.js +1 -1
- package/src/components/errorMsg/index.vue +42 -34
- package/src/components/errorMsg/mixins.js +1 -1
- package/src/components/excelExport/index.js +1 -2
- package/src/components/excelExport/mixins.js +1 -1
- package/src/components/fileLibrary/fileObjAuthDialog.vue +179 -89
- package/src/components/fileLibrary/filterDialog.vue +45 -21
- package/src/components/fileLibrary/index.vue +579 -238
- package/src/components/fileLibrary/mixins/fileObjAuthDialogMixin.js +4 -1
- package/src/components/fileLibrary/mixins/indexMixins.js +3 -0
- package/src/components/scriptDescription/button.vue +12 -4
- package/src/components/scriptTest/mixins.js +1 -1
- package/src/components/table/index.js +1 -1
- package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.es6.min.js +11028 -0
- package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.min.css +200 -0
- package/src/components/tempStorage/index.vue +1 -1
- package/src/components/vb-tabs/x-tabs.vue +0 -1
- package/src/components/wf/content.vue +32 -36
- package/src/components/wf/mixins/setCandidateDialog2.js +1 -1
- package/src/components/wf/mixins/wfFlowEleScriptDialog.js +131 -3
- package/src/components/wf/setCandidateDialog2.vue +76 -66
- package/src/components/wf/wf.js +2176 -1
- package/src/components/wf/wfFlowEleScriptDialog.vue +5 -1
- package/src/components/wf/wfStartDialog.vue +6 -10
- package/src/components/wf/wfUtil.js +279 -1
- package/src/components/xform/form-designer/designer.js +1 -1
- package/src/components/xform/form-designer/form-widget/components/gantt/index.vue +16 -1
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1 -1
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +17 -4
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +247 -187
- package/src/components/xform/form-designer/form-widget/field-widget/gantt-widget.vue +2 -0
- package/src/components/xform/form-designer/form-widget/field-widget/html-text-widget.vue +6 -2
- package/src/components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue +10 -0
- package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +65 -4
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +132 -118
- package/src/components/xform/form-designer/setting-panel/property-editor/autoValueEnabled-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/formatType-editor.vue +137 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +124 -50
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +5 -1
- package/src/components/xform/form-render/index.vue +8 -0
- package/src/components/xform/form-render/indexMixin copy.js +3462 -0
- package/src/components/xform/form-render/indexMixin.js +3496 -1
- package/src/components/xform/mixins/defaultHandle.js +1 -1
- package/src/components/xform/utils/format.js +14 -4
- package/src/components/xform/utils/formula-util.js +0 -4
- package/src/components/xform/utils/util.js +1 -1
- package/src/index.js +215 -190
- package/src/lang/index.js +56 -51
- package/src/lang/locale/en/login.js +20 -0
- package/src/lang/locale/zh/login.js +20 -0
- package/src/layout/components/Sidebar/default.vue +1423 -1266
- package/src/layout/components/TagsView/index.vue +37 -11
- package/src/layout/components/createCompany/createCompanyDialog.vue +157 -0
- package/src/layout/components/extractedCode/viewDialog.vue +1 -0
- package/src/layout/defaultLayout.vue +1 -1
- package/src/layout/index.vue +3 -5
- package/src/mixins/table/index.js +151 -0
- package/src/permission.js +1 -18
- package/src/router/modules/customer.js +3 -8
- package/src/store/getters.js +24 -23
- package/src/store/modules/user.js +1 -30
- package/src/utils/index.js +1 -6
- package/src/utils/vab.js +1 -1
- package/src/views/bd/setting/config_manage/list.vue +36 -19
- package/src/views/bd/setting/form_script/edit.vue +9 -0
- package/src/views/bd/setting/form_script/edit1.vue +29 -3
- package/src/views/bd/setting/form_script/form_list.vue +99 -37
- package/src/views/bd/setting/form_script/list1.vue +181 -118
- package/src/views/bd/setting/form_script/mixins/dialog.js +130 -1
- package/src/views/bd/setting/form_script/mixins/edit.js +199 -1
- package/src/views/bd/setting/form_script/mixins/edit1.js +193 -1
- package/src/views/bd/setting/form_script/mixins/list.js +236 -1
- package/src/views/bd/setting/form_script/mixins/list1.js +410 -1
- package/src/views/bd/setting/form_script/mixins/otherAuthDialog.js +194 -0
- package/src/views/bd/setting/form_script/otherAuthDialog.vue +83 -0
- package/src/views/bd/setting/form_template/edit.vue +13 -0
- package/src/views/bd/setting/form_template/list.vue +326 -214
- package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +279 -1
- package/src/views/bd/setting/form_template/mixins/edit.js +234 -9
- package/src/views/bd/setting/form_template/mixins/list.js +667 -3
- package/src/views/bd/setting/form_template/mixins/otherAuthDialog.js +193 -0
- package/src/views/bd/setting/form_template/otherAuthDialog.vue +83 -0
- package/src/views/bd/setting/logic_param/mixins/edit.js +1 -91
- package/src/views/bd/setting/logic_param/mixins/list.js +2 -362
- package/src/views/bd/setting/menu_kind/list.vue +172 -87
- package/src/views/bd/setting/menu_kind/mixins/authDialog.js +300 -7
- package/src/views/bd/setting/table_model/edit.vue +345 -304
- package/src/views/bd/setting/table_model/list.vue +190 -128
- package/src/views/bd/setting/table_model/mixins/edit.js +1191 -1
- package/src/views/bd/setting/table_model/mixins/list.js +428 -2
- package/src/views/bd/setting/table_model/mixins/otherAuthDialog.js +201 -0
- package/src/views/bd/setting/table_model/otherAuthDialog.vue +83 -0
- package/src/views/user/access_log/list.vue +418 -349
- package/src/views/user/area/dialog.vue +223 -116
- package/src/views/user/area/list.vue +318 -0
- package/src/views/user/common_attribute/list.vue +4 -1
- package/src/views/user/extend_datasource/dialog.vue +3 -0
- package/src/views/user/extend_datasource/edit.vue +2 -1
- package/src/views/user/extend_datasource/list.vue +3 -0
- package/src/views/user/form/vform/designer.vue +2 -1
- package/src/views/user/home/bears/index.vue +1032 -0
- package/src/views/user/home/default.vue +6 -5
- package/src/views/user/home/taili/index.vue +1034 -0
- package/src/views/user/ledger_library/list.vue +10 -12
- package/src/views/user/login/default.vue +165 -36
- package/src/views/user/login/index.vue +4 -6
- package/src/views/user/login/indexMixin.js +184 -8
- package/src/views/user/menu/list.vue +24 -1
- package/src/views/user/notify_message/dialog.vue +2 -6
- package/src/views/user/outLink/index.vue +57 -18
- package/src/views/user/role/authConfig.vue +89 -0
- package/src/views/user/role/dialog.vue +70 -48
- package/src/views/user/role/edit.vue +114 -4
- package/src/views/user/user/form_dialog.vue +158 -0
- package/src/views/user/user/list.vue +652 -582
- package/src/views/user/user/modifyPasswordDialog.vue +64 -53
- package/src/views/user/wf/wfReport/index.vue +137 -28
- package/src/views/user/wf/wf_obj_config/itemEdit.vue +15 -116
- package/src/views/user/wf/wf_obj_config/itemOperateDialog.vue +414 -0
- package/src/views/user/wf/wf_obj_config/list.vue +84 -78
- package/src/views/user/wf/wf_transfer_setting/edit.vue +52 -0
- package/src/views/user/wf/wf_transfer_setting/list.vue +10 -0
- package/src/components/xform/form-render/container-item/data-table-mixin2.js +0 -2169
- package/src/views/bd/setting/table_model/mixins/edit copy.js +0 -903
- package/src/views/user/login/index2.vue +0 -131
|
@@ -1,57 +1,76 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<div id="containt" style="margin-bottom: -4px
|
|
4
|
-
<iframe
|
|
3
|
+
<div id="containt" style="margin-bottom: -4px" v-if="type == 1">
|
|
4
|
+
<iframe
|
|
5
|
+
v-if="url"
|
|
6
|
+
:src="url"
|
|
7
|
+
style="width: 100%; height: calc(100vh - 40px)"
|
|
8
|
+
></iframe>
|
|
5
9
|
</div>
|
|
6
|
-
<component :is="content" v-if="type==2"></component>
|
|
10
|
+
<component :is="content" v-if="type == 2"></component>
|
|
7
11
|
</div>
|
|
8
12
|
</template>
|
|
9
13
|
|
|
10
14
|
<script>
|
|
11
|
-
import {getToken} from "@base/utils/auth";
|
|
15
|
+
import { getToken } from "@base/utils/auth";
|
|
12
16
|
|
|
13
17
|
export default {
|
|
14
|
-
name:
|
|
18
|
+
name: "outLink",
|
|
15
19
|
data() {
|
|
16
20
|
return {
|
|
17
21
|
url: null,
|
|
18
22
|
content: null,
|
|
19
|
-
type: 0
|
|
23
|
+
type: 0,
|
|
20
24
|
};
|
|
21
25
|
},
|
|
22
26
|
mounted() {
|
|
23
27
|
let url = this.$route.query.url;
|
|
24
28
|
let route = this.$route.query.route;
|
|
25
29
|
if (route) {
|
|
26
|
-
this.content = require(
|
|
30
|
+
this.content = require("@/views" + route).default;
|
|
27
31
|
this.type = 2;
|
|
28
32
|
} else {
|
|
29
|
-
|
|
33
|
+
let params = this.getCustomReqUrlAndCleanUrl(url);
|
|
34
|
+
let reqUrl = params.custom_req_url;
|
|
35
|
+
if (reqUrl) {
|
|
36
|
+
this.$http({
|
|
37
|
+
url: reqUrl,
|
|
38
|
+
method: `post`,
|
|
39
|
+
data: { thirdUrl: params.newUrl },
|
|
40
|
+
isLoading: true,
|
|
41
|
+
// modalStrictly: true,
|
|
42
|
+
success: (res) => {
|
|
43
|
+
this.url = res.objx;
|
|
44
|
+
this.type = 1;
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
} else if (url.indexOf("dw=true") >= 0) {
|
|
30
48
|
this.$http({
|
|
31
49
|
url: USER_PREFIX + `/dw_auth/getDwAsc`,
|
|
32
50
|
method: `post`,
|
|
33
51
|
data: {},
|
|
34
52
|
isLoading: true,
|
|
35
53
|
// modalStrictly: true,
|
|
36
|
-
success: res => {
|
|
37
|
-
this.url =
|
|
54
|
+
success: (res) => {
|
|
55
|
+
this.url =
|
|
56
|
+
url.replace("dw=true", "dw=" + res.objx.dw) + "¶m=" + res.objx.param;
|
|
38
57
|
this.type = 1;
|
|
39
|
-
}
|
|
58
|
+
},
|
|
40
59
|
});
|
|
41
|
-
}else if (url.indexOf(
|
|
60
|
+
} else if (url.indexOf("token=platform_token") >= 0) {
|
|
42
61
|
this.$http({
|
|
43
62
|
url: YX_PREFIX + `/fundPlatform/getToken`,
|
|
44
63
|
method: `post`,
|
|
45
64
|
data: {},
|
|
46
65
|
isLoading: true,
|
|
47
|
-
success: res => {
|
|
48
|
-
this.url = url.replace(
|
|
66
|
+
success: (res) => {
|
|
67
|
+
this.url = url.replace("token=platform_token", "token=" + res.objx);
|
|
49
68
|
this.type = 1;
|
|
50
|
-
}
|
|
69
|
+
},
|
|
51
70
|
});
|
|
52
|
-
} else if (url.indexOf(
|
|
71
|
+
} else if (url.indexOf("token=true") >= 0) {
|
|
53
72
|
let token = getToken();
|
|
54
|
-
this.url = url.replace(
|
|
73
|
+
this.url = url.replace("token=true", "token=" + token);
|
|
55
74
|
this.type = 1;
|
|
56
75
|
} else {
|
|
57
76
|
this.url = url;
|
|
@@ -59,7 +78,27 @@ export default {
|
|
|
59
78
|
}
|
|
60
79
|
}
|
|
61
80
|
},
|
|
62
|
-
methods: {
|
|
81
|
+
methods: {
|
|
82
|
+
getCustomReqUrlAndCleanUrl(url) {
|
|
83
|
+
// 直接使用正则表达式匹配
|
|
84
|
+
const match = url.match(/[?&]custom_req_url=([^&?#]+)/);
|
|
85
|
+
if (match) {
|
|
86
|
+
const customReqUrl = decodeURIComponent(match[1]);
|
|
87
|
+
// 移除匹配到的参数部分
|
|
88
|
+
const newUrl = url.replace(match[0], match[0].startsWith("?") ? "?" : "");
|
|
89
|
+
|
|
90
|
+
return {
|
|
91
|
+
custom_req_url: customReqUrl,
|
|
92
|
+
newUrl: newUrl.replace(/\?$/, "").replace(/\?&/, "?"),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return {
|
|
97
|
+
custom_req_url: "",
|
|
98
|
+
newUrl: url,
|
|
99
|
+
};
|
|
100
|
+
},
|
|
101
|
+
},
|
|
63
102
|
};
|
|
64
103
|
</script>
|
|
65
104
|
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-form
|
|
3
|
+
:model="formData"
|
|
4
|
+
status-icon
|
|
5
|
+
label-width="100px"
|
|
6
|
+
class="demo-ruleForm"
|
|
7
|
+
style="border: solid 1px #e9e9e9; padding: 5px"
|
|
8
|
+
>
|
|
9
|
+
<el-form-item :label="$t1('查询数据权限')">
|
|
10
|
+
<el-radio-group
|
|
11
|
+
v-model="formData.permissions"
|
|
12
|
+
@change="formData.menuRolePermOrgDTOs = []"
|
|
13
|
+
>
|
|
14
|
+
<el-radio :label="1">{{ $t1("创建人") }}</el-radio>
|
|
15
|
+
<el-radio :label="3">{{ $t1("所有") }}</el-radio>
|
|
16
|
+
<el-radio :label="2">{{ $t1("当前与下级所有机构权限") }}</el-radio>
|
|
17
|
+
</el-radio-group>
|
|
18
|
+
</el-form-item>
|
|
19
|
+
<el-form-item :label="$t1('额外机构')" v-if="formData.permissions == 2">
|
|
20
|
+
<el-tag
|
|
21
|
+
v-for="(item, index) in formData.menuRolePermOrgDTOs"
|
|
22
|
+
:key="index"
|
|
23
|
+
type="warning"
|
|
24
|
+
:disable-transitions="false"
|
|
25
|
+
:closable="true"
|
|
26
|
+
@close="formData.menuRolePermOrgDTOs.splice(index, 1)"
|
|
27
|
+
>
|
|
28
|
+
<el-tooltip
|
|
29
|
+
:enterable="false"
|
|
30
|
+
effect="dark"
|
|
31
|
+
:content="item.saleOrgName"
|
|
32
|
+
placement="bottom"
|
|
33
|
+
>
|
|
34
|
+
<span>{{ item.saleOrgName }}</span>
|
|
35
|
+
</el-tooltip>
|
|
36
|
+
</el-tag>
|
|
37
|
+
<el-button
|
|
38
|
+
icon="el-icon-plus"
|
|
39
|
+
type="warning"
|
|
40
|
+
class="el-button-tag"
|
|
41
|
+
@click="openProjectTagDialog"
|
|
42
|
+
></el-button>
|
|
43
|
+
</el-form-item>
|
|
44
|
+
<saleOrgsDialog
|
|
45
|
+
v-if="showSaleOrgsDialog"
|
|
46
|
+
:visiable.sync="showSaleOrgsDialog"
|
|
47
|
+
@confirm="confirmSaleOrgsDialog"
|
|
48
|
+
></saleOrgsDialog>
|
|
49
|
+
</el-form>
|
|
50
|
+
</template>
|
|
51
|
+
<script>
|
|
52
|
+
import saleOrgsDialog from "@base/views/user/sale_org/dialog.vue";
|
|
53
|
+
export default {
|
|
54
|
+
props: {
|
|
55
|
+
formData: {
|
|
56
|
+
type: Object,
|
|
57
|
+
default: () => {},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
components: {
|
|
61
|
+
saleOrgsDialog,
|
|
62
|
+
},
|
|
63
|
+
data() {
|
|
64
|
+
return {
|
|
65
|
+
showSaleOrgsDialog: false,
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
methods: {
|
|
69
|
+
openProjectTagDialog() {
|
|
70
|
+
this.showSaleOrgsDialog = true;
|
|
71
|
+
},
|
|
72
|
+
confirmSaleOrgsDialog(rows) {
|
|
73
|
+
if (rows.length) {
|
|
74
|
+
let ids = this.formData.menuRolePermOrgDTOs.map((item) => item.saleOrgId);
|
|
75
|
+
let items = rows
|
|
76
|
+
.filter((item) => !ids.includes(item.id))
|
|
77
|
+
.map((item) => {
|
|
78
|
+
return {
|
|
79
|
+
menus: this.formData.id,
|
|
80
|
+
saleOrgId: item.id,
|
|
81
|
+
saleOrgName: item.name,
|
|
82
|
+
};
|
|
83
|
+
});
|
|
84
|
+
if (items.length) this.formData.menuRolePermOrgDTOs.push(...items);
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
</script>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
v-el-drag-dialog
|
|
13
13
|
v-el-dialog-center
|
|
14
14
|
>
|
|
15
|
-
<div class="cont" style="height:65vh">
|
|
15
|
+
<div class="cont" style="height: 65vh">
|
|
16
16
|
<vxe-grid
|
|
17
17
|
class="is-pointer"
|
|
18
18
|
ref="table-m1"
|
|
@@ -26,24 +26,41 @@
|
|
|
26
26
|
<template #form>
|
|
27
27
|
<div class="clearfix screen-btns">
|
|
28
28
|
<div class="fr">
|
|
29
|
-
<vxe-button
|
|
30
|
-
|
|
29
|
+
<vxe-button
|
|
30
|
+
icon="el-icon-brush"
|
|
31
|
+
class="button-sty"
|
|
32
|
+
@click="resetEvent"
|
|
33
|
+
type="text"
|
|
34
|
+
status="primary"
|
|
35
|
+
plain
|
|
36
|
+
>{{ $t1("重置") }}
|
|
31
37
|
</vxe-button>
|
|
32
|
-
<vxe-button
|
|
33
|
-
|
|
38
|
+
<vxe-button
|
|
39
|
+
status="warning"
|
|
40
|
+
icon="el-icon-search"
|
|
41
|
+
class="button-sty"
|
|
42
|
+
@click="searchEvent"
|
|
43
|
+
>
|
|
44
|
+
{{ $t1("搜索") }}
|
|
34
45
|
</vxe-button>
|
|
35
46
|
</div>
|
|
36
47
|
</div>
|
|
37
|
-
<vxe-form
|
|
38
|
-
|
|
39
|
-
|
|
48
|
+
<vxe-form
|
|
49
|
+
class="screen-box"
|
|
50
|
+
title-width="92px"
|
|
51
|
+
title-align="right"
|
|
52
|
+
:data="formData"
|
|
53
|
+
@submit="searchEvent"
|
|
54
|
+
@reset="resetEvent"
|
|
55
|
+
>
|
|
56
|
+
<vxe-form-item :title="$t1('用户角色') + ':'" field="name">
|
|
40
57
|
<template v-slot>
|
|
41
|
-
<el-input v-model="formData.name" size="small" clearable/>
|
|
58
|
+
<el-input v-model="formData.name" size="small" clearable />
|
|
42
59
|
</template>
|
|
43
60
|
</vxe-form-item>
|
|
44
|
-
<vxe-form-item :title="$t1('角色编码')+':'" field="code">
|
|
61
|
+
<vxe-form-item :title="$t1('角色编码') + ':'" field="code">
|
|
45
62
|
<template v-slot>
|
|
46
|
-
<el-input v-model="formData.code" size="small" clearable/>
|
|
63
|
+
<el-input v-model="formData.code" size="small" clearable />
|
|
47
64
|
</template>
|
|
48
65
|
</vxe-form-item>
|
|
49
66
|
<vxe-button type="submit" @click="searchEvent" v-show="false"></vxe-button>
|
|
@@ -58,9 +75,12 @@
|
|
|
58
75
|
</div>
|
|
59
76
|
</label>
|
|
60
77
|
<div class="multipleChoice">
|
|
61
|
-
<el-tooltip
|
|
62
|
-
|
|
63
|
-
|
|
78
|
+
<el-tooltip
|
|
79
|
+
:enterable="false"
|
|
80
|
+
effect="dark"
|
|
81
|
+
:content="$t1('全部删除')"
|
|
82
|
+
placement="top"
|
|
83
|
+
><a class="allDel icon-quanbushanchu" @click="clearChecked()"></a>
|
|
64
84
|
</el-tooltip>
|
|
65
85
|
<div class="list">
|
|
66
86
|
<div class="item" v-for="(checkRow, index) in checkRows" :key="index">
|
|
@@ -70,25 +90,27 @@
|
|
|
70
90
|
</div>
|
|
71
91
|
</div>
|
|
72
92
|
<span slot="footer" class="dialog-footer">
|
|
73
|
-
<span class="fl tips" v-if="!selectMulti">{{
|
|
93
|
+
<span class="fl tips" v-if="!selectMulti">{{
|
|
94
|
+
$t1("注:双击确认选择(单选)")
|
|
95
|
+
}}</span>
|
|
74
96
|
<el-button type="primary" plain class="button-sty" @click="dialogClose">
|
|
75
97
|
<i class="el-icon-close el-icon"></i>
|
|
76
|
-
{{ $t1(
|
|
98
|
+
{{ $t1("取 消") }}
|
|
77
99
|
</el-button>
|
|
78
100
|
<el-button type="primary" @click="dialogPrimary" class="button-sty">
|
|
79
101
|
<i class="el-icon-check el-icon"></i>
|
|
80
|
-
{{ $t1(
|
|
102
|
+
{{ $t1("确 定") }}
|
|
81
103
|
</el-button>
|
|
82
104
|
</span>
|
|
83
105
|
</el-dialog>
|
|
84
106
|
</template>
|
|
85
107
|
|
|
86
108
|
<script>
|
|
87
|
-
import {selectDialogMixins} from
|
|
109
|
+
import { selectDialogMixins } from "@base/mixins/selectDialog/index.js";
|
|
88
110
|
|
|
89
111
|
export default {
|
|
90
|
-
name:
|
|
91
|
-
props: [
|
|
112
|
+
name: "roleDialog",
|
|
113
|
+
props: ["visiable", "multi", "rows", "param"],
|
|
92
114
|
mixins: [selectDialogMixins],
|
|
93
115
|
created() {
|
|
94
116
|
this.initSetting();
|
|
@@ -103,64 +125,64 @@ export default {
|
|
|
103
125
|
falseValue: false,
|
|
104
126
|
selectMulti: true,
|
|
105
127
|
formData: {},
|
|
106
|
-
vxeOption: {}
|
|
128
|
+
vxeOption: {},
|
|
107
129
|
};
|
|
108
130
|
},
|
|
109
131
|
methods: {
|
|
110
132
|
initTableM1() {
|
|
111
133
|
let that = this;
|
|
112
|
-
let url = USER_PREFIX +
|
|
134
|
+
let url = USER_PREFIX + "/role/listCurrentPage";
|
|
113
135
|
let tableOption = {
|
|
114
136
|
vue: that,
|
|
115
|
-
tableRef:
|
|
116
|
-
tableName:
|
|
137
|
+
tableRef: "table-m1",
|
|
138
|
+
tableName: "basic_role_dialog-m1",
|
|
117
139
|
path: url,
|
|
118
140
|
param: () => {
|
|
119
141
|
return {
|
|
120
142
|
...this.formData,
|
|
121
|
-
...this.param
|
|
143
|
+
...this.param,
|
|
122
144
|
};
|
|
123
145
|
},
|
|
124
146
|
columns: [
|
|
125
|
-
{type:
|
|
126
|
-
{title: this.$t1(
|
|
127
|
-
{title: this.$t1(
|
|
128
|
-
{title: this.$t1(
|
|
147
|
+
{ type: "checkbox", width: 48, resizable: false, fixed: "left" },
|
|
148
|
+
{ title: this.$t1("用户角色"), field: "name", width: 250, fixed: "left" },
|
|
149
|
+
{ title: this.$t1("角色编码"), field: "code", width: 150 },
|
|
150
|
+
{ title: this.$t1("角色描述"), field: "description", width: 150 },
|
|
129
151
|
{
|
|
130
|
-
title: this.$t1(
|
|
131
|
-
field:
|
|
152
|
+
title: this.$t1("是否内置"),
|
|
153
|
+
field: "systems",
|
|
132
154
|
width: 150,
|
|
133
155
|
slots: {
|
|
134
|
-
default: ({row}) => {
|
|
156
|
+
default: ({ row }) => {
|
|
135
157
|
if (row.systems) {
|
|
136
|
-
return this.$t1(
|
|
158
|
+
return this.$t1("是");
|
|
137
159
|
} else {
|
|
138
|
-
return this.$t1(
|
|
160
|
+
return this.$t1("否");
|
|
139
161
|
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
162
|
+
},
|
|
163
|
+
},
|
|
142
164
|
},
|
|
143
|
-
{title: this.$t1(
|
|
144
|
-
{title: this.$t1(
|
|
165
|
+
{ title: this.$t1("所属组织"), field: "companyName", width: 150 },
|
|
166
|
+
{ title: this.$t1("创建时间"), field: "createDate", width: 150 },
|
|
145
167
|
{
|
|
146
168
|
width: 47,
|
|
147
|
-
fixed:
|
|
148
|
-
title:
|
|
149
|
-
sortable: false
|
|
150
|
-
}
|
|
169
|
+
fixed: "right",
|
|
170
|
+
title: "",
|
|
171
|
+
sortable: false,
|
|
172
|
+
},
|
|
151
173
|
],
|
|
152
174
|
config: {
|
|
153
175
|
checkboxConfig: {
|
|
154
176
|
checkStrictly: true,
|
|
155
177
|
showHeader: this.selectMulti,
|
|
156
|
-
trigger:
|
|
157
|
-
}
|
|
158
|
-
}
|
|
178
|
+
trigger: "row",
|
|
179
|
+
},
|
|
180
|
+
},
|
|
159
181
|
};
|
|
160
|
-
this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
|
|
182
|
+
this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
|
|
161
183
|
that.vxeOption = opts;
|
|
162
184
|
});
|
|
163
|
-
}
|
|
164
|
-
}
|
|
185
|
+
},
|
|
186
|
+
},
|
|
165
187
|
};
|
|
166
188
|
</script>
|
|
@@ -150,8 +150,16 @@
|
|
|
150
150
|
v-model="fourthItem.hasAuth"
|
|
151
151
|
@change="changeBtnSelect(subItem, index3, index4)"
|
|
152
152
|
></el-checkbox>
|
|
153
|
+
<authConfig
|
|
154
|
+
v-if="thrItem.checkPermission"
|
|
155
|
+
:formData="thrItem"
|
|
156
|
+
></authConfig>
|
|
153
157
|
</div>
|
|
154
158
|
</div>
|
|
159
|
+
<authConfig
|
|
160
|
+
v-if="subItem.checkPermission"
|
|
161
|
+
:formData="subItem"
|
|
162
|
+
></authConfig>
|
|
155
163
|
</div>
|
|
156
164
|
</div>
|
|
157
165
|
</div>
|
|
@@ -219,10 +227,13 @@
|
|
|
219
227
|
</template>
|
|
220
228
|
|
|
221
229
|
<script>
|
|
230
|
+
import authConfig from "./authConfig.vue";
|
|
222
231
|
export default {
|
|
223
232
|
name: "roleEdit",
|
|
224
233
|
props: ["_dataId"],
|
|
225
|
-
components: {
|
|
234
|
+
components: {
|
|
235
|
+
authConfig,
|
|
236
|
+
},
|
|
226
237
|
data() {
|
|
227
238
|
return {
|
|
228
239
|
tabIndex: 0,
|
|
@@ -231,6 +242,8 @@ export default {
|
|
|
231
242
|
role: {
|
|
232
243
|
menus: [],
|
|
233
244
|
mobileMenuIds: [],
|
|
245
|
+
menuRolePermDTOs: [],
|
|
246
|
+
menuRolePermOrgDTOs: [],
|
|
234
247
|
},
|
|
235
248
|
allMenus: [],
|
|
236
249
|
allMobileMenus: [],
|
|
@@ -267,14 +280,51 @@ export default {
|
|
|
267
280
|
isLoading: true,
|
|
268
281
|
modalStrictly: true,
|
|
269
282
|
success: (res) => {
|
|
270
|
-
|
|
271
|
-
this.
|
|
283
|
+
let role = res.objx || {};
|
|
284
|
+
this.getPermissionData((rows, orgRows) => {
|
|
285
|
+
role.menuRolePermDTOs = rows;
|
|
286
|
+
role.menuRolePermOrgDTOs = orgRows;
|
|
287
|
+
this.role = role;
|
|
288
|
+
this.initMenuData();
|
|
289
|
+
});
|
|
272
290
|
},
|
|
273
291
|
});
|
|
274
292
|
} else {
|
|
275
293
|
this.initMenuData();
|
|
276
294
|
}
|
|
277
295
|
},
|
|
296
|
+
getPermissionData(callback) {
|
|
297
|
+
this.$http({
|
|
298
|
+
url: USER_PREFIX + `/menu_role_perm/listPerms`,
|
|
299
|
+
method: `post`,
|
|
300
|
+
data: {
|
|
301
|
+
id: this.dataId,
|
|
302
|
+
},
|
|
303
|
+
isLoading: true,
|
|
304
|
+
modalStrictly: true,
|
|
305
|
+
success: (res) => {
|
|
306
|
+
let rows = res.objx || [];
|
|
307
|
+
this.getListPermOrgs((orgRows) => {
|
|
308
|
+
callback(rows, orgRows);
|
|
309
|
+
});
|
|
310
|
+
},
|
|
311
|
+
});
|
|
312
|
+
},
|
|
313
|
+
getListPermOrgs(callback) {
|
|
314
|
+
this.$http({
|
|
315
|
+
url: USER_PREFIX + `/menu_role_perm/listPermOrgs`,
|
|
316
|
+
method: `post`,
|
|
317
|
+
data: {
|
|
318
|
+
id: this.dataId,
|
|
319
|
+
},
|
|
320
|
+
isLoading: true,
|
|
321
|
+
modalStrictly: true,
|
|
322
|
+
success: (res) => {
|
|
323
|
+
let rows = res.objx || [];
|
|
324
|
+
callback(rows);
|
|
325
|
+
},
|
|
326
|
+
});
|
|
327
|
+
},
|
|
278
328
|
saveData() {
|
|
279
329
|
this.$refs.editForm.$baseValidate((valid) => {
|
|
280
330
|
if (valid) {
|
|
@@ -284,6 +334,9 @@ export default {
|
|
|
284
334
|
formData.menuIds = this.getMenuFormData();
|
|
285
335
|
formData.mobileMenuIds = this.getMobileMenuFormData();
|
|
286
336
|
|
|
337
|
+
//处理权限数据
|
|
338
|
+
this.handleDataBeforeSubmit();
|
|
339
|
+
|
|
287
340
|
this.$http({
|
|
288
341
|
url: url,
|
|
289
342
|
method: `post`,
|
|
@@ -394,7 +447,7 @@ export default {
|
|
|
394
447
|
subItem.hasAuth = isCheckSubItem;
|
|
395
448
|
this.$forceUpdate();
|
|
396
449
|
},
|
|
397
|
-
getMenuFormData() {
|
|
450
|
+
getMenuFormData(item, menuRolePermDTOs, menuRolePermOrgDTOs) {
|
|
398
451
|
let selectIds = [];
|
|
399
452
|
let menus = this.allMenus;
|
|
400
453
|
menus.forEach(function (item) {
|
|
@@ -425,6 +478,41 @@ export default {
|
|
|
425
478
|
});
|
|
426
479
|
return selectIds;
|
|
427
480
|
},
|
|
481
|
+
handlePermission(item, menuRolePermDTOs, menuRolePermOrgDTOs) {
|
|
482
|
+
if (item.checkPermission) {
|
|
483
|
+
if (item.permissions) {
|
|
484
|
+
menuRolePermDTOs.push({
|
|
485
|
+
menus: item.id,
|
|
486
|
+
permissions: item.permissions,
|
|
487
|
+
});
|
|
488
|
+
|
|
489
|
+
if (item.permissions === 2 && item.menuRolePermOrgDTOs.length) {
|
|
490
|
+
menuRolePermOrgDTOs.push(...item.menuRolePermOrgDTOs);
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
handleDataBeforeSubmit() {
|
|
496
|
+
let menuRolePermDTOs = [];
|
|
497
|
+
let menuRolePermOrgDTOs = [];
|
|
498
|
+
let that = this;
|
|
499
|
+
let menus = this.allMenus;
|
|
500
|
+
menus.forEach(function (item) {
|
|
501
|
+
that.handlePermission(item, menuRolePermDTOs, menuRolePermOrgDTOs);
|
|
502
|
+
if (item.children) {
|
|
503
|
+
item.children.forEach(function (subItem) {
|
|
504
|
+
that.handlePermission(subItem, menuRolePermDTOs, menuRolePermOrgDTOs);
|
|
505
|
+
if (subItem.children) {
|
|
506
|
+
subItem.children.forEach(function (thrItem) {
|
|
507
|
+
that.handlePermission(thrItem, menuRolePermDTOs, menuRolePermOrgDTOs);
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
});
|
|
513
|
+
this.role.menuRolePermDTOs = menuRolePermDTOs;
|
|
514
|
+
this.role.menuRolePermOrgDTOs = menuRolePermOrgDTOs;
|
|
515
|
+
},
|
|
428
516
|
getMobileMenuFormData() {
|
|
429
517
|
let selectIds = [];
|
|
430
518
|
let menus = this.allMobileMenus;
|
|
@@ -457,9 +545,31 @@ export default {
|
|
|
457
545
|
return selectIds;
|
|
458
546
|
},
|
|
459
547
|
handleRoles(rows, menuIds) {
|
|
548
|
+
let menuRolePermDTOs = this.role.menuRolePermDTOs || [];
|
|
549
|
+
let menuRolePermOrgDTOs = this.role.menuRolePermOrgDTOs || [];
|
|
460
550
|
let newRows = [];
|
|
461
551
|
for (let i = 0; i < rows.length; i++) {
|
|
462
552
|
let row = rows[i];
|
|
553
|
+
let permissions = null;
|
|
554
|
+
let permOrgDTOs = [];
|
|
555
|
+
if (row.checkPermission) {
|
|
556
|
+
menuRolePermDTOs.find((item) => {
|
|
557
|
+
if (item.menus == row.id) {
|
|
558
|
+
permissions = item.permissions;
|
|
559
|
+
return true;
|
|
560
|
+
}
|
|
561
|
+
return false;
|
|
562
|
+
});
|
|
563
|
+
|
|
564
|
+
menuRolePermOrgDTOs.forEach((item) => {
|
|
565
|
+
if (item.menus == row.id) {
|
|
566
|
+
permOrgDTOs.push(item);
|
|
567
|
+
}
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
row.permissions = permissions;
|
|
572
|
+
row.menuRolePermOrgDTOs = permOrgDTOs;
|
|
463
573
|
if (menuIds.includes(row.id)) {
|
|
464
574
|
row.hasAuth = true;
|
|
465
575
|
} else {
|