htui-yllkbz 1.3.25 → 1.3.28

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.25",
3
+ "version": "1.3.28",
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-05-10 10:39:13
7
+ * @LastEditTime: 2022-05-15 16:04:55
8
8
  -->
9
9
  <template>
10
10
  <div id="app">
@@ -17,6 +17,11 @@
17
17
  :multiple="false"
18
18
  v-model="state.value"
19
19
  @change="change"></HtSelectBaseData>
20
+ <HtSelectOrg :clearable="true"
21
+ @change="testuser"></HtSelectOrg>
22
+ -------------
23
+ <HtShowBaseType value="DeviceSystemType"></HtShowBaseType>
24
+ ----------
20
25
  <router-view></router-view>
21
26
  </div>
22
27
  </template>
@@ -24,10 +29,14 @@
24
29
  <script lang="ts">
25
30
  import { Component, Vue } from "vue-property-decorator";
26
31
  import HtSelectBaseData from "@/packages/HtSelectBaseData";
32
+ import HtSelectOrg from "@/packages/HtSelectUser";
33
+ import HtShowBaseType from "@/packages/HtShowBaseType";
27
34
  import { mgr } from "@/plugins/oidc-client";
28
35
  @Component({
29
36
  components: {
30
37
  HtSelectBaseData,
38
+ HtSelectOrg,
39
+ HtShowBaseType,
31
40
  },
32
41
  })
33
42
  export default class App extends Vue {
@@ -54,6 +63,9 @@ export default class App extends Vue {
54
63
  change() {
55
64
  // console.log("eeee", e);
56
65
  }
66
+ testuser() {
67
+ //console.log("eee", e);
68
+ }
57
69
  test(e: any) {
58
70
  //mgr.removeUser();
59
71
  // mgr.events.
@@ -652,7 +652,8 @@ export default class CommonDatas extends Vue {
652
652
  }
653
653
  /** 设置下拉数据(级联选择) */
654
654
  setSelctData(key: string, e?: string) {
655
- const value = e ? e : this.state.selectVal[key];
655
+ const value = e || this.state.selectVal[key];
656
+
656
657
  const ref: any | undefined = (this.$refs[key] as any)[0] || this.$refs[key];
657
658
 
658
659
  let checkList = [];
@@ -681,6 +682,9 @@ export default class CommonDatas extends Vue {
681
682
  }
682
683
  );
683
684
  }
685
+ if (!e && !this.state.selectVal[key]) {
686
+ this.state.selectValData[key] = [];
687
+ }
684
688
  this.$emit("change", this.state.selectValData);
685
689
  }
686
690
  /** 基础数据递归处理 */
@@ -0,0 +1,15 @@
1
+ /*
2
+ * @Descripttion: 基础数据展示组件
3
+ * @version:
4
+ * @Author: hutao
5
+ * @Date: 2022-04-12 17:34:51
6
+ * @LastEditors: hutao
7
+ * @LastEditTime: 2022-05-15 14:54:08
8
+ */
9
+
10
+ import HtShowBaseType from "./index.vue";
11
+ (HtShowBaseType as any).install = function (Vue: any) {
12
+
13
+ Vue.component("HtShowBaseType", HtShowBaseType);
14
+ };
15
+ export default HtShowBaseType;
@@ -0,0 +1,69 @@
1
+ <!--
2
+ * @Descripttion:
3
+ * @version:
4
+ * @Author: hutao
5
+ * @Date: 2022-05-15 14:53:15
6
+ * @LastEditors: hutao
7
+ * @LastEditTime: 2022-05-15 16:06:01
8
+ -->
9
+ <template>
10
+ <span>{{state.value}}</span>
11
+ </template>
12
+
13
+ <script lang="ts">
14
+ import { Vue, Prop, Component, Watch } from "vue-property-decorator";
15
+ import { baseConfig } from "vue-kst-auth";
16
+
17
+ interface State {
18
+ value: string;
19
+ }
20
+
21
+ @Component({
22
+ name: "HtShowBaseType",
23
+ })
24
+ export default class HtShowBaseType extends Vue {
25
+ /** 查找不到为空时显示 */
26
+ @Prop() value?: string;
27
+
28
+ /** 人员 */
29
+ /** 数据 */
30
+ state: State = {
31
+ value: "",
32
+ };
33
+ /** 生命周期 */
34
+ created() {
35
+ //
36
+ }
37
+ /** 方法 */
38
+
39
+ @Watch("value", { immediate: true })
40
+ setText(val: string) {
41
+ this.state.value = "";
42
+ if (!val) {
43
+ return;
44
+ }
45
+ if (!baseConfig.getLoginState()) {
46
+ return;
47
+ }
48
+ const data = window.localStorage.getItem("commonDatas");
49
+
50
+ if (data) {
51
+ const dictionaryCategory =
52
+ JSON.parse(data)["dictionaryCategory"]["items"];
53
+ const item = dictionaryCategory.find((item: any) => item.code === val);
54
+ this.state.value = item?.name || "";
55
+ }
56
+ }
57
+ }
58
+ </script>
59
+
60
+ <style lang="scss" scoped>
61
+ .show-common-item {
62
+ display: inline-block;
63
+ .item {
64
+ + .item {
65
+ padding-left: 10px;
66
+ }
67
+ }
68
+ }
69
+ </style>
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-10-21 10:08:41
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-05-05 09:12:46
7
+ * @LastEditTime: 2022-05-15 15:58:44
8
8
  */
9
9
 
10
10
  // 导入组件
@@ -25,12 +25,13 @@ import HtSelectUser from './HtSelectUser/index'
25
25
  import HtShowBaseData from './HtShowBaseData/index'
26
26
  import HtOrgInfo from './HtOrgInfo/index'
27
27
  import HtBaseData from './HtBaseData/index'
28
+ import HtShowBaseType from './HtShowBaseType'
28
29
 
29
30
 
30
31
 
31
32
 
32
33
  // 存储组件列表
33
- const components = [HtBaseData, HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo]
34
+ const components = [HtBaseData, HtShowBaseType, HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo]
34
35
  // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
35
36
  const install = function (Vue: any) {
36
37
  // 判断是否安装
@@ -46,7 +47,7 @@ export default {
46
47
  // 导出的对象必须具有 install,才能被 Vue.use() 方法安装
47
48
  install,
48
49
  // 以下是具体的组件列表
49
- HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles,
50
+ HtSelectTable, HtPagination, HtShowBaseType, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles,
50
51
  HtSelectBaseData, HtSelectOrg, HtSelectUser, HtShowBaseData, HtOrgInfo, HtBaseData
51
52
  }
52
53