htui-yllkbz 1.3.64 → 1.3.66

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.64",
3
+ "version": "1.3.66",
4
4
  "port": "8082",
5
5
  "typings": "types/index.d.ts",
6
6
  "main": "lib/htui.common.js",
package/src/App.vue CHANGED
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-11-15 14:41:40
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-09-27 14:50:29
7
+ * @LastEditTime: 2022-10-13 11:38:50
8
8
  -->
9
9
  <template>
10
10
  <div id="app">
@@ -23,12 +23,12 @@
23
23
  v-model="state.value"
24
24
  @change="change"
25
25
  ></HtSelectBaseData>
26
- <HtSelectOrg
26
+ <HtSelectUser
27
27
  :clearable="true"
28
- :multiple="false"
28
+ :multiple="true"
29
29
  v-model="state.value"
30
30
  @change="testuser"
31
- ></HtSelectOrg>
31
+ ></HtSelectUser>
32
32
  <!-- <HtSelectOrg :clearable="true"
33
33
  v-model="state.value"
34
34
  @change="testuser"></HtSelectOrg> -->
@@ -49,6 +49,7 @@ import { mgr } from '@/plugins/oidc-client';
49
49
  HtSelectBaseData,
50
50
  HtSelectOrg,
51
51
  HtShowBaseType,
52
+ HtSelectUser,
52
53
  },
53
54
  })
