agilebuilder-ui 1.1.37 → 1.1.38-tmp1
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/lib/{401-9314ce87.js → 401-d84fc7c6.js} +1 -1
- package/lib/{404-572d631d.js → 404-b47ec5c0.js} +1 -1
- package/lib/{iframe-page-87c9c0d0.js → iframe-page-21dddc9b.js} +1 -1
- package/lib/{index-79b98485.js → index-4de073b5.js} +9680 -9570
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +1 -1
- package/lib/super-ui.umd.cjs +76 -73
- package/lib/{tab-content-iframe-index-070ce653.js → tab-content-iframe-index-f3419de1.js} +1 -1
- package/lib/{tab-content-index-3b98efb4.js → tab-content-index-034f8326.js} +22 -22
- package/lib/{tache-subprocess-history-46442012.js → tache-subprocess-history-53fa49b9.js} +1 -1
- package/package.json +1 -1
- package/packages/super-grid/src/apis.js +4 -0
- package/packages/super-grid/src/components/grid-radio-input.vue +104 -0
- package/packages/super-grid/src/dynamic-input.vue +37 -4
- package/packages/super-grid/src/formValidatorUtil.js +7 -2
- package/packages/super-grid/src/search-form-item.vue +444 -460
- package/packages/super-grid/src/super-grid.vue +22 -3
- package/packages/super-grid/src/utils.js +16 -2
- package/packages/utils/value-set.js +25 -33
- package/src/api/sso-service.js +2 -1
- package/src/permission.js +2 -1
- package/src/store/modules/user.js +4 -1
- package/src/utils/common-util.js +1 -0
- package/src/utils/permissionAuth.js +7 -5
- package/vite.config.js +1 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { openBlock as r, createElementBlock as t, createCommentVNode as o } from "vue";
|
|
2
|
-
import { _ as s } from "./index-
|
|
2
|
+
import { _ as s } from "./index-4de073b5.js";
|
|
3
3
|
const u = ["src"], f = s({ data: () => ({ src: null }), watch: { $route(n, c) {
|
|
4
4
|
this.src = this.$route.query.src;
|
|
5
5
|
} }, mounted() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as f, c as _, g as x, b as P, s as h, m as M, M as O, i as I } from "./index-
|
|
2
|
-
import { resolveComponent as u, openBlock as
|
|
1
|
+
import { _ as f, c as _, g as x, b as P, s as h, m as M, M as O, i as I } from "./index-4de073b5.js";
|
|
2
|
+
import { resolveComponent as u, openBlock as l, createBlock as b, withCtx as g, createVNode as v, TransitionGroup as L, createElementBlock as p, Fragment as C, renderList as T, createElementVNode as m, toDisplayString as w, normalizeClass as S, createCommentVNode as y } from "vue";
|
|
3
3
|
const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ levelList: null }), computed: { levelListWithTitle() {
|
|
4
4
|
return this.levelList.filter((e) => e.meta.title !== void 0 && e.meta.title !== null);
|
|
5
5
|
} }, watch: { $route() {
|
|
@@ -8,7 +8,7 @@ const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ l
|
|
|
8
8
|
this.getBreadcrumb();
|
|
9
9
|
}, methods: { getBreadcrumb() {
|
|
10
10
|
const { params: e } = this.$route;
|
|
11
|
-
this.$route.matched;
|
|
11
|
+
console.log("this.$route.matched==", this.$route.matched);
|
|
12
12
|
let t = this.$route.matched.filter((a) => {
|
|
13
13
|
if (a.name) {
|
|
14
14
|
var r = _(a.path);
|
|
@@ -17,12 +17,12 @@ const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ l
|
|
|
17
17
|
});
|
|
18
18
|
if (t) {
|
|
19
19
|
let a;
|
|
20
|
-
const r = x(),
|
|
21
|
-
|
|
22
|
-
const s = P.get("selectMenu"),
|
|
23
|
-
let
|
|
24
|
-
if (
|
|
25
|
-
const i =
|
|
20
|
+
const r = x(), o = window.$vueApp.config.globalProperties.systemNameObj;
|
|
21
|
+
o && (a = o[r]), t = [{ path: "/", redirect: "noredirect", meta: { title: a } }].concat(t);
|
|
22
|
+
const s = P.get("selectMenu"), d = window.$vueApp.config.globalProperties._selectMenu;
|
|
23
|
+
let n;
|
|
24
|
+
if (d ? n = d : s && (n = s), n) {
|
|
25
|
+
const i = n.substring(0, n.indexOf("~~")), c = n.substring(n.indexOf("~~") + 2);
|
|
26
26
|
if (t && t.length > 0) {
|
|
27
27
|
const $ = t[t.length - 1];
|
|
28
28
|
this.isShouldConcatLastMenu(c, i, $) && t.push({ path: i, meta: { title: c } });
|
|
@@ -35,9 +35,9 @@ const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ l
|
|
|
35
35
|
return !(!this.isTitleNotEqual(e, a) || !this.isPathNotEqual(t, a));
|
|
36
36
|
}, isTitleNotEqual(e, t) {
|
|
37
37
|
return !(!e || !t.meta || e === t.meta.title || e === this.$t(t.meta.title));
|
|
38
|
-
}, isPathNotEqual: (e, t) => !(!e || !t.path || e === t.path) } }, [["render", function(e, t, a, r,
|
|
39
|
-
const
|
|
40
|
-
return
|
|
38
|
+
}, isPathNotEqual: (e, t) => !(!e || !t.path || e === t.path) } }, [["render", function(e, t, a, r, o, s) {
|
|
39
|
+
const d = u("el-breadcrumb-item"), n = u("el-breadcrumb");
|
|
40
|
+
return l(), b(n, { class: "app-breadcrumb", separator: ">" }, { default: g(() => [v(L, { name: "breadcrumb", tag: "span" }, { default: g(() => [(l(!0), p(C, null, T(s.levelListWithTitle, (i, c) => (l(), b(d, { key: i.path + "-" + c }, { default: g(() => [m("span", k, w(e.$t(i.meta.title)), 1)]), _: 2 }, 1024))), 128))]), _: 1 })]), _: 1 });
|
|
41
41
|
}], ["__scopeId", "data-v-768a430c"]]), { body: B } = document, E = { watch: { $route(e) {
|
|
42
42
|
this.device === "mobile" && this.sidebar.opened && h.dispatch("closeSidebar", { withoutAnimation: !1 });
|
|
43
43
|
} }, beforeMount() {
|
|
@@ -76,8 +76,8 @@ const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ l
|
|
|
76
76
|
if (e.routePath === "/iframe-page/page") {
|
|
77
77
|
let a, r = "";
|
|
78
78
|
if (e.routeQuery)
|
|
79
|
-
for (const
|
|
80
|
-
|
|
79
|
+
for (const o in e.routeQuery)
|
|
80
|
+
o === "src" ? a = e.routeQuery[o] : r += o + "=" + e.routeQuery[o] + "&";
|
|
81
81
|
a && (t = a), r && (t += "?" + r);
|
|
82
82
|
} else if (e.routePath.indexOf("http:") < 0 && e.routePath.indexOf("https:") < 0 && (t = "#"), t = e.routePath.indexOf("?") >= 0 ? t + e.routePath + "&" : t + e.routePath + "?", e.routeQuery)
|
|
83
83
|
for (const a in e.routeQuery)
|
|
@@ -87,16 +87,16 @@ const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ l
|
|
|
87
87
|
if (e && typeof e.data == "string" && e.data === "refreshTabContent")
|
|
88
88
|
window.location.reload();
|
|
89
89
|
else if (e && typeof e.data == "string" && e.data.indexOf("loginTimeout") >= 0)
|
|
90
|
-
e.data, window.parent.postMessage(e.data, "*");
|
|
90
|
+
console.log("tab-content-接收到登录超时的信息---event.data=", e.data), window.parent.postMessage(e.data, "*");
|
|
91
91
|
else if (e && typeof e.data == "string" && e.data === "return-to-system-list") {
|
|
92
92
|
this.$store.commit("clear_tabs");
|
|
93
93
|
let t = "_IS_APP_LIST";
|
|
94
94
|
const a = window.sessionStorage.getItem(t);
|
|
95
95
|
a !== void 0 && a === "true" ? this.$router.push({ path: "/mms/apps/list" }) : this.$router.push({ path: "/mms/systems/list" });
|
|
96
96
|
}
|
|
97
|
-
} } }, V = ["src"], Q = { key: 1, class: "default-page-tip" }, R = { class: "default-page-tip-msg" }, q = { class: "default-page-tip-item" }, z = { class: "default-page-tip-item" }, j = { class: "main-container" }, W = f({ name: "Layout", components: { Menubar: O, Breadcrumb: A, TabContent: f(N, [["render", function(e, t, a, r,
|
|
98
|
-
const
|
|
99
|
-
return e.openTab && e.openTab.length > 0 ? (
|
|
97
|
+
} } }, V = ["src"], Q = { key: 1, class: "default-page-tip" }, R = { class: "default-page-tip-msg" }, q = { class: "default-page-tip-item" }, z = { class: "default-page-tip-item" }, j = { class: "main-container" }, W = f({ name: "Layout", components: { Menubar: O, Breadcrumb: A, TabContent: f(N, [["render", function(e, t, a, r, o, s) {
|
|
98
|
+
const d = u("el-tab-pane"), n = u("el-tabs");
|
|
99
|
+
return e.openTab && e.openTab.length > 0 ? (l(), b(n, { key: 0, modelValue: s.activeIndex, "onUpdate:modelValue": t[0] || (t[0] = (i) => s.activeIndex = i), class: "nav-tab menu-tab-container", closable: "", onTabRemove: s.closeSelectedTag }, { default: g(() => [(l(!0), p(C, null, T(e.openTab, (i) => (l(), b(d, { key: i.code, label: i.name, name: i.code }, { default: g(() => [m("iframe", { ref_for: !0, ref: "tabMainContent", src: s.getFullPath(i), class: "tab-main-content", name: "tab-main-content", frameborder: "0" }, null, 8, V)]), _: 2 }, 1032, ["label", "name"]))), 128))]), _: 1 }, 8, ["modelValue", "onTabRemove"])) : (l(), p("div", Q, [m("div", R, [m("div", q, w(o.defaultPageTipCn), 1), m("div", z, w(o.defaultPageTipEn), 1)])]));
|
|
100
100
|
}], ["__scopeId", "data-v-a5252a92"]]) }, mixins: [E], data: () => ({ showMenuRoute: I(), systemCode: null }), computed: { sidebar() {
|
|
101
101
|
return this.$store.state.app.sidebar;
|
|
102
102
|
}, device() {
|
|
@@ -104,12 +104,12 @@ const k = { class: "no-redirect" }, A = f({ name: "Breadcrumb", data: () => ({ l
|
|
|
104
104
|
}, classObj() {
|
|
105
105
|
return { hideSidebar: !this.sidebar.opened, openSidebar: this.sidebar.opened, withoutAnimation: this.sidebar.withoutAnimation, mobile: this.device === "mobile" };
|
|
106
106
|
} }, created() {
|
|
107
|
-
this.systemCode = window.$vueApp.config.globalProperties.customSystem, this.systemCode;
|
|
107
|
+
this.systemCode = window.$vueApp.config.globalProperties.customSystem, console.log("新菜单组件-----systemCode====", this.systemCode);
|
|
108
108
|
}, methods: { handleClickOutside() {
|
|
109
109
|
this.$store.dispatch("closeSidebar", { withoutAnimation: !1 });
|
|
110
|
-
} } }, [["render", function(e, t, a, r,
|
|
111
|
-
const
|
|
112
|
-
return
|
|
110
|
+
} } }, [["render", function(e, t, a, r, o, s) {
|
|
111
|
+
const d = u("menubar"), n = u("breadcrumb"), i = u("tab-content");
|
|
112
|
+
return l(), p("div", { class: S([s.classObj, "app-wrapper"]) }, [s.device === "mobile" && s.sidebar.opened ? (l(), p("div", { key: 0, class: "drawer-bg", onClick: t[0] || (t[0] = (...c) => s.handleClickOutside && s.handleClickOutside(...c)) })) : y("", !0), v(d, { "system-code": o.systemCode, collapse: !0, class: "sidebar-container" }, null, 8, ["system-code"]), m("div", j, [o.showMenuRoute ? (l(), b(n, { key: 0 })) : y("", !0), v(i)])], 2);
|
|
113
113
|
}], ["__scopeId", "data-v-5c0a6bf6"]]);
|
|
114
114
|
export {
|
|
115
115
|
W as default
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { resolveComponent as t, openBlock as a, createElementBlock as s, createElementVNode as y, createVNode as l, withCtx as r, createTextVNode as n, toDisplayString as p, createCommentVNode as c, createBlock as h } from "vue";
|
|
2
|
-
import { _ as I } from "./index-
|
|
2
|
+
import { _ as I } from "./index-4de073b5.js";
|
|
3
3
|
const g = { style: { "padding-bottom": "10px" } }, k = { key: 0, class: "graphDiv" }, N = I({ name: "TacheSubprocessHistory", data: () => ({ type: "graph", workflowId: null }), created() {
|
|
4
4
|
const o = this.$route.query.workflowId;
|
|
5
5
|
o && (this.workflowId = parseInt(o));
|
package/package.json
CHANGED
|
@@ -1421,6 +1421,7 @@ const apis = {
|
|
|
1421
1421
|
if (!gridParams.options.customRules) {
|
|
1422
1422
|
gridParams.options.customRules = {}
|
|
1423
1423
|
}
|
|
1424
|
+
copyItem.beforeValidate = item.beforeValidate
|
|
1424
1425
|
// console.log('dynamicControlTableEdit----gridParams.options.customRules222-----', gridParams.options.customRules)
|
|
1425
1426
|
gridParams.options.customRules[prop] = copyItem
|
|
1426
1427
|
})
|
|
@@ -1456,6 +1457,9 @@ const apis = {
|
|
|
1456
1457
|
if (this.$refs && this.$refs.superGrid) {
|
|
1457
1458
|
this.$refs.superGrid.doLayout()
|
|
1458
1459
|
}
|
|
1460
|
+
},
|
|
1461
|
+
getCustomFunc(funcName) {
|
|
1462
|
+
window.$PageUtil.getCustomFunc(this.pageContext, funcName)
|
|
1459
1463
|
}
|
|
1460
1464
|
}
|
|
1461
1465
|
export default apis
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-radio-group
|
|
3
|
+
ref="item"
|
|
4
|
+
v-model="innerValue"
|
|
5
|
+
:disabled="disabled"
|
|
6
|
+
:title="getClassOptionTitle(innerValue)"
|
|
7
|
+
@blur="emits('cellEvent', 'blur', $event)"
|
|
8
|
+
@change="changeValue"
|
|
9
|
+
@clear="emits('cellEvent', 'clear', $event)"
|
|
10
|
+
@focus="emits('cellEvent', 'focus', $event)"
|
|
11
|
+
@input="emits('cellEvent', 'input', $event)"
|
|
12
|
+
@visible-change="emits('cellEvent', 'visible-change', $event)"
|
|
13
|
+
>
|
|
14
|
+
<el-radio v-for="item in options" :key="item.value" :value="item.value">
|
|
15
|
+
{{ item.label }}
|
|
16
|
+
</el-radio>
|
|
17
|
+
</el-radio-group>
|
|
18
|
+
</template>
|
|
19
|
+
<script lang="ts" setup>
|
|
20
|
+
import { onMounted, ref, defineProps, defineEmits } from 'vue'
|
|
21
|
+
const props = defineProps({
|
|
22
|
+
options: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default: () => []
|
|
25
|
+
},
|
|
26
|
+
valueSetOptions: {
|
|
27
|
+
type: Object,
|
|
28
|
+
default: false
|
|
29
|
+
},
|
|
30
|
+
disabled: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: false
|
|
33
|
+
},
|
|
34
|
+
modelValue: {
|
|
35
|
+
type: [String, Number, Boolean],
|
|
36
|
+
default: ''
|
|
37
|
+
},
|
|
38
|
+
prop: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: ''
|
|
41
|
+
},
|
|
42
|
+
entity: {
|
|
43
|
+
type: Object,
|
|
44
|
+
default: () => ({})
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
const emits = defineEmits(['update:modelValue', 'cellEvent', 'getClassOptionTitle'])
|
|
49
|
+
const innerValue = ref(props.modelValue)
|
|
50
|
+
|
|
51
|
+
const changeValue = (val: any) => {
|
|
52
|
+
innerValue.value = val
|
|
53
|
+
if (props.valueSetOptions && props.valueSetOptions.length > 0) {
|
|
54
|
+
// 如果有valueSetOptions,则根据valueSetOptions设置对应的值
|
|
55
|
+
const selectedOptions = getSelectedOptionItem(val, props.options)
|
|
56
|
+
if (selectedOptions) {
|
|
57
|
+
props.valueSetOptions.forEach((item: any) => {
|
|
58
|
+
if (item.valueField !== props.prop) {
|
|
59
|
+
props.entity[item.valueField] = selectedOptions[item.columnName]
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
emits('update:modelValue', val)
|
|
65
|
+
emits('cellEvent', 'change', val)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* 根据value获取options中value等于传递的value的选项
|
|
70
|
+
*/
|
|
71
|
+
function getSelectedOptionItem(value, options) {
|
|
72
|
+
if (!options) {
|
|
73
|
+
return []
|
|
74
|
+
}
|
|
75
|
+
return options.find((item) => {
|
|
76
|
+
return item.value === value
|
|
77
|
+
})
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function getClassOptionTitle(val) {
|
|
81
|
+
if (val !== null && val !== undefined && val !== '' && val.length > 0) {
|
|
82
|
+
let selectTittle = ''
|
|
83
|
+
if (typeof val === 'string') {
|
|
84
|
+
// 单选
|
|
85
|
+
props.options?.forEach((item: any) => {
|
|
86
|
+
if (item.value === val) {
|
|
87
|
+
selectTittle = item.label
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
} else {
|
|
91
|
+
// 多选
|
|
92
|
+
props.options?.forEach((item: any) => {
|
|
93
|
+
val.forEach((Vtem) => {
|
|
94
|
+
if (item.value === Vtem) {
|
|
95
|
+
selectTittle = selectTittle + item.label + ','
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
selectTittle = selectTittle.slice(0, selectTittle.length - 1)
|
|
100
|
+
}
|
|
101
|
+
return selectTittle
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
</script>
|
|
@@ -333,6 +333,17 @@
|
|
|
333
333
|
<!-- <custom-fma v-if="type==null ||type === ''" /> -->
|
|
334
334
|
<!-- v-model="newValue" -->
|
|
335
335
|
<!--必须有@input ,否则无法输入值-->
|
|
336
|
+
<GridRadioInput
|
|
337
|
+
v-else-if="type === 'radio'"
|
|
338
|
+
v-model="innerValue"
|
|
339
|
+
@update:modelValue="innerValue = $event"
|
|
340
|
+
:disabled="disabled"
|
|
341
|
+
:options="options"
|
|
342
|
+
:value-set-options="valueSetOptions"
|
|
343
|
+
:prop="column.prop"
|
|
344
|
+
:entity="row"
|
|
345
|
+
@cellEvent="cellEvent"
|
|
346
|
+
/>
|
|
336
347
|
<el-select
|
|
337
348
|
v-else-if="type === 'select' && !isDynamicDataSourceSource()"
|
|
338
349
|
ref="item"
|
|
@@ -526,7 +537,8 @@ import {
|
|
|
526
537
|
isDynamicDataSourceSource,
|
|
527
538
|
isEditOptionFunction,
|
|
528
539
|
otherFilesToStandard,
|
|
529
|
-
getControlConfig
|
|
540
|
+
getControlConfig,
|
|
541
|
+
rowBeforeValidate
|
|
530
542
|
} from './utils'
|
|
531
543
|
import dynamicSourceSelect from '../../dynamic-source-select/src/dynamic-source-select.vue'
|
|
532
544
|
import {
|
|
@@ -543,11 +555,13 @@ import eventBus from './eventBus'
|
|
|
543
555
|
import { isMobileBrowser, getAuthSource } from '../../../src/utils/common-util'
|
|
544
556
|
import { analysisScanValue, setScanAnalysisValue } from './scan-util.ts'
|
|
545
557
|
import customFormatter from './custom-formatter'
|
|
558
|
+
import GridRadioInput from './components/grid-radio-input.vue'
|
|
546
559
|
export default {
|
|
547
560
|
name: 'DynamicInput',
|
|
548
561
|
components: {
|
|
549
562
|
dynamicSourceSelect,
|
|
550
|
-
ViewImageDialog
|
|
563
|
+
ViewImageDialog,
|
|
564
|
+
GridRadioInput
|
|
551
565
|
},
|
|
552
566
|
props: {
|
|
553
567
|
value: {
|
|
@@ -620,7 +634,7 @@ export default {
|
|
|
620
634
|
if (defaultValue !== undefined && defaultValue !== null) {
|
|
621
635
|
innerValue = defaultValue
|
|
622
636
|
}
|
|
623
|
-
const disabled = isDisableEdit(this.column.prop, this.listCode, this.row)
|
|
637
|
+
const disabled = isDisableEdit(this.column.prop, this.listCode, this.row, this.rowIndex)
|
|
624
638
|
this.$emit('change-disabled', disabled)
|
|
625
639
|
const defaultAction = window.$vueApp.config.globalProperties.baseAPI + '/component/super-form/uploads'
|
|
626
640
|
if (!this.listCode) {
|
|
@@ -1318,6 +1332,12 @@ export default {
|
|
|
1318
1332
|
}
|
|
1319
1333
|
}
|
|
1320
1334
|
}
|
|
1335
|
+
this.callCustomEventWithParam('uploaded', {
|
|
1336
|
+
value: response,
|
|
1337
|
+
row: this.row,
|
|
1338
|
+
column: this.column,
|
|
1339
|
+
extendParams: this.extendParams
|
|
1340
|
+
})
|
|
1321
1341
|
}
|
|
1322
1342
|
this.annexUploadFlag = false
|
|
1323
1343
|
},
|
|
@@ -1835,6 +1855,12 @@ export default {
|
|
|
1835
1855
|
$emit(this, 'refresMainTableFields', map)
|
|
1836
1856
|
},
|
|
1837
1857
|
deleteSuccess(deleteFile) {
|
|
1858
|
+
this.callCustomEventWithParam('deleted', {
|
|
1859
|
+
value: deleteFile,
|
|
1860
|
+
row: this.row,
|
|
1861
|
+
column: this.column,
|
|
1862
|
+
extendParams: this.extendParams
|
|
1863
|
+
})
|
|
1838
1864
|
console.log('deleteSuccess', deleteFile, this.fileInfo)
|
|
1839
1865
|
},
|
|
1840
1866
|
// 时间格式判断是否是字符串类型,如果是字符串类型使用格式化的数据,如果是时间格式的显示时间搓
|
|
@@ -1978,6 +2004,14 @@ export default {
|
|
|
1978
2004
|
if (!columnRule) {
|
|
1979
2005
|
return
|
|
1980
2006
|
}
|
|
2007
|
+
let beforeValidateResult = true
|
|
2008
|
+
if (columnRule.beforeValidate) {
|
|
2009
|
+
const gridParams = store.get(this.listCode)
|
|
2010
|
+
beforeValidateResult = rowBeforeValidate(columnRule, gridParams, this.row, this.rowIndex)
|
|
2011
|
+
if (beforeValidateResult === false) {
|
|
2012
|
+
return
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
1981
2015
|
if (columnRule.disabled !== undefined) {
|
|
1982
2016
|
this.$emit('change-disabled', columnRule.disabled)
|
|
1983
2017
|
}
|
|
@@ -2020,7 +2054,6 @@ export default {
|
|
|
2020
2054
|
}
|
|
2021
2055
|
},
|
|
2022
2056
|
deptScopeLimit() {
|
|
2023
|
-
debugger
|
|
2024
2057
|
if (this.controlConfig && this.controlConfig.deptScope) {
|
|
2025
2058
|
// 表示有部门范围限制
|
|
2026
2059
|
if (this.controlConfig.deptScope == 'field' && this.controlConfig.deptScopeField) {
|
|
@@ -117,7 +117,12 @@ function setRules(rules, editField, listCode, customRules) {
|
|
|
117
117
|
item.pattern = new RegExp(item.pattern)
|
|
118
118
|
}
|
|
119
119
|
})
|
|
120
|
-
validations = validations.concat(columnCustomRules)
|
|
120
|
+
// validations = validations.concat(columnCustomRules)
|
|
121
|
+
if (columnCustomRules && columnCustomRules.length > 0) {
|
|
122
|
+
validations = columnCustomRules
|
|
123
|
+
} else {
|
|
124
|
+
validations = validations.concat(columnCustomRules)
|
|
125
|
+
}
|
|
121
126
|
if (prop.indexOf('.') > 0) {
|
|
122
127
|
setObjectPropRule(editField, rules, validations)
|
|
123
128
|
} else {
|
|
@@ -189,7 +194,7 @@ function setRuleDataType(dataType, rule) {
|
|
|
189
194
|
if (!rule.type) {
|
|
190
195
|
if (dataType === 'BOOLEAN') {
|
|
191
196
|
rule.type = 'boolean'
|
|
192
|
-
}
|
|
197
|
+
}
|
|
193
198
|
return rule
|
|
194
199
|
}
|
|
195
200
|
}
|