@indfnd/common 1.0.35 → 1.0.36
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/CHANGELOG.md +14 -0
- package/css/view-design/fonts/ionicons.svg +869 -869
- package/dist/ind-common.es.js +159 -122
- package/dist/ind-common.umd.cjs +44 -44
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
- package/src/styles/components/auth.less +13 -20
- package/src/styles/components/form.less +3 -0
package/dist/ind-common.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Button as Button$1, ButtonGroup as ButtonGroup$1, Input, Drawer as Drawer$1, Dropdown as Dropdown$1, Modal as Modal$1, Form, FormItem, Select as Select$1, Option, Row, Col, Menu, MenuItem, Badge, DropdownMenu, DropdownItem, Submenu, Tag, Header, Layout, Content, Spin, Poptip as Poptip$1, CheckboxGroup, Checkbox, RadioGroup, Radio, Card, Message, LoadingBar } from "view-design";
|
|
2
|
-
import { isNil, formatDate as formatDate$1, useConfig, getQuarterNum, formatQuarter, str2Date, isDate, isArray, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios, isFunction, isString, uuid, exportJsonToExcel as exportJsonToExcel$1, importJsonFromExcel, on, off, deleteMenuHistoryApi, deleteMenuCollectApi, getMenuHistoryApi, getMenuCollectApi, getPermissionCache, listItemTreeApi, getPriceInfo, MIME_TYPE, base64ToBlob, putOssFileApi, isEqual, getCaptchaURL, getLocalStorage, guid, setLocalStorage, removeLocalStorage, clearSessionStorage, cryptor, getToken, putOssFileUrl, getOssFileUrl, responseInterceptors, listUserTreeApi, UC_ENUM, config as config$1, setToken, loginApi, clearUserInfoCache, clearPermissionCache, logoutApi, getUserInfoCache, getUserInfoApi, setUserInfoCache, getSessionStorage, setSessionStorage, getAppListApi, getPermissionApi, setPermissionCache, menuHistoryApi, addMenuCollectApi, removeMenuCollectApi, getIndexDescCache, listIndexDescApi, setIndexDescCache } from "@indfnd/utils";
|
|
2
|
+
import { isNil, formatDate as formatDate$1, useConfig, getQuarterNum, formatQuarter, str2Date, isDate, isArray, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios, isFunction, isString, uuid, exportJsonToExcel as exportJsonToExcel$1, importJsonFromExcel, on, off, deleteMenuHistoryApi, deleteMenuCollectApi, getMenuHistoryApi, getMenuCollectApi, getPermissionCache, listItemTreeApi, getPriceInfo, MIME_TYPE, base64ToBlob, putOssFileApi, isEqual, getCaptchaURL, getLocalStorage, guid, setLocalStorage, removeLocalStorage, clearSessionStorage, cryptor, getToken, putOssFileUrl, getOssFileUrl, responseInterceptors, listComTreeApi, listUserTreeApi, UC_ENUM, config as config$1, setToken, loginApi, clearUserInfoCache, clearPermissionCache, logoutApi, getUserInfoCache, getUserInfoApi, setUserInfoCache, getSessionStorage, setSessionStorage, getAppListApi, getPermissionApi, setPermissionCache, menuHistoryApi, addMenuCollectApi, removeMenuCollectApi, getIndexDescCache, listIndexDescApi, setIndexDescCache } from "@indfnd/utils";
|
|
3
3
|
import Vue$1 from "vue";
|
|
4
4
|
const name$1 = "@indfnd/common";
|
|
5
|
-
const version = "1.0.
|
|
5
|
+
const version = "1.0.35";
|
|
6
6
|
const author = "huxuetong";
|
|
7
7
|
const publishConfig = {
|
|
8
8
|
registry: "https://registry.npmjs.org/"
|
|
@@ -48589,6 +48589,7 @@ var FormImpl = {
|
|
|
48589
48589
|
searchLoading: Boolean,
|
|
48590
48590
|
queryBtn: { type: Boolean, default: true },
|
|
48591
48591
|
resetBtn: { type: Boolean, default: true },
|
|
48592
|
+
scopedSlots: Object,
|
|
48592
48593
|
formCacheList: Array,
|
|
48593
48594
|
curCacheId: String,
|
|
48594
48595
|
formEnumData: Object
|
|
@@ -49176,7 +49177,12 @@ var FormImpl = {
|
|
|
49176
49177
|
prop: d.formKey
|
|
49177
49178
|
}
|
|
49178
49179
|
},
|
|
49179
|
-
[
|
|
49180
|
+
[
|
|
49181
|
+
this.scopedSlots[d.formKey] ? this.scopedSlots[d.formKey]({
|
|
49182
|
+
form: this.form,
|
|
49183
|
+
item: d
|
|
49184
|
+
}) : itemInner
|
|
49185
|
+
]
|
|
49180
49186
|
)
|
|
49181
49187
|
]
|
|
49182
49188
|
)
|
|
@@ -49919,7 +49925,7 @@ var render$15 = function() {
|
|
|
49919
49925
|
var _vm = this;
|
|
49920
49926
|
var _h = _vm.$createElement;
|
|
49921
49927
|
var _c = _vm._self._c || _h;
|
|
49922
|
-
return _c("div", { staticClass: "ind-form-wrap" }, [_c("FormImpl", _vm._g(_vm._b({ ref: "form", attrs: { "funId": (_vm.funId || "") + "-" + _vm.$route.meta.permissionId, "formCacheList": _vm.formCacheList, "curCacheId": _vm.curCacheId, "formEnumData": _vm.formEnumData, "value": _vm.value, "fieldList": _vm.fieldList }, on: { "update:formEnumData": function($event) {
|
|
49928
|
+
return _c("div", { staticClass: "ind-form-wrap" }, [_c("FormImpl", _vm._g(_vm._b({ ref: "form", attrs: { "funId": (_vm.funId || "") + "-" + _vm.$route.meta.permissionId, "formCacheList": _vm.formCacheList, "curCacheId": _vm.curCacheId, "formEnumData": _vm.formEnumData, "value": _vm.value, "fieldList": _vm.fieldList, "scopedSlots": _vm.$scopedSlots }, on: { "update:formEnumData": function($event) {
|
|
49923
49929
|
_vm.formEnumData = $event;
|
|
49924
49930
|
}, "update:form-enum-data": function($event) {
|
|
49925
49931
|
_vm.formEnumData = $event;
|
|
@@ -52245,7 +52251,7 @@ var render$$ = function() {
|
|
|
52245
52251
|
_vm.checkAllGroup = $$v;
|
|
52246
52252
|
}, expression: "checkAllGroup" } }, [_vm._l(_vm.columns, function(item2) {
|
|
52247
52253
|
return [item2.title ? _c("Checkbox", { key: item2.field, attrs: { "label": item2.title } }, [_vm._v(_vm._s(item2.title))]) : _vm._e()];
|
|
52248
|
-
}), _c("br"), _c("br"), _vm._v(" \xA0 "), _c("Button", { staticClass: "table-column-select-btn", attrs: { "type": "default" }, on: { "click": _vm.columnSave } }, [_vm._v("\u4FDD \u5B58")]), _vm._v(" \xA0 "), _c("Button", { staticClass: "table-column-select-btn", attrs: { "type": "default" }, on: { "click": _vm.columnClear } }, [_vm._v("\u6E05 \u9664")])], 2), _c("Button", { directives: [{ name: "show", rawName: "v-show", value: _vm.btnSel != "1", expression: "btnSel != '1'" }], staticStyle: { "position": "absolute", "top": "10px", "right": "10px" }, attrs: { "type": "primary", "icon": "md-close", "size": "small", "title": "\u5173\u95ED" }, on: { "click": _vm.closeTableSettingDropdown } })], 1)], 1)], 1)])], 2)], 1), _c("IndLoadingPanel", { attrs: { "loading": _vm.tableLoading } }, [!_vm.refreshTable ? _c("ag-grid-vue", _vm._g(_vm._b({ ref: "tableRef", staticClass: "ag-theme-balham", style: { height: _vm.height && !_vm.fullSreen ? _vm.height + "px" : "100%" }, attrs: { "id": "agTable", "suppressCellFocus": true, "suppressMenu": true, "suppressContextMenu": !_vm.showTableOption, "defaultColDef": _vm.defaultColDef, "headerHeight": _vm.headerHeight, "rowHeight": _vm.getRowHeight(), "getRowHeight": _vm.getRowHeight, "rowData": _vm.rowDataFiltered, "suppressRowClickSelection": (_vm.isPc || _vm.isEditTable) && _vm.rowSelection == "multiple" || _vm.suppressRowClickSelection, "rowSelection": _vm.rowSelection, "rowMultiSelectWithClick": !_vm.isPc && !_vm.isEditTable && (_vm.rowSelection == "multiple" || _vm.rowMultiSelectWithClick), "columnDefs": _vm.tableColumns, "localeText": _vm.localeText, "singleClickEdit": true, "pinnedTopRowData": _vm.topRows, "pinnedBottomRowData": _vm.pinnedBottomRowData, "suppressRowTransform": true, "stopEditingWhenCellsLoseFocus": true, "getRowClass": _vm.getRowClassCommon, "getRowId": _vm.getRowId, "tooltipShowDelay": 500, "overlayNoRowsTemplate": _vm.noRowsTemplate || _vm.overlayNoRowsTemplate, "treeData": _vm.treeData, "getDataPath": _vm.getDataPath, "autoGroupColumnDef": _vm.autoGroupColumnDef, "groupDisplayType": _vm.groupDisplayType, "groupSelectsChildren": _vm.groupSelectsChildren, "groupDefaultExpanded": _vm.groupDefaultExpanded, "getContextMenuItems": _vm.getContextMenuItems }, on: { "sortChanged": _vm.sortChanged, "selection-changed": _vm.selectionChanged, "rowSelected": _vm.rowSelected, "grid-ready": _vm.onGridReady, "cellClicked": _vm.cellClicked, "cellDoubleClicked": _vm.cellDoubleClicked } }, "ag-grid-vue", _vm.$attrs, false), _vm.$listeners)) : _vm._e()], 1), _vm.showBottom ? _c("div", { ref: "bottom" }, [_c("Row", [_c("i-col", { staticStyle: { "text-align": "left" }, attrs: { "span": "18" } }, [_c("Page", { directives: [{ name: "show", rawName: "v-show", value: !_vm.disablePage, expression: "!disablePage" }], attrs: { "size": "small", "total": _vm.totalNumber, "current": _vm.currentPage, "page-size": _vm.limitNumber, "show-sizer": "", "show-total": "", "show-elevator": "" }, on: { "on-change": _vm.onPageChange, "on-page-size-change": _vm.onPageSizeChange } }), _c("span", { directives: [{ name: "show", rawName: "v-show", value: _vm.disablePage, expression: "disablePage" }] }, [_vm._v("\u5171 " + _vm._s(_vm.tableData.length) + " \u6761\u6570\u636E")])], 1)], 1)], 1) : _vm._e()], 1);
|
|
52254
|
+
}), _c("br"), _c("br"), _vm._v(" \xA0 "), _c("Button", { staticClass: "table-column-select-btn", attrs: { "type": "default" }, on: { "click": _vm.columnSave } }, [_vm._v("\u4FDD \u5B58")]), _vm._v(" \xA0 "), _c("Button", { staticClass: "table-column-select-btn", attrs: { "type": "default" }, on: { "click": _vm.columnClear } }, [_vm._v("\u6E05 \u9664")])], 2), _c("Button", { directives: [{ name: "show", rawName: "v-show", value: _vm.btnSel != "1", expression: "btnSel != '1'" }], staticStyle: { "position": "absolute", "top": "10px", "right": "10px" }, attrs: { "type": "primary", "icon": "md-close", "size": "small", "title": "\u5173\u95ED" }, on: { "click": _vm.closeTableSettingDropdown } })], 1)], 1)], 1)])], 2)], 1), _c("IndLoadingPanel", { attrs: { "loading": _vm.tableLoading } }, [!_vm.refreshTable ? _c("ag-grid-vue", _vm._g(_vm._b({ ref: "tableRef", staticClass: "ag-theme-balham", style: { height: _vm.height && !_vm.fullSreen ? _vm.height + "px" : "100%" }, attrs: { "id": "agTable", "suppressCellFocus": true, "suppressMenu": true, "suppressContextMenu": !_vm.showTableOption, "defaultColDef": _vm.defaultColDef, "headerHeight": _vm.headerHeight, "rowHeight": _vm.getRowHeightProp ? _vm.getRowHeightProp() : _vm.getRowHeight(), "getRowHeight": _vm.getRowHeightProp || _vm.getRowHeight, "rowData": _vm.rowDataFiltered, "suppressRowClickSelection": (_vm.isPc || _vm.isEditTable) && _vm.rowSelection == "multiple" || _vm.suppressRowClickSelection, "rowSelection": _vm.rowSelection, "rowMultiSelectWithClick": !_vm.isPc && !_vm.isEditTable && (_vm.rowSelection == "multiple" || _vm.rowMultiSelectWithClick), "columnDefs": _vm.tableColumns, "localeText": _vm.localeText, "singleClickEdit": true, "pinnedTopRowData": _vm.topRows, "pinnedBottomRowData": _vm.pinnedBottomRowData, "suppressRowTransform": true, "stopEditingWhenCellsLoseFocus": true, "getRowClass": _vm.getRowClassCommon, "getRowId": _vm.getRowId, "tooltipShowDelay": 500, "overlayNoRowsTemplate": _vm.noRowsTemplate || _vm.overlayNoRowsTemplate, "treeData": _vm.treeData, "getDataPath": _vm.getDataPath, "autoGroupColumnDef": _vm.autoGroupColumnDef, "groupDisplayType": _vm.groupDisplayType, "groupSelectsChildren": _vm.groupSelectsChildren, "groupDefaultExpanded": _vm.groupDefaultExpanded, "getContextMenuItems": _vm.getContextMenuItems }, on: { "sortChanged": _vm.sortChanged, "selection-changed": _vm.selectionChanged, "rowSelected": _vm.rowSelected, "grid-ready": _vm.onGridReady, "cellClicked": _vm.cellClicked, "cellDoubleClicked": _vm.cellDoubleClicked } }, "ag-grid-vue", _vm.$attrs, false), _vm.$listeners)) : _vm._e()], 1), _vm.showBottom ? _c("div", { ref: "bottom" }, [_c("Row", [_c("i-col", { staticStyle: { "text-align": "left" }, attrs: { "span": "18" } }, [_c("Page", { directives: [{ name: "show", rawName: "v-show", value: !_vm.disablePage, expression: "!disablePage" }], attrs: { "size": "small", "total": _vm.totalNumber, "current": _vm.currentPage, "page-size": _vm.limitNumber, "show-sizer": "", "show-total": "", "show-elevator": "" }, on: { "on-change": _vm.onPageChange, "on-page-size-change": _vm.onPageSizeChange } }), _c("span", { directives: [{ name: "show", rawName: "v-show", value: _vm.disablePage, expression: "disablePage" }] }, [_vm._v("\u5171 " + _vm._s(_vm.tableData.length) + " \u6761\u6570\u636E")])], 1)], 1)], 1) : _vm._e()], 1);
|
|
52249
52255
|
};
|
|
52250
52256
|
var staticRenderFns$$ = [];
|
|
52251
52257
|
function suppressNavigation$1(params) {
|
|
@@ -52337,6 +52343,9 @@ const __vue2_script$10 = {
|
|
|
52337
52343
|
AgImage
|
|
52338
52344
|
},
|
|
52339
52345
|
props: {
|
|
52346
|
+
rowHeight: Number,
|
|
52347
|
+
headerHeight: Number,
|
|
52348
|
+
getRowHeightProp: Function,
|
|
52340
52349
|
rowSpanDefs: Array,
|
|
52341
52350
|
headerHeight: {
|
|
52342
52351
|
type: Number,
|
|
@@ -53618,57 +53627,70 @@ const __vue2_script$10 = {
|
|
|
53618
53627
|
},
|
|
53619
53628
|
renderSumRow: _.debounce(async function() {
|
|
53620
53629
|
var _a;
|
|
53621
|
-
let hasSumRow = this.flatColumns
|
|
53630
|
+
let hasSumRow = _.some(this.flatColumns, (item2) => item2.isSum);
|
|
53622
53631
|
if (hasSumRow) {
|
|
53623
53632
|
console.time("calcSum");
|
|
53633
|
+
let sumCols = _.filter(this.flatColumns, (item2) => item2.isSum);
|
|
53634
|
+
let sumCalcCols = _.remove(sumCols, (item2) => isString(item2.isSum));
|
|
53635
|
+
let sumFuncCols = _.remove(sumCols, (item2) => item2.isSum instanceof Function);
|
|
53636
|
+
const sumCalcRuleMap = {};
|
|
53637
|
+
_.forEach(sumCalcCols, (col) => {
|
|
53638
|
+
addCalcRuleMap(sumCalcRuleMap, col.isSum, col.field || col.key);
|
|
53639
|
+
});
|
|
53624
53640
|
let sumData = {};
|
|
53625
|
-
for (let
|
|
53626
|
-
if (!["checkbox", "radios", "index"].includes(
|
|
53627
|
-
|
|
53641
|
+
for (let i = 0; i < this.flatColumns.length; i++) {
|
|
53642
|
+
if (!["checkbox", "radios", "index"].includes((_a = this.flatColumns[i]) == null ? void 0 : _a.type)) {
|
|
53643
|
+
let colTmp = this.flatColumns[i];
|
|
53644
|
+
sumData[colTmp.field || colTmp.key] = "\u5408\u8BA1";
|
|
53628
53645
|
break;
|
|
53629
53646
|
}
|
|
53630
53647
|
}
|
|
53631
|
-
|
|
53632
|
-
|
|
53633
|
-
|
|
53634
|
-
|
|
53635
|
-
|
|
53636
|
-
|
|
53637
|
-
|
|
53638
|
-
|
|
53639
|
-
|
|
53640
|
-
|
|
53641
|
-
|
|
53642
|
-
|
|
53643
|
-
|
|
53644
|
-
|
|
53645
|
-
|
|
53646
|
-
|
|
53647
|
-
|
|
53648
|
-
|
|
53649
|
-
|
|
53650
|
-
|
|
53651
|
-
|
|
53652
|
-
|
|
53653
|
-
|
|
53654
|
-
|
|
53655
|
-
|
|
53656
|
-
|
|
53657
|
-
|
|
53658
|
-
sumFuncCols.forEach((col) => {
|
|
53659
|
-
sumData[col.field || col.key] = col.isSum(this.rowDataFiltered, col);
|
|
53648
|
+
sumCols.forEach((d) => sumData[d.field || d.key] = 0);
|
|
53649
|
+
sumData = _.reduce(
|
|
53650
|
+
this.rowDataFiltered,
|
|
53651
|
+
(s, d, idx) => {
|
|
53652
|
+
sumCols.forEach((dd) => {
|
|
53653
|
+
if (isString(dd.isSum))
|
|
53654
|
+
return;
|
|
53655
|
+
let field = dd.field || dd.key;
|
|
53656
|
+
let rowMergeInfo = this.tableRowSpanMergeIndexMap[field];
|
|
53657
|
+
let mergedRows = [];
|
|
53658
|
+
_.forEach(rowMergeInfo, (v, k) => {
|
|
53659
|
+
let rows2 = _.range(k, parseInt(k) + v);
|
|
53660
|
+
mergedRows.push(...rows2.slice(1));
|
|
53661
|
+
});
|
|
53662
|
+
if (!mergedRows.includes(idx)) {
|
|
53663
|
+
sumData[field] = _.round(
|
|
53664
|
+
sumData[field] + (!d[field] || isNaN(d[field]) ? 0 : parseFloat(d[field])),
|
|
53665
|
+
6
|
|
53666
|
+
);
|
|
53667
|
+
}
|
|
53668
|
+
});
|
|
53669
|
+
return s;
|
|
53670
|
+
},
|
|
53671
|
+
sumData
|
|
53672
|
+
);
|
|
53673
|
+
_.forEach(sumFuncCols, (d) => {
|
|
53674
|
+
sumData[d.field || d.key] = d.isSum(this.rowDataFiltered, d);
|
|
53660
53675
|
});
|
|
53661
53676
|
let sumRows = [sumData];
|
|
53677
|
+
let calcRules = {};
|
|
53678
|
+
_.forEach(sumCalcRuleMap, (v, k) => {
|
|
53679
|
+
_.merge(calcRules, v);
|
|
53680
|
+
});
|
|
53662
53681
|
let rules = [];
|
|
53663
|
-
|
|
53664
|
-
|
|
53682
|
+
_.forEach(calcRules, (v, k) => {
|
|
53683
|
+
var _a2;
|
|
53684
|
+
let column = _.find(sumCalcCols, (d) => {
|
|
53685
|
+
return d.field == k || d.key == k;
|
|
53686
|
+
});
|
|
53665
53687
|
rules.push({
|
|
53666
|
-
rltKey:
|
|
53667
|
-
ast:
|
|
53668
|
-
precision: ((
|
|
53688
|
+
rltKey: k,
|
|
53689
|
+
ast: v,
|
|
53690
|
+
precision: ((_a2 = column == null ? void 0 : column.cellRendererParams) == null ? void 0 : _a2.scale) || 2,
|
|
53669
53691
|
errRtn: 0
|
|
53670
53692
|
});
|
|
53671
|
-
}
|
|
53693
|
+
});
|
|
53672
53694
|
let options = { calcRules: rules };
|
|
53673
53695
|
calcDatas(sumRows, options);
|
|
53674
53696
|
this.topRows = this.pinnedTopRowDataWithUnit ? _.concat(this.pinnedTopRowDataWithUnit, sumRows) : sumRows;
|
|
@@ -65952,9 +65974,6 @@ var uploadImg = /* @__PURE__ */ function() {
|
|
|
65952
65974
|
return __component__$2.exports;
|
|
65953
65975
|
}();
|
|
65954
65976
|
const CONTEXT$1 = `${config.imgServerContext}/system/auths`;
|
|
65955
|
-
function getAuthDetaileTypeApi$1(params) {
|
|
65956
|
-
return axios.get(`${CONTEXT$1}/getAuthDetaileType`, { params });
|
|
65957
|
-
}
|
|
65958
65977
|
function getRoleListApi(params) {
|
|
65959
65978
|
return axios.get(`${CONTEXT$1}/getRoleList`, { params });
|
|
65960
65979
|
}
|
|
@@ -65982,11 +66001,9 @@ var render$1 = function() {
|
|
|
65982
66001
|
var _c = _vm._self._c || _h;
|
|
65983
66002
|
return _c("IndPageView", [_c("Row", { staticClass: "row-contain", attrs: { "gutter": 16 } }, [_c("Col", { attrs: { "span": "8" } }, [_c("IndTable", { ref: "table", attrs: { "disablePage": "", "columns": _vm.tableColumns, "dataApi": _vm.dataApi, "search-params": _vm.searchParams, "rowKey": "roleId", "auto-refresh": "" }, on: { "on-data-load": _vm.tableDataLoad, "on-select-change": _vm.tableSelectChange }, scopedSlots: _vm._u([{ key: "buttons", fn: function() {
|
|
65984
66003
|
return [_c("IndButton", { attrs: { "bizType": "table" }, on: { "click": _vm.addRole } }, [_vm._v("\u65B0\u589E")])];
|
|
65985
|
-
}, proxy: true }]) })], 1), _c("Col", { attrs: { "span": "16" } }, [_c("IndLoadingPanel", { staticClass: "ind-flex-column", attrs: { "loading": _vm.userAuthLoading } }, [_c("div", { staticClass: "ind-flex-no-shrink important-tip" }, [_c("Icon", { attrs: { "type": "md-information-circle" } }), _c("span", { attrs: { "name": "importanttip" } }, [_vm._v("\u5F53\u524D\u9009\u4E2D\u89D2\u8272\uFF1A"), _c("span", { staticClass: "ind-blue" }, [_vm._v(_vm._s(_vm.selectedRole ? _vm.selectedRole.roleName : ""))])])], 1), _c("div", { staticClass: "ind-flex-grow content" }, [_c("Row", { attrs: { "gutter": 16 } }, [_c("Col", { attrs: { "span": "12" } }, [!_vm.userAuthLoading ? _c("IndTree", { ref: "userTree", attrs: { "data": _vm.userTreeData, "default-value": _vm.defaultUserId, "multiple": "", "show-checkbox": "", "defaultExpandLevel": 1, "isShowHeader": true, "treeName": "\u7CFB\u7EDF\u7528\u6237\uFF1A[\u90E8\u95E8(\u5DF2\u8BBE\u4EBA\u6570/\u603B\u4EBA\u6570)] \u3001[\u7528\u6237(\u89D2\u82721,\u89D2\u82722...)]" } }) : _vm._e()], 1), _c("Col", { attrs: { "span": "12" } }, [_c("IndLoadingPanel", { staticClass: "ind-flex-column", attrs: { "loading": _vm.authTreeLoading } }, [_c("div", { staticClass: "auth-type-select-container" }, [_c("Row", [_c("Col", [_c("
|
|
65986
|
-
_vm.
|
|
65987
|
-
}, expression: "
|
|
65988
|
-
return _c("IndOption", { key: type.value, attrs: { "value": type.value } }, [_vm._v(" " + _vm._s(type.label) + " ")]);
|
|
65989
|
-
}), 1)], 1)])], 1)], 1), !_vm.userAuthLoading ? _c("IndTree", { ref: "authTree", attrs: { "data": _vm.authTreeData, "default-value": _vm.defaultAuthId, "multiple": "", "show-checkbox": "", "expandAll": "", "isShowHeader": false } }) : _vm._e()], 1)], 1)], 1)], 1), _c("div", { staticClass: "ind-flex-no-shrink function-wrapper" }, [_c("IndButtonGroup", { attrs: { "center": "" } }, [_c("IndButton", { attrs: { "bizType": "save", "loading": _vm.saveLoading }, on: { "click": _vm.saveUsersAuths } })], 1)], 1)])], 1)], 1), _c("IndModal", { attrs: { "lazyRender": false, "title": "\u89D2\u8272\u7F16\u8F91", "saving": _vm.saveRoleLoading }, on: { "on-ok": _vm.saveRole }, model: { value: _vm.showEditRole, callback: function($$v) {
|
|
66004
|
+
}, proxy: true }]) })], 1), _c("Col", { attrs: { "span": "16" } }, [_c("IndLoadingPanel", { staticClass: "ind-flex-column", attrs: { "loading": _vm.userAuthLoading } }, [_c("div", { staticClass: "ind-flex-no-shrink important-tip" }, [_c("Icon", { attrs: { "type": "md-information-circle" } }), _c("span", { attrs: { "name": "importanttip" } }, [_vm._v("\u5F53\u524D\u9009\u4E2D\u89D2\u8272\uFF1A"), _c("span", { staticClass: "ind-blue" }, [_vm._v(_vm._s(_vm.selectedRole ? _vm.selectedRole.roleName : ""))])])], 1), _c("div", { staticClass: "ind-flex-grow content" }, [_c("Row", { attrs: { "gutter": 16 } }, [_c("Col", { attrs: { "span": "12" } }, [!_vm.userAuthLoading ? _c("IndTree", { ref: "userTree", attrs: { "data": _vm.userTreeData, "default-value": _vm.defaultUserId, "multiple": "", "show-checkbox": "", "defaultExpandLevel": 1, "isShowHeader": true, "treeName": "\u7CFB\u7EDF\u7528\u6237\uFF1A[\u90E8\u95E8(\u5DF2\u8BBE\u4EBA\u6570/\u603B\u4EBA\u6570)] \u3001[\u7528\u6237(\u89D2\u82721,\u89D2\u82722...)]" } }) : _vm._e()], 1), _c("Col", { attrs: { "span": "12" } }, [_c("IndLoadingPanel", { staticClass: "ind-flex-column", attrs: { "loading": _vm.authTreeLoading } }, [_c("div", { staticClass: "auth-type-select-container" }, [_c("Row", [_c("Col", [_c("IndFormWrap", { ref: "authDetaileTypeForm", attrs: { "fieldList": _vm.authDetaileTypeField, "gridColumns": 1 }, model: { value: _vm.authDetaileTypeForm, callback: function($$v) {
|
|
66005
|
+
_vm.authDetaileTypeForm = $$v;
|
|
66006
|
+
}, expression: "authDetaileTypeForm" } })], 1)], 1)], 1), !_vm.userAuthLoading ? _c("IndTree", { ref: "authTree", attrs: { "data": _vm.authTreeData, "default-value": _vm.defaultAuthId, "multiple": "", "show-checkbox": "", "expandAll": "", "isShowHeader": false } }) : _vm._e()], 1)], 1)], 1)], 1), _c("div", { staticClass: "ind-flex-no-shrink function-wrapper" }, [_c("IndButtonGroup", { attrs: { "center": "" } }, [_c("IndButton", { attrs: { "bizType": "save", "loading": _vm.saveLoading }, on: { "click": _vm.saveUsersAuths } })], 1)], 1)])], 1)], 1), _c("IndModal", { attrs: { "lazyRender": false, "title": "\u89D2\u8272\u7F16\u8F91", "saving": _vm.saveRoleLoading }, on: { "on-ok": _vm.saveRole }, model: { value: _vm.showEditRole, callback: function($$v) {
|
|
65990
66007
|
_vm.showEditRole = $$v;
|
|
65991
66008
|
}, expression: "showEditRole" } }, [_c("div", { staticClass: "ivu-biz-form-row" }, [_c("IndFormWrap", { ref: "basicForm", attrs: { "fieldList": _vm.formFields, "gridColumns": 1 }, model: { value: _vm.formData, callback: function($$v) {
|
|
65992
66009
|
_vm.formData = $$v;
|
|
@@ -66006,7 +66023,6 @@ const __vue2_script$1 = {
|
|
|
66006
66023
|
props: {
|
|
66007
66024
|
authModule: { type: String, required: true },
|
|
66008
66025
|
authType: { type: String, required: true },
|
|
66009
|
-
authDetaileType: { type: String, required: true },
|
|
66010
66026
|
authTreeApiParams: { type: Object, required: true },
|
|
66011
66027
|
authTreeApi: { type: Function, required: true }
|
|
66012
66028
|
},
|
|
@@ -66134,44 +66150,49 @@ const __vue2_script$1 = {
|
|
|
66134
66150
|
saveRoleLoading: false,
|
|
66135
66151
|
tableDataSize: 1,
|
|
66136
66152
|
saveLoading: false,
|
|
66137
|
-
|
|
66138
|
-
|
|
66139
|
-
|
|
66153
|
+
authDetaileTypeForm: {
|
|
66154
|
+
authDetaileTypeParam: []
|
|
66155
|
+
},
|
|
66156
|
+
authTreeLoading: false,
|
|
66157
|
+
authDetaileTypeField: [
|
|
66158
|
+
{
|
|
66159
|
+
formKey: "authDetaileTypeParam",
|
|
66160
|
+
title: "\u6743\u9650\u7C7B\u578B\uFF1A",
|
|
66161
|
+
type: "treeselect",
|
|
66162
|
+
props: {
|
|
66163
|
+
dataApi: listComTreeApi,
|
|
66164
|
+
urlParams: {
|
|
66165
|
+
bizType: "40",
|
|
66166
|
+
dataPermitType: JSON.stringify({
|
|
66167
|
+
authModule: this.authModule,
|
|
66168
|
+
authType: this.authType
|
|
66169
|
+
})
|
|
66170
|
+
}
|
|
66171
|
+
}
|
|
66172
|
+
}
|
|
66173
|
+
]
|
|
66140
66174
|
};
|
|
66141
66175
|
},
|
|
66142
66176
|
watch: {
|
|
66143
|
-
authDetaileTypeParam
|
|
66144
|
-
|
|
66145
|
-
this.
|
|
66146
|
-
|
|
66177
|
+
"authDetaileTypeForm.authDetaileTypeParam": {
|
|
66178
|
+
handler: _.debounce(function(newVal) {
|
|
66179
|
+
if (this.selectedRole && newVal.length > 0) {
|
|
66180
|
+
this.reloadAuthTree();
|
|
66181
|
+
}
|
|
66182
|
+
}, 300),
|
|
66183
|
+
deep: true,
|
|
66184
|
+
immediate: true
|
|
66147
66185
|
}
|
|
66148
66186
|
},
|
|
66149
|
-
created() {
|
|
66150
|
-
this.initTypeData();
|
|
66151
|
-
},
|
|
66152
66187
|
methods: {
|
|
66153
|
-
async initTypeData() {
|
|
66154
|
-
try {
|
|
66155
|
-
const params = {
|
|
66156
|
-
authModule: this.authModule,
|
|
66157
|
-
authType: this.authType
|
|
66158
|
-
};
|
|
66159
|
-
const response = await getAuthDetaileTypeApi$1(params);
|
|
66160
|
-
const datas = response.data;
|
|
66161
|
-
this.authDetaileTypes = datas.map((item2) => ({
|
|
66162
|
-
label: item2.authDetaileTypeName,
|
|
66163
|
-
value: item2.authDetaileType
|
|
66164
|
-
}));
|
|
66165
|
-
} catch (error) {
|
|
66166
|
-
console.log("\u83B7\u53D6\u7EC6\u5206\u7C7B\u578Berror: " + error);
|
|
66167
|
-
}
|
|
66168
|
-
},
|
|
66169
66188
|
query() {
|
|
66170
66189
|
this.tableLoading = true;
|
|
66190
|
+
const authDetaileTypeParam = this.authDetaileTypeForm.authDetaileTypeParam;
|
|
66191
|
+
const authDetaileType = authDetaileTypeParam && authDetaileTypeParam.length > 0 && authDetaileTypeParam[0].id ? authDetaileTypeParam[0].id : "";
|
|
66171
66192
|
this.searchParams = {
|
|
66172
66193
|
authModule: this.authModule,
|
|
66173
66194
|
authType: this.authType,
|
|
66174
|
-
authDetaileType
|
|
66195
|
+
authDetaileType
|
|
66175
66196
|
};
|
|
66176
66197
|
},
|
|
66177
66198
|
async tableDataLoad(data) {
|
|
@@ -66180,9 +66201,9 @@ const __vue2_script$1 = {
|
|
|
66180
66201
|
await this.$nextTick();
|
|
66181
66202
|
},
|
|
66182
66203
|
tableSelectChange: _.debounce(function(selectedRows) {
|
|
66183
|
-
this.authDetaileTypeParam = "1";
|
|
66184
66204
|
if (selectedRows.length) {
|
|
66185
66205
|
this.selectedRole = selectedRows[0];
|
|
66206
|
+
this.authDetaileTypeForm.authDetaileTypeParam = [];
|
|
66186
66207
|
this.getUserAuthTreeData(true);
|
|
66187
66208
|
} else {
|
|
66188
66209
|
this.selectedRole = null;
|
|
@@ -66239,10 +66260,12 @@ const __vue2_script$1 = {
|
|
|
66239
66260
|
},
|
|
66240
66261
|
async listUserRolesApi() {
|
|
66241
66262
|
try {
|
|
66263
|
+
const authDetaileTypeParam = this.authDetaileTypeForm.authDetaileTypeParam;
|
|
66264
|
+
const authDetaileType = authDetaileTypeParam && authDetaileTypeParam.length > 0 && authDetaileTypeParam[0].id ? authDetaileTypeParam[0].id : "";
|
|
66242
66265
|
const params = {
|
|
66243
66266
|
authModule: this.authModule,
|
|
66244
66267
|
authType: this.authType,
|
|
66245
|
-
authDetaileType
|
|
66268
|
+
authDetaileType
|
|
66246
66269
|
};
|
|
66247
66270
|
const { data } = await listUserRolesApi(params);
|
|
66248
66271
|
return data;
|
|
@@ -66292,11 +66315,13 @@ const __vue2_script$1 = {
|
|
|
66292
66315
|
},
|
|
66293
66316
|
async getRoleUsersAuths(roleId) {
|
|
66294
66317
|
try {
|
|
66318
|
+
const authDetaileTypeParam = this.authDetaileTypeForm.authDetaileTypeParam;
|
|
66319
|
+
const authDetaileType = authDetaileTypeParam && authDetaileTypeParam.length > 0 && authDetaileTypeParam[0].id ? authDetaileTypeParam[0].id : "";
|
|
66295
66320
|
const params = {
|
|
66296
66321
|
roleId,
|
|
66297
66322
|
authModule: this.authModule,
|
|
66298
66323
|
authType: this.authType,
|
|
66299
|
-
authDetaileType
|
|
66324
|
+
authDetaileType
|
|
66300
66325
|
};
|
|
66301
66326
|
const { data } = await detailAuthsUsersApi(params);
|
|
66302
66327
|
return data;
|
|
@@ -66347,6 +66372,10 @@ const __vue2_script$1 = {
|
|
|
66347
66372
|
}
|
|
66348
66373
|
},
|
|
66349
66374
|
async saveUsersAuths() {
|
|
66375
|
+
if (this.authDetaileTypeForm.authDetaileTypeParam.length == 0) {
|
|
66376
|
+
this.$Message.warning("\u8BF7\u9009\u62E9\u6743\u9650\u7C7B\u578B");
|
|
66377
|
+
return;
|
|
66378
|
+
}
|
|
66350
66379
|
const userTreeNodes = this.$refs.userTree.getCheckedNodes(true) || [];
|
|
66351
66380
|
const authTreeNodes = this.$refs.authTree.getCheckedNodes(true) || [];
|
|
66352
66381
|
const roleUsers = userTreeNodes.filter((item2) => {
|
|
@@ -66378,9 +66407,11 @@ const __vue2_script$1 = {
|
|
|
66378
66407
|
}
|
|
66379
66408
|
try {
|
|
66380
66409
|
this.saveLoading = true;
|
|
66410
|
+
const authDetaileTypeParam = this.authDetaileTypeForm.authDetaileTypeParam;
|
|
66411
|
+
const authDetaileType = authDetaileTypeParam && authDetaileTypeParam.length > 0 && authDetaileTypeParam[0].id ? authDetaileTypeParam[0].id : "";
|
|
66381
66412
|
await saveAuthsUsersApi({
|
|
66382
66413
|
...this.selectedRole,
|
|
66383
|
-
authDetaileType
|
|
66414
|
+
authDetaileType,
|
|
66384
66415
|
roleUsers: roleUsers.length ? roleUsers.map((item2) => {
|
|
66385
66416
|
return {
|
|
66386
66417
|
authModule: this.authModule,
|
|
@@ -66393,7 +66424,7 @@ const __vue2_script$1 = {
|
|
|
66393
66424
|
return {
|
|
66394
66425
|
authModule: this.authModule,
|
|
66395
66426
|
authType: this.authType,
|
|
66396
|
-
authDetaileType
|
|
66427
|
+
authDetaileType,
|
|
66397
66428
|
roleId: this.selectedRole.roleId,
|
|
66398
66429
|
authId: item2.id
|
|
66399
66430
|
};
|
|
@@ -66440,9 +66471,6 @@ var roleAuth = /* @__PURE__ */ function() {
|
|
|
66440
66471
|
return __component__$1.exports;
|
|
66441
66472
|
}();
|
|
66442
66473
|
const CONTEXT = `${config.imgServerContext}/system/auths`;
|
|
66443
|
-
function getAuthDetaileTypeApi(params) {
|
|
66444
|
-
return axios.get(`${CONTEXT}/getAuthDetaileType`, { params });
|
|
66445
|
-
}
|
|
66446
66474
|
function getUserAuthsApi(params) {
|
|
66447
66475
|
return axios.get(`${CONTEXT}/getUserAuths`, { params });
|
|
66448
66476
|
}
|
|
@@ -66453,11 +66481,9 @@ var render = function() {
|
|
|
66453
66481
|
var _vm = this;
|
|
66454
66482
|
var _h = _vm.$createElement;
|
|
66455
66483
|
var _c = _vm._self._c || _h;
|
|
66456
|
-
return _c("IndPageView", [_c("Row", { staticClass: "row-contain", attrs: { "gutter": 16 } }, [_c("Col", { attrs: { "span": "12" } }, [_c("IndTree", { ref: "userTree", attrs: { "dataApi": _vm.userTreeApi, "url-params": _vm.userTreeParams, "default-value": _vm.defaultUserId, "isShowHeader": true, "selectLeafOnly": true, "defaultExpandLevel": 1, "treeName": "\u7CFB\u7EDF\u7528\u6237" }, on: { "on-select-change": _vm.onSelectUserChange } })], 1), _c("Col", { attrs: { "span": "12" } }, [_c("IndLoadingPanel", { staticClass: "ind-flex-column", attrs: { "loading": _vm.userAuthLoading } }, [_c("div", { staticClass: "auth-type-select-container" }, [_c("Row", [_c("Col", [_c("
|
|
66457
|
-
_vm.
|
|
66458
|
-
}, expression: "
|
|
66459
|
-
return _c("IndOption", { key: type.value, attrs: { "value": type.value } }, [_vm._v(_vm._s(type.label) + " ")]);
|
|
66460
|
-
}), 1)], 1)])], 1)], 1), _c("div", { staticClass: "ind-flex-grow" }, [_c("IndTree", { ref: "authTree", attrs: { "data": _vm.authTreeData, "default-value": _vm.defaultAuthId, "multiple": "", "show-checkbox": "", "expandAll": "", "isShowHeader": false } })], 1), _c("div", { staticClass: "ind-flex-no-shrink function-wrapper" }, [_c("IndButtonGroup", { attrs: { "center": "" } }, [_c("IndButton", { attrs: { "bizType": "save", "disabled": _vm.btnDisAbled, "loading": _vm.saveLoading }, on: { "click": _vm.saveUserAuths } })], 1)], 1)])], 1)], 1)], 1);
|
|
66484
|
+
return _c("IndPageView", [_c("Row", { staticClass: "row-contain", attrs: { "gutter": 16 } }, [_c("Col", { attrs: { "span": "12" } }, [_c("IndTree", { ref: "userTree", attrs: { "dataApi": _vm.userTreeApi, "url-params": _vm.userTreeParams, "default-value": _vm.defaultUserId, "isShowHeader": true, "selectLeafOnly": true, "defaultExpandLevel": 1, "treeName": "\u7CFB\u7EDF\u7528\u6237" }, on: { "on-select-change": _vm.onSelectUserChange } })], 1), _c("Col", { attrs: { "span": "12" } }, [_c("IndLoadingPanel", { staticClass: "ind-flex-column", attrs: { "loading": _vm.userAuthLoading } }, [_c("div", { staticClass: "auth-type-select-container" }, [_c("Row", [_c("Col", [_c("IndFormWrap", { ref: "authDetaileTypeForm", attrs: { "fieldList": _vm.authDetaileTypeField, "gridColumns": 1 }, model: { value: _vm.authDetaileTypeForm, callback: function($$v) {
|
|
66485
|
+
_vm.authDetaileTypeForm = $$v;
|
|
66486
|
+
}, expression: "authDetaileTypeForm" } })], 1)], 1)], 1), _c("div", { staticClass: "ind-flex-grow" }, [_c("IndTree", { ref: "authTree", attrs: { "data": _vm.authTreeData, "default-value": _vm.defaultAuthId, "multiple": "", "show-checkbox": "", "expandAll": "", "isShowHeader": false } })], 1), _c("div", { staticClass: "ind-flex-no-shrink function-wrapper" }, [_c("IndButtonGroup", { attrs: { "center": "" } }, [_c("IndButton", { attrs: { "bizType": "save", "disabled": _vm.btnDisAbled, "loading": _vm.saveLoading }, on: { "click": _vm.saveUserAuths } })], 1)], 1)])], 1)], 1)], 1);
|
|
66461
66487
|
};
|
|
66462
66488
|
var staticRenderFns = [];
|
|
66463
66489
|
const __vue2_script = {
|
|
@@ -66465,7 +66491,6 @@ const __vue2_script = {
|
|
|
66465
66491
|
props: {
|
|
66466
66492
|
authModule: { type: String, required: true },
|
|
66467
66493
|
authType: { type: String, required: true },
|
|
66468
|
-
authDetaileType: { type: String, required: true },
|
|
66469
66494
|
authTreeApiParams: { type: Object, required: true },
|
|
66470
66495
|
authTreeApi: { type: Function, required: true }
|
|
66471
66496
|
},
|
|
@@ -66479,8 +66504,26 @@ const __vue2_script = {
|
|
|
66479
66504
|
authTreeData: [],
|
|
66480
66505
|
defaultAuthId: [],
|
|
66481
66506
|
saveLoading: false,
|
|
66482
|
-
|
|
66483
|
-
|
|
66507
|
+
authDetaileTypeForm: {
|
|
66508
|
+
authDetaileTypeParam: []
|
|
66509
|
+
},
|
|
66510
|
+
authDetaileTypeField: [
|
|
66511
|
+
{
|
|
66512
|
+
formKey: "authDetaileTypeParam",
|
|
66513
|
+
title: "\u6743\u9650\u7C7B\u578B\uFF1A",
|
|
66514
|
+
type: "treeselect",
|
|
66515
|
+
props: {
|
|
66516
|
+
dataApi: listComTreeApi,
|
|
66517
|
+
urlParams: {
|
|
66518
|
+
bizType: "40",
|
|
66519
|
+
dataPermitType: JSON.stringify({
|
|
66520
|
+
authModule: this.authModule,
|
|
66521
|
+
authType: this.authType
|
|
66522
|
+
})
|
|
66523
|
+
}
|
|
66524
|
+
}
|
|
66525
|
+
}
|
|
66526
|
+
]
|
|
66484
66527
|
};
|
|
66485
66528
|
},
|
|
66486
66529
|
activated() {
|
|
@@ -66494,10 +66537,14 @@ const __vue2_script = {
|
|
|
66494
66537
|
this.defaultAuthId = [];
|
|
66495
66538
|
},
|
|
66496
66539
|
watch: {
|
|
66497
|
-
authDetaileTypeParam
|
|
66498
|
-
|
|
66499
|
-
this.
|
|
66500
|
-
|
|
66540
|
+
"authDetaileTypeForm.authDetaileTypeParam": {
|
|
66541
|
+
handler: _.debounce(function(newVal) {
|
|
66542
|
+
if (this.selectUser && newVal.length > 0) {
|
|
66543
|
+
this.reloadAuthTree();
|
|
66544
|
+
}
|
|
66545
|
+
}, 300),
|
|
66546
|
+
deep: true,
|
|
66547
|
+
immediate: true
|
|
66501
66548
|
}
|
|
66502
66549
|
},
|
|
66503
66550
|
computed: {
|
|
@@ -66505,30 +66552,12 @@ const __vue2_script = {
|
|
|
66505
66552
|
return !this.selectUser;
|
|
66506
66553
|
}
|
|
66507
66554
|
},
|
|
66508
|
-
created() {
|
|
66509
|
-
this.initTypeData();
|
|
66510
|
-
},
|
|
66511
66555
|
methods: {
|
|
66512
|
-
async initTypeData() {
|
|
66513
|
-
try {
|
|
66514
|
-
const params = {
|
|
66515
|
-
authModule: this.authModule,
|
|
66516
|
-
authType: this.authType
|
|
66517
|
-
};
|
|
66518
|
-
const response = await getAuthDetaileTypeApi(params);
|
|
66519
|
-
const datas = response.data;
|
|
66520
|
-
this.authDetaileTypes = datas.map((item2) => ({
|
|
66521
|
-
label: item2.authDetaileTypeName,
|
|
66522
|
-
value: item2.authDetaileType
|
|
66523
|
-
}));
|
|
66524
|
-
} catch (error) {
|
|
66525
|
-
console.log("\u83B7\u53D6\u7EC6\u5206\u7C7B\u578Berror: " + error);
|
|
66526
|
-
}
|
|
66527
|
-
},
|
|
66528
66556
|
async onSelectUserChange(selectNode) {
|
|
66529
66557
|
this.userAuthLoading = true;
|
|
66530
66558
|
if (selectNode.length) {
|
|
66531
66559
|
this.selectUser = selectNode[0];
|
|
66560
|
+
this.authDetaileTypeForm.authDetaileTypeParam = [];
|
|
66532
66561
|
this.authTreeData = await this.makeAuthTreeData(selectNode[0]);
|
|
66533
66562
|
} else {
|
|
66534
66563
|
this.selectUser = null;
|
|
@@ -66560,11 +66589,13 @@ const __vue2_script = {
|
|
|
66560
66589
|
},
|
|
66561
66590
|
async getUserAuthsApi(selectUser) {
|
|
66562
66591
|
try {
|
|
66592
|
+
const authDetaileTypeParam = this.authDetaileTypeForm.authDetaileTypeParam;
|
|
66593
|
+
const authDetaileType = authDetaileTypeParam && authDetaileTypeParam.length > 0 && authDetaileTypeParam[0].id ? authDetaileTypeParam[0].id : "";
|
|
66563
66594
|
const params = {
|
|
66564
66595
|
userId: selectUser.id,
|
|
66565
66596
|
authModule: this.authModule,
|
|
66566
66597
|
authType: this.authType,
|
|
66567
|
-
authDetaileType
|
|
66598
|
+
authDetaileType
|
|
66568
66599
|
};
|
|
66569
66600
|
const { data } = await getUserAuthsApi(params);
|
|
66570
66601
|
return data;
|
|
@@ -66587,22 +66618,28 @@ const __vue2_script = {
|
|
|
66587
66618
|
return authTreeData;
|
|
66588
66619
|
},
|
|
66589
66620
|
async saveUserAuths() {
|
|
66621
|
+
if (this.authDetaileTypeForm.authDetaileTypeParam.length == 0) {
|
|
66622
|
+
this.$Message.warning("\u8BF7\u9009\u62E9\u6743\u9650\u7C7B\u578B");
|
|
66623
|
+
return;
|
|
66624
|
+
}
|
|
66590
66625
|
const authTreeNodes = this.$refs.authTree.getCheckedNodes(true) || [];
|
|
66591
66626
|
const userAuths = authTreeNodes.filter((item2) => {
|
|
66592
66627
|
return !item2.disabled;
|
|
66593
66628
|
}) || [];
|
|
66629
|
+
const authDetaileTypeParam = this.authDetaileTypeForm.authDetaileTypeParam;
|
|
66630
|
+
const authDetaileType = authDetaileTypeParam && authDetaileTypeParam.length > 0 && authDetaileTypeParam[0].id ? authDetaileTypeParam[0].id : "";
|
|
66594
66631
|
try {
|
|
66595
66632
|
this.saveLoading = true;
|
|
66596
66633
|
await saveUserAuthsApi({
|
|
66597
66634
|
userId: this.selectUser.id,
|
|
66598
66635
|
authModule: this.authModule,
|
|
66599
66636
|
authType: this.authType,
|
|
66600
|
-
authDetaileType
|
|
66637
|
+
authDetaileType,
|
|
66601
66638
|
userAuths: userAuths.map((item2) => {
|
|
66602
66639
|
return {
|
|
66603
66640
|
authModule: this.authModule,
|
|
66604
66641
|
authType: this.authType,
|
|
66605
|
-
authDetaileType
|
|
66642
|
+
authDetaileType,
|
|
66606
66643
|
userId: this.selectUser.id,
|
|
66607
66644
|
authId: item2.id
|
|
66608
66645
|
};
|