54
55
  export default class App extends Vue {
@@ -75,8 +76,8 @@ export default class App extends Vue {
75
76
  change() {
76
77
  // console.log("eeee", e);
77
78
  }
78
- testuser(e: any) {
79
- //console.log('eee', e);
79
+ testuser(e: any, data: any) {
80
+ //console.log('eee', e, data);
80
81
  }
81
82
  test(e: any) {
82
83
  //mgr.removeUser();
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-12-30 14:29:14
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-08-26 16:11:31
7
+ * @LastEditTime: 2022-10-13 11:22:49
8
8
  -->
9
9
  <template>
10
10
  <span v-if="readonly">
@@ -32,6 +32,7 @@
32
32
  import { Component, Prop, Vue } from 'vue-property-decorator';
33
33
  import HtShowBaseData from '@/packages/HtShowBaseData';
34
34
  import HtBaseData from '@/packages/HtBaseData';
35
+ import { getCommDataItem } from '../common';
35
36
  interface State {
36
37
  /** 数据状态 */
37
38
  loading: boolean;
@@ -71,7 +72,7 @@ export default class HtSelectOrg extends Vue {
71
72
  searchCommonData(res: any) {
72
73
  const dep = res['departmentId'];
73
74
 
74
- let data = undefined;
75
+ let data: string | undefined | string[] = undefined;
75
76
  if (dep.length) {
76
77
  if (this.multiple) {
77
78
  const arr: string[] = [];
@@ -84,7 +85,8 @@ export default class HtSelectOrg extends Vue {
84
85
  }
85
86
  }
86
87
  this.$emit('input', data);
87
- this.$emit('change', data);
88
+
89
+ this.$emit('change', data, getCommDataItem('org', data));
88
90
  }
89
91
  /** 监听 */
90
92
  get configJson() {
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-12-30 14:29:14
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-08-26 16:11:46
7
+ * @LastEditTime: 2022-10-13 11:36:25
8
8
  -->
9
9
  <template>
10
10
  <span v-if="readonly">
@@ -28,6 +28,7 @@
28
28
  import { Component, Prop, Vue } from 'vue-property-decorator';
29
29
  import HtShowBaseData from '@/packages/HtShowBaseData';
30
30
  import HtBaseData from '@/packages/HtBaseData';
31
+ import { getCommDataItem } from '../common';
31
32
  interface State {
32
33
  /** 数据状态 */
33
34
  loading: boolean;
@@ -80,7 +81,7 @@ export default class HtSelectUser extends Vue {
80
81
  }
81
82
  }
82
83
  this.$emit('input', data);
83
- this.$emit('change', data);
84
+ this.$emit('change', data, getCommDataItem('user', data));
84
85
  }
85
86
  /** 监听 */
86
87
  get configJson() {
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-11-11 11:23:24
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-10-08 14:28:29
7
+ * @LastEditTime: 2022-10-24 14:22:09
8
8
  -->
9
9
  <template>
10
10
  <div v-loading="state.loading" style="background:#fff">
@@ -83,6 +83,18 @@
83
83
  type="selection"
84
84
  >
85
85
  </el-table-column>
86
+ <el-table-column v-if="isExpand" type="expand">
87
+ <!-- 展开行专用 -->
88
+ <template slot-scope="props">
89
+ <slot
90
+ name="expand"
91
+ :row="props.row"
92
+ :column="props.column"
93
+ :rowIndex="props.rowIndex"
94
+ >
95
+ </slot>
96
+ </template>
97
+ </el-table-column>
86
98
  <el-table-column
87
99
  v-if="!hideOrder"
88
100
  :resizable="false"
@@ -436,6 +448,8 @@ export default class HtTable extends Vue {
436
448
  @Prop() data!: any[];
437
449
  /** 序号对应的名称 */
438
450
  @Prop() keyName?: string;
451
+ /** 是否启用展开行功能 */
452
+ @Prop() isExpand?: boolean;
439
453
  /** 打开配置列 */
440
454
  @Prop() configShow?: boolean;
441
455
  /** 是否增加筛选功能 */
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2022-07-18 15:01:02
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-08-10 18:34:12
7
+ * @LastEditTime: 2022-10-13 11:22:09
8
8
  */
9
9
  import moment from "moment";
10
10
 
@@ -90,3 +90,68 @@ export function getCommDataName(id?: string, showobj = false) {
90
90
  }
91
91
  return undefined;
92
92
  }
93
+ /** 获取基础数据的相关内容
94
+ * @parmas type 想要查询的类型
95
+ * @params keys 查询的内容
96
+ */
97
+ export function getCommDataItem(type: "users" | "organizationUnit" | "dictionaryCategory" | "dictionaryData" | 'user' | 'org' | "baseData", keys?: string | string[]) {
98
+ const commen = window.localStorage.getItem("commonDatas");
99
+ if (!commen) {
100
+ return undefined
101
+ }
102
+ const commonDatas = JSON.parse(commen)
103
+
104
+ switch (type) {
105
+ case "users"://返回所有人员
106
+ return commonDatas.users.items;
107
+ case "organizationUnit"://返回所有部门
108
+ return commonDatas.organizationUnit;
109
+ case "dictionaryData"://返回所有dictionaryData
110
+ return commonDatas.dictionaryData;
111
+ case "dictionaryCategory":
112
+ return commonDatas.dictionaryCategory.items;
113
+ case "user"://查询所有的关联的人员信息
114
+ const users = commonDatas.users.items;
115
+ if (keys) {
116
+ if (Array.isArray(keys)) {
117
+ return users.filter((item: any) => keys.toString().includes(item.id))
118
+ }
119
+ else {
120
+ return users.find((item: any) => item.id === keys)
121
+ }
122
+ }
123
+ else {
124
+ return undefined;
125
+ }
126
+ case "org"://查询所有的关联的部门信息
127
+ const organizationUnit = commonDatas.organizationUnit;
128
+ if (keys) {
129
+ if (Array.isArray(keys)) {
130
+ return organizationUnit.filter((item: any) => keys.toString().includes(item.id))
131
+ }
132
+ else {
133
+ return organizationUnit.find((item: any) => item.id === keys)
134
+ }
135
+ }
136
+ else {
137
+ return undefined;
138
+ }
139
+ case "baseData"://查询所有的id关联的基础数据
140
+ const baseData = commonDatas.baseData.items;
141
+ if (keys) {
142
+ if (Array.isArray(keys)) {
143
+ return baseData.filter((item: any) => keys.toString().includes(item.id))
144
+ }
145
+ else {
146
+ return baseData.find((item: any) => item.id === keys)
147
+ }
148
+ }
149
+ else {
150
+ return baseData
151
+ }
152
+ }
153
+
154
+ return
155
+
156
+
157
+ }
@@ -4,13 +4,19 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-11-15 14:41:40
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-05-09 10:05:08
7
+ * @LastEditTime: 2022-10-24 14:38:38
8
8
  -->
9
9
  <template>
10
10
  <div>
11
11
  ...................
12
- <HtSelectUser :value="['be12db32-1718-a43d-1cf8-39f97d1d872f','5f2d6558-4e98-9054-413f-39fc4c63ebac','959f6988-a74b-f6f7-0fb6-3a0314e0eaad']"
13
- :multiple="true"></HtSelectUser>
12
+ <HtSelectUser
13
+ :value="[
14
+ 'be12db32-1718-a43d-1cf8-39f97d1d872f',
15
+ '5f2d6558-4e98-9054-413f-39fc4c63ebac',
16
+ '959f6988-a74b-f6f7-0fb6-3a0314e0eaad',
17
+ ]"
18
+ :multiple="true"
19
+ ></HtSelectUser>
14
20
  <!-- <el-button type=""
15
21
  @click="test">test</el-button> -->
16
22
  <!-- <ht-count-down :stopwatch="true"
@@ -30,14 +36,17 @@
30
36
  <!-- <ht-md v-model="state.content"
31
37
  :subfield="true"></ht-md> -->
32
38
  <div ref="ht-pdf">
33
- <HtTable :data="state.data"
34
- :configShow="true"
35
- :checked="true"
36
- :height="200"
37
- uuId="54598fs1okdsfsdfk2"
38
- :showFilter="true"
39
- :columns="state.columns">
40
-
39
+ <HtTable
40
+ :data="state.data"
41
+ :configShow="true"
42
+ :checked="true"
43
+ :isExpand="true"
44
+ :height="200"
45
+ uuId="54598fs1okdsfsdfk2"
46
+ :showFilter="true"
47
+ :columns="state.columns"
48
+ >
49
+ <span slot="expand"></span>
41
50
  </HtTable>
42
51
  </div>
43
52
  <!-- <el-dropdown>
@@ -56,13 +65,13 @@
56
65
  </el-dropdown> -->
57
66
  </div>
58
67
  </template>
59
- <script lang='ts'>
60
- import { Component, Vue } from "vue-property-decorator";
61
- import HtTable from "@/packages/HtTable/index.vue";
62
- import HtCountDown from "@/packages/HtCountDown/index.vue";
63
- import HtSelectUser from "@/packages/HtSelectUser/index.vue";
68
+ <script lang="ts">
69
+ import { Component, Vue } from 'vue-property-decorator';
70
+ import HtTable from '@/packages/HtTable/index.vue';
71
+ import HtCountDown from '@/packages/HtCountDown/index.vue';
72
+ import HtSelectUser from '@/packages/HtSelectUser/index.vue';
64
73
 
65
- import "htui-yllkbz/lib/htui.css";
74
+ import 'htui-yllkbz/lib/htui.css';
66
75
  interface State {
67
76
  /** 数据状态 */
68
77
  loading: boolean;
@@ -83,80 +92,81 @@ export default class Index extends Vue {
83
92
  state: State = {
84
93
  loading: false,
85
94
  start: false,
86
- content: "",
95
+ content: '',
87
96
  data: [
88
97
  {
89
- name: "胡涛",
98
+ name: '胡涛',
90
99
  selectable: true,
91
100
 
92
101
  age: 12,
93
- sex: "e49961a4f385e5d341ce3a01ee674c90ea9e037b734228fe26753a01ee674c90,e49961a4f385e5d341ce3a01ee674c90ea9e037b734228fe26753a01ee674c90",
102
+ sex:
103
+ 'e49961a4f385e5d341ce3a01ee674c90ea9e037b734228fe26753a01ee674c90,e49961a4f385e5d341ce3a01ee674c90ea9e037b734228fe26753a01ee674c90',
94
104
  id: 1,
95
- test: { title: "33476c23-9faa-22d3-3ee6-39f97d173566" },
96
- time: "2022-01-20T00:00:00+08:00",
105
+ test: { title: '33476c23-9faa-22d3-3ee6-39f97d173566' },
106
+ time: '2022-01-20T00:00:00+08:00',
97
107
  },
98
108
  {
99
- name: "胡涛",
109
+ name: '胡涛',
100
110
  age: 12,
101
111
  selectable: false,
102
- sex: "e49961a4f385e5d341ce3a01ee674c90ea9e037b734228fe26753a01ee674c90",
112
+ sex: 'e49961a4f385e5d341ce3a01ee674c90ea9e037b734228fe26753a01ee674c90',
103
113
  id: 2,
104
- test: { title: "测试" },
105
- time: "2022-01-20T00:00:00+08:00",
114
+ test: { title: '测试' },
115
+ time: '2022-01-20T00:00:00+08:00',
106
116
  },
107
117
  {
108
- name: "胡涛",
118
+ name: '胡涛',
109
119
  age: 12,
110
- sex: "tt",
120
+ sex: 'tt',
111
121
  id: 3,
112
- test: { title: "测试" },
113
- time: "2022-01-20T00:00:00+08:00",
122
+ test: { title: '测试' },
123
+ time: '2022-01-20T00:00:00+08:00',
114
124
  },
115
125
  {
116
- name: "胡涛",
126
+ name: '胡涛',
117
127
  age: 12,
118
- sex: "tt",
128
+ sex: 'tt',
119
129
  id: 4,
120
- test: { title: "测试" },
121
- time: "2022-01-20T00:00:00+08:00",
130
+ test: { title: '测试' },
131
+ time: '2022-01-20T00:00:00+08:00',
122
132
  },
123
133
  {
124
- name: "胡涛",
134
+ name: '胡涛',
125
135
  age: 12,
126
- sex: "tt",
136
+ sex: 'tt',
127
137
  id: 41,
128
- test: { title: "测试" },
129
- time: "2022-01-20T00:00:00+08:00",
138
+ test: { title: '测试' },
139
+ time: '2022-01-20T00:00:00+08:00',
130
140
  },
131
141
  ],
132
142
  columns: [
133
143
  {
134
- title: "姓名",
135
- key: "test.title",
136
- width: "300px",
137
- property: "base",
144
+ title: '姓名',
145
+ key: 'test.title',
146
+ width: '300px',
147
+ property: 'base',
138
148
  disabled: true,
139
149
  deafaultShow: true,
140
150
  },
141
151
  {
142
- title: "姓额外名",
143
- key: "name",
152
+ title: '姓额外名',
153
+ key: 'name',
144
154
  },
145
155
  {
146
- title: "age",
147
- key: "age",
156
+ title: 'age',
157
+ key: 'age',
148
158
  },
149
159
  {
150
- title: "time",
151
- type: "time",
160
+ title: 'time',
161
+ type: 'time',
152
162
  spread: true,
153
- key: "time",
163
+ key: 'time',
154
164
  deafaultShow: true,
155
165
  },
156
166
  {
157
- title: "性别",
158
- key: "sex",
159
- type: "file",
167
+ title: '性别',
168
+ key: 'sex',
169
+ type: 'file',
160
170
  },
161
171
  ],
162
172
  };
@@ -186,4 +196,4 @@ export default class Index extends Vue {
186
196
  /** 计算属性 */
187
197
  }
188
198
  </script>
189
- <style lang='scss' scoped></style>
199
+ <style lang="scss" scoped></style>