From 1b3277c4b8c2fb401a1df8c52d0a063f64f07022 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Wed, 13 Dec 2023 11:02:37 +0800
Subject: [PATCH] 固定岗、流动岗新增、保安员证信息添加派遣信息
---
src/api/check/postFiling.js | 12
public/index.html | 14
public/securityInfo.html | 342 ++++++++++++----------
public/img/register/bazbj3.png | 0
package.json | 1
src/views/check/mobileFiling.vue | 428 ++++++++++++++++++++++++++++
src/views/check/postFiling.vue | 100 ++++--
7 files changed, 698 insertions(+), 199 deletions(-)
diff --git a/package.json b/package.json
index ac5a9e8..39ec439 100644
--- a/package.json
+++ b/package.json
@@ -11,6 +11,7 @@
"test:e2e": "vue-cli-service test:e2e"
},
"dependencies": {
+ "avue-plugin-map": "^1.0.1",
"avue-plugin-ueditor": "^0.1.4",
"axios": "^0.18.0",
"babel-polyfill": "^6.26.0",
diff --git a/public/img/register/bazbj3.png b/public/img/register/bazbj3.png
new file mode 100644
index 0000000..6d9e7e3
--- /dev/null
+++ b/public/img/register/bazbj3.png
Binary files differ
diff --git a/public/index.html b/public/index.html
index 0e74fbe..74009d2 100644
--- a/public/index.html
+++ b/public/index.html
@@ -24,9 +24,19 @@
<script type="text/javascript" src="js/jquery.min.js"></script>
<script src="libs/Cesium/Cesium.js"></script>
<script type="text/javascript" src="js/drawTree.js"></script>
-
+
+ <!-- AvueMap-begin-->
+ <script>
+ window._AMapSecurityConfig = {
+ securityJsCode: '5c569caedb31676fc64da5be4c5e8cee',
+ }
+ </script>
+ <script type="text/javascript" src='https://webapi.amap.com/maps?v=1.4.11&key=fce315b8c816ec06755a523ccae9922d&plugin=AMap.PlaceSearch'></script>
+ <script src="https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>
+ <!-- AvueMap-end-->
+
<link rel="icon" href="<%= BASE_URL %>favicon.png">
-
+
<title>保安服务企业管理</title>
<style>
html,
diff --git a/public/securityInfo.html b/public/securityInfo.html
index 6ba1686..5f67cc9 100644
--- a/public/securityInfo.html
+++ b/public/securityInfo.html
@@ -3,175 +3,178 @@
<!-- 保安員信息 -->
<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <style>
- .securityInfo {
- color: #000;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- /* background-color: rgba(42, 66, 110, 0.8); */
- /* background: #0ED2F7; */
- /* fallback for old browsers */
- /* background: -webkit-linear-gradient(to left, #B2FEFA, #0ED2F7); */
- /* Chrome 10-25, Safari 5.1-6 */
- /* background: linear-gradient(to left, #B2FEFA, #0ED2F7); */
- /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
- width: 100%;
- height: 100%;
- }
-
- .top {
- width: 100%;
- margin-top: 15px;
- /* height: 224px; */
- /* background-color: aquamarine; */
- /* background: #0BB9C8; */
- /* fallback for old browsers */
- /* background: -webkit-linear-gradient(to left, #0BB9C8, #0cd9e7, #0cd9e7, #0BB9C8); */
- /* Chrome 10-25, Safari 5.1-6 */
- /* background: linear-gradient(to left, #0BB9C8, #0cd9e7, #0cd9e7, #0BB9C8); */
- /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- }
-
- .avatar {
- width: 98%;
- height: 140px;
- border-radius: 1px;
- }
-
- .avatar img {
- width: 100%;
- height: 100%;
- border-radius: 3px;
- }
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <style>
+ .securityInfo {
+ color: #000;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-direction: column;
+ /* background-color: rgba(42, 66, 110, 0.8); */
+ /* background: #0ED2F7; */
+ /* fallback for old browsers */
+ /* background: -webkit-linear-gradient(to left, #B2FEFA, #0ED2F7); */
+ /* Chrome 10-25, Safari 5.1-6 */
+ /* background: linear-gradient(to left, #B2FEFA, #0ED2F7); */
+ /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
+ width: 100%;
+ height: 100%;
+ }
- .avatar-1{
- position: absolute;
- right:1.8rem;
- top: 40.5rem;
- }
+ .top {
+ width: 100%;
+ margin-top: 15px;
+ /* height: 224px; */
+ /* background-color: aquamarine; */
+ /* background: #0BB9C8; */
+ /* fallback for old browsers */
+ /* background: -webkit-linear-gradient(to left, #0BB9C8, #0cd9e7, #0cd9e7, #0BB9C8); */
+ /* Chrome 10-25, Safari 5.1-6 */
+ /* background: linear-gradient(to left, #0BB9C8, #0cd9e7, #0cd9e7, #0BB9C8); */
+ /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-direction: column;
+ }
- .avatar-1 img{
- width: 7rem;
- }
-
- .realName {
- margin-top: 15px;
- font-size: 2rem;
- letter-spacing: 1px;
- color: #fff;
- }
-
- .content {
- /* margin: 5px 0; */
- /* padding: 5px; */
- width: 95%;
- /* background-color: rgba(65, 64, 66, 0.1); */
- /* border-radius: 5px; */
- display: flex;
- flex-direction: column;
- }
-
- .row-content {
- width: 100%;
- height: 3.2rem;
- /* background-color: seashell; */
- display: flex;
- align-items: center;
- /* justify-content: center; */
- color: #939393;
- margin: 0 auto;
- border-bottom: 1px solid rgba(220, 220, 220, 0.4);
- }
-
- .row-contents {
- width: 100%;
- height: 3.2rem;
- /* background-color: seashell; */
- display: flex;
- align-items: center;
- /* justify-content: center; */
- color: #939393;
- margin: 0 auto;
- }
+ .avatar {
+ width: 98%;
+ height: 140px;
+ border-radius: 1px;
+ }
- .row-contentss {
- width: 100%;
- height: 3.2rem;
- display: flex;
- align-items: center;
- color: #939393;
- margin-left: 1rem;
- font-weight: 550;
- font-size: 0.9rem;
- }
-
- .title {
- margin-left: 4%;
- display: inline-block;
- width: 30%;
- min-width: 80px;
- font-size: 0.9rem;
- font-weight: 550;
- }
-
-
- .content-data {
- position: absolute;
- right: 1.8rem;
- font-size: 0.95rem;
- }
- .content-data-red {
- color:red;
- }
+ .avatar img {
+ width: 100%;
+ height: 100%;
+ border-radius: 3px;
+ }
- </style>
- <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
- <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
+ .avatar-1 {
+ position: absolute;
+ right: 1.8rem;
+ top: 46.5rem;
+ }
+
+ .avatar-1 img {
+ width: 7rem;
+ }
+
+ .realName {
+ margin-top: 15px;
+ font-size: 2rem;
+ letter-spacing: 1px;
+ color: #fff;
+ }
+
+ .content {
+ /* margin: 5px 0; */
+ /* padding: 5px; */
+ width: 95%;
+ /* background-color: rgba(65, 64, 66, 0.1); */
+ /* border-radius: 5px; */
+ display: flex;
+ flex-direction: column;
+ }
+
+ .row-content {
+ width: 100%;
+ height: 3.2rem;
+ /* background-color: seashell; */
+ display: flex;
+ align-items: center;
+ /* justify-content: center; */
+ color: #939393;
+ margin: 0 auto;
+ border-bottom: 1px solid rgba(220, 220, 220, 0.4);
+ }
+
+ .row-contents {
+ width: 100%;
+ height: 3.2rem;
+ /* background-color: seashell; */
+ display: flex;
+ align-items: center;
+ /* justify-content: center; */
+ color: #939393;
+ margin: 0 auto;
+ }
+
+ .row-contentss {
+ width: 100%;
+ height: 3.2rem;
+ display: flex;
+ align-items: center;
+ color: #939393;
+ margin-left: 1rem;
+ font-weight: 550;
+ font-size: 0.9rem;
+ }
+
+ .title {
+ margin-left: 4%;
+ display: inline-block;
+ width: 30%;
+ min-width: 80px;
+ font-size: 0.9rem;
+ font-weight: 550;
+ }
+
+
+ .content-data {
+ position: absolute;
+ right: 1.8rem;
+ font-size: 0.95rem;
+ }
+
+ .content-data-red {
+ color: red;
+ }
+
+ </style>
+ <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
+ <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
</head>
<body>
- <div class="securityInfo">
- </div>
- <script>
- var getData = function(name) {
- var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
- var r = window.location.search.substr(1).match(reg);
- if (r != null) return decodeURI(r[2]);
- return null;
- };
- var securityNumber = getData("securityNumber");
+<div class="securityInfo">
+</div>
+<script>
+ var getData = function (name) {
+ var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
+ var r = window.location.search.substr(1).match(reg);
+ if (r != null) return decodeURI(r[2]);
+ return null;
+ };
+ var securityNumber = getData("securityNumber");
- axios.get('http://60.220.177.113:2081/api/qrCode/getUserInfo?securityNumber=' + securityNumber).then(function(res) {
- // axios.get('http://192.168.0.114:81/qrCode/getUserInfo?securityNumber=赣洪202115423').then(function(res) {
+ axios.get('http://60.220.177.113:2081/api/qrCode/getUserInfo?securityNumber=' + securityNumber).then(function (res) {
+ // axios.get('http://192.168.0.104:81/qrCode/getUserInfo?securityNumber=' + securityNumber).then(function(res) {
+ // axios.get('http://192.168.0.114:81/qrCode/getUserInfo?securityNumber=赣洪202115423').then(function(res) {
- var data = res.data;
- // console.log(data, 456);
- //计算生日
- var birthday = data.cardid.substring(6, 10) + "." + data.cardid.substring(10, 12) + "." + data.cardid.substring(12, 14);
+ var data = res.data;
+ // console.log(data, 456);
+ //计算生日
+ var birthday = data.cardid.substring(6, 10) + "." + data.cardid.substring(10, 12) + "." + data.cardid.substring(12, 14);
- //计算发证机关
- var fzjg = "";
- if (data.securitynumber.indexOf("赣") != -1) {
- fzjg = "晋城市公安局"
- }
+ //计算发证机关
+ var fzjg = "";
+ // if (data.securitynumber.indexOf("赣") != -1) {
+ // fzjg = "晋城市公安局"
+ // }
+ fzjg = "晋城市公安局"
- var classRed = ""
- //是否吊classRed销
- if(data.examinationType=="1"){
- classRed = "content-data-red";
- data.securitynumber = "已吊销";
- }
- var str = `<div class="top">
+ var classRed = ""
+ //是否吊classRed销
+ if (data.examinationType == "1") {
+ classRed = "content-data-red";
+ data.securitynumber = "已吊销";
+ }
+ var str = `<div class="top">
<div class="avatar">
<img src="img/securityInfo/security.png">
</div>
@@ -216,6 +219,21 @@
<span class="content-data"> ${data.deptName}</span>
</div>
+ <div class="row-content">
+ <span class="title">派遣单位:</span>
+ <span class="content-data"> ${data.dispatchUnitName}</span>
+ </div>
+
+ <div class="row-content">
+ <span class="title">派遣开始时间:</span>
+ <span class="content-data"> ${data.dispatchStartTime}</span>
+ </div>
+
+ <div class="row-content">
+ <span class="title">派遣结束时间:</span>
+ <span class="content-data"> ${data.dispatchEndTime}</span>
+ </div>
+
<div class="row-contentss">
<span class="title-1">个人照片:</span>
<div class="avatar-1">
@@ -225,11 +243,11 @@
</div>`
- var dom = $('.securityInfo');
- dom.empty();
- dom.append(str);
- });
- </script>
+ var dom = $('.securityInfo');
+ dom.empty();
+ dom.append(str);
+ });
+</script>
</body>
-</html>
\ No newline at end of file
+</html>
diff --git a/src/api/check/postFiling.js b/src/api/check/postFiling.js
index 0993e6b..21e7c55 100644
--- a/src/api/check/postFiling.js
+++ b/src/api/check/postFiling.js
@@ -36,4 +36,14 @@
ids,
}
})
-}
\ No newline at end of file
+}
+
+export const getDetail = (params) => {
+ return request({
+ url: '/api/postFiling/detail',
+ method: 'get',
+ params: {
+ ...params
+ }
+ })
+}
diff --git a/src/views/check/mobileFiling.vue b/src/views/check/mobileFiling.vue
new file mode 100644
index 0000000..d5f79c9
--- /dev/null
+++ b/src/views/check/mobileFiling.vue
@@ -0,0 +1,428 @@
+<template>
+ <basic-container :class="[
+ 'securityUnit',
+ $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize',
+ $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : ''
+ ]">
+ <avue-crud class="tablesss" :option="option" v-model="form" :data="data" :page.sync="page" ref="crud" :permission="permissionList"
+ :search.sync="questionBankSearch" @on-load="onLoad" :table-loading="loading" @row-save="rowSave"
+ @search-change="searchChange" @search-reset="searchReset" @row-update="rowUpdate" @row-del="rowDel" :before-open="beforeOpen"
+ @selection-change="selectionChange" @refresh-change="refreshChange">
+ <template slot="menuLeft">
+ <el-button type="danger" size="small" plain icon="el-icon-delete" v-if="permission.clock_delete"
+ @click="handleDelete">删 除
+ </el-button>
+ <el-button type="warning" size="small" plain icon="el-icon-download" v-if="permission.clock_export"
+ @click="handleExport">导出
+ </el-button>
+ </template>
+ </avue-crud>
+ </basic-container>
+</template>
+
+<script>
+import {
+ getList,
+ add,
+ update,
+ remove,
+ getDetail
+} from "@/api/check/postFiling";
+import { mapGetters } from "vuex";
+import { getToken } from "@/util/auth";
+import Qs from "qs";
+export default {
+ data() {
+ return {
+ loading: true,
+ selectionList: [],
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize
+ },
+ form:{},
+ query: {},
+ questionBankSearch: {},
+ data: [],
+ option: {
+ index: true,
+ tip: false,
+ addBtn: true,
+ viewBtn: true,
+ searchSize: "mini",
+ searchMenuSpan: 6,
+ height: 583,
+ menuWidth: 280,
+ border: true,
+ align: "center",
+ selection: true,
+ column: [
+ {
+ label: "岗位名称",
+ prop: "name",
+ search: true,
+ searchSpan: 4,
+ span: 24,
+ rules: [
+ {
+ required: true,
+ message: "请输入岗位名称",
+ trigger: "click"
+ }
+ ],
+ overHidden: true
+ },
+ {
+ label:"巡岗地点",
+ prop:"position",
+ display:false
+ },
+ {
+ label: "上岗时间",
+ prop: "dutyTime",
+ type: "datetime",
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ rules: [
+ {
+ required: true,
+ message: "请输入上岗时间",
+ trigger: "blur"
+ }
+ ]
+ },
+ {
+ label: "下岗时间",
+ prop: "layoffTime",
+ type: "datetime",
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ rules: [
+ {
+ required: true,
+ message: "请输入下岗时间",
+ trigger: "blur"
+ }
+ ]
+ },
+ {
+ label:"巡岗地点",
+ prop:"address",
+ type: "map",
+ span:24,
+ hide:true,
+ },
+
+ // {
+ // label: "经度",
+ // prop: "x",
+ // span: 12,
+ // rules: [
+ // {
+ // required: true,
+ // message: "请输入经度",
+ // trigger: "click"
+ // }
+ // ],
+ // },
+ // {
+ // label: "纬度",
+ // prop: "y",
+ // span: 12,
+ // rules: [
+ // {
+ // required: true,
+ // message: "请输入纬度",
+ // trigger: "click"
+ // }
+ // ],
+ // },
+
+ ],
+ ...this.$store.state.control.clearOtherBut
+ }
+ };
+ },
+ created() {
+ },
+ computed: {
+ ...mapGetters(["userInfo", "permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.postFiling_add, true),
+ viewBtn: this.vaildData(this.permission.postFiling_view, true),
+ delBtn: this.vaildData(this.permission.postFiling_delete, true),
+ editBtn: this.vaildData(this.permission.postFiling_edit, true)
+ };
+ },
+ ids() {
+ let ids = [];
+ this.selectionList.forEach(ele => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
+ },
+ },
+ mounted() {
+ this.$store.commit("setWindowSizeHeightAdd");
+ },
+ methods: {
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getDetail(this.form.id).then(res => {
+ this.form = res.data.data;
+ this.form['address'] = [this.form.lon,this.form.lat,this.form.position]
+
+ });
+ }
+ done();
+ },
+
+ sizeChange(val) {
+ this.page1.currentPage = 1;
+ this.page1.pageSize = val;
+ this.onLoad(this.page, this.query);
+ },
+ currentChange(val) {
+ this.page1.currentPage = val;
+ // this.getData();
+ this.onLoad(this.page, this.query);
+ },
+ rowSave(form, done, loading) {
+ form['type'] = 2;
+
+ form.lon = form.address[0]
+ form.lat = form.address[1]
+ form.position = form.address[2]
+ add(form).then(res => {
+ if (res.data.success) {
+ this.$message({
+ message: "操作成功",
+ type: "success"
+ });
+ this.refreshChange();
+ done();
+ } else {
+ this.$message({
+ message: "操作失败",
+ type: "warning"
+ });
+ done();
+ }
+ });
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ rowUpdate(row, index, done, loading) {
+
+ row.lon = row.address[0]
+ row.lat = row.address[1]
+ row.position = row.address[2]
+
+ update(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ });
+ done();
+ },
+ error => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ rowDel(row) {
+ this.$confirm(
+ "确定删除当前合同信息数据?",
+ {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }
+ )
+ .then(() => {
+ console.log(row);
+ return remove(row.id);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ });
+ });
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定批量将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(this.ids).then(res => {
+ this.refreshChange();
+ });
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ });
+ this.$refs.crudrec.toggleSelection();
+ })
+ .catch(res => { });
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ //保安员证信息导出
+ handleExport() {
+ this.$confirm("是否导出考勤打卡信息数据?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ //获取查询条件
+ const { releaseTimeRange } = this.questionBankSearch;
+ if (releaseTimeRange) {
+ this.questionBankSearch["beginTime"] = releaseTimeRange[0];
+ this.questionBankSearch["endTime"] = releaseTimeRange[1];
+ }
+ var data = {
+ clockType: this.questionBankSearch.clockType,
+ attendanceType: this.questionBankSearch.attendanceType,
+ realName: this.questionBankSearch.realName,
+ beginTime: this.questionBankSearch.beginTime,
+ endTime: this.questionBankSearch.endTime
+ };
+ //导出
+ if (this.userInfo.role_name == "保安公司管理员") {
+ //如果是保安公司管理员
+ data["deptId"] = this.userInfo.dept_id;
+ }
+ //序列号url形式,用&拼接
+ data = Qs.stringify(data);
+ window.open(
+ `/api/attendance/export-Attendance?${this.website.tokenHeader
+ }=${getToken()}&` + data
+ );
+ });
+ },
+ onLoad(page, params = {}) {
+ params = this.questionBankSearch;
+
+ const { releaseTimeRange } = this.query;
+ let values = {
+ ...params
+ };
+ if (releaseTimeRange) {
+ values = {
+ ...params,
+ beginTime: releaseTimeRange[0],
+ endTime: releaseTimeRange[1],
+ ...this.query,
+ };
+ values.releaseTimeRange = null;
+ }
+ this.loading = true;
+ //流动岗
+ getList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign({type:2},values, this.query)
+ ).then(res => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ window.localStorage.setItem("danweidataS", JSON.stringify(this.data));
+ this.$store.commit("setWindowSizeHeightAdd");
+ this.loading = false;
+ });
+ }
+ },
+};
+</script>
+
+<style lang="scss">
+.securityUnit {
+ width: 100%;
+ height: 100%;
+ // border: 1px solid #000;
+ box-sizing: border-box;
+}
+
+// .el-card__body {
+// padding-bottom: 5px !important;
+// }
+// .avue-crud__tip,
+// .el-tag,
+// .el-tag--light {
+// padding: 0 !important;
+// }
+
+.lod {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba($color: #000000, $alpha: 0.5);
+ padding: 100px 0 0 0;
+ z-index: 1500 !important;
+ display: flex;
+ // align-items: center;
+ justify-content: center;
+
+ .trees {
+ z-index: 501 !important;
+ position: absolute;
+ width: 15%;
+ top: 100px;
+ left: 0;
+ // display: none;
+ }
+
+ .lod-in {
+ width: 70%;
+ height: auto;
+ background-color: transparent;
+
+ // padding: 10px 0 0 0;
+ }
+
+ .el-collapse-item {
+ padding-top: 15px !important;
+ }
+}
+
+.el-collapse {
+ border-top: 1px solid transparent !important;
+}
+
+.rowClickSelf {
+ &:hover {
+ cursor: pointer;
+ }
+}
+</style>
diff --git a/src/views/check/postFiling.vue b/src/views/check/postFiling.vue
index 29158a0..e7da753 100644
--- a/src/views/check/postFiling.vue
+++ b/src/views/check/postFiling.vue
@@ -4,9 +4,9 @@
$store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize',
$store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : ''
]">
- <avue-crud class="tablesss" :option="option" :data="data" :page.sync="page" ref="crud" :permission="permissionList"
+ <avue-crud class="tablesss" :option="option" v-model="form" :data="data" :page.sync="page" ref="crud" :permission="permissionList"
:search.sync="questionBankSearch" @on-load="onLoad" :table-loading="loading" @row-save="rowSave"
- @search-change="searchChange" @search-reset="searchReset" @row-update="rowUpdate" @row-del="rowDel"
+ @search-change="searchChange" @search-reset="searchReset" @row-update="rowUpdate" @row-del="rowDel" :before-open="beforeOpen"
@selection-change="selectionChange" @refresh-change="refreshChange">
<template slot="menuLeft">
<el-button type="danger" size="small" plain icon="el-icon-delete" v-if="permission.clock_delete"
@@ -25,7 +25,8 @@
getList,
add,
update,
- remove
+ remove,
+ getDetail
} from "@/api/check/postFiling";
import { mapGetters } from "vuex";
import { getToken } from "@/util/auth";
@@ -41,6 +42,7 @@
total: 0,
...this.$store.state.control.changePageSize
},
+ form:{},
query: {},
questionBankSearch: {},
data: [],
@@ -73,28 +75,9 @@
overHidden: true
},
{
- label: "经度",
- prop: "x",
- span: 12,
- rules: [
- {
- required: true,
- message: "请输入经度",
- trigger: "click"
- }
- ],
- },
- {
- label: "纬度",
- prop: "y",
- span: 12,
- rules: [
- {
- required: true,
- message: "请输入纬度",
- trigger: "click"
- }
- ],
+ label:"巡岗地点",
+ prop:"position",
+ display:false
},
{
label: "上岗时间",
@@ -123,7 +106,40 @@
trigger: "blur"
}
]
- }
+ },
+ {
+ label:"巡岗地点",
+ prop:"address",
+ type: "map",
+ span:24,
+ hide:true,
+ },
+
+ // {
+ // label: "经度",
+ // prop: "x",
+ // span: 12,
+ // rules: [
+ // {
+ // required: true,
+ // message: "请输入经度",
+ // trigger: "click"
+ // }
+ // ],
+ // },
+ // {
+ // label: "纬度",
+ // prop: "y",
+ // span: 12,
+ // rules: [
+ // {
+ // required: true,
+ // message: "请输入纬度",
+ // trigger: "click"
+ // }
+ // ],
+ // },
+
],
...this.$store.state.control.clearOtherBut
}
@@ -153,6 +169,17 @@
this.$store.commit("setWindowSizeHeightAdd");
},
methods: {
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getDetail(this.form.id).then(res => {
+ this.form = res.data.data;
+ this.form['address'] = [this.form.lon,this.form.lat,this.form.position]
+
+ });
+ }
+ done();
+ },
+
sizeChange(val) {
this.page1.currentPage = 1;
this.page1.pageSize = val;
@@ -165,6 +192,10 @@
},
rowSave(form, done, loading) {
form['type'] = 1;
+
+ form.lon = form.address[0]
+ form.lat = form.address[1]
+ form.position = form.address[2]
add(form).then(res => {
if (res.data.success) {
this.$message({
@@ -193,6 +224,11 @@
this.onLoad(this.page);
},
rowUpdate(row, index, done, loading) {
+
+ row.lon = row.address[0]
+ row.lat = row.address[1]
+ row.position = row.address[2]
+
update(row).then(
() => {
this.onLoad(this.page);
@@ -295,12 +331,7 @@
},
onLoad(page, params = {}) {
params = this.questionBankSearch;
- if (this.userInfo.role_name == "公安管理员" || this.userInfo.role_name == "民警" || this.userInfo.role_name == "administrator") {
- params["jurisdiction"] = this.userInfo.jurisdiction;
- }
- if (this.userInfo.role_name == "保安公司管理员" || this.userInfo.role_name == "分公司管理员") {
- params["deptId"] = this.userInfo.dept_id;
- }
+
const { releaseTimeRange } = this.query;
let values = {
@@ -311,15 +342,16 @@
...params,
beginTime: releaseTimeRange[0],
endTime: releaseTimeRange[1],
- ...this.query
+ ...this.query,
};
values.releaseTimeRange = null;
}
this.loading = true;
+ //固定岗
getList(
page.currentPage,
page.pageSize,
- Object.assign(values, this.query)
+ Object.assign({type:1},values, this.query)
).then(res => {
const data = res.data.data;
this.page.total = data.total;
--
Gitblit v1.9.3