@smart100/spu-web-plugin 0.0.32 → 0.0.33

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.
@@ -708,7 +708,7 @@ function _toPropertyKey$1(arg) {
708
708
  return typeof key === "symbol" ? key : String(key);
709
709
  }
710
710
 
711
- var version = "0.0.32";
711
+ var version = "0.0.33";
712
712
 
713
713
  /** Detect free variable `global` from Node.js. */
714
714
  var freeGlobal$2 = typeof global == 'object' && global && global.Object === Object && global;
@@ -12532,7 +12532,7 @@ var WxworksuiteTree = /*#__PURE__*/function (_LitElement) {
12532
12532
  // 判断是否开启企微通信录支持,默认不开启
12533
12533
  _this.iswwopendata = false;
12534
12534
  // 控制通信录转移类型
12535
- _this.wwopendatatype = ''; // userName | departmentName | expression
12535
+ _this.wwopendatatype = ''; // userName | departmentName | expression | ''
12536
12536
  _this.valuekey = 'id'; // 默认id 也可定义别的属性值比如 codepath(被定义的属性值必须唯一)
12537
12537
  _this.ismulselect = false;
12538
12538
  _this.displaytype = 'mobile'; // web | mobile
@@ -13298,7 +13298,7 @@ var WxworksuiteOrganizationpickMobile = /*#__PURE__*/function (_LitElement) {
13298
13298
  function WxworksuiteOrganizationpickMobile() {
13299
13299
  var _this;
13300
13300
  _classCallCheck(this, WxworksuiteOrganizationpickMobile);
13301
- _this = _super.call(this);
13301
+ _this = _super.apply(this, arguments);
13302
13302
  _this.displaytype = 'mobile';
13303
13303
  _this.ismulselect = false;
13304
13304
  _this.issearch = true;
@@ -13315,44 +13315,51 @@ var WxworksuiteOrganizationpickMobile = /*#__PURE__*/function (_LitElement) {
13315
13315
  // disable 不能选非末级节点 只能选末级节点 暂不实现
13316
13316
  _this.singleselectmode = 'normal';
13317
13317
  _this._expandicon = 'organization';
13318
+ _this._isWxworkSuiteTenant = true;
13318
13319
  _this._list = [];
13319
- // axios.post('/api/teapi/dy-biz/100000000000000000/110000000000000000', {
13320
- // pl_orgstruct: {
13321
- // status: '1'
13322
- // }
13323
- // }).then((res: any) => {
13324
- // // console.log(res)
13325
- // const list = res?.data?.pl_orgstruct || []
13326
- // list.forEach((item: any) => {
13327
- // item.name = item.orgname
13328
- // // item.name = '1'
13329
- // item.id = item.orgstructid
13330
- // item.pid = item.parentorgstructid
13331
- // })
13332
- // this._list = list
13333
- // })
13334
- normalAxios$1.post('/api/system/v1.0/org/page', {
13335
- showchild: true,
13336
- orgstructtypeid: 1,
13337
- useRule: _this.userule,
13338
- pageindex: 1,
13339
- pagesize: 99999,
13340
- getAllStatus: false // 是否获取全部数据(即包含禁用)
13341
- }).then(function (res) {
13342
- var _res$data;
13343
- // console.log(res)
13344
- var list = (res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 || (_res$data = _res$data.data) === null || _res$data === void 0 ? void 0 : _res$data.list) || [];
13345
- list.forEach(function (item) {
13346
- item.name = item.orgname;
13347
- // item.name = '1'
13348
- item.id = item.orgstructid;
13349
- item.pid = item.parentorgstructid;
13350
- });
13351
- _this._list = list;
13352
- });
13353
13320
  return _this;
13354
13321
  }
13355
13322
  _createClass(WxworksuiteOrganizationpickMobile, [{
13323
+ key: "connectedCallback",
13324
+ value: function connectedCallback() {
13325
+ var _this2 = this;
13326
+ _get(_getPrototypeOf(WxworksuiteOrganizationpickMobile.prototype), "connectedCallback", this).call(this);
13327
+ // axios.post('/api/teapi/dy-biz/100000000000000000/110000000000000000', {
13328
+ // pl_orgstruct: {
13329
+ // status: '1'
13330
+ // }
13331
+ // }).then((res: any) => {
13332
+ // // console.log(res)
13333
+ // const list = res?.data?.pl_orgstruct || []
13334
+ // list.forEach((item: any) => {
13335
+ // item.name = item.orgname
13336
+ // // item.name = '1'
13337
+ // item.id = item.orgstructid
13338
+ // item.pid = item.parentorgstructid
13339
+ // })
13340
+ // this._list = list
13341
+ // })
13342
+ normalAxios$1.post('/api/system/v1.0/org/page', {
13343
+ showchild: true,
13344
+ orgstructtypeid: 1,
13345
+ useRule: this.userule,
13346
+ pageindex: 1,
13347
+ pagesize: 99999,
13348
+ getAllStatus: false // 是否获取全部数据(即包含禁用)
13349
+ }).then(function (res) {
13350
+ var _res$data;
13351
+ // console.log(res)
13352
+ var list = (res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 || (_res$data = _res$data.data) === null || _res$data === void 0 ? void 0 : _res$data.list) || [];
13353
+ list.forEach(function (item) {
13354
+ item.name = item.orgname;
13355
+ // item.name = '1'
13356
+ item.id = item.orgstructid;
13357
+ item.pid = item.parentorgstructid;
13358
+ });
13359
+ _this2._list = list;
13360
+ });
13361
+ }
13362
+ }, {
13356
13363
  key: "treeRef",
13357
13364
  get: function get() {
13358
13365
  var _this$renderRoot$quer, _this$renderRoot;
@@ -13420,7 +13427,7 @@ var WxworksuiteOrganizationpickMobile = /*#__PURE__*/function (_LitElement) {
13420
13427
  }, {
13421
13428
  key: "render",
13422
13429
  value: function render() {
13423
- return x(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n <wxworksuite-tree\n wwopendatatype=\"departmentName\"\n displaytype=\"", "\"\n expandicon=\"", "\"\n searchplaceholder=\"", "\"\n .issearch=\"", "\"\n .iswwopendata=\"", "\"\n .list=\"", "\"\n .ismulselect=\"", "\"\n singleselectmode=\"", "\"\n mulselectmode=\"", "\"\n @select=\"", "\"\n @check=\"", "\"\n ></wxworksuite-tree>\n "])), this.displaytype, this._expandicon, this.searchplaceholder, this.issearch, true, this._list, this.ismulselect, this.singleselectmode, this.mulselectmode, this._handleSelect, this._handleCheck);
13430
+ return x(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n <wxworksuite-tree\n wwopendatatype=\"", "\"\n displaytype=\"", "\"\n expandicon=\"", "\"\n searchplaceholder=\"", "\"\n .issearch=\"", "\"\n .iswwopendata=\"", "\"\n .list=\"", "\"\n .ismulselect=\"", "\"\n singleselectmode=\"", "\"\n mulselectmode=\"", "\"\n @select=\"", "\"\n @check=\"", "\"\n ></wxworksuite-tree>\n "])), this._isWxworkSuiteTenant ? 'departmentName' : '', this.displaytype, this._expandicon, this.searchplaceholder, this.issearch, this._isWxworkSuiteTenant, this._list, this.ismulselect, this.singleselectmode, this.mulselectmode, this._handleSelect, this._handleCheck);
13424
13431
  }
13425
13432
  }], [{
13426
13433
  key: "register",
@@ -13457,6 +13464,7 @@ __decorate([n$1({
13457
13464
  type: String
13458
13465
  })], WxworksuiteOrganizationpickMobile.prototype, "singleselectmode", void 0);
13459
13466
  __decorate([r$1()], WxworksuiteOrganizationpickMobile.prototype, "_expandicon", void 0);
13467
+ __decorate([r$1()], WxworksuiteOrganizationpickMobile.prototype, "_isWxworkSuiteTenant", void 0);
13460
13468
  __decorate([r$1()], WxworksuiteOrganizationpickMobile.prototype, "_list", void 0);
13461
13469
 
13462
13470
  var _class$2;
@@ -13495,7 +13503,7 @@ var WxworksuiteMemberpickMobile = /*#__PURE__*/function (_LitElement) {
13495
13503
  function WxworksuiteMemberpickMobile() {
13496
13504
  var _this;
13497
13505
  _classCallCheck(this, WxworksuiteMemberpickMobile);
13498
- _this = _super.call(this);
13506
+ _this = _super.apply(this, arguments);
13499
13507
  _this.displaytype = 'mobile';
13500
13508
  _this.ismulselect = false;
13501
13509
  _this.issearch = true;
@@ -13511,57 +13519,72 @@ var WxworksuiteMemberpickMobile = /*#__PURE__*/function (_LitElement) {
13511
13519
  // normal 正常选中取值
13512
13520
  // disable 不能选非末级节点 只能选末级节点 暂不实现
13513
13521
  _this.singleselectmode = 'normal';
13522
+ _this._isWxworkSuiteTenant = true;
13514
13523
  _this._list = [];
13515
- // axios.post('/api/teapi/dy-biz/1032470355689738336/1273067686762516579', {
13516
- // member: {
13517
- // searchkey: '',
13518
- // orglimit: '',
13519
- // orgstructid: '',
13520
- // email: '',
13521
- // includechild: '1'
13522
- // }
13523
- // }).then((res: any) => {
13524
- // // console.log(res)
13525
- // const list = res?.data?.member || []
13526
- // list.forEach((item: any, index: number) => {
13527
- // item.name = `__$$wwopendata(${item.userinfoname}, userName)(${item.positionname})`
13528
- // // item.name = `__$$wwopendata(${item.userinfoname}, userName)(${item.positionname})__$$wwopendata(哈哈+${index}, departmentName)`
13529
- // item.id = item.memberid
13530
- // item.pid = ''
13531
- // item.iswwopendata = true
13532
- // item.wwopendatatype = 'expression'
13533
- // })
13534
- // this._list = list
13535
- // })
13536
- normalAxios$1.post('/api/system/v1.0/member/getMemberList', {
13537
- name: '',
13538
- phoneNumber: '',
13539
- saleAreaCodePath: '',
13540
- positionName: '',
13541
- pageindex: 1,
13542
- pagesize: 99999,
13543
- // useRule: false, // 使用数据权限
13544
- // useRule: this.userule, // 使用数据权限
13545
- appcode: 'sales',
13546
- belongDistributorId: ''
13547
- }).then(function (res) {
13548
- var _res$data;
13549
- // console.log(res)
13550
- // debugger
13551
- var list = (res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 || (_res$data = _res$data.data) === null || _res$data === void 0 ? void 0 : _res$data.list) || [];
13552
- list.forEach(function (item, index) {
13553
- item.name = "__$$wwopendata(".concat(item.userName, ", userName)(").concat(item.positionName, ")");
13554
- // item.name = `__$$wwopendata(${item.userName}, userName)(${item.positionName})__$$wwopendata(哈哈+${index}, departmentName)`
13555
- item.id = item.memberId;
13556
- item.pid = '';
13557
- item.iswwopendata = true;
13558
- item.wwopendatatype = 'expression';
13559
- });
13560
- _this._list = list;
13561
- });
13562
13524
  return _this;
13563
13525
  }
13564
13526
  _createClass(WxworksuiteMemberpickMobile, [{
13527
+ key: "connectedCallback",
13528
+ value: function connectedCallback() {
13529
+ var _this2 = this;
13530
+ _get(_getPrototypeOf(WxworksuiteMemberpickMobile.prototype), "connectedCallback", this).call(this);
13531
+ // axios.post('/api/teapi/dy-biz/1032470355689738336/1273067686762516579', {
13532
+ // member: {
13533
+ // searchkey: '',
13534
+ // orglimit: '',
13535
+ // orgstructid: '',
13536
+ // email: '',
13537
+ // includechild: '1'
13538
+ // }
13539
+ // }).then((res: any) => {
13540
+ // // console.log(res)
13541
+ // const list = res?.data?.member || []
13542
+ // list.forEach((item: any, index: number) => {
13543
+ // item.name = `__$$wwopendata(${item.userinfoname}, userName)(${item.positionname})`
13544
+ // // item.name = `__$$wwopendata(${item.userinfoname}, userName)(${item.positionname})__$$wwopendata(哈哈+${index}, departmentName)`
13545
+ // item.id = item.memberid
13546
+ // item.pid = ''
13547
+ // item.iswwopendata = true
13548
+ // item.wwopendatatype = 'expression'
13549
+ // })
13550
+ // this._list = list
13551
+ // })
13552
+ // console.log('issearch', this.issearch)
13553
+ // console.log('userule', this.userule)
13554
+ // debugger
13555
+ this._isWxworkSuiteTenant = isWxworkSuiteTenant();
13556
+ // debugger
13557
+ normalAxios$1.post('/api/system/v1.0/member/getMemberList', {
13558
+ name: '',
13559
+ phoneNumber: '',
13560
+ saleAreaCodePath: '',
13561
+ positionName: '',
13562
+ pageindex: 1,
13563
+ pagesize: 99999,
13564
+ notUseRule: !this.userule,
13565
+ appcode: 'sales',
13566
+ belongDistributorId: ''
13567
+ }).then(function (res) {
13568
+ var _res$data;
13569
+ // console.log(res)
13570
+ // debugger
13571
+ var list = (res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 || (_res$data = _res$data.data) === null || _res$data === void 0 ? void 0 : _res$data.list) || [];
13572
+ list.forEach(function (item, index) {
13573
+ item.id = item.memberId;
13574
+ item.pid = '';
13575
+ if (_this2._isWxworkSuiteTenant) {
13576
+ item.name = "__$$wwopendata(".concat(item.userName, ", userName)(").concat(item.positionName, ")");
13577
+ // item.name = `__$$wwopendata(${item.userName}, userName)(${item.positionName})__$$wwopendata(哈哈+${index}, departmentName)`
13578
+ item.iswwopendata = true;
13579
+ item.wwopendatatype = 'expression';
13580
+ } else {
13581
+ item.name = "".concat(item.userName, "(").concat(item.positionName, ")");
13582
+ }
13583
+ });
13584
+ _this2._list = list;
13585
+ });
13586
+ }
13587
+ }, {
13565
13588
  key: "treeRef",
13566
13589
  get: function get() {
13567
13590
  var _this$renderRoot$quer, _this$renderRoot;
@@ -13629,7 +13652,7 @@ var WxworksuiteMemberpickMobile = /*#__PURE__*/function (_LitElement) {
13629
13652
  }, {
13630
13653
  key: "render",
13631
13654
  value: function render() {
13632
- return x(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n <wxworksuite-tree\n wwopendatatype=\"expression\"\n displaytype=\"", "\"\n expandicon=\"normal\"\n searchplaceholder=\"", "\"\n .issearch=\"", "\"\n .iswwopendata=\"", "\"\n .list=\"", "\"\n .ismulselect=\"", "\"\n singleselectmode=\"", "\"\n mulselectmode=\"", "\"\n @select=\"", "\"\n @check=\"", "\"\n ></wxworksuite-tree>\n "])), this.displaytype, this.searchplaceholder, this.issearch, true, this._list, this.ismulselect, this.singleselectmode, this.mulselectmode, this._handleSelect, this._handleCheck);
13655
+ return x(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n <wxworksuite-tree\n wwopendatatype=\"", "\"\n displaytype=\"", "\"\n expandicon=\"normal\"\n searchplaceholder=\"", "\"\n .issearch=\"", "\"\n .iswwopendata=\"", "\"\n .list=\"", "\"\n .ismulselect=\"", "\"\n singleselectmode=\"", "\"\n mulselectmode=\"", "\"\n @select=\"", "\"\n @check=\"", "\"\n ></wxworksuite-tree>\n "])), this._isWxworkSuiteTenant ? 'expression' : '', this.displaytype, this.searchplaceholder, this.issearch, this._isWxworkSuiteTenant, this._list, this.ismulselect, this.singleselectmode, this.mulselectmode, this._handleSelect, this._handleCheck);
13633
13656
  }
13634
13657
  }], [{
13635
13658
  key: "register",
@@ -13665,6 +13688,7 @@ __decorate([n$1({
13665
13688
  __decorate([n$1({
13666
13689
  type: String
13667
13690
  })], WxworksuiteMemberpickMobile.prototype, "singleselectmode", void 0);
13691
+ __decorate([r$1()], WxworksuiteMemberpickMobile.prototype, "_isWxworkSuiteTenant", void 0);
13668
13692
  __decorate([r$1()], WxworksuiteMemberpickMobile.prototype, "_list", void 0);
13669
13693
 
13670
13694
  var _class;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smart100/spu-web-plugin",
3
- "version": "0.0.32",
3
+ "version": "0.0.33",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "dev": "npm run build:types && rollup -c -w",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@amap/amap-jsapi-loader": "^1.0.1",
41
- "@smart100/wxworksuite-plugin": "^0.0.11",
41
+ "@smart100/wxworksuite-plugin": "^0.0.12",
42
42
  "axios": "^1.6.0",
43
43
  "co": "^4.6.0",
44
44
  "dayjs": "^1.11.10",