Selaa lähdekoodia

更改军车,更改太少,更改公共样式,更改人员进出

sunyanqiang 2 vuotta sitten
vanhempi
commit
837a5c7244

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

@@ -108,7 +108,7 @@
 
 
 /* 设置表格单双数颜色 */
 /* 设置表格单双数颜色 */
 .el-table tr:nth-child(odd) {
 .el-table tr:nth-child(odd) {
-  background: #00365F;
+  background: #00365F !important;
 }
 }
 
 
 .el-table tr:nth-child(even) {
 .el-table tr:nth-child(even) {

+ 142 - 296
src/views/bdglSecret/secret/index.vue

@@ -1,89 +1,37 @@
 <template>
 <template>
   <div class="app-container">
   <div class="app-container">
-    <el-form
-      :model="queryParams"
-      ref="queryForm"
-      :inline="true"
-      label-width="68px"
-    >
+    <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
       <el-form-item label="" prop="unitId">
       <el-form-item label="" prop="unitId">
-        <treeselect
-          v-model="queryParams.unitId"
-          :options="deptOptions"
-          placeholder="请选择单位"
-          @select="selectshou"
-        />
+        <treeselect v-model="queryParams.unitId" :options="deptOptions" placeholder="请选择单位" @select="selectshou" />
       </el-form-item>
       </el-form-item>
       <el-form-item label="" prop="kind">
       <el-form-item label="" prop="kind">
-        <el-select
-          v-model="queryParams.kind"
-          placeholder="请选择类型"
-          clearable
-          size="small"
-          @change="secrecy"
-        >
-          <el-option
-            v-for="item in ziDian"
-            :key="item.dictValue"
-            :label="item.dictLabel"
-            :value="item.dictValue"
-            class="input_xiala"
-          />
+        <el-select v-model="queryParams.kind" placeholder="请选择类型" clearable size="small" @change="secrecy">
+          <el-option v-for="item in ziDian" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"
+            class="input_xiala" />
         </el-select>
         </el-select>
       </el-form-item>
       </el-form-item>
       <el-form-item prop="peopleName">
       <el-form-item prop="peopleName">
-        <el-input
-          v-model="queryParams.peopleName"
-          placeholder="请输入责任人"
-          clearable
-          size="small"
-          @input="handleQuery"
-        />
+        <el-input v-model="queryParams.peopleName" placeholder="请输入责任人" clearable size="small" @input="handleQuery" />
       </el-form-item>
       </el-form-item>
       <el-form-item>
       <el-form-item>
-        <el-button icon="el-icon-refresh" size="btr" @click="resetQuery"
-          >重置</el-button
-        >
+        <el-button icon="el-icon-refresh" size="btr" @click="resetQuery">重置</el-button>
       </el-form-item>
       </el-form-item>
     </el-form>
     </el-form>
 
 
     <el-row :gutter="10" class="mb8">
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
       <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['bdglSecret:secret:add']"
-          >新增</el-button
-        >
+        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
+          v-hasPermi="['bdglSecret:secret:add']">新增</el-button>
       </el-col>
       </el-col>
       <el-col :span="1.5">
       <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['bdglSecret:secret:edit']"
-          >修改</el-button
-        >
+        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
+          v-hasPermi="['bdglSecret:secret:edit']">修改</el-button>
       </el-col>
       </el-col>
       <el-col :span="1.5">
       <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['bdglSecret:secret:remove']"
-          >删除</el-button
-        >
+        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
+          v-hasPermi="['bdglSecret:secret:remove']">删除</el-button>
       </el-col>
       </el-col>
-     <!-- <el-col :span="1.5">
+      <!-- <el-col :span="1.5">
         <el-button
         <el-button
           type="warning"
           type="warning"
           plain
           plain
@@ -98,54 +46,49 @@
     </el-row>
     </el-row>
 
 
     <div class="hezi">
     <div class="hezi">
-    <div  class="tji">涉密物品统计</div>
-    <div style="display: flex;
+      <div class="tji">涉密物品统计</div>
+      <div style="display: flex;
                     justify-content:space-evenly;
                     justify-content:space-evenly;
                     padding: 41px 20px;">
                     padding: 41px 20px;">
-    <div style="width: 173px;
+        <div style="width: 173px;
                     display: flex;
                     display: flex;
                     justify-content: space-evenly;
                     justify-content: space-evenly;
                     align-items: center;">
                     align-items: center;">
-     <span>移动载体</span>
-     <span><span style="font-size: 25px; margin-right: 18px;">{{tongJiList[3]}}</span>台</span>
+          <span>移动载体</span>
+          <span><span style="font-size: 25px; margin-right: 18px;">{{tongJiList[3]}}</span>台</span>
         </div>
         </div>
-        <div  style="width: 173px;
+        <div style="width: 173px;
                          display: flex;
                          display: flex;
                            justify-content:space-between;
                            justify-content:space-between;
                           align-items: center;">
                           align-items: center;">
-        <span>军用手机</span>
-             <span><span style="font-size: 25px; margin-right: 18px;">{{tongJiList[0]}}</span>台</span>
-            </div>
-            <div  style="width: 173px;
+          <span>军用手机</span>
+          <span><span style="font-size: 25px; margin-right: 18px;">{{tongJiList[0]}}</span>台</span>
+        </div>
+        <div style="width: 173px;
        display: flex;
        display: flex;
         justify-content: space-evenly;
         justify-content: space-evenly;
        align-items: center;">
        align-items: center;">
-<span>电脑</span>
-     <span><span style="font-size: 25px; margin-right: 18px;">{{tongJiList[1]}}</span>台</span>
-                </div>
-                <div  style="width: 173px;
+          <span>电脑</span>
+          <span><span style="font-size: 25px; margin-right: 18px;">{{tongJiList[1]}}</span>台</span>
+        </div>
+        <div style="width: 173px;
  display: flex;
  display: flex;
    justify-content: space-evenly;
    justify-content: space-evenly;
  align-items: center;">
  align-items: center;">
-<span>相机</span>
-     <span><span style="font-size: 25px; margin-right: 18px;">{{tongJiList[2]}}</span>台</span>
-                    </div>
-    </div>
+          <span>相机</span>
+          <span><span style="font-size: 25px; margin-right: 18px;">{{tongJiList[2]}}</span>台</span>
+        </div>
+      </div>
     </div>
     </div>
 
 
-    <el-table
-      v-loading="loading"
-      :data="bdglsecrecyList"
-      @selection-change="handleSelectionChange"
-      :header-cell-style="{ background: '#003C69', color: 'white' }"
-      style="width: 100%"
-    >
+    <el-table v-loading="loading" :data="bdglsecrecyList" @selection-change="handleSelectionChange"
+      :header-cell-style="{ background: '#003C69', color: 'white' }" style="width: 100%">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column type="selection" width="55" align="center" />
       <!-- <el-table-column label="序号" align="center" prop="id" /> -->
       <!-- <el-table-column label="序号" align="center" prop="id" /> -->
       <el-table-column label="序号" type="index" width="50" align="center">
       <el-table-column label="序号" type="index" width="50" align="center">
         <template scope="scope">
         <template scope="scope">
           <span>{{
           <span>{{
-            (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
+          (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
           }}</span>
           }}</span>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
@@ -158,65 +101,26 @@
       <el-table-column label="编号" align="center" prop="number" width="200" />
       <el-table-column label="编号" align="center" prop="number" width="200" />
       <!-- <el-table-column label="密级" align="center" prop="confidential" /> -->
       <!-- <el-table-column label="密级" align="center" prop="confidential" /> -->
       <!-- <el-table-column label="使用人" align="center" prop="people1Name" /> -->
       <!-- <el-table-column label="使用人" align="center" prop="people1Name" /> -->
-      <el-table-column
-        label="使用单位"
-        align="center"
-        prop="unitId"
-        :formatter="deptIdformatter"
-        width="200"
-      />
+      <el-table-column label="使用单位" align="center" prop="unitId" :formatter="deptIdformatter" width="200" />
       <el-table-column label="责任人" align="center" prop="peopleName" />
       <el-table-column label="责任人" align="center" prop="peopleName" />
-      <el-table-column
-        label="用途"
-        align="center"
-        show-overflow-tooltip
-        prop="people2Name"
-        width="200"
-      />
-      <el-table-column
-        label="启用时间"
-        align="center"
-        prop="startTime"
-        width="160"
-      >
+      <el-table-column label="用途" align="center" show-overflow-tooltip prop="people2Name" width="200" />
+      <el-table-column label="启用时间" align="center" prop="startTime" width="160">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.startTime, "{y}-{m}-{d}") }}</span>
           <span>{{ parseTime(scope.row.startTime, "{y}-{m}-{d}") }}</span>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column
-        label="停用时间"
-        align="center"
-        prop="endTime"
-        width="160"
-      >
+      <el-table-column label="停用时间" align="center" prop="endTime" width="160">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.endTime, "{y}-{m}-{d}") }}</span>
           <span>{{ parseTime(scope.row.endTime, "{y}-{m}-{d}") }}</span>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column
