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

500 lines
17 KiB

  1. webpackJsonp([44],{
  2. /***/ "ZQgO":
  3. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4. "use strict";
  5. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  6. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/json/stringify.js
  7. var stringify = __webpack_require__("mvHQ");
  8. var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);
  9. // EXTERNAL MODULE: ./src/api/index.js + 5 modules
  10. var api = __webpack_require__("gyMJ");
  11. // EXTERNAL MODULE: ./src/utils/index.js
  12. var utils = __webpack_require__("0xDb");
  13. // EXTERNAL MODULE: ./node_modules/moment/moment.js
  14. var moment = __webpack_require__("PJh5");
  15. var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
  16. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/doorMagnetism/subordinateUnit.vue
  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. /* harmony default export */ var subordinateUnit = ({
  137. name: "alarmRecord",
  138. data: function data() {
  139. return {
  140. treeNodes: [],
  141. defaultProps: {
  142. children: 'children',
  143. label: 'label'
  144. },
  145. form1: {
  146. name: '',
  147. region: ''
  148. },
  149. dialogVisible1: false,
  150. rules: {
  151. region: [{
  152. required: true,
  153. message: '请选择上级单位',
  154. trigger: 'blur'
  155. }],
  156. name: [{
  157. required: true,
  158. message: '请输入单位名称',
  159. trigger: 'blur'
  160. }],
  161. personname: [{
  162. required: true,
  163. message: '请输入管理员姓名',
  164. trigger: 'blur'
  165. }],
  166. phone: [{
  167. required: true,
  168. message: '请输入管理员手机号',
  169. trigger: 'blur'
  170. }],
  171. password: [{
  172. required: true,
  173. message: '请输入管理员密码',
  174. trigger: 'blur'
  175. }]
  176. },
  177. form: {
  178. personname: '',
  179. password: '',
  180. name: '',
  181. region: '',
  182. phone: ''
  183. },
  184. dialogVisible: false,
  185. input: '',
  186. content: '切换单个/多个查询模式',
  187. selected: true,
  188. advancedQueryStatus: false,
  189. advancedQueryText: '高级查询',
  190. formInline: {
  191. region: '',
  192. name: ''
  193. },
  194. tableData: [],
  195. pageTotal: 0,
  196. rowStyle: {
  197. background: '#f8f9fa',
  198. fontSize: '12px'
  199. },
  200. multipleSelection: [],
  201. currentPage: 1,
  202. batch: true,
  203. enterpriselist: [{
  204. name: '全部',
  205. id: ''
  206. }],
  207. zNodes: [],
  208. info: {},
  209. modifyFrom: {},
  210. allNodes: [],
  211. SelectedList: [],
  212. sele: true
  213. };
  214. },
  215. computed: {},
  216. beforeCreate: function beforeCreate() {
  217. this.$store.commit('updateTenantId', 400);
  218. },
  219. created: function created() {
  220. this.info = JSON.parse(localStorage.getItem('info'));
  221. this.getEnterprise();
  222. this.getlist();
  223. },
  224. methods: {
  225. // 获取房间
  226. getlist: function getlist() {
  227. var _this = this;
  228. var data = {};
  229. Object(api["d" /* httpGet */])(data, this.$api.getPlaceList).then(function (res) {
  230. if (res.data.list.length > 0) {
  231. res.data.list.map(function (li) {
  232. li['disabled'] = true;
  233. });
  234. _this.allNodes = res.data.list;
  235. var arrdata = Object(utils["n" /* uniqueArray */])(res.data.list, "id");
  236. _this.treeNodes = Object(utils["p" /* ztreeToElementTree */])(arrdata, {});
  237. }
  238. });
  239. },
  240. modifyEnterFun: function modifyEnterFun() {
  241. var _this2 = this;
  242. var data = {
  243. list: [{
  244. enterpriseId: this.form1.region,
  245. id: this.form1.id,
  246. name: this.form1.name
  247. }]
  248. };
  249. Object(api["g" /* httpPost */])(data, this.$api.updateEnterprise).then(function (res) {
  250. if (res.success) {
  251. _this2.getEnterprise();
  252. _this2.dialogVisible1 = false;
  253. _this2.$message.success("修改成功");
  254. } else {
  255. _this2.$message.error("修改失败");
  256. }
  257. });
  258. },
  259. // 编辑单位
  260. modifyEnterprise: function modifyEnterprise(index, row) {
  261. this.dialogVisible1 = true;
  262. this.form1.region = row.parentId;
  263. this.form1.name = row.name;
  264. this.form1.id = row.id;
  265. this.modifyFrom = this.form1;
  266. this.getRoomEnterpriseId();
  267. },
  268. getRoomEnterpriseId: function getRoomEnterpriseId() {
  269. var _this3 = this;
  270. var SelectedList = [];
  271. this.allNodes.map(function (li) {
  272. if (li.enterpriseId == _this3.form1.id) {
  273. SelectedList.push(li.id);
  274. }
  275. });
  276. this.sele = false;
  277. this.$nextTick(function () {
  278. this.SelectedList = SelectedList;
  279. this.sele = true;
  280. });
  281. },
  282. // 删除单位
  283. remove: function remove(index, row) {
  284. var _this4 = this;
  285. var list = [];
  286. list.push(row);
  287. var data = Object(utils["j" /* recursion */])(list);
  288. this.$confirm("确定要删除吗?", "提示", {
  289. type: "warning"
  290. }).then(function () {
  291. Object(api["g" /* httpPost */])(data, _this4.$api.deleteEnterprise).then(function (res) {
  292. if (res.success) {
  293. _this4.getEnterprise();
  294. _this4.$message.success("删除成功");
  295. } else {
  296. _this4.getEnterprise();
  297. _this4.$message.error("删除失败");
  298. }
  299. });
  300. });
  301. },
  302. // 获取单位
  303. getEnterprise: function getEnterprise() {
  304. var _this5 = this;
  305. var data = {
  306. q: stringify_default()({
  307. name: this.formInline.name,
  308. enterpriseId: this.formInline.region
  309. })
  310. };
  311. Object(api["d" /* httpGet */])(data, this.$api.getEnterprise).then(function (res) {
  312. var enterpriselist = [];
  313. if (res.data.list.length > 0) {
  314. _this5.enterpriseId = res.data.list[0].id;
  315. }
  316. res.data.list.map(function (li) {
  317. li.pid = li.parentId;
  318. li.createTime = moment_default()(li.createTime).format('YYYY/MM/DD HH:MM:SS');
  319. if (_this5.info.enterpriseId == li.id) {
  320. enterpriselist.push(li);
  321. }
  322. });
  323. _this5.enterpriselist = enterpriselist;
  324. _this5.Enterprise = res.data.list;
  325. _this5.zNodes = [];
  326. _this5.zNodes = Object(utils["p" /* ztreeToElementTree */])(res.data.list, {}); //res.data.list;
  327. _this5.pageTotal = res.data.total;
  328. });
  329. },
  330. // 创建单位
  331. addEnterprise: function addEnterprise() {
  332. var _this6 = this;
  333. var form = this.form;
  334. if (form.region == "") {
  335. this.$message.error("请选择上级单位");
  336. } else if (form.name == "" || form.phone == "" || form.password == "" || form.personname == "") {
  337. this.$message.error("请填写完整信息");
  338. } else {
  339. var data = {
  340. name: form.name,
  341. parentId: form.region
  342. };
  343. Object(api["g" /* httpPost */])(data, this.$api.addEnterprise).then(function (res) {
  344. if (res.success) {
  345. var addform = {
  346. username: form.personname,
  347. phone: form.phone,
  348. password: form.password,
  349. enterpriseName: form.name,
  350. userType: 1,
  351. enterpriseId: res.data
  352. };
  353. Object(api["g" /* httpPost */])(addform, _this6.$api.addUser).then(function (res1) {
  354. if (res1.success) {
  355. _this6.$message.success("创建成功");
  356. _this6.dialogVisible = false;
  357. } else {
  358. _this6.$message.error("添加失败");
  359. _this6.dialogVisible = false;
  360. }
  361. });
  362. } else {
  363. _this6.$message.error("添加失败");
  364. _this6.dialogVisible = false;
  365. }
  366. });
  367. }
  368. },
  369. // 未处理记录处理关闭
  370. handleClose1: function handleClose1(done) {
  371. done();
  372. },
  373. // 批量处理关闭
  374. handleClose: function handleClose(done) {
  375. done();
  376. },
  377. // 添加下级单位弹窗显示
  378. batchProcessing: function batchProcessing() {
  379. this.dialogVisible = true;
  380. },
  381. // 分页
  382. handleSizeChange: function handleSizeChange(val) {
  383. console.log("\u6BCF\u9875 " + val + " \u6761");
  384. },
  385. handleCurrentChange: function handleCurrentChange(val) {
  386. console.log("\u5F53\u524D\u9875: " + val);
  387. },
  388. // 表头样式
  389. rowClass: function rowClass(_ref) {
  390. var row = _ref.row,
  391. rowIndex = _ref.rowIndex;
  392. return "background:#f8f9fa;color:#333;font-blod:none;font-size:12px;";
  393. },
  394. // 表格勾选
  395. handleSelectionChange: function handleSelectionChange(val) {
  396. if (val.length > 0) {
  397. this.batch = false;
  398. } else {
  399. this.batch = true;
  400. }
  401. },
  402. // 高级查询显示
  403. advancedQueryFun: function advancedQueryFun() {
  404. if (this.advancedQueryStatus) {
  405. this.advancedQueryText = "高级查询";
  406. this.advancedQueryStatus = false;
  407. } else {
  408. this.advancedQueryText = "同用查询";
  409. this.advancedQueryStatus = true;
  410. }
  411. },
  412. // 输入监控
  413. InputFun: function InputFun(e) {
  414. console.log(e);
  415. },
  416. // 单个/多个查询切换
  417. switchFun: function switchFun() {
  418. this.selected = !this.selected;
  419. }
  420. },
  421. mounted: function mounted() {}
  422. });
  423. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-8f80ac8a","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/subordinateUnit.vue
  424. 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',[_c('el-select',{attrs:{"size":"middle","placeholder":"单位名称","clearable":""},model:{value:(_vm.formInline.region),callback:function ($$v) {_vm.$set(_vm.formInline, "region", $$v)},expression:"formInline.region"}},_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-input',{attrs:{"clearable":true,"placeholder":"请输入单位名称","size":"middle"},model:{value:(_vm.formInline.name),callback:function ($$v) {_vm.$set(_vm.formInline, "name", $$v)},expression:"formInline.name"}})],1),_vm._v(" "),_c('el-form-item',[_c('el-button',{attrs:{"type":"primary","size":"middle"},on:{"click":_vm.getEnterprise}},[_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.zNodes,"border":true,"tooltip-effect":"dark","lazy":true,"header-cell-style":_vm.rowClass,"cell-style":{fontSize:'12px'},"stripe":"","height":"590","row-key":"id","default-expand-all":true,"tree-props":{children: 'children', hasChildren: 'hasChildren'}},on:{"selection-change":_vm.handleSelectionChange}},[_c('el-table-column',{attrs:{"prop":"name","label":"单位名称","width":"120"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"createTime","label":"创建时间","show-overflow-tooltip":""}}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"操作","width":"380"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('el-button',{attrs:{"type":"primary","size":"mini","disabled":_vm.info.enterpriseId==scope.row.id?true:false},on:{"click":function($event){return _vm.modifyEnterprise(scope.$index, scope.row)}}},[_vm._v("管理员\n\t\t\t\t\t\t\t\t")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":function($event){return _vm.modifyEnterprise(scope.$index, scope.row)}}},[_vm._v("编辑\n\t\t\t\t\t\t\t\t")]),_vm._v(" "),_c('el-button',{attrs:{"type":"danger","size":"mini"},on:{"click":function($event){return _vm.remove(scope.$index, scope.row)}}},[_vm._v("删除\n\t\t\t\t\t\t\t\t")])]}}])})],1)],1),_vm._v(" "),_c('div',{staticClass:"page"},[_c('el-pagination',{attrs:{"current-page":_vm.currentPage,"page-sizes":[10, 20, 100, 400],"page-size":10,"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":"40%","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-form-item',{attrs:{"label":"上级单位","prop":"region"}},[_c('el-select',{staticClass:"w200",attrs:{"placeholder":"请选择"},model:{value:(_vm.form.region),callback:function ($$v) {_vm.$set(_vm.form, "region", $$v)},expression:"form.region"}},_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":"name"}},[_c('el-input',{staticClass:"w200",attrs:{"clearable":true},model:{value:(_vm.form.name),callback:function ($$v) {_vm.$set(_vm.form, "name", $$v)},expression:"form.name"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"管理员姓名","prop":"personname"}},[_c('el-input
  425. var staticRenderFns = []
  426. var esExports = { render: render, staticRenderFns: staticRenderFns }
  427. /* harmony default export */ var doorMagnetism_subordinateUnit = (esExports);
  428. // CONCATENATED MODULE: ./src/views/doorMagnetism/subordinateUnit.vue
  429. function injectStyle (ssrContext) {
  430. __webpack_require__("crQ+")
  431. }
  432. var normalizeComponent = __webpack_require__("VU/8")
  433. /* script */
  434. /* template */
  435. /* template functional */
  436. var __vue_template_functional__ = false
  437. /* styles */
  438. var __vue_styles__ = injectStyle
  439. /* scopeId */
  440. var __vue_scopeId__ = "data-v-8f80ac8a"
  441. /* moduleIdentifier (server only) */
  442. var __vue_module_identifier__ = null
  443. var Component = normalizeComponent(
  444. subordinateUnit,
  445. doorMagnetism_subordinateUnit,
  446. __vue_template_functional__,
  447. __vue_styles__,
  448. __vue_scopeId__,
  449. __vue_module_identifier__
  450. )
  451. /* harmony default export */ var views_doorMagnetism_subordinateUnit = __webpack_exports__["default"] = (Component.exports);
  452. /***/ }),
  453. /***/ "crQ+":
  454. /***/ (function(module, exports) {
  455. // removed by extract-text-webpack-plugin
  456. /***/ })
  457. });