| | |
| | | @selection-change="handleSelectionChange" |
| | | max-height="240" |
| | | > |
| | | <el-table-column type="selection" width="55"> </el-table-column> |
| | | |
| | | <el-table-column prop="ind" label="序号" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="姓名" width="120"> |
| | | </el-table-column> |
| | | <el-table-column prop="phone" label="联系电话" width="120"> |
| | | <el-table-column type="selection" width="55" align="center"> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="code" label="编号" width="120"> |
| | | <el-table-column |
| | | prop="ind" |
| | | label="序号" |
| | | width="60" |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | label="姓名" |
| | | width="100" |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="phone" |
| | | label="联系电话" |
| | | width="120" |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="online_status" |
| | | label="在线状态" |
| | | width="120" |
| | | width="80" |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="site" label="地址" width="120"> |
| | | <el-table-column |
| | | prop="tenantName" |
| | | label="所属部门" |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="role" |
| | | prop="roleName" |
| | | label="所属角色" |
| | | width="120" |
| | | fixed="right" |
| | | width="100" |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | created() { |
| | | this.form = this.$route.query; |
| | | this.getReceivingAlarm(); |
| | | |
| | | }, |
| | | mounted() { |
| | | this.getList(); |
| | | }, |
| | | updated() { |
| | | var arr = []; |
| | | this.tableData.forEach((item) => { |
| | | if (item.roleName == "管理员") { |
| | | arr.push(item); |
| | | } |
| | | }); |
| | | this.toggleSelection(arr); |
| | | }, |
| | | methods: { |
| | | getDate() { |
| | |
| | | |
| | | getList() { |
| | | var that = this; |
| | | // .post("/api/blade-jfpts/alarm/alarm/queryBa", {}, {}) |
| | | axios |
| | | .post("/api/blade-jfpts/alarm/alarm/queryBa", {}, {}) |
| | | .get("/api/blade-user/page?current=1&size=9999&deptId=&work_status=") |
| | | .then(function (res) { |
| | | that.tableData = []; |
| | | console.log(res); |
| | | res.data.data.forEach((item, index) => { |
| | | that.tableData.push({ |
| | | ind: index + 1, |
| | | name: item.real_name, |
| | | phone: item.phone, |
| | | code: item.CODE, |
| | | }); |
| | | var i = 0; |
| | | res.data.data.records.forEach((item) => { |
| | | if (item.roleName == "处警员" || item.roleName == "管理员") { |
| | | that.tableData.push({ |
| | | ind: (i += 1), |
| | | name: item.name, |
| | | phone: item.phone, |
| | | online_status: item.online_status == 1 ? "在线" : "掉线", |
| | | roleName: item.roleName, |
| | | tenantName: item.tenantName, |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | handleSelectionChange(val) { |
| | | console.log(val); |
| | | this.multipleSelection = val; |
| | | }, |
| | | |
| | | toggleSelection(rows) { |
| | | if (rows) { |
| | | rows.forEach((row) => { |
| | | this.$refs.multipleTable.toggleRowSelection(row); |
| | | }); |
| | | } else { |
| | | this.$refs.multipleTable.clearSelection(); |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |