sunyanqiang há 2 anos atrás
pai
commit
b1ca11b3d5

+ 19 - 0
src/api/militaryvehicleManagement/thebusSi.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+
+// 查询私家车列表
+export function personalCarStat(query) {
+  return request({
+    url: '/militaryvehicleManagement/privateAccessLog/personalCarStat',
+    method: 'get',
+    params: query
+  })
+}
+
+// 导出私家车模板
+export function exportCarStat(query) {
+    return request({
+      url: '/militaryvehicleManagement/privateAccessLog/exportCarStat',
+      method: 'get',
+      params: query
+    })
+  }

+ 2 - 2
src/assets/styles/global.css

@@ -103,11 +103,11 @@
 
 /* 设置表格单双数颜色 */
 .el-table tr:nth-child(odd) {
-  background: #00365F !important;
+  background: #00365F ;
 }
 
 .el-table tr:nth-child(even) {
-  background: #003C69 !important;
+  background: #003C69 ;
 }
 
 /* 表格行划过颜色 */

+ 4 - 4
src/components/look_word/bdgldiary.vue

@@ -553,12 +553,12 @@
         </tr>
         <tr
           class="JR_tr"
-          style="font-family: '仿宋'"
-          v-for="(item, i) in message.bdglDiaryLeaveList"
+          style="font-family: ' 仿宋'"
+          v-for="(item, i) in message.bdglLeaveOneList"
           :key="i + '   '"
         >
           <td class="JR_right">
-            <p align="center">{{ item.name }}</p>
+            <p align="center">{{ item.peopleName }}</p>
           </td>
           <td class="JR_right">
             <p align="center">
@@ -576,7 +576,7 @@
             <p align="center">{{ item.leaveApprover }}</p>
           </td>
           <td class="JR_right" colspan="2">
-            <p align="center">{{ item.leaveTime }}</p>
+            <p align="center">{{ item.departureTime }}</p>
           </td>
           <td class="JR_right" colspan="2">
             <p align="center">{{ item.backTime }}</p>

+ 9 - 9
src/views/access/accessControl/index.vue

@@ -7,6 +7,12 @@
       v-show="showSearch"
       label-width="68px"
     >
+    <el-form-item prop="ename">
+      <el-input
+        v-model="queryParams.ename"
+        placeholder="请输入名字"
+      ></el-input>
+    </el-form-item>
       <el-form-item prop="starttime">
         <el-date-picker
           clearable
@@ -29,12 +35,6 @@
         >
         </el-date-picker>
       </el-form-item>
-      <el-form-item prop="ename">
-        <el-input
-          v-model="queryParams.ename"
-          placeholder="请输入名字"
-        ></el-input>
-      </el-form-item>
       <el-form-item>
         <el-button size="btr" @click="handleQuery">搜索</el-button>
         <el-button size="btr" @click="resetQuery">重置</el-button>
@@ -61,19 +61,19 @@
       <!-- <el-table-column label="序号" align="center" prop="id" /> -->
       <el-table-column label="序号" type="index" width="50" align="center">
         <template scope="scope">
