htui-yllkbz 1.3.6 → 1.3.9

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.6",
3
+ "version": "1.3.9",
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-03-08 14:41:55
8
+ */
9
+ import HtSelectBaseData from "./index.vue";
10
+ (HtSelectBaseData as any).install = function (Vue: any) {
11
+
12
+ Vue.component("HtSelectBaseData", HtSelectBaseData);
13
+ };
14
+ export default HtSelectBaseData;
@@ -0,0 +1,109 @@
1
+ <!--
2
+ * @Descripttion: 选择基础信息内容
3
+ * @version:
4
+ * @Author: hutao
5
+ * @Date: 2021-12-30 15:47:47
6
+ * @LastEditors: hutao
7
+ * @LastEditTime: 2022-03-08 14:47:24
8
+ -->
9
+
10
+ <template>
11
+ <div>
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
+ <div v-else
19
+ :disabled="disabled"
20
+ is="common-datas-info"
21
+ com-style="background:#fff"
22
+ :config-json="configJson"
23
+ @change="getCommonData"></div>
24
+
25
+ </template>
26
+ <div v-else>
27
+ <div is='common-datas-info-id'
28
+ com-style="font-size:12px"
29
+ v-if="this.value"
30
+ :hide-code="hideCode"
31
+ :base-data-id='this.value'
32
+ :base-data-info='true'></div>
33
+ </div>
34
+
35
+ </div>
36
+
37
+ </template>
38
+ <script lang='ts'>
39
+ import { Component, Prop, Vue, Watch } from "vue-property-decorator";
40
+ interface State {
41
+ /** 数据状态 */
42
+ loading: boolean;
43
+ value?: string;
44
+ }
45
+ @Component({
46
+ name: "HtSelectBaseData",
47
+ })
48
+ export default class HtSelectBaseData extends Vue {
49
+ @Prop() value!: string;
50
+ /** 是否禁用 */
51
+ @Prop({ default: false }) disabled?: boolean;
52
+ /* 是否只读 */
53
+ @Prop({ default: false }) readonly?: boolean;
54
+ /** 级联id */
55
+ @Prop() dataTypeId!: string;
56
+ /** 展示时候是否隐藏value */
57
+ @Prop() hideCode!: boolean;
58
+ @Prop({ default: false }) clearable!: boolean;
59
+ /** 是否多选 */
60
+ @Prop({ default: false }) multiple!: boolean;
61
+ @Prop({ default: false }) checkStrictly!: boolean;
62
+ @Prop({ default: true }) showAllLevels!: boolean;
63
+ /** 数据 */
64
+ state: State = {
65
+ loading: false,
66
+ value: "",
67
+ };
68
+ /** 生命周期 */
69
+ created() {
70
+ this.state.value = this.value;
71
+ }
72
+ /** 方法 */
73
+
74
+ /** 基础数据返回 */
75
+ getCommonData(res: CustomEvent) {
76
+ const data = res.detail[0];
77
+ const id = data[this.dataTypeId][0]["id"];
78
+ this.$emit("input", id);
79
+ this.$emit("change", id, data[this.dataTypeId][0]);
80
+ }
81
+ /** 监听 */
82
+ @Watch("value")
83
+ onValue(val: string) {
84
+ this.state.value = val;
85
+ }
86
+ /** 计算属性 */
87
+ /** 选项列表 */
88
+ /** 基础组件应用json */
89
+ get configJson() {
90
+ const { dataTypeId = "", value } = this;
91
+ const body: { [key: string]: any } = {};
92
+ body[dataTypeId] = {
93
+ name: "cece",
94
+ show: true,
95
+ clearable: this.clearable,
96
+ disabled: this.disabled,
97
+ showAllLevels: this.showAllLevels,
98
+ multiple: this.multiple,
99
+ code: dataTypeId,
100
+ data: {},
101
+ checkStrictly: this.checkStrictly,
102
+ panel: false,
103
+ key: value,
104
+ };
105
+ return JSON.stringify(body);
106
+ }
107
+ }
108
+ </script>
109
+ <style lang='scss' scoped></style>
@@ -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-03-08 14:50:29
8
+ */
9
+ import HtSelectOrg from "./index.vue";
10
+ (HtSelectOrg as any).install = function (Vue: any) {
11
+
12
+ Vue.component("HtSelectOrg", HtSelectOrg);
13
+ };
14
+ export default HtSelectOrg;
@@ -0,0 +1,85 @@
1
+ <!--
2
+ * @Descripttion:部门选择
3
+ * @version:
4
+ * @Author: hutao
5
+ * @Date: 2021-12-30 14:29:14
6
+ * @LastEditors: hutao
7
+ * @LastEditTime: 2022-03-08 14:53:19
8
+ -->
9
+ <template>
10
+ <span v-if="readonly">
11
+
12
+ <div is='common-datas-info-id'
13
+ v-if="value"
14
+ :department-id="JSON.stringify([value])"></div>
15
+ <span v-else> </span>
16
+ </span>
17
+ <div v-else
18
+ :disabled="disabled"
19
+ is="common-datas-info"
20
+ com-style="background:#fff"
21
+ :config-json="configJson"
22
+ com-class='ht-item-common'
23
+ @change="searchCommonData"></div>
24
+
25
+ </template>
26
+ <script lang='ts'>
27
+ import { Component, Prop, Vue } from "vue-property-decorator";
28
+ interface State {
29
+ /** 数据状态 */
30
+ loading: boolean;
31
+ }
32
+ @Component({
33
+ name: "HtSelectOrg",
34
+ })
35
+ export default class HtSelectOrg extends Vue {
36
+ @Prop() value!: string;
37
+ /** 是否禁用 */
38
+ @Prop() disabled?: boolean;
39
+ /** 是否可以清除 */
40
+ @Prop() clearable?: boolean;
41
+ @Prop({ default: true }) show?: boolean;
42
+ @Prop({ default: false }) multiple?: boolean;
43
+ @Prop({ default: true }) showAllLevels?: boolean;
44
+ @Prop({ default: true }) checkStrictly?: boolean;
45
+ /* 是否只读 */
46
+ @Prop({ default: false }) readonly?: boolean;
47
+ @Prop({ default: false }) panel?: boolean;
48
+ /** 数据 */
49
+ state: State = {
50
+ loading: false,
51
+ };
52
+ /** 生命周期 */
53
+ /** 方法 */
54
+ /**部门选择回调 */
55
+ searchCommonData(res: { [key: string]: any; detail: any }) {
56
+ const dep = res.detail[0]["departmentId"];
57
+ let data = undefined;
58
+ if (dep.length) {
59
+ data = dep[0].id;
60
+ }
61
+ this.$emit("input", data);
62
+ this.$emit("change", data);
63
+ }
64
+ /** 监听 */
65
+ get configJson() {
66
+ return JSON.stringify({
67
+ departmentId: {
68
+ name: "部门树结构",
69
+ show: this.show,
70
+ disabled: this.disabled,
71
+ showAllLevels: this.showAllLevels,
72
+ multiple: this.multiple,
73
+ code: "departmentId",
74
+ data: {},
75
+ checkStrictly: this.checkStrictly,
76
+ panel: this.panel,
77
+ key: this.value,
78
+ clearable: this.clearable,
79
+ },
80
+ });
81
+ }
82
+ /** 计算属性 */
83
+ }
84
+ </script>
85
+ <style lang='scss' scoped></style>
@@ -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-03-08 14:54:22
8
+ */
9
+ import HtSelectUser from "./index.vue";
10
+ (HtSelectUser as any).install = function (Vue: any) {
11
+
12
+ Vue.component("HtSelectUser", HtSelectUser);
13
+ };
14
+ export default HtSelectUser;
@@ -0,0 +1,86 @@
1
+ <!--
2
+ * @Descripttion:部门选择
3
+ * @version:
4
+ * @Author: hutao
5
+ * @Date: 2021-12-30 14:29:14
6
+ * @LastEditors: hutao
7
+ * @LastEditTime: 2022-03-08 14:55:09
8
+ -->
9
+ <template>
10
+
11
+ <span v-if="readonly">
12
+ <div is='common-datas-info-id'
13
+ v-if="value"
14
+ :user-id="JSON.stringify([value])"></div>
15
+ <span v-else> </span>
16
+ </span>
17
+
18
+ <div v-else
19
+ :disabled="disabled"
20
+ is="common-datas-info"
21
+ com-style="background:#fff"
22
+ :config-json="configJson"
23
+ com-class='ht-item-common'
24
+ @change="searchCommonData"></div>
25
+
26
+ </template>
27
+ <script lang='ts'>
28
+ import { Component, Prop, Vue } from "vue-property-decorator";
29
+ interface State {
30
+ /** 数据状态 */
31
+ loading: boolean;
32
+ }
33
+ @Component({
34
+ name: "HtSelectUser",
35
+ })
36
+ export default class HtSelectUser extends Vue {
37
+ @Prop() value!: string;
38
+ /** 是否禁用 */
39
+ @Prop() disabled?: boolean;
40
+ /** 是否可以清除 */
41
+ @Prop() clearable?: boolean;
42
+ @Prop({ default: true }) show?: boolean;
43
+ @Prop({ default: false }) multiple?: boolean;
44
+ @Prop({ default: true }) showAllLevels?: boolean;
45
+ @Prop({ default: true }) checkStrictly?: boolean;
46
+ /* 是否只读 */
47
+ @Prop({ default: false }) readonly?: boolean;
48
+ @Prop({ default: false }) panel?: boolean;
49
+ /** 数据 */
50
+ state: State = {
51
+ loading: false,
52
+ };
53
+ /** 生命周期 */
54
+ /** 方法 */
55
+ /**部门选择回调 */
56
+ searchCommonData(res: { [key: string]: any; detail: any }) {
57
+ const dep = res.detail[0]["departmentId"];
58
+ let data = undefined;
59
+ if (dep.length) {
60
+ data = dep[0].id;
61
+ }
62
+ this.$emit("input", data);
63
+ this.$emit("change", data);
64
+ }
65
+ /** 监听 */
66
+ get configJson() {
67
+ return JSON.stringify({
68
+ departmentUser: {
69
+ name: "部门树结构",
70
+ show: this.show,
71
+ disabled: this.disabled,
72
+ showAllLevels: this.showAllLevels,
73
+ multiple: this.multiple,
74
+ code: "departmentUser",
75
+ data: {},
76
+ checkStrictly: this.checkStrictly,
77
+ panel: this.panel,
78
+ key: this.value,
79
+ clearable: this.clearable,
80
+ },
81
+ });
82
+ }
83
+ /** 计算属性 */
84
+ }
85
+ </script>
86
+ <style lang='scss' scoped></style>
@@ -5,7 +5,7 @@
5
5
  * @Author: hutao
