htui-yllkbz 1.3.16 → 1.3.19

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.
@@ -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 18:12:54
7
+ * @LastEditTime: 2022-04-19 09:45:04
8
8
  -->
9
9
 
10
10
  <template>
@@ -15,17 +15,17 @@
15
15
  :disabled="disabled"
16
16
  style="width:100%"
17
17
  placeholder="请选择"></el-select>
18
- <div v-else
19
- :disabled="disabled"
20
- is="common-datas-info"
21
- com-style="background:#fff"
22
- :config-json="configJson"
23
- @change="getCommonData"></div>
18
+ <HtBaseData v-else
19
+ :disabled="disabled"
20
+ com-style="background:#fff"
21
+ :config-json="configJson"
22
+ @change="getCommonData"></HtBaseData>
24
23
 
25
24
  </template>
26
25
  <div v-else>
27
26
  <HtShowBaseData v-if="this.value"
28
27
  :hide-code="hideCode"
28
+ :show-all-level="showAllLevels"
29
29
  :base-data-id='this.value'
30
30
  :base-data-info='true'
31
31
  com-style="font-size:12px"
@@ -45,6 +45,7 @@
45
45
  <script lang='ts'>
46
46
  import { Component, Prop, Vue, Watch } from "vue-property-decorator";
47
47
  import HtShowBaseData from "@/packages/HtShowBaseData";
48
+ import HtBaseData from "@/packages/HtBaseData";
48
49
  interface State {
49
50
  /** 数据状态 */
50
51
  loading: boolean;
@@ -54,6 +55,7 @@ interface State {
54
55
  name: "HtSelectBaseData",
55
56
  components: {
56
57
  HtShowBaseData,
58
+ HtBaseData,
57
59
  },
58
60
  })
