|
|
- webpackJsonp([26],{
-
- /***/ "R51N":
- /***/ (function(module, exports) {
-
- // removed by extract-text-webpack-plugin
-
- /***/ }),
-
- /***/ "Y/OZ":
- /***/ (function(module, exports) {
-
- // removed by extract-text-webpack-plugin
-
- /***/ }),
-
- /***/ "YJK1":
- /***/ (function(module, exports) {
-
- // removed by extract-text-webpack-plugin
-
- /***/ }),
-
- /***/ "xKmd":
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
-
- // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/set.js
- var set = __webpack_require__("lHA8");
- var set_default = /*#__PURE__*/__webpack_require__.n(set);
-
- // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/toConsumableArray.js
- var toConsumableArray = __webpack_require__("Gu7T");
- var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
-
- // EXTERNAL MODULE: ./node_modules/babel-runtime/regenerator/index.js
- var regenerator = __webpack_require__("Xxa5");
- var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
-
- // EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/asyncToGenerator.js
- var asyncToGenerator = __webpack_require__("exGp");
- var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
-
- // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/json/stringify.js
- var stringify = __webpack_require__("mvHQ");
- var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);
-
- // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/object/assign.js
- var object_assign = __webpack_require__("woOf");
- var assign_default = /*#__PURE__*/__webpack_require__.n(object_assign);
-
- // EXTERNAL MODULE: ./node_modules/jquery/src/jquery.js
- var jquery = __webpack_require__("4kSj");
- var jquery_default = /*#__PURE__*/__webpack_require__.n(jquery);
-
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/zTree2.vue
-
- //
- //
- //
- //
-
-
- if (!window.jQuery) {
- window.jQuery = jquery;
- }
-
- __webpack_require__("TRKB");
-
- /* harmony default export */ var zTree2 = ({
- props: {
- setting: {
- type: Object,
- require: false,
- default: function _default() {
- return {};
- }
- },
- nodes: {
- type: Array,
- require: true,
- default: function _default() {
- return [];
- }
- }
- },
- data: function data() {
- var _this = this;
-
- return {
- ztreeId: 'ztree_' + parseInt(Math.random() * 1e10),
- ztreeObj: null,
- list: [],
- ztreeSetting: {
- view: {
- showIcon: false // default to hide icon
- },
- callback: {
- onAsyncError: function onAsyncError() {
- for (var _len = arguments.length, arg = Array(_len), _key = 0; _key < _len; _key++) {
- arg[_key] = arguments[_key];
- }
-
- _this.$emit.apply(_this, ['onAsyncError'].concat(arg));
- },
- onAsyncSuccess: function onAsyncSuccess() {
- for (var _len2 = arguments.length, arg = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
- arg[_key2] = arguments[_key2];
- }
-
- _this.$emit.apply(_this, ['onAsyncSuccess'].concat(arg));
- },
- onCheck: function onCheck() {
- for (var _len3 = arguments.length, arg = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
- arg[_key3] = arguments[_key3];
- }
-
- _this.$emit.apply(_this, ['onCheck'].concat(arg));
- },
- onClick: function onClick() {
- for (var _len4 = arguments.length, arg = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
- arg[_key4] = arguments[_key4];
- }
-
- _this.$emit.apply(_this, ['onClick'].concat(arg));
- },
- onCollapse: function onCollapse() {
- for (var _len5 = arguments.length, arg = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
- arg[_key5] = arguments[_key5];
- }
-
- _this.$emit.apply(_this, ['onCollapse'].concat(arg));
- },
- onDblClick: function onDblClick() {
- for (var _len6 = arguments.length, arg = Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
- arg[_key6] = arguments[_key6];
- }
-
- _this.$emit.apply(_this, ['onDblClick'].concat(arg));
- },
- onDrag: function onDrag() {
- for (var _len7 = arguments.length, arg = Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
- arg[_key7] = arguments[_key7];
- }
-
- _this.$emit.apply(_this, ['onDrag'].concat(arg));
- },
- onDragMove: function onDragMove() {
- for (var _len8 = arguments.length, arg = Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
- arg[_key8] = arguments[_key8];
- }
-
- _this.$emit.apply(_this, ['onDragMove'].concat(arg));
- },
- onDrop: function onDrop() {
- for (var _len9 = arguments.length, arg = Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
- arg[_key9] = arguments[_key9];
- }
-
- _this.$emit.apply(_this, ['onDrop'].concat(arg));
- },
- onExpand: function onExpand() {
- for (var _len10 = arguments.length, arg = Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
- arg[_key10] = arguments[_key10];
- }
-
- _this.$emit.apply(_this, ['onExpand'].concat(arg));
- },
- onMouseDown: function onMouseDown() {
- for (var _len11 = arguments.length, arg = Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
- arg[_key11] = arguments[_key11];
- }
-
- _this.$emit.apply(_this, ['onMouseDown'].concat(arg));
- },
- onMouseUp: function onMouseUp() {
- for (var _len12 = arguments.length, arg = Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
- arg[_key12] = arguments[_key12];
- }
-
- _this.$emit.apply(_this, ['onMouseUp'].concat(arg));
- },
- onRemove: function onRemove() {
- for (var _len13 = arguments.length, arg = Array(_len13), _key13 = 0; _key13 < _len13; _key13++) {
- arg[_key13] = arguments[_key13];
- }
-
- _this.$emit.apply(_this, ['onRemove'].concat(arg));
- },
- onRename: function onRename() {
- for (var _len14 = arguments.length, arg = Array(_len14), _key14 = 0; _key14 < _len14; _key14++) {
- arg[_key14] = arguments[_key14];
- }
-
- _this.$emit.apply(_this, ['onRename'].concat(arg));
- },
- beforeRename: function beforeRename() {
- for (var _len15 = arguments.length, arg = Array(_len15), _key15 = 0; _key15 < _len15; _key15++) {
- arg[_key15] = arguments[_key15];
- }
-
- _this.$emit.apply(_this, ['beforeRename'].concat(arg));
- },
- onRightClick: function onRightClick() {
- for (var _len16 = arguments.length, arg = Array(_len16), _key16 = 0; _key16 < _len16; _key16++) {
- arg[_key16] = arguments[_key16];
- }
-
- _this.$emit.apply(_this, ['onRightClick'].concat(arg));
- }
- }
- }
- };
- },
-
- watch: {
- nodes: {
- handler: function handler(nodes) {
- var _this2 = this;
-
- this.list = nodes;
-
- // update tree
- if (this.ztreeObj) {
- this.ztreeObj.destroy();
- }
- this.$nextTick(function () {
- _this2.ztreeObj = jquery["fn"].zTree.init(jquery("#" + _this2.ztreeId), assign_default()({}, _this2.ztreeSetting, _this2.setting), _this2.list);
- _this2.$emit('onCreated', _this2.ztreeObj);
- _this2.ztreeObj.expandAll(true);
- });
- },
- deep: true,
- immediate: true
- }
- }
- });
- // 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
- 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}})}
- var staticRenderFns = []
- var esExports = { render: render, staticRenderFns: staticRenderFns }
- /* harmony default export */ var components_zTree2 = (esExports);
- // CONCATENATED MODULE: ./src/components/zTree2.vue
- function injectStyle (ssrContext) {
- __webpack_require__("R51N")
- }
- var normalizeComponent = __webpack_require__("VU/8")
- /* script */
-
-
- /* template */
-
- /* template functional */
- var __vue_template_functional__ = false
- /* styles */
- var __vue_styles__ = injectStyle
- /* scopeId */
- var __vue_scopeId__ = "data-v-5d3736a4"
- /* moduleIdentifier (server only) */
- var __vue_module_identifier__ = null
- var Component = normalizeComponent(
- zTree2,
- components_zTree2,
- __vue_template_functional__,
- __vue_styles__,
- __vue_scopeId__,
- __vue_module_identifier__
- )
-
- /* harmony default export */ var src_components_zTree2 = (Component.exports);
-
- // EXTERNAL MODULE: ./src/api/index.js + 5 modules
- var api = __webpack_require__("gyMJ");
-
- // EXTERNAL MODULE: ./src/utils/index.js
- var utils = __webpack_require__("0xDb");
-
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/zTree.vue
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
-
-
-
- /* harmony default export */ var zTree = ({
- name: "zTree",
- data: function data() {
- return {
- selectedNode: {},
- setting: {
- view: {
- showLine: false,
- showIcon: true
- },
- callbakck: {
- onClick: function onClick(treeId, treeNode) {
- console.log(treeNode);
- }
- },
- data: {
- simpleData: {
- enable: true,
- idKey: "id",
- pIdKey: "pid",
- rootPId: 0
- },
- zNodes: [{}]
- }
- }
- };
- },
- methods: {
- zTreeOnClick: function zTreeOnClick(event, treeId, treeNode) {
- //触发点击后面节点问题
- console.log(treeNode);
- this.selectedNode = treeNode;
- this.$emit("treeClick", treeNode);
- },
- getlist: function getlist(id) {
- console.log(1111);
- // this.$parent.fatherMethod(id);
- },
-
- freshArea: function freshArea() {
- $.fn.zTree.init($("#treeDemo"), this.setting, this.zNodes);
- }
- },
-
- mounted: function mounted() {
- $.fn.zTree.init($("#treeDemo"), this.setting, this.zNodes).expandAll(true);
- }
- });
- // 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
- var zTree_render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}
- 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"}})])])])}]
- var zTree_esExports = { render: zTree_render, staticRenderFns: zTree_staticRenderFns }
- /* harmony default export */ var components_zTree = (zTree_esExports);
- // CONCATENATED MODULE: ./src/components/zTree.vue
- function zTree_injectStyle (ssrContext) {
- __webpack_require__("Y/OZ")
- }
- var zTree_normalizeComponent = __webpack_require__("VU/8")
- /* script */
-
-
- /* template */
-
- /* template functional */
- var zTree___vue_template_functional__ = false
- /* styles */
- var zTree___vue_styles__ = zTree_injectStyle
- /* scopeId */
- var zTree___vue_scopeId__ = "data-v-96092a0e"
- /* moduleIdentifier (server only) */
- var zTree___vue_module_identifier__ = null
- var zTree_Component = zTree_normalizeComponent(
- zTree,
- components_zTree,
- zTree___vue_template_functional__,
- zTree___vue_styles__,
- zTree___vue_scopeId__,
- zTree___vue_module_identifier__
- )
-
- /* harmony default export */ var src_components_zTree = (zTree_Component.exports);
-
- // EXTERNAL MODULE: ./src/utils/util.js
- var util = __webpack_require__("oFuF");
-
- // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/loginAccount.vue
-
-
-
-
-
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
-
-
-
-
-
-
-
- /* harmony default export */ var loginAccount = ({
- inject: ['reload'],
- name: "basetable",
- data: function data() {
- var self = this;
- return {
- atAlertList: [{
- value: 1,
- label: '撬锁报警'
- }, {
- value: 2,
- label: '强行开门报警'
- }, {
- value: 7,
- label: '低电量报警'
- }, {
- value: 9,
- label: '胁迫开锁报警'
- }],
- sendItemList: [{
- value: 1,
- label: '充值短信'
- }, {
- value: 2,
- label: '交租成功'
- }, {
- value: 3,
- label: '提醒交租'
- }, {
- value: 4,
- label: '签约成功'
- }],
- historyUser: false,
- selectoption: [],
- selectoptionValue: '',
- historySelection: [],
- pageNum1: 1,
- pageSize1: 10,
- pageTotal1: 0,
- historyData: [],
- addresstc: false,
- center: [114.064552, 22.548457],
- jurisdiction: {
- roleId: '',
- userType: '',
- identity: '',
- enterpriseName: ''
- },
- lng: 0,
- lat: 0,
- loaded: false,
- events: {
- click: function click(e) {
- self.center = [e.lnglat.lng, e.lnglat.lat];
- self.Enterprise.address = stringify_default()([e.lnglat.lng, e.lnglat.lat]);
- self.Enterprise1.address = stringify_default()([e.lnglat.lng, e.lnglat.lat]);
- }
- },
- plugin: [{
- enableHighAccuracy: true, //是否使用高精度定位,默认:true
- timeout: 100, //超过10秒后停止定位,默认:无穷大
- maximumAge: 0, //定位结果缓存0毫秒,默认:0
- convert: true, //自动偏移坐标,偏移后的坐标为高德坐标,默认:true
- showButton: true, //显示定位按钮,默认:true
- buttonPosition: 'RB', //定位按钮停靠位置,默认:'LB',左下角
- showMarker: true, //定位成功后在定位到的位置显示点标记,默认:true
- showCircle: true, //定位成功后用圆圈表示定位精度范围,默认:true
- panToLocation: true, //定位成功后将定位到的位置作为地图中心点,默认:true
- zoomToAccuracy: true, //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:f
- extensions: 'all',
- pName: 'Geolocation',
- events: {
- init: function init(o) {
- // o 是高德地图定位插件实例
- o.getCurrentPosition(function (status, result) {
- if (result && result.position) {
- self.lng = result.position.lng;
- self.lat = result.position.lat;
- self.center = [self.lng, self.lat];
- self.loaded = true;
- self.$nextTick();
- }
- });
- },
- click: function click(e) {
- console.log(e);
- }
- }
- }],
- sele: true,
- selTreestatus: true,
- SelectedList: [],
- defaultProps: {
- children: "children",
- label: "name"
- },
- zNodes: [],
- setting1: {
- edit: {
- enable: true,
- editNameSelectAll: true,
- drag: {
- isMove: false
- },
- showRemoveBtn: false,
- showRenameBtn: true,
- renameTitle: "修改"
- },
- check: {
- enable: true
- },
- data: {
- simpleData: {
- enable: true,
- pIdKey: "pid"
- }
- },
- view: {
- showIcon: false,
- addHoverDom: this.addHoverDom,
- removeHoverDom: this.removeHoverDom
- }
- },
- setting: {
- edit: {
- enable: true,
- editNameSelectAll: true,
- drag: {
- isMove: false
- },
- showRemoveBtn: false,
- showRenameBtn: true,
- renameTitle: "修改"
- },
- check: {
- enable: false
- },
- data: {
- simpleData: {
- enable: true,
- pIdKey: "parentId"
- }
- },
- view: {
- showIcon: false,
- addHoverDom: this.addHoverDom,
- removeHoverDom: this.removeHoverDom
- }
- },
- ssjg: "",
- addHoverDom: true,
- modifyfrom: {
- oldPassword: "",
- newPassword: "",
- confirmPassword: ""
- },
- isRouterAlive: true,
- identity: "",
- userType: "",
- enterpriselist: [],
- Enterprise: {
- name: "",
- quota: ''
- },
- Enterprise1: {
- name: "",
- address: '',
- atAlert: '',
- sendItem: ''
- },
- rololist: [],
- enterpriseidedit: false,
- yhsflist: [{
- value: 1,
- label: "高级管理员"
- }, {
- value: 2,
- label: "中级管理员"
- }, {
- value: 3,
- label: "低级管理员"
- }],
- yhlxlist: [{
- value: 1,
- label: "管理员"
- }, {
- value: 2,
- label: "子用户"
- }, {
- value: 3,
- label: "小程序用户"
- }],
- pageSize: 10,
- pageIndex: 1,
- query: {
- address: "",
- name: "",
- pageIndex: 1,
- pageSize: 10,
- options: []
- },
- tableData: [],
- multipleSelection: [],
- delList: [],
- editVisible: false,
- pageTotal: 0,
- form: {},
- addform: {
- username: "",
- password: "",
- enterpriseName: "",
- identity: "0",
- userType: "",
- roleId: '',
- enterpriseId: ""
- },
- rules: {
- username: [{
- required: true,
- message: "请输入名称",
- trigger: "blur"
- }],
- phone: [{
- required: true,
- message: "请输入电话",
- trigger: "blur"
- }, {
- min: 11,
- max: 11,
- message: "长度为 11 个字符",
- trigger: "blur"
- }],
- password: [{
- required: true,
- message: "请输入密码",
- trigger: "blur"
- }],
- enterpriseName: [{
- required: true,
- message: "请选择部门",
- trigger: "blur"
- }],
- userType: [{
- required: true,
- message: "请选择用户类型",
- trigger: "blur"
- }]
- },
- idx: -1,
- id: -1,
- editVisible1: false,
- enterpriseidedit1: false,
- enterpriseId: "",
- enterpriseId1: "",
- roomtable: [],
- activeName: "first",
- roomstatus: true,
- zNodes1: [],
- roomlist1: [],
- pid: 1,
- roomlist: [],
- selectkey: [],
- selectkey1: [],
- enterpriseId2: '',
- userInfo: {
- type: ''
- },
- roleIds: [],
- tenantId: '',
- selectKeyList: [],
- colNum_6: 6,
- colNum_18: 18
- };
- },
-
- components: {
- zTree: src_components_zTree2,
- zTree1: src_components_zTree,
- zTreeOne: src_components_zTree2
- },
- beforeCreate: function beforeCreate() {
- // this.$store.commit('getselectoption')
- },
- created: function created() {
- this.userInfo = JSON.parse(localStorage.getItem('info'));
- this.enterpriseId = this.userInfo.enterpriseId;
- this.getEnterprise();
- this.selectoption = JSON.parse(localStorage.getItem('selectoption'));
- this.selectoptionValue = localStorage.getItem('tenantId');
-
- if (document.documentElement.clientWidth < 1080) {
- this.colNum_6 = 24;
- this.colNum_18 = 24;
- } else {
- this.colNum_6 = 6;
- this.colNum_18 = 18;
- }
- },
- mounted: function mounted() {
- this.getUserID();
- this.getUserList();
- this.addRoom();
- if (this.userInfo.type == 0) {
- this.getDeletes();
- }
- },
-
- methods: {
- selectTenantId: function selectTenantId(e) {
- localStorage.setItem('tenantId', e);
- this.reload();
- },
-
- // 获取选中角色权限
- getCheckNode: function getCheckNode(e) {
- var list = [];
- e.map(function (li) {
- list.push(li[0]);
- });
- this.jurisdiction.roleId = list;
- },
- getCheckNode1: function getCheckNode1(e) {
- var list = [];
- e.map(function (li) {
- list.push(li[0]);
- });
- this.roleIds = list;
- },
-
- // 权限选择
- jurisdictionFun: function jurisdictionFun() {},
- getDeletes: function getDeletes() {
- var _this = this;
-
- var data = {
- pageNum: this.pageNum1,
- pageSize: this.pageSize1
- };
- Object(api["d" /* httpGet */])(data, this.$api.getDeletes).then(function (res) {
- if (res.success) {
- _this.historyData = res.data.list;
- _this.pageTotal1 = res.data.total;
- } else {
- _this.$message.error('获取历史账户失败');
- }
- });
- },
- historicalAccount: function historicalAccount() {
- this.historyUser = true;
- },
-
- // 强制删除登录用户
- forceDeletion: function forceDeletion(index, row) {
- var _this2 = this;
-
- this.$confirm("确定要删除吗?", "提示", {
- type: "warning"
- }).then(function () {
- var data = {
- user: row.username
- };
- Object(api["d" /* httpGet */])(data, _this2.$api.orderKill).then(function (res) {
- if (res.success) {
- _this2.getUserList();
- _this2.getDeletes();
- _this2.$message.success('删除成功');
- } else {
- _this2.$message.error('删除失败');
- }
- });
- });
- },
- initMap: function initMap(e) {
- // init(o) {
- // o 是高德地图定位插件实例
- e.getCurrentPosition(function (status, result) {
- if (result && result.position) {
- self.lng = result.position.lng;
- self.lat = result.position.lat;
- self.center = [self.lng, self.lat];
- self.loaded = true;
- self.$nextTick();
- }
- });
- // }
- },
- selectAddress: function selectAddress() {
- this.addresstc = true;
- },
-
- //编辑节点
- modifyFun: function modifyFun(node, data) {
- console.log(node, data);
- },
- deleteUserList: function deleteUserList() {
- var _this3 = this;
-
- return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
- return regenerator_default.a.wrap(function _callee$(_context) {
- while (1) {
- switch (_context.prev = _context.next) {
- case 0:
- _this3.tableData.map(function (li) {
- data.push(li.id);
- });
-
- case 1:
- case "end":
- return _context.stop();
- }
- }
- }, _callee, _this3);
- }))();
- },
- remove: function remove(node, data) {
- var _this4 = this;
-
- return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee3() {
- var list, data2;
- return regenerator_default.a.wrap(function _callee3$(_context3) {
- while (1) {
- switch (_context3.prev = _context3.next) {
- case 0:
- list = [];
- data2 = [];
- _context3.next = 4;
- return _this4.getUserList();
-
- case 4:
- setTimeout(asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee2() {
- var data1;
- return regenerator_default.a.wrap(function _callee2$(_context2) {
- while (1) {
- switch (_context2.prev = _context2.next) {
- case 0:
- _this4.tableData.map(function (li) {
- data2.push(li.id);
- });
- list.push(data);
- data1 = Object(utils["j" /* recursion */])(list);
- _context2.next = 5;
- return _this4.getshsite(data1[0]);
-
- case 5:
- _this4.enterpriseId = data[0];
- _this4.$confirm("确定要删除部门对应账号吗?", "提示", {
- type: "warning"
- }).then(function () {
- Object(api["g" /* httpPost */])(data2, _this4.$api.deleteUser).then(function (res) {
- if (res.success) {
- _this4.$message.success("删除账号成功");
- _this4.$confirm("确定要删除吗?", "提示", {
- type: "warning"
- }).then(function () {
- var datalistll = [];
- _this4.selectkey1.map(function (li) {
- var ary = {
- itemId: li,
- orderId: data1[0]
- };
- datalistll.push(ary);
- });
- Object(api["g" /* httpPost */])(datalistll, _this4.$api.removeAssign).then(function (res) {
- if (res.success) {
- Object(api["g" /* httpPost */])(data1, _this4.$api.deleteEnterprise).then(function (res) {
- if (res.success) {
- _this4.getEnterprise();
- _this4.$message.success("部门删除成功");
- } else {
- _this4.getEnterprise();
- _this4.$message.error("部门删除失败");
- }
- });
- } else {
- _this4.$message.error(res.message);
- }
- });
- });
- } else {
- _this4.$message.error("删除账号失败");
- }
- });
- });
-
- case 7:
- case "end":
- return _context2.stop();
- }
- }
- }, _callee2, _this4);
- })), 500);
-
- case 5:
- case "end":
- return _context3.stop();
- }
- }
- }, _callee3, _this4);
- }))();
- },
-
- // 绑定房间
- bindsave: function bindsave() {},
- handleCheckChange1: function handleCheckChange1(e) {
- // console.log(e,this.selectkey1)
- var SelectedList = this.$refs.tree1.getCheckedNodes();
- var arr = [];
- SelectedList.map(function (li) {
- arr.push(li.value);
- });
- this.SelectedList = arr;
- this.selectKeyList = e;
- },
-
- //所选房源
- handleCheckChange: function handleCheckChange() {
- this.selectkey = this.$refs.tree.getCheckedKeys();
- },
-
- //添加房源
- addRoom: function addRoom() {
- var _this5 = this;
-
- var data = {};
- Object(api["d" /* httpGet */])(data, this.$api.getSiteList).then(function (res) {
- var array = Object(utils["n" /* uniqueArray */])(res.data.list.list, 'id');
- _this5.roomlist = Object(utils["p" /* ztreeToElementTree */])(array, {});
- });
- },
- ssselectFun1: function ssselectFun1(e) {
- this.enterpriseId2 = e;
- },
- ssselectFun: function ssselectFun(e) {
- var _this6 = this;
-
- this.enterpriseId1 = e;
- this.ssjg = e;
- var q = {
- enterpriseId: e
- };
- this.SelectedList = [];
- var data = {
- q: stringify_default()(q)
- };
- Object(api["d" /* httpGet */])(data, this.$api.getSiteList).then(function (res) {
- // this.selectkey
- var array = Object(utils["n" /* uniqueArray */])(res.data.list.list, 'id');
- _this6.zNodes1 = Object(utils["p" /* ztreeToElementTree */])(array, {});
- var array1 = [];
- array.map(function (li) {
- array1.push(li.id);
- });
- var selectKeyList = [],
- selectkey1 = [];
- res.data.list.list.forEach(function (item) {
- var name = util["a" /* default */].findIndexArrayOne(_this6.roomlist, item.id, []);
- if (name) {
- selectKeyList.push(name);
- }
- selectkey1.push(item.id);
- });
- _this6.selectKeyList = selectKeyList;
- _this6.selectkey1 = selectkey1;
- _this6.sele = false;
- _this6.$nextTick(function () {
- this.SelectedList = array1;
- this.sele = true;
- });
- });
- },
- loadNode: function loadNode(node, resolve) {
- if (node.childNodes) {
- var q = {};
- if (node.level) {
- q = {
- pid: node.level
- };
- } else {
- q = {
- pid: this.pid
- };
- }
- var data = {
- q: stringify_default()(q)
- };
- Object(api["d" /* httpGet */])(data, this.$api.getTree).then(function (res) {
- // if (res.data.length > 1) {
- // res.data.splice(0, 1);
- // }
- return resolve(arr);
- });
- } else {
- this.$message.error("暂无更多数据");
- }
- },
- getroomperson: function getroomperson() {
- var _this7 = this;
-
- var q = {
- enterpriseId: this.form.enterpriseId
- };
- var data = {
- q: stringify_default()(q)
- };
- Object(api["d" /* httpGet */])(data, this.$api.getSiteList).then(function (res) {
- var roomtable = [];
- var array = Object(utils["n" /* uniqueArray */])(res.data.list.list, 'id');
- array.map(function (li) {
- if (li.acreage && li.layout) {
- roomtable.push(li);
- }
- });
- _this7.roomtable = roomtable;
- });
- },
-
- // 添加绑定房间
- bindroom: function bindroom() {
- this.roomstatus = !this.roomstatus;
- },
-
- //操作切换
- handleClick: function handleClick(tab, event) {
- // console.log(tab, event);
- },
- onMouseDown: function onMouseDown(evt, treeId, treeNode) {
- this.Enterprise1 = treeId;
- this.enterpriseidedit1 = true;
- this.getroom();
- },
- getroom: function getroom() {
- var _this8 = this;
-
- var q = {
- enterpriseId: this.Enterprise1.id
- };
- var data = {
- q: stringify_default()(q)
- };
- Object(api["d" /* httpGet */])(data, this.$api.getSiteList).then(function (res) {
- var array = Object(utils["n" /* uniqueArray */])(res.data.list.list, 'id');
- _this8.zNodes1 = array;
- });
- },
-
- // 部门手风琴点击事件
- handleNodeClick: function handleNodeClick(data) {
- this.enterpriseId = data.id;
- this.getUserList();
- },
-
- // 获取角色id
- getUserID: function getUserID() {
- var _this9 = this;
-
- var data = {
- pageNum: 1,
- pageSize: 100
- };
- Object(api["d" /* httpGet */])(data, this.$api.getRoleList).then(function (res) {
- var rololist = [];
- res.data.list.map(function (li) {
- var obj = {
- value: li.id,
- label: li.name
- };
- rololist.push(obj);
- });
- _this9.rololist = rololist;
- });
- },
- enterfun: function enterfun(e) {
- var _this10 = this;
-
- this.enterpriseId = e;
- this.getUserList();
- this.enterpriselist.map(function (li) {
- if (li.id == e) {
- _this10.addform.enterpriseName = li.name;
- _this10.addform.enterpriseId = li.id;
- }
- });
- },
- getEnterprise: function getEnterprise() {
- var _this11 = this;
-
- Object(api["d" /* httpGet */])("", this.$api.getEnterprise).then(function (res) {
- _this11.enterpriselist = res.data.list;
- if (res.data.list.length > 0) {
- _this11.enterpriseId = res.data.list[0].id;
- }
- res.data.list.map(function (li) {
- li.pid = li.parentId;
- });
- _this11.zNodes = [];
- _this11.zNodes = Object(utils["p" /* ztreeToElementTree */])(res.data.list, {}); //res.data.list;
- });
- },
-
- // 部门编辑确
- addEnterprise1: function addEnterprise1() {
- var _this12 = this;
-
- if (this.enterpriseId1 == "") {
- this.$message.error("请选择要编辑的部门");
- } else {
- var idlist1 = [].concat(toConsumableArray_default()(new set_default.a(this.selectkey1.concat(this.SelectedList))));
- if (this.selectkey1.length > 0) {
- if (idlist1.length > 0) {
- var datalistll = [];
- this.selectkey1.map(function (li) {
- var ary = {
- itemId: li,
- orderId: _this12.enterpriseId1
- };
- datalistll.push(ary);
- });
- Object(api["g" /* httpPost */])(datalistll, this.$api.removeAssign).then(function (res) {
- if (res.success) {
- var idlist = [];
- _this12.SelectedList.map(function (li) {
- var ary = {
- itemId: li,
- orderId: _this12.enterpriseId1
- };
- idlist.push(ary);
- });
- if (idlist.length != 0) {
- setTimeout(function () {
- Object(api["g" /* httpPost */])(idlist, _this12.$api.assignSite).then(function (res) {});
- }, 500);
- }
- }
- });
- }
- } else {
- var idlist = [];
- this.SelectedList.map(function (li) {
- var ary = {
- itemId: li,
- orderId: _this12.enterpriseId1
- };
- idlist.push(ary);
- });
- if (idlist.length != 0) {
- Object(api["g" /* httpPost */])(idlist, this.$api.assignSite).then(function (res) {});
- }
- }
- if (this.Enterprise1.name != "" || this.Enterprise1.address != "") {
- var data = {
- list: [{
- name: this.Enterprise1.name,
- id: this.enterpriseId1,
- coordinate: stringify_default()(this.Enterprise1.address),
- atAlert: stringify_default()(this.Enterprise1.atAlert),
- sendItem: stringify_default()(this.Enterprise1.sendItem)
- }]
- };
- Object(api["g" /* httpPost */])(data, this.$api.updateEnterprise).then(function (res) {
- if (res.success) {
- _this12.getEnterprise();
- _this12.$message.success("修改成功");
- } else {
- _this12.$message.error("修改部门失败");
- }
- });
- } else {
- this.getEnterprise();
- this.$message.success("修改成功");
- }
- this.enterpriseidedit1 = false;
- }
- },
- addEnterprise: function addEnterprise() {
- var _this13 = this;
-
- if (this.ssjg == "") {
- this.$message.error("请选择所属部门");
- } else if (this.Enterprise.name == "") {
- this.$message.error("输入部门名称");
- } else if (this.Enterprise.quota == "") {
- this.$message.error("请输入允许接入设备数量");
- } else {
- var q = {
- "quota": this.Enterprise.quota,
- "deadline": this.userInfo.license.deadline
- };
- var code = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0DLoa5uX9MjFQJkwvsTb92xkJnwffrdcjKnuFcYN3z4GrGYt0voO22zl3ncNOCzsXZmL6iOK6ukjolajqnpKB/ipXI0/17nZbmY4zturM49EkVt4qw0BvFR7bN/qo7By2Z9dpHOswDEDrJZk+mmD3MCX+ZK5zuhDFVYjDvX9oTZEBdTY5qrgVp2p3fOQCOccGR8ael8lQ+uwewlEMJoJ+NwtF6YPm/SEkVlcnD04J84i7RSXHLoXCV549E8Qv0rDfgcAZhWJfDFmdpuUr42N7TwXl2QI7hNXjqdGbmZjjeZ5MYVWIhDAUGPXB3wlJhYjem7wfjJyeKQ8Zi8vhTtkkQIDAQAB';
-
- var data = {
- name: this.Enterprise.name,
- parentId: this.ssjg,
- coordinate: stringify_default()(this.Enterprise.address),
- quota: Object(api["j" /* setCode */])(code, stringify_default()(q))
- };
- Object(api["g" /* httpPost */])(data, this.$api.addEnterprise).then(function (res) {
- if (res.success) {
- _this13.$message.success("创建成功");
- var idlist = [];
- _this13.selectkey.map(function (li) {
- var ary = {
- itemId: li,
- orderId: res.data
- };
- idlist.push(ary);
- });
- if (idlist.length != 0) {
- Object(api["g" /* httpPost */])(idlist, _this13.$api.assignSite).then(function (res1) {
- if (res1.success) {
- _this13.$message.success("绑定成功");
- _this13.enterpriseidedit = false;
- _this13.getEnterprise();
- }
- });
- }
- } else {
- if (res.message == "Exceeded quota") {
- _this13.$message.error("超出配额");
- } else {
- _this13.$message.error(res.message);
- }
- }
- });
- }
- },
- modifyEnterprise: function modifyEnterprise(node, data) {
- this.enterpriseidedit1 = true;
- this.ssjg = data.id;
- this.enterpriseId1 = data.id;
- this.Enterprise1.address = JSON.parse(data.coordinate);
- this.Enterprise1.atAlert = JSON.parse(data.atAlert);
- this.Enterprise1.sendItem = JSON.parse(data.sendItem);
- this.getshsite(data.id);
- },
- getArr: function getArr(dataSource, id) {
- // dataSource 这个是选择器的数据源 id 是 目标id
- var arrRes = [];
- dataSource.some(function (item) {
- if (item.value == id) {
- arrRes.unshift(item.value);
- return true;
- } else {
- if (item.children) {
- item.children.some(function (item1) {
- if (item1.value == id) {
- arrRes.unshift(item1.value);
- arrRes.unshift(item.value);
- return true;
- } else {
- if (item1.children) {
- // item1.children 判断 防止不存在对应的三级数据
- item1.children.some(function (item2) {
- if (item2.value == id) {
- arrRes.unshift(item2.value);
- arrRes.unshift(item1.value);
- arrRes.unshift(item.value);
- return true;
- }
- });
- }
- }
- });
- }
- }
- });
- return arrRes; // 返回最终根据id查找出来的数组
- },
- getshsite: function getshsite(id) {
- var _this14 = this;
-
- this.SelectedList = [];
- var q = {
- enterpriseId: id
- };
- var data = {
- q: stringify_default()(q)
- };
- Object(api["d" /* httpGet */])(data, this.$api.getSiteList).then(function (res) {
- var SelectedList = [];
- if (res.data.list.list.length > 0) {
- var array = Object(utils["n" /* uniqueArray */])(res.data.list.list, 'id');
- SelectedList = Object(utils["j" /* recursion */])(array);
- } else {
- SelectedList = [];
- }
- var selectKeyList = [],
- selectkey1 = [];
- res.data.list.list.forEach(function (item) {
- var name = util["a" /* default */].findIndexArrayOne(_this14.roomlist, item.id, []);
- if (name) {
- selectKeyList.push(name);
- }
- selectkey1.push(item.id);
- });
- _this14.selectKeyList = selectKeyList;
- _this14.selectkey1 = selectkey1;
- _this14.sele = false;
- _this14.$nextTick(function () {
- var str = _this14.familyTree(_this14.roomlist);
- var newArr = SelectedList.filter(function (x) {
- return !str.some(function (item) {
- return x === item;
- });
- });
- _this14.SelectedList = newArr;
- _this14.sele = true;
- });
- });
- },
- familyTree: function familyTree(arr) {
- var temp = [];
- var forFn = function forFn(list) {
- for (var i = 0; i < list.length; i++) {
- var item = list[i];
- if (item.children) {
- temp.push(item.id);
- forFn(item.children);
- }
- }
- };
- forFn(arr);
- return temp;
- },
- createEnterprise: function createEnterprise() {
- this.enterpriseidedit = true;
- },
-
- // 获取用户列表
- getUserList: function getUserList() {
- var _this15 = this;
-
- return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee4() {
- var data;
- return regenerator_default.a.wrap(function _callee4$(_context4) {
- while (1) {
- switch (_context4.prev = _context4.next) {
- case 0:
- data = {
- pageNum: _this15.pageNum1,
- pageSize: _this15.pageSize1,
- q: stringify_default()({
- enterpriseId: _this15.enterpriseId
- })
- };
-
- Object(api["d" /* httpGet */])(data, _this15.$api.getUserList).then(function (res) {
- res.data.list.map(function (li) {
- var name = util["a" /* default */].findIndexArray(_this15.enterpriselist, li.enterpriseId, []);
- var path = '';
- if (name) {
- path = name.join('/');
- li.enterpriseName = path;
- }
- });
- _this15.tableData = res.data.list;
- _this15.pageTotal = res.data.total;
- });
-
- case 2:
- case "end":
- return _context4.stop();
- }
- }
- }, _callee4, _this15);
- }))();
- },
-
- // 编辑操作
- handleEdit1: function handleEdit1() {
- this.editVisible1 = true;
- },
-
- // 保存编辑 添加用户
- saveEdit1: function saveEdit1() {
- var _this16 = this;
-
- return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee5() {
- var roleIds, addform;
- return regenerator_default.a.wrap(function _callee5$(_context5) {
- while (1) {
- switch (_context5.prev = _context5.next) {
- case 0:
- _this16.addform.identity = _this16.userType;
- _this16.addform.userType = _this16.userType;
- roleIds = _this16.roleIds;
-
- _this16.addform.roleId = roleIds[0];
- // utils.validatePassword('',this.addform.password,(callback=>{
- // if(!callback){
- if (_this16.addform.username == "" || _this16.addform.phone == "" || _this16.addform.password == "" || _this16.addform.userType === "") {
- _this16.$message.error("请填写完整信息");
- } else if (_this16.addform.phone.length != 11) {
- _this16.$message.error("请填写正确手机号");
- } else {
- addform = _this16.addform;
-
- addform['tenantId'] = _this16.$store.state.tenantId;
- Object(api["g" /* httpPost */])(_this16.addform, _this16.$api.addUser).then(function (res) {
- if (res.success) {
- var data = {
- roleIds: roleIds,
- userId: res.data
- };
- Object(api["g" /* httpPost */])(data, _this16.$api.bindRole).then(function (res1) {
- if (res1.success) {
- _this16.$message.success('绑定角色成功');
- } else {
- _this16.$message.error('绑定角色失败');
- }
- });
- _this16.$message.success("添加成功");
- _this16.editVisible1 = false;
- _this16.isRouterAlive = false;
- _this16.getUserList();
- _this16.$nextTick(function () {
- this.isRouterAlive = true;
- });
- } else {
- _this16.$message.error("添加失败");
- }
- });
- }
- // }else{
- // this.$message.error(callback);
- // }
- // }))
-
- case 5:
- case "end":
- return _context5.stop();
- }
- }
- }, _callee5, _this16);
- }))();
- },
- handleChange: function handleChange(value) {
- console.log(value);
- },
-
- // 触发搜索按钮
- handleSearch: function handleSearch() {
- // this.$set(this.query, "pageIndex", 1);
- this.getUserList1(1, 10);
- this.$store.commit('increment', 1);
- },
-
- // 删除操作
- handleDelete: function handleDelete(index, row) {
- var _this17 = this;
-
- // 二次确认删除
- this.$confirm("确定要删除吗?", "提示", {
- type: "warning"
- }).then(function () {
- var data = [row.id];
- Object(api["g" /* httpPost */])(data, _this17.$api.deleteUser).then(function (res) {
- if (res.success) {
- _this17.$message.success("删除成功");
- _this17.getUserList();
- } else {
- _this17.$message.error("删除失败");
- }
- });
- }).catch(function () {});
- },
-
- // 多选操作
- handleSelectionChange: function handleSelectionChange(val) {
- this.multipleSelection = val;
- },
-
- // 多选操作
- handleSelectionChange1: function handleSelectionChange1(val) {
- this.historySelection = val;
- },
- delAllSelection: function delAllSelection() {
- var length = this.multipleSelection.length;
- var str = "";
- this.delList = this.delList.concat(this.multipleSelection);
- for (var i = 0; i < length; i++) {
- str += this.multipleSelection[i].name + " ";
- }
- this.$message.error("\u5220\u9664\u4E86" + str);
- this.multipleSelection = [];
- },
-
- // 编辑操作
- handleEdit: function handleEdit(index, row) {
- this.idx = index;
- this.form = row;
- this.editVisible = true;
- this.jurisdiction.userType = row.type;
- // this.jurisdiction.roleId = row.identity
- this.jurisdiction.enterpriseName = row.enterpriseId;
- this.getroomperson();
- this.getroleId(row.id);
- },
-
- // 获取绑定角色
- getroleId: function getroleId(id) {
- var _this18 = this;
-
- var data = {
- userId: id
- };
- Object(api["d" /* httpGet */])(data, this.$api.getRolesByUser).then(function (res) {
- if (res.success) {
- if (res.data.length > 0) {
- var defaultkeys = [];
- res.data.map(function (li) {
- defaultkeys.push(li.id);
- });
- _this18.jurisdiction.roleId = defaultkeys;
- _this18.form.identity = defaultkeys;
- }
- } else {
- _this18.$message.error('获取绑定角色失败');
- }
- });
- },
- scalarArrayEquals: function scalarArrayEquals(array1, array2) {
- if (array2) {
- return array1.length == array2.length && array1.every(function (v, i) {
- return v === array2[i];
- });
- } else {
- return false;
- }
- },
-
- // 保存编辑
- saveEdit: function saveEdit() {
- var _this19 = this;
-
- if (this.activeName == 'first') {
- var jurisdiction = this.jurisdiction;
- if (jurisdiction.enterpriseName != this.form.enterpriseId) {
- var data = {
- id: this.form.id,
- enterpriseId: jurisdiction.enterpriseName
- };
- Object(api["g" /* httpPost */])(data, this.$api.editUserEnterprise).then(function (res) {
- if (res.success) {
- _this19.getUserList1(1, 10);
- _this19.$message.success("修改成功");
- } else {
- _this19.$message.error("修改失败");
- }
- });
- }
- if (!this.scalarArrayEquals(jurisdiction.roleId, this.form.identity)) {
- var data = {
- roleIds: jurisdiction.roleId,
- userId: this.form.id
- };
- Object(api["g" /* httpPost */])(data, this.$api.bindRole).then(function (res) {
- if (res.success) {
- _this19.getUserList1(1, 10);
- _this19.$message.success('修改成功');
- } else {
- _this19.$message.error('修改失败');
- }
- });
- }
- if (jurisdiction.userType != this.form.type) {
- var data = {
- type: jurisdiction.userType,
- id: this.form.id
- };
- Object(api["g" /* httpPost */])(data, this.$api.editType).then(function (res) {
- if (res.success) {
- _this19.getUserList1(1, 10);
- _this19.$message.success('修改成功');
- } else {
- _this19.$message.error('修改失败');
- }
- });
- }
- this.editVisible = false;
- } else if (this.activeName == 'second') {
- if (this.modifyfrom.confirmPassword != this.modifyfrom.newPassword) {
- this.$message.error("确认密码输入错误!");
- } else if (this.modifyfrom.confirmPassword == '' || this.modifyfrom.newPassword == '') {
- this.$message.error("请输入修改的密码");
- } else {
- var data = {
- userId: this.form.id,
- new: this.modifyfrom.newPassword,
- old: this.modifyfrom.oldPassword
- };
- Object(api["g" /* httpPost */])(data, this.$api.editPassword).then(function (res) {
- if (res.success) {
- _this19.getUserList1(1, 10);
- _this19.$message.success("修改成功!");
- _this19.editVisible = false;
- } else {
- _this19.$message.error("修改失败,请输入正确的旧密码!");
- }
- });
- }
- }
- },
-
- // 分页导航
- handlePageChange: function handlePageChange(val) {
- // this.$set(this.query, "pageIndex", val);
- console.log(val);
- this.getUserList1(val, 10);
- },
- handleSizeChange: function handleSizeChange(val) {
- this.pageSize1 = val;
- this.getHistoryList(this.pageNum1, val);
- },
-
- // 分页导航
- handlePageChange1: function handlePageChange1(val) {
- this.getHistoryList(val, this.pageSize1);
- },
- getHistoryList: function getHistoryList(pageNum, pageSize) {
- var _this20 = this;
-
- var data = {
- pageNum: pageNum,
- pageSize: pageSize
- };
- Object(api["d" /* httpGet */])(data, this.$api.getDeletes).then(function (res) {
- if (res.success) {
- _this20.historyData = res.data.list;
- } else {
- _this20.$message.error('获取历史账户失败');
- }
- });
- },
- getUserList1: function getUserList1(pageNum, pageSize) {
- var _this21 = this;
-
- var q = {
- username: this.query.name,
- enterpriseId: this.enterpriseId
- };
- var data = {
- pageNum: pageNum,
- pageSize: pageSize,
- q: stringify_default()(q)
- };
- Object(api["d" /* httpGet */])(data, this.$api.getUserList).then(function (res) {
- res.data.list.map(function (li) {
- var name = util["a" /* default */].findIndexArray(_this21.enterpriselist, li.enterpriseId, []);
- var path = '';
- if (name) {
- path = name.join('/');
- li.enterpriseName = path;
- }
- });
- _this21.tableData = res.data.list;
- _this21.pageTotal = res.data.total;
- });
- }
- }
- });
- // 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
- 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){
- var node = ref.node;
- var data = ref.data;
- 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, "
- var loginAccount_staticRenderFns = []
- var loginAccount_esExports = { render: loginAccount_render, staticRenderFns: loginAccount_staticRenderFns }
- /* harmony default export */ var views_loginAccount = (loginAccount_esExports);
- // CONCATENATED MODULE: ./src/views/loginAccount.vue
- function loginAccount_injectStyle (ssrContext) {
- __webpack_require__("YJK1")
- }
- var loginAccount_normalizeComponent = __webpack_require__("VU/8")
- /* script */
-
-
- /* template */
-
- /* template functional */
- var loginAccount___vue_template_functional__ = false
- /* styles */
- var loginAccount___vue_styles__ = loginAccount_injectStyle
- /* scopeId */
- var loginAccount___vue_scopeId__ = "data-v-3733c4e0"
- /* moduleIdentifier (server only) */
- var loginAccount___vue_module_identifier__ = null
- var loginAccount_Component = loginAccount_normalizeComponent(
- loginAccount,
- views_loginAccount,
- loginAccount___vue_template_functional__,
- loginAccount___vue_styles__,
- loginAccount___vue_scopeId__,
- loginAccount___vue_module_identifier__
- )
-
- /* harmony default export */ var src_views_loginAccount = __webpack_exports__["default"] = (loginAccount_Component.exports);
-
-
- /***/ })
-
- });
|