htui-yllkbz 1.5.16 → 1.5.18

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.
package/package.json CHANGED
@@ -1,55 +1,55 @@
1
- {
2
- "name": "htui-yllkbz",
3
- "version": "1.5.16",
4
- "port": "8082",
5
- "typings": "types/index.d.ts",
6
- "main": "lib/htui.common.js",
7
- "style": "lib/htui.css",
8
- "private": false,
9
- "files": [
10
- "lib/**",
11
- "types",
12
- "src"
13
- ],
14
- "scripts": {
15
- "serve": "vue-cli-service serve",
16
- "build": "vue-cli-service build",
17
- "lint": "vue-cli-service lint",
18
- "lib": "vue-cli-service build --target lib --name htui --dest lib src/packages/index.ts",
19
- "publish": "npm run lib && npm publish",
20
- "build-exports": "vue-cli-service build --dest dist/components --target wc-async --name xhsj src/exports/* --inline-vue"
21
- },
22
- "dependencies": {
23
- "@microsoft/signalr": "^8.0.0",
24
- "axios": "^0.21.0",
25
- "core-js": "^3.6.5",
26
- "element-ui": "^2.14.1",
27
- "mavon-editor": "^2.10.4",
28
- "moment": "^2.29.1",
29
- "vue": "^2.6.11",
30
- "vue-class-component": "^7.2.3",
31
- "vue-kst-auth": "^2.1.15",
32
- "vue-property-decorator": "^8.4.2",
33
- "vue-router": "^3.2.0",
34
- "vuex": "^3.4.0"
35
- },
36
- "devDependencies": {
37
- "@typescript-eslint/eslint-plugin": "^2.33.0",
38
- "@typescript-eslint/parser": "^2.33.0",
39
- "@vue/cli-plugin-babel": "^4.5.0",
40
- "@vue/cli-plugin-eslint": "^4.5.0",
41
- "@vue/cli-plugin-typescript": "^4.5.0",
42
- "@vue/cli-service": "^4.5.0",
43
- "@vue/eslint-config-prettier": "^6.0.0",
44
- "@vue/eslint-config-typescript": "^5.0.2",
45
- "compression-webpack-plugin": "^3.0.0",
46
- "eslint": "^6.7.2",
47
- "eslint-plugin-prettier": "^3.1.3",
48
- "eslint-plugin-vue": "^6.2.2",
49
- "prettier": "^1.19.1",
50
- "sass": "^1.26.5",
51
- "sass-loader": "^8.0.2",
52
- "typescript": "~3.9.3",
53
- "vue-template-compiler": "^2.6.11"
54
- }
55
- }
1
+ {
2
+ "name": "htui-yllkbz",
3
+ "version": "1.5.18",
4
+ "port": "8082",
5
+ "typings": "types/index.d.ts",
6
+ "main": "lib/htui.common.js",
7
+ "style": "lib/htui.css",
8
+ "private": false,
9
+ "files": [
10
+ "lib/**",
11
+ "types",
12
+ "src"
13
+ ],
14
+ "scripts": {
15
+ "serve": "vue-cli-service serve",
16
+ "build": "vue-cli-service build",
17
+ "lint": "vue-cli-service lint",
18
+ "lib": "vue-cli-service build --target lib --name htui --dest lib src/packages/index.ts",
19
+ "publish": "npm run lib && npm publish",
20
+ "build-exports": "vue-cli-service build --dest dist/components --target wc-async --name xhsj src/exports/* --inline-vue"
21
+ },
22
+ "dependencies": {
23
+ "@microsoft/signalr": "^8.0.0",
24
+ "axios": "^0.21.0",
25
+ "core-js": "^3.6.5",
26
+ "element-ui": "^2.14.1",
27
+ "mavon-editor": "^2.10.4",
28
+ "moment": "^2.29.1",
29
+ "vue": "^2.6.11",
30
+ "vue-class-component": "^7.2.3",
31
+ "vue-kst-auth": "^2.1.15",
32
+ "vue-property-decorator": "^8.4.2",
33
+ "vue-router": "^3.2.0",
34
+ "vuex": "^3.4.0"
35
+ },
36
+ "devDependencies": {
37
+ "@typescript-eslint/eslint-plugin": "^2.33.0",
38
+ "@typescript-eslint/parser": "^2.33.0",
39
+ "@vue/cli-plugin-babel": "^4.5.0",
40
+ "@vue/cli-plugin-eslint": "^4.5.0",
41
+ "@vue/cli-plugin-typescript": "^4.5.0",
42
+ "@vue/cli-service": "^4.5.0",
43
+ "@vue/eslint-config-prettier": "^6.0.0",
44
+ "@vue/eslint-config-typescript": "^5.0.2",
45
+ "compression-webpack-plugin": "^3.0.0",
46
+ "eslint": "^6.7.2",
47
+ "eslint-plugin-prettier": "^3.1.3",
48
+ "eslint-plugin-vue": "^6.2.2",
49
+ "prettier": "^1.19.1",
50
+ "sass": "^1.26.5",
51
+ "sass-loader": "^8.0.2",
52
+ "typescript": "~3.9.3",
53
+ "vue-template-compiler": "^2.6.11"
54
+ }
55
+ }
@@ -191,9 +191,10 @@ export default class CommonDatas extends Vue {
191
191
  if (!baseConfig.getLoginState()) {
192
192
  return;
193
193
  }
194
- const data = window.localStorage.getItem("commonDatas");
194
+ let data = window.localStorage.getItem("commonDatas");
195
195
  if (data) {
196
196
  this.state.resData = Object.assign(this.state.resData, JSON.parse(data));
197
+ data = null;
197
198
  }
198
199
  const { items = [] } = this.state.resData.baseData;
199
200
  this.getBaseDataItem(items);
@@ -1,131 +1,124 @@
1
1
  <template>
2
- <el-table-column
3
- :label="item.title"
4
- :fixed="item.fixed"
5
- :align="item.align"
6
- v-if="fromColumn ? !item.hide : !item.hide && item.checked"
7
- :resizable="item.resizable"
8
- :header-align="item.headerAlign"
9
- :column-key="item.columnKey"
10
- :class-name="item.className"
11
- :prop="item.key"
12
- :show-overflow-tooltip="
2
+ <el-table-column :label="item.title"
3
+ :fixed="item.fixed"
4
+ :align="item.align"
5
+ v-if="fromColumn ? !item.hide : !item.hide && item.checked"
6
+ :resizable="item.resizable===false?false:true"
7
+ :header-align="item.headerAlign"
8
+ :column-key="item.columnKey"
9
+ :class-name="item.className"
10
+ :prop="item.key"
11
+ :show-overflow-tooltip="
13
12
  item.type === 'common' || item.type === 'org' || item.type === 'userId'
14
13
  ? false
15
14
  : item.showOverflowTooltip === false
16
15
  ? false
17
16
  : true
18
17
  "
19
- :sortable="item.sortable"
20
- :sort-method="item.sortMethod"
21
- :sort-orders="item.sortOrders"
22
- :formatter="item.formatter"
23
- :sort-by="item.sortBy"
24
- :min-width="item.minWidth"
25
- :width="item.width"
26
- >
18
+ :sortable="item.sortable"
19
+ :sort-method="item.sortMethod"
20
+ :sort-orders="item.sortOrders"
21
+ :formatter="item.formatter"
22
+ :sort-by="item.sortBy"
23
+ :min-width="item.minWidth"
24
+ :width="item.width">
25
+
27
26
  <template v-if="item.children && item.children.length">
28
- <HtTableColumn
29
- :item="child"
30
- v-for="(child, childindex) in item.children"
31
- @showFiles="(val) => $emit('showFiles', val)"
32
- :fromColumn="true"
33
- :key="`${child.key}_${childindex}_1`"
34
- >
35
- <template :slot="child.key" slot-scope="scope">
36
- <slot
37
- :name="child.key"
38
- :row="scope.row"
39
- :column="scope.column"
40
- :rowIndex="scope.rowIndex"
41
- >
27
+ <HtTableColumn :item="child"
28
+ v-for="(child, childindex) in item.children"
29
+ @showFiles="(val) => $emit('showFiles', val)"
30
+ :fromColumn="true"
31
+ :key="`${child.key}_${childindex}_1`">
32
+ <template :slot="child.key"
33
+ slot-scope="scope">
34
+ <slot :name="child.key"
35
+ :row="scope.row"
36
+ :column="scope.column"
37
+ :rowIndex="scope.rowIndex">
42
38
  </slot>
43
39
  </template>
44
40
  <!-- <template slot="title" slot-scope="{ data }">
45
41
  <slot name="title" :data="data"></slot
46
42
  ></template> -->
47
- <template slot-scope="scope" :slot="'header_' + child.key">
48
- <slot
49
- :name="'header_' + child.key"
50
- :column="scope.column"
51
- :$index="scope.$index"
52
- ></slot>
43
+ <template slot-scope="scope"
44
+ :slot="'header_' + child.key">
45
+ <slot :name="'header_' + child.key"
46
+ :column="scope.column"
47
+ :$index="scope.$index"></slot>
53
48
  </template>
54
49
  </HtTableColumn>
55
50
  </template>
56
51
  <template slot-scope="{ row, column, $index }">
57
- <slot :name="item.key" :row="row" :column="column" :rowIndex="$index">
52
+
53
+ <slot :name="item.key"
54
+ :row="row"
55
+ :column="column"
56
+ :rowIndex="$index">
58
57
  <!-- 处理部门 -->
59
58
  <template v-if="item.type === 'org'">
60
- <HtOrgInfo
61
- v-if="getPropByPath(row, item.key)"
62
- :org-id="getPropByPath(row, item.key)"
63
- type="tag"
64
- ></HtOrgInfo>
59
+ <HtOrgInfo v-if="getPropByPath(row, item.key)"
60
+ :org-id="getPropByPath(row, item.key)"
61
+ type="tag"></HtOrgInfo>
65
62
  <span v-else>--</span>
66
63
  </template>
67
64
  <!-- 处理基础数据 -->
68
65
  <template v-else-if="item.type === 'common'">
69
- <HtShowBaseData
70
- v-if="getPropByPath(row, item.key)"
71
- :hide-code="item.hideCode"
72
- :user-id="
66
+ <HtShowBaseData v-if="getPropByPath(row, item.key)"
67
+ :hide-code="item.hideCode"
68
+ :user-id="
73
69
  item.commonType === 'userId'
74
70
  ? JSON.stringify([getPropByPath(row, item.key)])
75
71
  : '[]'
76
72
  "
77
- :department-id="
73
+ :department-id="
78
74
  item.commonType === 'departmentId'
79
75
  ? JSON.stringify([getPropByPath(row, item.key)])
80
76
  : '[]'
81
77
  "
82
- :role-id="
78
+ :role-id="
83
79
  item.commonType === 'roleId'
84
80
  ? JSON.stringify([getPropByPath(row, item.key)])
85
81
  : '[]'
86
82
  "
87
- :base-data-id="
83
+ :base-data-id="
88
84
  item.commonType === 'baseDataId'
89
85
  ? getPropByPath(row, item.key)
90
86
  : ''
91
87
  "
92
- :base-data-value="
88
+ :base-data-value="
93
89
  item.commonType === 'baseDataValue'
94
90
  ? getPropByPath(row, item.key)
95
91
  : ''
96
92
  "
97
- :base-data-name="
93
+ :base-data-name="
98
94
  item.commonType === 'baseDataName'
99
95
  ? getPropByPath(row, item.key)
100
96
  : ''
101
97
  "
102
- :base-data-info="true"
103
- >
98
+ :base-data-info="true">
104
99
  </HtShowBaseData>
105
100
 
106
101
  <span v-else>--</span>
107
102
  </template>
108
103
  <!-- 处理部门人员 -->
109
104
  <template v-else-if="item.type === 'userId'">
110
- <HtShowBaseData
111
- v-if="getPropByPath(row, item.key)"
112
- :user-id="JSON.stringify(getPropByPath(row, item.key))"
113
- :base-data-info="true"
114
- >
105
+ <HtShowBaseData v-if="getPropByPath(row, item.key)"
106
+ :user-id="JSON.stringify(getPropByPath(row, item.key))"
107
+ :base-data-info="true">
115
108
  </HtShowBaseData>
116
109
 
117
110
  <span v-else>--</span>
118
111
  </template>
119
112
  <!-- 处理时间 yyyy-mm-dd HH:mm:ss -->
120
113
  <template v-else-if="item.type === 'time'">
121
- <div v-if="getPropByPath(row, item.key)" class="ht-column-cell">
114
+ <div v-if="getPropByPath(row, item.key)"
115
+ class="ht-column-cell">
122
116
  <span v-if="!item.spread">
123
117
  {{
124
118
  getPropByPath(row, item.key)
125
119
  .replace('T', ' ')
126
120
  .slice(0, 19)
127
- }}</span
128
- >
121
+ }}</span>
129
122
  <template v-else>
