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

638 lines
22 KiB

webpackJsonp([68],{
/***/ "5LPq":
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
/***/ "sW1j":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
// EXTERNAL MODULE: ./node_modules/babel-runtime/helpers/defineProperty.js
var defineProperty = __webpack_require__("bOdI");
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
// EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/json/stringify.js
var stringify = __webpack_require__("mvHQ");
var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);
// EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/object/keys.js
var keys = __webpack_require__("fZjL");
var keys_default = /*#__PURE__*/__webpack_require__.n(keys);
// EXTERNAL MODULE: ./src/api/index.js + 5 modules
var api = __webpack_require__("gyMJ");
// EXTERNAL MODULE: ./src/utils/index.js
var utils = __webpack_require__("0xDb");
// EXTERNAL MODULE: ./src/views/doorMagnetism/common/map.vue + 2 modules
var map = __webpack_require__("xMD2");
// EXTERNAL MODULE: ./src/utils/util.js
var util = __webpack_require__("oFuF");
// EXTERNAL MODULE: ./node_modules/moment/moment.js
var moment = __webpack_require__("PJh5");
var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/doorMagnetism/Linkman.vue
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var Linkman = (defineProperty_default()({
name: "alarmRecord",
data: function data() {
return {
modeList: [{
name: '短信',
id: 'toSms'
}, {
name: '公众号',
id: 'toWechat'
}, {
name: '电话',
id: 'toVoice'
}],
pageTotal: 0,
rules: {
region: [{
required: true,
message: '请选择所属单位',
trigger: 'blur'
}],
phone: [{
required: true,
message: '请输入电话',
trigger: 'blur'
}],
name: [{
required: true,
message: '请输入名称',
trigger: 'blur'
}]
},
dialogVisible2: false,
titleText: '设备未处理报警记录(IMEI:860709056256857)',
textarea: '', //批量处理备注
dialogVisible: false,
dialogVisible1: false,
input: '',
content: '切换单个/多个查询模式',
selected: true,
advancedQueryStatus: false,
advancedQueryText: '高级查询',
formInline: {
phone: '',
name: '',
toSms: false,
toVoice: false,
toWechat: false,
enterpriseId: ''
},
tableData: [],
rowStyle: {
background: '#f8f9fa',
fontSize: '12px'
},
multipleSelection: [],
enterpriselist: [],
formRoom: {
name: '',
phone: '',
region: '',
toWechat: false,
toVoice: false,
toSms: false
},
form1: {
address: '',
province: '',
city: '',
latitude: 0, // 纬度
longitude: 0, // 经度
district: ''
},
currentPage: 1,
currentPage1: 1,
pageSize: 10,
pageTotal1: 0,
batch: true,
zNodes: [],
modifyRow: '',
modifyStatus: false,
deviceList: [],
devicerow: '',
userInfo: {
type: ''
}
};
},
components: {
Map: map["a" /* default */]
},
computed: {},
created: function created() {
this.userInfo = JSON.parse(localStorage.getItem('info'));
this.getEnterprise();
this.getlist();
},
mounted: function mounted() {},
methods: {
checkNodeRecordTop: function checkNodeRecordTop(e) {
this.formInline.enterpriseId = e[e.length - 1];
},
checkNodeRecord: function checkNodeRecord(e) {
this.formRoom.region = e[e.length - 1];
},
InputFun: function InputFun(e) {
if (e == 'toSms') {
this.formInline['toSms'] = true;
this.formInline['toVoice'] = false;
this.formInline['toWechat'] = false;
} else if (e == 'toVoice') {
this.formInline['toSms'] = false;
this.formInline['toVoice'] = true;
this.formInline['toWechat'] = false;
} else if (e == 'toWechat') {
this.formInline['toSms'] = false;
this.formInline['toVoice'] = false;
this.formInline['toWechat'] = true;
}
},
modifswitch: function modifswitch(index, row) {
var _this = this;
this.$confirm('是否确认修改?', '提示').then(function (_) {
var data = {
list: [{
id: row.id,
phone: row.phone,
enterpriseId: row.enterpriseId,
name: row.name,
toSms: row.toSms || false,
toVoice: row.toVoice || false,
toWechat: row.toWechat || false
}]
};
if (row.name == "") {
_this.$message.error("名称不能为空");
} else if (row.phone == "") {
_this.$message.error("手机号不能为空");
} else {
Object(api["g" /* httpPost */])(data, _this.$api.updateAlarm).then(function (res) {
if (res.success) {
_this.$message.success("修改成功");
_this.getlist();
} else {
_this.$message.error("修改失败");
}
});
}
}).catch(function (_) {
_this.getlist();
});
},
deleteAlarm: function deleteAlarm(index, row) {
var _this2 = this;
var data = {
ids: [row.id]
};
Object(api["g" /* httpPost */])(data, this.$api.deleteAlarm).then(function (res) {
if (res.success) {
_this2.$message.success("删除成功");
_this2.getlist();
} else {
_this2.$message.error("删除失败");
}
});
},
reset: function reset() {
var formInline = {
region: '',
name: '',
phone: '',
mode: ''
};
this.formInline = formInline;
},
// 修改房源
modifyRoom: function modifyRoom(index, row) {
var formRoom = {
name: row.name,
phone: row.phone,
region: row.enterpriseId,
toSms: row.toSms,
toVoice: row.toVoice,
toWechat: row.toWechat
};
this.formRoom = formRoom;
this.modifyRow = row;
this.dialogVisible = true;
this.modifyStatus = true;
},
updateRoom: function updateRoom() {
var _this3 = this;
var formRoom = this.formRoom;
var data = {
list: [{
id: this.modifyRow.id,
phone: formRoom.phone,
enterpriseId: formRoom.region,
name: formRoom.name,
toSms: formRoom.toSms,
toVoice: formRoom.toVoice,
toWechat: formRoom.toWechat
}]
};
if (formRoom.name == "") {
this.$message.error("名称不能为空");
} else if (formRoom.phone == "") {
this.$message.error("手机号不能为空");
} else {
Object(api["g" /* httpPost */])(data, this.$api.updateAlarm).then(function (res) {
if (res.success) {
_this3.$message.success("修改成功");
_this3.dialogVisible = false;
_this3.getlist();
} else {
_this3.$message.error("修改失败");
}
});
}
},
// 创建人员
saveEdit: function saveEdit() {
var _this4 = this;
var formRoom = this.formRoom;
if (formRoom.name == "") {
this.$message.error("姓名不能为空");
} else if (formRoom.phone == "") {
this.$message.error("手机号不能为空");
} else {
var data = {
phone: formRoom.phone,
enterpriseId: formRoom.region,
name: formRoom.name,
toSms: formRoom.toSms || false,
toVoice: formRoom.toVoice || false,
toWechat: formRoom.toWechat || false
};
Object(api["g" /* httpPost */])(data, this.$api.addAlarmUser).then(function (res) {
if (res.success) {
_this4.dialogVisible = false;
_this4.getlist();
_this4.$message.success("创建成功");
} else {
_this4.$message.error("创建失败");
}
});
}
},
yz: function yz(obj) {
var str = {};
keys_default()(obj).forEach(function (key) {
if (obj[key] != '' && key != 'mode') {
str[key] = obj[key];
}
});
return str;
},
// 获取列表
getlist: function getlist() {
var _this5 = this;
var q = this.yz(this.formInline);
var data = {
q: stringify_default()(q),
orderBy: "create_time desc",
pageNum: this.currentPage,
pageSize: this.pageSize
};
Object(api["d" /* httpGet */])(data, this.$api.getAlarmUser).then(function (res) {
if (res.data.list.length > 0) {
_this5.tableData = res.data.list;
// this.tableData=res.data.list
_this5.pageTotal = res.data.total;
} else {
_this5.tableData = [];
_this5.pageTotal = 0;
}
});
},
openMap: function openMap() {
if (this.form.longitude == 'undefined' && this.form.latitude == 'undefined') {
this.$refs.map.open();
} else {
this.$refs.map.open(this.form1);
}
},
updateLocation: function updateLocation(orgAddr, lon, lat, province, city, district) {
this.form1 = {
address: orgAddr,
province: province,
city: city,
latitude: lat, // 纬度
longitude: lon, // 经度
district: district
};
},
// 获取单位
getEnterprise: function getEnterprise() {
var _this6 = this;
var data = {
q: stringify_default()({
name: this.formInline.name
})
};
Object(api["d" /* httpGet */])(data, this.$api.getEnterprise).then(function (res) {
if (res.success) {
res.data.list.map(function (li) {
li['pid'] = li.parentId;
li['label'] = li.name;
li['value'] = li.id;
});
_this6.zNodes = [];
var array = util["a" /* default */].uniqueArray(res.data.list, "id");
var roomlistZNodes = Object(utils["q" /* ztreeToElementTree2 */])(array, []);
_this6.zNodes = roomlistZNodes;
_this6.enterpriselist = roomlistZNodes;
} else {
_this6.$message.error("获取失败");
}
});
},
// 未处理记录打开
recordFun: function recordFun() {
this.dialogVisible1 = true;
},
// 未处理记录处理关闭
handleClose1: function handleClose1(done) {
done();
},
// 批量处理关闭
handleClose: function handleClose(done) {
done();
this.modifyStatus = false;
},
// 批量处理
batchProcessing: function batchProcessing() {
this.dialogVisible = true;
this.formRoom = {
name: '',
address: '',
floorNum: '',
region: ''
};
this.modifyStatus = false;
},
// 分页
handleSizeChange: function handleSizeChange(val) {
this.pageSize = val;
this.getlist();
console.log("\u6BCF\u9875 " + val + " \u6761");
},
handleCurrentChange: function handleCurrentChange(val) {
this.currentPage = val;
this.getlist();
console.log("\u5F53\u524D\u9875: " + val);
},
// 表头样式
rowClass: function rowClass(_ref) {
var row = _ref.row,
rowIndex = _ref.rowIndex;
return "background:#f8f9fa;color:#333;font-blod:none;font-size:12px;";
},
// 表格勾选
handleSelectionChange: function handleSelectionChange(val) {
if (val.length > 0) {
this.batch = false;
} else {
this.batch = true;
}
},
// 高级查询显示
advancedQueryFun: function advancedQueryFun() {
if (this.advancedQueryStatus) {
this.advancedQueryText = "高级查询";
this.advancedQueryStatus = false;
} else {
this.advancedQueryText = "同用查询";
this.advancedQueryStatus = true;
}
},
// 批量处理备注监控
textareaFun: function textareaFun(e) {
this.textarea = e;
},
// 单个/多个查询切换
switchFun: function switchFun() {
this.selected = !this.selected;
}
}
}, "mounted", function mounted() {}));
// 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
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:function ($$v) {_vm.$set(scope.row, "toVoice", $$v)},expression:"scope.row.toVoice"}})]}}])}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"快捷操作","width":"340"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('el-button',{attrs:{"type":"primary","size":"mini"},on:{"click":function($event){return _vm.modifyRoom(scope.$index, scope.row)}}},[_vm._v("\n 编辑")]),_vm._v(" "),_c('el-button',{attrs:{"type":"danger","size":"mini"},on:{"click":function($event){return _vm.deleteAlarm(scope.$index, scope.row)}}},[_vm._v("\n 删除")])]}}])})],1)],1),_vm._v(" "),_c('div',{staticClass:"page"},[_c('el-pagination',{attrs:{"current-page":_vm.currentPage,"page-sizes":[10, 20, 30, 100],"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',{staticStyle:{"overflow":"hidden"},attrs:{"title":"添加","visible":_vm.dialogVisible2,"width":"60%","before-close":_vm.handleClose},on:{"update:visible":function($event){_vm.dialogVisible2=$event}}},[_c('Map',{ref:"map",on:{"close":function($event){return _vm.$refs.map.close()},"updateLocation":_vm.updateLocation}}),_vm._v(" "),_c('span',{staticClass:"dialog-footer",attrs:{"slot":"footer"},slot:"footer"},[_c('el-button',{on:{"click":function($event){_vm.dialogVisible2 = false}}},[_vm._v("取 消")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary"},on:{"click":function($event){_vm.dialogVisible2 = false}}},[_vm._v("提交")])],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.formRoom,"label-width":"120px","inline":true,"rules":_vm.rules}},[_c('el-form-item',{attrs:{"label":"姓名","prop":"name"}},[_c('el-input',{staticClass:"w200",attrs:{"clearable":true},model:{value:(_vm.formRoom.name),callback:function ($$v) {_vm.$set(_vm.formRoom, "name", $$v)},expression:"formRoom.name"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"接警电话","prop":"phone"}},[_c('el-input',{staticClass:"w200",attrs:{"clearable":true},model:{value:(_vm.formRoom.phone),callback:function ($$v) {_vm.$set(_vm.formRoom, "phone", $$v)},expression:"formRoom.phone"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"所属单位","prop":"region"}},[_c('el-cascader',{ref:"cascader",attrs:{"options":_vm.enterpriselist,"placeholder":"请选择所属单位","props":{ checkStrictly: true },"clearable":""},on:{"change":_vm.checkNodeRecord},model:{value:(_vm.formRoom.region),callback:function ($$v) {_vm.$set(_vm.formRoom, "region", $$v)},expression:"formRoom.region"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"通知方式:"}},[_c('el-switch',{attrs:{"inactive-text":"短信"},model:{value:(_vm.formRoom.toSms),callback:function ($$v) {_vm.$set(_vm.formRoom, "toSms", $$v)},expression:"formRoom.toSms"}}),_vm._v(" "),_c('el-switch',{attrs:{"inactive-text":"公众号"},model:{value:(_vm.formRoom.toWechat),callback:function ($$v) {_vm.$set(_vm.formRoom, "toWechat", $$v)},expression:"formRoom.toWechat"}}),_vm._v(" "),_c('el-switch',{attrs:{"inactive-text":"电话"},model:{value:(_vm.formRoom.toVoice),callback:function ($$v) {_vm.$set(_vm.formRoom, "toVoice", $$v)},expression:"formRoom.toVoice"}})],1)],1),_vm._v(" "),(_vm.modifyStatus)?_c('span',{staticClass:"dialog-footer",attrs:{"slot":"footer"},slot:"footer"},[_c('el-button',{on:{"click":function($event){_vm.dialogVisible = false}}},[_vm._v("取 消")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.updateRoom}},[_vm._v("修改")])],1):_c('span',{staticClass:"dialog-footer",attrs:{"slot":"footer"},slot:"footer"},[_c('el-button',{on:{"click":function($event){_vm.dialogVisible = false}}},[_vm._v("取 消")]),_vm._v(" "),_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.saveEdit}},[_vm._v("提交")])],1)],1)],1)])}
var staticRenderFns = []
var esExports = { render: render, staticRenderFns: staticRenderFns }
/* harmony default export */ var doorMagnetism_Linkman = (esExports);
// CONCATENATED MODULE: ./src/views/doorMagnetism/Linkman.vue
function injectStyle (ssrContext) {
__webpack_require__("5LPq")
}
var normalizeComponent = __webpack_require__("VU/8")
/* script */
/* template */
/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = injectStyle
/* scopeId */
var __vue_scopeId__ = "data-v-476431c3"
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
Linkman,
doorMagnetism_Linkman,
__vue_template_functional__,
__vue_styles__,
__vue_scopeId__,
__vue_module_identifier__
)
/* harmony default export */ var views_doorMagnetism_Linkman = __webpack_exports__["default"] = (Component.exports);
/***/ })
});