-        label="归还时间"
-        align="center"
-        prop="hindOverTime"
-        width="160"
-      >
+      <el-table-column label="归还时间" align="center" prop="hindOverTime" width="160">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.hindOverTime, "{y}-{m}-{d}") }}</span>
           <span>{{ parseTime(scope.row.hindOverTime, "{y}-{m}-{d}") }}</span>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column
-        label="备注"
-        align="center"
-        show-overflow-tooltip
-        prop="remarks"
-        width="200"
-      />
-      <el-table-column
-        label="操作"
-        align="center"
-        class-name="small-padding fixed-width"
-        width="200"
-        fixed="right"
-      >
+      <el-table-column label="备注" align="center" show-overflow-tooltip prop="remarks" width="200" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200" fixed="right">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <!-- <el-button
           <!-- <el-button
             size="btk"
             size="btk"
@@ -225,66 +129,30 @@
             v-hasPermi="['grassrootsregistration:bdgldiary:edit']"
             v-hasPermi="['grassrootsregistration:bdgldiary:edit']"
             ><span class="chakan">查看</span></el-button
             ><span class="chakan">查看</span></el-button
           > -->
           > -->
-          <el-button
-            size="btu"
-            type="text"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['bdglSecret:secret:edit']"
-            ><span class="edit">修改</span></el-button
-          >
-          <el-button
-            size="btd"
-            type="text"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['bdglSecret:secret:remove']"
-            ><span class="delete">删除</span></el-button
-          >
+          <el-button size="btu" type="text" @click="handleUpdate(scope.row)" v-hasPermi="['bdglSecret:secret:edit']">
+            <span class="edit">修改</span>
+          </el-button>
+          <el-button size="btd" type="text" @click="handleDelete(scope.row)" v-hasPermi="['bdglSecret:secret:remove']">
+            <span class="delete">删除</span>
+          </el-button>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
 
 
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <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="1016px"
-      append-to-body
-      :close-on-click-modal="false"
-    >
+    <el-dialog :title="title" :visible.sync="open" width="1016px" append-to-body :close-on-click-modal="false">
       <div class="jiben">基本信息</div>
       <div class="jiben">基本信息</div>
-      <el-form
-        ref="form"
-        :model="form"
-        :rules="rules"
-        label-width="80px"
-        :inline="true"
-      >
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px" :inline="true">
         <el-form-item label="使用单位" prop="unitId">
         <el-form-item label="使用单位" prop="unitId">
-          <treeselect
-            v-model="form.unitId"
-            :options="deptOptions"
-            placeholder="请选择使用单位"
-            @select="selectPeo"
-            @open="blurSelect"
-          />
+          <treeselect v-model="form.unitId" :options="deptOptions" placeholder="请选择使用单位" @select="selectPeo" />
         </el-form-item>
         </el-form-item>
         <el-form-item label="类型" prop="kind">
         <el-form-item label="类型" prop="kind">
           <el-select v-model="form.kind" placeholder="请选择类型">
           <el-select v-model="form.kind" placeholder="请选择类型">
-            <el-option
-              v-for="item in ziDian"
-              :key="item.dictValue"
-              :label="item.dictLabel"
-              :value="item.dictValue"
-              class="input_xiala"
-            >
+            <el-option v-for="item in ziDian" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"
+              class="input_xiala">
             </el-option>
             </el-option>
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
@@ -316,14 +184,8 @@
         </el-form-item> -->
         </el-form-item> -->
         <el-form-item label="责任人" prop="peopleId">
         <el-form-item label="责任人" prop="peopleId">
           <el-select v-model="form.peopleId" placeholder="请选择负责人">
           <el-select v-model="form.peopleId" placeholder="请选择负责人">
-            <el-option
-              v-for="(item, i) in renYuan"
-              :key="i"
-              :label="item.name"
-              :value="item.id"
-              @click.native="zheRenRe(item.name)"
-              class="input_xiala"
-            >
+            <el-option v-for="(item, i) in renYuan" :key="i" :label="item.name" :value="item.id"
+              @click.native="zheRenRe(item.name)" class="input_xiala">
             </el-option>
             </el-option>
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
@@ -341,57 +203,27 @@
           </el-select>
           </el-select>
         </el-form-item> -->
         </el-form-item> -->
         <el-form-item label="启用时间" prop="startTime">
         <el-form-item label="启用时间" prop="startTime">