6
6
  * @Date: 2021-11-11 11:23:24
7
7
  * @LastEditors: hutao
8
- * @LastEditTime: 2022-03-02 14:38:49
8
+ * @LastEditTime: 2022-03-09 15:07:20
9
9
  -->
10
10
  <template>
11
11
  <div v-loading="state.loading"
@@ -50,7 +50,7 @@
50
50
  :resizable="false"
51
51
  v-if="checked"
52
52
  :reserve-selection="reserveSelection"
53
- :selectable="selectable"
53
+ :selectable="(row)=>row.selectable!==false"
54
54
  type='selection'>
55
55
  </el-table-column>
56
56
  <el-table-column v-if="!hideOrder"
@@ -69,12 +69,12 @@
69
69
 
70
70
  </slot>
71
71
  </template>
72
- <template slot-scope="{row,column,rowIndex}">
72
+ <template slot-scope="{row,column,$index}">
73
73
  <slot name="body_order"
74
74
  :row="row"
75
75
  :column="column"
76
- :rowIndex="rowIndex">
77
- {{(state.pageInfo.currentPage-1)*state.pageInfo.pageSize+(scope.$index+1)}}
76
+ :$index="$index">
77
+ {{(state.pageInfo.currentPage-1)*state.pageInfo.pageSize+($index+1)}}
78
78
  </slot>