130
123
  <p style="color:var(--primary);margin:0;padding:0">
131
124
  {{ getPropByPath(row, item.key).slice(11, 19) }}
@@ -143,106 +136,100 @@
143
136
  </template>
144
137
  <!-- 处理日期 yyyy-mm-dd -->
145
138
  <template v-else-if="item.type === 'date'">
146
- <div v-if="getPropByPath(row, item.key)" class="ht-column-cell">
139
+ <div v-if="getPropByPath(row, item.key)"
140
+ class="ht-column-cell">
147
141
  <span>
148
142
  {{
149
143
  getPropByPath(row, item.key)
150
144
  .replace('T', ' ')
151
145
  .slice(0, 10)
152
- }}</span
153
- >
146
+ }}</span>
154
147
  </div>
155
148
  <span v-else>--</span>
156
149
  </template>
157
150
  <!-- 处理布尔值显示 -->
158
151
  <template v-else-if="item.type === 'boolean'">
159
- <el-tag
160
- :type="'success'"
161
- :size="'small'"
162
- v-if="getPropByPath(row, item.key)"
163
- >是</el-tag
164
- >
165
- <el-tag type="danger" :size="'small'" v-else>否</el-tag>
152
+ <el-tag :type="'success'"
153
+ :size="'small'"
154
+ v-if="getPropByPath(row, item.key)">是</el-tag>
155
+ <el-tag type="danger"
156
+ :size="'small'"
157
+ v-else>否</el-tag>
166
158
  </template>