-          <span>>{{
+          <span>{{
             (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
           }}</span>
         </template>
       </el-table-column>
       <el-table-column label="编号" align="center" prop="pin" />
       <el-table-column label="姓名" align="center" prop="ename" />
-      <el-table-column
+      <!-- <el-table-column
         label="单位"
         align="center"
         prop="deptname"
         show-overflow-tooltip
-      />
+      /> -->
       <el-table-column label="时间" align="center" prop="checktime">
       </el-table-column>
       <el-table-column label="设备编号" align="center" prop="sn" />

+ 116 - 50
src/views/bdglSecret/secretaccount/index.vue

@@ -25,24 +25,25 @@
         />
       </el-form-item>
       <el-form-item label="" prop="confidentialitylevel">
-        <el-input
-          v-model="queryParams.confidentialitylevel"
-          placeholder="请输入密级"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
+        <el-select
+        v-model="queryParams.confidentialitylevel"
+        placeholder="请选择密级"
+      >
+        <el-option
+          v-for="item in ziDian"
+          :key="item.dictValue"
+          :label="item.dictLabel"
+          :value="item.dictValue"
+          class="input_xiala"
+        >
+        </el-option>
+      </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button
-          type="primary"
-          icon="el-icon-search"
-          size="mini"
-          @click="handleQuery"
+        <el-button type="primary" size="btr" @click="handleQuery"
           >搜索</el-button
         >
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
-          >重置</el-button
-        >
+        <el-button size="btr" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
@@ -111,7 +112,19 @@
         </template>
       </el-table-column>
       <el-table-column label="单位" align="center" prop="unitname" />
-      <el-table-column label="类型" align="center" prop="stype" />
+      <el-table-column
+        label="类型"
+        align="center"
+        prop="stype"
+        :formatter="stypeFn"
+      />
+      <el-table-column
+        label="密级"
+        align="center"
+        prop="confidentialitylevel"
+        :formatter="confidentialitylevelFn"
+      >
+      </el-table-column>
       <el-table-column label="品牌" align="center" prop="brand" />
       <el-table-column label="型号" align="center" prop="model" />
       <el-table-column
@@ -124,23 +137,14 @@
         align="center"
         prop="macaddress"
       />
-      <el-table-column label="密级" align="center" prop="confidentialitylevel">
-        <template slot-scope="scope">
-          <dict-tag
-            :options="dict.type.brigade_secret"
-            :value="scope.row.confidentialitylevel"
-          />
-        </template>
-      </el-table-column>
       <el-table-column label="保密编码" align="center" prop="levelnumber" />
       <el-table-column
         label="责任人"
         align="center"
-        prop="
-persoeliable"
+        prop="persoeliable"
+        :formatter="persoeliableFn"
       />
       <el-table-column label="备注" align="center" prop="remarks" />
-      <el-table-column label="单位ID" align="center" prop="unitid" />
       <el-table-column
         label="操作"
         align="center"
@@ -148,17 +152,15 @@ persoeliable"
       >
         <template slot-scope="scope">
           <el-button
-            size="mini"
+            size="btu"
             type="text"
-            icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['bdglSecret:secretaccount:edit']"
             >修改</el-button
           >
           <el-button
-            size="mini"
+            size="btd"
             type="text"
-            icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['bdglSecret:secretaccount:remove']"
             >删除</el-button
@@ -186,24 +188,12 @@ persoeliable"
       >
         <el-form-item label="单位" prop="unitname">
           <treeselect
-            v-model="form.unitId"
+            v-model="form.unitid"
             :options="deptOptions"
             placeholder="请选择使用单位"
             @select="selectPeo"
           />
         </el-form-item>
-        <el-form-item label="责任人" prop="persoeliable">
-          <el-select v-model="form.persoeliable" placeholder="请选择负责人">
-            <el-option
-              v-for="(item, i) in renYuan"
-              :key="i"
-              :label="item.name"
-              :value="item.id"
-              class="input_xiala"
-            >
-            </el-option>
-          </el-select>
-        </el-form-item>
         <el-form-item label="密级" prop="confidentialitylevel">
           <el-select
             v-model="form.confidentialitylevel"
@@ -219,9 +209,37 @@ persoeliable"
             </el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="类型" prop="stype">
+          <el-select
+            v-model="form.stype"
+            placeholder="请选择类型"
+            clearable
+            size="small"
+          >
+            <el-option
+              v-for="item in stypeList"
+              :key="item.dictValue"
+              :label="item.dictLabel"
+              :value="item.dictValue"
+              class="input_xiala"
+            />
+          </el-select>
+        </el-form-item>
         <el-form-item label="品牌" prop="brand">
           <el-input v-model="form.brand" placeholder="请输入品牌" />
         </el-form-item>
+        <el-form-item label="责任人" prop="persoeliable">
+          <el-select v-model="form.persoeliable" placeholder="请选择负责人">
+            <el-option
+              v-for="(item, i) in renYuan"
+              :key="i"
+              :label="item.name"
+              :value="item.id"
+              class="input_xiala"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="型号" prop="model">
           <el-input v-model="form.model" placeholder="请输入型号" />
         </el-form-item>
@@ -274,6 +292,7 @@ import {
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import { getDicts } from "@/api/system/dict/data";
+import { getAll } from "@/api/grassrootsregistration/bdglmeeting";
 
 export default {
   name: "Secretaccount",
@@ -325,14 +344,58 @@ export default {
       renYuan: [],
       // 密级列表
       ziDian: [],
+      // 类型
+      stypeList: [],
+      suoyouLiit:[]
     };
   },
   created() {
     this.getList();
     this.getTreeselect();
     this.getdict();
+    this.getdicts();
+    this.getSuoYou()
   },
   methods: {
+    // 获取所有人员
+    getSuoYou() {
+      getAll().then((response) => {
+        this.suoyouLiit = response.data;
+      });
+    },
+    persoeliableFn(row) {
+      var name =""
+      this.suoyouLiit.map(item=>{
+        if(item.id==row.persoeliable){
+          name=item.name
+        }
+      })
+      return name
+    },
+    confidentialitylevelFn(row) {
+      var name = null;
+      this.ziDian.map((item) => {
+        if (row.confidentialitylevel == item.dictValue) {
+          name = item.dictLabel;
+        }
+      });
+      return name;
+    },
+    stypeFn(row) {
+      var name = null;
+      this.stypeList.map((item) => {
+        if (row.stype == item.dictValue) {
+          name = item.dictLabel;
+        }
+      });
+      return name;
+    },
+    // 查询电子产品
+    getdicts() {
+      getDicts("electronic").then((res) => {
+        this.stypeList = res.data;
+      });
+    },
     // 查询密级
     getdict() {
       getDicts("brigade_secret").then((res) => {
@@ -348,10 +411,10 @@ export default {
     // 单位选择触发
     selectPeo(val) {
       this.ChongZhiRen();
-      this.form.unitname=val.label
-      this.form.unitId=val.id
+      this.form.unitname = val.label;
+      this.form.unitid = val.id;
       // 获取人员
-      this.getZhuChi(this.form.unitId);
+      this.getZhuChi(this.form.unitid);
     },
     // 重置表单人员
     ChongZhiRen() {
@@ -426,8 +489,10 @@ export default {
       const id = row.id || this.ids;
       getSecretaccount(id).then((response) => {
         this.form = response.data;
+        this.form.persoeliable = response.data.persoeliable * 1;
         this.open = true;
         this.title = "修改涉密计算机台账";
+        this.getZhuChi(this.form.unitid);
       });
     },
     /** 提交按钮 */
@@ -484,8 +549,9 @@ export default {
 }
 
 ::v-deep .el-textarea__inner {
-  width: 920px;
+  width: 671px;
   height: 104px;
+  margin-left: 37px;
 }
 
 ::v-deep .el-dialog__header {
@@ -534,7 +600,7 @@ export default {
 }
 
 ::v-deep .el-dialog__body {
-  margin: 10px 30px 20px 50px;
+  margin: 10px 30px 20px 41px;
   padding-top: 20px !important;
   box-sizing: border-box;
   /* padding: 30px 12px 30px 28px; */
@@ -622,12 +688,12 @@ export default {
 /* 底部确定取消按钮 */
 ::v-deep .el-dialog__footer {
   padding: 18px 40px 30px 0px;
-  margin-right: 32px;
+  margin-right: 71px;
 }
 
 /* 增加按钮弹框 */
 ::v-deep .el-dialog {
-  width: 1060px !important;
+  width: 876px !important;
 }
 
 ::v-deep .el-dialog__body {

+ 1 - 1
src/views/bdglregular/regularinfo/index.vue

@@ -1384,7 +1384,7 @@ export default {
         this.form = response.data;
         this.disabled = true;
         this.open = true;
-        this.title = "修改经常性检查1";
+        this.title = "修改经常性检查";
         this.jiannum = 1;
         this.btnnum = null;
         this.zg = 3;

+ 29 - 6
src/views/grassrootsregistration/bdgldiary/index.vue

@@ -347,7 +347,7 @@
             <div class="jiben">训练、教育或者执行其他任务情况</div>
             <div class="box" v-for="(item, i) in xunlian" :key="i">
               <table
-                width="920"
+                width="850"
                 cellspacing="0"
                 align="center"
                 border="1"
@@ -361,6 +361,7 @@
                   mso-border-insideh: 0.5pt solid windowtext;
                   mso-border-insidev: 0.5pt solid windowtext;
                   mso-padding-alt: 0pt 0pt 0pt 0pt;
+                  margin-left: 61px;
                 "
                 bordercolor="white"
               >
@@ -410,6 +411,14 @@
                     ></el-input>
                   </td>
                 </tr>
+                <el-button
+                  type="danger"
+                  icon="el-icon-delete"
+                  size="mini"
+                  v-if="i > 0"
+                  @click="tebleDelForms(i)"
+                >
+                </el-button>
               </table>
             </div>
             <!-- 工作登记 -->
@@ -1013,6 +1022,7 @@ import { getUserzs } from "@/api/grassrootsregistration/bdgldiary";
 import { getUserProfile } from "@/api/system/user";
 // 获取时间状态
 import { listDiary } from "@/api/system/diary";
+import { runInThisContext } from "vm";
 export default {
   components: { Treeselect, bdgldiary },
   name: "Bdgldiary",
@@ -1280,6 +1290,10 @@ export default {
     this.getUser();
   },
   methods: {
+    // 删除一周工作
+    tebleDelForms(i) {
+      this.xunlian.splice(i, 1);
+    },
     // 一周工作提交
     tijiao() {
       if (
@@ -1300,9 +1314,9 @@ export default {
             "(" +
             this.tomList.organizer +
             ")",
-          percentage: null,
-          realTo: null,
-          shouldArrive: null,
+          percentage: 0,
+          realTo: 0,
+          shouldArrive: 0,
         });
         this.tomList = {};
       } else {
@@ -1904,7 +1918,10 @@ export default {
           // 工作安排
           if (
             this.xunlian[0].dateline != null &&
-            this.xunlian[0].contents != null
+            this.xunlian[0].contents != null &&
+            this.xunlian[0].percentage != null &&
+            this.xunlian[0].shouldArrive!=null &&
+            this.xunlian.realTo
           ) {
             this.form.bdglDiaryWeekworkRegisterList = this.xunlian;
           }
@@ -2079,8 +2096,8 @@ export default {
 .box {
   font-size: 14px;
   color: #fff;
-  /* padding: 0 12px 0 0; */
   margin-left: -55px;
+  position: relative;
 }
 
 ::v-deep .btn {
@@ -2557,4 +2574,10 @@ export default {
 .box2 {
   display: inline-block;
 }
+
+.box ::v-deep .el-button--danger {
+  position: absolute;
+  top: 47px;
+  right: 64px;
+}
 </style>

+ 472 - 0
src/views/militaryvehicleManagement/thebusSi/index.vue

@@ -0,0 +1,472 @@
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
+      <el-form-item label="" prop="chePaiNum">
+        <el-input
+          size="small"
+          v-model="queryParams.chePaiNum"
+          type="datetime"
+          placeholder="输入车牌号"
+          class="text"
+        >
+        </el-input>
+      </el-form-item>
+      <el-form-item label="" prop="startTime">
+        <el-date-picker
+          clearable
+          size="small"
+          v-model="queryParams.startTime"
+          type="datetime"
+          placeholder="选择进入开始时间"
+          class="text"
+          value-format="yyyy-MM-dd HH:mm:ss"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="" prop="endTime">
+        <el-date-picker
+          clearable
+          size="small"
+          v-model="queryParams.endTime"
+          type="datetime"
+          placeholder="选择离开的结束时间"
+          class="text"
+          value-format="yyyy-MM-dd HH:mm:ss"
+        >
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" size="btr" @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button size="btr" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          class="box"
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          :loading="exportLoading"
+          @click="handleExport"
+          v-hasPermi="['militaryvehicleManagement:privateCar:export']"
+          >导出</el-button
+        >
+      </el-col>
+    </el-row>
+
+    <el-table
+      v-loading="loading"
+      :data="privateCarList"
+      @selection-change="handleSelectionChange"
+      :header-cell-style="{ background: '#003C69', color: 'white' }"
+    >
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="序号" align="center" prop="id">
+        <template scope="scope">
+          <span>{{
+            (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
+          }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="车牌号" align="center" prop="chePaiNum" />
+      <el-table-column label="进入次数" align="center" prop="inCount" />
+      <el-table-column label="离开次数" align="center" prop="outCount" />
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+  
+  <script>
+import {
+  personalCarStat,
+  exportCarStat,
+} from "@/api/militaryvehicleManagement/thebusSi";
+// 查询字典
+import { getDicts } from "@/api/system/dict/data";
+export default {
+  name: "PrivateCar",
+  data() {
+    return {
+      // 遮罩层
+      loading: false,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 私家车管理表格数据
+      privateCarList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        adminId: [
+          { required: true, message: "创建人不能为空", trigger: "blur" },
+        ],
+      },
+      // 车辆类别
+      privateCar: [],
+      // 人员列表
+      renYuan: [],
+      // 证件类别
+      documentType: [],
+      // 外面的人员
+      renYuans: [],
+    };
+  },
+  created() {
+    // this.getList();
+    getDicts("privateCar").then((response) => {
+      this.privateCar = response.data;
+    });
+    getDicts("documentType").then((response) => {
+      this.documentType = response.data;
+    });
+  },
+  methods: {
+    // 证件类型翻译
+    zhenJian(row, column) {
+      var zhenJian = "";
+      this.documentType.map((item) => {
+        if (item.dictValue == row.documenttype) {
+          zhenJian = item.dictLabel;
+        }
+      });
+      return zhenJian;
+    },
+    // 车辆类别翻译
+    carLei(row, column) {
+      var carLei = "";
+      this.privateCar.map((item) => {
+        if (item.dictValue == row.vehiclecategory) {
+          carLei = item.dictLabel;
+        }
+      });
+      return carLei;
+    },
+    // 点击车辆所有人选中触发
+    suoYouRen(name) {
+      this.form.peopleName = name;
+    },
+    // 人员列表
+    getRen() {
+      getRenYuanCar().then((response) => {
+        this.renYuan = response.data;
+      });
+    },
+    /** 查询私家车管理列表 */
+    getList() {
+      this.loading = true;
+      personalCarStat(this.queryParams).then((response) => {
+        this.privateCarList = response.data;
+        if (this.total) {
+          this.total = response.total;
+        }else{
+            this.total = 0;
+        }
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        peopleId: null,
+        peopleName: null,
+        contactnumber: null,
+        documenttype: null,
+        certificatenumber: null,
+        remarks: null,
+        adminId: null,
+        createtime: null,
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+     this.queryParams.startTime="";
+     this.queryParams.endTime="";
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.getRen();
+      this.reset();
+      this.open = true;
+      this.title = "添加私家车管理";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      this.getRen();
+      const id = row.id || this.ids;
+      getPrivateCar(id).then((response) => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改私家车管理";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.id != null) {
+            updatePrivateCar(this.form).then((response) => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addPrivateCar(this.form).then((response) => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal
+        .confirm("是否确认删除私家车管理的数据项?")
+        .then(function () {
+          return delPrivateCar(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$modal
+        .confirm("是否确认导出所有私家车统计数据项?")
+        .then(() => {
+          if (this.queryParams.endTime && this.queryParams.startTime) {
+            this.exportLoading = true;
+            return exportCarStat(queryParams);
+          } else {
+            this.$message.error("请选择进入时间跟离开时间");
+          }
+        })
+        .then((response) => {
+          this.$download.name(response.msg);
+          this.exportLoading = false;
+        })
+        .catch(() => {});
+    },
+  },
+};
+</script>
+  <style scoped>
+/* 对话框背景颜色 */
+::v-deep .el-dialog {
+  background: #004d86 !important;
+  width: 800px !important;
+}
+::v-deep .el-textarea__inner {
+  width: 610px;
+  height: 104px;
+  margin: auto;
+}
+::v-deep .el-dialog__header {
+  border-bottom: 1px solid #718a9d;
+}
+::v-deep .el-dialog__title {
+  color: #fff;
+  font: 18px;
+}
+::v-deep .el-dialog__headerbtn .el-dialog__close {
+  color: #fff;
+}
+::v-deep .el-form-item__label {
+  font: 16px;
+  color: #fff;
+  width: 100px !important;
+}
+::v-deep .el-input__inner {
+  /* width: 200px !important;
+    height: 36px; */
+  background: transparent;
+  color: #fff;
+  border: 1px solid white !important;
+}
+/* 单位框背景颜色 */
+::v-deep .vue-treeselect__control {
+  background: #004d86 !important;
+}
+/* 基本信息背景 */
+.jiben {
+  width: 620px;
+  height: 32px;
+  background-image: url(../../../images/小标题底.png);
+  background-size: 100%;
+  margin-bottom: 25px;
+  color: #fff;
+  padding-left: 16px;
+  line-height: 32px;
+}
+/*调整表单间距 */
+::v-deep .el-form-item__content {
+  width: 200px;
+}
+::v-deep .el-input__inner {
+  cursor: pointer !important;
+}
+/* 底部确定取消按钮 */
+::v-deep .el-dialog__footer {
+  padding: 30px 50px;
+}
+::v-deep .el-dialog__body {
+  margin: 10px 24px 20px 30px;
+  padding-top: 20px !important;
+  box-sizing: border-box;
+  /* padding: 30px 12px 30px 28px; */
+}
+.contents {
+  padding: 0px 40px !important;
+}
+/* 下拉菜单 */
+.el-dropdown-link {
+  cursor: pointer;
+  color: #409eff;
+}
+.el-icon-arrow-down {
+  font-size: 12px;
+}
+/* 下拉菜单字体/背景颜色 */
+.el-select-dropdown__item.hover,
+.el-select-dropdown__item:hover {
+  background-color: #004d86;
+  color: #fff;
+}
+.el-select-dropdown__item {
+  color: #fff;
+}
+/* 时间选择 */
+::v-deep .el-input--small .el-input__inner {
+  width: 200px;
+  height: 36px;
+  line-height: 36px;
+}
+.el-date-editor.el-input {
+  width: 200px;
+  height: 36px;
+  margin-right: 48px;
+}
+::v-deep .el-date-editor.el-input .el-input__inner {
+  height: 36px;
+  line-height: 36px;
+}
+/* 单位框背景颜色 */
+::v-deep .vue-treeselect__control {
+  background: #004d86 !important;
+  color: #fff;
+}
+/* 单位下拉菜单选中字体颜色 */
+::v-deep .vue-treeselect__single-value {
+  color: #fff !important;
+}
+/* 分页按钮 */
+::v-deep .el-pagination.is-background .el-pager li {
+  background-color: #004d86;
+  color: #fff;
+}
+::v-deep .el-pagination.is-background .btn-next {
+  background-color: #004d86;
+  color: #fff;
+}
+/* 底部确定取消按钮 */
+::v-deep .el-dialog__footer {
+  padding: 18px 50px;
+  margin-right: 42px;
+}
+::v-deep .el-dialog__body {
+  padding: 30px 63px;
+}
+/* 小手样式 */
+::v-deep .el-table__cell {
+  cursor: pointer;
+}
+.el-button--mini {
+  width: 80px !important;
+  border: 1px solid transparent;
+  padding: 3px 8px;
+  font-size: 14px;
+  line-height: 1.5;
+  border-radius: 3px;
+  color: #fff;
+  background-color: #1890ff;
+}
+/* 调整输入框提示文字颜色 */
+::v-deep .vue-treeselect__placeholder {
+  color: #bdbdbd4f !important;
+}
+::v-deep input::-webkit-input-placeholder {
+  color: #bdbdbd4f !important;
+}
+::v-deep input:-moz-placeholder {
+  color: #bdbdbd4f !important;
+}
+/* 文本域提示文字颜色 */
+::v-deep ::-webkit-input-placeholder {
+  color: #bdbdbd4f !important;
+}
+.box {
+  background-color: #ffba00 !important;
+}
+</style>
+  

+ 362 - 285
src/views/monitoring/brigadecamera/index.vue

@@ -1,214 +1,51 @@
 <template>
   <div class="app-container">
-    <el-form
-      :model="queryParams"
-      ref="queryForm"
-      size="small"
-      :inline="true"
-      v-show="showSearch"
-      label-width="68px"
-    >
-      <el-form-item label="名称" prop="cameraname">
-        <el-input
-          v-model="queryParams.cameraname"
-          placeholder="请输入名称"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="单位名称" prop="unitname">
-        <el-input
-          v-model="queryParams.unitname"
-          placeholder="请输入单位名称"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="单位地址" prop="cameraaddress">
-        <el-input
-          v-model="queryParams.cameraaddress"
-          placeholder="请输入单位地址"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="创建时间" prop="cretetime">
-        <el-date-picker
-          clearable
-          v-model="queryParams.cretetime"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="请选择创建时间"
-        >
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item>
-        <el-button
-          type="primary"
-          icon="el-icon-search"
-          size="mini"
-          @click="handleQuery"
-          >搜索</el-button
-        >
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
-          >重置</el-button
-        >
-      </el-form-item>
-    </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['monitoring:brigadecamera:add']"
-          >新增</el-button
-        >
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['monitoring:brigadecamera:edit']"
-          >修改</el-button
-        >
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['monitoring:brigadecamera:remove']"
-          >删除</el-button
-        >
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['monitoring:brigadecamera:export']"
-          >导出</el-button
-        >
-      </el-col>
-      <right-toolbar
-        :showSearch.sync="showSearch"
-        @queryTable="getList"
-      ></right-toolbar>
-    </el-row>
-
-    <el-table
-      v-loading="loading"
-      :data="brigadecameraList"
-      @selection-change="handleSelectionChange"
-    >
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="${comment}" align="center" prop="id" />
-      <el-table-column label="名称" align="center" prop="cameraname" />
-      <el-table-column label="单位名称" align="center" prop="unitname" />
-      <el-table-column label="单位地址" align="center" prop="cameraaddress" />
-      <el-table-column
-        label="创建时间"
-        align="center"
-        prop="cretetime"
-        width="180"
-      >
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.cretetime, "{y}-{m}-{d}") }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column
-        label="操作"
-        align="center"
-        class-name="small-padding fixed-width"
-      >
-        <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['monitoring:brigadecamera:edit']"
-            >修改</el-button
-          >
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['monitoring:brigadecamera:remove']"
-            >删除</el-button
-          >
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-    <!-- 添加或修改摄像头管理对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="名称" prop="cameraname">
-          <el-input v-model="form.cameraname" placeholder="请输入名称" />
-        </el-form-item>
-        <el-form-item label="单位名称" prop="unitname">
-          <el-input v-model="form.unitname" placeholder="请输入单位名称" />
-        </el-form-item>
-        <el-form-item label="单位地址" prop="cameraaddress">
-          <el-input v-model="form.cameraaddress" placeholder="请输入单位地址" />
-        </el-form-item>
-        <el-form-item label="创建时间" prop="cretetime">
-          <el-date-picker
-            clearable
-            v-model="form.cretetime"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="请选择创建时间"
+    <div class="box">
+      <ul>
+        <li class="oneUl" v-for="(item, i) in cabinetList" :key="i">
+          <div
+            style="
+              width: 265px;
+              height: 230px;
+              cursor: pointer;
+              text-align: center;
+            "
           >
-          </el-date-picker>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
-    </el-dialog>
+            <div class="title">摄像头</div>
+            <div style="margin-top: 34%">
+              <el-button size="btcks" @click="opens">查看</el-button>
+            </div>
+          </div>
+        </li>
+      </ul>
+    </div>
   </div>
 </template>
 
 <script>
+import axios from "axios";
 import {
-  listBrigadecamera,
-  getBrigadecamera,
-  delBrigadecamera,
-  addBrigadecamera,
-  updateBrigadecamera,
-} from "@/api/monitoring/brigadecamera";
+  getCabinet,
+  delCabinet,
+  addCabinet,
+  updateCabinet,
+  exportCabinet,
+  xianPhone,
+  xianPhoneGeZi,
+  xianPhoneOppe,
+  getToken,
+} from "@/api/phone/cabinet";
+import { from } from "../../../../public/assets/libs/moment/src/lib/moment/from";
+import Cookies from "js-cookie";
 
 export default {
-  name: "Brigadecamera",
+  name: "Cabinet",
   data() {
     return {
       // 遮罩层
       loading: true,
+      // 导出遮罩层
+      exportLoading: false,
       // 选中数组
       ids: [],
       // 非单个禁用
@@ -219,38 +56,50 @@ export default {
       showSearch: true,
       // 总条数
       total: 0,
-      // 摄像头管理表格数据
-      brigadecameraList: [],
+      // 手机柜表格数据
+      cabinetList: [
+        { number: 1, ip: 2, gridCount: "你好" },
+        { number: 1, ip: 2, gridCount: "你好" },
+        { number: 1, ip: 2, gridCount: "你好" },
+        { number: 1, ip: 2, gridCount: "你好" },
+        { number: 1, ip: 2, gridCount: "你好" },
+        { number: 1, ip: 2, gridCount: "你好" },
+        { number: 1, ip: 2, gridCount: "你好" },
+        { number: 1, ip: 2, gridCount: "你好" },
+        { number: 1, ip: 2, gridCount: "你好" },
+        { number: 1, ip: 2, gridCount: "你好" },
+      ],
+      // 手机柜格子列表
+      gridList: [],
       // 弹出层标题
       title: "",
       // 是否显示弹出层
       open: false,
       // 查询参数
       queryParams: {
-        pageNum: 1,
+        pageNo: 1,
         pageSize: 10,
-        cameraname: null,
-        unitname: null,
-        cameraaddress: null,
-        cretetime: null,
+        number: null,
+        address: null,
+        gridNumber: null,
+        storageQuantity: null,
+        exceptionsNumber: null,
+        unitId: null,
+        unitName: null,
       },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {},
     };
   },
   created() {
-    this.getList();
+    // this.getList();
   },
   methods: {
-    /** 查询摄像头管理列表 */
+    opens() {
+      console.log(1);
+    },
+    /** 查询摄像头列表 */
     getList() {
-      this.loading = true;
-      listBrigadecamera(this.queryParams).then((response) => {
-        this.brigadecameraList = response.rows;
-        this.total = response.total;
-        this.loading = false;
+      xianPhone().then((res) => {
+        this.cabinetList = res.data.infos;
       });
     },
     // 取消按钮
@@ -262,10 +111,13 @@ export default {
     reset() {
       this.form = {
         id: null,
-        cameraname: null,
-        unitname: null,
-        cameraaddress: null,
-        cretetime: null,
+        number: null,
+        address: null,
+        gridNumber: null,
+        storageQuantity: null,
+        exceptionsNumber: null,
+        unitId: null,
+        unitName: null,
       };
       this.resetForm("form");
     },
@@ -279,72 +131,297 @@ export default {
       this.resetForm("queryForm");
       this.handleQuery();
     },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.id);
-      this.single = selection.length !== 1;
-      this.multiple = !selection.length;
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加摄像头管理";
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const id = row.id || this.ids;
-      getBrigadecamera(id).then((response) => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改摄像头管理";
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate((valid) => {
-        if (valid) {
-          if (this.form.id != null) {
-            updateBrigadecamera(this.form).then((response) => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addBrigadecamera(this.form).then((response) => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$modal
-        .confirm('是否确认删除摄像头管理编号为"' + ids + '"的数据项?')
-        .then(function () {
-          return delBrigadecamera(ids);
-        })
-        .then(() => {
-          this.getList();
-          this.$modal.msgSuccess("删除成功");
-        })
-        .catch(() => {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download(
-        "monitoring/brigadecamera/export",
-        {
-          ...this.queryParams,
-        },
-        `brigadecamera_${new Date().getTime()}.xlsx`
-      );
-    },
   },
 };
 </script>
+<style scoped>
+* {
+  padding: 0;
+}
+ul {
+  list-style-type: none;
+}
+.box ul {
+  /* display: flex;
+  flex-flow: wrap; */
+  display: flex;
+  flex-flow: wrap;
+  margin-left: 2%;
+  padding-left: -1%;
+  padding-top: 28px;
+}
+.oneUl {
+  flex: 1;
+  /* display: inline-block; */
+  background: url("../../../assets/images/柜子2.png") no-repeat;
+  /* width: 306px; */
+  height: 285px;
+  padding: 22px;
+  min-width: 308px;
+  margin-bottom: 40px;
+}
+.title {
+  color: #fff;
+  height: 16px;
+  display: inline-table;
+}
+.table {
+  margin-top: 18px;
+  line-height: 32px;
+  padding-left: 12px;
+  color: #fff;
+  cursor: pointer;
+}
+.mb9 {
+  margin-bottom: 20px;
+  margin-top: 10px;
+}
+::v-deep .el-input__inner {
+  color: #fff;
+  /* width: 200px; */
+  height: 36px;
+}
+.red {
+  background: url("../../../assets/images/抽屉-红色1.png") no-repeat !important;
+}
+.greed {
+  background: url("../../../assets/images/抽屉-绿色1.png") no-repeat !important;
+}
+.yellow {
+  background: url("../../../assets/images/抽屉-黄色1.png") no-repeat !important;
+}
+.grey {
+  background: url("../../../assets/images/柜子-灰.png") no-repeat !important;
+}
+.orging {
+  background: url("../../../assets/images/柜子-灰.png") no-repeat;
+}
+
+.box1 {
+  padding-top: 17px;
+  padding-left: 24px;
+}
+.twoUl li {
+  height: 114px;
+  padding: 20px;
+  margin-right: 22px;
+  margin-bottom: 43px;
+  min-width: 175px;
+
+  /* margin-bottom: 43px;
+  flex: 1;
+  max-width: 173px;
+  margin-right: 2%; */
+}
+.twoUl {
+  /* display: inline-block;
+  padding-left: 0px;
+  margin-left: 10px;
+  margin-top: 0px;
+  margin-bottom: 38px;
+  margin-right: 14px; */
+  padding-left: 12px;
+  display: flex;
+  flex-flow: wrap;
+  margin-top: 0px;
+}
+.two_div {
+  text-align: center;
+  margin-top: 10px;
+  padding-top: 10px;
+  color: #fff;
+}
+::v-deep .el-button--mini {
+  margin-left: 25px !important;
+  margin-top: 6px !important;
+  background: #1263aa;
+  border-color: #1263aa;
+  color: #ffffff;
+  width: 82px;
+  height: 30px;
+}
+.shuJu {
+  height: 16px;
+  margin-top: 26px;
+  margin-right: 90px;
+  float: right;
+  color: #fff;
+  font-size: 14px;
+}
+
+.box4::before {
+  display: inline-block;
+  content: "";
+  width: 8px;
+  height: 8px;
+  /* border-radius: 50%; */
+  background-color: #67c23a;
+  margin-left: 26px;
+}
+.box5::before {
+  display: inline-block;
+  content: "";
+  width: 8px;
+  height: 8px;
+  /* border-radius: 50%; */
+  background-color: #ff4949;
+  margin-left: 26px;
+}
+.box6::before {
+  display: inline-block;
+  content: "";
+  width: 8px;
+  height: 8px;
+  /* border-radius: 50%; */
+  background-color: #ffba00;
+  margin-left: 26px;
+}
+.box7::before {
+  display: inline-block;
+  content: "";
+  width: 8px;
+  height: 8px;
+  /* border-radius: 50%; */
+  background-color: #98a7bc;
+  margin-left: 26px;
+}
+::v-deep .el-dialog {
+  background-color: #004d86;
+  margin: auto;
+}
+::v-deep .el-dialog__header {
+  border-bottom: 1px solid #718a9d;
+  margin: auto;
+}
+::v-deep .el-dialog__title {
+  color: #fff;
+  font: 18px;
+}
+.box2 form .el-form-item {
+  color: #fff;
+  margin-right: 20px;
+}
+
+/*  鼠标经过颜色 */
+::v-deep .el-table__body tr:hover > td {
+  background-color: transparent !important;
+}
+::v-deep .box1 form {
+  margin-left: -14px;
+}
+::v-deep .box1 form .el-form-item {
+  margin-top: 17px;
+}
+::v-deep .el-form-item {
+  margin-bottom: 29px;
+}
+.jiben {
+  width: 100%;
+  height: 32px;
+  background-image: url(/static/img/小标题底.b7c6f45a.png);
+  margin-bottom: 18px;
+  color: #fff;
+  padding-left: 16px;
+  line-height: 32px;
+  background-size: contain;
+}
+::v-deep .el-table tr:nth-child(odd) {
+  background: #004d86;
+}
+::v-deep .el-dialog__body {
+  padding: 30px 0px 30px 40px;
+}
+::v-deep .el-form-item__label {
+  padding: 0 0 0 0;
+}
+/* 重置按钮 */
+.el-button--btp.is-active,
+.el-button--btp:active {
+  background: #3da1f8;
+  border-color: #3da1f8;
+  color: #ffffff;
+}
+
+.el-button--btp:focus,
+.el-button--btp:hover {
+  background: #3da1f8;
+  border-color: #3da1f8;
+  color: #ffffff;
+}
+
+.el-button--btp {
+  color: #ffffff;
+  width: 76px;
+  height: 36px;
+  background-color: #1d96ff;
+  border-radius: 4px;
+  font-size: 14px;
+  text-align: center;
+  margin-top: 1px;
+}
+::v-deep .el-dialog {
+  border-radius: 8px;
+}
+::v-deep .has-gutter tr {
+  height: 60px;
+}
+/* 分页样式 */
+::v-deep .pagination-container {
+  background: #004d85 !important;
+}
+::v-deep .el-pagination__total {
+  margin-top: 2px !important;
+}
+::v-deep .el-pagination .el-select .el-input .el-input__inner {
+  background-color: #196299 !important;
+  height: 30px;
+}
+::v-deep .el-pagination.is-background .btn-prev,
+.el-pagination.is-background .btn-next {
+  background-color: #265070 !important;
+}
+::v-deep .el-pagination.is-background .el-pager li {
+  background-color: #196299 !important;
+}
+::v-deep .el-pagination__editor.el-input .el-input__inner {
+  background-color: #196299 !important;
+}
+::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
+  background-color: #1890ff !important;
+}
+::v-deep .el-pagination.is-background .btn-next {
+  background: #265070 !important;
+}
+::v-deep .el-pagination__sizes {
+  display: none !important;
+}
+::v-deep .el-table {
+  background-color: transparent;
+}
+::v-deep .el-pagination {
+  padding: 2px 54px;
+}
+::v-deep .el-button--btcks {
+  color: #ffffff;
+  width: 76px;
+  height: 36px;
+  background-color: #1d96ff;
+  border-radius: 4px;
+  font-size: 14px;
+  text-align: center;
+  margin-top: 1px;
+}
+::v-deep .el-button--btcks:focus,
+.el-button--btcks:hover {
+  background: #1d96ff;
+  border-color: #1d96ff;
+  color: #ffffff;
+}
+
+::v-deep .el-button--btcks.is-active,
+.el-button--btcks:active {
+  background: #1d96ff;
+  border-color: #1d96ff;
+  color: #ffffff;
+}
+</style>

+ 208 - 98
src/views/peopleChuRu/leaveOne/index.vue

@@ -60,21 +60,6 @@
           >删除</el-button
         >
       </el-col>
-      <!-- <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          :loading="exportLoading"
-          @click="handleExport"
-          v-hasPermi="['peopleChuRu:leaveOne:export']"
-        >导出</el-button>
-      </el-col> -->
-      <!-- <right-toolbar
-        :showSearch.sync="showSearch"
-        @queryTable="getList"
-      ></right-toolbar> -->
     </el-row>
 
     <el-table
@@ -82,10 +67,10 @@
       :data="leaveOneList"
       :header-cell-style="{ background: '#003C69', color: 'white' }"
       @selection-change="handleSelectionChange"
+      :cell-class-name="row=>row.row.statusun==1?'baccolor':''"
     >
-      <el-table-column type="selection" width="55" align="center" />
-      <!-- <el-table-column label="主键ID" align="center" prop="id" /> -->
-      <el-table-column label="序号" align="center" type="index" />
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="序号" align="center" type="index"  />
       <el-table-column label="请假人员" align="center" prop="peopleId" />
       <el-table-column
         label="单位"
@@ -102,7 +87,7 @@
       >
         <template slot-scope="scope">
           <span>{{
-            parseTime(scope.row.startTime, "{y}-{m}-{d} {h}-{m}-{s}")
+            parseTime(scope.row.startTime, "{y}-{m}-{d} {h}:{m}:{s}")
           }}</span>
         </template>
       </el-table-column>
@@ -114,7 +99,7 @@
       >
         <template slot-scope="scope">
           <span>{{
-            parseTime(scope.row.endTime, "{y}-{m}-{d} {h}-{m}-{s}")
+            parseTime(scope.row.endTime, "{y}-{m}-{d} {h}:{m}:{s}")
           }}</span>
         </template>
       </el-table-column>
@@ -162,14 +147,13 @@
         class-name="small-padding fixed-width"
       >
         <template slot-scope="scope">
-          <!-- <el-button
-            size="mini"
+          <el-button
+            v-if="scope.row.returnTime == null"
             type="text"
-            icon="el-icon-edit"
+            size="btu"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['peopleChuRu:leaveOne:edit']"
-            >修改</el-button
-          > -->
+            >归队</el-button
+          >
           <el-button
             size="btd"
             type="text"
@@ -189,7 +173,7 @@
       @pagination="getList"
     />
 
-    <!-- 添加或修改人员请假对话框 -->
+    <!-- 添加请假对话框 -->
     <el-dialog
       :title="title"
       :visible.sync="open"
@@ -213,6 +197,29 @@
             @open="blurSelect"
           />
         </el-form-item>
+        <el-form-item label="人员" prop="peopleId">
+          <el-select
+            v-model="form.peopleId"
+            placeholder="请选择请假人员"
+            ref="headerSearchSelect"
+            clearable
+          >
+            <el-option
+              v-for="(item, i) in renYuan"
+              :key="i"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="批准部门" prop="approvalDepartment">
+          <treeselect
+            v-model="form.approvalDepartment"
+            :options="deptOptions"
+            placeholder="请选择批准部门"
+          />
+        </el-form-item>
         <el-form-item label="请假类型" prop="leaveType">
           <el-select
             v-model="form.leaveType"
@@ -227,12 +234,6 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <!-- <el-form-item label="请假人员" prop="peopleId">
-          <el-input v-model="form.peopleId" placeholder="请输入请假人员" />
-        </el-form-item> -->
-        <!-- <el-form-item label="单位" prop="unitId">
-          <el-input v-model="form.unitId" placeholder="请输入单位" />
-        </el-form-item> -->
         <el-form-item label="请假开始时间" prop="startTime">
           <el-date-picker
             clearable
@@ -264,7 +265,7 @@
             v-model="form.departureTime"
             type="datetime"
             default-time="00:00:00"
-            placeholder="请输入离队时间"
+            placeholder="请选择离队时间"
             value-format="yyyy-MM-dd HH:mm:ss"
           >
           </el-date-picker>
@@ -276,18 +277,53 @@
             v-model="form.returnTime"
             type="datetime"
             default-time="00:00:00"
-            placeholder="请输入归队时间"
+            placeholder="请选择归队时间"
             value-format="yyyy-MM-dd HH:mm:ss"
           >
           </el-date-picker>
         </el-form-item>
-        <el-form-item label="请假人员" prop="peopleId">
-          <!-- <el-select
-           multiple
-            v-model="form.peopleId"
+        <div class="jiben">请假原因</div>
+        <el-form-item label="" prop="leaveReason">
+          <el-input
+            v-model="form.leaveReason"
+            type="textarea"
+            placeholder="请输入内容"
+          />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel" size="btn">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 归队请假对话框 -->
+    <el-dialog
+      :title="title"
+      :visible.sync="open1"
+      :close-on-click-modal="false"
+      width="500px"
+      append-to-body
+    >
+      <el-form
+        ref="form1"
+        :model="form1"
+        :rules="rules1"
+        label-width="80px"
+        inline
+      >
+        <el-form-item label="单位" prop="unitId">
+          <treeselect
+            v-model="form1.unitId"
+            :options="deptOptions"
+            placeholder="请选择单位"
+          />
+        </el-form-item>
+        <el-form-item label="人员" prop="peopleId">
+          <el-select
+            v-model="form1.peopleId"
             placeholder="请选择请假人员"
             ref="headerSearchSelect"
-            class="ren_yuan"
+            clearable
           >
             <el-option
               v-for="(item, i) in renYuan"
@@ -296,40 +332,89 @@
               :value="item.id"
             >
             </el-option>
-          </el-select> -->
+          </el-select>
+        </el-form-item>
+        <el-form-item label="批准部门" prop="approvalDepartment">
+          <treeselect
+            v-model="form1.approvalDepartment"
+            :options="deptOptions"
+            placeholder="请选择批准部门"
+          />
+        </el-form-item>
+        <el-form-item label="请假类型" prop="leaveType">
           <el-select
-           v-model="form.peopleId"
-           placeholder="请选择请假人员"
-           ref="headerSearchSelect"
-           clearable
-         >
-           <el-option
-             v-for="(item, i) in renYuan"
-             :key="i"
-             :label="item.name"
-             :value="item.id"
-           >
-           </el-option>
-         </el-select>
+            v-model="form1.leaveType"
+            placeholder="请选择请假类型"
+            clearable
+          >
+            <el-option
+              v-for="dict in ziDian"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
         </el-form-item>
-        <!-- <el-form-item label="离队时间" prop="departureTime">
-          <el-input v-model="form.departureTime" placeholder="请输入离队时间" />
+        <el-form-item label="请假开始时间" prop="startTime">
+          <el-date-picker
+            clearable
+            size="small"
+            v-model="form1.startTime"
+            type="datetime"
+            default-time="00:00:00"
+            placeholder="选择请假开始时间"
+            value-format="yyyy-MM-dd HH:mm:ss"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="请假结束时间" prop="endTime">
+          <el-date-picker
+            clearable
+            size="small"
+            v-model="form1.endTime"
+            type="datetime"
+            default-time="00:00:00"
+            placeholder="选择请假结束时间"
+            value-format="yyyy-MM-dd HH:mm:ss"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="离队时间" prop="departureTime">
+          <el-date-picker
+            clearable
+            size="small"
+            v-model="form1.departureTime"
+            type="datetime"
+            default-time="00:00:00"
+            placeholder="请选择离队时间"
+            value-format="yyyy-MM-dd HH:mm:ss"
+          >
+          </el-date-picker>
         </el-form-item>
         <el-form-item label="归队时间" prop="returnTime">
-          <el-input v-model="form.returnTime" placeholder="请输入归队时间" />
-        </el-form-item> -->
+          <el-date-picker
+            clearable
+            size="small"
+            v-model="form1.returnTime"
+            type="datetime"
+            default-time="00:00:00"
+            placeholder="请选择归队时间"
+            value-format="yyyy-MM-dd HH:mm:ss"
+          >
+          </el-date-picker>
+        </el-form-item>
         <div class="jiben">请假原因</div>
         <el-form-item label="" prop="leaveReason">
           <el-input
-            v-model="form.leaveReason"
+            v-model="form1.leaveReason"
             type="textarea"
             placeholder="请输入内容"
           />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel" size="btn">取 消</el-button>
+        <el-button type="primary" @click="submitForm1">确 定</el-button>
+        <el-button @click="cancel1" size="btn">取 消</el-button>
       </div>
     </el-dialog>
   </div>
@@ -440,13 +525,16 @@ export default {
       ziDian: [],
       // 修改拿到的数据
       result: {},
+      form1: {},
+      rules1: {
+        returnTime: [
+          { required: true, message: "归队时间不能为空", trigger: "blur" },
+        ],
+      },
+      open1: false,
     };
   },
   created() {
-    // if (Cookies.get("shuaxin") != "true") {
-    //   window.location.reload();
-    // }
-    // Cookies.set("shuaxin", "true");
     this.getList();
     // 获取单位树形
     this.getBuMeng();
@@ -518,10 +606,6 @@ export default {
     // 让单位失去焦点
     blurSelect() {
       this.$refs.headerSearchSelect.blur();
-      // this.$refs.abc.blur();
-      // this.$refs.abcd.blur();
-      // this.$refs.abcde.blur();
-      // this.$refs.abcdef.blur();
     },
     // 请假人选中
     qingRen(name) {
@@ -530,19 +614,41 @@ export default {
     /** 查询人员请假列表 */
     getList() {
       this.loading = true;
+      // 获取单位树形
+      this.getBuMeng();
       listLeaveOne(this.queryParams).then((response) => {
-        // 获取单位树形
-        this.getBuMeng();
         this.leaveOneList = response.rows;
+        this.chaoFn(response.rows);
         this.total = response.total;
         this.loading = false;
       });
     },
+    // 计算超时
+    chaoFn(rows) {
+      rows.forEach((item, i) => {
+        if (
+          Date.parse(new Date(item.endTime)) <
+          Date.parse(new Date(item.returnTime))
+        ) {
+          this.leaveOneList[i].statusun = 1;
+        }
+      });
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
+    },
     // 取消按钮
     cancel() {
       this.open = false;
       this.reset();
     },
+    cancel1() {
+      this.open1 = false;
+      this.reset();
+    },
     // 表单重置
     reset() {
       this.form = {
@@ -582,7 +688,15 @@ export default {
         specialApproval: null,
         actualreturntime: null,
       };
+      this.form1 = {
+        id: null,
+        peopleId: null,
+        unitId: null,
+        startTime: null,
+        endTime: null,
+      };
       this.resetForm("form");
+      this.resetForm("form1");
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -594,12 +708,6 @@ export default {
       this.resetForm("queryForm");
       this.handleQuery();
     },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.id);
-      this.single = selection.length !== 1;
-      this.multiple = !selection.length;
-    },
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
@@ -614,34 +722,34 @@ export default {
       const id = row.id || this.ids;
       getLeaveOne(id).then((response) => {
         this.result = response.data;
-        this.result.peopleId = this.result.peopleId.split(",");
-        this.result.peopleId = this.result.peopleId.map(Number);
-        this.form = this.result;
+        this.form1 = this.result;
         // 获取单位树形
         this.getBuMeng();
-        this.getRen(this.form.unitId);
-        this.open = true;
-        this.title = "修改人员请假";
+        this.getRen(this.form1.unitId);
+        this.open1 = true;
+        this.title = "人员请假归队";
       });
     },
     /** 提交按钮 */
     submitForm() {
       this.$refs["form"].validate((valid) => {
         if (valid) {
-          if (this.form.id != null) {
-            this.form.peopleId = this.form.peopleId.join(",");
-            updateLeaveOne(this.form).then((response) => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-              addLeaveOne(this.form).then((response) => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
+          addLeaveOne(this.form).then((response) => {
+            this.$modal.msgSuccess("新增成功");
+            this.open = false;
+            this.getList();
+          });
+        }
+      });
+    },
+    submitForm1() {
+      this.$refs["form1"].validate((valid) => {
+        if (valid) {
+          updateLeaveOne(this.form1).then((response) => {
+            this.$modal.msgSuccess("人员归队成功");
+            this.open1 = false;
+            this.getList();
+          });
         }
       });
     },
@@ -844,5 +952,7 @@ export default {
   background: transparent !important;
 }
 
-
+::v-deep .baccolor{
+  color: rgb(255, 73, 73) !important;
+}
 </style>

+ 156 - 39
src/views/peopleChuRu/peopleBorrow/index.vue

@@ -2,16 +2,39 @@
   <div class="app-container">
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
-        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
-          v-hasPermi="['peopleChuRu:peopleBorrow:add']">新增</el-button>
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['peopleChuRu:peopleBorrow:add']"
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
-        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
-          v-hasPermi="['peopleChuRu:peopleBorrow:edit']">修改</el-button>
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['peopleChuRu:peopleBorrow:edit']"
+          >修改</el-button
+        >
       </el-col>
       <el-col :span="1.5">
-        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
-          v-hasPermi="['peopleChuRu:peopleBorrow:remove']">删除</el-button>
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['peopleChuRu:peopleBorrow:remove']"
+          >删除</el-button
+        >
       </el-col>
       <!-- <el-col :span="1.5">
         <el-button
@@ -31,18 +54,26 @@
       ></right-toolbar> -->
     </el-row>
 
-    <el-table v-loading="loading" :data="peopleBorrowList" @selection-change="handleSelectionChange"
-      :header-cell-style="{ background: '#003C69', color: 'white' }">
+    <el-table
+      v-loading="loading"
+      :data="peopleBorrowList"
+      @selection-change="handleSelectionChange"
+      :header-cell-style="{ background: '#003C69', color: 'white' }"
+    >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="序号" align="center" prop="id">
         <template scope="scope">
           <span>{{
-          (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
+            (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
           }}</span>
         </template>
       </el-table-column>
       <el-table-column label="单位" align="center" prop="unitName" />
-      <el-table-column label="借调人姓名" align="center" prop="transferPeople" />
+      <el-table-column
+        label="借调人姓名"
+        align="center"
+        prop="transferPeople"
+      />
       <!-- <el-table-column
         label="借调人id"
         align="center"
@@ -50,18 +81,32 @@
       /> -->
 
       <!-- <el-table-column label="单位id" align="center" prop="unitId" /> -->
-      <el-table-column label="借调单位" align="center" prop="transferUnitName" />
+      <el-table-column
+        label="借调单位"
+        align="center"
+        prop="transferUnitName"
+      />
       <!-- <el-table-column
         label="借调单位id"
         align="center"
         prop="transferUnitId"
       /> -->
-      <el-table-column label="开始时间" align="center" prop="startTime" width="180">
+      <el-table-column
+        label="开始时间"
+        align="center"
+        prop="startTime"
+        width="180"
+      >
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.startTime, "{y}-{m}-{d}") }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="结束时间" align="center" prop="endTime" width="180">
+      <el-table-column
+        label="结束时间"
+        align="center"
+        prop="endTime"
+        width="180"
+      >
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.endTime, "{y}-{m}-{d}") }}</span>
         </template>
@@ -69,27 +114,52 @@
       <el-table-column label="借调事由" align="center" prop="transferReason" />
       <el-table-column label="职位" align="center" prop="jobTitle">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.post_Level" :value="scope.row.jobTitle" />
+          <dict-tag
+            :options="dict.type.post_Level"
+            :value="scope.row.jobTitle"
+          />
         </template>
       </el-table-column>
       <el-table-column label="军衔" align="center" prop="rankId">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_user_rank" :value="scope.row.rankId" />
+          <dict-tag
+            :options="dict.type.sys_user_rank"
+            :value="scope.row.rankId"
+          />
         </template>
       </el-table-column>
       <!-- <el-table-column label="创建人" align="center" prop="creatName" /> -->
       <el-table-column label="人员状态" align="center" prop="state">
         <template slot-scope="scope">
-          <span v-if="scope.row.state == '0'" style="color: #ff4949">未归队</span>
-          <span v-if="scope.row.state == '1'" style="color: #13ce66">已归队</span>
+          <span v-if="scope.row.state == '0'" style="color: #ff4949"
+            >未归队</span
+          >
+          <span v-if="scope.row.state == '1'" style="color: #13ce66"
+            >已归队</span
+          >
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
-          <el-button v-if="scope.row.common == '1'" size="btu" type="text"
-            v-hasPermi="['peopleChuRu:peopleBorrow:edit']" @click="handle(scope.row)">归队</el-button>
-          <el-button size="btd" type="text" @click="handleDelete(scope.row)"
-            v-hasPermi="['peopleChuRu:peopleBorrow:remove']">删除</el-button>
+          <el-button
+            v-if="scope.row.common == '1'"
+            size="btu"
+            type="text"
+            v-hasPermi="['peopleChuRu:peopleBorrow:edit']"
+            @click="handle(scope.row)"
+            >归队</el-button
+          >
+          <el-button
+            size="btd"
+            type="text"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['peopleChuRu:peopleBorrow:remove']"
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
@@ -103,39 +173,86 @@
     /> -->
 
     <!-- 添加或修改人员借调对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body :close-on-click-modal="false">
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px" inline>
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="800px"
+      append-to-body
+      :close-on-click-modal="false"
+    >
+      <el-form
+        ref="form"
+        :model="form"
+        :rules="rules"
+        label-width="80px"
+        inline
+      >
         <div class="jiben">基本信息</div>
         <el-form-item label="单位" prop="unitId">
           <!-- <el-input v-model="form.unitName" placeholder="请输入单位" /> -->
-          <treeselect v-model="form.unitId" :options="deptOptions" placeholder="请选择单位" @select="selectPeo"
-            @open="blurSelect" />
+          <treeselect
+            v-model="form.unitId"
+            :options="deptOptions"
+            placeholder="请选择单位"
+            @select="selectPeo"
+            @open="blurSelect"
+          />
         </el-form-item>
         <el-form-item />
         <el-form-item label="借调人姓名" prop="transferPeople">
-          <el-select v-model="form.transferPeopleId" placeholder="请输入借调人姓名" ref="headerSearchSelect">
-            <el-option v-for="(item, i) in renYuan" :key="i" :label="item.name" :value="item.id" @click.native="
-              jieRen(item.name, item.rankId, item.jobTitle, item)
-            " class="input_xiala">
+          <el-select
+            v-model="form.transferPeopleId"
+            placeholder="请输入借调人姓名"
+            ref="headerSearchSelect"
+          >
+            <el-option
+              v-for="(item, i) in renYuan"
+              :key="i"
+              :label="item.name"
+              :value="item.id"
+              @click.native="
+                jieRen(item.name, item.rankId, item.jobTitle, item)
+              "
+              class="input_xiala"
+            >
             </el-option>
           </el-select>
         </el-form-item>
         <el-form-item label="借调单位名称" prop="transferUnitName">
-          <el-input v-model="form.transferUnitName" placeholder="请输入借调单位名称" />
+          <el-input
+            v-model="form.transferUnitName"
+            placeholder="请输入借调单位名称"
+          />
         </el-form-item>
         <el-form-item label="借调开始时间" prop="startTime">
-          <el-date-picker clearable size="small" v-model="form.startTime" type="date" value-format="yyyy-MM-dd"
-            placeholder="选择借调开始时间">
+          <el-date-picker
+            clearable
+            size="small"
+            v-model="form.startTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择借调开始时间"
+          >
           </el-date-picker>
         </el-form-item>
         <el-form-item label="借调结束时间" prop="endTime">
-          <el-date-picker clearable size="small" v-model="form.endTime" type="date" value-format="yyyy-MM-dd"
-            placeholder="选择借调结束时间">
+          <el-date-picker
+            clearable
+            size="small"
+            v-model="form.endTime"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择借调结束时间"
+          >
           </el-date-picker>
         </el-form-item>
         <div class="jiben">借调事由</div>
         <el-form-item prop="transferReason">
-          <el-input v-model="form.transferReason" type="textarea" placeholder="请输入借调原因" />
+          <el-input
+            v-model="form.transferReason"
+            type="textarea"
+            placeholder="请输入借调原因"
+          />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -363,7 +480,7 @@ export default {
           this.getList();
           this.$modal.msgSuccess("删除成功");
         })
-        .catch(() => { });
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
@@ -378,7 +495,7 @@ export default {
           this.$download.name(response.msg);
           this.exportLoading = false;
         })
-        .catch(() => { });
+        .catch(() => {});
     },
     // 点击归队弹出询问框
     handle(row) {
@@ -395,7 +512,7 @@ export default {
             this.getList();
           });
         })
-        .catch(() => { });
+        .catch(() => {});
     },
   },
 };