htui-yllkbz 1.3.35 → 1.3.38

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.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "htui-yllkbz",
3
- "version": "1.3.35",
3
+ "version": "1.3.38",
4
4
  "port": "8082",
5
5
  "typings": "types/index.d.ts",
6
6
  "main": "lib/htui.common.js",
@@ -13,10 +13,11 @@
13
13
  :disabled="!!disabled"
14
14
  class="component-item"
15
15
  :class="comClass"
16
+ style="width:100%"
16
17
  :style="comStyle || ''"
17
18
  :filterable="!state.configJson['departmentId'].multiple"
18
19
  :clearable="state.configJson['departmentId'].clearable"
19
- :placeholder="`请选择部门`"
20
+ :placeholder="placeholder || `请选择部门`"
20
21
  :collapse-tags="state.configJson['departmentId'].collapseTags"
21
22
  v-model="state.selectVal['departmentId']"
22
23
  :show-all-levels="state.configJson['departmentId'].showAllLevels"
@@ -39,8 +40,9 @@
39
40
  v-if="state.configJson['departmentId'].panel"
40
41
  class="component-item"
41
42
  :class="comClass"
43
+ style="width:100%"
42
44
  :style="comStyle || ''"
43
- :placeholder="`请选择部门`"
45
+ :placeholder="placeholder || `请选择部门`"
44
46
  v-model="state.selectVal['departmentId']"
45
47
  :props="{
46
48
  label: 'name',
@@ -63,11 +65,12 @@
63
65
  <!-- 选择人员 -->
64
66
  <el-select
65
67
  v-model="state.selectVal['userId']"
66
- placeholder="请选择人员"
68
+ :placeholder="placeholder || '请选择人员'"
67
69
  :filterable="!state.configJson['userId'].multiple"
68
70
  :disabled="!!disabled"
69
71
  :style="comStyle || ''"
70
72
  class="component-item"
73
+ style="width:100%"
71
74
  @click.native="selectClick($event)"
72
75
  v-if="state.configJson['userId'] && state.configJson['userId'].show"
73
76
  :multiple="state.configJson['userId'].multiple"
@@ -114,11 +117,12 @@
114
117
  v-if="!state.configJson['departmentUser'].panel"
115
118
  :disabled="!!disabled"
116
119
  class="component-item"
120
+ style="width:100%"
117
121
  :filterable="!state.configJson['departmentUser'].multiple"
118
122
  :class="comClass"
119
123
  :style="comStyle || ''"
120
124
  :clearable="state.configJson['departmentUser'].clearable"
121
- :placeholder="`请选择部门下人员`"
125
+ :placeholder="placeholder || `请选择部门下人员`"
122
126
  :collapse-tags="state.configJson['departmentUser'].collapseTags"
123
127
  v-model="state.selectVal['departmentUser']"
124
128
  :show-all-levels="state.configJson['departmentUser'].showAllLevels"
@@ -145,7 +149,7 @@
145
149
  float: left;
146
150
  width: 14px;
147
151
  height: 14px;
148
- background: #4ecc7a;
152
+ background: var(--primary);
149
153
  line-height: 34px;
150
154
  margin-top: 10px;
151
155
  border-radius: 10px;
@@ -174,7 +178,8 @@
174
178
  :style="panStyle"
175
179
  :filterable="!state.configJson['departmentUser'].multiple"
176
180
  class="component-item"
177
- :placeholder="`请选择部门下人员`"
181
+ style="width:100%"
182
+ :placeholder="placeholder || `请选择部门下人员`"
178
183
  v-model="state.selectVal['departmentUser']"
179
184
  :props="{
180
185
  label: 'name',
@@ -198,7 +203,7 @@
198
203
  float: left;
199
204
  width: 14px;
200
205
  height: 14px;
201
- background: #4ecc7a;
206
+ background: var(--primary);
202
207
  line-height: 34px;
203
208
  margin-top: 10px;
204
209
  border-radius: 10px;
@@ -233,9 +238,10 @@
233
238
  :disabled="!!disabled"
234
239
  :key="item.id"
235
240
  :style="comStyle || ''"
236
- placeholder="请选择严重等级"
241
+ :placeholder="placeholder || '请选择严重等级'"
237
242
  :filterable="!state.configJson[item.code].multiple"
238
243
  class="component-item"
244
+ style="width:100%"
239
245
  @click.native="selectClick($event)"
