chain-saasui 1.0.9 → 1.0.10-alpha.0
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/components/css/button.scss +24 -0
- package/components/css/form.scss +7 -0
- package/components/css/group.scss +1 -2
- package/components/css/index.scss +2 -0
- package/components/css/pagetable.scss +8 -0
- package/components/css/space.scss +13 -0
- package/components/css/tablebuttons.scss +0 -3
- package/components/src/SButton/Button/index.vue +36 -0
- package/components/src/SButton/SButtonText/index.vue +47 -0
- package/components/src/{STableButtons → SButton/STableButtons}/index.vue +7 -3
- package/components/src/SButton/index.js +3 -0
- package/components/src/SPage/PageButton/index.vue +44 -0
- package/components/src/SPage/Pagetable.vue +25 -19
- package/components/src/SPage/index.js +2 -0
- package/components/src/SSpace/Space/index.vue +45 -0
- package/components/src/SSpace/SpaceItem/index.vue +11 -0
- package/components/src/SSpace/index.js +2 -0
- package/components/src/STable/STablecolumn.vue +4 -3
- package/components/src/STable/index.vue +13 -1
- package/components/src/index.js +8 -6
- package/lib/css/index.css +1 -1
- package/lib/saasui.common.js +1 -1
- package/package.json +1 -1
- /package/components/src/{STableButtons → SButton/STableButtons}/STableButtons.md +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.el-button.saas-button-text {
|
|
2
|
+
color: #0e1822;
|
|
3
|
+
padding-left: 8px;
|
|
4
|
+
padding-right: 8px;
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
outline: none;
|
|
8
|
+
background-color: transparent;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* 鼠标移入灰色背景 */
|
|
12
|
+
.el-button.saas-button-text:hover,
|
|
13
|
+
.el-button.saas-button-text:focus {
|
|
14
|
+
background-color: #f7f9fb;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.no-gap > .el-button.saas-button-text {
|
|
18
|
+
margin: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.saas-button.saas-button__icon {
|
|
22
|
+
padding-right: 8px;
|
|
23
|
+
padding-left: 8px;
|
|
24
|
+
}
|
package/components/css/form.scss
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<!-- TextElButton.vue -->
|
|
2
|
+
<template>
|
|
3
|
+
<el-button :class="['saas-button', getButtonType]" v-bind="$attrs" v-on="filterListeners" @click="handleClick" :type="buttonTypeComputed">
|
|
4
|
+
<slot />
|
|
5
|
+
</el-button>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
import { omit } from 'chain-lodash';
|
|
10
|
+
export default {
|
|
11
|
+
name: 'SButton',
|
|
12
|
+
props: {
|
|
13
|
+
type: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: 'default',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
computed: {
|
|
19
|
+
buttonTypeComputed() {
|
|
20
|
+
return this.type === 'icon' ? 'default' : this.type;
|
|
21
|
+
},
|
|
22
|
+
getButtonType() {
|
|
23
|
+
return this.type ? `saas-button__${this.type}` : '';
|
|
24
|
+
},
|
|
25
|
+
filterListeners() {
|
|
26
|
+
return omit(this.$listeners, ['click']);
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
methods: {
|
|
30
|
+
handleClick(e) {
|
|
31
|
+
e.currentTarget.blur();
|
|
32
|
+
this.$emit('click', e);
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
</script>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<!-- TextElButton.vue -->
|
|
2
|
+
<template>
|
|
3
|
+
<!-- 使用 inheritAttrs 的默认行为把所有属性透传给 el-button -->
|
|
4
|
+
<el-button v-bind="$attrs" v-on="filterListeners" @click="handleClick" :type="buttonTypeComputed" class="saas-button-text">
|
|
5
|
+
<slot />
|
|
6
|
+
</el-button>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
import { omit } from 'chain-lodash';
|
|
11
|
+
export default {
|
|
12
|
+
name: 'SButtonText',
|
|
13
|
+
props: {
|
|
14
|
+
path: String,
|
|
15
|
+
query: Object,
|
|
16
|
+
type: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: 'text', // 用 element 的 text 类型,样式再覆盖颜色/背景
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
computed: {
|
|
22
|
+
buttonTypeComputed() {
|
|
23
|
+
return this.type === 'link' ? 'text' : this.type;
|
|
24
|
+
},
|
|
25
|
+
filterListeners() {
|
|
26
|
+
return omit(this.$listeners, ['click']);
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
methods: {
|
|
30
|
+
handleClick(e) {
|
|
31
|
+
e.currentTarget.blur();
|
|
32
|
+
if (this.type === 'link' && this.path) {
|
|
33
|
+
this.push();
|
|
34
|
+
} else {
|
|
35
|
+
this.$emit('click', e);
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
push() {
|
|
39
|
+
let pathInfo = this.$router.resolve({
|
|
40
|
+
path: this.path,
|
|
41
|
+
query: this.query,
|
|
42
|
+
});
|
|
43
|
+
window.open(pathInfo.href, '_blank');
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
</script>
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
<div class="saas-table-buttons">
|
|
3
3
|
<template v-for="(btn, index) in buttonList">
|
|
4
4
|
<el-tooltip :disabled="!btn.tip" placement="top" :content="btn.tip" :key="index">
|
|
5
|
-
<
|
|
5
|
+
<s-button v-bind="finalAttrs(btn.attrs)" @click="handelClick(btn.action)">{{ btn.label }}</s-button>
|
|
6
6
|
</el-tooltip>
|
|
7
7
|
</template>
|
|
8
8
|
<el-dropdown v-if="dropdownList.length" @command="handleCommand">
|
|
9
|
-
<
|
|
9
|
+
<s-button v-bind="btnProps">
|
|
10
10
|
<i v-if="moreType == 'more'" class="smart-More"></i>
|
|
11
11
|
<template v-else-if="moreType == 'text'">
|
|
12
12
|
{{ text }}
|
|
13
13
|
<i class="el-icon-arrow-down"></i>
|
|
14
14
|
</template>
|
|
15
|
-
</
|
|
15
|
+
</s-button>
|
|
16
16
|
<el-dropdown-menu slot="dropdown">
|
|
17
17
|
<el-dropdown-item v-for="(drop, index) in dropdownList" :key="index" v-bind="finalAttrs(drop.attrs)" :command="drop.action">
|
|
18
18
|
<el-tooltip :disabled="!drop.tip" placement="top" :content="drop.tip">
|
|
@@ -26,8 +26,12 @@
|
|
|
26
26
|
|
|
27
27
|
<script>
|
|
28
28
|
import { isEmpty } from 'chain-lodash';
|
|
29
|
+
import SButton from '../Button';
|
|
29
30
|
export default {
|
|
30
31
|
name: 'STableButtons',
|
|
32
|
+
components: {
|
|
33
|
+
SButton,
|
|
34
|
+
},
|
|
31
35
|
props: {
|
|
32
36
|
list: {
|
|
33
37
|
type: Array,
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
export default {
|
|
3
|
+
name: 'SPageButton',
|
|
4
|
+
props: {
|
|
5
|
+
gap: {
|
|
6
|
+
type: [Number, String],
|
|
7
|
+
default: 8,
|
|
8
|
+
},
|
|
9
|
+
direction: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: 'horizontal', // horizontal | vertical
|
|
12
|
+
validator: val => ['horizontal', 'vertical'].includes(val),
|
|
13
|
+
},
|
|
14
|
+
align: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: 'center', // flex 对齐方式
|
|
17
|
+
},
|
|
18
|
+
wrap: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: false,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
computed: {
|
|
24
|
+
directionClass() {
|
|
25
|
+
return this.direction === 'horizontal' ? 'saas-horizontal' : 'saas-vertical';
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
render(h) {
|
|
29
|
+
const children = (this.$slots.default || []).filter(vnode => vnode.tag);
|
|
30
|
+
const style = {
|
|
31
|
+
gap: typeof this.gap === 'number' ? this.gap + 'px' : this.gap,
|
|
32
|
+
alignItems: this.align,
|
|
33
|
+
};
|
|
34
|
+
return h(
|
|
35
|
+
'div',
|
|
36
|
+
{ class: ['saas-page__button', this.directionClass], style },
|
|
37
|
+
children.map((vnode, index) => {
|
|
38
|
+
vnode.key = index; // 给 vnode 打上 key
|
|
39
|
+
return vnode;
|
|
40
|
+
}),
|
|
41
|
+
);
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
</script>
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="saas-page-table">
|
|
3
3
|
<div class="saas-page-table-header">
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<span v-if="!showClose" class="saas-page-title-line"></span>
|
|
16
|
-
<span class="saas-page-table-title">
|
|
17
|
-
<template v-if="$slots.title">
|
|
18
|
-
<slot name="title"></slot>
|
|
4
|
+
<template v-if="showHeader">
|
|
5
|
+
<div v-if="$slots.header">
|
|
6
|
+
<slot name="header"></slot>
|
|
7
|
+
</div>
|
|
8
|
+
<div v-else class="saas-page-table-menu" :class="{ hasClose: showClose }">
|
|
9
|
+
<template v-if="showClose">
|
|
10
|
+
<div class="saas-page-table-back" @click="goBack">
|
|
11
|
+
<span class="el-icon-arrow-left"></span>
|
|
12
|
+
</div>
|
|
13
|
+
<span class="saas-page-table-back_title">{{ $t('atSalaryFileImport.return') }}</span>
|
|
14
|
+
<span class="saas-page-table-title_line"></span>
|
|
19
15
|
</template>
|
|
20
|
-
<span v-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
<span v-if="!showClose" class="saas-page-title-line"></span>
|
|
17
|
+
<span class="saas-page-table-title">
|
|
18
|
+
<template v-if="$slots.title">
|
|
19
|
+
<slot name="title"></slot>
|
|
20
|
+
</template>
|
|
21
|
+
<span v-else>{{ title }}</span>
|
|
22
|
+
</span>
|
|
23
|
+
<slot name="header-append"></slot>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
24
26
|
<div class="saas-page-table-form">
|
|
25
27
|
<slot name="form"></slot>
|
|
26
28
|
</div>
|
|
@@ -37,6 +39,10 @@
|
|
|
37
39
|
export default {
|
|
38
40
|
name: 'SPagetable',
|
|
39
41
|
props: {
|
|
42
|
+
showHeader: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: () => true,
|
|
45
|
+
},
|
|
40
46
|
showFooter: {
|
|
41
47
|
type: Boolean,
|
|
42
48
|
default: () => true,
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import SpaceItem from '../SpaceItem';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
name: 'SSpace',
|
|
6
|
+
components: { SpaceItem },
|
|
7
|
+
props: {
|
|
8
|
+
gap: {
|
|
9
|
+
type: [Number, String],
|
|
10
|
+
default: 8,
|
|
11
|
+
},
|
|
12
|
+
direction: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: 'horizontal', // horizontal | vertical
|
|
15
|
+
validator: val => ['horizontal', 'vertical'].includes(val),
|
|
16
|
+
},
|
|
17
|
+
align: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: 'center', // flex 对齐方式
|
|
20
|
+
},
|
|
21
|
+
wrap: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: false,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
computed: {
|
|
27
|
+
directionClass() {
|
|
28
|
+
return this.direction === 'horizontal' ? 'saas-horizontal' : 'saas-vertical';
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
render(h) {
|
|
32
|
+
const children = (this.$slots.default || []).filter(vnode => vnode.tag);
|
|
33
|
+
const style = {
|
|
34
|
+
gap: typeof this.gap === 'number' ? this.gap + 'px' : this.gap,
|
|
35
|
+
flexWrap: this.wrap ? 'wrap' : 'nowrap',
|
|
36
|
+
alignItems: this.align,
|
|
37
|
+
};
|
|
38
|
+
return h(
|
|
39
|
+
'div',
|
|
40
|
+
{ class: ['saas-space', this.directionClass], style },
|
|
41
|
+
children.map((vnode, index) => h(SpaceItem, { key: index }, [vnode])),
|
|
42
|
+
);
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
</script>
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
</template>
|
|
36
36
|
<script>
|
|
37
37
|
import { isEmpty, formatIfJson, formatSubmitTime } from 'chain-lodash';
|
|
38
|
-
import STableButton from '../STableButtons';
|
|
38
|
+
import STableButton from '../SButton/STableButtons';
|
|
39
39
|
import SUnit from '../SUnit';
|
|
40
40
|
export default {
|
|
41
41
|
name: 'STablecolumn',
|
|
@@ -55,11 +55,12 @@ export default {
|
|
|
55
55
|
},
|
|
56
56
|
computed: {
|
|
57
57
|
columnProps() {
|
|
58
|
-
const { type = null, fixed = null } = this.column;
|
|
58
|
+
const { type = null, fixed = null, width, minWidth } = this.column;
|
|
59
59
|
return {
|
|
60
60
|
...this.column,
|
|
61
61
|
fixed: fixed ? fixed : type === 'operate' ? 'right' : null,
|
|
62
|
-
|
|
62
|
+
width: width || null, // 如果有 width 就锁定宽度
|
|
63
|
+
'min-width': width ? null : minWidth || this.minWidth, // 没有 width 时才设置 min-width
|
|
63
64
|
prop: this.column.value,
|
|
64
65
|
label: this.column.label,
|
|
65
66
|
showOverflowTooltip: this.column.showOverflowTooltip != null ? this.column.showOverflowTooltip : true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-table ref="saasTable" class="saas-table" v-bind="$props" v-on="$listeners">
|
|
3
3
|
<slot></slot>
|
|
4
|
-
<STablecolumn v-for="column in columns" :key="column.value" :column="column" @action="handleColumnAction">
|
|
4
|
+
<STablecolumn v-for="column in columns" :key="column.value" :column="column" :min-width="minWidth" @action="handleColumnAction">
|
|
5
5
|
<template :slot="column.value" slot-scope="scope">
|
|
6
6
|
<slot :name="column.value" v-bind="getBindProps(scope, column)"></slot>
|
|
7
7
|
</template>
|
|
@@ -23,6 +23,10 @@ export default {
|
|
|
23
23
|
type: Array,
|
|
24
24
|
default: () => [],
|
|
25
25
|
},
|
|
26
|
+
minWidth: {
|
|
27
|
+
type: [Number, String],
|
|
28
|
+
default: 150,
|
|
29
|
+
},
|
|
26
30
|
},
|
|
27
31
|
components: {
|
|
28
32
|
STablecolumn,
|
|
@@ -31,6 +35,11 @@ export default {
|
|
|
31
35
|
return {};
|
|
32
36
|
},
|
|
33
37
|
computed: {},
|
|
38
|
+
mounted() {
|
|
39
|
+
this.$nextTick(() => {
|
|
40
|
+
this.doLayout();
|
|
41
|
+
});
|
|
42
|
+
},
|
|
34
43
|
deactivated() {},
|
|
35
44
|
methods: {
|
|
36
45
|
// 处理操作列事件
|
|
@@ -43,6 +52,9 @@ export default {
|
|
|
43
52
|
column,
|
|
44
53
|
};
|
|
45
54
|
},
|
|
55
|
+
doLayout() {
|
|
56
|
+
this.$refs.saasTable.doLayout();
|
|
57
|
+
},
|
|
46
58
|
},
|
|
47
59
|
};
|
|
48
60
|
</script>
|
package/components/src/index.js
CHANGED
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
// lib/index.js
|
|
2
2
|
import SDrawer from './SDrawer/index';
|
|
3
3
|
import SDialog from './SDialog/index';
|
|
4
|
-
import SPagedetail from './SPage/Pagedetail';
|
|
5
4
|
import SPagetable from './SPage/Pagetable';
|
|
6
5
|
import SUnit from './SUnit/index';
|
|
7
6
|
import SCard from './SCard/index';
|
|
8
7
|
import SGroup from './SGroup/index';
|
|
9
|
-
import STableButtons from './STableButtons/index';
|
|
10
8
|
import SMessagebox from './SMessagebox/index';
|
|
11
9
|
import STable from './STable/index';
|
|
12
10
|
import SContainer from './SContainer/index';
|
|
13
11
|
import STablecolumn from './STable/STablecolumn';
|
|
14
|
-
import * as
|
|
12
|
+
import * as BaseComponents from './SForm';
|
|
13
|
+
import * as Pages from './SPage';
|
|
14
|
+
import * as Buttons from './SButton';
|
|
15
|
+
import * as Spaces from './SSpace';
|
|
15
16
|
|
|
16
17
|
const components = {
|
|
17
18
|
SDrawer,
|
|
18
19
|
SDialog,
|
|
19
|
-
SPagedetail,
|
|
20
20
|
SUnit,
|
|
21
21
|
SCard,
|
|
22
22
|
SGroup,
|
|
23
23
|
SPagetable,
|
|
24
24
|
STable,
|
|
25
|
-
STableButtons,
|
|
26
25
|
SContainer,
|
|
27
26
|
STablecolumn,
|
|
28
|
-
...
|
|
27
|
+
...Pages,
|
|
28
|
+
...Buttons,
|
|
29
|
+
...Spaces,
|
|
30
|
+
...BaseComponents,
|
|
29
31
|
};
|
|
30
32
|
|
|
31
33
|
const install = function (Vue) {
|
package/lib/css/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.saas-card,.saas-dialog .el-dialog{border-radius:6px}.saas-dialog-footer,.saas-drawer-footer{height:auto;text-align:right}.saas-detail-sub,.saas-page-table-sub{margin-top:8px}.saas-dialog .el-dialog__body{padding:0}.saas-dialog ::v-deep .el-dialog__footer{padding:12px 24px 20px}.saas-dialog .el-dialog__header{border-bottom:1px solid #dbdee7;padding:12px 16px}.saas-dialog .el-dialog__footer{padding:8px 16px;border-top:1px solid #dbdee7}.saas-dialog .el-dialog__headerbtn{top:16px}.content-no-padding .saas-dialog-content{padding:0}.saas-dialog-auto{max-height:calc(85vh - 100px);overflow-y:auto}.saas-dialog-content{padding:16px}.saas-drawer .el-drawer__body{display:flex}.saas-drawer-content{flex:1;padding:24px;overflow-y:auto}.saas-drawer-footer{padding:16px 24px;border-top:1px #efefef solid}.saas-dialog .submit-form .el-form-item__content,.saas-drawer .submit-form .el-form-item__content{line-height:normal}.saas-dialog .submit-form .el-form-item__label,.saas-drawer .submit-form .el-form-item__label{line-height:normal;font-weight:500}.saas-detail{background:#fff;height:100%;display:flex;flex-direction:column;position:relative}.saas-detail-top{flex:1;overflow-y:auto;overflow-x:auto}.saas-detail-header{display:flex;padding:24px 64px;position:sticky;background:#fff;top:0;z-index:10}.saas-detail-title{display:flex;align-items:center;font-size:16px;font-weight:600;color:#0e1822}.saas-
|
|
1
|
+
@charset "UTF-8";.saas-card,.saas-dialog .el-dialog{border-radius:6px}.saas-dialog-footer,.saas-drawer-footer{height:auto;text-align:right}.saas-detail-sub,.saas-page-table-sub{margin-top:8px}.saas-dialog .el-dialog__body{padding:0}.saas-dialog ::v-deep .el-dialog__footer{padding:12px 24px 20px}.saas-dialog .el-dialog__header{border-bottom:1px solid #dbdee7;padding:12px 16px}.saas-dialog .el-dialog__footer{padding:8px 16px;border-top:1px solid #dbdee7}.saas-dialog .el-dialog__headerbtn{top:16px}.content-no-padding .saas-dialog-content{padding:0}.saas-dialog-auto{max-height:calc(85vh - 100px);overflow-y:auto}.saas-dialog-content{padding:16px}.saas-drawer .el-drawer__body{display:flex}.saas-drawer-content{flex:1;padding:24px;overflow-y:auto}.saas-drawer-footer{padding:16px 24px;border-top:1px #efefef solid}.saas-dialog .submit-form .el-form-item__content,.saas-drawer .submit-form .el-form-item__content{line-height:normal}.saas-dialog .submit-form .el-form-item__label,.saas-drawer .submit-form .el-form-item__label{line-height:normal;font-weight:500}.saas-detail{background:#fff;height:100%;display:flex;flex-direction:column;position:relative}.saas-detail-top{flex:1;overflow-y:auto;overflow-x:auto}.saas-detail-header{display:flex;padding:24px 64px;position:sticky;background:#fff;top:0;z-index:10}.saas-detail-title{display:flex;align-items:center;font-size:16px;font-weight:600;color:#0e1822}.saas-title-line{display:inline-block;width:4px;height:16px;background:#28b86a;margin-right:8px;vertical-align:middle}.saas-detail-backbox{display:flex;align-items:center;position:absolute;left:24px;top:24px}.saas-detail-back{display:flex;align-items:center;border-radius:50%;border:1px solid #dbdee7;width:24px;height:24px;justify-content:center;color:#a1a5b2;cursor:pointer}.saas-detail-back:hover{background:#f7f9fb}.saas-detail-content{padding:0 64px 24px;flex:1}.saas-detail-footer{padding:16px 24px;background:#fff;text-align:center;box-shadow:8px 0 12px 0 rgba(161,165,178,.1);border-radius:0;border-top:1px solid #dbdee7;z-index:5}.saas-unit-danger,.saas-unit-info,.saas-unit-primary,.saas-unit-success,.saas-unit-warning{width:8px;height:8px;border-radius:2px}.saas-unit{display:flex;align-items:center;gap:6px;white-space:nowrap;color:#0e1822;font-size:14px}.saas-unit-primary{background-color:#1890ff}.saas-unit-info{background-color:#a1a5b2}.saas-unit-success{background-color:#2ecc71}.saas-unit-danger{background-color:#ff3b30}.saas-unit-warning{background-color:#f90}.saas-unit-link{text-decoration:underline;cursor:pointer}.saas-unit-link:hover{color:#1890ff}.saas-unit-text{width:0;flex:1}.saas-card{border:1px solid #dbdee7;margin-bottom:24px}.saas-card.hidden-card{border-bottom:none}.saas-card.hidden-card .saas-card-header{border-radius:6px}.saas-card-header{display:flex;background:#f7f9fb;border-radius:6px 6px 0 0;border-bottom:1px solid #dbdee7;font-weight:500;font-size:16px;color:#0e1822;padding:8px 16px;align-items:center}.saas-card-title{flex:1}.saas-card-title .el-button--text{padding:0}.saas-card-content{padding:16px}.saas-card-icon{cursor:pointer;margin-right:8px}.saas-group{display:flex;overflow-x:auto;min-height:50px;padding-bottom:4px}.saas-group div{box-sizing:border-box}.saas-group::-webkit-scrollbar{width:3px;height:4px;background-color:#fff;cursor:pointer}.saas-group::-webkit-scrollbar-thumb{background-color:rgba(144,147,153,.2)}.saas-group::-webkit-scrollbar-thumb:hover{background-color:rgba(144,147,153,.5)}.saas-group::-webkit-scrollbar-track{background-color:#fff}.saas-sort-group{display:flex;border-radius:6px;margin-right:8px;background:#f7f9fb}.saas-sort-item{width:136px;background:#f7f9fb;border:1px solid #f7f9fb;text-align:center;padding:8px 4px;position:relative;cursor:pointer;border-radius:6px;display:flex;flex-direction:column;align-items:center;justify-content:center}.saas-sort-item .title{font-weight:600;font-size:16px;color:#0e1822;line-height:24px}.saas-sort-item .text{font-size:14px;color:#7b8089;line-height:22px;max-width:100%}.saas-sort-item img{display:none;position:absolute;width:16px;right:-1px;top:-1px}.saas-sort-item.active{border:1px solid #28b86a;border-radius:6px;background:#f4fbf8}.saas-sort-item.active .title{color:#28b86a}.saas-sort-item.active img{display:block}.message-box-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;z-index:4999}.message-box,.saas-page-table{background:#fff;position:relative;border-radius:8px}.message-box{padding:32px 24px 24px;width:480px}.message-box .el-icon-close{position:absolute;top:16px;right:16px;cursor:pointer}.message-box__header{font-weight:600;font-size:16px;color:#333;line-height:24px;margin-bottom:8px}.message-box__content{margin-bottom:24px;color:#5c616a}.message-box__footer{display:flex;justify-content:flex-end}.message-box__input{width:100%;padding:6px}.message-box_icon{color:#f90;display:flex;font-size:24px}.message-box_main{display:flex;gap:8px}.message-box_right{flex:1;width:0}.saas-page-table{height:calc(100% - 16px);display:flex;flex-direction:column;padding:16px}.saas-page-table-header{flex-shrink:0}.saas-page-table-menu{display:flex;align-items:center;font-size:16px;font-weight:600;color:#0e1822;margin-bottom:16px}.saas-page-table-menu.hasClose{font-weight:400}.saas-page-table-back_title{margin-right:16px}.saas-page-table-title_line{height:14px;width:1px;background:#dbdee7;margin-right:16px}.saas-page-title-line{display:inline-block;width:4px;height:16px;background:#28b86a;margin-right:8px;vertical-align:middle}.saas-page-table-backbox{display:flex;align-items:center;top:24px}.saas-page-table-back,.saas-steptop-btn{align-items:center;display:flex}.saas-page-table-back{border-radius:50%;border:1px solid #dbdee7;width:24px;height:24px;justify-content:center;color:#a1a5b2;cursor:pointer;margin-right:8px}.saas-page-table-back:hover{background:#f7f9fb}.saas-page-table-title{flex:1}.saas-page-table-content{flex:1;min-height:300px}.saas-page-table-footer{flex-shrink:0}.saas-page__button{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap}.saas-table-buttons{display:flex;gap:0 8px;flex-wrap:wrap;align-items:center}.saas-table-buttons .el-button+.el-button{margin-left:0}.saas-table-buttons .smart-More{font-weight:bolder}.saas-container{display:flex;flex-direction:column;height:100%;flex:1}.saas-container-content{flex:1;min-height:300px}.saas-input .el-input-group__append{padding:0;background:#f7f9fb;color:#0e1822}.el-button.saas-button-text,.saas-button.saas-button__icon{padding-right:8px;padding-left:8px}.saas-input-number,.saas-select-input{display:inline-block;width:100%}.saas-text-mode{display:inline}.el-button.saas-button-text{color:#0e1822;display:inline-flex;align-items:center;outline:0;background-color:transparent}.el-button.saas-button-text:focus,.el-button.saas-button-text:hover{background-color:#f7f9fb}.no-gap>.el-button.saas-button-text{margin:0}.saas-space{display:inline-flex}.saas-space.saas-horizontal{flex-direction:row}.saas-space.saas-vertical{flex-direction:column}.saas-space-item{display:inline-flex}
|
package/lib/saasui.common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports=function(t){var e={};function s(a){if(e[a])return e[a].exports;var l=e[a]={i:a,l:!1,exports:{}};return t[a].call(l.exports,l,l.exports,s),l.l=!0,l.exports}return s.m=t,s.c=e,s.d=function(t,e,a){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(s.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var l in t)s.d(a,l,function(e){return t[e]}.bind(null,l));return a},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="",s(s.s=3)}([function(t,e){t.exports=require("chain-lodash")},function(t,e){t.exports=require("element-ui")},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAAXNSR0IArs4c6QAAADBQTFRFAAAAIK9wML9wKLdoKLdwKLdsKbhpKLlqKLdqKLhrKLdpKLhrKbhrKLhqKblqKLhqgtDn1gAAAA90Uk5TABAQICBAcH+An6C/z9/vjSAyHgAAAJdJREFUKM9dzs0JwkAUReGDIkwJFmELwmA/giXYQVpICa5sw417dy4FN+IPyc0YZ2Jy7/Lw8XhUKmuPkbSg/159qUbl6kQ7Jw8n7eTKeykdxqReSHcyuSXAWnqSyeaken6RPmQSVz1QQybn2f4LJDJpYg+GkMgPlJDIVpMwvMtAPAQPheAEJzjBCU5wghOc4AQnOMGJh9AB/uTa5S04zqUAAAAASUVORK5CYII="},function(t,e,s){"use strict";s.r(e);var a={};s.r(a),s.d(a,"SInput",(function(){return E})),s.d(a,"SSelect",(function(){return L})),s.d(a,"SInputNumber",(function(){return M})),s.d(a,"SSwitch",(function(){return F}));var l=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("el-drawer",t._g(t._b({staticClass:"saas-drawer",attrs:{wrapperClosable:!1,visible:t.show},on:{"update:visible":function(e){t.show=e}}},"el-drawer",t.bindProps,!1),t.$listeners),[t.$slots.title?s("template",{slot:"title"},[t._t("title")],2):t._e(),t._v(" "),s("div",{staticClass:"saas-drawer-content"},[t._t("default")],2),t._v(" "),t.showFooter?s("div",{staticClass:"saas-drawer-footer"},[t.$slots.footer?t._t("footer"):[t.showCancelButton?s("el-button",{on:{click:t.handleClose}},[t._v(t._s(t.cancelText))]):t._e(),t._v(" "),t.showConfirmButton?s("el-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick",value:5e3,expression:"5000"}],attrs:{loading:t.loadingBtn,type:"primary"},on:{click:t.handleSubmit}},[t._v("\n "+t._s(t.confirmText)+"\n ")]):t._e()]],2):t._e()],2)};l._withStripped=!0;var n=s(1),i=s(0);function o(t,e,s,a,l,n,i,o){var r,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=s,u._compiled=!0),a&&(u.functional=!0),n&&(u._scopeId="data-v-"+n),i?(r=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),l&&l.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},u._ssrRegister=r):l&&(r=o?function(){l.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:l),r)if(u.functional){u._injectStyles=r;var c=u.render;u.render=function(t,e){return r.call(e),c(t,e)}}else{var p=u.beforeCreate;u.beforeCreate=p?[].concat(p,r):[r]}return{exports:t,options:u}}var r=o({name:"SDrawer",props:{...n.Drawer.props,showFooter:{type:Boolean,default:()=>!0},size:{type:[String,Number],default:()=>"800px"},wrapperClosable:{type:Boolean,default:()=>!1},loadingBtn:{type:Boolean,default:()=>!1},appendToBody:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},showConfirmButton:{type:Boolean,default:!0},confirmText:{type:String,default(){return this.$t("buttonGroup.sure")}},cancelText:{type:String,default(){return this.$t("buttonGroup.cancel")}}},data:()=>({}),computed:{show:{get(){return this.visible},set(t){this.$emit("update:visible",t)}},bindProps(){return Object(i.omit)(this.$props,["visible"])}},deactivated(){this.handleClose()},methods:{handleSubmit(){this.$emit("confirm")},handleClose(){this.$emit("update:visible",!1),this.$emit("close")}}},l,[],!1,null,null,null).exports,u=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("el-dialog",t._g(t._b({staticClass:"saas-dialog",attrs:{"close-on-click-modal":!1,visible:t.show},on:{"update:visible":function(e){t.show=e}}},"el-dialog",t.bindProps,!1),t.$listeners),[t.$slots.title?s("template",{slot:"title"},[t._t("title")],2):t._e(),t._v(" "),s("div",{staticClass:"saas-dialog-content",class:{"saas-dialog-auto":t.isAuto}},[t._t("default")],2),t._v(" "),t.showFooter?s("template",{slot:"footer"},[t.$slots.footer?t._t("footer"):s("div",[t.showCancelButton?s("el-button",{on:{click:t.handleClose}},[t._v(t._s(t.cancelText))]):t._e(),t._v(" "),t.showConfirmButton?s("el-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick",value:5e3,expression:"5000"}],attrs:{loading:t.loadingBtn,type:"primary"},on:{click:t.handleSubmit}},[t._v("\n "+t._s(t.confirmText)+"\n ")]):t._e()],1)],2):t._e()],2)};u._withStripped=!0;var c=o({name:"SDialog",props:{...n.Dialog.props,showFooter:{type:Boolean,default:()=>!0},width:{type:[String,Number],default:()=>"600px"},loadingBtn:{type:Boolean,default:()=>!1},visible:{type:Boolean,default:!1},showCancelButton:{type:Boolean,default:()=>!0},showConfirmButton:{type:Boolean,default:()=>!0},confirmText:{type:String,default(){return this.$t("buttonGroup.sure")}},cancelText:{type:String,default(){return this.$t("buttonGroup.cancel")}},isAuto:{type:Boolean,default:!0}},data:()=>({}),computed:{show:{get(){return this.visible},set(t){this.$emit("update:visible",t)}},bindProps(){return Object(i.omit)(this.$props,["visible"])}},deactivated(){this.handleClose()},methods:{handleSubmit(){this.$emit("confirm")},handleClose(){this.$emit("update:visible",!1),this.$emit("close")}}},u,[],!1,null,null,null).exports,p=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"saas-detail"},[s("div",{staticClass:"saas-detail-top"},[s("div",{staticClass:"saas-detail-header"},[s("div",{staticClass:"saas-detail-backbox"},[t.showClose?s("div",{staticClass:"saas-detail-back",on:{click:t.goBack}},[s("span",{staticClass:"el-icon-arrow-left"})]):t._e()]),t._v(" "),s("div",{staticClass:"saas-detail-titlebox",style:t.computeStyle},[s("div",{staticClass:"saas-detail-title"},[s("span",{staticClass:"saas-title-line"}),t._v(" "),t.$slots.title?[t._t("title")]:s("span",[t._v("\n "+t._s(t.title)+"\n ")])],2),t._v(" "),t.titleSub?s("div",{staticClass:"saas-detail-sub"},[t._v(t._s(t.titleSub))]):t._e()]),t._v(" "),t._t("header-append")],2),t._v(" "),s("div",{staticClass:"saas-detail-content"},[t._t("default")],2)]),t._v(" "),t.showFooter?[s("div",{staticClass:"saas-detail-footer"},[t.$slots.footer?t._t("footer"):[s("el-button",{on:{click:t.handleClose}},[t._v(t._s(t.cancelText))]),t._v(" "),s("el-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick",value:5e3,expression:"5000"}],attrs:{loading:t.loadingBtn,type:"primary"},on:{click:t.handleSubmit}},[t._v(t._s(t.confirmText))])]],2)]:t._e()],2)};p._withStripped=!0;var d=o({name:"SPagedetail",props:{showFooter:{type:Boolean,default:()=>!0},showClose:{type:Boolean,default:()=>!0},loadingBtn:{type:Boolean,default:()=>!1},computeStyle:{type:Object,default:()=>({width:"1000px",margin:"0 auto"})},title:{type:String,default:""},titleSub:{type:String,default:""},confirmText:{type:String,default(){return this.$t("buttonGroup.sure")}},cancelText:{type:String,default(){return this.$t("buttonGroup.cancel")}}},data:()=>({}),computed:{show:{get(){return this.visible},set(t){this.$emit("update:visible",t)}}},deactivated(){this.handleClose()},methods:{handleSubmit(){this.$emit("confirm")},handleClose(){this.$emit("close")},goBack(){this.$emit("close")}}},p,[],!1,null,"063e3770",null).exports,h=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"saas-page-table"},[s("div",{staticClass:"saas-page-table-header"},[t.$slots.header?s("div",[t._t("header")],2):s("div",{staticClass:"saas-page-table-menu",class:{hasClose:t.showClose}},[t.showClose?[s("div",{staticClass:"saas-page-table-back",on:{click:t.goBack}},[s("span",{staticClass:"el-icon-arrow-left"})]),t._v(" "),s("span",{staticClass:"saas-page-table-back_title"},[t._v(t._s(t.$t("atSalaryFileImport.return")))]),t._v(" "),s("span",{staticClass:"saas-page-table-title_line"})]:t._e(),t._v(" "),t.showClose?t._e():s("span",{staticClass:"saas-page-title-line"}),t._v(" "),s("span",{staticClass:"saas-page-table-title"},[t.$slots.title?[t._t("title")]:s("span",[t._v(t._s(t.title))])],2),t._v(" "),t._t("header-append")],2),t._v(" "),s("div",{staticClass:"saas-page-table-form"},[t._t("form")],2)]),t._v(" "),s("div",{staticClass:"saas-page-table-content"},[t._t("default")],2),t._v(" "),s("div",{staticClass:"saas-page-table-footer"},[t._t("footer")],2)])};h._withStripped=!0;var m=o({name:"SPagetable",props:{showFooter:{type:Boolean,default:()=>!0},showClose:{type:Boolean,default:()=>!1},loadingBtn:{type:Boolean,default:()=>!1},computeStyle:{type:Object,default:()=>({width:"1000px",margin:"0 auto"})},title:{type:String,default(){return this.$t("saasmenu."+this.$route.meta.code)}},titleSub:{type:String,default:""},confirmText:{type:String,default(){return this.$t("buttonGroup.sure")}},cancelText:{type:String,default(){return this.$t("buttonGroup.cancel")}},showTitle:{type:Boolean,default:!0}},data:()=>({}),computed:{show:{get(){return this.visible},set(t){this.$emit("update:visible",t)}}},deactivated(){this.handleClose()},methods:{handleSubmit(){this.$emit("confirm")},handleClose(){this.$emit("close")},goBack(){this.$emit("close")}}},h,[],!1,null,"45721a0f",null).exports,f=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"saas-unit"},[s("span",{class:"saas-unit-"+t.typeCom}),t._v(" "),s("span",{class:["saas-unit-text",{"saas-unit-link":t.isLink}],on:{click:t.handleClick}},[t._t("default",[t._v("\n "+t._s(t.getValue)+"\n ")])],2)])};f._withStripped=!0;var v=o({name:"SUnit",props:{value:[String,Number],type:{type:String,default:""},options:{type:Array,default:()=>[]},props:{type:Object,default:()=>({value:"value",label:"label",style:"style",type:"",isShowCode:!1})},isLink:Boolean},data:()=>({}),computed:{typeCom(){if(Object(i.isEmpty)(this.value))return this.type||"primary";{const t=this.props.style||"style";return Object(i.getOptionValue)(this.options,this.value,{...this.props,label:t})||"primary"}},getValue(){if(!Object(i.isEmpty)(this.value)){const t=Object(i.getOptionValue)(this.options,this.value,this.props);return Object(i.formatIfJson)(t)}return""}},methods:{handleSubmit(){this.$emit("confirm")},handleClose(){this.$emit("close")},goBack(){this.$emit("close")},handleClick(t){this.$emit("click",t)}}},f,[],!1,null,"26c2158e",null).exports,_=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{class:["saas-card",{"hidden-card":!t.isShow}]},[s("div",{staticClass:"saas-card-header"},[t.isCollapse?s("span",{class:[t.isShow?"el-icon-caret-bottom":"el-icon-caret-right","saas-card-icon"],on:{click:t.handleCollapse}}):t._e(),t._v(" "),s("div",{staticClass:"saas-card-title"},[t._t("title",[t._v("\n "+t._s(t.title)+"\n ")])],2)]),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:t.isShow,expression:"isShow"}],staticClass:"saas-card-content"},[t._t("default")],2)])};_._withStripped=!0;var b=o({name:"SCard",props:{title:{type:String,default:""},titleSub:{type:String,default:""},isCollapse:{type:Boolean,default:!1}},data:()=>({isShow:!0}),computed:{},deactivated(){},methods:{handleCollapse(){this.isShow=!this.isShow}}},_,[],!1,null,"5ed7dbbb",null).exports,g=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"saas-group"},t._l(t.list,(function(e,l){return a("div",{key:l,staticClass:"saas-sort-group"},t._l(e.children,(function(l,n){return a("div",{key:n,staticClass:"saas-sort-item",class:{active:t.getActive(l,e)},on:{click:function(s){return t.handleClick(l,e)}}},[a("div",{staticClass:"title",style:t.getSortStyle(l)},[t._v(t._s(t.formatValue(l,t.data)))]),t._v(" "),a("div",{staticClass:"text"},[a("span",[t._t("default",[t._v("\n "+t._s(l.label)+"\n "),l.tip?a("el-tooltip",{attrs:{content:l.tip}},[a("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(l.tip)},slot:"content"}),t._v(" "),a("i",{staticClass:"smart-info-filled",staticStyle:{color:"#a1a5b2","margin-left":"4px"}})]):t._e()],{item:l})],2)]),t._v(" "),a("img",{attrs:{src:s(2),alt:"",srcset:""}})])})),0)})),0)};g._withStripped=!0;var y=o({name:"SGroup",props:{title:{type:String,default:""},list:{type:Array,default:()=>[]},data:{type:Object,default:()=>({})},isActive:{type:Function,default:null}},data:()=>({}),computed:{},deactivated(){},methods:{getSortStyle(t){let e={};if("percent"===t.type){const s=this.data[t.field];e.color=s<=30?"#FF3B30":s<=60?"#FF9900":"#28B86A"}return e},handleClick(t,e){this.$emit("tab-click",t,e)},getActive(t,e){return!!this.isActive&&this.isActive(t,e)},formatValue:(t,e)=>t.formatValue?t.formatValue(t,e):e[t.value]}},g,[],!1,null,"4f2996b7",null).exports,w=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"saas-table-buttons"},[t._l(t.buttonList,(function(e,a){return[s("el-tooltip",{key:a,attrs:{disabled:!e.tip,placement:"top",content:e.tip}},[s("el-button",t._b({on:{click:function(s){return t.handelClick(e.action)}}},"el-button",t.finalAttrs(e.attrs),!1),[t._v(t._s(e.label))])],1)]})),t._v(" "),t.dropdownList.length?s("el-dropdown",{on:{command:t.handleCommand}},[s("el-button",t._b({},"el-button",t.btnProps,!1),["more"==t.moreType?s("i",{staticClass:"smart-More"}):"text"==t.moreType?[t._v("\n "+t._s(t.text)+"\n "),s("i",{staticClass:"el-icon-arrow-down"})]:t._e()],2),t._v(" "),s("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.dropdownList,(function(e,a){return s("el-dropdown-item",t._b({key:a,attrs:{command:e.action}},"el-dropdown-item",t.finalAttrs(e.attrs),!1),[s("el-tooltip",{attrs:{disabled:!e.tip,placement:"top",content:e.tip}},[s("span",[t._v(t._s(e.label))])])],1)})),1)],1):t._e()],2)};w._withStripped=!0;var S=o({name:"STableButtons",props:{list:{type:Array,default:()=>[]},maxLength:{type:Number,default:2},moreType:{type:String,default:"more"},text:{type:String,default(){return this.$t("buttonGroup.more")}},row:{type:Object,default:()=>({})}},data:()=>({btnProps:{size:"mini",type:"text"}}),computed:{showList(){return this.list.filter(t=>{const e=!!Object(i.isEmpty)(t.show)||t.show;return"function"==typeof e?e(this.row):Boolean(e)})},buttonList(){return this.showList.slice(0,this.maxLength)},dropdownList(){return this.showList.slice(this.maxLength)}},methods:{finalAttrs(t={}){return{...this.btnProps,...t}},handleCommand(t){this.$emit("action",t,this.row)},handelClick(t){this.$emit("action",t,this.row)}}},w,[],!1,null,null,null).exports,C=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("transition",{attrs:{name:"el-fade-in-linear"}},[t.visible?s("div",{staticClass:"message-box-overlay"},[s("div",{staticClass:"message-box"},[t.showClose?s("i",{staticClass:"el-icon-close",on:{click:t.handleClose}}):t._e(),t._v(" "),s("div",{staticClass:"message-box_main"},[s("div",{staticClass:"message-box_icon"},[s("span",{staticClass:"el-icon-warning"})]),t._v(" "),s("div",{staticClass:"message-box_right"},[s("div",{staticClass:"message-box__header"},[s("span",{staticClass:"message-box__title"},[t._v(t._s(t.title))])]),t._v(" "),s("div",{staticClass:"message-box__content"},[t.message&&0==t.dangerouslyUseHTMLString?s("div",[t._v(t._s(t.message))]):t._e(),t._v(" "),t.message&&t.dangerouslyUseHTMLString?s("div",{domProps:{innerHTML:t._s(t.message)}}):t._e(),t._v(" "),t.showInput?s("el-input",{staticClass:"message-box__input",attrs:{placeholder:t.inputPlaceholder},model:{value:t.inputValue,callback:function(e){t.inputValue=e},expression:"inputValue"}}):t._e()],1)])]),t._v(" "),s("div",{staticClass:"message-box__footer"},[t.showCancelButton?s("el-button",{attrs:{size:"mini"},on:{click:t.handleCancel}},[t._v(t._s(t.cancelText))]):t._e(),t._v(" "),s("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.handleConfirm}},[t._v(t._s(t.confirmText))])],1)])]):t._e()])};C._withStripped=!0;var x=o({name:"SMessageBox",props:{},data:()=>({visible:!1,title:"",message:"",showInput:!1,inputValue:"",inputPlaceholder:"",showCancelButton:!1,resolve:null,reject:null,confirmText:"",cancelText:"",dangerouslyUseHTMLString:!1,showClose:!1}),methods:{open(t){return this.title=t.title,this.message=t.message||"",this.showClose=!!Object(i.isEmpty)(t.showClose)||t.showClose,this.showInput=t.showInput||!1,this.dangerouslyUseHTMLString=t.dangerouslyUseHTMLString||!1,this.inputPlaceholder=t.inputPlaceholder||"",this.showCancelButton=!!Object(i.isEmpty)(t.showCancelButton)||t.showCancelButton,this.confirmText=t.confirmText,this.cancelText=t.cancelText,this.showClose=t.showClose,this.visible=!0,this.inputValue="",new Promise((t,e)=>{this.resolve=t,this.reject=e})},handleConfirm(){this.visible=!1,this.showInput?this.resolve(this.inputValue):this.resolve(!0)},handleCancel(){this.visible=!1,this.reject("cancel")},handleClose(){this.visible=!1,this.reject("close")}}},C,[],!1,null,null,null).exports;var $=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("el-table",t._g(t._b({ref:"saasTable",staticClass:"saas-table"},"el-table",t.$props,!1),t.$listeners),[t._t("default"),t._v(" "),t._l(t.columns,(function(e){return s("STablecolumn",{key:e.value,attrs:{column:e},on:{action:t.handleColumnAction},scopedSlots:t._u([{key:e.value,fn:function(s){return[t._t(e.value,null,null,t.getBindProps(s,e))]}}],null,!0)})}))],2)};$._withStripped=!0;var B=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("el-table-column",t._b({scopedSlots:t._u(["index"===t.column.type?{key:"default",fn:function(e){var s=e.$index,a=e.row;return[t._t("default",[t._v("\n "+t._s(t.getIndex(s))+"\n ")],{index:t.getIndex(s),row:a})]}}:"operate"===t.column.type?{key:"default",fn:function(e){return[t._t(t.column.value,[s("s-table-buttons",{attrs:{list:t.column.actionList,row:e.row},on:{action:t.handleAction}})],null,t.getBindProps(e))]}}:"unit"===t.column.type?{key:"default",fn:function(e){return[t._t(t.column.value,[s("s-unit",{attrs:{value:e.row[t.column.value],options:t.column.options}})],null,t.getBindProps(e))]}}:{key:"default",fn:function(e){return[t._t(t.column.value,[t._v("\n "+t._s(t.selectValue(e.row))+"\n ")],null,t.getBindProps(e))]}}],null,!0)},"el-table-column",t.columnProps,!1),[s("template",{slot:"header"},[t.$slots["header-"+t.column.value]?t._t("header-"+t.column.value,[t._v("\n "+t._s(t.column.label)+"\n ")],{column:t.column}):[s("span",[t._v(t._s(t.column.label))]),t._v(" "),t.column.tip?s("el-tooltip",{attrs:{placement:"top",content:t.column.tip}},[s("i",{staticClass:"smart-info-filled",staticStyle:{color:"#a1a5b2","margin-left":"6px"}})]):t._e()]],2)],2)};B._withStripped=!0;var A=o({name:"STablecolumn",components:{STableButton:S,SUnit:v},props:{column:Object,minWidth:{type:[Number,String],default:150}},data:()=>({}),computed:{columnProps(){const{type:t=null,fixed:e=null}=this.column;return{...this.column,fixed:e||("operate"===t?"right":null),"min-width":this.column.minWidth||this.minWidth,prop:this.column.value,label:this.column.label,showOverflowTooltip:null==this.column.showOverflowTooltip||this.column.showOverflowTooltip,index:this.column.indexMethod||null}}},methods:{selectValue(t){let e="";const{options:s=[],type:a="txt"}=this.column,l=t[this.column.value];if(this.column.formatValue)return this.column.formatValue(t,this.column);switch(a){case"select":let t=s.find(t=>t.value==l)||{};e=Object(i.formatIfJson)(t.label);break;case"time":e=Object(i.formatSubmitTime)(l,"DD/MM/YYYY");break;default:e=Object(i.formatIfJson)(l)}return Object(i.isEmpty)(e)?e=this.column.defaultValue||"-":e.length>500&&(e=e.slice(0,500)+"..."),e},getBindProps(t){return{...t,column:this.column}},getIndex(t){return this.indexMethod?this.indexMethod(t):t+1},handleAction(t,e){this.$emit("action",t,e,this.column)}}},B,[],!1,null,null,null).exports,T=o({name:"STable",props:{...n.Table.props,border:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]}},components:{STablecolumn:A},data:()=>({}),computed:{},deactivated(){},methods:{handleColumnAction(t,e,s){this.$emit("action",t,e,s)},getBindProps:(t,e)=>({...t,column:e})}},$,[],!1,null,null,null).exports,k=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"saas-container"},[e("div",{staticClass:"saas-container-header"},[this._t("header")],2),this._v(" "),e("div",{staticClass:"saas-container-content"},[this._t("default")],2),this._v(" "),e("div",{staticClass:"saas-container-footer"},[this._t("footer")],2)])};k._withStripped=!0;var V=o({name:"SContainer",props:{title:{type:String,default:""},titleSub:{type:String,default:""}},data:()=>({}),computed:{},deactivated(){},methods:{}},k,[],!1,null,"2036a697",null).exports,O=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"saas-input",class:{"saas-text-mode":"text"===t.from}},["text"===t.from?s("span",{staticClass:"saas-input-text"},[t._v(t._s(t.textValue))]):s("el-input",t._g(t._b({model:{value:t.newValue,callback:function(e){t.newValue=e},expression:"newValue"}},"el-input",t.attrs,!1),t.onEvents),[t.$slots.prepend?s("template",{slot:"prepend"},[t._t("prepend")],2):t._e(),t._v(" "),t.$slots.append?s("template",{slot:"append"},[t._t("append")],2):t._e()],2)],1)};O._withStripped=!0;var j={props:{value:{type:[String,Number,Array],default:""},mode:{type:String,default:"FORM"},clearable:{type:Boolean,default:!0},from:{type:String,default:"input"},placeholder:{type:String,default(){return this.$t("selectGroup.pleaseSelect")}},componentType:{type:String,default:"input"}},computed:{newValue:{get(){return Object(i.isEmpty)(this.value)||null==this.value?"":String(this.value)},set(t){this.$emit("input",t)}},textValue(){if("select"==this.componentType){const t=this.flattenOptions(this.options);if(this.multiple){const e=t.filter(t=>this.newValue.includes(t.value)).map(t=>t.label);return e.length>1?`${e[0]} +${e.length-1}`:e[0]||"-"}return(t.find(t=>t.value==this.newValue)||{}).label||"-"}return this.newValue||"-"},attrs(){const t=Object.assign({},this.defaultAttrs,this.$props,this.$attrs),e=["value","from"];return Object.keys(t).filter(t=>!e.includes(t)).reduce((e,s)=>(e[s]=t[s],e),{})},onEvents(){return this.$listeners}},methods:{flattenOptions(t){const e=[];return t.forEach(t=>{t.options?e.push(...t.options):e.push(t)}),e}}},E=o({name:"SInput",mixins:[j],props:{...Object(i.omit)(n.Input.props,["value","clearable","maxlength"]),maxlength:{type:Number,default:120},placeholder:{type:String,default(){return this.$t("InputPlaceholder.pleasemsg")}}},computed:{}},O,[],!1,null,"0b51b93c",null).exports,I=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"saas-select",class:{"saas-text-mode":"text"===t.from}},["text"===t.from?s("span",{staticClass:"input-text"},[t._v(t._s(t.textValue))]):s("el-select",t._g(t._b({staticClass:"saas-select-input",attrs:{filterable:"",clearable:""},model:{value:t.newValue,callback:function(e){t.newValue=e},expression:"newValue"}},"el-select",t.attrs,!1),t.onEvents),[t._l(t.optionsList,(function(e){return[e.options?s("el-option-group",{key:e.value,attrs:{label:e.label}},t._l(e.options,(function(t){return s("el-option",{key:t.value,attrs:{disabled:t.disabled,label:t.label,value:t.value}})})),1):s("el-option",{key:e.value,attrs:{disabled:e.disabled,label:e.label,value:e.value}})]}))],2)],1)};I._withStripped=!0;var L=o({name:"SSelect",mixins:[j],props:{...Object(i.omit)(n.Select.props,["value","clearable"]),value:{type:[String,Number,Array]},clearable:{type:Boolean,default:()=>!0},placeholder:{type:String,default(){return this.$t("selectGroup.pleaseSelect")}},from:{type:String,default:"select"},options:{type:Array,default:()=>[]},componentType:{type:String,default:"select"},props:{type:Object,default:()=>({label:"label",value:"value"})}},data:()=>({}),computed:{newValue:{get(){let t=this.multiple?[]:"";return this.multiple?t=(this.value||[]).map(t=>null!=t?String(t):""):Object(i.isEmpty)(this.value)||null==this.value||(t=String(this.value)),t},set(t){this.$emit("input",t)}},optionsList(){return this.options.map(t=>{const e=this.formatOptions(t);let s=e.options;return e.options&&(s=e.options.map(this.formatOptions)),{...e,options:s}})},textValue(){const t=this.multiple,e=this.flattenOptions(this.optionsList||[]);if(t){const t=e.filter(t=>this.newValue.includes(t.value)).map(t=>t.label);return t.length>1?`${t[0]} +${t.length-1}`:t[0]}return(e.find(t=>t.value==this.newValue)||{}).label||"-"}},methods:{flattenOptions(t){const e=[];return t.forEach(t=>{t.options?e.push(...t.options):e.push(t)}),e},formatOptions(t){const e=this.props&&this.props.value||"value",s=this.props&&this.props.label||"label",a=t[e],l=t[s],n=t.options||null;return{...t,value:Object(i.isEmpty)(a)?"":String(a),label:Object(i.formatIfJson)(l),options:n}}}},I,[],!1,null,"0c1640be",null).exports,P=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"saas-input-number",class:{"saas-text-mode":"text"===t.from}},["text"===t.from?s("span",{staticClass:"saas-input-number-text"},[t._v(t._s(t.textValue))]):s("el-input",t._g(t._b({model:{value:t.internalValue,callback:function(e){t.internalValue=e},expression:"internalValue"}},"el-input",t.attrs,!1),t.mergedListeners),[t.$slots.prepend?s("template",{slot:"prepend"},[t._t("prepend")],2):t._e(),t._v(" "),t.$slots.append?s("template",{slot:"append"},[t._t("append")],2):t._e()],2)],1)};P._withStripped=!0;var M=o({name:"SInputNumber",mixins:[j],props:{...Object(i.omit)(n.Input.props,["value","clearable"]),value:{type:[String,Number],default:""},placeholder:{type:String,default(){return this.$t("InputPlaceholder.pleasemsg")}},componentType:{type:String,default:"inputNumber"},min:{type:Number,default:-1/0},max:{type:Number,default:1/0},allowDecimal:{type:Boolean,default:!1},precision:{type:Number,default:0}},data(){return{internalValue:Object(i.isEmpty)(this.value)?"":String(this.value)}},computed:{mergedListeners(){return{...this.onEvents,input:this.handleInput,blur:this.handleBlur}}},watch:{value(t){"text"!==this.from&&(this.internalValue=this.formatInputValue(t))}},methods:{handleInput(t){let e=t;if(this.allowDecimal){e=t.replace(/[^-?\d.]/g,"");const s=(e.match(/\./g)||[]).length;if(s>1){const t=e.indexOf(".");e=e.substring(0,t+1)+e.substring(t+1).replace(/\./g,"")}if(s>0&&this.precision>=0){const t=e.split(".");t[1]&&t[1].length>this.precision&&(e=t[0]+"."+t[1].substring(0,this.precision))}}else e=t.replace(/[^-?\d]/g,"");const s=(e.match(/-/g)||[]).length;let a;s>1&&(e=e.replace(/-/g,""),e="-"+e),1!==s||e.startsWith("-")||(e=e.replace(/-/g,""),e="-"+e),e.startsWith("0")&&e.length>1&&!e.startsWith("-")&&(e=e.replace(/^0+/,"0"),e.length>1&&"."!==e[1]&&(e=e.replace(/^0+/,""))),e.startsWith("-0")&&e.length>2&&("."!==e[2]&&(e=e.replace(/^(-)0+/,"$1")),"-"===e&&(e="-0")),this.internalValue=e,a=""===e||"-"===e?"":this.allowDecimal?parseFloat(e):parseInt(e,10),this.$emit("input",a)},handleBlur(){let t,e=this.internalValue;if(""===e||"-"===e)return this.$emit("input",""),this.internalValue="",void this.$emit("blur","");this.allowDecimal?(t=parseFloat(e),this.precision>=0&&(t=parseFloat(t.toFixed(this.precision)))):t=parseInt(e,10),t<this.min?t=this.min:t>this.max&&(t=this.max),this.allowDecimal&&this.precision,this.internalValue=t.toString(),this.$emit("input",t),this.$emit("blur",t)},formatInputValue:t=>""===t||null==t?"":String(t)}},P,[],!1,null,null,null).exports,N=function(){var t=this,e=t.$createElement;return(t._self._c||e)("el-switch",t._g(t._b({model:{value:t.newValue,callback:function(e){t.newValue=e},expression:"newValue"}},"el-switch",t.attrs,!1),t.onEvents))};N._withStripped=!0;var F=o({name:"SSwitch",mixins:[j],props:{...Object(i.omit)(n.Input.props,["value"]),activeValue:{type:[Boolean,String,Number],default:1},inactiveValue:{type:[Boolean,String,Number],default:0},componentType:{type:String,default:"select"}},computed:{newValue:{get(){return this.value},set(t){this.$emit("input",t)}}}},N,[],!1,null,null,null).exports;const G={SDrawer:r,SDialog:c,SPagedetail:d,SUnit:v,SCard:b,SGroup:y,SPagetable:m,STable:T,STableButtons:S,SContainer:V,STablecolumn:A,...a},R=function(t){R.installed||Object.keys(G).forEach(e=>{t.component(G[e].name,G[e])})};"undefined"!=typeof window&&window.Vue&&R(window.Vue);e.default={version:"1.0.0",install:R,SMessagebox:class{constructor(t,e,s=x){if(!t)throw new Error("[MessageBox] Vue instance is required");if(!s)throw new Error("[MessageBox] Vue component is required");this.Vue=t,this.i18n=e,this.Component=s,this.instance=null}_t(t){return this.i18n?this.i18n.t(t):t}_createInstance(){const t=this.Vue.extend(this.Component);this.instance=new t({el:document.createElement("div")}),document.body.appendChild(this.instance.$el)}_getInstance(){return this.instance||this._createInstance(),this.instance}alert(t){return this._getInstance().open({...t,title:t.title||this._t("deletemsg.hint"),confirmText:t.confirmText||this._t("buttonGroup.sure"),cancelText:t.cancelText||this._t("buttonGroup.cancel"),message:t.message,showCancelButton:!1})}confirm(t){return this._getInstance().open({...t,title:t.title||this._t("deletemsg.hint"),confirmText:t.confirmText||this._t("buttonGroup.sure"),cancelText:t.cancelText||this._t("buttonGroup.cancel"),message:t.message})}prompt(t){return this._getInstance().open({...t,title:t.title||this._t("deletemsg.hint"),confirmText:t.confirmText||this._t("buttonGroup.sure"),cancelText:t.cancelText||this._t("buttonGroup.cancel"),message:t.message,showInput:!0})}},...G}}]).default;
|
|
1
|
+
module.exports=function(t){var e={};function s(a){if(e[a])return e[a].exports;var n=e[a]={i:a,l:!1,exports:{}};return t[a].call(n.exports,n,n.exports,s),n.l=!0,n.exports}return s.m=t,s.c=e,s.d=function(t,e,a){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(s.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)s.d(a,n,function(e){return t[e]}.bind(null,n));return a},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="",s(s.s=3)}([function(t,e){t.exports=require("chain-lodash")},function(t,e){t.exports=require("element-ui")},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAAXNSR0IArs4c6QAAADBQTFRFAAAAIK9wML9wKLdoKLdwKLdsKbhpKLlqKLdqKLhrKLdpKLhrKbhrKLhqKblqKLhqgtDn1gAAAA90Uk5TABAQICBAcH+An6C/z9/vjSAyHgAAAJdJREFUKM9dzs0JwkAUReGDIkwJFmELwmA/giXYQVpICa5sw417dy4FN+IPyc0YZ2Jy7/Lw8XhUKmuPkbSg/159qUbl6kQ7Jw8n7eTKeykdxqReSHcyuSXAWnqSyeaken6RPmQSVz1QQybn2f4LJDJpYg+GkMgPlJDIVpMwvMtAPAQPheAEJzjBCU5wghOc4AQnOMGJh9AB/uTa5S04zqUAAAAASUVORK5CYII="},function(t,e,s){"use strict";s.r(e);var a={};s.r(a),s.d(a,"SInput",(function(){return P})),s.d(a,"SSelect",(function(){return N})),s.d(a,"SInputNumber",(function(){return G})),s.d(a,"SSwitch",(function(){return U}));var n={};s.r(n),s.d(n,"SPageButton",(function(){return K})),s.d(n,"SPagedetail",(function(){return z}));var l={};s.r(l),s.d(l,"STableButtons",(function(){return A})),s.d(l,"SButtonText",(function(){return J})),s.d(l,"SButton",(function(){return T}));var i={};s.r(i),s.d(i,"SSpace",(function(){return Q})),s.d(i,"SSpaceItem",(function(){return W}));var o=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("el-drawer",t._g(t._b({staticClass:"saas-drawer",attrs:{wrapperClosable:!1,visible:t.show},on:{"update:visible":function(e){t.show=e}}},"el-drawer",t.bindProps,!1),t.$listeners),[t.$slots.title?s("template",{slot:"title"},[t._t("title")],2):t._e(),t._v(" "),s("div",{staticClass:"saas-drawer-content"},[t._t("default")],2),t._v(" "),t.showFooter?s("div",{staticClass:"saas-drawer-footer"},[t.$slots.footer?t._t("footer"):[t.showCancelButton?s("el-button",{on:{click:t.handleClose}},[t._v(t._s(t.cancelText))]):t._e(),t._v(" "),t.showConfirmButton?s("el-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick",value:5e3,expression:"5000"}],attrs:{loading:t.loadingBtn,type:"primary"},on:{click:t.handleSubmit}},[t._v("\n "+t._s(t.confirmText)+"\n ")]):t._e()]],2):t._e()],2)};o._withStripped=!0;var r=s(1),u=s(0);function c(t,e,s,a,n,l,i,o){var r,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=s,u._compiled=!0),a&&(u.functional=!0),l&&(u._scopeId="data-v-"+l),i?(r=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},u._ssrRegister=r):n&&(r=o?function(){n.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:n),r)if(u.functional){u._injectStyles=r;var c=u.render;u.render=function(t,e){return r.call(e),c(t,e)}}else{var p=u.beforeCreate;u.beforeCreate=p?[].concat(p,r):[r]}return{exports:t,options:u}}var p=c({name:"SDrawer",props:{...r.Drawer.props,showFooter:{type:Boolean,default:()=>!0},size:{type:[String,Number],default:()=>"800px"},wrapperClosable:{type:Boolean,default:()=>!1},loadingBtn:{type:Boolean,default:()=>!1},appendToBody:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!0},showConfirmButton:{type:Boolean,default:!0},confirmText:{type:String,default(){return this.$t("buttonGroup.sure")}},cancelText:{type:String,default(){return this.$t("buttonGroup.cancel")}}},data:()=>({}),computed:{show:{get(){return this.visible},set(t){this.$emit("update:visible",t)}},bindProps(){return Object(u.omit)(this.$props,["visible"])}},deactivated(){this.handleClose()},methods:{handleSubmit(){this.$emit("confirm")},handleClose(){this.$emit("update:visible",!1),this.$emit("close")}}},o,[],!1,null,null,null).exports,d=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("el-dialog",t._g(t._b({staticClass:"saas-dialog",attrs:{"close-on-click-modal":!1,visible:t.show},on:{"update:visible":function(e){t.show=e}}},"el-dialog",t.bindProps,!1),t.$listeners),[t.$slots.title?s("template",{slot:"title"},[t._t("title")],2):t._e(),t._v(" "),s("div",{staticClass:"saas-dialog-content",class:{"saas-dialog-auto":t.isAuto}},[t._t("default")],2),t._v(" "),t.showFooter?s("template",{slot:"footer"},[t.$slots.footer?t._t("footer"):s("div",[t.showCancelButton?s("el-button",{on:{click:t.handleClose}},[t._v(t._s(t.cancelText))]):t._e(),t._v(" "),t.showConfirmButton?s("el-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick",value:5e3,expression:"5000"}],attrs:{loading:t.loadingBtn,type:"primary"},on:{click:t.handleSubmit}},[t._v("\n "+t._s(t.confirmText)+"\n ")]):t._e()],1)],2):t._e()],2)};d._withStripped=!0;var h=c({name:"SDialog",props:{...r.Dialog.props,showFooter:{type:Boolean,default:()=>!0},width:{type:[String,Number],default:()=>"600px"},loadingBtn:{type:Boolean,default:()=>!1},visible:{type:Boolean,default:!1},showCancelButton:{type:Boolean,default:()=>!0},showConfirmButton:{type:Boolean,default:()=>!0},confirmText:{type:String,default(){return this.$t("buttonGroup.sure")}},cancelText:{type:String,default(){return this.$t("buttonGroup.cancel")}},isAuto:{type:Boolean,default:!0}},data:()=>({}),computed:{show:{get(){return this.visible},set(t){this.$emit("update:visible",t)}},bindProps(){return Object(u.omit)(this.$props,["visible"])}},deactivated(){this.handleClose()},methods:{handleSubmit(){this.$emit("confirm")},handleClose(){this.$emit("update:visible",!1),this.$emit("close")}}},d,[],!1,null,null,null).exports,m=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"saas-page-table"},[s("div",{staticClass:"saas-page-table-header"},[t.showHeader?[t.$slots.header?s("div",[t._t("header")],2):s("div",{staticClass:"saas-page-table-menu",class:{hasClose:t.showClose}},[t.showClose?[s("div",{staticClass:"saas-page-table-back",on:{click:t.goBack}},[s("span",{staticClass:"el-icon-arrow-left"})]),t._v(" "),s("span",{staticClass:"saas-page-table-back_title"},[t._v(t._s(t.$t("atSalaryFileImport.return")))]),t._v(" "),s("span",{staticClass:"saas-page-table-title_line"})]:t._e(),t._v(" "),t.showClose?t._e():s("span",{staticClass:"saas-page-title-line"}),t._v(" "),s("span",{staticClass:"saas-page-table-title"},[t.$slots.title?[t._t("title")]:s("span",[t._v(t._s(t.title))])],2),t._v(" "),t._t("header-append")],2)]:t._e(),t._v(" "),s("div",{staticClass:"saas-page-table-form"},[t._t("form")],2)],2),t._v(" "),s("div",{staticClass:"saas-page-table-content"},[t._t("default")],2),t._v(" "),s("div",{staticClass:"saas-page-table-footer"},[t._t("footer")],2)])};m._withStripped=!0;var f=c({name:"SPagetable",props:{showHeader:{type:Boolean,default:()=>!0},showFooter:{type:Boolean,default:()=>!0},showClose:{type:Boolean,default:()=>!1},loadingBtn:{type:Boolean,default:()=>!1},computeStyle:{type:Object,default:()=>({width:"1000px",margin:"0 auto"})},title:{type:String,default(){return this.$t("saasmenu."+this.$route.meta.code)}},titleSub:{type:String,default:""},confirmText:{type:String,default(){return this.$t("buttonGroup.sure")}},cancelText:{type:String,default(){return this.$t("buttonGroup.cancel")}},showTitle:{type:Boolean,default:!0}},data:()=>({}),computed:{show:{get(){return this.visible},set(t){this.$emit("update:visible",t)}}},deactivated(){this.handleClose()},methods:{handleSubmit(){this.$emit("confirm")},handleClose(){this.$emit("close")},goBack(){this.$emit("close")}}},m,[],!1,null,"9ce252bc",null).exports,v=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"saas-unit"},[s("span",{class:"saas-unit-"+t.typeCom}),t._v(" "),s("span",{class:["saas-unit-text",{"saas-unit-link":t.isLink}],on:{click:t.handleClick}},[t._t("default",[t._v("\n "+t._s(t.getValue)+"\n ")])],2)])};v._withStripped=!0;var _=c({name:"SUnit",props:{value:[String,Number],type:{type:String,default:""},options:{type:Array,default:()=>[]},props:{type:Object,default:()=>({value:"value",label:"label",style:"style",type:"",isShowCode:!1})},isLink:Boolean},data:()=>({}),computed:{typeCom(){if(Object(u.isEmpty)(this.value))return this.type||"primary";{const t=this.props.style||"style";return Object(u.getOptionValue)(this.options,this.value,{...this.props,label:t})||"primary"}},getValue(){if(!Object(u.isEmpty)(this.value)){const t=Object(u.getOptionValue)(this.options,this.value,this.props);return Object(u.formatIfJson)(t)}return""}},methods:{handleSubmit(){this.$emit("confirm")},handleClose(){this.$emit("close")},goBack(){this.$emit("close")},handleClick(t){this.$emit("click",t)}}},v,[],!1,null,"26c2158e",null).exports,b=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{class:["saas-card",{"hidden-card":!t.isShow}]},[s("div",{staticClass:"saas-card-header"},[t.isCollapse?s("span",{class:[t.isShow?"el-icon-caret-bottom":"el-icon-caret-right","saas-card-icon"],on:{click:t.handleCollapse}}):t._e(),t._v(" "),s("div",{staticClass:"saas-card-title"},[t._t("title",[t._v("\n "+t._s(t.title)+"\n ")])],2)]),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:t.isShow,expression:"isShow"}],staticClass:"saas-card-content"},[t._t("default")],2)])};b._withStripped=!0;var g=c({name:"SCard",props:{title:{type:String,default:""},titleSub:{type:String,default:""},isCollapse:{type:Boolean,default:!1}},data:()=>({isShow:!0}),computed:{},deactivated(){},methods:{handleCollapse(){this.isShow=!this.isShow}}},b,[],!1,null,"5ed7dbbb",null).exports,y=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"saas-group"},t._l(t.list,(function(e,n){return a("div",{key:n,staticClass:"saas-sort-group"},t._l(e.children,(function(n,l){return a("div",{key:l,staticClass:"saas-sort-item",class:{active:t.getActive(n,e)},on:{click:function(s){return t.handleClick(n,e)}}},[a("div",{staticClass:"title",style:t.getSortStyle(n)},[t._v(t._s(t.formatValue(n,t.data)))]),t._v(" "),a("div",{staticClass:"text"},[a("span",[t._t("default",[t._v("\n "+t._s(n.label)+"\n "),n.tip?a("el-tooltip",{attrs:{content:n.tip}},[a("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(n.tip)},slot:"content"}),t._v(" "),a("i",{staticClass:"smart-info-filled",staticStyle:{color:"#a1a5b2","margin-left":"4px"}})]):t._e()],{item:n})],2)]),t._v(" "),a("img",{attrs:{src:s(2),alt:"",srcset:""}})])})),0)})),0)};y._withStripped=!0;var w=c({name:"SGroup",props:{title:{type:String,default:""},list:{type:Array,default:()=>[]},data:{type:Object,default:()=>({})},isActive:{type:Function,default:null}},data:()=>({}),computed:{},deactivated(){},methods:{getSortStyle(t){let e={};if("percent"===t.type){const s=this.data[t.field];e.color=s<=30?"#FF3B30":s<=60?"#FF9900":"#28B86A"}return e},handleClick(t,e){this.$emit("tab-click",t,e)},getActive(t,e){return!!this.isActive&&this.isActive(t,e)},formatValue:(t,e)=>t.formatValue?t.formatValue(t,e):e[t.value]}},y,[],!1,null,"4f2996b7",null).exports,S=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("transition",{attrs:{name:"el-fade-in-linear"}},[t.visible?s("div",{staticClass:"message-box-overlay"},[s("div",{staticClass:"message-box"},[t.showClose?s("i",{staticClass:"el-icon-close",on:{click:t.handleClose}}):t._e(),t._v(" "),s("div",{staticClass:"message-box_main"},[s("div",{staticClass:"message-box_icon"},[s("span",{staticClass:"el-icon-warning"})]),t._v(" "),s("div",{staticClass:"message-box_right"},[s("div",{staticClass:"message-box__header"},[s("span",{staticClass:"message-box__title"},[t._v(t._s(t.title))])]),t._v(" "),s("div",{staticClass:"message-box__content"},[t.message&&0==t.dangerouslyUseHTMLString?s("div",[t._v(t._s(t.message))]):t._e(),t._v(" "),t.message&&t.dangerouslyUseHTMLString?s("div",{domProps:{innerHTML:t._s(t.message)}}):t._e(),t._v(" "),t.showInput?s("el-input",{staticClass:"message-box__input",attrs:{placeholder:t.inputPlaceholder},model:{value:t.inputValue,callback:function(e){t.inputValue=e},expression:"inputValue"}}):t._e()],1)])]),t._v(" "),s("div",{staticClass:"message-box__footer"},[t.showCancelButton?s("el-button",{attrs:{size:"mini"},on:{click:t.handleCancel}},[t._v(t._s(t.cancelText))]):t._e(),t._v(" "),s("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.handleConfirm}},[t._v(t._s(t.confirmText))])],1)])]):t._e()])};S._withStripped=!0;var C=c({name:"SMessageBox",props:{},data:()=>({visible:!1,title:"",message:"",showInput:!1,inputValue:"",inputPlaceholder:"",showCancelButton:!1,resolve:null,reject:null,confirmText:"",cancelText:"",dangerouslyUseHTMLString:!1,showClose:!1}),methods:{open(t){return this.title=t.title,this.message=t.message||"",this.showClose=!!Object(u.isEmpty)(t.showClose)||t.showClose,this.showInput=t.showInput||!1,this.dangerouslyUseHTMLString=t.dangerouslyUseHTMLString||!1,this.inputPlaceholder=t.inputPlaceholder||"",this.showCancelButton=!!Object(u.isEmpty)(t.showCancelButton)||t.showCancelButton,this.confirmText=t.confirmText,this.cancelText=t.cancelText,this.showClose=t.showClose,this.visible=!0,this.inputValue="",new Promise((t,e)=>{this.resolve=t,this.reject=e})},handleConfirm(){this.visible=!1,this.showInput?this.resolve(this.inputValue):this.resolve(!0)},handleCancel(){this.visible=!1,this.reject("cancel")},handleClose(){this.visible=!1,this.reject("close")}}},S,[],!1,null,null,null).exports;var x=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("el-table",t._g(t._b({ref:"saasTable",staticClass:"saas-table"},"el-table",t.$props,!1),t.$listeners),[t._t("default"),t._v(" "),t._l(t.columns,(function(e){return s("STablecolumn",{key:e.value,attrs:{column:e,"min-width":t.minWidth},on:{action:t.handleColumnAction},scopedSlots:t._u([{key:e.value,fn:function(s){return[t._t(e.value,null,null,t.getBindProps(s,e))]}}],null,!0)})}))],2)};x._withStripped=!0;var $=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("el-table-column",t._b({scopedSlots:t._u(["index"===t.column.type?{key:"default",fn:function(e){var s=e.$index,a=e.row;return[t._t("default",[t._v("\n "+t._s(t.getIndex(s))+"\n ")],{index:t.getIndex(s),row:a})]}}:"operate"===t.column.type?{key:"default",fn:function(e){return[t._t(t.column.value,[s("s-table-buttons",{attrs:{list:t.column.actionList,row:e.row},on:{action:t.handleAction}})],null,t.getBindProps(e))]}}:"unit"===t.column.type?{key:"default",fn:function(e){return[t._t(t.column.value,[s("s-unit",{attrs:{value:e.row[t.column.value],options:t.column.options}})],null,t.getBindProps(e))]}}:{key:"default",fn:function(e){return[t._t(t.column.value,[t._v("\n "+t._s(t.selectValue(e.row))+"\n ")],null,t.getBindProps(e))]}}],null,!0)},"el-table-column",t.columnProps,!1),[s("template",{slot:"header"},[t.$slots["header-"+t.column.value]?t._t("header-"+t.column.value,[t._v("\n "+t._s(t.column.label)+"\n ")],{column:t.column}):[s("span",[t._v(t._s(t.column.label))]),t._v(" "),t.column.tip?s("el-tooltip",{attrs:{placement:"top",content:t.column.tip}},[s("i",{staticClass:"smart-info-filled",staticStyle:{color:"#a1a5b2","margin-left":"6px"}})]):t._e()]],2)],2)};$._withStripped=!0;var B=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"saas-table-buttons"},[t._l(t.buttonList,(function(e,a){return[s("el-tooltip",{key:a,attrs:{disabled:!e.tip,placement:"top",content:e.tip}},[s("s-button",t._b({on:{click:function(s){return t.handelClick(e.action)}}},"s-button",t.finalAttrs(e.attrs),!1),[t._v(t._s(e.label))])],1)]})),t._v(" "),t.dropdownList.length?s("el-dropdown",{on:{command:t.handleCommand}},[s("s-button",t._b({},"s-button",t.btnProps,!1),["more"==t.moreType?s("i",{staticClass:"smart-More"}):"text"==t.moreType?[t._v("\n "+t._s(t.text)+"\n "),s("i",{staticClass:"el-icon-arrow-down"})]:t._e()],2),t._v(" "),s("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.dropdownList,(function(e,a){return s("el-dropdown-item",t._b({key:a,attrs:{command:e.action}},"el-dropdown-item",t.finalAttrs(e.attrs),!1),[s("el-tooltip",{attrs:{disabled:!e.tip,placement:"top",content:e.tip}},[s("span",[t._v(t._s(e.label))])])],1)})),1)],1):t._e()],2)};B._withStripped=!0;var k=function(){var t=this,e=t.$createElement;return(t._self._c||e)("el-button",t._g(t._b({class:["saas-button",t.getButtonType],attrs:{type:t.buttonTypeComputed},on:{click:t.handleClick}},"el-button",t.$attrs,!1),t.filterListeners),[t._t("default")],2)};k._withStripped=!0;var T=c({name:"SButton",props:{type:{type:String,default:"default"}},computed:{buttonTypeComputed(){return"icon"===this.type?"default":this.type},getButtonType(){return this.type?"saas-button__"+this.type:""},filterListeners(){return Object(u.omit)(this.$listeners,["click"])}},methods:{handleClick(t){t.currentTarget.blur(),this.$emit("click",t)}}},k,[],!1,null,null,null).exports,A=c({name:"STableButtons",components:{SButton:T},props:{list:{type:Array,default:()=>[]},maxLength:{type:Number,default:2},moreType:{type:String,default:"more"},text:{type:String,default(){return this.$t("buttonGroup.more")}},row:{type:Object,default:()=>({})}},data:()=>({btnProps:{size:"mini",type:"text"}}),computed:{showList(){return this.list.filter(t=>{const e=!!Object(u.isEmpty)(t.show)||t.show;return"function"==typeof e?e(this.row):Boolean(e)})},buttonList(){return this.showList.slice(0,this.maxLength)},dropdownList(){return this.showList.slice(this.maxLength)}},methods:{finalAttrs(t={}){return{...this.btnProps,...t}},handleCommand(t){this.$emit("action",t,this.row)},handelClick(t){this.$emit("action",t,this.row)}}},B,[],!1,null,null,null).exports,V=c({name:"STablecolumn",components:{STableButton:A,SUnit:_},props:{column:Object,minWidth:{type:[Number,String],default:150}},data:()=>({}),computed:{columnProps(){const{type:t=null,fixed:e=null,width:s,minWidth:a}=this.column;return{...this.column,fixed:e||("operate"===t?"right":null),width:s||null,"min-width":s?null:a||this.minWidth,prop:this.column.value,label:this.column.label,showOverflowTooltip:null==this.column.showOverflowTooltip||this.column.showOverflowTooltip,index:this.column.indexMethod||null}}},methods:{selectValue(t){let e="";const{options:s=[],type:a="txt"}=this.column,n=t[this.column.value];if(this.column.formatValue)return this.column.formatValue(t,this.column);switch(a){case"select":let t=s.find(t=>t.value==n)||{};e=Object(u.formatIfJson)(t.label);break;case"time":e=Object(u.formatSubmitTime)(n,"DD/MM/YYYY");break;default:e=Object(u.formatIfJson)(n)}return Object(u.isEmpty)(e)?e=this.column.defaultValue||"-":e.length>500&&(e=e.slice(0,500)+"..."),e},getBindProps(t){return{...t,column:this.column}},getIndex(t){return this.indexMethod?this.indexMethod(t):t+1},handleAction(t,e){this.$emit("action",t,e,this.column)}}},$,[],!1,null,null,null).exports,O=c({name:"STable",props:{...r.Table.props,border:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]},minWidth:{type:[Number,String],default:150}},components:{STablecolumn:V},data:()=>({}),computed:{},mounted(){this.$nextTick(()=>{this.doLayout()})},deactivated(){},methods:{handleColumnAction(t,e,s){this.$emit("action",t,e,s)},getBindProps:(t,e)=>({...t,column:e}),doLayout(){this.$refs.saasTable.doLayout()}}},x,[],!1,null,null,null).exports,j=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"saas-container"},[e("div",{staticClass:"saas-container-header"},[this._t("header")],2),this._v(" "),e("div",{staticClass:"saas-container-content"},[this._t("default")],2),this._v(" "),e("div",{staticClass:"saas-container-footer"},[this._t("footer")],2)])};j._withStripped=!0;var I=c({name:"SContainer",props:{title:{type:String,default:""},titleSub:{type:String,default:""}},data:()=>({}),computed:{},deactivated(){},methods:{}},j,[],!1,null,"2036a697",null).exports,E=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"saas-input",class:{"saas-text-mode":"text"===t.from}},["text"===t.from?s("span",{staticClass:"saas-input-text"},[t._v(t._s(t.textValue))]):s("el-input",t._g(t._b({model:{value:t.newValue,callback:function(e){t.newValue=e},expression:"newValue"}},"el-input",t.attrs,!1),t.onEvents),[t.$slots.prepend?s("template",{slot:"prepend"},[t._t("prepend")],2):t._e(),t._v(" "),t.$slots.append?s("template",{slot:"append"},[t._t("append")],2):t._e()],2)],1)};E._withStripped=!0;var L={props:{value:{type:[String,Number,Array],default:""},mode:{type:String,default:"FORM"},clearable:{type:Boolean,default:!0},from:{type:String,default:"input"},placeholder:{type:String,default(){return this.$t("selectGroup.pleaseSelect")}},componentType:{type:String,default:"input"}},computed:{newValue:{get(){return Object(u.isEmpty)(this.value)||null==this.value?"":String(this.value)},set(t){this.$emit("input",t)}},textValue(){if("select"==this.componentType){const t=this.flattenOptions(this.options);if(this.multiple){const e=t.filter(t=>this.newValue.includes(t.value)).map(t=>t.label);return e.length>1?`${e[0]} +${e.length-1}`:e[0]||"-"}return(t.find(t=>t.value==this.newValue)||{}).label||"-"}return this.newValue||"-"},attrs(){const t=Object.assign({},this.defaultAttrs,this.$props,this.$attrs),e=["value","from"];return Object.keys(t).filter(t=>!e.includes(t)).reduce((e,s)=>(e[s]=t[s],e),{})},onEvents(){return this.$listeners}},methods:{flattenOptions(t){const e=[];return t.forEach(t=>{t.options?e.push(...t.options):e.push(t)}),e}}},P=c({name:"SInput",mixins:[L],props:{...Object(u.omit)(r.Input.props,["value","clearable","maxlength"]),maxlength:{type:Number,default:120},placeholder:{type:String,default(){return this.$t("InputPlaceholder.pleasemsg")}}},computed:{}},E,[],!1,null,"0b51b93c",null).exports,M=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"saas-select",class:{"saas-text-mode":"text"===t.from}},["text"===t.from?s("span",{staticClass:"input-text"},[t._v(t._s(t.textValue))]):s("el-select",t._g(t._b({staticClass:"saas-select-input",attrs:{filterable:"",clearable:""},model:{value:t.newValue,callback:function(e){t.newValue=e},expression:"newValue"}},"el-select",t.attrs,!1),t.onEvents),[t._l(t.optionsList,(function(e){return[e.options?s("el-option-group",{key:e.value,attrs:{label:e.label}},t._l(e.options,(function(t){return s("el-option",{key:t.value,attrs:{disabled:t.disabled,label:t.label,value:t.value}})})),1):s("el-option",{key:e.value,attrs:{disabled:e.disabled,label:e.label,value:e.value}})]}))],2)],1)};M._withStripped=!0;var N=c({name:"SSelect",mixins:[L],props:{...Object(u.omit)(r.Select.props,["value","clearable"]),value:{type:[String,Number,Array]},clearable:{type:Boolean,default:()=>!0},placeholder:{type:String,default(){return this.$t("selectGroup.pleaseSelect")}},from:{type:String,default:"select"},options:{type:Array,default:()=>[]},componentType:{type:String,default:"select"},props:{type:Object,default:()=>({label:"label",value:"value"})}},data:()=>({}),computed:{newValue:{get(){let t=this.multiple?[]:"";return this.multiple?t=(this.value||[]).map(t=>null!=t?String(t):""):Object(u.isEmpty)(this.value)||null==this.value||(t=String(this.value)),t},set(t){this.$emit("input",t)}},optionsList(){return this.options.map(t=>{const e=this.formatOptions(t);let s=e.options;return e.options&&(s=e.options.map(this.formatOptions)),{...e,options:s}})},textValue(){const t=this.multiple,e=this.flattenOptions(this.optionsList||[]);if(t){const t=e.filter(t=>this.newValue.includes(t.value)).map(t=>t.label);return t.length>1?`${t[0]} +${t.length-1}`:t[0]}return(e.find(t=>t.value==this.newValue)||{}).label||"-"}},methods:{flattenOptions(t){const e=[];return t.forEach(t=>{t.options?e.push(...t.options):e.push(t)}),e},formatOptions(t){const e=this.props&&this.props.value||"value",s=this.props&&this.props.label||"label",a=t[e],n=t[s],l=t.options||null;return{...t,value:Object(u.isEmpty)(a)?"":String(a),label:Object(u.formatIfJson)(n),options:l}}}},M,[],!1,null,"0c1640be",null).exports,F=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"saas-input-number",class:{"saas-text-mode":"text"===t.from}},["text"===t.from?s("span",{staticClass:"saas-input-number-text"},[t._v(t._s(t.textValue))]):s("el-input",t._g(t._b({model:{value:t.internalValue,callback:function(e){t.internalValue=e},expression:"internalValue"}},"el-input",t.attrs,!1),t.mergedListeners),[t.$slots.prepend?s("template",{slot:"prepend"},[t._t("prepend")],2):t._e(),t._v(" "),t.$slots.append?s("template",{slot:"append"},[t._t("append")],2):t._e()],2)],1)};F._withStripped=!0;var G=c({name:"SInputNumber",mixins:[L],props:{...Object(u.omit)(r.Input.props,["value","clearable"]),value:{type:[String,Number],default:""},placeholder:{type:String,default(){return this.$t("InputPlaceholder.pleasemsg")}},componentType:{type:String,default:"inputNumber"},min:{type:Number,default:-1/0},max:{type:Number,default:1/0},allowDecimal:{type:Boolean,default:!1},precision:{type:Number,default:0}},data(){return{internalValue:Object(u.isEmpty)(this.value)?"":String(this.value)}},computed:{mergedListeners(){return{...this.onEvents,input:this.handleInput,blur:this.handleBlur}}},watch:{value(t){"text"!==this.from&&(this.internalValue=this.formatInputValue(t))}},methods:{handleInput(t){let e=t;if(this.allowDecimal){e=t.replace(/[^-?\d.]/g,"");const s=(e.match(/\./g)||[]).length;if(s>1){const t=e.indexOf(".");e=e.substring(0,t+1)+e.substring(t+1).replace(/\./g,"")}if(s>0&&this.precision>=0){const t=e.split(".");t[1]&&t[1].length>this.precision&&(e=t[0]+"."+t[1].substring(0,this.precision))}}else e=t.replace(/[^-?\d]/g,"");const s=(e.match(/-/g)||[]).length;let a;s>1&&(e=e.replace(/-/g,""),e="-"+e),1!==s||e.startsWith("-")||(e=e.replace(/-/g,""),e="-"+e),e.startsWith("0")&&e.length>1&&!e.startsWith("-")&&(e=e.replace(/^0+/,"0"),e.length>1&&"."!==e[1]&&(e=e.replace(/^0+/,""))),e.startsWith("-0")&&e.length>2&&("."!==e[2]&&(e=e.replace(/^(-)0+/,"$1")),"-"===e&&(e="-0")),this.internalValue=e,a=""===e||"-"===e?"":this.allowDecimal?parseFloat(e):parseInt(e,10),this.$emit("input",a)},handleBlur(){let t,e=this.internalValue;if(""===e||"-"===e)return this.$emit("input",""),this.internalValue="",void this.$emit("blur","");this.allowDecimal?(t=parseFloat(e),this.precision>=0&&(t=parseFloat(t.toFixed(this.precision)))):t=parseInt(e,10),t<this.min?t=this.min:t>this.max&&(t=this.max),this.allowDecimal&&this.precision,this.internalValue=t.toString(),this.$emit("input",t),this.$emit("blur",t)},formatInputValue:t=>""===t||null==t?"":String(t)}},F,[],!1,null,null,null).exports,R=function(){var t=this,e=t.$createElement;return(t._self._c||e)("el-switch",t._g(t._b({model:{value:t.newValue,callback:function(e){t.newValue=e},expression:"newValue"}},"el-switch",t.attrs,!1),t.onEvents))};R._withStripped=!0;var U=c({name:"SSwitch",mixins:[L],props:{...Object(u.omit)(r.Input.props,["value"]),activeValue:{type:[Boolean,String,Number],default:1},inactiveValue:{type:[Boolean,String,Number],default:0},componentType:{type:String,default:"select"}},computed:{newValue:{get(){return this.value},set(t){this.$emit("input",t)}}}},R,[],!1,null,null,null).exports,K=c({name:"SPageButton",props:{gap:{type:[Number,String],default:8},direction:{type:String,default:"horizontal",validator:t=>["horizontal","vertical"].includes(t)},align:{type:String,default:"center"},wrap:{type:Boolean,default:!1}},computed:{directionClass(){return"horizontal"===this.direction?"saas-horizontal":"saas-vertical"}},render(t){const e=(this.$slots.default||[]).filter(t=>t.tag),s={gap:"number"==typeof this.gap?this.gap+"px":this.gap,alignItems:this.align};return t("div",{class:["saas-page__button",this.directionClass],style:s},e.map((t,e)=>(t.key=e,t)))}},void 0,void 0,!1,null,null,null).exports,D=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"saas-detail"},[s("div",{staticClass:"saas-detail-top"},[s("div",{staticClass:"saas-detail-header"},[s("div",{staticClass:"saas-detail-backbox"},[t.showClose?s("div",{staticClass:"saas-detail-back",on:{click:t.goBack}},[s("span",{staticClass:"el-icon-arrow-left"})]):t._e()]),t._v(" "),s("div",{staticClass:"saas-detail-titlebox",style:t.computeStyle},[s("div",{staticClass:"saas-detail-title"},[s("span",{staticClass:"saas-title-line"}),t._v(" "),t.$slots.title?[t._t("title")]:s("span",[t._v("\n "+t._s(t.title)+"\n ")])],2),t._v(" "),t.titleSub?s("div",{staticClass:"saas-detail-sub"},[t._v(t._s(t.titleSub))]):t._e()]),t._v(" "),t._t("header-append")],2),t._v(" "),s("div",{staticClass:"saas-detail-content"},[t._t("default")],2)]),t._v(" "),t.showFooter?[s("div",{staticClass:"saas-detail-footer"},[t.$slots.footer?t._t("footer"):[s("el-button",{on:{click:t.handleClose}},[t._v(t._s(t.cancelText))]),t._v(" "),s("el-button",{directives:[{name:"preventReClick",rawName:"v-preventReClick",value:5e3,expression:"5000"}],attrs:{loading:t.loadingBtn,type:"primary"},on:{click:t.handleSubmit}},[t._v(t._s(t.confirmText))])]],2)]:t._e()],2)};D._withStripped=!0;var z=c({name:"SPagedetail",props:{showFooter:{type:Boolean,default:()=>!0},showClose:{type:Boolean,default:()=>!0},loadingBtn:{type:Boolean,default:()=>!1},computeStyle:{type:Object,default:()=>({width:"1000px",margin:"0 auto"})},title:{type:String,default:""},titleSub:{type:String,default:""},confirmText:{type:String,default(){return this.$t("buttonGroup.sure")}},cancelText:{type:String,default(){return this.$t("buttonGroup.cancel")}}},data:()=>({}),computed:{show:{get(){return this.visible},set(t){this.$emit("update:visible",t)}}},deactivated(){this.handleClose()},methods:{handleSubmit(){this.$emit("confirm")},handleClose(){this.$emit("close")},goBack(){this.$emit("close")}}},D,[],!1,null,"063e3770",null).exports,q=function(){var t=this.$createElement;return(this._self._c||t)("el-button",this._g(this._b({staticClass:"saas-button-text",attrs:{type:this.buttonTypeComputed},on:{click:this.handleClick}},"el-button",this.$attrs,!1),this.filterListeners),[this._t("default")],2)};q._withStripped=!0;var J=c({name:"SButtonText",props:{path:String,query:Object,type:{type:String,default:"text"}},computed:{buttonTypeComputed(){return"link"===this.type?"text":this.type},filterListeners(){return Object(u.omit)(this.$listeners,["click"])}},methods:{handleClick(t){t.currentTarget.blur(),"link"===this.type&&this.path?this.push():this.$emit("click",t)},push(){let t=this.$router.resolve({path:this.path,query:this.query});window.open(t.href,"_blank")}}},q,[],!1,null,null,null).exports,H=function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"saas-space-item"},[this._t("default")],2)};H._withStripped=!0;var W=c({name:"SSpaceItem"},H,[],!1,null,null,null).exports,Q=c({name:"SSpace",components:{SpaceItem:W},props:{gap:{type:[Number,String],default:8},direction:{type:String,default:"horizontal",validator:t=>["horizontal","vertical"].includes(t)},align:{type:String,default:"center"},wrap:{type:Boolean,default:!1}},computed:{directionClass(){return"horizontal"===this.direction?"saas-horizontal":"saas-vertical"}},render(t){const e=(this.$slots.default||[]).filter(t=>t.tag),s={gap:"number"==typeof this.gap?this.gap+"px":this.gap,flexWrap:this.wrap?"wrap":"nowrap",alignItems:this.align};return t("div",{class:["saas-space",this.directionClass],style:s},e.map((e,s)=>t(W,{key:s},[e])))}},void 0,void 0,!1,null,null,null).exports;const Y={SDrawer:p,SDialog:h,SUnit:_,SCard:g,SGroup:w,SPagetable:f,STable:O,SContainer:I,STablecolumn:V,...n,...l,...i,...a},X=function(t){X.installed||Object.keys(Y).forEach(e=>{t.component(Y[e].name,Y[e])})};"undefined"!=typeof window&&window.Vue&&X(window.Vue);e.default={version:"1.0.0",install:X,SMessagebox:class{constructor(t,e,s=C){if(!t)throw new Error("[MessageBox] Vue instance is required");if(!s)throw new Error("[MessageBox] Vue component is required");this.Vue=t,this.i18n=e,this.Component=s,this.instance=null}_t(t){return this.i18n?this.i18n.t(t):t}_createInstance(){const t=this.Vue.extend(this.Component);this.instance=new t({el:document.createElement("div")}),document.body.appendChild(this.instance.$el)}_getInstance(){return this.instance||this._createInstance(),this.instance}alert(t){return this._getInstance().open({...t,title:t.title||this._t("deletemsg.hint"),confirmText:t.confirmText||this._t("buttonGroup.sure"),cancelText:t.cancelText||this._t("buttonGroup.cancel"),message:t.message,showCancelButton:!1})}confirm(t){return this._getInstance().open({...t,title:t.title||this._t("deletemsg.hint"),confirmText:t.confirmText||this._t("buttonGroup.sure"),cancelText:t.cancelText||this._t("buttonGroup.cancel"),message:t.message})}prompt(t){return this._getInstance().open({...t,title:t.title||this._t("deletemsg.hint"),confirmText:t.confirmText||this._t("buttonGroup.sure"),cancelText:t.cancelText||this._t("buttonGroup.cancel"),message:t.message,showInput:!0})}},...Y}}]).default;
|
package/package.json
CHANGED
|
File without changes
|