167
159
  <!-- 处理新资产的单位 -->
168
160
  <template v-else-if="item.type === 'unit'">
169
- <HtSelectUnit
170
- :readonly="true"
171
- :value="getPropByPath(row, item.key)"
172
- ></HtSelectUnit>
161
+ <HtSelectUnit :readonly="true"
162
+ :value="getPropByPath(row, item.key)"></HtSelectUnit>
173
163
  </template>
174
164
  <!-- 处理新资产的单位 -->
175
165
  <template v-else-if="item.type === 'position'">
176
- <HtSelectPosition
177
- :readonly="true"
178
- :value="getPropByPath(row, item.key)"
179
- ></HtSelectPosition>
166
+ <HtSelectPosition :readonly="true"
167
+ :value="getPropByPath(row, item.key)"></HtSelectPosition>
180
168
  </template>
181
169
  <!-- 处理图片显示 -->
182
170
  <template v-else-if="item.type === 'img'">
183
171
  <span v-if="getPropByPath(row, item.key)">
184
- <el-image
185
- style="width: 38px; height: 38px;margin-right:5px"
186
- :key="fileToken"
187
- v-for="fileToken in getPropByPath(row, item.key).split(',')"
188
- :src="'/files/api/filing/file/download/' + fileToken"
189
- :preview-src-list="[
172
+ <el-image style="width: 38px; height: 38px;margin-right:5px"
173
+ :key="fileToken"
174
+ v-for="fileToken in getPropByPath(row, item.key).split(',')"
175
+ :src="'/files/api/filing/file/download/' + fileToken"
176
+ :preview-src-list="[
190
177
  '/files/api/filing/file/download/' + fileToken,
