完成签约之后直接添加人员,录入下发凭证
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.

614 lines
20 KiB

  1. webpackJsonp([80],{
  2. /***/ "F9s0":
  3. /***/ (function(module, exports) {
  4. // removed by extract-text-webpack-plugin
  5. /***/ }),
  6. /***/ "MblA":
  7. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  10. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/json/stringify.js
  11. var stringify = __webpack_require__("mvHQ");
  12. var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);
  13. // EXTERNAL MODULE: ./src/api/index.js + 5 modules
  14. var api = __webpack_require__("gyMJ");
  15. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/rolePermissions.vue
  16. //
  17. //
  18. //
  19. //
  20. //
  21. //
  22. //
  23. //
  24. //
  25. //
  26. //
  27. //
  28. //
  29. //
  30. //
  31. //
  32. //
  33. //
  34. //
  35. //
  36. //
  37. //
  38. //
  39. //
  40. //
  41. //
  42. //
  43. //
  44. //
  45. //
  46. //
  47. //
  48. //
  49. //
  50. //
  51. //
  52. //
  53. //
  54. //
  55. //
  56. //
  57. //
  58. //
  59. //
  60. //
  61. //
  62. //
  63. //
  64. //
  65. //
  66. //
  67. //
  68. //
  69. //
  70. //
  71. //
  72. //
  73. //
  74. //
  75. //
  76. //
  77. //
  78. //
  79. //
  80. //
  81. //
  82. //
  83. //
  84. //
  85. //
  86. //
  87. //
  88. //
  89. //
  90. //
  91. //
  92. //
  93. //
  94. //
  95. //
  96. //
  97. //
  98. //
  99. //
  100. //
  101. //
  102. //
  103. //
  104. //
  105. //
  106. //
  107. //
  108. //
  109. //
  110. //
  111. //
  112. //
  113. //
  114. //
  115. //
  116. //
  117. //
  118. //
  119. //
  120. //
  121. //
  122. //
  123. /* harmony default export */ var rolePermissions = ({
  124. inject: ['reload'],
  125. name: "basetable",
  126. data: function data() {
  127. return {
  128. selectoption: [],
  129. selectoptionValue: '',
  130. checkList: [],
  131. i18n: [],
  132. selectstatus: false,
  133. isRouterAlive: true,
  134. query: {
  135. address: "",
  136. name: "",
  137. pageIndex: 1,
  138. pageSize: 10,
  139. options: []
  140. },
  141. radio: "1",
  142. treedata: [{
  143. id: "STATISTICAL_ANALYSIS",
  144. label: "数据汇总",
  145. status: 0,
  146. children: [{
  147. id: "HOME_PAGE",
  148. label: "首页",
  149. status: 0
  150. }, {
  151. id: "Datavisualization",
  152. label: "大屏展示",
  153. status: 0
  154. }]
  155. }, {
  156. id: "AREA_MANAGEMENT",
  157. label: "房源管理",
  158. status: 0,
  159. children: [{
  160. id: "STUDENT_DORMITORY",
  161. label: "房源列表",
  162. status: 0
  163. }]
  164. }, {
  165. id: "OPERATIONS_MANAGEMENT",
  166. label: "业务管理",
  167. status: 0,
  168. children: [{
  169. id: "ACCOMMODATION_OPERATION",
  170. label: "门锁业务",
  171. status: 0,
  172. children: [{
  173. id: "ACCOMMODATION_REGISTER",
  174. label: "入住办理",
  175. status: 0
  176. }, {
  177. id: "CHECK_OUT_MANAGEMENT",
  178. label: "退住管理",
  179. status: 0
  180. }, {
  181. id: "RENEWAL_HANDLING",
  182. label: "续住管理",
  183. status: 0
  184. }]
  185. }, {
  186. id: "DOORMAGNETICSERVICE",
  187. label: "门磁业务",
  188. status: 0,
  189. children: [{
  190. id: "LINKMAN",
  191. label: "接警联系人",
  192. status: 0
  193. }]
  194. }]
  195. }, {
  196. id: "PERSONNEL_MANAGEMENT",
  197. label: "人员管理",
  198. status: 0,
  199. children: [{
  200. id: "STUDENT_INFORMATION",
  201. label: "人员列表",
  202. status: 0
  203. }, {
  204. label: "凭证管理",
  205. id: "RENT_SURRENDER_MANAGEMENT",
  206. status: 0
  207. }, {
  208. label: "信息库",
  209. id: "INFORMATIONBASE",
  210. status: 0
  211. }]
  212. }, {
  213. id: "DEVICE_MANAGEMENT",
  214. label: "设备管理",
  215. status: 0,
  216. children: [{
  217. id: "DOOR_LOCK_DEVICE",
  218. label: "门锁设备",
  219. status: 0
  220. }, {
  221. id: "EQUIPMENTLIST",
  222. label: "门磁设备",
  223. status: 0
  224. }]
  225. }, {
  226. id: "USER_MANAGEMENT",
  227. label: "用户管理",
  228. status: 0,
  229. children: [{
  230. id: "ACCOUNT_MANAGEMENT",
  231. label: "登录账号",
  232. status: 0
  233. }, {
  234. id: "ROLE_PERMISSIONS",
  235. label: "角色权限",
  236. status: 0
  237. }, {
  238. id: "BOUND_ROLE",
  239. label: "绑定角色",
  240. status: 0
  241. }]
  242. }, {
  243. id: "LOG_MANAGEMENT",
  244. label: "日志管理",
  245. status: 0,
  246. children: [{
  247. id: "journal",
  248. label: "系统日志",
  249. status: 0
  250. }, {
  251. id: "DOORLOCKLOG",
  252. label: "门锁日志",
  253. status: 0,
  254. children: [{
  255. id: "UnlockRecord",
  256. label: "开锁记录",
  257. status: 0
  258. }, {
  259. id: "warningLog",
  260. label: "警告日志",
  261. status: 0
  262. }, {
  263. id: "DeviceFeedbackLog",
  264. label: "设备反馈日志",
  265. status: 0
  266. }]
  267. }, {
  268. id: "DOORMAGNETICLOG",
  269. label: "门磁日志",
  270. status: 0,
  271. children: [{
  272. id: "ALARMRECORD",
  273. label: "报警日志",
  274. status: 0
  275. }]
  276. }]
  277. }],
  278. defaultProps: {
  279. children: "children",
  280. label: "label"
  281. },
  282. options: [{
  283. value: "选项1",
  284. label: "超级系统管理员"
  285. }, {
  286. value: "选项2",
  287. label: "业务员"
  288. }],
  289. yhsflist: [{
  290. value: 0,
  291. label: "超级管理员"
  292. }, {
  293. value: 1,
  294. label: "高级管理员"
  295. }, {
  296. value: 2,
  297. label: "中级管理员"
  298. }, {
  299. value: 3,
  300. label: "低级管理员"
  301. }],
  302. authorities: [],
  303. authorities1: [],
  304. authoritiesName: [],
  305. value: "",
  306. tableData: [],
  307. multipleSelection: [],
  308. delList: [],
  309. editVisible: false,
  310. editVisible1: false,
  311. pageTotal: 0,
  312. form: {},
  313. form1: {},
  314. idx: -1,
  315. id: -1,
  316. userInfo: {
  317. type: ''
  318. }
  319. };
  320. },
  321. created: function created() {
  322. this.userInfo = JSON.parse(localStorage.getItem('info'));
  323. this.getUserID();
  324. this.getmenu();
  325. this.selectoption = JSON.parse(localStorage.getItem('selectoption'));
  326. this.selectoptionValue = localStorage.getItem('tenantId');
  327. },
  328. methods: {
  329. selectTenantId: function selectTenantId(e) {
  330. localStorage.setItem('tenantId', e);
  331. this.reload();
  332. },
  333. getmenu: function getmenu() {
  334. var _this = this;
  335. Object(api["d" /* httpGet */])('', this.$api.userInfo).then(function (res3) {
  336. var authorities = res3.data.authorities;
  337. localStorage.setItem('info', stringify_default()(res3.data));
  338. if (res3.data.type == 0) {
  339. _this.i18n = _this.$language.cn.i18n;
  340. } else {
  341. var i18n = _this.$language.cn.i18n.items;
  342. for (var i = 0; i < i18n.length; i++) {
  343. if (i18n[i].subs) {
  344. var Index1 = authorities.findIndex(function (item) {
  345. return item == i18n[i].key;
  346. });
  347. if (Index1 == -1) {
  348. i18n[i].status = -1;
  349. }
  350. for (var j = 0; j < i18n[i].subs.length; j++) {
  351. var Index = authorities.findIndex(function (item) {
  352. return item == i18n[i].subs[j].key;
  353. });
  354. if (Index == -1) {
  355. i18n[i].subs[j].status = -1;
  356. console.log(i18n[i].subs[j]);
  357. } else {
  358. i18n[i].status = 0;
  359. }
  360. }
  361. } else {
  362. var _Index = authorities.findIndex(function (item) {
  363. return item == i18n[i].key;
  364. });
  365. if (_Index == -1) {
  366. i18n[i].status = -1;
  367. }
  368. }
  369. }
  370. _this.i18n = _this.$language.cn.i18n;
  371. _this.$nextTick(function () {
  372. _this.i18n.items = i18n;
  373. console.log(_this.i18n.items);
  374. });
  375. }
  376. });
  377. },
  378. // 修改角色权限
  379. preservation: function preservation() {
  380. var _this2 = this;
  381. var data = {
  382. roleId: this.roleId,
  383. authorities: this.authorities
  384. };
  385. Object(api["g" /* httpPost */])(data, this.$api.updateRole).then(function (res) {
  386. if (res.code == 200) {
  387. _this2.$message.success("更新成功");
  388. _this2.isRouterAlive = false;
  389. _this2.$nextTick(function () {
  390. this.getUserID();
  391. this.editVisible1 = false;
  392. this.isRouterAlive = true;
  393. });
  394. }
  395. });
  396. },
  397. // 获取角色id
  398. getUserID: function getUserID() {
  399. var _this3 = this;
  400. var data = {
  401. pageNum: 1,
  402. pageSize: 100
  403. };
  404. Object(api["d" /* httpGet */])(data, this.$api.getRoleList).then(function (res) {
  405. _this3.tableData = res.data.list;
  406. _this3.pageTotal = res.data.total || 10;
  407. });
  408. },
  409. getCheckedKeys: function getCheckedKeys(e) {
  410. console.log(e);
  411. },
  412. // 勾选权限
  413. handleCheckChange: function handleCheckChange() {
  414. // var authoritieslist = this.$refs.tree.getCheckedNodes();
  415. var authoritieslist = this.checkList;
  416. var authorities = [],
  417. authoritiesName = [];
  418. // authoritieslist.map((li) => {
  419. // authorities.push(li.id);
  420. // authoritiesName.push(li.label);
  421. // });
  422. // this.authoritiesName = authoritiesName;
  423. this.authorities = authoritieslist;
  424. // console.log(this.treedata)
  425. },
  426. // 数组去重
  427. unique: function unique(arr) {
  428. var newArr = [];
  429. var len = arr.length;
  430. for (var i = 0; i < len; i++) {
  431. if (newArr.indexOf(arr[i]) == -1) {
  432. newArr.push(arr[i]);
  433. }
  434. }
  435. return newArr;
  436. },
  437. // 获取用户列表
  438. getUserList: function getUserList() {
  439. var _this4 = this;
  440. // var data={
  441. // name:"zw001"
  442. // }
  443. Object(api["d" /* httpGet */])("", this.$api.getUserList).then(function (res) {
  444. _this4.tableData = res.data.list;
  445. _this4.pageTotal = res.data.total || 50;
  446. });
  447. },
  448. handleChange: function handleChange(value) {
  449. console.log(value);
  450. },
  451. // 获取 easy-mock 的模拟数据
  452. getData: function getData() {
  453. var _this5 = this;
  454. Object(api["g" /* httpPost */])().then(function (res) {
  455. _this5.tableData = res.list;
  456. _this5.pageTotal = res.pageTotal || 50;
  457. });
  458. },
  459. // 触发搜索按钮
  460. handleSearch: function handleSearch() {
  461. // this.$set(this.query, "pageIndex", 1);
  462. // this.getData();
  463. },
  464. // 删除操作
  465. handleDelete: function handleDelete(index, row) {
  466. var _this6 = this;
  467. var roleIds = [row.id];
  468. var data = {
  469. roleIds: roleIds
  470. };
  471. this.$confirm("确定要删除吗?", "提示", {
  472. type: "warning"
  473. }).then(function () {
  474. Object(api["g" /* httpPost */])(data, _this6.$api.deleteRole).then(function (res) {
  475. _this6.$message.success("删除成功");
  476. _this6.tableData.splice(index, 1);
  477. });
  478. }).catch(function () {});
  479. },
  480. // 多选操作
  481. handleSelectionChange: function handleSelectionChange(val) {
  482. this.authorities1 = [];
  483. // this.$refs.tree.setCheckedKeys([]);
  484. this.authorities1 = JSON.parse(val.authorities);
  485. this.checkList = this.authorities1 || [];
  486. this.roleId = val.id;
  487. // this.multipleSelection = val;
  488. },
  489. delAllSelection: function delAllSelection() {
  490. var length = this.multipleSelection.length;
  491. var str = "";
  492. this.delList = this.delList.concat(this.multipleSelection);
  493. for (var i = 0; i < length; i++) {
  494. str += this.multipleSelection[i].name + " ";
  495. }
  496. this.$message.error("\u5220\u9664\u4E86" + str);
  497. this.multipleSelection = [];
  498. },
  499. // 编辑操作
  500. handleEdit: function handleEdit(index, row) {
  501. this.idx = index;
  502. this.form = row;
  503. this.editVisible = true;
  504. },
  505. // 保存编辑
  506. saveEdit: function saveEdit() {
  507. this.editVisible = false;
  508. this.$message.success("\u4FEE\u6539\u7B2C " + (this.idx + 1) + " \u884C\u6210\u529F");
  509. this.$set(this.tableData, this.idx, this.form);
  510. },
  511. // 编辑操作
  512. handleEdit1: function handleEdit1() {
  513. this.editVisible1 = true;
  514. },
  515. // 保存编辑
  516. saveEdit1: function saveEdit1() {
  517. var _this7 = this;
  518. var data = {
  519. name: this.form1.name,
  520. type: this.value
  521. };
  522. Object(api["g" /* httpPost */])(data, this.$api.addRole).then(function (res) {
  523. if (res.code == 200) {
  524. console.log("11111111111111");
  525. _this7.$message.success(res.message);
  526. _this7.editVisible1 = false;
  527. _this7.isRouterAlive = false;
  528. _this7.$nextTick(function () {
  529. this.getUserID();
  530. this.editVisible1 = false;
  531. this.isRouterAlive = true;
  532. });
  533. }
  534. });
  535. },
  536. // 分页导航
  537. handlePageChange: function handlePageChange(val) {
  538. this.$set(this.query, "pageIndex", val);
  539. this.getData();
  540. }
  541. }
  542. });
  543. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-270b84de","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/rolePermissions.vue
  544. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.isRouterAlive)?_c('div',[_c('el-row',{staticClass:"gridBox",staticStyle:{"background":"#fff","padding":"20px"},attrs:{"gutter":20}},[_c('div',{staticClass:"container"},[_c('div',{staticClass:"handle-box"},[_c('selectoption'),_vm._v(" "),_c('el-button',{staticStyle:{"background":"#FA8E00","border":"none"},attrs:{"type":"primary","size":"small"},on:{"click":_vm.handleEdit1}},[_vm._v("添加角色")])],1),_vm._v(" "),_c('div',{},[_c('el-table',{ref:"multipleTable",staticClass:"table",attrs:{"data":_vm.tableData,"border":"","header-cell-class-name":"table-header","highlight-current-row":"","height":"500"},on:{"row-click":_vm.handleSelectionChange}},[(_vm.selectstatus)?_c('el-table-column',{attrs:{"type":"selection","width":"55","align":"center"}}):_vm._e(),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"id","label":"ID","width":"55","align":"center"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"name","label":"角色名称"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"type","label":"分类"}}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"操作","width":"180","align":"center"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('el-button',{staticClass:"red",attrs:{"type":"text","icon":"el-icon-delete"},on:{"click":function($event){return _vm.handleDelete(scope.$index, scope.row)}}},[_vm._v("\n 删除")])]}}],null,false,2919662003)})],1),_vm._v(" "),_c('div',{staticClass:"pagination"},[_c('el-pagination',{attrs:{"background":"","layout":"total, prev, pager, next","current-page":_vm.query.pageIndex,"page-size":_vm.query.pageSize,"total":_vm.pageTotal},on:{"current-change":_vm.handlePageChange}})],1)],1)]),_vm._v(" "),_c('div',{staticClass:"perverBox"},[_c('div',{staticClass:"prever"},[_c('el-button',{staticStyle:{"background":"#FA8E00","border":"none"},attrs:{"type":"primary","size":"small"},on:{"click":_vm.preservation}},[_vm._v("保存设置")])],1),_vm._v(" "),_c('div',{staticClass:"treediv"},[_c('el-checkbox-group',{on:{"change":_vm.handleCheckChange},model:{value:(_vm.checkList),callback:function ($$v) {_vm.checkList=$$v},expression:"checkList"}},[_c('div',{staticClass:"elTree"},_vm._l((_vm.i18n.items),function(item,index){return _c('div',{directives:[{name:"show",rawName:"v-show",value:(item.status !=-1),expression:"item.status !=-1"}],key:index,staticClass:"treeitem"},[_c('div',{staticClass:"trli"},[_c('i',{directives:[{name:"show",rawName:"v-show",value:(item.subs),expression:"item.subs"}],staticClass:"el-icon-caret-bottom"}),_vm._v(" "),_c('el-checkbox',{attrs:{"label":item.key}},[_c('span',[_vm._v(_vm._s(item.title))])])],1),_vm._v(" "),_c('ul',{directives:[{name:"show",rawName:"v-show",value:(item.subs),expression:"item.subs"}],staticClass:"treeli1"},_vm._l((item.subs),function(item1,index){return _c('li',{directives:[{name:"show",rawName:"v-show",value:(item1.status !=-1),expression:"item1.status !=-1"}],key:index},[_c('div',{staticClass:"trli"},[_c('i',{directives:[{name:"show",rawName:"v-show",value:(item1.subs),expression:"item1.subs"}],staticClass:"el-icon-caret-bottom"}),_vm._v(" "),_c('el-checkbox',{attrs:{"label":item1.key}},[_c('span',[_vm._v(_vm._s(item1.title))])])],1),_vm._v(" "),_c('ul',{directives:[{name:"show",rawName:"v-show",value:(item1.subs),expression:"item1.subs"}],staticClass:"treeli1"},_vm._l((item1.subs),function(item2,index){return (item2.status !=-1)?_c('li',{key:index},[_c('div',{staticClass:"trli"},[_c('i',{directives:[{name:"show",rawName:"v-show",value:(item2.subs),expression:"item2.subs"}],staticClass:"el-icon-caret-bottom"}),_vm._v(" "),_c('el-checkbox',{attrs:{"label":item2.key}},[_c('span',[_vm._v(_vm._s(item2.title))])])],1)]):_vm._e()}),0)])}),0)])}),0)])],1)])]),_vm._v(" "),_c('el-dialog',{attrs:{"title":"编辑","visible":_vm.editVisible,"width":"30%"},on:{"update:visible":function($event){_vm.editVisible=$event}},scopedSlots:_vm._u([{key:"footer",fn:function(){return [_c('span',{staticClass:"dialog-footer"},[_c('el-button',{on:{"cl
  545. var staticRenderFns = []
  546. var esExports = { render: render, staticRenderFns: staticRenderFns }
  547. /* harmony default export */ var views_rolePermissions = (esExports);
  548. // CONCATENATED MODULE: ./src/views/rolePermissions.vue
  549. function injectStyle (ssrContext) {
  550. __webpack_require__("F9s0")
  551. }
  552. var normalizeComponent = __webpack_require__("VU/8")
  553. /* script */
  554. /* template */
  555. /* template functional */
  556. var __vue_template_functional__ = false
  557. /* styles */
  558. var __vue_styles__ = injectStyle
  559. /* scopeId */
  560. var __vue_scopeId__ = "data-v-270b84de"
  561. /* moduleIdentifier (server only) */
  562. var __vue_module_identifier__ = null
  563. var Component = normalizeComponent(
  564. rolePermissions,
  565. views_rolePermissions,
  566. __vue_template_functional__,
  567. __vue_styles__,
  568. __vue_scopeId__,
  569. __vue_module_identifier__
  570. )
  571. /* harmony default export */ var src_views_rolePermissions = __webpack_exports__["default"] = (Component.exports);
  572. /***/ })
  573. });