htui-yllkbz 1.3.15 → 1.3.16

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.15",
3
+ "version": "1.3.16",
4
4
  "typings": "types/index.d.ts",
5
5
  "main": "lib/htui.common.js",
6
6
  "style": "lib/htui.css",
@@ -0,0 +1,14 @@
1
+ /*
2
+ * @Descripttion:选择部门
3
+ * @version:
4
+ * @Author: hutao
5
+ * @Date: 2021-11-15 15:00:57
6
+ * @LastEditors: hutao
7
+ * @LastEditTime: 2022-04-12 17:59:54
8
+ */
9
+ import HtOrgInfo from "./index.vue";
10
+ (HtOrgInfo as any).install = function (Vue: any) {
11
+
12
+ Vue.component("HtOrgInfo", HtOrgInfo);
13
+ };
14
+ export default HtOrgInfo;
@@ -0,0 +1,77 @@
1
+ <!--
2
+ * @Descripttion:
3
+ * @version:
4
+ * @Author: hutao
5
+ * @Date: 2021-07-14 16:40:33
6
+ * @LastEditors: hutao
7
+ * @LastEditTime: 2022-04-12 18:00:15
8
+ -->
9
+ <template>
10
+ <div :style="wapperStyle"
11
+ v-if="orgId">
12
+ <el-tag type="success"
13
+ size="medium"
14
+ v-if="type==='tag'"
15
+ :style="comStyle">
16
+ {{getOrgNameFunc(orgId)}}
17
+ </el-tag>
18
+ <span v-else
19
+ :style="comStyle">
20
+ {{getOrgNameFunc(orgId)}}
21
+ </span>
22
+ </div>
23
+ </template>
24
+ <script lang='ts'>
25
+ import { Component, Vue, Prop } from "vue-property-decorator";
26
+ interface State {
27
+ /** 数据状态 */
28
+ loading: boolean;
29
+ }
30
+ @Component({
31
+ name: "HtOrgInfo",
32
+ })
33
+ export default class Index extends Vue {
34
+ /** 是否用tag标签展示 tag表示是 */
35
+ @Prop() type!: string;
36
+ /** 机构id */
37
+ @Prop() orgId!: string;
38
+ /** 节点样式 */
39
+ @Prop() comStyle!: string;
40
+ /** 外层样式 */
41
+ @Prop() wapperStyle!: string;
42
+
43
+ /** 数据 */
44
+ state: State = {
45
+ loading: false,
46
+ };
47
+ /** 生命周期 */
48
+ /** 方法 */
49
+ /** 监听 */
50
+ /** 计算属性 */
51
+ /** 查询所属部门 */
52
+ getOrgNameFunc(id: string | undefined) {
53
+ // console.log("id", id);
54
+ let commonDatas: any = window.localStorage.getItem("commonDatas");
55
+ let getOrganizaList: any[] = [];
56
+ if (commonDatas) {
57
+ commonDatas = JSON.parse(commonDatas);
58
+ getOrganizaList = commonDatas.organizationUnit;
59
+ }
60
+ if (id) {
61
+ return this.getOrgName(id, getOrganizaList);
62
+ } else {
63
+ return "";
64
+ }
65
+ }
66
+ getOrgName(id: string, list: any[]) {
67
+ const arr = list.filter((item) => id === item.id);
68
+
69
+ if (arr.length) {
70
+ return arr[0].displayName;
71
+ } else {
72
+ return "--";
73
+ }
74
+ }
75
+ }
76
+ </script>
77
+ <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-04-12 17:45:27
7
+ * @LastEditTime: 2022-04-12 18:12:54
8
8
  -->
9
9
 
10
10
  <template>
@@ -4,14 +4,13 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-12-30 14:29:14
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-03-08 14:53:19
7
+ * @LastEditTime: 2022-04-12 18:12:02
8
8
  -->
9
9
  <template>
10
10
  <span v-if="readonly">
11
11
 
12
- <div is='common-datas-info-id'
13
- v-if="value"
14
- :department-id="JSON.stringify([value])"></div>
12
+ <HtShowBaseData v-if="value"
13
+ :department-id="JSON.stringify([value])"></HtShowBaseData>
15
14
  <span v-else> </span>
16
15
  </span>
17
16
  <div v-else
@@ -25,12 +24,16 @@
25
24
  </template>
26
25
  <script lang='ts'>
27
26
  import { Component, Prop, Vue } from "vue-property-decorator";
27
+ import HtShowBaseData from "@/packages/HtShowBaseData";
28
28
  interface State {
29
29
  /** 数据状态 */
30
30
  loading: boolean;
31
31
  }
