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

637 lines
22 KiB

  1. webpackJsonp([68],{
  2. /***/ "5LPq":
  3. /***/ (function(module, exports) {
  4. // removed by extract-text-webpack-plugin
  5. /***/ }),
  6. /***/ "sW1j":
  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/helpers/defineProperty.js
  11. var defineProperty = __webpack_require__("bOdI");
  12. var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
  13. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/json/stringify.js
  14. var stringify = __webpack_require__("mvHQ");
  15. var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);
  16. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/object/keys.js
  17. var keys = __webpack_require__("fZjL");
  18. var keys_default = /*#__PURE__*/__webpack_require__.n(keys);
  19. // EXTERNAL MODULE: ./src/api/index.js + 5 modules
  20. var api = __webpack_require__("gyMJ");
  21. // EXTERNAL MODULE: ./src/utils/index.js
  22. var utils = __webpack_require__("0xDb");
  23. // EXTERNAL MODULE: ./src/views/doorMagnetism/common/map.vue + 2 modules
  24. var map = __webpack_require__("xMD2");
  25. // EXTERNAL MODULE: ./src/utils/util.js
  26. var util = __webpack_require__("oFuF");
  27. // EXTERNAL MODULE: ./node_modules/moment/moment.js
  28. var moment = __webpack_require__("PJh5");
  29. var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
  30. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/doorMagnetism/Linkman.vue
  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. /* harmony default export */ var Linkman = (defineProperty_default()({
  167. name: "alarmRecord",
  168. data: function data() {
  169. return {
  170. modeList: [{
  171. name: '短信',
  172. id: 'toSms'
  173. }, {
  174. name: '公众号',
  175. id: 'toWechat'
  176. }, {
  177. name: '电话',
  178. id: 'toVoice'
  179. }],
  180. pageTotal: 0,
  181. rules: {
  182. region: [{
  183. required: true,
  184. message: '请选择所属单位',
  185. trigger: 'blur'
  186. }],
  187. phone: [{
  188. required: true,
  189. message: '请输入电话',
  190. trigger: 'blur'
  191. }],
  192. name: [{
  193. required: true,
  194. message: '请输入名称',
  195. trigger: 'blur'
  196. }]
  197. },
  198. dialogVisible2: false,
  199. titleText: '设备未处理报警记录(IMEI:860709056256857)',
  200. textarea: '', //批量处理备注
  201. dialogVisible: false,
  202. dialogVisible1: false,
  203. input: '',
  204. content: '切换单个/多个查询模式',
  205. selected: true,
  206. advancedQueryStatus: false,
  207. advancedQueryText: '高级查询',
  208. formInline: {
  209. phone: '',
  210. name: '',
  211. toSms: false,
  212. toVoice: false,
  213. toWechat: false,
  214. enterpriseId: ''
  215. },
  216. tableData: [],
  217. rowStyle: {
  218. background: '#f8f9fa',
  219. fontSize: '12px'
  220. },
  221. multipleSelection: [],
  222. enterpriselist: [],
  223. formRoom: {
  224. name: '',
  225. phone: '',
  226. region: '',
  227. toWechat: false,
  228. toVoice: false,
  229. toSms: false
  230. },
  231. form1: {
  232. address: '',
  233. province: '',
  234. city: '',
  235. latitude: 0, // 纬度
  236. longitude: 0, // 经度
  237. district: ''
  238. },
  239. currentPage: 1,
  240. currentPage1: 1,
  241. pageSize: 10,
  242. pageTotal1: 0,
  243. batch: true,
  244. zNodes: [],
  245. modifyRow: '',
  246. modifyStatus: false,
  247. deviceList: [],
  248. devicerow: '',
  249. userInfo: {
  250. type: ''
  251. }
  252. };
  253. },
  254. components: {
  255. Map: map["a" /* default */]
  256. },
  257. computed: {},
  258. created: function created() {
  259. this.userInfo = JSON.parse(localStorage.getItem('info'));
  260. this.getEnterprise();
  261. this.getlist();
  262. },
  263. mounted: function mounted() {},
  264. methods: {
  265. checkNodeRecordTop: function checkNodeRecordTop(e) {
  266. this.formInline.enterpriseId = e[e.length - 1];
  267. },
  268. checkNodeRecord: function checkNodeRecord(e) {
  269. this.formRoom.region = e[e.length - 1];
  270. },
  271. InputFun: function InputFun(e) {
  272. if (e == 'toSms') {
  273. this.formInline['toSms'] = true;
  274. this.formInline['toVoice'] = false;
  275. this.formInline['toWechat'] = false;
  276. } else if (e == 'toVoice') {
  277. this.formInline['toSms'] = false;
  278. this.formInline['toVoice'] = true;
  279. this.formInline['toWechat'] = false;
  280. } else if (e == 'toWechat') {
  281. this.formInline['toSms'] = false;
  282. this.formInline['toVoice'] = false;
  283. this.formInline['toWechat'] = true;
  284. }
  285. },
  286. modifswitch: function modifswitch(index, row) {
  287. var _this = this;
  288. this.$confirm('是否确认修改?', '提示').then(function (_) {
  289. var data = {
  290. list: [{
  291. id: row.id,
  292. phone: row.phone,
  293. enterpriseId: row.enterpriseId,
  294. name: row.name,
  295. toSms: row.toSms || false,
  296. toVoice: row.toVoice || false,
  297. toWechat: row.toWechat || false
  298. }]
  299. };
  300. if (row.name == "") {
  301. _this.$message.error("名称不能为空");
  302. } else if (row.phone == "") {
  303. _this.$message.error("手机号不能为空");
  304. } else {
  305. Object(api["g" /* httpPost */])(data, _this.$api.updateAlarm).then(function (res) {
  306. if (res.success) {
  307. _this.$message.success("修改成功");
  308. _this.getlist();
  309. } else {
  310. _this.$message.error("修改失败");
  311. }
  312. });
  313. }
  314. }).catch(function (_) {
  315. _this.getlist();
  316. });
  317. },
  318. deleteAlarm: function deleteAlarm(index, row) {
  319. var _this2 = this;
  320. var data = {
  321. ids: [row.id]
  322. };
  323. Object(api["g" /* httpPost */])(data, this.$api.deleteAlarm).then(function (res) {
  324. if (res.success) {
  325. _this2.$message.success("删除成功");
  326. _this2.getlist();
  327. } else {
  328. _this2.$message.error("删除失败");
  329. }
  330. });
  331. },
  332. reset: function reset() {
  333. var formInline = {
  334. region: '',
  335. name: '',
  336. phone: '',
  337. mode: ''
  338. };
  339. this.formInline = formInline;
  340. },
  341. // 修改房源
  342. modifyRoom: function modifyRoom(index, row) {
  343. var formRoom = {
  344. name: row.name,
  345. phone: row.phone,
  346. region: row.enterpriseId,
  347. toSms: row.toSms,
  348. toVoice: row.toVoice,
  349. toWechat: row.toWechat
  350. };
  351. this.formRoom = formRoom;
  352. this.modifyRow = row;
  353. this.dialogVisible = true;
  354. this.modifyStatus = true;
  355. },
  356. updateRoom: function updateRoom() {
  357. var _this3 = this;
  358. var formRoom = this.formRoom;
  359. var data = {
  360. list: [{
  361. id: this.modifyRow.id,
  362. phone: formRoom.phone,
  363. enterpriseId: formRoom.region,
  364. name: formRoom.name,
  365. toSms: formRoom.toSms,
  366. toVoice: formRoom.toVoice,
  367. toWechat: formRoom.toWechat
  368. }]
  369. };
  370. if (formRoom.name == "") {
  371. this.$message.error("名称不能为空");
  372. } else if (formRoom.phone == "") {
  373. this.$message.error("手机号不能为空");
  374. } else {
  375. Object(api["g" /* httpPost */])(data, this.$api.updateAlarm).then(function (res) {
  376. if (res.success) {
  377. _this3.$message.success("修改成功");
  378. _this3.dialogVisible = false;
  379. _this3.getlist();
  380. } else {
  381. _this3.$message.error("修改失败");
  382. }
  383. });
  384. }
  385. },
  386. // 创建人员
  387. saveEdit: function saveEdit() {
  388. var _this4 = this;
  389. var formRoom = this.formRoom;
  390. if (formRoom.name == "") {
  391. this.$message.error("姓名不能为空");
  392. } else if (formRoom.phone == "") {
  393. this.$message.error("手机号不能为空");
  394. } else {
  395. var data = {
  396. phone: formRoom.phone,
  397. enterpriseId: formRoom.region,
  398. name: formRoom.name,
  399. toSms: formRoom.toSms || false,
  400. toVoice: formRoom.toVoice || false,
  401. toWechat: formRoom.toWechat || false
  402. };
  403. Object(api["g" /* httpPost */])(data, this.$api.addAlarmUser).then(function (res) {
  404. if (res.success) {
  405. _this4.dialogVisible = false;
  406. _this4.getlist();
  407. _this4.$message.success("创建成功");
  408. } else {
  409. _this4.$message.error("创建失败");
  410. }
  411. });
  412. }
  413. },
  414. yz: function yz(obj) {
  415. var str = {};
  416. keys_default()(obj).forEach(function (key) {
  417. if (obj[key] != '' && key != 'mode') {
  418. str[key] = obj[key];
  419. }
  420. });
  421. return str;
  422. },
  423. // 获取列表
  424. getlist: function getlist() {
  425. var _this5 = this;
  426. var q = this.yz(this.formInline);
  427. var data = {
  428. q: stringify_default()(q),
  429. orderBy: "create_time desc",
  430. pageNum: this.currentPage,
  431. pageSize: this.pageSize
  432. };
  433. Object(api["d" /* httpGet */])(data, this.$api.getAlarmUser).then(function (res) {
  434. if (res.data.list.length > 0) {
  435. _this5.tableData = res.data.list;
  436. // this.tableData=res.data.list
  437. _this5.pageTotal = res.data.total;
  438. } else {
  439. _this5.tableData = [];
  440. _this5.pageTotal = 0;
  441. }
  442. });
  443. },
  444. openMap: function openMap() {
  445. if (this.form.longitude == 'undefined' && this.form.latitude == 'undefined') {
  446. this.$refs.map.open();
  447. } else {
  448. this.$refs.map.open(this.form1);
  449. }
  450. },
  451. updateLocation: function updateLocation(orgAddr, lon, lat, province, city, district) {
  452. this.form1 = {
  453. address: orgAddr,
  454. province: province,
  455. city: city,
  456. latitude: lat, // 纬度
  457. longitude: lon, // 经度
  458. district: district
  459. };
  460. },
  461. // 获取单位
  462. getEnterprise: function getEnterprise() {
  463. var _this6 = this;
  464. var data = {
  465. q: stringify_default()({
  466. name: this.formInline.name
  467. })
  468. };
  469. Object(api["d" /* httpGet */])(data, this.$api.getEnterprise).then(function (res) {
  470. if (res.success) {
  471. res.data.list.map(function (li) {
  472. li['pid'] = li.parentId;
  473. li['label'] = li.name;
  474. li['value'] = li.id;
  475. });
  476. _this6.zNodes = [];
  477. var array = util["a" /* default */].uniqueArray(res.data.list, "id");
  478. var roomlistZNodes = Object(utils["q" /* ztreeToElementTree2 */])(array, []);
  479. _this6.zNodes = roomlistZNodes;
  480. _this6.enterpriselist = roomlistZNodes;
  481. } else {
  482. _this6.$message.error("获取失败");
  483. }
  484. });
  485. },
  486. // 未处理记录打开
  487. recordFun: function recordFun() {
  488. this.dialogVisible1 = true;
  489. },
  490. // 未处理记录处理关闭
  491. handleClose1: function handleClose1(done) {
  492. done();
  493. },
  494. // 批量处理关闭
  495. handleClose: function handleClose(done) {
  496. done();
  497. this.modifyStatus = false;
  498. },
  499. // 批量处理
  500. batchProcessing: function batchProcessing() {
  501. this.dialogVisible = true;
  502. this.formRoom = {
  503. name: '',
  504. address: '',
  505. floorNum: '',
  506. region: ''
  507. };
  508. this.modifyStatus = false;
  509. },
  510. // 分页
  511. handleSizeChange: function handleSizeChange(val) {
  512. this.pageSize = val;
  513. this.getlist();
  514. console.log("\u6BCF\u9875 " + val + " \u6761");
  515. },
  516. handleCurrentChange: function handleCurrentChange(val) {
  517. this.currentPage = val;
  518. this.getlist();
  519. console.log("\u5F53\u524D\u9875: " + val);
  520. },
  521. // 表头样式
  522. rowClass: function rowClass(_ref) {
  523. var row = _ref.row,
  524. rowIndex = _ref.rowIndex;
  525. return "background:#f8f9fa;color:#333;font-blod:none;font-size:12px;";
  526. },
  527. // 表格勾选
  528. handleSelectionChange: function handleSelectionChange(val) {
  529. if (val.length > 0) {
  530. this.batch = false;
  531. } else {
  532. this.batch = true;
  533. }
  534. },
  535. // 高级查询显示
  536. advancedQueryFun: function advancedQueryFun() {
  537. if (this.advancedQueryStatus) {
  538. this.advancedQueryText = "高级查询";
  539. this.advancedQueryStatus = false;
  540. } else {
  541. this.advancedQueryText = "同用查询";
  542. this.advancedQueryStatus = true;
  543. }
  544. },
  545. // 批量处理备注监控
  546. textareaFun: function textareaFun(e) {
  547. this.textarea = e;
  548. },
  549. // 单个/多个查询切换
  550. switchFun: function switchFun() {
  551. this.selected = !this.selected;
  552. }
  553. }
  554. }, "mounted", function mounted() {}));
  555. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-476431c3","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/Linkman.vue
  556. 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}},[(_vm.userInfo.type==0)?_c('el-form-item',{attrs:{"label":""}},[_c('selectoption')],1):_vm._e(),_vm._v(" "),_c('el-form-item',{attrs:{"label":"单位名称:"}},[_c('el-cascader',{ref:"cascaderone",attrs:{"options":_vm.enterpriselist,"size":"small","placeholder":"请选择所属单位","props":{ checkStrictly: true },"clearable":""},on:{"change":_vm.checkNodeRecordTop},model:{value:(_vm.formInline.enterpriseId),callback:function ($$v) {_vm.$set(_vm.formInline, "enterpriseId", $$v)},expression:"formInline.enterpriseId"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"姓名:"}},[_c('el-input',{attrs:{"placeholder":"请输入联系人姓名","size":"small","clearable":true},model:{value:(_vm.formInline.name),callback:function ($$v) {_vm.$set(_vm.formInline, "name", $$v)},expression:"formInline.name"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"电话:"}},[_c('el-input',{attrs:{"type":"number","maxlength":"11","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-select',{staticClass:"w200",attrs:{"clearable":"","size":"small","placeholder":"请选择通知方式"},on:{"input":function($event){return _vm.InputFun($event)}},model:{value:(_vm.formInline.mode),callback:function ($$v) {_vm.$set(_vm.formInline, "mode", $$v)},expression:"formInline.mode"}},_vm._l((_vm.modeList),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:{"size":"mini"},on:{"click":_vm.reset}},[_vm._v("重置")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":_vm.getlist}},[_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,"row-key":"id","default-expand-all":true,"tree-props":{children: 'children', hasChildren: 'hasChildren'},"cell-style":{fontSize:'12px'},"stripe":"","height":"590"},on:{"selection-change":_vm.handleSelectionChange}},[_c('el-table-column',{attrs:{"type":"selection","width":"55"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"name","label":"姓名","width":"120"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"enterpriseName","label":"所属单位","show-overflow-tooltip":""}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"phone","label":"电话","show-overflow-tooltip":""}}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"通知方式","show-overflow-tooltip":""},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('el-switch',{attrs:{"inactive-text":"短信"},on:{"change":function($event){return _vm.modifswitch(scope.$index, scope.row)}},model:{value:(scope.row.toSms),callback:function ($$v) {_vm.$set(scope.row, "toSms", $$v)},expression:"scope.row.toSms"}}),_vm._v(" "),_c('el-switch',{attrs:{"inactive-text":"公众号"},on:{"change":function($event){return _vm.modifswitch(scope.$index, scope.row)}},model:{value:(scope.row.toWechat),callback:function ($$v) {_vm.$set(scope.row, "toWechat", $$v)},expression:"scope.row.toWechat"}}),_vm._v(" "),_c('el-switch',{attrs:{"inactive-text":"电话"},on:{"change":function($event){return _vm.modifswitch(scope.$index, scope.row)}},model:{value:(scope.row.toVoice),callback
  557. var staticRenderFns = []
  558. var esExports = { render: render, staticRenderFns: staticRenderFns }
  559. /* harmony default export */ var doorMagnetism_Linkman = (esExports);
  560. // CONCATENATED MODULE: ./src/views/doorMagnetism/Linkman.vue
  561. function injectStyle (ssrContext) {
  562. __webpack_require__("5LPq")
  563. }
  564. var normalizeComponent = __webpack_require__("VU/8")
  565. /* script */
  566. /* template */
  567. /* template functional */
  568. var __vue_template_functional__ = false
  569. /* styles */
  570. var __vue_styles__ = injectStyle
  571. /* scopeId */
  572. var __vue_scopeId__ = "data-v-476431c3"
  573. /* moduleIdentifier (server only) */
  574. var __vue_module_identifier__ = null
  575. var Component = normalizeComponent(
  576. Linkman,
  577. doorMagnetism_Linkman,
  578. __vue_template_functional__,
  579. __vue_styles__,
  580. __vue_scopeId__,
  581. __vue_module_identifier__
  582. )
  583. /* harmony default export */ var views_doorMagnetism_Linkman = __webpack_exports__["default"] = (Component.exports);
  584. /***/ })
  585. });