240
246
  @change="setSelctItem(item.code)"
241
247
  >
@@ -268,7 +274,7 @@
268
274
  :key="item.id"
269
275
  :disabled="!!disabled"
270
276
  :style="comStyle || ''"
271
- placeholder="请选择响应列表"
277
+ :placeholder="placeholder || '请选择响应列表'"
272
278
  :filterable="!state.configJson[item.code].multiple"
273
279
  class="component-item"
274
280
  @click.native="selectClick($event)"
@@ -303,11 +309,12 @@
303
309
  >
304
310
  <el-cascader
305
311
  v-if="!state.configJson[item.code].panel"
306
- :placeholder="`请选择${item.name}`"
312
+ :placeholder="placeholder || `请选择${item.name}`"
307
313
  :disabled="!!disabled"
308
314
  class="component-item"
309
315
  :style="comStyle || ''"
310
316
  :key="item.id"
317
+ style="width:100%"
311
318
  :filterable="!state.configJson[item.code].multiple"
312
319
  :clearable="state.configJson[item.code].clearable"
313
320
  @click.native="selectClick($event)"
@@ -330,8 +337,9 @@
330
337
  <el-cascader-panel
331
338
  v-else
332
339
  @click.native="selectClick($event)"
333
- :placeholder="`请选择${item.name}`"
340
+ :placeholder="placeholder || `请选择${item.name}`"
334
341
  class="component-item"
342
+ style="width:100%"
335
343
  :key="item.id"
336
344
  :style="panStyle"
337
345
  v-model="state.selectVal[item.code]"
