chain-saasui 1.0.8-alpha.3 → 1.0.8

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.
@@ -3,8 +3,16 @@
3
3
  border: 1px solid #dbdee7;
4
4
  margin-bottom: 24px;
5
5
  }
6
+ .saas-card.hidden-card {
7
+ border-bottom: none;
8
+
9
+ .saas-card-header {
10
+ border-radius: 6px;
11
+ }
12
+ }
6
13
 
7
14
  .saas-card-header {
15
+ display: flex;
8
16
  background: #f7f9fb;
9
17
  border-radius: 6px 6px 0px 0px;
10
18
  border-bottom: 1px solid #dbdee7;
@@ -12,8 +20,19 @@
12
20
  font-size: 16px;
13
21
  color: #0e1822;
14
22
  padding: 8px 16px;
23
+ align-items: center;
24
+ }
25
+ .saas-card-title {
26
+ flex: 1;
27
+ .el-button--text {
28
+ padding: 0;
29
+ }
15
30
  }
16
-
17
31
  .saas-card-content {
18
32
  padding: 16px;
19
33
  }
34
+
35
+ .saas-card-icon {
36
+ cursor: pointer;
37
+ margin-right: 8px;
38
+ }
@@ -19,6 +19,14 @@
19
19
  }
20
20
  }
21
21
 
22
+ .saas-unit-link {
23
+ text-decoration: underline;
24
+ cursor: pointer;
25
+ &:hover {
26
+ color: #1890ff;
27
+ }
28
+ }
29
+
22
30
  .saas-unit-text {
23
31
  width: 0;
24
32
  flex: 1;
@@ -1,11 +1,14 @@
1
1
  <template>
2
- <div class="saas-card">
2
+ <div :class="['saas-card', { 'hidden-card': !isShow }]">
3
3
  <div class="saas-card-header">
4
- <slot name="title">
5
- {{ title }}
6
- </slot>
4
+ <span v-if="isCollapse" :class="[isShow ? 'el-icon-caret-bottom' : 'el-icon-caret-right', 'saas-card-icon']" @click="handleCollapse"></span>
5
+ <div class="saas-card-title">
6
+ <slot name="title">
7
+ {{ title }}
8
+ </slot>
9
+ </div>
7
10
  </div>
8
- <div class="saas-card-content">
11
+ <div v-show="isShow" class="saas-card-content">
9
12
  <slot></slot>
10
13
  </div>
11
14
  </div>
@@ -22,13 +25,23 @@ export default {
22
25
  type: String,
23
26
  default: '',
24
27
  },
28
+ isCollapse: {
29
+ type: Boolean,
30
+ default: false,
31
+ },
25
32
  },
26
33
  data() {
27
- return {};
34
+ return {
35
+ isShow: true,
36
+ };
28
37
  },
29
38
  computed: {},
30
39
  deactivated() {},
31
- methods: {},
40
+ methods: {
41
+ handleCollapse() {
42
+ this.isShow = !this.isShow;
43
+ },
44
+ },
32
45
  };
33
46
  </script>
34
47
  <style lang="scss" scoped></style>
@@ -34,6 +34,16 @@ export default {
34
34
  type: Boolean,
35
35
  default: () => true,
36
36
  },
37
+ placeholder: {
38
+ type: String,
39
+ default() {
40
+ return this.$t('selectGroup.pleaseSelect');
41
+ },
42
+ },
43
+ from: {
44
+ type: String,
45
+ default: 'select',
46
+ },
37
47
  options: {
38
48
  type: Array,
39
49
  default: () => [],
@@ -1,7 +1,10 @@
1
1
  <template>
2
2
  <div class="saas-page-table">
3
3
  <div class="saas-page-table-header">
4
- <div v-if="showTitle" class="saas-page-table-menu" :class="{ hasClose: showClose }">
4
+ <div v-if="$slots.header">
5
+ <slot name="header"></slot>
6
+ </div>
7
+ <div v-else class="saas-page-table-menu" :class="{ hasClose: showClose }">
5
8
  <template v-if="showClose">
6
9
  <div class="saas-page-table-back" @click="goBack">
7
10
  <span class="el-icon-arrow-left"></span>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="saas-unit">
3
3
  <span :class="`saas-unit-${typeCom}`"></span>
4
- <span class="saas-unit-text">
4
+ <span :class="['saas-unit-text', { 'saas-unit-link': isLink }]" @click="handleClick">
5
5
  <slot>
6
6
  {{ getValue }}
7
7
  </slot>
@@ -32,6 +32,7 @@ export default {
32
32
  isShowCode: false,
33
33
  }),
