htui-yllkbz 1.3.32 → 1.3.36

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,32 +4,40 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-12-30 15:47:47
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-06-12 09:45:43
7
+ * @LastEditTime: 2022-07-17 11:34:00
8
8
  -->
9
9
 
10
10
  <template>
11
11
  <div>
12
12
  <template v-if="!readonly">
13
- <el-select value=""
14
- v-if="!dataTypeId"
15
- :disabled="disabled"
16
- style="width:100%"
17
- placeholder="请选择"></el-select>
18
- <HtBaseData v-else
19
- :disabled="disabled"
20
- com-style="background:#fff"
21
- :config-json="configJson"
22
- @change="getCommonData"></HtBaseData>
23
-
13
+ <el-select
14
+ value=""
15
+ v-if="!dataTypeId"
16
+ :disabled="disabled"
17
+ style="width:100%"
18
+ placeholder="请选择"
19
+ ></el-select>
20
+ <HtBaseData
21
+ v-else
22
+ :org="org"
23
+ :placeholder="placeholder"
24
+ :hide-code="hideCode"
25
+ :disabled="disabled"
26
+ com-style="background:#fff"
27
+ :config-json="configJson"
28
+ @change="getCommonData"
29
+ ></HtBaseData>
24
30
  </template>
25
31
  <div v-else>
26
- <HtShowBaseData v-if="this.value"
27
- :hide-code="hideCode"
28
- :show-all-level="showAllLevels"
29
- :base-data-id='this.value'
30
- :base-data-info='true'
31
- com-style="font-size:12px"
32
- style="font-size:12px">
32
+ <HtShowBaseData
33
+ v-if="this.value"
34
+ :hide-code="hideCode"
35
+ :show-all-level="showAllLevels"
36
+ :base-data-id="this.value"
37
+ :base-data-info="true"
38
+ com-style="font-size:12px"
39
+ style="font-size:12px"
40
+ >
33
41
  </HtShowBaseData>
34
42
  <!-- <div is='common-datas-info-id'
35
43
  com-style="font-size:12px"
@@ -38,21 +46,19 @@
38
46
  :base-data-id='this.value'
39
47
  :base-data-info='true'></div> -->
40
48
  </div>
41
-
42
49
  </div>
43
-
44
50
  </template>
45
- <script lang='ts'>
46
- import { Component, Prop, Vue, Watch } from "vue-property-decorator";
47
- import HtShowBaseData from "@/packages/HtShowBaseData";
48
- import HtBaseData from "@/packages/HtBaseData";
51
+ <script lang="ts">
52
+ import { Component, Prop, Vue, Watch } from 'vue-property-decorator';
53
+ import HtShowBaseData from '@/packages/HtShowBaseData';
54
+ import HtBaseData from '@/packages/HtBaseData';
49
55
  interface State {
50
56
  /** 数据状态 */
51
57
  loading: boolean;
52
58
  value?: string;
53
59
  }