@@ -525,6 +533,7 @@ export default class CommonDatas extends Vue {
525
533
  @Prop() comClass?: string;
526
534
  /** 隐藏编码 */
527
535
  @Prop() hideCode?: boolean;
536
+ @Prop() placeholder?: string;
528
537
  /** 自定义style */
529
538
  @Prop() comStyle?: string;
530
539
  /** 自定义style */
@@ -906,7 +915,7 @@ export default class CommonDatas extends Vue {
906
915
  }
907
916
  </style>
908
917
  <style lang="scss">
909
- $primary-color: #4ecc7a;
918
+ $primary-color: var(--primary);
910
919
  .component-item .el-input--suffix .el-input__inner {
911
920
  background: none;
912
921
  height: 32px !important;
@@ -4,24 +4,26 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-12-21 16:24:07
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2021-12-22 09:58:44
7
+ * @LastEditTime: 2022-07-18 14:59:56
8
8
  -->
9
9
  <template>
10
- <mavon-editor v-model="state.content"
11
- :subfield="subfield"
12
- default_open="{}"
13
- ref="md"
14
- @save="save"
15
- :placeholder="placeholder"
16
- :editable="!disabled"
17
- @imgAdd="addImg"
18
- @change="change" />
10
+ <mavon-editor
11
+ v-model="state.content"
12
+ :subfield="subfield"
13
+ default_open="{}"
14
+ ref="md"
15
+ @save="save"
16
+ :placeholder="placeholder"
17
+ :editable="!disabled"
18
+ @imgAdd="addImg"
19
+ @change="change"
20
+ />
19
21
  </template>
20
- <script lang='ts'>
21
- import { Component, Prop, Vue, Watch } from "vue-property-decorator";
22
- import mavonEditor from "mavon-editor";
23
- import "mavon-editor/dist/css/index.css";
24
- import { _axios } from "vue-kst-auth";
22
+ <script lang="ts">
23
+ import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
24
+ import mavonEditor from 'mavon-editor';
25
+ import 'mavon-editor/dist/css/index.css';
26
+ import { _axios } from 'vue-kst-auth';
25
27
  Vue.use(mavonEditor);
26
28
  interface State {
27
29
  /** 数据状态 */
@@ -43,7 +45,7 @@ export default class HtMd extends Vue {
43
45
  /** 数据 */
44
46
  state: State = {
45
47
  loading: false,
46
- content: "",
48
+ content: '',
47
49
  };
48
50
  /** 生命周期 */
49
51
  created() {
@@ -53,17 +55,17 @@ export default class HtMd extends Vue {
53
55
  /** 添加图片 */
54
56
  addImg(e: number, f: File) {
55
57
  if (this.changImg) {
56
- this.$emit("callBackImg", e, f);
58
+ this.$emit('callBackImg', e, f);
57
59
  return;
58
60
  }
59
61
  const formdata = new FormData();
60
- formdata.append("file", f);
62
+ formdata.append('file', f);
61
63
  //将下面上传接口替换为你自己的服务器接口
62
64
  _axios({
63
- url: "/files/api/filing/file/upload",
64
- method: "post",
65
+ url: '/files/api/filing/file/upload',
66
+ method: 'post',
65
67
  data: formdata,
66
- headers: { "Content-Type": "multipart/form-data" },
68
+ headers: { 'Content-Type': 'multipart/form-data' },
67
69
  }).then((res) => {
68
70
  if (res.status === 200) {
69
71
  (this.$refs.md as any).$img2Url(
@@ -72,28 +74,25 @@ export default class HtMd extends Vue {
72
74
  );
73
75
  }
74
76
  });
75
-
76
77
  //
77
78
  }
78
79
  /** 实时改变 */
79
80
  change(e: string, text: string) {
80
- this.$emit("input", e);
81
-
82
- this.$emit("change", e, text);
83
-
81
+ this.$emit('input', e);
82
+ this.$emit('change', e, text);
84
83
  //
85
84
  }
86
85
  /** 保存数据 */
87
86
  save(e: string, text: string) {
88
- this.$emit("save", e, text);
87
+ this.$emit('save', e, text);
89
88
  }
90
89
 
91
90
  /** 监听 */
92
- @Watch("value", { deep: true })
91
+ @Watch('value', { deep: true })
93
92
  onContent(val: string) {
94
93
  this.state.content = val;
95
94
  }
96
95
  /** 计算属性 */
97
96
  }
98
97
  </script>
99
- <style lang='scss' scoped></style>
98
+ <style lang="scss" scoped></style>
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-12-30 15:47:47
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-07-10 14:38:04
7
+ * @LastEditTime: 2022-07-17 11:34:00
8
8
  -->
9
9
 
10
10
  <template>
@@ -20,6 +20,7 @@
20
20
  <HtBaseData
21
21
  v-else
22
22
  :org="org"
23
+ :placeholder="placeholder"
23
24
  :hide-code="hideCode"
24
25
  :disabled="disabled"
25
26
  com-style="background:#fff"
@@ -66,6 +67,7 @@ interface State {
66
67
  export default class HtSelectBaseData extends Vue {
67
68
  @Prop() value!: string;
68
69
  @Prop() org?: string;
70
+ @Prop() placeholder?: string;
69
71
  /** 是否禁用 */
70
72
  @Prop({ default: false }) disabled?: boolean;
71
73
  /* 是否只读 */
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-12-30 14:29:14
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-07-10 16:49:11
7
+ * @LastEditTime: 2022-07-17 11:32:50
8
8
  -->
9
9
  <template>
10
10
  <span v-if="readonly">
@@ -18,6 +18,7 @@
18
18
  <HtBaseData
19
19
  v-else
20
20
  :org="org"
21
+ :placeholder="placeholder"
21
22
  :disabled="disabled"
22
23
  com-style="background:#fff"
23
24
  :config-json="configJson"
@@ -44,6 +45,7 @@ export default class HtSelectOrg extends Vue {
44
45
  @Prop() value!: string;
45
46
  /** 是否禁用 */
46
47
  @Prop() disabled?: boolean;
48
+ @Prop() placeholder?: string;
47
49
  @Prop() org?: string;
48
50
  /** 是否可以清除 */
49
51
  @Prop() clearable?: boolean;
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-12-30 14:29:14
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-07-10 15:57:06
7
+ * @LastEditTime: 2022-07-17 11:33:13
8
8
  -->
9
9
  <template>
10
10
  <span v-if="readonly">
@@ -18,6 +18,7 @@
18
18
  <HtBaseData
19
19
  v-else
20
20
  :org="org"
21
+ :placeholder="placeholder"
21
22
  :disabled="disabled"
22
23
  com-style="background:#fff"
23
24
  :config-json="configJson"
@@ -45,6 +46,7 @@ export default class HtSelectUser extends Vue {
45
46
  @Prop() org!: string;
46
47
  /** 是否禁用 */
47
48
  @Prop() disabled?: boolean;
49
+ @Prop() placeholder?: string;
48
50
  /** 是否可以清除 */
49
51
  @Prop() clearable?: boolean;
50
52
  @Prop({ default: true }) show?: boolean;
@@ -0,0 +1,70 @@
1
+ /*
2
+ * @Descripttion:
3
+ * @version:
4
+ * @Author: hutao
5
+ * @Date: 2022-07-18 15:01:02
6
+ * @LastEditors: hutao
7
+ * @LastEditTime: 2022-07-18 15:03:00
8
+ */
9
+ import moment from "moment";
10
+
11
+ /** 生成唯一Id
12
+ * @params e 生成的id位数 默认32
13
+ */
14
+ export const randomString = (e = 32) => {
15
+ /** 生成格式17位的时间YYYY-MM-DD HH:mm:ss.SSS加(e-17)位的随机数 */
16
+ const t = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz23456789",
17
+ a = t.length;
18
+ const now = moment().format('YYYYMMDDHHmmssSSS')
19
+ let n = "";
20
+ if (e > 17) {
21
+ n = now
22
+
23
+ for (let i = 0; i < (e - 17); i++) {
24
+ n += t.charAt(Math.floor(Math.random() * a));
25
+ }
26
+ }
27
+ else if (e === 17) {
28
+ n = now
29
+ }
30
+ else {
31
+ for (let i = 0; i < e; i++) {
32
+ n += t.charAt(Math.floor(Math.random() * a));
33
+ }
34
+ }
35
+
36
+ return n;
37
+ }
38
+ /** 时间计算
39
+ @params fromDate 开始时间
40
+ @params toDate 结束时间
41
+ */
42
+ export const dateLess = (fromDate: string, toDate: string) => {
43
+ if (fromDate && toDate) {
44
+ const date = new Date(fromDate);
45
+ const date2 = new Date(toDate);
46
+ const s1: number = date.getTime(),
47
+ s2 = date2.getTime();
48
+ const total: number = (s2 - s1) / 1000;
49
+ const day: number = parseInt((total / (24 * 60 * 60)).toString()); //计算整数天数
50
+ const afterDay: number = total - day * 24 * 60 * 60; //取得算出天数后剩余的秒数
51
+ const hour: number = parseInt((afterDay / (60 * 60)).toString()); //计算整数小时数
52
+ const afterHour = total - day * 24 * 60 * 60 - hour * 60 * 60; //取得算出小时数后剩余的秒数
53
+ const min: number = parseInt((afterHour / 60).toString()); //计算整数分
54
+ const afterMin: number =
55
+ parseInt((total - day * 24 * 60 * 60 - hour * 60 * 60 - min * 60).toString()); //取得算出分后剩余的秒数
56
+ if (day === 0) {
57
+ if (hour === 0) {
58
+ return min + "分" + afterMin + "秒";
59
+ } else {
60
+ return hour + "小时" + min + "分" + afterMin + "秒";
61
+ }
62
+ } else {
63
+ return day + "天" + hour + "小时" + min + "分" + afterMin + "秒";
64
+ }
65
+ }
66
+ else {
67
+ return "-"
68
+ }
69
+
70
+ }
@@ -11,3 +11,46 @@
11
11
  float: right;
12
12
  }
13
13
  }
14
+ .component-item {
15
+ width: 100%;
16
+ + .component-item {
17
+ margin-top: 10px;
18
+ }
19
+ }
20
+ .item-origin {
21
+ border-radius: 50%;
22
+ border-width: 0px 7px;
23
+ margin-right: 6px;
24
+ border-style: solid;
25
+ }
26
+ $primary-color: var(--primary);
27
+ .component-item .el-input--suffix .el-input__inner {
28
+ background: none;
29
+ height: 32px !important;
30
+ }
31
+ .component-item .is-disabled .el-input__inner {
32
+ background: #f5f5f5;
33
+ }
34
+ .ht-user-dot {
35
+ padding: 0;
36
+ margin: 0;
37
+ float: left;
38
+ width: 14px;
39
+ height: 14px;
40
+ background: $primary-color;
41
+ line-height: 34px;
42
+ margin-top: 10px;
43
+ border-radius: 10px;
44
+ margin-right: 4px;
45
+ }
46
+ .ht-user-name {
47
+ padding: 0;
48
+ margin: 0;
49
+ float: left;
50
+ }
51
+ .ht-user-dot-disabled {
52
+ background: #ccc;
53
+ }
54
+ .ht-user-disabled {
55
+ color: #ddd;
56
+ }