htui-yllkbz 1.5.40 → 1.5.42

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.
@@ -86462,6 +86462,52 @@ const getAllBaseData = () => {
86462
86462
  getBaseDataItem(items);
86463
86463
  return baseDataItem;
86464
86464
  };
86465
+ function getCurrentTime() {
86466
+ const date = moment_default()().format("YYYY-MM-DD HH:mm:ss");
86467
+ return date;
86468
+ //
86469
+ }
86470
+ function getCurrentDate() {
86471
+ const date = moment_default()().format("YYYY-MM-DD");
86472
+ return date;
86473
+ //
86474
+ }
86475
+ /** 获取当前用户
86476
+ * @isObj 是否返回整个对象
86477
+ */
86478
+ function getCurrentUser(isObj = false) {
86479
+ let userInfo = window.localStorage.getItem("userInfo");
86480
+ if (userInfo) {
86481
+ userInfo = JSON.parse(userInfo);
86482
+ if (isObj) {
86483
+ return userInfo;
86484
+ }
86485
+ const name = userInfo.surname + userInfo.name;
86486
+ return {
86487
+ id: userInfo.id,
86488
+ signature: userInfo.signature || name,
86489
+ name: name
86490
+ };
86491
+ }
86492
+ return {
86493
+ id: undefined,
86494
+ signature: undefined,
86495
+ name: ''
86496
+ };
86497
+ }
86498
+ /** 获取当前部门 */
86499
+ function getCurrentOrg() {
86500
+ let userOrg = window.localStorage.getItem("userInOrganiza");
86501
+ if (userOrg) {
86502
+ userOrg = JSON.parse(userOrg);
86503
+ return userOrg.length ? userOrg[0] : {
86504
+ id: undefined
86505
+ };
86506
+ }
86507
+ return {
86508
+ id: undefined
86509
+ };
86510
+ }
86465
86511
  // CONCATENATED MODULE: ./node_modules/.store/cache-loader@4.1.0/node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/.store/thread-loader@2.1.3/node_modules/thread-loader/dist/cjs.js!./node_modules/.store/babel-loader@8.4.1/node_modules/babel-loader/lib!./node_modules/.store/ts-loader@6.2.2/node_modules/ts-loader??ref--15-3!./node_modules/.store/cache-loader@4.1.0/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options!./src/packages/HtTable/index.vue?vue&type=script&lang=ts
86466
86512
 
86467
86513
 
Binary file
package/lib/htui.umd.js CHANGED
@@ -86471,6 +86471,52 @@ const getAllBaseData = () => {
86471
86471
  getBaseDataItem(items);
86472
86472
  return baseDataItem;
86473
86473
  };
86474
+ function getCurrentTime() {
86475
+ const date = moment_default()().format("YYYY-MM-DD HH:mm:ss");
86476
+ return date;
86477
+ //
86478
+ }
86479
+ function getCurrentDate() {
86480
+ const date = moment_default()().format("YYYY-MM-DD");
86481
+ return date;
86482
+ //
86483
+ }
86484
+ /** 获取当前用户
86485
+ * @isObj 是否返回整个对象
86486
+ */
86487
+ function getCurrentUser(isObj = false) {
86488
+ let userInfo = window.localStorage.getItem("userInfo");
86489
+ if (userInfo) {
86490
+ userInfo = JSON.parse(userInfo);
86491
+ if (isObj) {
86492
+ return userInfo;
86493
+ }
86494
+ const name = userInfo.surname + userInfo.name;
86495
+ return {
86496
+ id: userInfo.id,
86497
+ signature: userInfo.signature || name,
86498
+ name: name
86499
+ };
86500
+ }
86501
+ return {
86502
+ id: undefined,
86503
+ signature: undefined,
86504
+ name: ''
86505
+ };
86506
+ }
86507
+ /** 获取当前部门 */
86508
+ function getCurrentOrg() {
86509
+ let userOrg = window.localStorage.getItem("userInOrganiza");
86510
+ if (userOrg) {
86511
+ userOrg = JSON.parse(userOrg);
86512
+ return userOrg.length ? userOrg[0] : {
86513
+ id: undefined
86514
+ };
86515
+ }
86516
+ return {
86517
+ id: undefined
86518
+ };
86519
+ }
86474
86520
  // CONCATENATED MODULE: ./node_modules/.store/cache-loader@4.1.0/node_modules/cache-loader/dist/cjs.js??ref--15-0!./node_modules/.store/thread-loader@2.1.3/node_modules/thread-loader/dist/cjs.js!./node_modules/.store/babel-loader@8.4.1/node_modules/babel-loader/lib!./node_modules/.store/ts-loader@6.2.2/node_modules/ts-loader??ref--15-3!./node_modules/.store/cache-loader@4.1.0/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/.store/vue-loader@15.11.1/node_modules/vue-loader/lib??vue-loader-options!./src/packages/HtTable/index.vue?vue&type=script&lang=ts
86475
86521
 
86476
86522
 
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "htui-yllkbz",
3
- "version": "1.5.40",
3
+ "version": "1.5.42",
4
4
  "port": "8082",
5
5
  "typings": "types/index.d.ts",
6
6
  "main": "lib/htui.common.js",
@@ -418,4 +418,49 @@ export const getAllBaseData = () => {
418
418
 
419
419
  return baseDataItem
420
420
  }
421
+ export function getCurrentTime() {
422
+ const date = moment().format("YYYY-MM-DD HH:mm:ss")
423
+ return date
424
+ //
425
+ }
426
+ export function getCurrentDate() {
427
+ const date = moment().format("YYYY-MM-DD")
428
+ return date
429
+ //
430
+ }
431
+ /** 获取当前用户
432
+ * @isObj 是否返回整个对象
433
+ */
434
+ export function getCurrentUser(isObj = false): { id?: string; signature?: string; name?: string } {
435
+ let userInfo: any = window.localStorage.getItem("userInfo");
436
+ if (userInfo) {
437
+ userInfo = JSON.parse(userInfo);
438
+ if (isObj) {
439
+ return userInfo
440
+ }
441
+ const name = userInfo.surname + userInfo.name
442
+ return {
443
+ id: userInfo.id,
444
+ signature: userInfo.signature || name,
445
+ name: name
446
+ }
447
+ }
448
+
449
+ return {
450
+ id: undefined,
451
+ signature: undefined,
452
+ name: ''
453
+ }
454
+ }
455
+ /** 获取当前部门 */
456
+ export function getCurrentOrg() {
457
+ let userOrg: any = window.localStorage.getItem("userInOrganiza");
458
+ if (userOrg) {
459
+ userOrg = JSON.parse(userOrg);
460
+ return userOrg.length ? userOrg[0] : { id: undefined }
461
+ }
462
+ return {
463
+ id: undefined
464
+ }
465
+ }
421
466