34
34
  },
35
+ isLink: Boolean,
35
36
  },
36
37
  data() {
37
38
  return {};
@@ -68,6 +69,9 @@ export default {
68
69
  goBack() {
69
70
  this.$emit('close');
70
71
  },
72
+ handleClick(e) {
73
+ this.$emit('click', e);
74
+ },
71
75
  },
72
76
  };
73
77
  </script>
@@ -12,7 +12,7 @@ import STable from './STable/index';
12
12
  import SContainer from './SContainer/index';
13
13
  import STablecolumn from './STable/STablecolumn';
14
14
  import * as baseComponents from './SForm';
15
- console.log(baseComponents);
15
+
16
16
  const components = {
17
17
  SDrawer,
18
18
  SDialog,
package/lib/css/index.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";.saas-dialog .btneditclass,.saas-drawer .btneditclass{color:#2c68f8}.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{border-radius:6px}.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-page-title-line,.saas-title-line{display:inline-block;vertical-align:middle}.saas-title-line{width:4px;height:16px;background:#1ed080;margin-right:8px}.saas-detail-back,.saas-page-table-back{border-radius:50%;width:24px;cursor:pointer}.saas-detail-backbox{display:flex;align-items:center;position:absolute;left:24px;top:24px}.saas-detail-back{display:flex;align-items:center;border:1px solid #dbdee7;height:24px;justify-content:center;color:#a1a5b2}.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:8px;white-space:nowrap;color:#0e1822;font-size:14px}.saas-unit-primary{background-color:#1890ff;box-shadow:0 0 0 2px rgba(24,144,255,.2)}.saas-unit-info{background-color:#a1a5b2;box-shadow:0 0 0 2px rgba(161,165,178,.2)}.saas-unit-success{background-color:#2ecc71;box-shadow:0 0 0 2px rgba(46,204,113,.2)}.saas-unit-danger{background-color:#ff3b30;box-shadow:0 0 0 2px rgba(255,59,48,.2)}.saas-unit-warning{background-color:#f90;box-shadow:0 0 0 2px rgba(255,153,0,.2)}.saas-unit-text{width:0;flex:1}.saas-card{border-radius:6px;border:1px solid #dbdee7;margin-bottom:24px}.saas-card-header{background:#f7f9fb;border-radius:6px 6px 0 0;border-bottom:1px solid #dbdee7;font-weight:500;font-size:16px;color:#0e1822;padding:8px 16px}.saas-card-content{padding:16px}.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 .text,.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;border-radius:8px}.message-box{padding:32px 24px 24px;width:480px}.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;position:relative;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{width:4px;height:16px;background:#1ed080;margin-right:8px}.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:1px solid #dbdee7;height:24px;justify-content:center;color:#a1a5b2;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-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 .el-button--text:not(.is-disabled){color:#2c68f8}.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-number,.saas-select-input{display:inline-block;width:100%}.saas-text-mode{display:inline}
1
+ @charset "UTF-8";.saas-card,.saas-dialog .el-dialog{border-radius:6px}.saas-dialog .btneditclass,.saas-drawer .btneditclass{color:#2c68f8}.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-page-title-line,.saas-title-line{display:inline-block;vertical-align:middle}.saas-title-line{width:4px;height:16px;background:#1ed080;margin-right:8px}.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:8px;white-space:nowrap;color:#0e1822;font-size:14px}.saas-unit-primary{background-color:#1890ff;box-shadow:0 0 0 2px rgba(24,144,255,.2)}.saas-unit-info{background-color:#a1a5b2;box-shadow:0 0 0 2px rgba(161,165,178,.2)}.saas-unit-success{background-color:#2ecc71;box-shadow:0 0 0 2px rgba(46,204,113,.2)}.saas-unit-danger{background-color:#ff3b30;box-shadow:0 0 0 2px rgba(255,59,48,.2)}.saas-unit-warning{background-color:#f90;box-shadow:0 0 0 2px rgba(255,153,0,.2)}.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 .text,.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;border-radius:8px}.message-box{padding:32px 24px 24px;width:480px}.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;position:relative;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{width:4px;height:16px;background:#1ed080;margin-right:8px}.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-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 .el-button--text:not(.is-disabled){color:#2c68f8}.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-number,.saas-select-input{display:inline-block;width:100%}.saas-text-mode{display:inline}
@@ -1 +1 @@
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 E})),s.d(a,"SSelect",(function(){return P})),s.d(a,"SInputNumber",(function(){return M})),s.d(a,"SSwitch",(function(){return F}));var n=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)};n._withStripped=!0;var l=s(1),i=s(0);function o(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 r=o({name:"SDrawer",props:{...l.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")}}},n,[],!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:{...l.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.showTitle?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)]),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,"fe71db8e",null).exports,f=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"saas-unit"},[e("span",{class:"saas-unit-"+this.typeCom}),this._v(" "),e("span",{staticClass:"saas-unit-text"},[this._t("default",[this._v("\n "+this._s(this.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})}},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")}}},f,[],!1,null,"0315617a",null).exports,_=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"saas-card"},[e("div",{staticClass:"saas-card-header"},[this._t("title",[this._v("\n "+this._s(this.title)+"\n ")])],2),this._v(" "),e("div",{staticClass:"saas-card-content"},[this._t("default")],2)])};_._withStripped=!0;var b=o({name:"SCard",props:{title:{type:String,default:""},titleSub:{type:String,default:""}},data:()=>({}),computed:{},deactivated(){},methods:{}},_,[],!1,null,"f1b3ff3e",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,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(n.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)};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)}}},g,[],!1,null,"a1243d5a",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"},[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}),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.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")}}},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 A=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)};A._withStripped=!0;var B=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,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(i.formatIfJson)(t.label);break;case"time":e=Object(i.formatSubmitTime)(n,"DD/MM/YYYY");break;default:e=Object(i.formatIfJson)(n)}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)}}},A,[],!1,null,null,null).exports,T=o({name:"STable",props:{...l.Table.props,border:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]}},components:{STablecolumn:B},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 I={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:[I],props:{...Object(i.omit)(l.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,j=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.options,(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)};j._withStripped=!0;var P=o({name:"SSelect",mixins:[I],props:{...Object(i.omit)(l.Select.props,["value","clearable"]),value:{type:[String,Number,Array]},clearable:{type:Boolean,default:()=>!0},options:{type:Array,default:()=>[]},componentType:{type:String,default:"select"}},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)}}},methods:{flattenOptions(t){const e=[];return t.forEach(t=>{t.options?e.push(...t.options):e.push(t)}),e}}},j,[],!1,null,"4fc3a8c8",null).exports,L=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)};L._withStripped=!0;var M=o({name:"SInputNumber",mixins:[I],props:{...Object(i.omit)(l.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:this.value?this.value.toString():""}},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?"":t.toString()}},L,[],!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:[I],props:{...Object(i.omit)(l.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;console.log(a);const G={SDrawer:r,SDialog:c,SPagedetail:d,SUnit:v,SCard:b,SGroup:y,SPagetable:m,STable:T,STableButtons:S,SContainer:V,STablecolumn:B,...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 E})),s.d(a,"SSelect",(function(){return P})),s.d(a,"SInputNumber",(function(){return M})),s.d(a,"SSwitch",(function(){return F}));var n=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)};n._withStripped=!0;var l=s(1),i=s(0);function o(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 r=o({name:"SDrawer",props:{...l.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")}}},n,[],!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:{...l.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,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(n.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)};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)}}},g,[],!1,null,"a1243d5a",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"},[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}),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.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")}}},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,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(i.formatIfJson)(t.label);break;case"time":e=Object(i.formatSubmitTime)(n,"DD/MM/YYYY");break;default:e=Object(i.formatIfJson)(n)}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:{...l.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 I={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:[I],props:{...Object(i.omit)(l.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,j=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.options,(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)};j._withStripped=!0;var P=o({name:"SSelect",mixins:[I],props:{...Object(i.omit)(l.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"}},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)}}},methods:{flattenOptions(t){const e=[];return t.forEach(t=>{t.options?e.push(...t.options):e.push(t)}),e}}},j,[],!1,null,"027950de",null).exports,L=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)};L._withStripped=!0;var M=o({name:"SInputNumber",mixins:[I],props:{...Object(i.omit)(l.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:this.value?this.value.toString():""}},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?"":t.toString()}},L,[],!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:[I],props:{...Object(i.omit)(l.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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chain-saasui",
3
- "version": "1.0.8-alpha.3",
3
+ "version": "1.0.8",
4
4
  "description": "chain-saasui",
5
5
  "author": "Saas",
6
6
  "license": "MIT",
@@ -47,7 +47,7 @@
47
47
  "vue": "2.6.12"
48
48
  },
49
49
  "dependencies": {
50
- "chain-lodash": "^1.0.4",
50
+ "chain-lodash": "^1.0.5",
51
51
  "core-js": "3.8.1",
52
52
  "css-loader": "4.0.0",
53
53
  "element-ui": "^2.15.13",