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

583 lines
18 KiB

  1. webpackJsonp([93],{
  2. /***/ "hPw6":
  3. /***/ (function(module, exports) {
  4. // removed by extract-text-webpack-plugin
  5. /***/ }),
  6. /***/ "wEa3":
  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. // EXTERNAL MODULE: ./src/utils/index.js
  16. var utils = __webpack_require__("0xDb");
  17. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/doorMagnetism/userManagementHouse.vue
  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. /* harmony default export */ var userManagementHouse = ({
  156. name: "alarmRecord",
  157. data: function data() {
  158. return {
  159. rules: {
  160. region: [{
  161. required: true,
  162. message: '请选择所属单位',
  163. trigger: 'blur'
  164. }],
  165. personname: [{
  166. required: true,
  167. message: '请输入姓名',
  168. trigger: 'blur'
  169. }],
  170. phone: [{
  171. required: true,
  172. message: '请输入手机号',
  173. trigger: 'blur'
  174. }],
  175. password: [{
  176. required: true,
  177. message: '请输入密码',
  178. trigger: 'blur'
  179. }]
  180. },
  181. rules1: {
  182. oldPassword: [{
  183. required: true,
  184. message: '请输入旧密码',
  185. trigger: 'blur'
  186. }],
  187. newPassword: [{
  188. required: true,
  189. message: '请输入新密码',
  190. trigger: 'blur'
  191. }],
  192. confirmPassword: [{
  193. required: true,
  194. message: '请输入新密码',
  195. trigger: 'blur'
  196. }]
  197. },
  198. modifyfrom: {
  199. oldPassword: '',
  200. newPassword: '',
  201. confirmPassword: ''
  202. },
  203. titleText: '',
  204. textarea: '', //批量处理备注
  205. dialogVisible: false,
  206. dialogVisible1: false,
  207. form: {
  208. personname: '',
  209. password: '',
  210. name: '',
  211. region: '',
  212. phone: ''
  213. },
  214. input: '',
  215. content: '切换单个/多个查询模式',
  216. selected: true,
  217. advancedQueryStatus: false,
  218. advancedQueryText: '高级查询',
  219. formInline: {
  220. enterpriseId: '',
  221. username: '',
  222. rolo: '',
  223. phone: ''
  224. },
  225. tableData: [],
  226. pageTotal: 0,
  227. rowStyle: {
  228. background: '#f8f9fa',
  229. fontSize: '12px'
  230. },
  231. multipleSelection: [],
  232. currentPage: 1,
  233. pageSize: 10,
  234. batch: true,
  235. enterpriselist: [{
  236. name: '全部',
  237. id: ''
  238. }],
  239. zNodes: [],
  240. info: '',
  241. userRow: '',
  242. tenantId: ''
  243. };
  244. },
  245. computed: {},
  246. beforeCreate: function beforeCreate() {
  247. this.$store.commit('updateTenantId', 400);
  248. },
  249. created: function created() {
  250. this.info = JSON.parse(localStorage.getItem('info'));
  251. this.tenantId = JSON.parse(localStorage.getItem('tenantId'));
  252. this.getEnterprise();
  253. },
  254. mounted: function mounted() {},
  255. methods: {
  256. // 保存修改密码
  257. saveEdit: function saveEdit() {
  258. var _this = this;
  259. if (this.modifyfrom.confirmPassword == '' || this.modifyfrom.newPassword == '' || this.modifyfrom.oldPassword == '') {
  260. this.$message.error("请填写好信息");
  261. } else if (this.modifyfrom.confirmPassword != this.modifyfrom.newPassword) {
  262. this.$message.error("确认密码输入错误!");
  263. } else {
  264. var data = {
  265. userId: this.userRow.id,
  266. new: this.modifyfrom.newPassword,
  267. old: this.modifyfrom.oldPassword
  268. };
  269. Object(api["g" /* httpPost */])(data, this.$api.editPassword).then(function (res) {
  270. if (res.success) {
  271. _this.$message.success("修改成功!");
  272. _this.dialogVisible1 = false;
  273. } else {
  274. _this.$message.error("请输入正确的旧密码!");
  275. }
  276. });
  277. }
  278. },
  279. // 修改密码
  280. modifyPassword: function modifyPassword(index, row) {
  281. this.titleText = row.username;
  282. this.dialogVisible1 = true;
  283. this.userRow = row;
  284. this.modifyfrom = {
  285. oldPassword: '',
  286. newPassword: '',
  287. confirmPassword: ''
  288. };
  289. },
  290. // 判断字段是否有效
  291. paramsValidate: function paramsValidate(obj) {
  292. var array = {};
  293. for (var key in obj) {
  294. if (obj[key]) {
  295. array[key] = obj[key];
  296. }
  297. }
  298. return array;
  299. },
  300. // 搜索
  301. searchFun: function searchFun() {
  302. var _this2 = this;
  303. var formInline = this.formInline;
  304. var q = this.paramsValidate(formInline);
  305. var data = {
  306. pageNum: this.currentPage,
  307. pageSize: this.pageSize,
  308. q: stringify_default()(q)
  309. };
  310. Object(api["d" /* httpGet */])(data, this.$api.getUserList).then(function (res) {
  311. if (res.success) {
  312. res.data.list.map(function (li) {
  313. var obj = _this2.enterpriselist.find(function (x) {
  314. return x.id == li.enterpriseId;
  315. });
  316. if (obj) {
  317. li.enterpriseName = obj.name;
  318. } else {
  319. li.enterpriseName = '';
  320. }
  321. });
  322. _this2.tableData = res.data.list;
  323. _this2.pageTotal = res.data.total;
  324. } else {
  325. _this2.$message.error("获取失败");
  326. }
  327. });
  328. },
  329. // 重置搜索
  330. reset: function reset() {
  331. this.formInline = {
  332. enterpriseId: '',
  333. username: '',
  334. rolo: '',
  335. phone: ''
  336. };
  337. },
  338. // 删除用户操作
  339. handleDelete: function handleDelete(index, row) {
  340. var _this3 = this;
  341. // 二次确认删除
  342. this.$confirm("确定要删除吗?", "提示", {
  343. type: "warning"
  344. }).then(function () {
  345. var data = [row.id];
  346. Object(api["g" /* httpPost */])(data, _this3.$api.deleteUser).then(function (res) {
  347. if (res.success) {
  348. _this3.$message.success("删除成功");
  349. _this3.getUserList();
  350. } else {
  351. _this3.$message.error("删除失败");
  352. }
  353. });
  354. }).catch(function () {});
  355. },
  356. // 人员
  357. addEnterprise: function addEnterprise() {
  358. var _this4 = this;
  359. var form = this.form;
  360. if (form.region == "") {
  361. this.$message.error("请选择所属单位");
  362. } else if (form.phone == "" || form.password == "" || form.personname == "") {
  363. this.$message.error("请填写完整信息");
  364. } else {
  365. var enterpriseName = '';
  366. this.enterpriselist.map(function (li) {
  367. if (li.id == form.region) {
  368. enterpriseName = li.name;
  369. }
  370. });
  371. var addform = {
  372. username: form.personname,
  373. phone: form.phone,
  374. password: form.password,
  375. enterpriseName: enterpriseName,
  376. userType: 1,
  377. tenantId: this.tenantId,
  378. enterpriseId: form.region
  379. };
  380. Object(api["g" /* httpPost */])(addform, this.$api.addUser).then(function (res1) {
  381. if (res1.success) {
  382. _this4.$message.success("创建成功");
  383. _this4.dialogVisible = false;
  384. _this4.getUserList();
  385. } else {
  386. _this4.$message.error("添加失败");
  387. _this4.dialogVisible = false;
  388. }
  389. });
  390. }
  391. },
  392. // 获取单位
  393. getEnterprise: function getEnterprise() {
  394. var _this5 = this;
  395. var data = {
  396. q: stringify_default()({
  397. name: this.formInline.name
  398. })
  399. };
  400. Object(api["d" /* httpGet */])(data, this.$api.getEnterprise).then(function (res) {
  401. if (res.success) {
  402. _this5.enterpriselist = res.data.list;
  403. _this5.zNodes = [];
  404. _this5.zNodes = Object(utils["p" /* ztreeToElementTree */])(res.data.list, {});
  405. _this5.getUserList();
  406. } else {
  407. _this5.$message.error("获取失败");
  408. }
  409. });
  410. },
  411. // 获取用户列表
  412. getUserList: function getUserList() {
  413. var _this6 = this;
  414. var data = {
  415. pageNum: this.currentPage,
  416. pageSize: this.pageSize,
  417. q: stringify_default()({
  418. enterpriseId: this.enterpriseId
  419. })
  420. };
  421. Object(api["d" /* httpGet */])(data, this.$api.getUserList).then(function (res) {
  422. if (res.success) {
  423. res.data.list.map(function (li) {
  424. var obj = _this6.enterpriselist.find(function (x) {
  425. return x.id == li.enterpriseId;
  426. });
  427. if (obj) {
  428. li.enterpriseName = obj.name;
  429. } else {
  430. li.enterpriseName = '';
  431. }
  432. });
  433. _this6.tableData = res.data.list;
  434. _this6.pageTotal = res.data.total;
  435. } else {
  436. _this6.$message.error("获取失败");
  437. }
  438. });
  439. },
  440. // 未处理记录打开
  441. recordFun: function recordFun() {
  442. this.dialogVisible1 = true;
  443. },
  444. // 未处理记录处理关闭
  445. handleClose1: function handleClose1(done) {
  446. done();
  447. },
  448. // 批量处理关闭
  449. handleClose: function handleClose(done) {
  450. done();
  451. },
  452. // 批量处理
  453. batchProcessing: function batchProcessing() {
  454. this.dialogVisible = true;
  455. },
  456. // 分页
  457. handleSizeChange: function handleSizeChange(val) {
  458. console.log("\u6BCF\u9875 " + val + " \u6761");
  459. this.pageSize = val;
  460. this.searchFun();
  461. },
  462. handleCurrentChange: function handleCurrentChange(val) {
  463. console.log("\u5F53\u524D\u9875: " + val);
  464. this.currentPage = val;
  465. this.searchFun();
  466. },
  467. // 表头样式
  468. rowClass: function rowClass(_ref) {
  469. var row = _ref.row,
  470. rowIndex = _ref.rowIndex;
  471. return "background:#f8f9fa;color:#333;font-blod:none;font-size:12px;";
  472. },
  473. // 表格勾选
  474. handleSelectionChange: function handleSelectionChange(val) {
  475. if (val.length > 0) {
  476. this.batch = false;
  477. } else {
  478. this.batch = true;
  479. }
  480. },
  481. // 高级查询显示
  482. advancedQueryFun: function advancedQueryFun() {
  483. if (this.advancedQueryStatus) {
  484. this.advancedQueryText = "高级查询";
  485. this.advancedQueryStatus = false;
  486. } else {
  487. this.advancedQueryText = "同用查询";
  488. this.advancedQueryStatus = true;
  489. }
  490. },
  491. // 批量处理备注监控
  492. textareaFun: function textareaFun(e) {
  493. this.textarea = e;
  494. },
  495. // 输入监控
  496. InputFun: function InputFun(e) {
  497. console.log(e);
  498. },
  499. // 单个/多个查询切换
  500. switchFun: function switchFun() {
  501. this.selected = !this.selected;
  502. }
  503. }
  504. });
  505. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-04c0b5e1","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/doorMagnetism/userManagementHouse.vue
  506. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{"id":"container"}},[_c('div',{staticClass:"alarmrecord"},[_c('el-card',{staticClass:"box-card"},[_c('el-row',{},[_c('div',{staticClass:"search"},[_c('el-form',{staticClass:"demo-form-inline",attrs:{"inline":true,"model":_vm.formInline}},[_c('el-form-item',{attrs:{"label":"用户名称:"}},[_c('el-input',{attrs:{"placeholder":"请输入用户名称","size":"small","clearable":true},model:{value:(_vm.formInline.username),callback:function ($$v) {_vm.$set(_vm.formInline, "username", $$v)},expression:"formInline.username"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"手机号:"}},[_c('el-input',{attrs:{"placeholder":"请输入用户手机号","size":"small","clearable":true},model:{value:(_vm.formInline.phone),callback:function ($$v) {_vm.$set(_vm.formInline, "phone", $$v)},expression:"formInline.phone"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"角色:"}},[_c('el-input',{attrs:{"placeholder":"请选择角色","size":"small","clearable":true},model:{value:(_vm.formInline.rolo),callback:function ($$v) {_vm.$set(_vm.formInline, "rolo", $$v)},expression:"formInline.rolo"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"所属单位:"}},[_c('el-select',{staticClass:"w200",attrs:{"size":"small","placeholder":"请选择活动区域","clearable":""},model:{value:(_vm.formInline.enterpriseId),callback:function ($$v) {_vm.$set(_vm.formInline, "enterpriseId", $$v)},expression:"formInline.enterpriseId"}},_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',[_c('el-button',{attrs:{"type":"default","size":"small"},on:{"click":_vm.reset}},[_vm._v("重置")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"small"},on:{"click":_vm.searchFun}},[_vm._v("查询")])],1)],1)],1)]),_vm._v(" "),_c('el-row',{staticClass:"marginTop"},[_c('div',{staticClass:"tablecell"},[_c('el-row',{staticClass:"floatRight"},[_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":_vm.batchProcessing}},[_vm._v("新增")])],1),_vm._v(" "),_c('el-table',{ref:"multipleTable",staticStyle:{"width":"100%"},attrs:{"data":_vm.tableData,"border":true,"tooltip-effect":"dark","header-cell-style":_vm.rowClass,"cell-style":{fontSize:'12px'},"stripe":"","height":"590"},on:{"selection-change":_vm.handleSelectionChange}},[_c('el-table-column',{attrs:{"type":"index","width":"50","label":"序号"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"username","label":"用户姓名","width":"120"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"enterpriseName","label":"所属单位","width":"120"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"phone","label":"手机号","show-overflow-tooltip":""}}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"操作","width":"300"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('el-button',{attrs:{"type":"default","size":"mini","disabled":_vm.info.enterpriseId==scope.row.id?true:false},on:{"click":function($event){return _vm.modifyPassword(scope.$index, scope.row)}}},[_vm._v("密码")]),_vm._v(" "),_c('el-button',{attrs:{"type":"danger","size":"mini","disabled":_vm.info.enterpriseId==scope.row.id?true:false},on:{"click":function($event){return _vm.handleDelete(scope.$index, scope.row)}}},[_vm._v("删除")])]}}])})],1)],1),_vm._v(" "),_c('div',{staticClass:"page"},[_c('el-pagination',{attrs:{"current-page":_vm.currentPage,"page-sizes":[10, 20, 100, 400],"page-size":_vm.pageSize,"layout":"total, sizes, prev, pager, next, jumper","total":_vm.pageTotal},on:{"size-change":_vm.handleSizeChange,"current-change":_vm.handleCurrentChange}})],1)])],1),_vm._v(" "),_c('el-dialog',{attrs:{"title":"添加人员","visible":_vm.dialogVisible,"width":"30%","before-close":_vm.handleClose},on:{"update:visible":function($event){_vm.dialogVisible=$event}}},[_c('el-form',{ref:"form",attrs:{"model":_vm.form,"label-width":"120px","inline":true,"rules":_vm.rules}},[_c('el-for
  507. var staticRenderFns = []
  508. var esExports = { render: render, staticRenderFns: staticRenderFns }
  509. /* harmony default export */ var doorMagnetism_userManagementHouse = (esExports);
  510. // CONCATENATED MODULE: ./src/views/doorMagnetism/userManagementHouse.vue
  511. function injectStyle (ssrContext) {
  512. __webpack_require__("hPw6")
  513. }
  514. var normalizeComponent = __webpack_require__("VU/8")
  515. /* script */
  516. /* template */
  517. /* template functional */
  518. var __vue_template_functional__ = false
  519. /* styles */
  520. var __vue_styles__ = injectStyle
  521. /* scopeId */
  522. var __vue_scopeId__ = "data-v-04c0b5e1"
  523. /* moduleIdentifier (server only) */
  524. var __vue_module_identifier__ = null
  525. var Component = normalizeComponent(
  526. userManagementHouse,
  527. doorMagnetism_userManagementHouse,
  528. __vue_template_functional__,
  529. __vue_styles__,
  530. __vue_scopeId__,
  531. __vue_module_identifier__
  532. )
  533. /* harmony default export */ var views_doorMagnetism_userManagementHouse = __webpack_exports__["default"] = (Component.exports);
  534. /***/ })
  535. });