191
- ]"
192
- >
178
+ ]">
193
179
  </el-image>
194
180
  </span>
195
181
  </template>
196
182
  <!-- 处理附件显示 -->
197
183
  <template v-else-if="item.type === 'file'">
198
184
  <span v-if="getPropByPath(row, item.key)">
199
- <i
200
- class="el-icon-paperclip"
201
- @click="$emit('showFiles', getPropByPath(row, item.key))"
202
- style="color:var(--primary);cursor:pointer"
203
- >{{
185
+ <i class="el-icon-paperclip"
186
+ @click="$emit('showFiles', getPropByPath(row, item.key))"
187
+ style="color:var(--primary);cursor:pointer">{{
204
188
  Array.isArray(getPropByPath(row, item.key))
205
189
  ? getPropByPath(row, item.key).length
206
190
  : getPropByPath(row, item.key).split(',').length
207
- }}</i
208
- >
191
+ }}</i>
209
192
  </span>
210
193
  <span v-else>--</span>
211
194
  </template>
212
195
  <!-- 其他 -->
213
- <span :style="item.style" v-else>{{
196
+ <span :style="item.style"
197
+ v-else>{{
214
198
  getPropByPath(row, item.key)
215
199
  }}</span>
216
200
  </slot>
217
201
  </template>
218
202
  <!-- 处理重定义table头相关信息 header_key -->
219
- <template slot-scope="{ column, $index }" slot="header">
220
- <slot :name="'header_' + item.key" :column="column" :$index="$index">{{
203
+ <template slot-scope="{ column, $index }"
204
+ slot="header">
205
+ <slot :name="'header_' + item.key"
206
+ :column="column"
207
+ :$index="$index">{{
221
208
  item.title
222
209
  }}</slot>
223
210
  </template>
224
211
  </el-table-column>
225
212
  </template>
226
213
  <script lang="ts">
227
- import { Component, Prop, Vue } from 'vue-property-decorator';
228
- import { Column } from '../type';
229
- import HtShowBaseData from '@/packages/HtShowBaseData';
230
- import HtOrgInfo from '@/packages/HtOrgInfo';
231
- import HtUploadFiles from '@/packages/HtUploadFiles/index.vue';
232
- import HtSelectUnit from '@/packages/HtSelectUnit';
214
+ import { Component, Prop, Vue } from "vue-property-decorator";
215
+ import { Column } from "../type";
216
+ import HtShowBaseData from "@/packages/HtShowBaseData";
217
+ import HtOrgInfo from "@/packages/HtOrgInfo";
218
+ import HtUploadFiles from "@/packages/HtUploadFiles/index.vue";
219
+ import HtSelectUnit from "@/packages/HtSelectUnit";
233
220
 
234
221
  interface State {
235
222
  /** 数据状态 */
236
223
  loading: boolean;
237
224
  }
238
225
  @Component({
239
- name: 'HtTableColumn',
226
+ name: "HtTableColumn",
240
227
  components: {
241
228
  HtUploadFiles,
242
229
  HtShowBaseData,
243
230
  HtOrgInfo,
244
231
  HtSelectUnit,
245
- HtTableColumn: () => import('./htTableColumn.vue'),
232
+ HtTableColumn: () => import("./htTableColumn.vue"),
246
233
  // MenuItem: () => import('./menuItem.vue'),
247
234
  },
248
235
  })
@@ -262,10 +249,10 @@ export default class Index extends Vue {
262
249
  // }
263
250
  getPropByPath(obj: any, path: string, strict = true) {
264
251
  let tempObj = obj;
265
- path = path.replace(/\[(\w+)\]/g, '.$1');
266
- path = path.replace(/^\./, '');
252
+ path = path.replace(/\[(\w+)\]/g, ".$1");
253
+ path = path.replace(/^\./, "");
267
254
 
268
- const keyArr = path.split('.');
255
+ const keyArr = path.split(".");
269
256
  let i = 0;
270
257
  for (let len = keyArr.length; i < len - 1; ++i) {
271
258
  if (!tempObj && !strict) break;