chain-saasui 1.0.1 → 1.0.3

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.
@@ -0,0 +1,51 @@
1
+ const fs = require('fs');
2
+ const { execSync } = require('child_process');
3
+
4
+ async function updateVersion() {
5
+ try {
6
+ // 1. 读取当前版本
7
+ const packageJson = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
8
+ const currentVersion = packageJson.version;
9
+ const isAlphaVersion = currentVersion.includes('-alpha');
10
+
11
+ // 2. 执行构建
12
+ console.log('🚀 开始构建项目...');
13
+ execSync('npm run build:lib', { stdio: 'inherit' });
14
+ console.log('✅ 构建完成');
15
+
16
+ // 3. 更新版本
17
+ console.log('\n🔄 更新版本号...');
18
+ if (isAlphaVersion) {
19
+ console.log('当前是 alpha 版本,执行 prerelease');
20
+ execSync('npm version prerelease --preid=alpha', { stdio: 'inherit' });
21
+ } else {
22
+ console.log('当前不是 alpha 版本,执行 prepatch 并添加 alpha 后缀');
23
+ execSync('npm version prepatch --preid=alpha', { stdio: 'inherit' });
24
+ }
25
+
26
+ // 4. 获取新版本号
27
+ const updatedPackageJson = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
28
+ const newVersion = updatedPackageJson.version;
29
+
30
+ // 5. Git提交
31
+ console.log('\n💾 提交代码变更...');
32
+ execSync('git add .', { stdio: 'inherit' });
33
+ execSync(`git commit -m "release: v${newVersion}"`, { stdio: 'inherit' });
34
+ console.log('✅ 代码提交完成');
35
+
36
+ // 6. 发布到npm
37
+ console.log('\n📦 发布到npm...');
38
+ execSync('npm publish --access public', { stdio: 'inherit' });
39
+ console.log(`🎉 成功发布 v${newVersion} 到npm`);
40
+
41
+ // 7. 推送git标签
42
+ console.log('\n🏷️ 推送git标签...');
43
+ execSync('git push --follow-tags', { stdio: 'inherit' });
44
+ console.log('✅ 标签推送完成');
45
+ } catch (error) {
46
+ console.error('\n❌ 发布流程出错:', error.message);
47
+ process.exit(1);
48
+ }
49
+ }
50
+
51
+ updateVersion();
@@ -0,0 +1,44 @@
1
+ const fs = require('fs');
2
+ const { execSync } = require('child_process');
3
+
4
+ async function releaseProduction() {
5
+ try {
6
+ // 1. 读取当前版本
7
+ const packageJson = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
8
+ const currentVersion = packageJson.version;
9
+
10
+ // 2. 执行构建
11
+ console.log('🚀 开始构建项目...');
12
+ execSync('npm run build:lib', { stdio: 'inherit' });
13
+ console.log('✅ 构建完成');
14
+
15
+ // 3. 更新版本号(使用标准的 patch/minor/major 更新)
16
+ console.log('\n🔄 更新版本号...');
17
+ execSync('npm version patch', { stdio: 'inherit' }); // 可根据需要改为 minor 或 major
18
+
19
+ // 4. 获取新版本号
20
+ const updatedPackageJson = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
21
+ const newVersion = updatedPackageJson.version;
22
+
23
+ // 5. Git提交
24
+ console.log('\n💾 提交代码变更...');
25
+ execSync('git add .', { stdio: 'inherit' });
26
+ execSync(`git commit -m "release: v${newVersion}"`, { stdio: 'inherit' });
27
+ console.log('✅ 代码提交完成');
28
+
29
+ // 6. 发布到npm
30
+ console.log('\n📦 发布到npm...');
31
+ execSync('npm publish --access public', { stdio: 'inherit' });
32
+ console.log(`🎉 成功发布正式版 v${newVersion} 到npm`);
33
+
34
+ // 7. 推送git标签
35
+ console.log('\n🏷️ 推送git标签...');
36
+ execSync('git push --follow-tags', { stdio: 'inherit' });
37
+ console.log('✅ 标签推送完成');
38
+ } catch (error) {
39
+ console.error('\n❌ 发布流程出错:', error.message);
40
+ process.exit(1);
41
+ }
42
+ }
43
+
44
+ releaseProduction();
@@ -11,31 +11,24 @@
11
11
  </div>
12
12
  </template>
13
13
  <script>
14
- import { omit } from "chain-lodash";
15
14
  export default {
16
- name: "SCard",
15
+ name: 'SCard',
17
16
  props: {
18
17
  title: {
19
18
  type: String,
20
- default: "",
19
+ default: '',
21
20
  },
22
21
  titleSub: {
23
22
  type: String,
24
- default: "",
23
+ default: '',
25
24
  },
26
25
  },
27
26
  data() {
28
27
  return {};
29
28
  },
30
- computed: {
31
-
32
- },
33
- deactivated() {
34
- },
35
- methods: {
36
-
37
- },
29
+ computed: {},
30
+ deactivated() {},
31
+ methods: {},
38
32
  };