32
32
  @Component({
33
33
  name: "HtSelectOrg",
34
+ components: {
35
+ HtShowBaseData,
36
+ },
34
37
  })
35
38
  export default class HtSelectOrg extends Vue {
36
39
  @Prop() value!: string;
@@ -4,17 +4,15 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-12-30 14:29:14
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-03-08 14:55:09
7
+ * @LastEditTime: 2022-04-12 18:12:09
8
8
  -->
9
9
  <template>
10
10
 
11
11
  <span v-if="readonly">
12
- <div is='common-datas-info-id'
13
- v-if="value"
14
- :user-id="JSON.stringify([value])"></div>
12
+ <HtShowBaseData v-if="value"
13
+ :user-id="JSON.stringify([value])"></HtShowBaseData>
15
14
  <span v-else> </span>
16
15
  </span>
17
-
18
16
  <div v-else
19
17
  :disabled="disabled"
20
18
  is="common-datas-info"
@@ -26,12 +24,16 @@
26
24
  </template>
27
25
  <script lang='ts'>
28
26
  import { Component, Prop, Vue } from "vue-property-decorator";
27
+ import HtShowBaseData from "@/packages/HtShowBaseData";
29
28
  interface State {
30
29
  /** 数据状态 */
31
30
  loading: boolean;
32
31
  }
33
32
  @Component({
34
33
  name: "HtSelectUser",
34
+ components: {
35
+ HtShowBaseData,
36
+ },
35
37
  })
36
38
  export default class HtSelectUser extends Vue {
37
39
  @Prop() value!: string;
@@ -5,7 +5,7 @@
5
5
  * @Author: hutao
6
6
  * @Date: 2021-11-11 11:23:24
7
7
  * @LastEditors: hutao
8
- * @LastEditTime: 2022-04-12 17:54:52
8
+ * @LastEditTime: 2022-04-12 18:11:24
9
9
  -->
10
10
  <template>
11
11
  <div v-loading="state.loading"
@@ -105,10 +105,9 @@
105
105
  :rowIndex="rowIndex">
106
106
  <!-- 处理部门 -->
107
107
  <template v-if="item.type==='org'">
108
-
109
- <common-org-info v-if="getPropByPath(row,item.key)"
110
- :org-id="getPropByPath(row,item.key)"
111
- type="tag"></common-org-info>
108
+ <HtOrgInfo v-if="getPropByPath(row,item.key)"
109
+ :org-id="getPropByPath(row,item.key)"
110
+ type="tag"></HtOrgInfo>
112
111
  <span v-else>--</span>
113
112
  </template>
114
113
  <!-- 处理基础数据 -->
@@ -277,6 +276,7 @@ import { Column, PageInfoType } from "@/packages/type";
277
276
  import PageInfo from "@/packages/PageInfo/index.vue";
278
277
  import HtUploadFiles from "@/packages/HtUploadFiles/index.vue";
279
278
  import HtShowBaseData from "@/packages/HtShowBaseData";
279
+ import HtOrgInfo from "@/packages/HtOrgInfo";
280
280
  interface State {
281
281
  pageInfo: PageInfoType;
282
282
  loading: boolean;
@@ -303,6 +303,7 @@ interface State {
303
303
  PageInfo,
304
304
  HtUploadFiles,
305
305
  HtShowBaseData,
306
+ HtOrgInfo,
306
307
  },
307
308
  })
308
309
  export default class HtTable extends Vue {
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-10-21 10:08:41
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-03-08 14:57:05
7
+ * @LastEditTime: 2022-04-12 18:02:13
8
8
  */
9
9
 
10
10
  // 导入组件
@@ -22,10 +22,12 @@ import HtUploadFiles from './HtUploadFiles/index'
22
22
  import HtSelectBaseData from './HtSelectBaseData/index'
23
23
  import HtSelectOrg from './HtSelectOrg/index'
24
24
  import HtSelectUser from './HtSelectUser/index'
25
+ import HtShowBaseData from './HtShowBaseData/index'
26
+ import HtOrgInfo from './HtOrgInfo/index'
25
27
 
26
28
 
27
29
  // 存储组件列表
28
- const components = [HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtSelectBaseData, HtSelectOrg, HtSelectUser]
30
+ const components = [HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo]
29
31
  // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
30
32
  const install = function (Vue: any) {
31
33
  // 判断是否安装
@@ -42,6 +44,6 @@ export default {
42
44
  install,
43
45
  // 以下是具体的组件列表
44
46
  HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles,
45
- HtSelectBaseData, HtSelectOrg, HtSelectUser
47
+ HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo
46
48
  }
47
49