79
79
 
80
80
  </template>
@@ -115,6 +115,7 @@
115
115
 
116
116
  <div v-if="getPropByPath(row,item.key)"
117
117
  is='common-datas-info-id'
118
+ :hide-code="item.hideCode"
118
119
  :user-id="item.commonType==='userId'?JSON.stringify([getPropByPath(row,item.key)]):'[]'"
119
120
  :department-id="item.commonType==='departmentId'?JSON.stringify([getPropByPath(row,item.key)]):'[]'"
120
121
  :role-id="item.commonType==='roleId'?JSON.stringify([getPropByPath(row,item.key)]):'[]'"
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-10-21 10:08:41
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-02-11 14:29:18
7
+ * @LastEditTime: 2022-03-08 14:57:05
8
8
  */
9
9
 
10
10
  // 导入组件
@@ -19,10 +19,13 @@ import HtUpload from './HtUpload/index'
19
19
  import HtMd from './HtMd/index'
20
20
  import HtCountDown from './HtCountDown/index'
21
21
  import HtUploadFiles from './HtUploadFiles/index'
22
+ import HtSelectBaseData from './HtSelectBaseData/index'
23
+ import HtSelectOrg from './HtSelectOrg/index'
24
+ import HtSelectUser from './HtSelectUser/index'
22
25
 
