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

503 lines
17 KiB

  1. webpackJsonp([79],{
  2. /***/ "dkyW":
  3. /***/ (function(module, exports) {
  4. // removed by extract-text-webpack-plugin
  5. /***/ }),
  6. /***/ "sZ3M":
  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/administrativeDepartment.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. //
  124. //
  125. //
  126. //
  127. //
  128. //
  129. //
  130. //
  131. //
  132. //
  133. //
  134. //
  135. //
  136. //
  137. //
  138. //
  139. //
  140. //
  141. //
  142. //
  143. //
  144. //
  145. //
  146. //
  147. //
  148. //
  149. //
  150. //
  151. //
  152. //
  153. //
  154. //
  155. //
  156. //
  157. //
  158. //
  159. //
  160. //
  161. //
  162. //
  163. //
  164. //
  165. //
  166. //
  167. //
  168. //
  169. //
  170. //
  171. //
  172. //
  173. //
  174. //
  175. //
  176. //
  177. //
  178. //
  179. //
  180. //
  181. //
  182. //
  183. //
  184. //
  185. //
  186. //
  187. //
  188. //
  189. //
  190. //
  191. //
  192. //
  193. //
  194. //
  195. //
  196. //
  197. //
  198. // import { formatTime } from '../../../echart/big-screen-vue-datav/src/utils';
  199. /* harmony default export */ var administrativeDepartment = ({
  200. name: "basetable",
  201. data: function data() {
  202. return {
  203. modifyfrom: { oldPassword: "", newPassword: "", confirmPassword: "" },
  204. isRouterAlive: true,
  205. identity: "",
  206. userType: "",
  207. enterpriselist: [],
  208. Enterprise: { name: "" },
  209. rololist: [],
  210. enterpriseidedit: false,
  211. yhsflist: [
  212. // { value: 0, label: "超级管理员" },
  213. // { value: 1, label: "管理员" },
  214. { value: 2, label: "老师" }, { value: 3, label: "学生" }],
  215. yhlxlist: [{ value: 1, label: "管理员" }, { value: 2, label: "子用户" }, { value: 3, label: "小程序用户" }],
  216. pageSize: 10,
  217. pageIndex: 1,
  218. query: {
  219. address: "",
  220. name: "",
  221. pageIndex: 1,
  222. pageSize: 10,
  223. options: []
  224. },
  225. tableData: [],
  226. multipleSelection: [],
  227. delList: [],
  228. editVisible: false,
  229. pageTotal: 0,
  230. form: {},
  231. addform: {
  232. username: "",
  233. password: "",
  234. enterpriseName: "",
  235. identity: "",
  236. userType: "",
  237. enterpriseId: "",
  238. roleId: ""
  239. },
  240. rules: {
  241. username: [{ required: true, message: "请输入名称", trigger: "blur" }],
  242. phone: [{ required: true, message: "请输入电话", trigger: "blur" }, { min: 11, max: 11, message: "长度为 11 个字符", trigger: "blur" }],
  243. password: [{ required: true, message: "请输入密码", trigger: "blur" }],
  244. enterpriseName: [{ required: true, message: "请选择部门", trigger: "blur" }],
  245. userType: [{ required: true, message: "请选择用户类型", trigger: "blur" }]
  246. },
  247. idx: -1,
  248. id: -1,
  249. editVisible1: false,
  250. alluser: []
  251. };
  252. },
  253. created: function created() {
  254. this.getUserList();
  255. },
  256. mounted: function mounted() {
  257. this.getEnterprise(); //查询所属部门
  258. },
  259. methods: {
  260. // 获取用户列表
  261. getUserList: function getUserList() {
  262. var _this = this;
  263. var data = {
  264. pageNum: 1,
  265. pageSize: 10
  266. };
  267. Object(api["d" /* httpGet */])(data, this.$api.getUserList).then(function (res) {
  268. _this.alluser = res.data.list;
  269. });
  270. },
  271. enterfun: function enterfun(e) {
  272. var _this2 = this;
  273. this.enterpriselist.map(function (li) {
  274. if (li.id == e) {
  275. _this2.addform.enterpriseName = li.name;
  276. _this2.addform.enterpriseId = li.id;
  277. }
  278. });
  279. },
  280. getEnterprise: function getEnterprise() {
  281. var _this3 = this;
  282. var data = {
  283. pageNum: 1,
  284. pageSize: 10
  285. };
  286. Object(api["d" /* httpGet */])(data, this.$api.getEnterprise).then(function (res) {
  287. var that = _this3;
  288. var enterpriselist = res.data.list;
  289. enterpriselist.map(function (li) {
  290. var obj = that.alluser.find(function (x) {
  291. return x.enterpriseId == li.id;
  292. });
  293. if (obj) {
  294. li.personList.push(obj);
  295. li.personNum = li.personList.length;
  296. }
  297. });
  298. console.log(enterpriselist);
  299. _this3.enterpriselist = enterpriselist;
  300. _this3.tableData = enterpriselist;
  301. _this3.pageTotal = res.data.total;
  302. });
  303. },
  304. addEnterprise: function addEnterprise() {
  305. var _this4 = this;
  306. Object(api["d" /* httpGet */])("", this.$api.userInfo).then(function (res3) {
  307. if (res3.success) {
  308. var data = {
  309. name: _this4.Enterprise.name,
  310. parentId: res3.data.enterpriseId
  311. };
  312. Object(api["g" /* httpPost */])(data, _this4.$api.addEnterprise).then(function (res) {
  313. if (res.success) {
  314. _this4.$message.success("创建成功");
  315. _this4.enterpriseidedit = false;
  316. _this4.getEnterprise();
  317. }
  318. });
  319. }
  320. });
  321. },
  322. createEnterprise: function createEnterprise() {
  323. this.enterpriseidedit = true;
  324. },
  325. // 编辑操作
  326. handleEdit1: function handleEdit1() {
  327. this.editVisible1 = true;
  328. },
  329. // 保存编辑 添加用户
  330. saveEdit1: function saveEdit1() {
  331. var _this5 = this;
  332. this.addform.identity = this.identity;
  333. this.addform.userType = this.userType;
  334. if (this.addform.username == "" || this.addform.phone == "" || this.addform.password == "" || this.addform.userType == "") {
  335. this.$message.error("请填写完整信息");
  336. } else if (this.addform.phone.length != 11) {
  337. this.$message.error("请填写正确手机号");
  338. } else {
  339. var addform = this.addform;
  340. addform['tenantId'] = JSON.parse(localStorage.getItem('tenantId'));
  341. Object(api["g" /* httpPost */])(addform, this.$api.addUser).then(function (res) {
  342. if (res.code == 200) {
  343. _this5.$message.success("添加成功");
  344. _this5.editVisible1 = false;
  345. _this5.isRouterAlive = false;
  346. _this5.$nextTick(function () {
  347. this.isRouterAlive = true;
  348. });
  349. }
  350. });
  351. }
  352. },
  353. handleChange: function handleChange(value) {
  354. console.log(value);
  355. },
  356. // 触发搜索按钮
  357. handleSearch: function handleSearch() {
  358. this.$set(this.query, "pageIndex", 1);
  359. this.getUserList1(1, 10);
  360. },
  361. // 删除操作
  362. handleDelete: function handleDelete(index, row) {
  363. var _this6 = this;
  364. // 二次确认删除
  365. this.$confirm("确定要删除吗?", "提示", {
  366. type: "warning"
  367. }).then(function () {
  368. var data = [row.id];
  369. Object(api["g" /* httpPost */])(data, _this6.$api.deleteUser).then(function (res) {
  370. _this6.$message.success("删除成功");
  371. _this6.getUserList();
  372. });
  373. }).catch(function () {});
  374. },
  375. // 多选操作
  376. handleSelectionChange: function handleSelectionChange(val) {
  377. this.multipleSelection = val;
  378. },
  379. delAllSelection: function delAllSelection() {
  380. var length = this.multipleSelection.length;
  381. var str = "";
  382. this.delList = this.delList.concat(this.multipleSelection);
  383. for (var i = 0; i < length; i++) {
  384. str += this.multipleSelection[i].name + " ";
  385. }
  386. this.$message.error("\u5220\u9664\u4E86" + str);
  387. this.multipleSelection = [];
  388. },
  389. // 编辑操作
  390. handleEdit: function handleEdit(index, row) {
  391. this.idx = index;
  392. this.form = row;
  393. console.log(this.form);
  394. this.editVisible = true;
  395. },
  396. // 保存编辑
  397. saveEdit: function saveEdit() {
  398. var _this7 = this;
  399. if (this.modifyfrom.confirmPassword != this.modifyfrom.newPassword) {
  400. this.$message.error("确认密码输入错误!");
  401. } else {
  402. var data = {
  403. new: this.modifyfrom.newPassword,
  404. old: this.modifyfrom.oldPassword
  405. };
  406. Object(api["g" /* httpPost */])(data, this.$api.editPassword).then(function (res) {
  407. if (res.success) {
  408. _this7.$message.success("修改成功!");
  409. _this7.editVisible = false;
  410. } else {
  411. _this7.$message.error("修改失败,请输入正确的旧密码!");
  412. }
  413. });
  414. }
  415. },
  416. // 分页导航
  417. handlePageChange: function handlePageChange(val) {
  418. // this.$set(this.query, "pageIndex", val);
  419. console.log(val);
  420. this.getUserList1(val, 10);
  421. },
  422. getUserList1: function getUserList1(pageNum, pageSize) {
  423. var _this8 = this;
  424. var q = {
  425. username: this.query.name
  426. };
  427. var data = {
  428. pageNum: pageNum,
  429. pageSize: pageSize,
  430. q: stringify_default()(q)
  431. };
  432. Object(api["d" /* httpGet */])(data, this.$api.getUserList).then(function (res) {
  433. _this8.tableData = res.data.list;
  434. _this8.pageTotal = res.data.total;
  435. });
  436. }
  437. }
  438. });
  439. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-2a0c4926","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/administrativeDepartment.vue
  440. var 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('el-input',{staticClass:"handle-input mr10",attrs:{"placeholder":"登录账号"},model:{value:(_vm.query.name),callback:function ($$v) {_vm.$set(_vm.query, "name", $$v)},expression:"query.name"}}),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","icon":"el-icon-search"},on:{"click":_vm.handleSearch}},[_vm._v("搜索")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.handleEdit1}},[_vm._v("创建子账户")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.createEnterprise}},[_vm._v("创建部门")])],1),_vm._v(" "),_c('el-table',{ref:"multipleTable",staticClass:"table",attrs:{"data":_vm.tableData,"border":"","header-cell-class-name":"table-header"},on:{"selection-change":_vm.handleSelectionChange}},[_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":"parentName","label":"上级"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"personNum","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',{attrs:{"type":"text","icon":"el-icon-edit"},on:{"click":function($event){return _vm.handleEdit(scope.$index, scope.row)}}},[_vm._v("编辑")]),_vm._v(" "),_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("删除")])]}}],null,false,2927004000)})],1),_vm._v(" "),_c('div',{staticClass:"pagination"},[_c('el-pagination',{attrs:{"background":"","layout":"total, prev, pager, next","current-page":_vm.pageIndex,"page-size":_vm.pageSize,"total":_vm.pageTotal},on:{"current-change":_vm.handlePageChange}})],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',{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":"phone"}},[_c('el-input',{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":"password"}},[_c('el-input',{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":"enterpriseName"}},[_c('el-select',{attrs:{"placeholder":"请选择"},on:{"change":_vm.enterfun},model:{value:(_vm.addform.enterpriseName),callback:function ($$v) {_vm.$set(_vm.addform, "enterpriseName", $$v)},expression:"addform.enterpriseName"}},_vm._l((_vm.enterpriselist),function(item){return _c('el-option',{key:item.id,attrs:{"label":item.name,"value":item.id}})}),1)],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"用户身份","prop":"identity"}},[_c('el-select',{attrs:{"placeholder":"请选择"},model:{value:(_vm.identity),callback:function ($$v) {_vm.identity=$$v},expression:"identity"}},_vm._l((_vm.yhsflist),function(item){return _c('el-option',{key:item.
  441. var staticRenderFns = []
  442. var esExports = { render: render, staticRenderFns: staticRenderFns }
  443. /* harmony default export */ var views_administrativeDepartment = (esExports);
  444. // CONCATENATED MODULE: ./src/views/administrativeDepartment.vue
  445. function injectStyle (ssrContext) {
  446. __webpack_require__("dkyW")
  447. }
  448. var normalizeComponent = __webpack_require__("VU/8")
  449. /* script */
  450. /* template */
  451. /* template functional */
  452. var __vue_template_functional__ = false
  453. /* styles */
  454. var __vue_styles__ = injectStyle
  455. /* scopeId */
  456. var __vue_scopeId__ = "data-v-2a0c4926"
  457. /* moduleIdentifier (server only) */
  458. var __vue_module_identifier__ = null
  459. var Component = normalizeComponent(
  460. administrativeDepartment,
  461. views_administrativeDepartment,
  462. __vue_template_functional__,
  463. __vue_styles__,
  464. __vue_scopeId__,
  465. __vue_module_identifier__
  466. )
  467. /* harmony default export */ var src_views_administrativeDepartment = __webpack_exports__["default"] = (Component.exports);
  468. /***/ })
  469. });