完成签约之后直接添加人员,录入下发凭证
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1959 lines
64 KiB

  1. webpackJsonp([26],{
  2. /***/ "R51N":
  3. /***/ (function(module, exports) {
  4. // removed by extract-text-webpack-plugin
  5. /***/ }),
  6. /***/ "Y/OZ":
  7. /***/ (function(module, exports) {
  8. // removed by extract-text-webpack-plugin
  9. /***/ }),
  10. /***/ "YJK1":
  11. /***/ (function(module, exports) {
  12. // removed by extract-text-webpack-plugin
  13. /***/ }),
  14. /***/ "xKmd":
  15. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  16. "use strict";
  17. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  18. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/set.js
  19. var set = __webpack_require__("lHA8");
  20. var set_default = /*#__PURE__*/__webpack_require__.n(set);
  21. // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/toConsumableArray.js
  22. var toConsumableArray = __webpack_require__("Gu7T");
  23. var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
  24. // EXTERNAL MODULE: ./node_modules/babel-runtime/regenerator/index.js
  25. var regenerator = __webpack_require__("Xxa5");
  26. var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
  27. // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/asyncToGenerator.js
  28. var asyncToGenerator = __webpack_require__("exGp");
  29. var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
  30. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/json/stringify.js
  31. var stringify = __webpack_require__("mvHQ");
  32. var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);
  33. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/object/assign.js
  34. var object_assign = __webpack_require__("woOf");
  35. var assign_default = /*#__PURE__*/__webpack_require__.n(object_assign);
  36. // EXTERNAL MODULE: ./node_modules/jquery/src/jquery.js
  37. var jquery = __webpack_require__("4kSj");
  38. var jquery_default = /*#__PURE__*/__webpack_require__.n(jquery);
  39. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/zTree2.vue
  40. //
  41. //
  42. //
  43. //
  44. if (!window.jQuery) {
  45. window.jQuery = jquery;
  46. }
  47. __webpack_require__("TRKB");
  48. /* harmony default export */ var zTree2 = ({
  49. props: {
  50. setting: {
  51. type: Object,
  52. require: false,
  53. default: function _default() {
  54. return {};
  55. }
  56. },
  57. nodes: {
  58. type: Array,
  59. require: true,
  60. default: function _default() {
  61. return [];
  62. }
  63. }
  64. },
  65. data: function data() {
  66. var _this = this;
  67. return {
  68. ztreeId: 'ztree_' + parseInt(Math.random() * 1e10),
  69. ztreeObj: null,
  70. list: [],
  71. ztreeSetting: {
  72. view: {
  73. showIcon: false // default to hide icon
  74. },
  75. callback: {
  76. onAsyncError: function onAsyncError() {
  77. for (var _len = arguments.length, arg = Array(_len), _key = 0; _key < _len; _key++) {
  78. arg[_key] = arguments[_key];
  79. }
  80. _this.$emit.apply(_this, ['onAsyncError'].concat(arg));
  81. },
  82. onAsyncSuccess: function onAsyncSuccess() {
  83. for (var _len2 = arguments.length, arg = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  84. arg[_key2] = arguments[_key2];
  85. }
  86. _this.$emit.apply(_this, ['onAsyncSuccess'].concat(arg));
  87. },
  88. onCheck: function onCheck() {
  89. for (var _len3 = arguments.length, arg = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  90. arg[_key3] = arguments[_key3];
  91. }
  92. _this.$emit.apply(_this, ['onCheck'].concat(arg));
  93. },
  94. onClick: function onClick() {
  95. for (var _len4 = arguments.length, arg = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  96. arg[_key4] = arguments[_key4];
  97. }
  98. _this.$emit.apply(_this, ['onClick'].concat(arg));
  99. },
  100. onCollapse: function onCollapse() {
  101. for (var _len5 = arguments.length, arg = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  102. arg[_key5] = arguments[_key5];
  103. }
  104. _this.$emit.apply(_this, ['onCollapse'].concat(arg));
  105. },
  106. onDblClick: function onDblClick() {
  107. for (var _len6 = arguments.length, arg = Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  108. arg[_key6] = arguments[_key6];
  109. }
  110. _this.$emit.apply(_this, ['onDblClick'].concat(arg));
  111. },
  112. onDrag: function onDrag() {
  113. for (var _len7 = arguments.length, arg = Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  114. arg[_key7] = arguments[_key7];
  115. }
  116. _this.$emit.apply(_this, ['onDrag'].concat(arg));
  117. },
  118. onDragMove: function onDragMove() {
  119. for (var _len8 = arguments.length, arg = Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  120. arg[_key8] = arguments[_key8];
  121. }
  122. _this.$emit.apply(_this, ['onDragMove'].concat(arg));
  123. },
  124. onDrop: function onDrop() {
  125. for (var _len9 = arguments.length, arg = Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
  126. arg[_key9] = arguments[_key9];
  127. }
  128. _this.$emit.apply(_this, ['onDrop'].concat(arg));
  129. },
  130. onExpand: function onExpand() {
  131. for (var _len10 = arguments.length, arg = Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
  132. arg[_key10] = arguments[_key10];
  133. }
  134. _this.$emit.apply(_this, ['onExpand'].concat(arg));
  135. },
  136. onMouseDown: function onMouseDown() {
  137. for (var _len11 = arguments.length, arg = Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
  138. arg[_key11] = arguments[_key11];
  139. }
  140. _this.$emit.apply(_this, ['onMouseDown'].concat(arg));
  141. },
  142. onMouseUp: function onMouseUp() {
  143. for (var _len12 = arguments.length, arg = Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
  144. arg[_key12] = arguments[_key12];
  145. }
  146. _this.$emit.apply(_this, ['onMouseUp'].concat(arg));
  147. },
  148. onRemove: function onRemove() {
  149. for (var _len13 = arguments.length, arg = Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
  150. arg[_key13] = arguments[_key13];
  151. }
  152. _this.$emit.apply(_this, ['onRemove'].concat(arg));
  153. },
  154. onRename: function onRename() {
  155. for (var _len14 = arguments.length, arg = Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {
  156. arg[_key14] = arguments[_key14];
  157. }
  158. _this.$emit.apply(_this, ['onRename'].concat(arg));
  159. },
  160. beforeRename: function beforeRename() {
  161. for (var _len15 = arguments.length, arg = Array(_len15), _key15 = 0; _key15 < _len15; _key15++) {
  162. arg[_key15] = arguments[_key15];
  163. }
  164. _this.$emit.apply(_this, ['beforeRename'].concat(arg));
  165. },
  166. onRightClick: function onRightClick() {
  167. for (var _len16 = arguments.length, arg = Array(_len16), _key16 = 0; _key16 < _len16; _key16++) {
  168. arg[_key16] = arguments[_key16];
  169. }
  170. _this.$emit.apply(_this, ['onRightClick'].concat(arg));
  171. }
  172. }
  173. }
  174. };
  175. },
  176. watch: {
  177. nodes: {
  178. handler: function handler(nodes) {
  179. var _this2 = this;
  180. this.list = nodes;
  181. // update tree
  182. if (this.ztreeObj) {
  183. this.ztreeObj.destroy();
  184. }
  185. this.$nextTick(function () {
  186. _this2.ztreeObj = jquery["fn"].zTree.init(jquery("#" + _this2.ztreeId), assign_default()({}, _this2.ztreeSetting, _this2.setting), _this2.list);
  187. _this2.$emit('onCreated', _this2.ztreeObj);
  188. _this2.ztreeObj.expandAll(true);
  189. });
  190. },
  191. deep: true,
  192. immediate: true
  193. }
  194. }
  195. });
  196. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-5d3736a4","hasScoped":true,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/zTree2.vue
  197. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"ztree",attrs:{"id":_vm.ztreeId}})}
  198. var staticRenderFns = []
  199. var esExports = { render: render, staticRenderFns: staticRenderFns }
  200. /* harmony default export */ var components_zTree2 = (esExports);
  201. // CONCATENATED MODULE: ./src/components/zTree2.vue
  202. function injectStyle (ssrContext) {
  203. __webpack_require__("R51N")
  204. }
  205. var normalizeComponent = __webpack_require__("VU/8")
  206. /* script */
  207. /* template */
  208. /* template functional */
  209. var __vue_template_functional__ = false
  210. /* styles */
  211. var __vue_styles__ = injectStyle
  212. /* scopeId */
  213. var __vue_scopeId__ = "data-v-5d3736a4"
  214. /* moduleIdentifier (server only) */
  215. var __vue_module_identifier__ = null
  216. var Component = normalizeComponent(
  217. zTree2,
  218. components_zTree2,
  219. __vue_template_functional__,
  220. __vue_styles__,
  221. __vue_scopeId__,
  222. __vue_module_identifier__
  223. )
  224. /* harmony default export */ var src_components_zTree2 = (Component.exports);
  225. // EXTERNAL MODULE: ./src/api/index.js + 5 modules
  226. var api = __webpack_require__("gyMJ");
  227. // EXTERNAL MODULE: ./src/utils/index.js
  228. var utils = __webpack_require__("0xDb");
  229. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/zTree.vue
  230. //
  231. //
  232. //
  233. //
  234. //
  235. //
  236. //
  237. //
  238. //
  239. //
  240. //
  241. //
  242. //
  243. /* harmony default export */ var zTree = ({
  244. name: "zTree",
  245. data: function data() {
  246. return {
  247. selectedNode: {},
  248. setting: {
  249. view: {
  250. showLine: false,
  251. showIcon: true
  252. },
  253. callbakck: {
  254. onClick: function onClick(treeId, treeNode) {
  255. console.log(treeNode);
  256. }
  257. },
  258. data: {
  259. simpleData: {
  260. enable: true,
  261. idKey: "id",
  262. pIdKey: "pid",
  263. rootPId: 0
  264. },
  265. zNodes: [{}]
  266. }
  267. }
  268. };
  269. },
  270. methods: {
  271. zTreeOnClick: function zTreeOnClick(event, treeId, treeNode) {
  272. //触发点击后面节点问题
  273. console.log(treeNode);
  274. this.selectedNode = treeNode;
  275. this.$emit("treeClick", treeNode);
  276. },
  277. getlist: function getlist(id) {
  278. console.log(1111);
  279. // this.$parent.fatherMethod(id);
  280. },
  281. freshArea: function freshArea() {
  282. $.fn.zTree.init($("#treeDemo"), this.setting, this.zNodes);
  283. }
  284. },
  285. mounted: function mounted() {
  286. $.fn.zTree.init($("#treeDemo"), this.setting, this.zNodes).expandAll(true);
  287. }
  288. });
  289. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-96092a0e","hasScoped":true,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/zTree.vue
  290. var zTree_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}
  291. var zTree_staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":"areaTree"}},[_c('div',{staticClass:"tree-box"},[_c('div',{staticClass:"zTreeDemoBackground left"},[_c('ul',{staticClass:"ztree",attrs:{"id":"treeDemo"}})])])])}]
  292. var zTree_esExports = { render: zTree_render, staticRenderFns: zTree_staticRenderFns }
  293. /* harmony default export */ var components_zTree = (zTree_esExports);
  294. // CONCATENATED MODULE: ./src/components/zTree.vue
  295. function zTree_injectStyle (ssrContext) {
  296. __webpack_require__("Y/OZ")
  297. }
  298. var zTree_normalizeComponent = __webpack_require__("VU/8")
  299. /* script */
  300. /* template */
  301. /* template functional */
  302. var zTree___vue_template_functional__ = false
  303. /* styles */
  304. var zTree___vue_styles__ = zTree_injectStyle
  305. /* scopeId */
  306. var zTree___vue_scopeId__ = "data-v-96092a0e"
  307. /* moduleIdentifier (server only) */
  308. var zTree___vue_module_identifier__ = null
  309. var zTree_Component = zTree_normalizeComponent(
  310. zTree,
  311. components_zTree,
  312. zTree___vue_template_functional__,
  313. zTree___vue_styles__,
  314. zTree___vue_scopeId__,
  315. zTree___vue_module_identifier__
  316. )
  317. /* harmony default export */ var src_components_zTree = (zTree_Component.exports);
  318. // EXTERNAL MODULE: ./src/utils/util.js
  319. var util = __webpack_require__("oFuF");
  320. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/loginAccount.vue
  321. //
  322. //
  323. //
  324. //
  325. //
  326. //
  327. //
  328. //
  329. //
  330. //
  331. //
  332. //
  333. //
  334. //
  335. //
  336. //
  337. //
  338. //
  339. //
  340. //
  341. //
  342. //
  343. //
  344. //
  345. //
  346. //
  347. //
  348. //
  349. //
  350. //
  351. //
  352. //
  353. //
  354. //
  355. //
  356. //
  357. //
  358. //
  359. //
  360. //
  361. //
  362. //
  363. //
  364. //
  365. //
  366. //
  367. //
  368. //
  369. //
  370. //
  371. //
  372. //
  373. //
  374. //
  375. //
  376. //
  377. //
  378. //
  379. //
  380. //
  381. //
  382. //
  383. //
  384. //
  385. //
  386. //
  387. //
  388. //
  389. //
  390. //
  391. //
  392. //
  393. //
  394. //
  395. //
  396. //
  397. //
  398. //
  399. //
  400. //
  401. //
  402. //
  403. //
  404. //
  405. //
  406. //
  407. //
  408. //
  409. //
  410. //
  411. //
  412. //
  413. //
  414. //
  415. //
  416. //
  417. //
  418. //
  419. //
  420. //
  421. //
  422. //
  423. //
  424. //
  425. //
  426. //
  427. //
  428. //
  429. //
  430. //
  431. //
  432. //
  433. //
  434. //
  435. //
  436. //
  437. //
  438. //
  439. //
  440. //
  441. //
  442. //
  443. //
  444. //
  445. //
  446. //
  447. //
  448. //
  449. //
  450. //
  451. //
  452. //
  453. //
  454. //
  455. //
  456. //
  457. //
  458. //
  459. //
  460. //
  461. //
  462. //
  463. //
  464. //
  465. //
  466. //
  467. //
  468. //
  469. //
  470. //
  471. //
  472. //
  473. //
  474. //
  475. //
  476. //
  477. //
  478. //
  479. //
  480. //
  481. //
  482. //
  483. //
  484. //
  485. //
  486. //
  487. //
  488. //
  489. //
  490. //
  491. //
  492. //
  493. //
  494. //
  495. //
  496. //
  497. //
  498. //
  499. //
  500. //
  501. //
  502. //
  503. //
  504. //
  505. //
  506. //
  507. //
  508. //
  509. //
  510. //
  511. //
  512. //
  513. //
  514. //
  515. //
  516. //
  517. //
  518. //
  519. //
  520. //
  521. //
  522. //
  523. //
  524. //
  525. //
  526. //
  527. //
  528. //
  529. //
  530. //
  531. //
  532. //
  533. //
  534. //
  535. //
  536. //
  537. //
  538. //
  539. //
  540. //
  541. //
  542. //
  543. //
  544. //
  545. //
  546. //
  547. //
  548. //
  549. //
  550. //
  551. //
  552. //
  553. //
  554. //
  555. //
  556. //
  557. //
  558. //
  559. //
  560. //
  561. //
  562. //
  563. //
  564. //
  565. //
  566. //
  567. //
  568. //
  569. //
  570. //
  571. //
  572. //
  573. //
  574. //
  575. //
  576. //
  577. //
  578. //
  579. //
  580. //
  581. //
  582. //
  583. //
  584. //
  585. //
  586. /* harmony default export */ var loginAccount = ({
  587. inject: ['reload'],
  588. name: "basetable",
  589. data: function data() {
  590. var self = this;
  591. return {
  592. atAlertList: [{
  593. value: 1,
  594. label: '撬锁报警'
  595. }, {
  596. value: 2,
  597. label: '强行开门报警'
  598. }, {
  599. value: 7,
  600. label: '低电量报警'
  601. }, {
  602. value: 9,
  603. label: '胁迫开锁报警'
  604. }],
  605. sendItemList: [{
  606. value: 1,
  607. label: '充值短信'
  608. }, {
  609. value: 2,
  610. label: '交租成功'
  611. }, {
  612. value: 3,
  613. label: '提醒交租'
  614. }, {
  615. value: 4,
  616. label: '签约成功'
  617. }],
  618. historyUser: false,
  619. selectoption: [],
  620. selectoptionValue: '',
  621. historySelection: [],
  622. pageNum1: 1,
  623. pageSize1: 10,
  624. pageTotal1: 0,
  625. historyData: [],
  626. addresstc: false,
  627. center: [114.064552, 22.548457],
  628. jurisdiction: {
  629. roleId: '',
  630. userType: '',
  631. identity: '',
  632. enterpriseName: ''
  633. },
  634. lng: 0,
  635. lat: 0,
  636. loaded: false,
  637. events: {
  638. click: function click(e) {
  639. self.center = [e.lnglat.lng, e.lnglat.lat];
  640. self.Enterprise.address = stringify_default()([e.lnglat.lng, e.lnglat.lat]);
  641. self.Enterprise1.address = stringify_default()([e.lnglat.lng, e.lnglat.lat]);
  642. }
  643. },
  644. plugin: [{
  645. enableHighAccuracy: true, //是否使用高精度定位,默认:true
  646. timeout: 100, //超过10秒后停止定位,默认:无穷大
  647. maximumAge: 0, //定位结果缓存0毫秒,默认:0
  648. convert: true, //自动偏移坐标,偏移后的坐标为高德坐标,默认:true
  649. showButton: true, //显示定位按钮,默认:true
  650. buttonPosition: 'RB', //定位按钮停靠位置,默认:'LB',左下角
  651. showMarker: true, //定位成功后在定位到的位置显示点标记,默认:true
  652. showCircle: true, //定位成功后用圆圈表示定位精度范围,默认:true
  653. panToLocation: true, //定位成功后将定位到的位置作为地图中心点,默认:true
  654. zoomToAccuracy: true, //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:f
  655. extensions: 'all',
  656. pName: 'Geolocation',
  657. events: {
  658. init: function init(o) {
  659. // o 是高德地图定位插件实例
  660. o.getCurrentPosition(function (status, result) {
  661. if (result && result.position) {
  662. self.lng = result.position.lng;
  663. self.lat = result.position.lat;
  664. self.center = [self.lng, self.lat];
  665. self.loaded = true;
  666. self.$nextTick();
  667. }
  668. });
  669. },
  670. click: function click(e) {
  671. console.log(e);
  672. }
  673. }
  674. }],
  675. sele: true,
  676. selTreestatus: true,
  677. SelectedList: [],
  678. defaultProps: {
  679. children: "children",
  680. label: "name"
  681. },
  682. zNodes: [],
  683. setting1: {
  684. edit: {
  685. enable: true,
  686. editNameSelectAll: true,
  687. drag: {
  688. isMove: false
  689. },
  690. showRemoveBtn: false,
  691. showRenameBtn: true,
  692. renameTitle: "修改"
  693. },
  694. check: {
  695. enable: true
  696. },
  697. data: {
  698. simpleData: {
  699. enable: true,
  700. pIdKey: "pid"
  701. }
  702. },
  703. view: {
  704. showIcon: false,
  705. addHoverDom: this.addHoverDom,
  706. removeHoverDom: this.removeHoverDom
  707. }
  708. },
  709. setting: {
  710. edit: {
  711. enable: true,
  712. editNameSelectAll: true,
  713. drag: {
  714. isMove: false
  715. },
  716. showRemoveBtn: false,
  717. showRenameBtn: true,
  718. renameTitle: "修改"
  719. },
  720. check: {
  721. enable: false
  722. },
  723. data: {
  724. simpleData: {
  725. enable: true,
  726. pIdKey: "parentId"
  727. }
  728. },
  729. view: {
  730. showIcon: false,
  731. addHoverDom: this.addHoverDom,
  732. removeHoverDom: this.removeHoverDom
  733. }
  734. },
  735. ssjg: "",
  736. addHoverDom: true,
  737. modifyfrom: {
  738. oldPassword: "",
  739. newPassword: "",
  740. confirmPassword: ""
  741. },
  742. isRouterAlive: true,
  743. identity: "",
  744. userType: "",
  745. enterpriselist: [],
  746. Enterprise: {
  747. name: "",
  748. quota: ''
  749. },
  750. Enterprise1: {
  751. name: "",
  752. address: '',
  753. atAlert: '',
  754. sendItem: ''
  755. },
  756. rololist: [],
  757. enterpriseidedit: false,
  758. yhsflist: [{
  759. value: 1,
  760. label: "高级管理员"
  761. }, {
  762. value: 2,
  763. label: "中级管理员"
  764. }, {
  765. value: 3,
  766. label: "低级管理员"
  767. }],
  768. yhlxlist: [{
  769. value: 1,
  770. label: "管理员"
  771. }, {
  772. value: 2,
  773. label: "子用户"
  774. }, {
  775. value: 3,
  776. label: "小程序用户"
  777. }],
  778. pageSize: 10,
  779. pageIndex: 1,
  780. query: {
  781. address: "",
  782. name: "",
  783. pageIndex: 1,
  784. pageSize: 10,
  785. options: []
  786. },
  787. tableData: [],
  788. multipleSelection: [],
  789. delList: [],
  790. editVisible: false,
  791. pageTotal: 0,
  792. form: {},
  793. addform: {
  794. username: "",
  795. password: "",
  796. enterpriseName: "",
  797. identity: "0",
  798. userType: "",
  799. roleId: '',
  800. enterpriseId: ""
  801. },
  802. rules: {
  803. username: [{
  804. required: true,
  805. message: "请输入名称",
  806. trigger: "blur"
  807. }],
  808. phone: [{
  809. required: true,
  810. message: "请输入电话",
  811. trigger: "blur"
  812. }, {
  813. min: 11,
  814. max: 11,
  815. message: "长度为 11 个字符",
  816. trigger: "blur"
  817. }],
  818. password: [{
  819. required: true,
  820. message: "请输入密码",
  821. trigger: "blur"
  822. }],
  823. enterpriseName: [{
  824. required: true,
  825. message: "请选择部门",
  826. trigger: "blur"
  827. }],
  828. userType: [{
  829. required: true,
  830. message: "请选择用户类型",
  831. trigger: "blur"
  832. }]
  833. },
  834. idx: -1,
  835. id: -1,
  836. editVisible1: false,
  837. enterpriseidedit1: false,
  838. enterpriseId: "",
  839. enterpriseId1: "",
  840. roomtable: [],
  841. activeName: "first",
  842. roomstatus: true,
  843. zNodes1: [],
  844. roomlist1: [],
  845. pid: 1,
  846. roomlist: [],
  847. selectkey: [],
  848. selectkey1: [],
  849. enterpriseId2: '',
  850. userInfo: {
  851. type: ''
  852. },
  853. roleIds: [],
  854. tenantId: '',
  855. selectKeyList: [],
  856. colNum_6: 6,
  857. colNum_18: 18
  858. };
  859. },
  860. components: {
  861. zTree: src_components_zTree2,
  862. zTree1: src_components_zTree,
  863. zTreeOne: src_components_zTree2
  864. },
  865. beforeCreate: function beforeCreate() {
  866. // this.$store.commit('getselectoption')
  867. },
  868. created: function created() {
  869. this.userInfo = JSON.parse(localStorage.getItem('info'));
  870. this.enterpriseId = this.userInfo.enterpriseId;
  871. this.getEnterprise();
  872. this.selectoption = JSON.parse(localStorage.getItem('selectoption'));
  873. this.selectoptionValue = localStorage.getItem('tenantId');
  874. if (document.documentElement.clientWidth < 1080) {
  875. this.colNum_6 = 24;
  876. this.colNum_18 = 24;
  877. } else {
  878. this.colNum_6 = 6;
  879. this.colNum_18 = 18;
  880. }
  881. },
  882. mounted: function mounted() {
  883. this.getUserID();
  884. this.getUserList();
  885. this.addRoom();
  886. if (this.userInfo.type == 0) {
  887. this.getDeletes();
  888. }
  889. },
  890. methods: {
  891. selectTenantId: function selectTenantId(e) {
  892. localStorage.setItem('tenantId', e);
  893. this.reload();
  894. },
  895. // 获取选中角色权限
  896. getCheckNode: function getCheckNode(e) {
  897. var list = [];
  898. e.map(function (li) {
  899. list.push(li[0]);
  900. });
  901. this.jurisdiction.roleId = list;
  902. },
  903. getCheckNode1: function getCheckNode1(e) {
  904. var list = [];
  905. e.map(function (li) {
  906. list.push(li[0]);
  907. });
  908. this.roleIds = list;
  909. },
  910. // 权限选择
  911. jurisdictionFun: function jurisdictionFun() {},
  912. getDeletes: function getDeletes() {
  913. var _this = this;
  914. var data = {
  915. pageNum: this.pageNum1,
  916. pageSize: this.pageSize1
  917. };
  918. Object(api["d" /* httpGet */])(data, this.$api.getDeletes).then(function (res) {
  919. if (res.success) {
  920. _this.historyData = res.data.list;
  921. _this.pageTotal1 = res.data.total;
  922. } else {
  923. _this.$message.error('获取历史账户失败');
  924. }
  925. });
  926. },
  927. historicalAccount: function historicalAccount() {
  928. this.historyUser = true;
  929. },
  930. // 强制删除登录用户
  931. forceDeletion: function forceDeletion(index, row) {
  932. var _this2 = this;
  933. this.$confirm("确定要删除吗?", "提示", {
  934. type: "warning"
  935. }).then(function () {
  936. var data = {
  937. user: row.username
  938. };
  939. Object(api["d" /* httpGet */])(data, _this2.$api.orderKill).then(function (res) {
  940. if (res.success) {
  941. _this2.getUserList();
  942. _this2.getDeletes();
  943. _this2.$message.success('删除成功');
  944. } else {
  945. _this2.$message.error('删除失败');
  946. }
  947. });
  948. });
  949. },
  950. initMap: function initMap(e) {
  951. // init(o) {
  952. // o 是高德地图定位插件实例
  953. e.getCurrentPosition(function (status, result) {
  954. if (result && result.position) {
  955. self.lng = result.position.lng;
  956. self.lat = result.position.lat;
  957. self.center = [self.lng, self.lat];
  958. self.loaded = true;
  959. self.$nextTick();
  960. }
  961. });
  962. // }
  963. },
  964. selectAddress: function selectAddress() {
  965. this.addresstc = true;
  966. },
  967. //编辑节点
  968. modifyFun: function modifyFun(node, data) {
  969. console.log(node, data);
  970. },
  971. deleteUserList: function deleteUserList() {
  972. var _this3 = this;
  973. return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
  974. return regenerator_default.a.wrap(function _callee$(_context) {
  975. while (1) {
  976. switch (_context.prev = _context.next) {
  977. case 0:
  978. _this3.tableData.map(function (li) {
  979. data.push(li.id);
  980. });
  981. case 1:
  982. case "end":
  983. return _context.stop();
  984. }
  985. }
  986. }, _callee, _this3);
  987. }))();
  988. },
  989. remove: function remove(node, data) {
  990. var _this4 = this;
  991. return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee3() {
  992. var list, data2;
  993. return regenerator_default.a.wrap(function _callee3$(_context3) {
  994. while (1) {
  995. switch (_context3.prev = _context3.next) {
  996. case 0:
  997. list = [];
  998. data2 = [];
  999. _context3.next = 4;
  1000. return _this4.getUserList();
  1001. case 4:
  1002. setTimeout(asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee2() {
  1003. var data1;
  1004. return regenerator_default.a.wrap(function _callee2$(_context2) {
  1005. while (1) {
  1006. switch (_context2.prev = _context2.next) {
  1007. case 0:
  1008. _this4.tableData.map(function (li) {
  1009. data2.push(li.id);
  1010. });
  1011. list.push(data);
  1012. data1 = Object(utils["j" /* recursion */])(list);
  1013. _context2.next = 5;
  1014. return _this4.getshsite(data1[0]);
  1015. case 5:
  1016. _this4.enterpriseId = data[0];
  1017. _this4.$confirm("确定要删除部门对应账号吗?", "提示", {
  1018. type: "warning"
  1019. }).then(function () {
  1020. Object(api["g" /* httpPost */])(data2, _this4.$api.deleteUser).then(function (res) {
  1021. if (res.success) {
  1022. _this4.$message.success("删除账号成功");
  1023. _this4.$confirm("确定要删除吗?", "提示", {
  1024. type: "warning"
  1025. }).then(function () {
  1026. var datalistll = [];
  1027. _this4.selectkey1.map(function (li) {
  1028. var ary = {
  1029. itemId: li,
  1030. orderId: data1[0]
  1031. };
  1032. datalistll.push(ary);
  1033. });
  1034. Object(api["g" /* httpPost */])(datalistll, _this4.$api.removeAssign).then(function (res) {
  1035. if (res.success) {
  1036. Object(api["g" /* httpPost */])(data1, _this4.$api.deleteEnterprise).then(function (res) {
  1037. if (res.success) {
  1038. _this4.getEnterprise();
  1039. _this4.$message.success("部门删除成功");
  1040. } else {
  1041. _this4.getEnterprise();
  1042. _this4.$message.error("部门删除失败");
  1043. }
  1044. });
  1045. } else {
  1046. _this4.$message.error(res.message);
  1047. }
  1048. });
  1049. });
  1050. } else {
  1051. _this4.$message.error("删除账号失败");
  1052. }
  1053. });
  1054. });
  1055. case 7:
  1056. case "end":
  1057. return _context2.stop();
  1058. }
  1059. }
  1060. }, _callee2, _this4);
  1061. })), 500);
  1062. case 5:
  1063. case "end":
  1064. return _context3.stop();
  1065. }
  1066. }
  1067. }, _callee3, _this4);
  1068. }))();
  1069. },
  1070. // 绑定房间
  1071. bindsave: function bindsave() {},
  1072. handleCheckChange1: function handleCheckChange1(e) {
  1073. // console.log(e,this.selectkey1)
  1074. var SelectedList = this.$refs.tree1.getCheckedNodes();
  1075. var arr = [];
  1076. SelectedList.map(function (li) {
  1077. arr.push(li.value);
  1078. });
  1079. this.SelectedList = arr;
  1080. this.selectKeyList = e;
  1081. },
  1082. //所选房源
  1083. handleCheckChange: function handleCheckChange() {
  1084. this.selectkey = this.$refs.tree.getCheckedKeys();
  1085. },
  1086. //添加房源
  1087. addRoom: function addRoom() {
  1088. var _this5 = this;
  1089. var data = {};
  1090. Object(api["d" /* httpGet */])(data, this.$api.getSiteList).then(function (res) {
  1091. var array = Object(utils["n" /* uniqueArray */])(res.data.list.list, 'id');
  1092. _this5.roomlist = Object(utils["p" /* ztreeToElementTree */])(array, {});
  1093. });
  1094. },
  1095. ssselectFun1: function ssselectFun1(e) {
  1096. this.enterpriseId2 = e;
  1097. },
  1098. ssselectFun: function ssselectFun(e) {
  1099. var _this6 = this;
  1100. this.enterpriseId1 = e;
  1101. this.ssjg = e;
  1102. var q = {
  1103. enterpriseId: e
  1104. };
  1105. this.SelectedList = [];
  1106. var data = {
  1107. q: stringify_default()(q)
  1108. };
  1109. Object(api["d" /* httpGet */])(data, this.$api.getSiteList).then(function (res) {
  1110. // this.selectkey
  1111. var array = Object(utils["n" /* uniqueArray */])(res.data.list.list, 'id');
  1112. _this6.zNodes1 = Object(utils["p" /* ztreeToElementTree */])(array, {});
  1113. var array1 = [];
  1114. array.map(function (li) {
  1115. array1.push(li.id);
  1116. });
  1117. var selectKeyList = [],
  1118. selectkey1 = [];
  1119. res.data.list.list.forEach(function (item) {
  1120. var name = util["a" /* default */].findIndexArrayOne(_this6.roomlist, item.id, []);
  1121. if (name) {
  1122. selectKeyList.push(name);
  1123. }
  1124. selectkey1.push(item.id);
  1125. });
  1126. _this6.selectKeyList = selectKeyList;
  1127. _this6.selectkey1 = selectkey1;
  1128. _this6.sele = false;
  1129. _this6.$nextTick(function () {
  1130. this.SelectedList = array1;
  1131. this.sele = true;
  1132. });
  1133. });
  1134. },
  1135. loadNode: function loadNode(node, resolve) {
  1136. if (node.childNodes) {
  1137. var q = {};
  1138. if (node.level) {
  1139. q = {
  1140. pid: node.level
  1141. };
  1142. } else {
  1143. q = {
  1144. pid: this.pid
  1145. };
  1146. }
  1147. var data = {
  1148. q: stringify_default()(q)
  1149. };
  1150. Object(api["d" /* httpGet */])(data, this.$api.getTree).then(function (res) {
  1151. // if (res.data.length > 1) {
  1152. // res.data.splice(0, 1);
  1153. // }
  1154. return resolve(arr);
  1155. });
  1156. } else {
  1157. this.$message.error("暂无更多数据");
  1158. }
  1159. },
  1160. getroomperson: function getroomperson() {
  1161. var _this7 = this;
  1162. var q = {
  1163. enterpriseId: this.form.enterpriseId
  1164. };
  1165. var data = {
  1166. q: stringify_default()(q)
  1167. };
  1168. Object(api["d" /* httpGet */])(data, this.$api.getSiteList).then(function (res) {
  1169. var roomtable = [];
  1170. var array = Object(utils["n" /* uniqueArray */])(res.data.list.list, 'id');
  1171. array.map(function (li) {
  1172. if (li.acreage && li.layout) {
  1173. roomtable.push(li);
  1174. }
  1175. });
  1176. _this7.roomtable = roomtable;
  1177. });
  1178. },
  1179. // 添加绑定房间
  1180. bindroom: function bindroom() {
  1181. this.roomstatus = !this.roomstatus;
  1182. },
  1183. //操作切换
  1184. handleClick: function handleClick(tab, event) {
  1185. // console.log(tab, event);
  1186. },
  1187. onMouseDown: function onMouseDown(evt, treeId, treeNode) {
  1188. this.Enterprise1 = treeId;
  1189. this.enterpriseidedit1 = true;
  1190. this.getroom();
  1191. },
  1192. getroom: function getroom() {
  1193. var _this8 = this;
  1194. var q = {
  1195. enterpriseId: this.Enterprise1.id
  1196. };
  1197. var data = {
  1198. q: stringify_default()(q)
  1199. };
  1200. Object(api["d" /* httpGet */])(data, this.$api.getSiteList).then(function (res) {
  1201. var array = Object(utils["n" /* uniqueArray */])(res.data.list.list, 'id');
  1202. _this8.zNodes1 = array;
  1203. });
  1204. },
  1205. // 部门手风琴点击事件
  1206. handleNodeClick: function handleNodeClick(data) {
  1207. this.enterpriseId = data.id;
  1208. this.getUserList();
  1209. },
  1210. // 获取角色id
  1211. getUserID: function getUserID() {
  1212. var _this9 = this;
  1213. var data = {
  1214. pageNum: 1,
  1215. pageSize: 100
  1216. };
  1217. Object(api["d" /* httpGet */])(data, this.$api.getRoleList).then(function (res) {
  1218. var rololist = [];
  1219. res.data.list.map(function (li) {
  1220. var obj = {
  1221. value: li.id,
  1222. label: li.name
  1223. };
  1224. rololist.push(obj);
  1225. });
  1226. _this9.rololist = rololist;
  1227. });
  1228. },
  1229. enterfun: function enterfun(e) {
  1230. var _this10 = this;
  1231. this.enterpriseId = e;
  1232. this.getUserList();
  1233. this.enterpriselist.map(function (li) {
  1234. if (li.id == e) {
  1235. _this10.addform.enterpriseName = li.name;
  1236. _this10.addform.enterpriseId = li.id;
  1237. }
  1238. });
  1239. },
  1240. getEnterprise: function getEnterprise() {
  1241. var _this11 = this;
  1242. Object(api["d" /* httpGet */])("", this.$api.getEnterprise).then(function (res) {
  1243. _this11.enterpriselist = res.data.list;
  1244. if (res.data.list.length > 0) {
  1245. _this11.enterpriseId = res.data.list[0].id;
  1246. }
  1247. res.data.list.map(function (li) {
  1248. li.pid = li.parentId;
  1249. });
  1250. _this11.zNodes = [];
  1251. _this11.zNodes = Object(utils["p" /* ztreeToElementTree */])(res.data.list, {}); //res.data.list;
  1252. });
  1253. },
  1254. // 部门编辑确
  1255. addEnterprise1: function addEnterprise1() {
  1256. var _this12 = this;
  1257. if (this.enterpriseId1 == "") {
  1258. this.$message.error("请选择要编辑的部门");
  1259. } else {
  1260. var idlist1 = [].concat(toConsumableArray_default()(new set_default.a(this.selectkey1.concat(this.SelectedList))));
  1261. if (this.selectkey1.length > 0) {
  1262. if (idlist1.length > 0) {
  1263. var datalistll = [];
  1264. this.selectkey1.map(function (li) {
  1265. var ary = {
  1266. itemId: li,
  1267. orderId: _this12.enterpriseId1
  1268. };
  1269. datalistll.push(ary);
  1270. });
  1271. Object(api["g" /* httpPost */])(datalistll, this.$api.removeAssign).then(function (res) {
  1272. if (res.success) {
  1273. var idlist = [];
  1274. _this12.SelectedList.map(function (li) {
  1275. var ary = {
  1276. itemId: li,
  1277. orderId: _this12.enterpriseId1
  1278. };
  1279. idlist.push(ary);
  1280. });
  1281. if (idlist.length != 0) {
  1282. setTimeout(function () {
  1283. Object(api["g" /* httpPost */])(idlist, _this12.$api.assignSite).then(function (res) {});
  1284. }, 500);
  1285. }
  1286. }
  1287. });
  1288. }
  1289. } else {
  1290. var idlist = [];
  1291. this.SelectedList.map(function (li) {
  1292. var ary = {
  1293. itemId: li,
  1294. orderId: _this12.enterpriseId1
  1295. };
  1296. idlist.push(ary);
  1297. });
  1298. if (idlist.length != 0) {
  1299. Object(api["g" /* httpPost */])(idlist, this.$api.assignSite).then(function (res) {});
  1300. }
  1301. }
  1302. if (this.Enterprise1.name != "" || this.Enterprise1.address != "") {
  1303. var data = {
  1304. list: [{
  1305. name: this.Enterprise1.name,
  1306. id: this.enterpriseId1,
  1307. coordinate: stringify_default()(this.Enterprise1.address),
  1308. atAlert: stringify_default()(this.Enterprise1.atAlert),
  1309. sendItem: stringify_default()(this.Enterprise1.sendItem)
  1310. }]
  1311. };
  1312. Object(api["g" /* httpPost */])(data, this.$api.updateEnterprise).then(function (res) {
  1313. if (res.success) {
  1314. _this12.getEnterprise();
  1315. _this12.$message.success("修改成功");
  1316. } else {
  1317. _this12.$message.error("修改部门失败");
  1318. }
  1319. });
  1320. } else {
  1321. this.getEnterprise();
  1322. this.$message.success("修改成功");
  1323. }
  1324. this.enterpriseidedit1 = false;
  1325. }
  1326. },
  1327. addEnterprise: function addEnterprise() {
  1328. var _this13 = this;
  1329. if (this.ssjg == "") {
  1330. this.$message.error("请选择所属部门");
  1331. } else if (this.Enterprise.name == "") {
  1332. this.$message.error("输入部门名称");
  1333. } else if (this.Enterprise.quota == "") {
  1334. this.$message.error("请输入允许接入设备数量");
  1335. } else {
  1336. var q = {
  1337. "quota": this.Enterprise.quota,
  1338. "deadline": this.userInfo.license.deadline
  1339. };
  1340. var code = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0DLoa5uX9MjFQJkwvsTb92xkJnwffrdcjKnuFcYN3z4GrGYt0voO22zl3ncNOCzsXZmL6iOK6ukjolajqnpKB/ipXI0/17nZbmY4zturM49EkVt4qw0BvFR7bN/qo7By2Z9dpHOswDEDrJZk+mmD3MCX+ZK5zuhDFVYjDvX9oTZEBdTY5qrgVp2p3fOQCOccGR8ael8lQ+uwewlEMJoJ+NwtF6YPm/SEkVlcnD04J84i7RSXHLoXCV549E8Qv0rDfgcAZhWJfDFmdpuUr42N7TwXl2QI7hNXjqdGbmZjjeZ5MYVWIhDAUGPXB3wlJhYjem7wfjJyeKQ8Zi8vhTtkkQIDAQAB';
  1341. var data = {
  1342. name: this.Enterprise.name,
  1343. parentId: this.ssjg,
  1344. coordinate: stringify_default()(this.Enterprise.address),
  1345. quota: Object(api["j" /* setCode */])(code, stringify_default()(q))
  1346. };
  1347. Object(api["g" /* httpPost */])(data, this.$api.addEnterprise).then(function (res) {
  1348. if (res.success) {
  1349. _this13.$message.success("创建成功");
  1350. var idlist = [];
  1351. _this13.selectkey.map(function (li) {
  1352. var ary = {
  1353. itemId: li,
  1354. orderId: res.data
  1355. };
  1356. idlist.push(ary);
  1357. });
  1358. if (idlist.length != 0) {
  1359. Object(api["g" /* httpPost */])(idlist, _this13.$api.assignSite).then(function (res1) {
  1360. if (res1.success) {
  1361. _this13.$message.success("绑定成功");
  1362. _this13.enterpriseidedit = false;
  1363. _this13.getEnterprise();
  1364. }
  1365. });
  1366. }
  1367. } else {
  1368. if (res.message == "Exceeded quota") {
  1369. _this13.$message.error("超出配额");
  1370. } else {
  1371. _this13.$message.error(res.message);
  1372. }
  1373. }
  1374. });
  1375. }
  1376. },
  1377. modifyEnterprise: function modifyEnterprise(node, data) {
  1378. this.enterpriseidedit1 = true;
  1379. this.ssjg = data.id;
  1380. this.enterpriseId1 = data.id;
  1381. this.Enterprise1.address = JSON.parse(data.coordinate);
  1382. this.Enterprise1.atAlert = JSON.parse(data.atAlert);
  1383. this.Enterprise1.sendItem = JSON.parse(data.sendItem);
  1384. this.getshsite(data.id);
  1385. },
  1386. getArr: function getArr(dataSource, id) {
  1387. // dataSource 这个是选择器的数据源 id 是 目标id
  1388. var arrRes = [];
  1389. dataSource.some(function (item) {
  1390. if (item.value == id) {
  1391. arrRes.unshift(item.value);
  1392. return true;
  1393. } else {
  1394. if (item.children) {
  1395. item.children.some(function (item1) {
  1396. if (item1.value == id) {
  1397. arrRes.unshift(item1.value);
  1398. arrRes.unshift(item.value);
  1399. return true;
  1400. } else {
  1401. if (item1.children) {
  1402. // item1.children 判断 防止不存在对应的三级数据
  1403. item1.children.some(function (item2) {
  1404. if (item2.value == id) {
  1405. arrRes.unshift(item2.value);
  1406. arrRes.unshift(item1.value);
  1407. arrRes.unshift(item.value);
  1408. return true;
  1409. }
  1410. });
  1411. }
  1412. }
  1413. });
  1414. }
  1415. }
  1416. });
  1417. return arrRes; // 返回最终根据id查找出来的数组
  1418. },
  1419. getshsite: function getshsite(id) {
  1420. var _this14 = this;
  1421. this.SelectedList = [];
  1422. var q = {
  1423. enterpriseId: id
  1424. };
  1425. var data = {
  1426. q: stringify_default()(q)
  1427. };
  1428. Object(api["d" /* httpGet */])(data, this.$api.getSiteList).then(function (res) {
  1429. var SelectedList = [];
  1430. if (res.data.list.list.length > 0) {
  1431. var array = Object(utils["n" /* uniqueArray */])(res.data.list.list, 'id');
  1432. SelectedList = Object(utils["j" /* recursion */])(array);
  1433. } else {
  1434. SelectedList = [];
  1435. }
  1436. var selectKeyList = [],
  1437. selectkey1 = [];
  1438. res.data.list.list.forEach(function (item) {
  1439. var name = util["a" /* default */].findIndexArrayOne(_this14.roomlist, item.id, []);
  1440. if (name) {
  1441. selectKeyList.push(name);
  1442. }
  1443. selectkey1.push(item.id);
  1444. });
  1445. _this14.selectKeyList = selectKeyList;
  1446. _this14.selectkey1 = selectkey1;
  1447. _this14.sele = false;
  1448. _this14.$nextTick(function () {
  1449. var str = _this14.familyTree(_this14.roomlist);
  1450. var newArr = SelectedList.filter(function (x) {
  1451. return !str.some(function (item) {
  1452. return x === item;
  1453. });
  1454. });
  1455. _this14.SelectedList = newArr;
  1456. _this14.sele = true;
  1457. });
  1458. });
  1459. },
  1460. familyTree: function familyTree(arr) {
  1461. var temp = [];
  1462. var forFn = function forFn(list) {
  1463. for (var i = 0; i < list.length; i++) {
  1464. var item = list[i];
  1465. if (item.children) {
  1466. temp.push(item.id);
  1467. forFn(item.children);
  1468. }
  1469. }
  1470. };
  1471. forFn(arr);
  1472. return temp;
  1473. },
  1474. createEnterprise: function createEnterprise() {
  1475. this.enterpriseidedit = true;
  1476. },
  1477. // 获取用户列表
  1478. getUserList: function getUserList() {
  1479. var _this15 = this;
  1480. return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee4() {
  1481. var data;
  1482. return regenerator_default.a.wrap(function _callee4$(_context4) {
  1483. while (1) {
  1484. switch (_context4.prev = _context4.next) {
  1485. case 0:
  1486. data = {
  1487. pageNum: _this15.pageNum1,
  1488. pageSize: _this15.pageSize1,
  1489. q: stringify_default()({
  1490. enterpriseId: _this15.enterpriseId
  1491. })
  1492. };
  1493. Object(api["d" /* httpGet */])(data, _this15.$api.getUserList).then(function (res) {
  1494. res.data.list.map(function (li) {
  1495. var name = util["a" /* default */].findIndexArray(_this15.enterpriselist, li.enterpriseId, []);
  1496. var path = '';
  1497. if (name) {
  1498. path = name.join('/');
  1499. li.enterpriseName = path;
  1500. }
  1501. });
  1502. _this15.tableData = res.data.list;
  1503. _this15.pageTotal = res.data.total;
  1504. });
  1505. case 2:
  1506. case "end":
  1507. return _context4.stop();
  1508. }
  1509. }
  1510. }, _callee4, _this15);
  1511. }))();
  1512. },
  1513. // 编辑操作
  1514. handleEdit1: function handleEdit1() {
  1515. this.editVisible1 = true;
  1516. },
  1517. // 保存编辑 添加用户
  1518. saveEdit1: function saveEdit1() {
  1519. var _this16 = this;
  1520. return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee5() {
  1521. var roleIds, addform;
  1522. return regenerator_default.a.wrap(function _callee5$(_context5) {
  1523. while (1) {
  1524. switch (_context5.prev = _context5.next) {
  1525. case 0:
  1526. _this16.addform.identity = _this16.userType;
  1527. _this16.addform.userType = _this16.userType;
  1528. roleIds = _this16.roleIds;
  1529. _this16.addform.roleId = roleIds[0];
  1530. // utils.validatePassword('',this.addform.password,(callback=>{
  1531. // if(!callback){
  1532. if (_this16.addform.username == "" || _this16.addform.phone == "" || _this16.addform.password == "" || _this16.addform.userType === "") {
  1533. _this16.$message.error("请填写完整信息");
  1534. } else if (_this16.addform.phone.length != 11) {
  1535. _this16.$message.error("请填写正确手机号");
  1536. } else {
  1537. addform = _this16.addform;
  1538. addform['tenantId'] = _this16.$store.state.tenantId;
  1539. Object(api["g" /* httpPost */])(_this16.addform, _this16.$api.addUser).then(function (res) {
  1540. if (res.success) {
  1541. var data = {
  1542. roleIds: roleIds,
  1543. userId: res.data
  1544. };
  1545. Object(api["g" /* httpPost */])(data, _this16.$api.bindRole).then(function (res1) {
  1546. if (res1.success) {
  1547. _this16.$message.success('绑定角色成功');
  1548. } else {
  1549. _this16.$message.error('绑定角色失败');
  1550. }
  1551. });
  1552. _this16.$message.success("添加成功");
  1553. _this16.editVisible1 = false;
  1554. _this16.isRouterAlive = false;
  1555. _this16.getUserList();
  1556. _this16.$nextTick(function () {
  1557. this.isRouterAlive = true;
  1558. });
  1559. } else {
  1560. _this16.$message.error("添加失败");
  1561. }
  1562. });
  1563. }
  1564. // }else{
  1565. // this.$message.error(callback);
  1566. // }
  1567. // }))
  1568. case 5:
  1569. case "end":
  1570. return _context5.stop();
  1571. }
  1572. }
  1573. }, _callee5, _this16);
  1574. }))();
  1575. },
  1576. handleChange: function handleChange(value) {
  1577. console.log(value);
  1578. },
  1579. // 触发搜索按钮
  1580. handleSearch: function handleSearch() {
  1581. // this.$set(this.query, "pageIndex", 1);
  1582. this.getUserList1(1, 10);
  1583. this.$store.commit('increment', 1);
  1584. },
  1585. // 删除操作
  1586. handleDelete: function handleDelete(index, row) {
  1587. var _this17 = this;
  1588. // 二次确认删除
  1589. this.$confirm("确定要删除吗?", "提示", {
  1590. type: "warning"
  1591. }).then(function () {
  1592. var data = [row.id];
  1593. Object(api["g" /* httpPost */])(data, _this17.$api.deleteUser).then(function (res) {
  1594. if (res.success) {
  1595. _this17.$message.success("删除成功");
  1596. _this17.getUserList();
  1597. } else {
  1598. _this17.$message.error("删除失败");
  1599. }
  1600. });
  1601. }).catch(function () {});
  1602. },
  1603. // 多选操作
  1604. handleSelectionChange: function handleSelectionChange(val) {
  1605. this.multipleSelection = val;
  1606. },
  1607. // 多选操作
  1608. handleSelectionChange1: function handleSelectionChange1(val) {
  1609. this.historySelection = val;
  1610. },
  1611. delAllSelection: function delAllSelection() {
  1612. var length = this.multipleSelection.length;
  1613. var str = "";
  1614. this.delList = this.delList.concat(this.multipleSelection);
  1615. for (var i = 0; i < length; i++) {
  1616. str += this.multipleSelection[i].name + " ";
  1617. }
  1618. this.$message.error("\u5220\u9664\u4E86" + str);
  1619. this.multipleSelection = [];
  1620. },
  1621. // 编辑操作
  1622. handleEdit: function handleEdit(index, row) {
  1623. this.idx = index;
  1624. this.form = row;
  1625. this.editVisible = true;
  1626. this.jurisdiction.userType = row.type;
  1627. // this.jurisdiction.roleId = row.identity
  1628. this.jurisdiction.enterpriseName = row.enterpriseId;
  1629. this.getroomperson();
  1630. this.getroleId(row.id);
  1631. },
  1632. // 获取绑定角色
  1633. getroleId: function getroleId(id) {
  1634. var _this18 = this;
  1635. var data = {
  1636. userId: id
  1637. };
  1638. Object(api["d" /* httpGet */])(data, this.$api.getRolesByUser).then(function (res) {
  1639. if (res.success) {
  1640. if (res.data.length > 0) {
  1641. var defaultkeys = [];
  1642. res.data.map(function (li) {
  1643. defaultkeys.push(li.id);
  1644. });
  1645. _this18.jurisdiction.roleId = defaultkeys;
  1646. _this18.form.identity = defaultkeys;
  1647. }
  1648. } else {
  1649. _this18.$message.error('获取绑定角色失败');
  1650. }
  1651. });
  1652. },
  1653. scalarArrayEquals: function scalarArrayEquals(array1, array2) {
  1654. if (array2) {
  1655. return array1.length == array2.length && array1.every(function (v, i) {
  1656. return v === array2[i];
  1657. });
  1658. } else {
  1659. return false;
  1660. }
  1661. },
  1662. // 保存编辑
  1663. saveEdit: function saveEdit() {
  1664. var _this19 = this;
  1665. if (this.activeName == 'first') {
  1666. var jurisdiction = this.jurisdiction;
  1667. if (jurisdiction.enterpriseName != this.form.enterpriseId) {
  1668. var data = {
  1669. id: this.form.id,
  1670. enterpriseId: jurisdiction.enterpriseName
  1671. };
  1672. Object(api["g" /* httpPost */])(data, this.$api.editUserEnterprise).then(function (res) {
  1673. if (res.success) {
  1674. _this19.getUserList1(1, 10);
  1675. _this19.$message.success("修改成功");
  1676. } else {
  1677. _this19.$message.error("修改失败");
  1678. }
  1679. });
  1680. }
  1681. if (!this.scalarArrayEquals(jurisdiction.roleId, this.form.identity)) {
  1682. var data = {
  1683. roleIds: jurisdiction.roleId,
  1684. userId: this.form.id
  1685. };
  1686. Object(api["g" /* httpPost */])(data, this.$api.bindRole).then(function (res) {
  1687. if (res.success) {
  1688. _this19.getUserList1(1, 10);
  1689. _this19.$message.success('修改成功');
  1690. } else {
  1691. _this19.$message.error('修改失败');
  1692. }
  1693. });
  1694. }
  1695. if (jurisdiction.userType != this.form.type) {
  1696. var data = {
  1697. type: jurisdiction.userType,
  1698. id: this.form.id
  1699. };
  1700. Object(api["g" /* httpPost */])(data, this.$api.editType).then(function (res) {
  1701. if (res.success) {
  1702. _this19.getUserList1(1, 10);
  1703. _this19.$message.success('修改成功');
  1704. } else {
  1705. _this19.$message.error('修改失败');
  1706. }
  1707. });
  1708. }
  1709. this.editVisible = false;
  1710. } else if (this.activeName == 'second') {
  1711. if (this.modifyfrom.confirmPassword != this.modifyfrom.newPassword) {
  1712. this.$message.error("确认密码输入错误!");
  1713. } else if (this.modifyfrom.confirmPassword == '' || this.modifyfrom.newPassword == '') {
  1714. this.$message.error("请输入修改的密码");
  1715. } else {
  1716. var data = {
  1717. userId: this.form.id,
  1718. new: this.modifyfrom.newPassword,
  1719. old: this.modifyfrom.oldPassword
  1720. };
  1721. Object(api["g" /* httpPost */])(data, this.$api.editPassword).then(function (res) {
  1722. if (res.success) {
  1723. _this19.getUserList1(1, 10);
  1724. _this19.$message.success("修改成功!");
  1725. _this19.editVisible = false;
  1726. } else {
  1727. _this19.$message.error("修改失败,请输入正确的旧密码!");
  1728. }
  1729. });
  1730. }
  1731. }
  1732. },
  1733. // 分页导航
  1734. handlePageChange: function handlePageChange(val) {
  1735. // this.$set(this.query, "pageIndex", val);
  1736. console.log(val);
  1737. this.getUserList1(val, 10);
  1738. },
  1739. handleSizeChange: function handleSizeChange(val) {
  1740. this.pageSize1 = val;
  1741. this.getHistoryList(this.pageNum1, val);
  1742. },
  1743. // 分页导航
  1744. handlePageChange1: function handlePageChange1(val) {
  1745. this.getHistoryList(val, this.pageSize1);
  1746. },
  1747. getHistoryList: function getHistoryList(pageNum, pageSize) {
  1748. var _this20 = this;
  1749. var data = {
  1750. pageNum: pageNum,
  1751. pageSize: pageSize
  1752. };
  1753. Object(api["d" /* httpGet */])(data, this.$api.getDeletes).then(function (res) {
  1754. if (res.success) {
  1755. _this20.historyData = res.data.list;
  1756. } else {
  1757. _this20.$message.error('获取历史账户失败');
  1758. }
  1759. });
  1760. },
  1761. getUserList1: function getUserList1(pageNum, pageSize) {
  1762. var _this21 = this;
  1763. var q = {
  1764. username: this.query.name,
  1765. enterpriseId: this.enterpriseId
  1766. };
  1767. var data = {
  1768. pageNum: pageNum,
  1769. pageSize: pageSize,
  1770. q: stringify_default()(q)
  1771. };
  1772. Object(api["d" /* httpGet */])(data, this.$api.getUserList).then(function (res) {
  1773. res.data.list.map(function (li) {
  1774. var name = util["a" /* default */].findIndexArray(_this21.enterpriselist, li.enterpriseId, []);
  1775. var path = '';
  1776. if (name) {
  1777. path = name.join('/');
  1778. li.enterpriseName = path;
  1779. }
  1780. });
  1781. _this21.tableData = res.data.list;
  1782. _this21.pageTotal = res.data.total;
  1783. });
  1784. }
  1785. }
  1786. });
  1787. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-3733c4e0","hasScoped":true,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/views/loginAccount.vue
  1788. var loginAccount_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.isRouterAlive)?_c('div',[_c('div',{staticClass:"container"},[_c('div',{staticClass:"handle-box"},[_c('selectoption'),_vm._v(" "),_c('el-input',{staticClass:"handle-input mr10",attrs:{"size":"small","placeholder":"登录账号","clearable":true},model:{value:(_vm.query.name),callback:function ($$v) {_vm.$set(_vm.query, "name", $$v)},expression:"query.name"}}),_vm._v(" "),_c('el-button',{staticClass:"my-2",attrs:{"type":"primary","size":"small","icon":"el-icon-search"},on:{"click":_vm.handleSearch}},[_vm._v("搜索")]),_vm._v(" "),_c('el-button',{staticClass:"my-2",attrs:{"type":"primary","size":"small"},on:{"click":_vm.handleEdit1}},[_vm._v("添加账户")]),_vm._v(" "),_c('el-button',{staticClass:"my-2",attrs:{"type":"primary","size":"small"},on:{"click":_vm.createEnterprise}},[_vm._v("添加部门")]),_vm._v(" "),(_vm.userInfo.type==0)?_c('el-button',{staticClass:"my-2",attrs:{"type":"primary","size":"small"},on:{"click":_vm.historicalAccount}},[_vm._v("历史账户\n\t\t\t\t")]):_vm._e()],1),_vm._v(" "),_c('div',[_c('el-row',{attrs:{"gutter":20}},[_c('el-col',{attrs:{"span":_vm.colNum_6}},[_c('el-card',{staticClass:"h600 cardbg",attrs:{"shadow":"nerver"}},[_c('el-tree',{staticClass:"el-tree",attrs:{"data":_vm.zNodes,"node-key":"id","node-click":"onClick","default-expand-all":"","expand-on-click-node":false,"props":_vm.defaultProps},on:{"node-click":_vm.handleNodeClick},scopedSlots:_vm._u([{key:"default",fn:function(ref){
  1789. var node = ref.node;
  1790. var data = ref.data;
  1791. return _c('span',{staticClass:"custom-tree-node"},[_c('span',[_vm._v(_vm._s(node.label))]),_vm._v(" "),_c('span',[_c('el-button',{attrs:{"type":"text","size":"mini"},on:{"click":function () { return _vm.modifyEnterprise(node, data); }}},[_vm._v("\n\t\t\t\t\t\t\t\t\t\t\t编辑\n\t\t\t\t\t\t\t\t\t\t")]),_vm._v(" "),_c('el-button',{attrs:{"type":"text","size":"mini"},on:{"click":function () { return _vm.remove(node, data); }}},[_vm._v("\n\t\t\t\t\t\t\t\t\t\t\t删除\n\t\t\t\t\t\t\t\t\t\t")])],1)])}}],null,false,1527207862)})],1)],1),_vm._v(" "),_c('el-col',{attrs:{"span":_vm.colNum_18}},[_c('el-table',{ref:"multipleTable",staticClass:"table",attrs:{"data":_vm.tableData,"border":"","height":"600","header-cell-class-name":"table-header"},on:{"selection-change":_vm.handleSelectionChange}},[_c('el-table-column',{attrs:{"label":"序号","type":"index","width":"80"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_vm._v("\n "+_vm._s(_vm.pageTotal - ((_vm.$store.state.currentPage-1)*_vm.pageSize) - scope.$index)+"\n ")]}}],null,false,729785732)}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"username","label":"登录账号"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"phone","label":"电话"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"enterpriseName","label":"所属部门"}}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"操作","width":"200","align":"center"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('el-button',{attrs:{"type":"text"},on:{"click":function($event){return _vm.handleEdit(scope.$index, scope.row)}}},[_vm._v("操作")]),_vm._v(" "),_c('el-button',{staticClass:"red",attrs:{"type":"text"},on:{"click":function($event){return _vm.handleDelete(scope.$index, scope.row)}}},[_vm._v("删除\n\t\t\t\t\t\t\t\t\t")]),_vm._v(" "),(_vm.userInfo.type==0)?_c('el-button',{staticClass:"red",attrs:{"type":"text"},on:{"click":function($event){return _vm.forceDeletion(scope.$index, scope.row)}}},[_vm._v("强制删除")]):_vm._e()]}}],null,false,1403623246)})],1),_vm._v(" "),_c('div',{staticClass:"pagination"},[_c('el-pagination',{attrs:{"background":"","layout":"total, prev, pager, next","current-page":_vm.$store.state.currentPage,"page-size":_vm.pageSize,"total":_vm.pageTotal},on:{"current-change":_vm.handlePageChange}})],1)],1)],1)],1),_vm._v(" "),_c('el-dialog',{attrs:{"title":"编辑","visible":_vm.editVisible1,"width":"30%"},on:{"update:visible":function($event){_vm.editVisible1=$event}},scopedSlots:_vm._u([{key:"footer",fn:function(){return [_c('span',{staticClass:"dialog-footer"},[_c('el-button',{on:{"click":function($event){_vm.editVisible1 = false}}},[_vm._v("取 消")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.saveEdit1}},[_vm._v("保 存")])],1)]},proxy:true}],null,false,4211661439)},[_c('el-form',{ref:"addform",staticClass:"demo-ruleForm",attrs:{"model":_vm.addform,"rules":_vm.rules,"label-width":"100px"}},[_c('el-form-item',{attrs:{"label":"登录账号","prop":"username"}},[_c('el-input',{attrs:{"clearable":true},model:{value:(_vm.addform.username),callback:function ($$v) {_vm.$set(_vm.addform, "username", $$v)},expression:"addform.username"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"密码","prop":"password"}},[_c('el-input',{attrs:{"clearable":true,"show-password":"","placeholder":"密码长度在8-20位之间,并且包含大写字母、小写字母、数字和特殊符号"},model:{value:(_vm.addform.password),callback:function ($$v) {_vm.$set(_vm.addform, "password", $$v)},expression:"addform.password"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"电话","prop":"phone"}},[_c('el-input',{attrs:{"clearable":true},model:{value:(_vm.addform.phone),callback:function ($$v) {_vm.$set(_vm.addform, "phone", $$v)},expression:"addform.phone"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"部门","prop":"enterpriseName"}},[_c('el-select',{attrs:{"placeholder":"请选择"},on:{"change":_vm.enterfun},model:{value:(_vm.addform.enterpriseName),callback:function ($$v) {_vm.$set(_vm.addform, "
  1792. var loginAccount_staticRenderFns = []
  1793. var loginAccount_esExports = { render: loginAccount_render, staticRenderFns: loginAccount_staticRenderFns }
  1794. /* harmony default export */ var views_loginAccount = (loginAccount_esExports);
  1795. // CONCATENATED MODULE: ./src/views/loginAccount.vue
  1796. function loginAccount_injectStyle (ssrContext) {
  1797. __webpack_require__("YJK1")
  1798. }
  1799. var loginAccount_normalizeComponent = __webpack_require__("VU/8")
  1800. /* script */
  1801. /* template */
  1802. /* template functional */
  1803. var loginAccount___vue_template_functional__ = false
  1804. /* styles */
  1805. var loginAccount___vue_styles__ = loginAccount_injectStyle
  1806. /* scopeId */
  1807. var loginAccount___vue_scopeId__ = "data-v-3733c4e0"
  1808. /* moduleIdentifier (server only) */
  1809. var loginAccount___vue_module_identifier__ = null
  1810. var loginAccount_Component = loginAccount_normalizeComponent(
  1811. loginAccount,
  1812. views_loginAccount,
  1813. loginAccount___vue_template_functional__,
  1814. loginAccount___vue_styles__,
  1815. loginAccount___vue_scopeId__,
  1816. loginAccount___vue_module_identifier__
  1817. )
  1818. /* harmony default export */ var src_views_loginAccount = __webpack_exports__["default"] = (loginAccount_Component.exports);
  1819. /***/ })
  1820. });