39
33
  </script>
40
- <style lang="scss" scoped>
41
- </style>
34
+ <style lang="scss" scoped></style>
@@ -12,7 +12,6 @@
12
12
  </div>
13
13
  </template>
14
14
  <script>
15
- import { omit } from 'chain-lodash';
16
15
  export default {
17
16
  name: 'SContainer',
18
17
  props: {
@@ -3,23 +3,25 @@
3
3
  <template v-if="$slots.title" slot="title">
4
4
  <slot name="title"></slot>
5
5
  </template>
6
- <div class="saas-dialog-content" :class="{'saas-dialog-auto':isAuto}">
6
+ <div class="saas-dialog-content" :class="{ 'saas-dialog-auto': isAuto }">
7
7
  <slot></slot>
8
8
  </div>
9
9
  <template v-if="showFooter" slot="footer">
10
10
  <slot v-if="$slots.footer" name="footer"></slot>
11
11
  <div v-else>
12
12
  <el-button v-if="showCancelButton" @click="handleClose">{{ cancelText }}</el-button>
13
- <el-button v-if="showConfirmButton" :loading="loadingBtn" type="primary" @click="handleSubmit" v-preventReClick="5000">{{confirmText}}</el-button>
13
+ <el-button v-if="showConfirmButton" :loading="loadingBtn" type="primary" @click="handleSubmit" v-preventReClick="5000">
14
+ {{ confirmText }}
15
+ </el-button>
14
16
  </div>
15
17
  </template>
16
18
  </el-dialog>
17
19
  </template>
18
20
  <script>
19
- import { Dialog } from "element-ui";
20
- import { omit } from "chain-lodash";
21
+ import { Dialog } from 'element-ui';
22
+ import { omit } from 'chain-lodash';
21
23
  export default {
22
- name: "SDialog",
24
+ name: 'SDialog',
23
25
  props: {
24
26
  ...Dialog.props,
25
27
  showFooter: {
@@ -28,7 +30,7 @@ export default {
28
30
  },
29
31
  width: {
30
32
  type: [String, Number],
31
- default: () => "600px",
33
+ default: () => '600px',
32
34
  },
33
35
  // closeOnClickModal: {
34
36
  // type: Boolean,
@@ -53,13 +55,13 @@ export default {
53
55
  confirmText: {
54
56
  type: String,
55
57
  default() {
56
- return this.$t("buttonGroup.sure");
58
+ return this.$t('buttonGroup.sure');
57
59
  },
58
60
  },
59
61
  cancelText: {
60
62
  type: String,
61
63
  default() {
62
- return this.$t("buttonGroup.cancel");
64
+ return this.$t('buttonGroup.cancel');
63
65
  },
64
66
  },
65
67
  isAuto: {
@@ -76,23 +78,23 @@ export default {
76
78
  return this.visible;
77
79
  },
78
80
  set(val) {
79
- this.$emit("update:visible", val);
81
+ this.$emit('update:visible', val);
80
82
  },
81
83
  },
82
84
  bindProps() {
83
- return omit(this.$props, ["visible"]);
85
+ return omit(this.$props, ['visible']);
84
86
  },
85
87
  },
86
88
  deactivated() {
87
- this.handleClose() // 在缓存组件时关闭弹窗
89
+ this.handleClose(); // 在缓存组件时关闭弹窗
88
90
  },
89
91
  methods: {
90
92
  handleSubmit() {
91
- this.$emit("confirm");
93
+ this.$emit('confirm');
92
94
  },
93
95
  handleClose() {
94
- this.$emit("update:visible", false);
95
- this.$emit("close");
96
+ this.$emit('update:visible', false);
97
+ this.$emit('close');
96
98
  },
97
99
  },
98
100
  };
@@ -10,16 +10,18 @@
10
10
  <slot v-if="$slots.footer" name="footer"></slot>
11
11
  <template v-else>
12
12
  <el-button v-if="showCancelButton" @click="handleClose">{{ cancelText }}</el-button>
13
- <el-button v-if="showConfirmButton" :loading="loadingBtn" type="primary" @click="handleSubmit" v-preventReClick="5000">{{confirmText}}</el-button>
13
+ <el-button v-if="showConfirmButton" :loading="loadingBtn" type="primary" @click="handleSubmit" v-preventReClick="5000">
14
+ {{ confirmText }}
15
+ </el-button>
14
16
  </template>
15
17
  </div>
16
18
  </el-drawer>
17
19
  </template>
18
20
  <script>
19
- import { Drawer } from "element-ui";
20
- import { omit } from "chain-lodash";
21
+ import { Drawer } from 'element-ui';
22
+ import { omit } from 'chain-lodash';
21
23
  export default {
22
- name: "SDrawer",
24
+ name: 'SDrawer',
23
25
  props: {
24
26
  ...Drawer.props,
25
27
  showFooter: {
@@ -28,7 +30,7 @@ export default {
28
30
  },
29
31
  size: {
30
32
  type: [String, Number],
31
- default: () => "800px",
33
+ default: () => '800px',
32
34
  },
33
35
  wrapperClosable: {
34
36
  type: Boolean,
@@ -53,13 +55,13 @@ export default {
53
55
  confirmText: {
54
56
  type: String,
55
57
  default() {
56
- return this.$t("buttonGroup.sure");
58
+ return this.$t('buttonGroup.sure');
57
59
  },
58
60
  },
59
61
  cancelText: {
60
62
  type: String,
61
63
  default() {
62
- return this.$t("buttonGroup.cancel");
64
+ return this.$t('buttonGroup.cancel');
63
65
  },
64
66
  },
65
67
  },
@@ -72,11 +74,11 @@ export default {
72
74
  return this.visible;
73
75
  },
74
76
  set(val) {
75
- this.$emit("update:visible", val);
77
+ this.$emit('update:visible', val);
76
78
  },
77
79
  },
78
80
  bindProps() {
79
- return omit(this.$props, ["visible"]);
81
+ return omit(this.$props, ['visible']);
80
82
  },
81
83
  },
82
84
  deactivated() {
@@ -84,11 +86,11 @@ export default {
84
86
  },
85
87
  methods: {
86
88
  handleSubmit() {
87
- this.$emit("confirm");
89
+ this.$emit('confirm');
88
90
  },
89
91
  handleClose() {
90
- this.$emit("update:visible", false);
91
- this.$emit("close");
92
+ this.$emit('update:visible', false);
93
+ this.$emit('close');
92
94
  },
93
95
  },
94
96
  };
@@ -1,33 +1,37 @@
1
1
  <template>
2
2
  <div class="saas-group">
3
- <div class="saas-sort-group" v-for="(group,index) in list" :key="index">
4
- <div v-for="(item,index) in group.children" :key="index" class="saas-sort-item" :class="{active: getActive(item , group)}" @click="handleClick(item,group)">
5
- <div class="title" :style="getSortStyle(item)">{{item.formatValue(item,data)}}</div>
3
+ <div class="saas-sort-group" v-for="(group, index) in list" :key="index">
4
+ <div
5
+ v-for="(item, index) in group.children"
6
+ :key="index"
7
+ class="saas-sort-item"
8
+ :class="{ active: getActive(item, group) }"
9
+ @click="handleClick(item, group)">
10
+ <div class="title" :style="getSortStyle(item)">{{ item.formatValue(item, data) }}</div>
6
11
  <div class="text">
7
12
  <span>
8
13
  <slot :item="item">
9
- {{item.label}}
14
+ {{ item.label }}
10
15
  <el-tooltip v-if="item.tip" :content="item.tip">
11
16
  <div slot="content" v-html="item.tip"></div>
12
- <i style="color:#A1A5B2;margin-left:4px" class="smart-info-filled"> </i>
17
+ <i style="color: #a1a5b2; margin-left: 4px" class="smart-info-filled"></i>
13
18
  </el-tooltip>
14
19
  </slot>
15
20
  </span>
16
-
17
21
  </div>
18
- <img src="./icon_rtsuc.png" alt="" srcset="">
22
+ <img src="./icon_rtsuc.png" alt="" srcset="" />
19
23
  </div>
20
24
  </div>
21
25
  </div>
22
26
  </template>
23
27
  <script>
24
- import { omit } from "chain-lodash";
28
+ import { omit } from 'chain-lodash';
25
29
  export default {
26
- name: "SGroup",
30
+ name: 'SGroup',
27
31
  props: {
28
32
  title: {
29
33
  type: String,
30
- default: "",
34
+ default: '',
31
35
  },
32
36
  list: {
33
37
  type: Array,
@@ -35,47 +39,43 @@ export default {
35
39
  },
36
40
  data: {
37
41
  type: Object,
38
- default: () => ({})
42
+ default: () => ({}),
39
43
  },
40
44
  isActive: {
41
45
  type: Function,
42
- default: null
43
- }
46
+ default: null,
47
+ },
44
48
  },
45
49
  data() {
46
50
  return {};
47
51
  },
48
- computed: {
49
-
50
- },
51
- deactivated() {
52
- },
52
+ computed: {},
53
+ deactivated() {},
53
54
  methods: {
54
55
  getSortStyle(item) {
55
56
  let obj = {};
56
- if (item.type === "percent") {
57
+ if (item.type === 'percent') {
57
58
  const num = this.data[item.field];
58
59
  if (num <= 30) {
59
- obj.color = "#FF3B30";
60
+ obj.color = '#FF3B30';
60
61
  } else if (num <= 60) {
61
- obj.color = "#FF9900";
62
+ obj.color = '#FF9900';
62
63
  } else {
63
- obj.color = "#28B86A";
64
+ obj.color = '#28B86A';
64
65
  }
65
66
  }
66
67
  return obj;
67
68
  },
68
69
  handleClick(item, group) {
69
- this.$emit('tab-click', item, group)
70
+ this.$emit('tab-click', item, group);
70
71
  },
71
72
  getActive(item, group) {
72
73
  if (this.isActive) {
73
- return this.isActive(item, group)
74
+ return this.isActive(item, group);
74
75
  }
75
76
  return false;
76
- }
77
+ },
77
78
  },
78
79
  };
79
80
  </script>
80
- <style lang="scss" scoped>
81
- </style>
81
+ <style lang="scss" scoped></style>
@@ -18,8 +18,8 @@
18
18
  </div>
19
19
  </div>
20
20
  <div class="message-box__footer">
21
- <el-button v-if="showCancelButton" @click="handleCancel" size="mini">{{cancelText}}</el-button>
22
- <el-button @click="handleConfirm" type="primary" size="mini">{{confirmText}}</el-button>
21
+ <el-button v-if="showCancelButton" @click="handleCancel" size="mini">{{ cancelText }}</el-button>
22
+ <el-button @click="handleConfirm" type="primary" size="mini">{{ confirmText }}</el-button>
23
23
  </div>
24
24
  </div>
25
25
  </div>
@@ -27,12 +27,10 @@
27
27
  </template>
28
28
 
29
29
  <script>
30
- import { isEmpty } from "chain-lodash";
30
+ import { isEmpty } from 'chain-lodash';
31
31
  export default {
32
32
  name: 'SMessageBox',
33
- props: {
34
-
35
- },
33
+ props: {},
36
34
  data() {
37
35
  return {
38
36
  visible: false,
@@ -44,8 +42,8 @@ export default {
44
42
  showCancelButton: false,
45
43
  resolve: null,
46
44
  reject: null,
47
- confirmText: "",
48
- cancelText: "",
45
+ confirmText: '',
46
+ cancelText: '',
49
47
  dangerouslyUseHTMLString: false,
50
48
  };
51
49
  },
@@ -14,10 +14,10 @@
14
14
  <slot name="title"></slot>
15
15
  </template>
16
16
  <span v-else>
17
- {{title}}
17
+ {{ title }}
18
18
  </span>
19
19
  </div>
20
- <div v-if="titleSub" class="saas-detail-sub">{{titleSub}}</div>
20
+ <div v-if="titleSub" class="saas-detail-sub">{{ titleSub }}</div>
21
21
  </div>
22
22
  <slot name="header-append"></slot>
23
23
  </div>
@@ -30,16 +30,15 @@
30
30
  <slot v-if="$slots.footer" name="footer"></slot>
31
31
  <template v-else>
32
32
  <el-button @click="handleClose">{{ cancelText }}</el-button>
33
- <el-button :loading="loadingBtn" type="primary" @click="handleSubmit" v-preventReClick="5000">{{confirmText}}</el-button>
33
+ <el-button :loading="loadingBtn" type="primary" @click="handleSubmit" v-preventReClick="5000">{{ confirmText }}</el-button>
34
34
  </template>
35
35
  </div>
36
36
  </template>
37
37
  </div>
38
38
  </template>
39
39
  <script>
40
- import { omit } from "chain-lodash";
41
40
  export default {
42
- name: "SPagedetail",
41
+ name: 'SPagedetail',
43
42
  props: {
44
43
  showFooter: {
45
44
  type: Boolean,
@@ -56,28 +55,28 @@ export default {
56
55
  computeStyle: {
57
56
  type: Object,
58
57
  default: () => ({
59
- width: "1000px",
60
- margin: "0 auto",
58
+ width: '1000px',
59
+ margin: '0 auto',
61
60
  }),
62
61
  },
63
62
  title: {
64
63
  type: String,
65
- default: "",
64
+ default: '',
66
65
  },
67
66
  titleSub: {
68
67
  type: String,
69
- default: "",
68
+ default: '',
70
69
  },
71
70
  confirmText: {
72
71
  type: String,
73
72
  default() {
74
- return this.$t("buttonGroup.sure");
73
+ return this.$t('buttonGroup.sure');
75
74
  },
76
75
  },
77
76
  cancelText: {
78
77
  type: String,
79
78
  default() {
80
- return this.$t("buttonGroup.cancel");
79
+ return this.$t('buttonGroup.cancel');
81
80
  },
82
81
  },
83
82
  },
@@ -90,7 +89,7 @@ export default {
90
89
  return this.visible;
91
90
  },
92
91
  set(val) {
93
- this.$emit("update:visible", val);
92
+ this.$emit('update:visible', val);
94
93
  },
95
94
  },
96
95
  },
@@ -99,16 +98,15 @@ export default {
99
98
  },
100
99
  methods: {
101
100
  handleSubmit() {
102
- this.$emit("confirm");
101
+ this.$emit('confirm');
103
102
  },
104
103
  handleClose() {
105
- this.$emit("close");
104
+ this.$emit('close');
106
105
  },
107
106
  goBack() {
108
- this.$emit("close");
107
+ this.$emit('close');
109
108
  },
110
109
  },
111
110
  };
112
111
  </script>
113
- <style lang="scss" scoped>
114
- </style>
112
+ <style lang="scss" scoped></style>
@@ -7,18 +7,17 @@
7
7
  <span class="el-icon-arrow-left"></span>
8
8
  </div>
9
9
  </div>
10
- <div class="saas-pagestep-titlebox" :style="{width:width}">
10
+ <div class="saas-pagestep-titlebox" :style="{ width: width }">
11
11
  <div class="saas-pagestep-title">
12
12
  <span class="saas-title-line"></span>
13
13
  <template v-if="$slots.title">
14
14
  <slot name="title"></slot>
15
15
  </template>
16
16
  <span v-else>
17
- {{title}}
17
+ {{ title }}
18
18
  </span>
19
19
  </div>
20
20
  </div>
21
-
22
21
  </div>
23
22
  <div class="saas-pagestep-content">
24
23
  <slot></slot>
@@ -27,9 +26,8 @@
27
26
  </div>
28
27
  </template>
29
28
  <script>
30
- import { omit } from "chain-lodash";
31
29
  export default {
32
- name: "SPagestep",
30
+ name: 'SPagestep',
33
31
  props: {
34
32
  showFooter: {
35
33
  type: Boolean,
@@ -41,26 +39,26 @@ export default {
41
39
  },
42
40
  width: {
43
41
  type: String,
44
- default: "1000px",
42
+ default: '1000px',
45
43
  },
46
44
  title: {
47
45
  type: String,
48
- default: "",
46
+ default: '',
49
47
  },
50
48
  titleSub: {
51
49
  type: String,
52
- default: "",
50
+ default: '',
53
51
  },
54
52
  confirmText: {
55
53
  type: String,
56
54
  default() {
57
- return this.$t("buttonGroup.sure");
55
+ return this.$t('buttonGroup.sure');
58
56
  },
59
57
  },
60
58
  cancelText: {
61
59
  type: String,
62
60
  default() {
63
- return this.$t("buttonGroup.cancel");
61
+ return this.$t('buttonGroup.cancel');
64
62
  },
65
63
  },
66
64
  },
@@ -73,7 +71,7 @@ export default {
73
71
  return this.visible;
74
72
  },
75
73
  set(val) {
76
- this.$emit("update:visible", val);
74
+ this.$emit('update:visible', val);
77
75
  },
78
76
  },
79
77
  },
@@ -82,16 +80,15 @@ export default {
82
80
  },
83
81
  methods: {
84
82
  handleSubmit() {
85
- this.$emit("confirm");
83
+ this.$emit('confirm');
86
84
  },
87
85
  handleClose() {
88
- this.$emit("close");
86
+ this.$emit('close');
89
87
  },
90
88
  goBack() {
91
- this.$emit("close");
89
+ this.$emit('close');
92
90
  },
93
91
  },
94
92
  };
95
93
  </script>
96
- <style lang="scss" scoped>
97
- </style>
94
+ <style lang="scss" scoped></style>
@@ -31,7 +31,6 @@
31
31
  </div>
32
32
  </template>
33
33
  <script>
34
- import { omit } from 'chain-lodash';
35
34
  export default {
36
35
  name: 'SPagetable',
37
36
  props: {
@@ -16,6 +16,11 @@
16
16
  {{ getIndex($index) }}
17
17
  </slot>
18
18
  </template>
19
+ <template v-else-if="column.type === 'operate'" #default="scope">
20
+ <slot :name="column.value" v-bind="getBindProps(scope)">
21
+ <s-table-buttons :list="column.actionList" :row="row" @action="handleAction"></s-table-buttons>
22
+ </slot>
23
+ </template>
19
24
  <template v-else #default="scope">
20
25
  <slot :name="column.value" v-bind="getBindProps(scope)">
21
26
  {{ selectValue(scope.row) }}
@@ -40,8 +45,10 @@ export default {
40
45
  },
41
46
  computed: {
42
47
  columnProps() {
48
+ const { type = null, fixed = null } = this.column;
43
49
  return {
44
50
  ...this.column,
51
+ fixed: fixed ? fixed : type === 'operate' ? 'right' : null,
45
52
  'min-width': this.column.minWidth || this.minWidth,
46
53
  prop: this.column.value,
47
54
  label: this.column.label,
@@ -86,6 +93,9 @@ export default {
86
93
  getIndex($index) {
87
94
  return this.indexMethod ? this.indexMethod($index) : $index + 1;
88
95
  },
96
+ handleAction(actionName, row) {
97
+ this.$emit('action', actionName, row, this.column);
98
+ },
89
99
  },
90
100
  };
91
101
  </script>
@@ -1,11 +1,14 @@
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"></STablecolumn>
4
+ <STablecolumn v-for="column in columns" :key="column.value" :column="column" @action="handleColumnAction">
5
+ <template :slot="column.value" slot-scope="scope">
6
+ <slot :name="column.value" v-bind="getBindProps(scope, column)"></slot>
7
+ </template>
8
+ </STablecolumn>
5
9
  </el-table>
6
10
  </template>
7
11
  <script>
8
- import { omit } from 'chain-lodash';
9
12
  import { Table } from 'element-ui';
10
13
  import STablecolumn from './STablecolumn.vue';
11
14
  export default {
@@ -29,6 +32,17 @@ export default {
29
32
  },
30
33
  computed: {},
31
34
  deactivated() {},
32
- methods: {},
35
+ methods: {
36
+ // 处理操作列事件
37
+ handleColumnAction(actionName, row, column) {
38
+ this.$emit('action', actionName, row, column);
39
+ },
40
+ getBindProps(params, column) {
41
+ return {
42
+ ...params,
43
+ column,
44
+ };
45
+ },
46
+ },
33
47
  };
34
48
  </script>
@@ -3,21 +3,20 @@
3
3
  <span :class="`saas-unit-${typeCom}`"></span>
4
4
  <span class="saas-unit-text">
5
5
  <slot>
6
- {{getValue}}
6
+ {{ getValue }}
7
7
  </slot>
8
8
  </span>
9
-
10
9
  </div>
11
10
  </template>
12
11
  <script>
13
- import { isEmpty, getOptionValue } from "chain-lodash";
12
+ import { isEmpty, getOptionValue } from 'chain-lodash';
14
13
  export default {
15
- name: "SUnit",
14
+ name: 'SUnit',
16
15
  props: {
17
16
  value: [String, Number],
18
17
  type: {
19
18
  type: String,
20
- default: "",
19
+ default: '',
21
20
  },
22
21
  options: {
23
22
  type: Array,
@@ -26,10 +25,10 @@ export default {
26
25
  props: {
27
26
  type: Object,
28
27
  default: () => ({
29
- value: "value",
30
- label: "label",
31
- style: "style",
32
- type: "",
28
+ value: 'value',
29
+ label: 'label',
30
+ style: 'style',
31
+ type: '',
33
32
  isShowCode: false,
34
33
  }),
35
34
  },
@@ -40,36 +39,35 @@ export default {
40
39
  computed: {
41
40
  typeCom() {
42
41
  if (!isEmpty(this.value)) {
43
- const style = this.props.style || "style";
42
+ const style = this.props.style || 'style';
44
43
  return (
45
44
  getOptionValue(this.options, this.value, {
46
45
  ...this.props,
47
46
  label: style,
48
- }) || "primary"
47
+ }) || 'primary'
49
48
  );
50
49
  } else {
51
- return this.type || "primary";
50
+ return this.type || 'primary';
52
51
  }
53
52
  },
54
53
  getValue() {
55
54
  if (!isEmpty(this.value)) {
56
55
  return getOptionValue(this.options, this.value, this.props);
57
56
  }
58
- return "";
57
+ return '';
59
58
  },
60
59
  },
61
60
  methods: {
62
61
  handleSubmit() {
63
- this.$emit("confirm");
62
+ this.$emit('confirm');
64
63
  },
65
64
  handleClose() {
66
- this.$emit("close");
65
+ this.$emit('close');
67
66
  },
68
67
  goBack() {
69
- this.$emit("close");
68
+ this.$emit('close');
70
69
  },
71
70
  },
72
71
  };
73
72
  </script>
74
- <style lang="scss" scoped>
75
- </style>
73
+ <style lang="scss" scoped></style>
@@ -1 +1 @@
1
- module.exports=function(t){var e={};function s(a){if(e[a])return e[a].exports;var i=e[a]={i:a,l:!1,exports:{}};return t[a].call(i.exports,i,i.exports,s),i.l=!0,i.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 i in t)s.d(a,i,function(e){return t[e]}.bind(null,i));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=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(t._s(t.confirmText))]):t._e()]],2):t._e()],2)};a._withStripped=!0;var i=s(1),n=s(0);function l(t,e,s,a,i,n,l,o){var r,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=s,c._compiled=!0),a&&(c.functional=!0),n&&(c._scopeId="data-v-"+n),l?(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__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(l)},c._ssrRegister=r):i&&(r=o?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),r)if(c.functional){c._injectStyles=r;var u=c.render;c.render=function(t,e){return r.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,r):[r]}return{exports:t,options:c}}var o=l({name:"SDrawer",props:{...i.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(n.omit)(this.$props,["visible"])}},deactivated(){this.handleClose()},methods:{handleSubmit(){this.$emit("confirm")},handleClose(){this.$emit("update:visible",!1),this.$emit("close")}}},a,[],!1,null,null,null).exports,r=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(t._s(t.confirmText))]):t._e()],1)],2):t._e()],2)};r._withStripped=!0;var c=l({name:"SDialog",props:{...i.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(n.omit)(this.$props,["visible"])}},deactivated(){this.handleClose()},methods:{handleSubmit(){this.$emit("confirm")},handleClose(){this.$emit("update:visible",!1),this.$emit("close")}}},r,[],!1,null,null,null).exports,u=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)};u._withStripped=!0;var d=l({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")}}},u,[],!1,null,"cc91abf8",null).exports,p=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"},[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)])};p._withStripped=!0;var h=l({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")}}},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,"22871061",null).exports,m=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)])};m._withStripped=!0;var _=l({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(n.isEmpty)(this.value))return this.type||"primary";{const t=this.props.style||"style";return Object(n.getOptionValue)(this.options,this.value,{...this.props,label:t})||"primary"}},getValue(){return Object(n.isEmpty)(this.value)?"":Object(n.getOptionValue)(this.options,this.value,this.props)}},methods:{handleSubmit(){this.$emit("confirm")},handleClose(){this.$emit("close")},goBack(){this.$emit("close")}}},m,[],!1,null,"954ef952",null).exports,f=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)])};f._withStripped=!0;var v=l({name:"SCard",props:{title:{type:String,default:""},titleSub:{type:String,default:""}},data:()=>({}),computed:{},deactivated(){},methods:{}},f,[],!1,null,"2989311e",null).exports,b=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"saas-group"},t._l(t.list,(function(e,i){return a("div",{key:i,staticClass:"saas-sort-group"},t._l(e.children,(function(i,n){return a("div",{key:n,staticClass:"saas-sort-item",class:{active:t.getActive(i,e)},on:{click:function(s){return t.handleClick(i,e)}}},[a("div",{staticClass:"title",style:t.getSortStyle(i)},[t._v(t._s(i.formatValue(i,t.data)))]),t._v(" "),a("div",{staticClass:"text"},[a("span",[t._t("default",[t._v("\n "+t._s(i.label)+"\n "),i.tip?a("el-tooltip",{attrs:{content:i.tip}},[a("div",{attrs:{slot:"content"},domProps:{innerHTML:t._s(i.tip)},slot:"content"}),t._v(" "),a("i",{staticClass:"smart-info-filled",staticStyle:{color:"#A1A5B2","margin-left":"4px"}})]):t._e()],{item:i})],2)]),t._v(" "),a("img",{attrs:{src:s(2),alt:"",srcset:""}})])})),0)})),0)};b._withStripped=!0;var g=l({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)}}},b,[],!1,null,"dca34130",null).exports,y=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)};y._withStripped=!0;var C=l({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(n.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)}}},y,[],!1,null,null,null).exports,w=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()])};w._withStripped=!0;var S=l({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(n.isEmpty)(t.showClose)||t.showClose,this.showInput=t.showInput||!1,this.dangerouslyUseHTMLString=t.dangerouslyUseHTMLString||!1,this.inputPlaceholder=t.inputPlaceholder||"",this.showCancelButton=!!Object(n.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")}}},w,[],!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(t){return s("STablecolumn",{key:t.value,attrs:{column:t}})}))],2)};x._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})]}}:{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 T=l({name:"STablecolumn",components:{},props:{column:Object,minWidth:{type:[Number,String],default:150}},data:()=>({}),computed:{columnProps(){return{...this.column,"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,i=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==i)||{};e=Object(n.formatIfJson)(t.label);break;case"time":e=Object(n.formatSubmitTime)(i,"DD/MM/YYYY");break;default:e=Object(n.formatIfJson)(i)}return Object(n.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}}},A,[],!1,null,null,null).exports,$=l({name:"STable",props:{...i.Table.props,border:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]}},components:{STablecolumn:T},data:()=>({}),computed:{},deactivated(){},methods:{}},x,[],!1,null,null,null).exports,B=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)])};B._withStripped=!0;const k={SDrawer:o,SDialog:c,SPagedetail:d,SUnit:_,SCard:v,SGroup:g,SPagetable:h,STable:$,STableButtons:C,SContainer:l({name:"SContainer",props:{title:{type:String,default:""},titleSub:{type:String,default:""}},data:()=>({}),computed:{},deactivated(){},methods:{}},B,[],!1,null,"25380089",null).exports,STablecolumn:T},O=function(t){O.installed||Object.keys(k).forEach(e=>{t.component(k[e].name,k[e])})};"undefined"!=typeof window&&window.Vue&&O(window.Vue);e.default={version:"1.0.0",install:O,SMessagebox:class{constructor(t,e,s=S){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})}},...k}}]).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=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)};a._withStripped=!0;var n=s(1),i=s(0);function l(t,e,s,a,n,i,l,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),i&&(u._scopeId="data-v-"+i),l?(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(l)},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 d=u.beforeCreate;u.beforeCreate=d?[].concat(d,r):[r]}return{exports:t,options:u}}var o=l({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")}}},a,[],!1,null,null,null).exports,r=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)};r._withStripped=!0;var u=l({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")}}},r,[],!1,null,null,null).exports,c=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)};c._withStripped=!0;var d=l({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")}}},c,[],!1,null,"063e3770",null).exports,p=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"},[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)])};p._withStripped=!0;var h=l({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")}}},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,"2d56a17e",null).exports,m=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)])};m._withStripped=!0;var _=l({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(){return Object(i.isEmpty)(this.value)?"":Object(i.getOptionValue)(this.options,this.value,this.props)}},methods:{handleSubmit(){this.$emit("confirm")},handleClose(){this.$emit("close")},goBack(){this.$emit("close")}}},m,[],!1,null,"8090ca06",null).exports,f=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)])};f._withStripped=!0;var v=l({name:"SCard",props:{title:{type:String,default:""},titleSub:{type:String,default:""}},data:()=>({}),computed:{},deactivated(){},methods:{}},f,[],!1,null,"f1b3ff3e",null).exports,b=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,i){return a("div",{key:i,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)};b._withStripped=!0;var g=l({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)}}},b,[],!1,null,"a1243d5a",null).exports,y=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)};y._withStripped=!0;var C=l({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)}}},y,[],!1,null,null,null).exports,w=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()])};w._withStripped=!0;var S=l({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")}}},w,[],!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},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 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:t.row},on:{action:t.handleAction}})],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 $=l({name:"STablecolumn",components:{},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=l({name:"STable",props:{...n.Table.props,border:{type:Boolean,default:!0},columns:{type:Array,default:()=>[]}},components:{STablecolumn:$},data:()=>({}),computed:{},deactivated(){},methods:{handleColumnAction(t,e,s){this.$emit("action",t,e,s)},getBindProps:(t,e)=>({...t,column:e})}},x,[],!1,null,null,null).exports,B=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)])};B._withStripped=!0;const k={SDrawer:o,SDialog:u,SPagedetail:d,SUnit:_,SCard:v,SGroup:g,SPagetable:h,STable:T,STableButtons:C,SContainer:l({name:"SContainer",props:{title:{type:String,default:""},titleSub:{type:String,default:""}},data:()=>({}),computed:{},deactivated(){},methods:{}},B,[],!1,null,"2036a697",null).exports,STablecolumn:$},O=function(t){O.installed||Object.keys(k).forEach(e=>{t.component(k[e].name,k[e])})};"undefined"!=typeof window&&window.Vue&&O(window.Vue);e.default={version:"1.0.0",install:O,SMessagebox:class{constructor(t,e,s=S){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})}},...k}}]).default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chain-saasui",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "chain-saasui",
5
5
  "author": "Saas",
6
6
  "license": "MIT",
@@ -15,7 +15,9 @@
15
15
  "build:commondev": "set NODE_ENV=development && webpack --config ./build/webpack.common.js",
16
16
  "build:css": "npx gulp sass",
17
17
  "build:lib": "npm run build:css && npm run build:common",
18
- "build:libdiv": "npm run build:css && npm run build:commondev"
18
+ "build:libdiv": "npm run build:css && npm run build:commondev",
19
+ "version:alpha": "node ./build/version-update.js",
20
+ "version:patch": "node ./build/version-patch.js"
19
21
  },
20
22
  "husky": {
21
23
  "hooks": {