-          <el-date-picker
-            clearable
-            size="small"
-            v-model="form.startTime"
-            type="date"
-            :editable="false"
-            value-format="yyyy-MM-dd"
-            placeholder="请选择启用时间"
-          >
+          <el-date-picker clearable size="small" v-model="form.startTime" type="date" :editable="false"
+            value-format="yyyy-MM-dd" placeholder="请选择启用时间">
           </el-date-picker>
           </el-date-picker>
         </el-form-item>
         </el-form-item>
         <el-form-item label="停用时间" prop="endTime">
         <el-form-item label="停用时间" prop="endTime">
-          <el-date-picker
-            ref="bb"
-            clearable
-            size="small"
-            v-model="form.endTime"
-            type="date"
-            :editable="false"
-            value-format="yyyy-MM-dd"
-            placeholder="请选择停用时间"
-          >
+          <el-date-picker ref="bb" clearable size="small" v-model="form.endTime" type="date" :editable="false"
+            value-format="yyyy-MM-dd" placeholder="请选择停用时间">
           </el-date-picker>
           </el-date-picker>
         </el-form-item>
         </el-form-item>
         <el-form-item label="归还时间" prop="hindOverTime">
         <el-form-item label="归还时间" prop="hindOverTime">
-          <el-date-picker
-            clearable
-            size="small"
-            v-model="form.hindOverTime"
-            type="date"
-            :editable="false"
-            value-format="yyyy-MM-dd"
-            placeholder="请选择归还时间"
-          >
+          <el-date-picker clearable size="small" v-model="form.hindOverTime" type="date" :editable="false"
+            value-format="yyyy-MM-dd" placeholder="请选择归还时间">
           </el-date-picker>
           </el-date-picker>
         </el-form-item>
         </el-form-item>
         <div class="jiben">用途</div>
         <div class="jiben">用途</div>
         <el-form-item label="" prop="people2Name">
         <el-form-item label="" prop="people2Name">
-          <el-input
-            v-model="form.people2Name"
-            type="textarea"
-            placeholder="请输入用途"
-          />
+          <el-input v-model="form.people2Name" type="textarea" placeholder="请输入用途" />
         </el-form-item>
         </el-form-item>
         <div class="jiben">备注</div>
         <div class="jiben">备注</div>
         <el-form-item label="" prop="remarks">
         <el-form-item label="" prop="remarks">
-          <el-input
-            v-model="form.remarks"
-            type="textarea"
-            placeholder="请输入备注"
-          />
+          <el-input v-model="form.remarks" type="textarea" placeholder="请输入备注" />
         </el-form-item>
         </el-form-item>
       </el-form>
       </el-form>
       <div slot="footer" class="dialog-footer">
       <div slot="footer" class="dialog-footer">
@@ -400,18 +232,9 @@
       </div>
       </div>
     </el-dialog>
     </el-dialog>
     <div class="fff">
     <div class="fff">
-      <el-dialog
-        :visible.sync="menuRoleVisible"
-        :title="title"
-        append-to-body
-        id="chakan"
-        :close-on-click-modal="false"
-      >
-        <bdglsecrecy
-          v-if="menuRoleVisible"
-          ref="menuRole"
-          :message="wordInfo"
-        ></bdglsecrecy>
+      <el-dialog :visible.sync="menuRoleVisible" :title="title" append-to-body id="chakan"
+        :close-on-click-modal="false">
+        <bdglsecrecy v-if="menuRoleVisible" ref="menuRole" :message="wordInfo"></bdglsecrecy>
       </el-dialog>
       </el-dialog>
     </div>
     </div>
   </div>
   </div>
@@ -528,7 +351,7 @@ export default {
       },
       },
       unitId: [],
       unitId: [],
       //获取统计数据
       //获取统计数据
-      tongJiList:{}
+      tongJiList: {}
     };
     };
   },
   },
   created() {
   created() {
@@ -542,16 +365,16 @@ export default {
     this.tongJi()
     this.tongJi()
   },
   },
   methods: {
   methods: {
-  //获取统计数量
-  tongJi(unitids){
-  getNumber(unitids).then(res=>{
-  this.tongJiList=res.data
-  })
-  },
+    //获取统计数量
+    tongJi(unitids) {
+      getNumber(unitids).then(res => {
+        this.tongJiList = res.data
+      })
+    },
     selectshou(data) {
     selectshou(data) {
       this.queryParams.unitId = data.id;
       this.queryParams.unitId = data.id;
       this.getList();
       this.getList();
-      this.tongJi({unitid:this.queryParams.unitId})
+      this.tongJi({ unitid: this.queryParams.unitId })
     },
     },
     //单位翻译
     //单位翻译
     deptIdformatter(row, column) {
     deptIdformatter(row, column) {
@@ -584,11 +407,11 @@ export default {
     // 重置表单人员
     // 重置表单人员
     ChongZhiRen() {
     ChongZhiRen() {
       // 批准人
       // 批准人
-      (this.form.peopleId2 = null),
-        // 使用人
-        (this.form.peopleId1 = null),
-        // 责任人
-        (this.form.peopleId = null);
+      this.form.peopleId2 = null;
+      // 使用人
+      this.form.peopleId1 = null;
+      // 责任人
+      this.form.peopleId = null;
     },
     },
     // 获取主持人
     // 获取主持人
     getZhuChi(id) {
     getZhuChi(id) {
@@ -685,18 +508,13 @@ export default {
       this.reset();
       this.reset();
       this.resetForm("queryForm");
       this.resetForm("queryForm");
       this.queryParams.unitId = null;
       this.queryParams.unitId = null;
-    this.tongJi({unitid:this.queryParams.unitId})
+      this.tongJi({ unitid: this.queryParams.unitId })
       this.handleQuery();
       this.handleQuery();
     },
     },
     /** 对话框重置按钮操作 */
     /** 对话框重置按钮操作 */
     resertwo() {
     resertwo() {
       this.reset();
       this.reset();
     },
     },
-    // 让select失去焦点
-    blurSelect() {
-      this.$refs.aa.blur();
-      this.$refs.bb.blur();
-    },
     // 多选框选中数据
     // 多选框选中数据
     handleSelectionChange(selection) {
     handleSelectionChange(selection) {
       this.ids = selection.map((item) => item.id);
       this.ids = selection.map((item) => item.id);
@@ -706,9 +524,9 @@ export default {
     /** 新增按钮操作 */
     /** 新增按钮操作 */
     handleAdd() {
     handleAdd() {
       // 人员列表
       // 人员列表
-      (this.renYuan = []),
-        // 获取分类
-        this.reset();
+      this.renYuan = [];
+      // 获取分类
+      this.reset();
       this.getTreeselect();
       this.getTreeselect();
       // 查询字典
       // 查询字典
       this.getdict();
       this.getdict();
@@ -753,14 +571,14 @@ export default {
               this.$modal.msgSuccess("修改成功");
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.open = false;
               this.getList();
               this.getList();
-           this.tongJi({unitid:this.queryParams.unitId})
+              this.tongJi({ unitid: this.queryParams.unitId })
             });
             });
           } else {
           } else {
             addSecret(this.form).then((response) => {
             addSecret(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.open = false;
               this.getList();
               this.getList();
-              this.tongJi({unitid:this.queryParams.unitId})
+              this.tongJi({ unitid: this.queryParams.unitId })
 
 
             });
             });
           }
           }
@@ -780,10 +598,10 @@ export default {
         })
         })
         .then(() => {
         .then(() => {
           this.getList();
           this.getList();
-           this.tongJi({unitid:this.queryParams.unitId})
+          this.tongJi({ unitid: this.queryParams.unitId })
           this.$modal.msgSuccess("删除成功");
           this.$modal.msgSuccess("删除成功");
         })
         })
-        .catch(() => {});
+        .catch(() => { });
     },
     },
     /** 导出按钮操作 */
     /** 导出按钮操作 */
     handleExport() {
     handleExport() {
@@ -798,7 +616,7 @@ export default {
           this.$download.name(response.msg);
           this.$download.name(response.msg);
           this.exportLoading = false;
           this.exportLoading = false;
         })
         })