54
60
  @Component({
55
- name: "HtSelectBaseData",
61
+ name: 'HtSelectBaseData',
56
62
  components: {
57
63
  HtShowBaseData,
58
64
  HtBaseData,
@@ -60,6 +66,8 @@ interface State {
60
66
  })
61
67
  export default class HtSelectBaseData extends Vue {
62
68
  @Prop() value!: string;
69
+ @Prop() org?: string;
70
+ @Prop() placeholder?: string;
63
71
  /** 是否禁用 */
64
72
  @Prop({ default: false }) disabled?: boolean;
65
73
  /* 是否只读 */
@@ -77,7 +85,7 @@ export default class HtSelectBaseData extends Vue {
77
85
  /** 数据 */
78
86
  state: State = {
79
87
  loading: false,
80
- value: "",
88
+ value: '',
81
89
  };
82
90
  /** 生命周期 */
83
91
  created() {
@@ -102,13 +110,13 @@ export default class HtSelectBaseData extends Vue {
102
110
  data = dep[0].id;
103
111
  }
104
112
  }
105
- this.$emit("input", data);
106
- this.$emit("change", data, dep);
113
+ this.$emit('input', data);
114
+ this.$emit('change', data, dep);
107
115
  // this.$emit("input", id);
108
116
  // this.$emit("change", id, data[this.dataTypeId][0]);
109
117
  }
110
118
  /** 监听 */
111
- @Watch("value")
119
+ @Watch('value')
112
120
  onValue(val: string) {
113
121
  this.state.value = val;
114
122
  }
@@ -116,10 +124,10 @@ export default class HtSelectBaseData extends Vue {
116
124
  /** 选项列表 */
117
125
  /** 基础组件应用json */
118
126
  get configJson() {
119
- const { dataTypeId = "", value } = this;
127
+ const { dataTypeId = '', value } = this;
120
128
  const body: { [key: string]: any } = {};
121
129
  body[dataTypeId] = {
122
- name: "cece",
130
+ name: 'cece',
123
131
  show: true,
124
132
  filterable: true,
125
133
  clearable: this.clearable,
@@ -137,4 +145,4 @@ export default class HtSelectBaseData extends Vue {
137
145
  }
138
146
  }
139
147
  </script>
140
- <style lang='scss' scoped></style>
148
+ <style lang="scss" scoped></style>
@@ -4,33 +4,38 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-12-30 14:29:14
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-06-12 09:52:13
7
+ * @LastEditTime: 2022-07-17 11:32:50
8
8
  -->
9
9
  <template>
10
10
  <span v-if="readonly">
11
-
12
- <HtShowBaseData v-if="value"
13
- :department-id="JSON.stringify([value])"></HtShowBaseData>
11
+ <HtShowBaseData
12
+ v-if="value"
13
+ :org="org"
14
+ :department-id="JSON.stringify([value])"
15
+ ></HtShowBaseData>
14
16
  <span v-else> </span>
15
17
  </span>
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>
22
-
18
+ <HtBaseData
19
+ v-else
20
+ :org="org"
21
+ :placeholder="placeholder"
22
+ :disabled="disabled"
23
+ com-style="background:#fff"
24
+ :config-json="configJson"
25
+ com-class="ht-item-common"
26
+ @change="searchCommonData"
27
+ ></HtBaseData>
23
28
  </template>
24
- <script lang='ts'>
25
- import { Component, Prop, Vue } from "vue-property-decorator";
26
- import HtShowBaseData from "@/packages/HtShowBaseData";
27
- import HtBaseData from "@/packages/HtBaseData";
29
+ <script lang="ts">
30
+ import { Component, Prop, Vue } from 'vue-property-decorator';
31
+ import HtShowBaseData from '@/packages/HtShowBaseData';
32
+ import HtBaseData from '@/packages/HtBaseData';
28
33
  interface State {
29
34
  /** 数据状态 */
30
35
  loading: boolean;
31
36
  }
32
37
  @Component({
33
- name: "HtSelectOrg",
38
+ name: 'HtSelectOrg',
34
39
  components: {
35
40
  HtShowBaseData,
36
41
  HtBaseData,
@@ -40,6 +45,8 @@ export default class HtSelectOrg extends Vue {
40
45
  @Prop() value!: string;
41
46
  /** 是否禁用 */
42
47
  @Prop() disabled?: boolean;
48
+ @Prop() placeholder?: string;
49
+ @Prop() org?: string;
43
50
  /** 是否可以清除 */
44
51
  @Prop() clearable?: boolean;
45
52
  @Prop({ default: true }) show?: boolean;
@@ -58,7 +65,7 @@ export default class HtSelectOrg extends Vue {
58
65
  /** 方法 */
59
66
  /**部门选择回调 */
60
67
  searchCommonData(res: any) {
61
- const dep = res["departmentId"];
68
+ const dep = res['departmentId'];
62
69
 
63
70
  let data = undefined;
64
71
  if (dep.length) {
@@ -72,19 +79,19 @@ export default class HtSelectOrg extends Vue {
72
79
  data = dep[0].id;
73
80
  }
74
81
  }
75
- this.$emit("input", data);
76
- this.$emit("change", data);
82
+ this.$emit('input', data);
83
+ this.$emit('change', data);
77
84
  }
78
85
  /** 监听 */
79
86
  get configJson() {
80
87
  return JSON.stringify({
81
88
  departmentId: {
82
- name: "部门树结构",
89
+ name: '部门树结构',
83
90
  show: this.show,
84
91
  disabled: this.disabled,
85
92
  showAllLevels: this.showAllLevels,
86
93
  multiple: this.multiple,
87
- code: "departmentId",
94
+ code: 'departmentId',
88
95
  data: {},
89
96
  checkStrictly: this.checkStrictly,
90
97
  collapseTags: this.collapseTags,
@@ -97,4 +104,4 @@ export default class HtSelectOrg extends Vue {
97
104
  /** 计算属性 */
98
105
  }
99
106
  </script>
100
- <style lang='scss' scoped></style>
107
+ <style lang="scss" scoped></style>
@@ -4,33 +4,38 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-12-30 14:29:14
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-06-12 09:52:33
7
+ * @LastEditTime: 2022-07-17 11:33:13
8
8
  -->
9
9
  <template>
10
-
11
10
  <span v-if="readonly">
12
- <HtShowBaseData v-if="value"
13
- :user-id="JSON.stringify([value])"></HtShowBaseData>
11
+ <HtShowBaseData
12
+ v-if="value"
13
+ :user-id="JSON.stringify([value])"
14
+ :org="org"
15
+ ></HtShowBaseData>
14
16
  <span v-else> </span>
15
17
  </span>
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>
22
-
18
+ <HtBaseData
19
+ v-else
20
+ :org="org"
21
+ :placeholder="placeholder"
22
+ :disabled="disabled"
23
+ com-style="background:#fff"
24
+ :config-json="configJson"
25
+ com-class="ht-item-common"
26
+ @change="searchCommonData"
27
+ ></HtBaseData>
23
28
  </template>
24
- <script lang='ts'>
25
- import { Component, Prop, Vue } from "vue-property-decorator";
26
- import HtShowBaseData from "@/packages/HtShowBaseData";
27
- import HtBaseData from "@/packages/HtBaseData";
29
+ <script lang="ts">
30
+ import { Component, Prop, Vue } from 'vue-property-decorator';
31
+ import HtShowBaseData from '@/packages/HtShowBaseData';
32
+ import HtBaseData from '@/packages/HtBaseData';
28
33
  interface State {
29
34
  /** 数据状态 */
30
35
  loading: boolean;
31
36
  }
32
37
  @Component({
33
- name: "HtSelectUser",
38
+ name: 'HtSelectUser',
34
39
  components: {
35
40
  HtShowBaseData,
36
41
  HtBaseData,
@@ -38,8 +43,10 @@ interface State {
38
43
  })
39
44
  export default class HtSelectUser extends Vue {
40
45
  @Prop() value!: string;
46
+ @Prop() org!: string;
41
47
  /** 是否禁用 */
42
48
  @Prop() disabled?: boolean;
49
+ @Prop() placeholder?: string;
43
50
  /** 是否可以清除 */
44
51
  @Prop() clearable?: boolean;
45
52
  @Prop({ default: true }) show?: boolean;
@@ -58,7 +65,7 @@ export default class HtSelectUser extends Vue {
58
65
  /** 方法 */
59
66
  /**部门选择回调 */
60
67
  searchCommonData(res: any) {
61
- const dep = res["departmentUser"];
68
+ const dep = res['departmentUser'];
62
69
 
63
70
  let data = undefined;
64
71
  if (dep.length) {
@@ -72,19 +79,19 @@ export default class HtSelectUser extends Vue {
72
79
  data = dep[0].id;
73
80
  }
74
81
  }
75
- this.$emit("input", data);
76
- this.$emit("change", data);
82
+ this.$emit('input', data);
83
+ this.$emit('change', data);
77
84
  }
78
85
  /** 监听 */
79
86
  get configJson() {
80
87
  return JSON.stringify({
81
88
  departmentUser: {
82
- name: "部门树结构",
89
+ name: '部门树结构',
83
90
  show: this.show,
84
91
  disabled: this.disabled,
85
92
  showAllLevels: this.showAllLevels,
86
93
  multiple: this.multiple,
87
- code: "departmentUser",
94
+ code: 'departmentUser',
88
95
  data: {},
89
96
  checkStrictly: false,
90
97
  panel: this.panel,
@@ -97,4 +104,4 @@ export default class HtSelectUser extends Vue {
97
104
  /** 计算属性 */
98
105
  }
99
106
  </script>
100
- <style lang='scss' scoped></style>
107
+ <style lang="scss" scoped></style>