59
61
  export default class HtSelectBaseData extends Vue {
@@ -83,11 +85,26 @@ export default class HtSelectBaseData extends Vue {
83
85
  /** 方法 */
84
86
 
85
87
  /** 基础数据返回 */
86
- getCommonData(res: CustomEvent) {
87
- const data = res.detail[0];
88
- const id = data[this.dataTypeId][0]["id"];
89
- this.$emit("input", id);
90
- this.$emit("change", id, data[this.dataTypeId][0]);
88
+ getCommonData(res: any) {
89
+ // const data = res.detail[0];
90
+ //const id = data[this.dataTypeId][0]["id"];
91
+ const dep = res[this.dataTypeId];
92
+ let data = undefined;
93
+ if (dep.length) {
94
+ if (this.multiple) {
95
+ const arr: string[] = [];
96
+ dep.forEach((item: any) => {
97
+ arr.push(item.id);
98
+ });
99
+ data = arr;
100
+ } else {
101
+ data = dep[0].id;
102
+ }
103
+ }
104
+ this.$emit("input", data);
105
+ this.$emit("change", data);
106
+ // this.$emit("input", id);
107
+ // this.$emit("change", id, data[this.dataTypeId][0]);
91
108
  }
92
109
  /** 监听 */
93
110
  @Watch("value")
@@ -103,6 +120,7 @@ export default class HtSelectBaseData extends Vue {
103
120
  body[dataTypeId] = {
104
121
  name: "cece",
105
122
  show: true,
123
+ filterable: true,
106
124
  clearable: this.clearable,
107
125
  disabled: this.disabled,
108
126
  showAllLevels: this.showAllLevels,
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-12-30 14:29:14
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-04-12 18:12:02
7
+ * @LastEditTime: 2022-04-13 13:45:57
8
8
  -->
9
9
  <template>
10
10
  <span v-if="readonly">
@@ -13,18 +13,18 @@
13
13
  :department-id="JSON.stringify([value])"></HtShowBaseData>
14
14
  <span v-else> </span>
15
15
  </span>
16
- <div v-else
17
- :disabled="disabled"
18
- is="common-datas-info"
19
- com-style="background:#fff"
20
- :config-json="configJson"
21
- com-class='ht-item-common'
22
- @change="searchCommonData"></div>
16
+ <HtBaseData v-else
17
+ :disabled="disabled"
18
+ com-style="background:#fff"
19
+ :config-json="configJson"
20
+ com-class='ht-item-common'
21
+ @change="searchCommonData"></HtBaseData>
23
22
 
24
23
  </template>
25
24
  <script lang='ts'>
26
25
  import { Component, Prop, Vue } from "vue-property-decorator";
27
26
  import HtShowBaseData from "@/packages/HtShowBaseData";
27
+ import HtBaseData from "@/packages/HtBaseData";
28
28
  interface State {
29
29
  /** 数据状态 */
30
30
  loading: boolean;
@@ -33,6 +33,7 @@ interface State {
33
33
  name: "HtSelectOrg",
34
34
  components: {
35
35
  HtShowBaseData,
36
+ HtBaseData,
36
37
  },
37
38
  })
38
39
  export default class HtSelectOrg extends Vue {
@@ -55,11 +56,20 @@ export default class HtSelectOrg extends Vue {
55
56
  /** 生命周期 */
56
57
  /** 方法 */
57
58
  /**部门选择回调 */
58
- searchCommonData(res: { [key: string]: any; detail: any }) {
59
- const dep = res.detail[0]["departmentId"];
59
+ searchCommonData(res: any) {
60
+ const dep = res["departmentId"];
61
+
60
62
  let data = undefined;
61
63
  if (dep.length) {
62
- data = dep[0].id;
64
+ if (this.multiple) {
65
+ const arr: string[] = [];
66
+ dep.forEach((item: any) => {
67
+ arr.push(item.id);
68
+ });
69
+ data = arr;
70
+ } else {
71
+ data = dep[0].id;
72
+ }
63
73
  }
64
74
  this.$emit("input", data);
65
75
  this.$emit("change", data);
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-12-30 14:29:14
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-04-12 18:12:09
7
+ * @LastEditTime: 2022-04-13 13:27:23
8
8
  -->
9
9
  <template>
10
10
 
@@ -13,18 +13,18 @@
13
13
  :user-id="JSON.stringify([value])"></HtShowBaseData>
14
14
  <span v-else> </span>
15
15
  </span>
16
- <div v-else
17
- :disabled="disabled"
18
- is="common-datas-info"
19
- com-style="background:#fff"
20
- :config-json="configJson"
21
- com-class='ht-item-common'
22
- @change="searchCommonData"></div>
16
+ <HtBaseData v-else
17
+ :disabled="disabled"
18
+ com-style="background:#fff"
19
+ :config-json="configJson"
20
+ com-class='ht-item-common'
21
+ @change="searchCommonData"></HtBaseData>
23
22
 
24
23
  </template>
25
24
  <script lang='ts'>
26
25
  import { Component, Prop, Vue } from "vue-property-decorator";
27
26
  import HtShowBaseData from "@/packages/HtShowBaseData";
27
+ import HtBaseData from "@/packages/HtBaseData";
28
28
  interface State {
29
29
  /** 数据状态 */
30
30
  loading: boolean;
@@ -33,6 +33,7 @@ interface State {
33
33
  name: "HtSelectUser",
34
34
  components: {
35
35
  HtShowBaseData,
36
+ HtBaseData,
36
37
  },
37
38
  })
38
39
  export default class HtSelectUser extends Vue {
@@ -55,11 +56,20 @@ export default class HtSelectUser extends Vue {
55
56
  /** 生命周期 */
56
57
  /** 方法 */
57
58
  /**部门选择回调 */
58
- searchCommonData(res: { [key: string]: any; detail: any }) {
59
- const dep = res.detail[0]["departmentId"];
59
+ searchCommonData(res: any) {
60
+ const dep = res["departmentUser"];
61
+
60
62
  let data = undefined;
61
63
  if (dep.length) {
62
- data = dep[0].id;
64
+ if (this.multiple) {
65
+ const arr: string[] = [];
66
+ dep.forEach((item: any) => {
67
+ arr.push(item.id);
68
+ });
69
+ data = arr;
70
+ } else {
71
+ data = dep[0].id;
72
+ }
63
73
  }
64
74
  this.$emit("input", data);
65
75
  this.$emit("change", data);
@@ -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 18:11:24
8
+ * @LastEditTime: 2022-04-13 13:26:54
9
9
  -->
10
10
  <template>
11
11
  <div v-loading="state.loading"
@@ -400,7 +400,7 @@ export default class HtTable extends Vue {
400
400
  this.creatInitColumnKey(this.columns || []);
401
401
  }
402
402
  }
403
- console.log("this.columns", this.columns);
403
+ // console.log("this.columns", this.columns);
404
404
  }
405
405
  resetColumn() {
406
406
  if (this.configShow) {
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-10-21 10:08:41
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-04-12 18:02:13
7
+ * @LastEditTime: 2022-04-13 13:56:15
8
8
  */
9
9
 
10
10
  // 导入组件
@@ -24,10 +24,12 @@ import HtSelectOrg from './HtSelectOrg/index'
24
24
  import HtSelectUser from './HtSelectUser/index'
25
25
  import HtShowBaseData from './HtShowBaseData/index'
26
26
  import HtOrgInfo from './HtOrgInfo/index'
27
+ import HtBaseData from './HtBaseData/index'
28
+
27
29
 
28
30
 
29
31
  // 存储组件列表
30
- const components = [HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo]
32
+ const components = [HtBaseData, HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo]
31
33
  // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
32
34
  const install = function (Vue: any) {
33
35
  // 判断是否安装
@@ -44,6 +46,6 @@ export default {
44
46
  install,
45
47
  // 以下是具体的组件列表
46
48
  HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles,
47
- HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo
49
+ HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo, HtBaseData
48
50
  }
49
51