23
26
 
24
27
  // 存储组件列表
25
- const components = [HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles]
28
+ const components = [HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles, HtSelectBaseData, HtSelectOrg, HtSelectUser]
26
29
  // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
27
30
  const install = function (Vue: any) {
28
31
  // 判断是否安装
@@ -38,6 +41,7 @@ export default {
38
41
  // 导出的对象必须具有 install,才能被 Vue.use() 方法安装
39
42
  install,
40
43
  // 以下是具体的组件列表
41
- HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles
44
+ HtSelectTable, HtPagination, HtTable, HtExport, HtUpload, HtMd, HtCountDown, HtUploadFiles,
45
+ HtSelectBaseData, HtSelectOrg, HtSelectUser
42
46
  }
43
47
 
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-10-25 17:05:17
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-02-14 09:39:55
7
+ * @LastEditTime: 2022-03-08 14:40:00
8
8
  */
9
9
  /** 初始的默认条数 */
10
10
  export const defalutPageSize = 10
@@ -73,6 +73,8 @@ export interface Column {
73
73
  type?: 'userId' | 'org' | 'time' | 'common' | 'boolean' | 'img' | 'file';
74
74
  /** 只有当type='common'时候有效 数据类型个ca common里面的一样但不包括时间 时间使用time */
75
75
  commonType?: 'userId' | 'departmentId' | 'baseDataId' | 'roleId' | 'baseDataName' | 'baseDataValue';
76
+ /** 当type===common时候 设置是否隐藏基础数据的value */
77
+ hideCode?: boolean;
76
78
  showOverflowTooltip?: boolean;
77
79
  /** 筛选时候是否禁用 */
78
80
  disabled?: boolean;
@@ -4,7 +4,7 @@
4
4
  * @Author: hutao
5
5
  * @Date: 2021-11-15 14:41:40
6
6
  * @LastEditors: hutao
7
- * @LastEditTime: 2022-02-14 10:13:10
7
+ * @LastEditTime: 2022-03-09 15:08:19
8
8
  -->
9
9
  <template>
10
10
  <div>
@@ -29,6 +29,7 @@
29
29
  :subfield="true"></ht-md> -->
30
30
  <div ref="ht-pdf">
31
31
  <HtTable :data="state.data"
32
+ :checked="true"
32
33
  :height="200"
33
34
  uuId="54598fs1okdsfsdfk2"
34
35
  :showFilter="true"
@@ -82,7 +83,7 @@ export default class Index extends Vue {
82
83
  data: [
83
84
  {
84
85
  name: "胡涛",
85
-
86
+ selectable: true,
86
87
  age: 12,
87
88
  sex: "e49961a4f385e5d341ce3a01ee674c90ea9e037b734228fe26753a01ee674c90,e49961a4f385e5d341ce3a01ee674c90ea9e037b734228fe26753a01ee674c90",
88
89
  id: 1,
@@ -92,6 +93,7 @@ export default class Index extends Vue {
92
93
  {
93
94
  name: "胡涛",
94
95
  age: 12,
96
+ selectable: false,
95
97
  sex: "e49961a4f385e5d341ce3a01ee674c90ea9e037b734228fe26753a01ee674c90",
96
98
  id: 2,
97
99
  test: { title: "测试" },