-        .catch(() => {});
+        .catch(() => { });
     },
     },
   },
   },
 };
 };
@@ -808,25 +626,31 @@ export default {
 ::v-deep .el-dialog {
 ::v-deep .el-dialog {
   background: #004d86 !important;
   background: #004d86 !important;
 }
 }
+
 ::v-deep .el-textarea__inner {
 ::v-deep .el-textarea__inner {
   width: 920px;
   width: 920px;
   height: 104px;
   height: 104px;
 }
 }
+
 ::v-deep .el-dialog__header {
 ::v-deep .el-dialog__header {
   border-bottom: 1px solid #718a9d;
   border-bottom: 1px solid #718a9d;
 }
 }
+
 ::v-deep .el-dialog__title {
 ::v-deep .el-dialog__title {
   color: #fff;
   color: #fff;
   font: 18px;
   font: 18px;
 }
 }
+
 ::v-deep .el-dialog__headerbtn .el-dialog__close {
 ::v-deep .el-dialog__headerbtn .el-dialog__close {
   color: #fff;
   color: #fff;
 }
 }
+
 ::v-deep .el-form-item__label {
 ::v-deep .el-form-item__label {
   font: 16px;
   font: 16px;
   color: #fff;
   color: #fff;
   width: 100px !important;
   width: 100px !important;
 }
 }
+
 ::v-deep .el-input__inner {
 ::v-deep .el-input__inner {
   /* width: 200px !important;
   /* width: 200px !important;
   height: 36px; */
   height: 36px; */
@@ -835,11 +659,13 @@ export default {
   border: 1px solid white !important;
   border: 1px solid white !important;
   border-color: #fff !important;
   border-color: #fff !important;
 }
 }
+
 /* 单位框背景颜色 */
 /* 单位框背景颜色 */
 ::v-deep .vue-treeselect__control {
 ::v-deep .vue-treeselect__control {
   background: transparent !important;
   background: transparent !important;
   color: #fff;
   color: #fff;
 }
 }
+
 /* 基本信息背景 */
 /* 基本信息背景 */
 .jiben {
 .jiben {
   width: 920px;
   width: 920px;
@@ -850,12 +676,14 @@ export default {
   padding-left: 16px;
   padding-left: 16px;
   line-height: 32px;
   line-height: 32px;
 }
 }
+
 ::v-deep .el-dialog__body {
 ::v-deep .el-dialog__body {
   margin: 10px 30px 20px 50px;
   margin: 10px 30px 20px 50px;
   padding-top: 20px !important;
   padding-top: 20px !important;
   box-sizing: border-box;
   box-sizing: border-box;
   /* padding: 30px 12px 30px 28px; */
   /* padding: 30px 12px 30px 28px; */
 }
 }
+
 /*调整表单间距 */
 /*调整表单间距 */
 ::v-deep .el-form-item__content {
 ::v-deep .el-form-item__content {
   width: 200px;
   width: 200px;
@@ -864,14 +692,17 @@ export default {
 .contents {
 .contents {
   padding: 0px 40px !important;
   padding: 0px 40px !important;
 }
 }
+
 /* 下拉菜单 */
 /* 下拉菜单 */
 .el-dropdown-link {
 .el-dropdown-link {
   cursor: pointer;
   cursor: pointer;
   color: #409eff;
   color: #409eff;
 }
 }
+
 .el-icon-arrow-down {
 .el-icon-arrow-down {
   font-size: 12px;
   font-size: 12px;
 }
 }
+
 /* 刷新图标 */
 /* 刷新图标 */
 /* .el-icon-refresh {
 /* .el-icon-refresh {
   width: 76px;
   width: 76px;
@@ -889,20 +720,24 @@ export default {
   background-color: #004d86;
   background-color: #004d86;
   color: #fff;
   color: #fff;
 }
 }
+
 .el-select-dropdown__item {
 .el-select-dropdown__item {
   color: #fff;
   color: #fff;
 }
 }
+
 /* 时间选择 */
 /* 时间选择 */
 ::v-deep .el-input--small .el-input__inner {
 ::v-deep .el-input--small .el-input__inner {
   width: 200px;
   width: 200px;
   height: 36px;
   height: 36px;
   line-height: 36px;
   line-height: 36px;
 }
 }
+
 .el-date-editor.el-input {
 .el-date-editor.el-input {
   width: 200px;
   width: 200px;
   height: 36px;
   height: 36px;
   line-height: 36px;
   line-height: 36px;
 }
 }
+
 ::v-deep .el-date-editor.el-input .el-input__inner {
 ::v-deep .el-date-editor.el-input .el-input__inner {
   height: 36px;
   height: 36px;
   line-height: 36px;
   line-height: 36px;
@@ -912,18 +747,22 @@ export default {
 ::v-deep .vue-treeselect__single-value {
 ::v-deep .vue-treeselect__single-value {
   color: #fff !important;
   color: #fff !important;
 }
 }
+
 /* 分页按钮 */
 /* 分页按钮 */
 ::v-deep .el-pagination.is-background .el-pager li {
 ::v-deep .el-pagination.is-background .el-pager li {
   background-color: #004d86;
   background-color: #004d86;
   color: #fff;
   color: #fff;
 }
 }
+
 ::v-deep .el-pagination.is-background .btn-next {
 ::v-deep .el-pagination.is-background .btn-next {
   background-color: #004d86;
   background-color: #004d86;
   color: #fff;
   color: #fff;
 }
 }
+
 ::v-deep .el-input__inner {
 ::v-deep .el-input__inner {
   cursor: pointer !important;
   cursor: pointer !important;
 }
 }
+
 /* 底部确定取消按钮 */
 /* 底部确定取消按钮 */
 ::v-deep .el-dialog__footer {
 ::v-deep .el-dialog__footer {
   padding: 18px 40px 30px 0px;
   padding: 18px 40px 30px 0px;
@@ -934,46 +773,53 @@ export default {
 ::v-deep .el-dialog {
 ::v-deep .el-dialog {
   width: 1060px !important;
   width: 1060px !important;
 }
 }
+
 ::v-deep .el-dialog__body {
 ::v-deep .el-dialog__body {
   padding: none !important;
   padding: none !important;
 }
 }
+
 /* 文件编号背景颜色 */
 /* 文件编号背景颜色 */
 ::v-deep .el-input.is-disabled .el-input__inner {
 ::v-deep .el-input.is-disabled .el-input__inner {
   background: transparent !important;
   background: transparent !important;
 }
 }
+
 /* 调整输入框提示文字颜色 */
 /* 调整输入框提示文字颜色 */
 ::v-deep .vue-treeselect__placeholder {
 ::v-deep .vue-treeselect__placeholder {
   color: #bdbdbd4f !important;
   color: #bdbdbd4f !important;
 }
 }
+
 ::v-deep input::-webkit-input-placeholder {
 ::v-deep input::-webkit-input-placeholder {
   color: #bdbdbd4f !important;
   color: #bdbdbd4f !important;
 }
 }
+
 ::v-deep input:-moz-placeholder {
 ::v-deep input:-moz-placeholder {
   color: #bdbdbd4f !important;
   color: #bdbdbd4f !important;
 }
 }
-.hezi{
-      height: 100px;
-        margin-bottom: 13px;
-        margin-top: 15px;
-      position: relative;
-       background:rgb(0, 60, 105);
-       color: #fff;
-      font-size: 18px;
-      font-weight: 600;
-
-
-}
-.tji{
-    width: 176px;
-    height: 36px;
-    text-align: center;
-    line-height: 36px;
-    position: absolute;
-    top: -18px;
-   right: 87px;
-     color: #fff;
-     font-size: 18px;
-     font-weight: 600;
-     background: #004D86;
+
+.hezi {
+  height: 100px;
+  margin-bottom: 13px;
+  margin-top: 15px;
+  position: relative;
+  background: rgb(0, 60, 105);
+  color: #fff;
+  font-size: 18px;
+  font-weight: 600;
+
+
+}
+
+.tji {
+  width: 176px;
+  height: 36px;
+  text-align: center;
+  line-height: 36px;
+  position: absolute;
+  top: -18px;
+  right: 87px;
+  color: #fff;
+  font-size: 18px;
+  font-weight: 600;
+  background: #004D86;
 }
 }
 </style>
 </style>

+ 1 - 1
src/views/combatduty/PeopleStatistics/index.vue

@@ -362,7 +362,7 @@ export default {
 }
 }
 .form-box {
 .form-box {
   width: 800px;
   width: 800px;
-  margin-top: 280px;
+  margin-top: 56px;
 }
 }
 ::v-deep .el-radio {
 ::v-deep .el-radio {
   color: #fff;
   color: #fff;

+ 262 - 157
src/views/combatduty/militarydutyinfo/index.vue

@@ -125,9 +125,9 @@
         </template>
         </template>
       </el-table-column>
       </el-table-column>
       <!-- <el-table-column label="号码号牌ID" align="center" prop="numberPlateId" /> -->
       <!-- <el-table-column label="号码号牌ID" align="center" prop="numberPlateId" /> -->
-      <el-table-column label="号码号牌" align="center" prop="numberPlateName" />
+      <el-table-column label="号码号牌" align="center" prop="numberPlateName" show-overflow-tooltip/>
       <!-- <el-table-column label="车属单位" align="center" prop="carUnitId" :formatter="carUnitIdFormat" /> -->
       <!-- <el-table-column label="车属单位" align="center" prop="carUnitId" :formatter="carUnitIdFormat" /> -->
-      <el-table-column label="车属单位名称" align="center" prop="carUnitName" />
+      <el-table-column label="车属单位名称" align="center" prop="carUnitName" show-overflow-tooltip/>
       <el-table-column label="车辆类别" align="center" prop="carType" />
       <el-table-column label="车辆类别" align="center" prop="carType" />
       <el-table-column label="车辆状态" align="center" prop="carStates">
       <el-table-column label="车辆状态" align="center" prop="carStates">
         <template slot-scope="scope">
         <template slot-scope="scope">
@@ -136,8 +136,8 @@
       </el-table-column>
       </el-table-column>
       <el-table-column label="所在位置" align="center" prop="adress" />
       <el-table-column label="所在位置" align="center" prop="adress" />
       <!-- <el-table-column label="司机id" align="center" prop="driverId" /> -->
       <!-- <el-table-column label="司机id" align="center" prop="driverId" /> -->
-      <el-table-column label="司机名字" align="center" prop="driverName" />
-      <el-table-column label="联系方式" align="center" prop="telephone" />
+      <el-table-column label="司机名字" align="center" prop="driverName" show-overflow-tooltip/>
+      <el-table-column label="联系方式" align="center" prop="telephone" show-overflow-tooltip/>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <el-button size="btu" type="text" @click="handleUpdate(scope.row)"
           <el-button size="btu" type="text" @click="handleUpdate(scope.row)"
@@ -155,43 +155,42 @@
     <el-dialog :title="title" :visible.sync="open" width="843px" append-to-body :close-on-click-modal="false">
     <el-dialog :title="title" :visible.sync="open" width="843px" append-to-body :close-on-click-modal="false">
       <el-form ref="form" :model="form" :rules="rules" label-width="80px" :inline="true">
       <el-form ref="form" :model="form" :rules="rules" label-width="80px" :inline="true">
         <div class="jiben">基本信息</div>
         <div class="jiben">基本信息</div>
-        <!-- <el-form-item label="值班时间" prop="attendedTime">
-          <el-date-picker
-            clearable
-            size="small"
-            v-model="form.attendedTime"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择值班时间"
-          >
-          </el-date-picker>
-        </el-form-item>-->
         <el-form-item label="值班时间" prop="attendedTime">
         <el-form-item label="值班时间" prop="attendedTime">
           <el-date-picker clearable size="small" v-model="form.attendedTime" type="date" value-format="yyyy-MM-dd"
           <el-date-picker clearable size="small" v-model="form.attendedTime" type="date" value-format="yyyy-MM-dd"
             placeholder="" v-if="qdflg == 2"></el-date-picker>
             placeholder="" v-if="qdflg == 2"></el-date-picker>
           <el-date-picker v-model="form.attendedTime" type="daterange" range-separator="至" start-placeholder
           <el-date-picker v-model="form.attendedTime" type="daterange" range-separator="至" start-placeholder
             end-placeholder value-format="yyyy-MM-dd" v-if="qdflg == 1"></el-date-picker>
             end-placeholder value-format="yyyy-MM-dd" v-if="qdflg == 1"></el-date-picker>
         </el-form-item>
         </el-form-item>
-        <!-- <el-form-item label="车属单位" prop="carUnitId">
-          <el-select v-model="form.carUnitId" ref="deptId" clearable placeholder="请选择车属单位">
-            <el-option
-              v-for="dict in deptOptions"
-              :key="dict.deptId"
-              :label="dict.deptName"
-              :value="dict.deptId"
-            ></el-option>
-          </el-select>
-        </el-form-item> -->
-        <el-form-item label="车属单位" prop="carUnitName">
-          <el-select v-model="form.carUnitName" @change="carUnitNamechange" clearable placeholder="">
-            <el-option v-for="dict in deptOptions" :key="dict.deptId" :label="dict.deptName" :value="dict"></el-option>
+        <el-form-item label="车属单位" prop="carUnitId">
+          <el-select v-model="busDuoDan"  placeholder="" class="ren_yuans" multiple filterable
+            @remove-tag="selent">
+            <el-option v-for="dict in deptOptions" :key="dict.deptId" :label="dict.deptName" :value="dict.deptId"
+              @click.native="danFn()">
+            </el-option>
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
         <el-form-item label="号码号牌" prop="numberPlateName">
         <el-form-item label="号码号牌" prop="numberPlateName">
-          <el-select v-model="busDuoList" @change="numberPlateNamechange" placeholder="" class="ren_yuans" multiple>
+          <el-select v-model="busDuoList" @change="numberPlateNamechange" placeholder="" class="ren_yuans" multiple
+            filterable>
             <el-option v-for="dict in buslist" :key="dict.id" :label="dict.vehiclenumber" :value="dict.id"></el-option>
             <el-option v-for="dict in buslist" :key="dict.id" :label="dict.vehiclenumber" :value="dict.id"></el-option>
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
+        <el-form-item label="司机名字" prop="driverId">
+          <el-select v-model="busDuoShi" filterable  placeholder="" class="ren_yuans" multiple
+            @remove-tag="busShi(busDuoShi)">
+            <el-option v-for="item,i in rylist" :key="i" :label="item.nickName" :value="item.userId"
+              @click.native="driverNamefun(item)">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="联系方式" prop="telephone">
+          <!-- <el-input  placeholder="" v-model="tag"> -->
+          <div class="ren_yuans tags">
+            <el-tag v-for="tag,i1 in tags" :key="i1" closable :type="tag.type" @close="tagsFn(i1)">
+              {{tag.name}}
+            </el-tag>
+          </div>
+        </el-form-item>
         <el-form-item label="车辆类别" prop="carType">
         <el-form-item label="车辆类别" prop="carType">
           <el-input v-model="form.carType" placeholder="" />
           <el-input v-model="form.carType" placeholder="" />
         </el-form-item>
         </el-form-item>
@@ -207,14 +206,12 @@
         <!-- <el-form-item label="司机id" prop="driverId">
         <!-- <el-form-item label="司机id" prop="driverId">
           <el-input v-model="form.driverId" placeholder="请输入司机id" />
           <el-input v-model="form.driverId" placeholder="请输入司机id" />
         </el-form-item>-->
         </el-form-item>-->
-        <el-form-item label="司机名字" prop="driverName">
+        <!-- <el-form-item label="司机名字" prop="driverName">
           <el-select v-model="form.driverName" @change="driverNamefun" filterable clearable placeholder="">
           <el-select v-model="form.driverName" @change="driverNamefun" filterable clearable placeholder="">
             <el-option v-for="item in rylist" :key="item.id" :label="item.name" :value="item"></el-option>
             <el-option v-for="item in rylist" :key="item.id" :label="item.name" :value="item"></el-option>
           </el-select>
           </el-select>
-        </el-form-item>
-        <el-form-item label="联系方式" prop="telephone">
-          <el-input v-model="form.telephone" placeholder="" />
-        </el-form-item>
+        </el-form-item> -->
+
       </el-form>
       </el-form>
       <div slot="footer" class="dialog-footer">
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm1" v-if="baoCun">保存并继续编辑</el-button>
         <el-button type="primary" @click="submitForm1" v-if="baoCun">保存并继续编辑</el-button>
@@ -241,7 +238,9 @@ import {
   updatestatus
   updatestatus
 } from "@/api/combatduty/militarydutyinfo";
 } from "@/api/combatduty/militarydutyinfo";
 import { listThebus } from "@/api/militaryvehicleManagement/thebus";
 import { listThebus } from "@/api/militaryvehicleManagement/thebus";
-import map from "../../../../public/assets/libs/moment/src/lib/utils/map";
+import {
+  getUnitUsers,
+} from "@/api/workingArrangements/workTask";
 
 
 export default {
 export default {
   name: "Militarydutyinfo",
   name: "Militarydutyinfo",
@@ -295,13 +294,6 @@ export default {
             trigger: "blur",
             trigger: "blur",
           },
           },
         ],
         ],
-        carUnitName: [
-          {
-            required: true,
-            message: "车属单位名称不能为空",
-            trigger: "blur",
-          },
-        ]
       },
       },
       //人员数据
       //人员数据
       rylist: [],
       rylist: [],
@@ -314,30 +306,82 @@ export default {
       baoCun: true,
       baoCun: true,
       // 车牌号多选、
       // 车牌号多选、
       busDuoList: [],
       busDuoList: [],
+      // 车属单位多选
+      busDuoDan: [],
+      // 司机名字多选
+      busDuoShi: [],
       // 所有车辆
       // 所有车辆
       suoYouBus: [],
       suoYouBus: [],
       buses: [],
       buses: [],
-      chuFn:false
+      chuFn: false,
+      // 手机号多选
+      tags: [],
+      arr: [],
+      arr1: []
     };
     };
   },
   },
   created() {
   created() {
     this.getList();
     this.getList();
     this.gettreeselect();
     this.gettreeselect();
-    this.getrylist();
+    // this.getrylist();
     this.getthebusfun();
     this.getthebusfun();
     this.getQuanBus()
     this.getQuanBus()
   },
   },
   methods: {
   methods: {
+    // 删除当前手机号
+    tagsFn(i) {
+      this.tags.splice(i, 1)
+      this.arr.splice(i, 1)
+    },
+    // 点击司机删除某一个时候手机号也删除
+    busShi(val) {
+      this.arr1.forEach((item, i) => {
+        if (val[i] == (item.userId || item)) {
+        } else {
+          if (val.length == this.tags.length - 1) {
+            this.tags.splice(i, 1)
+            this.arr.splice(i, 1)
+          }
+        }
+      })
+    },
+    //删除所有单位的某一个触发
+    selent() {
+      this.renyuanEs();
+      this.busDuoShi = [];
+      this.tags = [];
+      this.arr = [];
+      this.busDuoList = [];
+    },
+    //点击多选单位
+    danFn() {
+      this.renyuanEs();
+    },
+    //获取多选单位下的人员
+    renyuanEs() {
+      if (this.busDuoDan.length > 0) {
+        var ids = this.busDuoDan.join(",");
+        getUnitUsers(ids).then((res) => {
+          this.rylist = res.data;
+        });
+      } else {
+        this.rylist = [];
+      }
+    },
+    // 修改拿回来的数据放到车牌上
     getBianList() {
     getBianList() {
       this.buses = [];
       this.buses = [];
       this.buslist = [];
       this.buslist = [];
       this.suoYouBus.forEach((item, i) => {
       this.suoYouBus.forEach((item, i) => {
         if (this.form.numberPlateIdList.indexOf(item.id) != -1) {
         if (this.form.numberPlateIdList.indexOf(item.id) != -1) {
           this.buses.push(item);
           this.buses.push(item);
+        }else{
+          this.buses.push(item);
         }
         }
       });
       });
       this.buslist = this.buses;
       this.buslist = this.buses;
     },
     },
+    // 获取所有车辆
     getQuanBus() {
     getQuanBus() {
       listThebus().then(res => {
       listThebus().then(res => {
         this.suoYouBus = res.rows
         this.suoYouBus = res.rows
@@ -379,6 +423,7 @@ export default {
         }
         }
       });
       });
     },
     },
+    // 获取在位车辆
     getthebusfun() {
     getthebusfun() {
       getthebus(1).then((res) => {
       getthebus(1).then((res) => {
         if (res.code == 200) {
         if (res.code == 200) {
@@ -418,6 +463,7 @@ export default {
         telephone: null,
         telephone: null,
         modelInfo: null,
         modelInfo: null,
       };
       };
+      this.rylist=[];
       this.resetForm("form");
       this.resetForm("form");
     },
     },
     /** 搜索按钮操作 */
     /** 搜索按钮操作 */
@@ -438,132 +484,175 @@ export default {
     },
     },
     /** 新增按钮操作 */
     /** 新增按钮操作 */
     handleAdd() {
     handleAdd() {
-    this.reset();
-    this.getthebusfun();
-    this.baoCun = true;
-    this.open = true;
-    this.title = "添加军车值班";
-    this.qdflg = 1;
-    this.chuFn=true;
-    this.form.carStates='1';
-    this.busDuoList = [];
-  },
-  /** 修改按钮操作 */
-  handleUpdate(row) {
-    this.reset();
-    this.getthebusfun();
-    this.chuFn=true;
-    const id = row.id || this.ids;
-    getMilitarydutyinfo(id).then((response) => {
-      this.baoCun = false;
-      this.form = response.data;
-      this.busDuoList = response.data.numberPlateIdList
-      if (response.data.numberPlateIdList) {
-        this.getBianList()
-      }
+      this.reset();
+      this.getthebusfun();
+      this.baoCun = true;
       this.open = true;
       this.open = true;
-      this.title = "修改军车值班";
-      this.qdflg = 2;
-      this.getRen(this.form.carUnitId);
-    });
-  },
-  // 保存并继续编辑按钮
-  submitForm1() {
-    this.$refs["form"].validate((valid) => {
-      if (valid) {
-        if (this.busDuoList.length > 0) {
-          this.form.timequjian = this.form.attendedTime;
-          this.form.attendedTime = this.form.attendedTime.join(",");
-          addMilitarydutyinfo(this.form).then((response) => {
-            this.getList();
-          });
-          this.reset();
-          this.busDuoList = [];
-        } else {
-          this.$message.error('号码号牌不能为空!')
+      this.title = "添加军车值班";
+      this.qdflg = 1;
+      this.chuFn = true;
+      this.form.carStates = '2';
+      this.busDuoList = [];
+      this.busDuoDan = [];
+      this.busDuoShi = [];
+      this.tags = [];
+      this.arr = [];
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      this.getthebusfun();
+      this.tags = [];
+      this.arr = [];
+      this.chuFn = true;
+      const id = row.id || this.ids;
+      getMilitarydutyinfo(id).then((response) => {
+        this.baoCun = false;
+        this.form = response.data;
+        this.busDuoList = response.data.numberPlateIdList;
+        this.busDuoDan = response.data.unitId.map(Number);
+        this.busDuoShi = response.data.sjId.map(Number);
+        let ponst = response.data.phone;
+        ponst.forEach(item => {
+          this.tags.push({ name: item, type: 'info' })
+          this.arr.push(item);
+          this.arr1.push(item);
+        })
+        if (response.data.numberPlateIdList) {
+          this.getBianList();
         }
         }
-      }
-    });
-  },
-  /** 提交按钮 */
-  submitForm() {
-    this.$refs["form"].validate((valid) => {
-      if (valid) {
-        if (this.form.id != null) {
-          if (this.busDuoList.length > 0) {
+        this.open = true;
+        this.title = "修改军车值班";
+        this.qdflg = 2;
+        this.renyuanEs();
+      });
+    },
+    // 保存并继续编辑按钮
+    submitForm1() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.busDuoList.length > 0 && this.busDuoDan.length > 0 && this.busDuoShi.length > 0) {
+            // 手机号
+            this.form.phone = this.arr;
+            this.form.unitId = this.busDuoDan;
+            this.form.sjId = this.busDuoShi;
             this.form.numberPlateIdList = this.busDuoList
             this.form.numberPlateIdList = this.busDuoList
-            updateMilitarydutyinfo(this.form).then((response) => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            this.$message.error('号码号牌不能为空!')
-          }
-
-        } else {
-          if (this.busDuoList.length > 0) {
             this.form.timequjian = this.form.attendedTime;
             this.form.timequjian = this.form.attendedTime;
             this.form.attendedTime = this.form.attendedTime.join(",");
             this.form.attendedTime = this.form.attendedTime.join(",");
-            this.form.numberPlateIdList = this.busDuoList
             addMilitarydutyinfo(this.form).then((response) => {
             addMilitarydutyinfo(this.form).then((response) => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
               this.getList();
               this.getList();
             });
             });
+            this.reset();
+            this.form.carStates = '1';
+            this.getthebusfun();
+            this.busDuoList = [];
+            this.busDuoDan = [];
+            this.busDuoShi = [];
+            this.tags = [];
+            this.arr = [];
           } else {
           } else {
-            this.$message.error('号码号牌不能为空!')
+            this.$message.error('车属单位或号码号牌或司机名称不能为空!')
           }
           }
         }
         }
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.id != null) {
+            if (this.busDuoList.length > 0 && this.busDuoDan.length > 0 && this.busDuoShi.length > 0) {
+              this.form.numberPlateIdList = this.busDuoList
+              this.form.phone = this.arr;
+              this.form.unitId = this.busDuoDan;
+              this.form.sjId = this.busDuoShi;
+              updateMilitarydutyinfo(this.form).then((response) => {
+                this.$modal.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              });
+            } else {
+              this.$message.error('车属单位或号码号牌或司机名称不能为空!')
+            }
+
+          } else {
+            if (this.busDuoList.length > 0 && this.busDuoDan.length > 0 && this.busDuoShi.length > 0) {
+              // 手机号
+              this.form.phone = this.arr;
+              this.form.unitId = this.busDuoDan;
+              this.form.sjId = this.busDuoShi;
+              this.form.timequjian = this.form.attendedTime;
+              this.form.attendedTime = this.form.attendedTime.join(",");
+              this.form.numberPlateIdList = this.busDuoList
+              addMilitarydutyinfo(this.form).then((response) => {
+                this.$modal.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            } else {
+              this.$message.error('车属单位或号码号牌或司机名称不能为空!')
+            }
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal
+        .confirm("是否确认删除该数据项?")
+        .then(function () {
+          return delMilitarydutyinfo(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => { });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$modal
+        .confirm("是否确认导出所有军车值班数据项?")
+        .then(() => {
+          this.exportLoading = true;
+          return exportMilitarydutyinfo(queryParams);
+        })
+        .then((response) => {
+          this.$download.name(response.msg);
+          this.exportLoading = false;
+        })
+        .catch(() => { });
+    },
+    //司机联系方式
+    driverNamefun(val) {
+      if (this.arr.indexOf(val.phonenumber) != -1) {
+
+      } else {
+        this.arr.push(val.phonenumber)
+        this.tags.push({
+          name: val.phonenumber,
+          type: 'info'
+        })
+        this.arr1.push(val)
       }
       }
-    });
-  },
-  /** 删除按钮操作 */
-  handleDelete(row) {
-    const ids = row.id || this.ids;
-    this.$modal
-      .confirm("是否确认删除该数据项?")
-      .then(function () {
-        return delMilitarydutyinfo(ids);
-      })
-      .then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      })
-      .catch(() => { });
-  },
-  /** 导出按钮操作 */
-  handleExport() {
-    const queryParams = this.queryParams;
-    this.$modal
-      .confirm("是否确认导出所有军车值班数据项?")
-      .then(() => {
-        this.exportLoading = true;
-        return exportMilitarydutyinfo(queryParams);
-      })
-      .then((response) => {
-        this.$download.name(response.msg);
-        this.exportLoading = false;
-      })
-      .catch(() => { });
-  },
-  //司机联系方式
-  driverNamefun(val) {
-    this.form.driverName = val.name;
-    this.form.telephone = val.phone;
-    this.form.driverId = val.id;
-  },
-  carUnitNamechange(val) {
-    this.form.carUnitId = val.deptId;
-    this.form.carUnitName = val.deptName;
-    this.getRen(this.form.carUnitId);
-  },
-  numberPlateNamechange(val) {
-    this.form.numberPlateId = val.id;
-    this.form.numberPlateName = val.vehiclenumber;
-    this.form.modelInfo = val.vehiclemodel;
+      // this.form.telephone = val.phonenumber
+      // this.form.driverName = val.name;
+      // this.form.telephone = val.phone;
+      // this.form.driverId = val.id;
+    },
+    carUnitNamechange(val) {
+      this.form.carUnitId = val.deptId;
+      this.form.carUnitName = val.deptName;
+      // this.getRen(this.form.carUnitId);
+    },
+    numberPlateNamechange(val) {
+      this.form.numberPlateId = val.id;
+      this.form.numberPlateName = val.vehiclenumber;
+      this.form.modelInfo = val.vehiclemodel;
+    },
   },
   },
-},
 };
 };
 </script>
 </script>
 <style scoped>
 <style scoped>
@@ -725,4 +814,20 @@ export default {
 .ren_yuans {
 .ren_yuans {
   width: 559px;
   width: 559px;
 }
 }
+
+::v-deep .el-select__input {
+  color: #fff;
+}
+
+.tags {
+  border: 1px solid #fff;
+  border-radius: 4px;
+  line-height: 33px;
+  padding: 0 5px;
+  min-height: 33px;
+}
+
+::v-deep .tags .el-tag.el-tag--info {
+  margin-right: 10px;
+}
 </style>
 </style>

+ 5 - 2
src/views/peopleChuRu/leaveOne/index.vue

@@ -622,14 +622,17 @@ export default {
               this.getList();
               this.getList();
             });
             });
           } else {
           } else {
-            if (this.form.peopleId.length > 0) {
+            if (this.form.peopleId&&this.form.peopleId.length>0) {
               this.form.peopleId = this.form.peopleId.join(",");
               this.form.peopleId = this.form.peopleId.join(",");
             }
             }
-            addLeaveOne(this.form).then((response) => {
+            // console.log(this.form.peopleId.length>0);
+            if(this.form.peopleId.length>0){
+              addLeaveOne(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.open = false;
               this.getList();
               this.getList();
             });
             });
+            }
           }
           }
         }
         }
       });
       });

+ 5 - 4
src/views/taishi/index.vue

@@ -1293,6 +1293,7 @@ export default {
     //各单位在位情况
     //各单位在位情况
     gedanweizaiweiqingkaung().then((res) => {
     gedanweizaiweiqingkaung().then((res) => {
       if (res.code == 200) {
       if (res.code == 200) {
+        console.log(res.data);
         this.zwqklist = res.data;
         this.zwqklist = res.data;
         this.center2();
         this.center2();
       }
       }
@@ -1475,12 +1476,12 @@ export default {
               show: true,
               show: true,
               axisLabel: {
               axisLabel: {
                 textStyle: {
                 textStyle: {
-                  color: "#ffffff",
+                  color: "#fffff",
                   fontSize: "12",
                   fontSize: "12",
                 },
                 },
-                // formatter: function(datav) {
-                //   return datav;
-                // }
+                formatter: function(datav) {
+                  return datav+'%';
+                }
               },
               },
               data: data2,
               data: data2,
             },
             },