Browse Source

fix-超期记录

LAPTOP-U5GOA5HA\zz 1 year ago
parent
commit
b050be3ce1

+ 8 - 0
src/api/system/user.js

@@ -143,3 +143,11 @@ export function deptTreeSelect (params) {
     params
     params
   })
   })
 }
 }
+// 驾驶证
+export function drivingLicense (data) {
+  return request({
+    url: '/system/user/drivingLicense',
+    method: 'put',
+    data: data
+  })
+}

+ 1 - 3
src/views/clw/car/modules/CreateForm.vue

@@ -690,12 +690,10 @@ export default {
       })
       })
     },
     },
     UpdateImgs(val) {
     UpdateImgs(val) {
-      console.log('--------图片', val)
       this.form.photo = val.response.id
       this.form.photo = val.response.id
-      this.photoUrl = val.response.url
+      this.photoUrl = '/api'+val.response.fileName
     },
     },
     UpdateDociment(val) {
     UpdateDociment(val) {
-      console.log('---------上传', val)
       this.form.document = val.response.id
       this.form.document = val.response.id
       this.documentUrl = val.response.url
       this.documentUrl = val.response.url
       this.title = val.response.originalFilename
       this.title = val.response.originalFilename

+ 53 - 18
src/views/clw/records/index.vue

@@ -4,10 +4,30 @@
       <!-- 条件搜索 -->
       <!-- 条件搜索 -->
       <div class="table-page-search-wrapper">
       <div class="table-page-search-wrapper">
         <a-form layout="inline">
         <a-form layout="inline">
-          <a-row >
+          <a-row>
             <a-col :span="7">
             <a-col :span="7">
-              <a-form-item label="油卡号" prop="gasCode">
-                <a-input v-model="queryParam.gasCode" placeholder="请输入油卡号" allow-clear />
+              <a-form-item label="提醒人" prop="remindUserName">
+                <a-input v-model="queryParam.remindUserName" placeholder="请输入提醒人关键字" allow-clear />
+              </a-form-item>
+            </a-col>
+            <a-col :span="7" style="margin: 0 20px">
+              <a-form-item label="提醒日期">
+                <!-- <a-date-picker style="width: 100%" v-model="queryParam.insuranceTime" format="YYYY-MM-DD HH:mm:ss" allow-clear/> -->
+                <a-range-picker
+                  v-model="insuranceTime"
+                  format="YYYY-MM-DD"
+                  :placeholder="['开始时间', '结束时间']"
+                  @change="onChangeTime"
+                />
+              </a-form-item>
+            </a-col>
+            <a-col :span="7">
+              <a-form-item label="提醒类型" prop="remindType">
+                <a-select placeholder="请选择提醒类型" v-model="queryParam.remindType" style="width: 100%" allow-clear>
+                  <a-select-option v-for="(d, index) in dict.type.remind_type" :key="index" :value="d.value">{{
+                    d.label
+                  }}</a-select-option>
+                </a-select>
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
             <a-col :span="17">
             <a-col :span="17">
@@ -17,10 +37,10 @@
               >
               >
                 <a-button type="primary" @click="handleQuery"><a-icon type="search" />查询</a-button>
                 <a-button type="primary" @click="handleQuery"><a-icon type="search" />查询</a-button>
                 <a-button style="margin-left: 8px" @click="resetQuery"><a-icon type="redo" />重置</a-button>
                 <a-button style="margin-left: 8px" @click="resetQuery"><a-icon type="redo" />重置</a-button>
-                <div style="margin-left: 15px;">
-                    <a-button type="primary" @click="handleExport" v-hasPermi="['clw:gas:export']">
-                  <a-icon type="download" />导出
-                </a-button>
+                <div style="margin-left: 15px">
+                  <a-button type="primary" @click="handleExport" v-hasPermi="['clw:gas:export']">
+                    <a-icon type="download" />导出
+                  </a-button>
                 </div>
                 </div>
               </span>
               </span>
             </a-col>
             </a-col>
@@ -60,7 +80,7 @@
         @ok="getList"
         @ok="getList"
       />
       />
       <!-- 保险详情 -->
       <!-- 保险详情 -->
-      <registerForm  ref="registerForm"  @ok="getList"/>
+      <registerForm ref="registerForm" @ok="getList" />
       <!-- 注销原因 -->
       <!-- 注销原因 -->
       <singOut ref="singForm" @signCar="signCar" />
       <singOut ref="singForm" @signCar="signCar" />
       <!-- 删除弹窗 -->
       <!-- 删除弹窗 -->
@@ -84,7 +104,11 @@
         </span>
         </span>
         <span slot="operation" slot-scope="text, record">
         <span slot="operation" slot-scope="text, record">
           <!-- <a-divider type="vertical" v-hasPermi="['clw:gas:edit']" /> -->
           <!-- <a-divider type="vertical" v-hasPermi="['clw:gas:edit']" /> -->
-          <a @click="$refs.createForm.handleInfo(record, undefined)" v-hasPermi="['clw:gas:edit']" v-if="record.remindType!='INSURANCE'">
+          <a
+            @click="$refs.createForm.handleInfo(record, undefined)"
+            v-hasPermi="['clw:gas:edit']"
+            v-if="record.remindType != 'INSURANCE'"
+          >
             <a-icon type="eye" />详情
             <a-icon type="eye" />详情
           </a>
           </a>
           <a @click="$refs.registerForm.handleInfo(record, undefined)" v-hasPermi="['clw:gas:edit']" v-else>
           <a @click="$refs.registerForm.handleInfo(record, undefined)" v-hasPermi="['clw:gas:edit']" v-else>
@@ -123,7 +147,7 @@ export default {
     CreateForm,
     CreateForm,
     singOut,
     singOut,
     OpenModul,
     OpenModul,
-    registerForm
+    registerForm,
   },
   },
   mixins: [tableMixin],
   mixins: [tableMixin],
   dicts: ['remind_type'],
   dicts: ['remind_type'],
@@ -145,6 +169,7 @@ export default {
       queryParam: {
       queryParam: {
         pageNum: 1,
         pageNum: 1,
         pageSize: 10,
         pageSize: 10,
+        params:{}
       },
       },
       columns: [
       columns: [
         { title: '序号', scopedSlots: { customRender: 'num' }, width: '50px', align: 'center' },
         { title: '序号', scopedSlots: { customRender: 'num' }, width: '50px', align: 'center' },
@@ -184,6 +209,9 @@ export default {
       ],
       ],
       gasIds: [],
       gasIds: [],
       showOpen: '',
       showOpen: '',
+      insuranceTime: null,
+      beginRemindTime: null,
+      endRemindTime: null,
     }
     }
   },
   },
   filters: {},
   filters: {},
@@ -196,8 +224,11 @@ export default {
     /** 查询加油卡信息列表 */
     /** 查询加油卡信息列表 */
     getList() {
     getList() {
       this.loading = true
       this.loading = true
+      if (this.insuranceTime) {
+        this.queryParam.params.endRemindTime = this.endRemindTime
+        this.queryParam.params.beginRemindTime = this.beginRemindTime
+      }
       getmsgList(this.queryParam).then((response) => {
       getmsgList(this.queryParam).then((response) => {
-        console.log('--------------->>数据', response)
         this.list = response.rows
         this.list = response.rows
         this.total = response.total
         this.total = response.total
         this.loading = false
         this.loading = false
@@ -212,11 +243,11 @@ export default {
     /** 重置按钮操作 */
     /** 重置按钮操作 */
     resetQuery() {
     resetQuery() {
       this.queryParam = {
       this.queryParam = {
-        plateNumber: undefined,
-        gasCode: undefined,
         pageNum: 1,
         pageNum: 1,
         pageSize: 10,
         pageSize: 10,
+        params:{}
       }
       }
+      this.insuranceTime = null
       this.handleQuery()
       this.handleQuery()
     },
     },
     onShowSizeChange(current, pageSize) {
     onShowSizeChange(current, pageSize) {
@@ -271,11 +302,11 @@ export default {
           })
           })
       } else if (this.showOpen == '导出') {
       } else if (this.showOpen == '导出') {
         this.download(
         this.download(
-          'clw/gas/export',
+          '/clw/message/export',
           {
           {
             ...this.queryParam,
             ...this.queryParam,
           },
           },
-          `gas_${new Date().getTime()}.xlsx`
+          `到期提醒记录${new Date().getTime()}.xlsx`
         )
         )
         this.$refs.modules.visible = false
         this.$refs.modules.visible = false
       }
       }
@@ -297,11 +328,15 @@ export default {
         }
         }
       })
       })
     },
     },
+    onChangeTime(val) {
+      this.beginRemindTime = val[0].format('YYYY-MM-DD 00:00:00')
+      this.endRemindTime = val[1].format('YYYY-MM-DD 00:00:00')
+    },
   },
   },
 }
 }
 </script>
 </script>
 <style lang="less" scoped>
 <style lang="less" scoped>
-/deep/.table-page-search-submitButtons{
-    display: flex;
+/deep/.table-page-search-submitButtons {
+  display: flex;
 }
 }
-</style>
+</style>

+ 19 - 2
src/views/clw/records/modules/CreateForm.vue

@@ -25,7 +25,8 @@
         ></a-col>
         ></a-col>
         <a-col :span="10">
         <a-col :span="10">
           <a-form-model-item label="提醒类型">
           <a-form-model-item label="提醒类型">
-            <a-input v-model="form.remindType" placeholder="暂无信息" :disabled="formType == 3" /> </a-form-model-item
+            <!-- :label="dict.label['remind_unit_type'][remindType]" -->
+            <a-input :value="dict.label['remind_type'][form.remindType]" placeholder="暂无信息" :disabled="formType == 3" disabled /> </a-form-model-item
         ></a-col>
         ></a-col>
       </a-row>
       </a-row>
       <a-divider orientation="left">
       <a-divider orientation="left">
@@ -229,6 +230,7 @@ import { getGas, addGas, updateGas, plateNumberList } from '@/api/clw/gas'
 import { getmsgInfo } from '@/api/records'
 import { getmsgInfo } from '@/api/records'
 export default {
 export default {
   name: 'CreateForm',
   name: 'CreateForm',
+  dicts: ['remind_type'],
   components: {},
   components: {},
   data() {
   data() {
     return {
     return {
@@ -318,7 +320,6 @@ export default {
       }
       }
     },
     },
     handleInfo(row) {
     handleInfo(row) {
-      console.log('-----', row)
       // this.formType = 3
       // this.formType = 3
       // const gasId = row ? row.gasId : ids
       // const gasId = row ? row.gasId : ids
       getmsgInfo(row.id).then((response) => {
       getmsgInfo(row.id).then((response) => {
@@ -327,6 +328,22 @@ export default {
         if (response.data.metaDetail&&response.data.metaDetail.drivingLicense) {
         if (response.data.metaDetail&&response.data.metaDetail.drivingLicense) {
           this.warrantyImageId = '/api' + response.data.metaDetail.drivingLicense.drivingLicenseImageUrl
           this.warrantyImageId = '/api' + response.data.metaDetail.drivingLicense.drivingLicenseImageUrl
         }
         }
+        if(response.data.metaDetail.isTimeout){
+          if(response.data.metaDetail.isTimeout=='0'){
+            this.form.metaDetail.isTimeout='未超期'
+          }
+          if(response.data.metaDetail.isTimeout=='1'){
+            this.form.metaDetail.isTimeout='已超期'
+          }
+        }
+        if(response.data.metaDetail.isTips){
+          if(response.data.metaDetail.isTips=='0'){
+            this.form.metaDetail.isTips='超期未提醒'
+          }
+          if(response.data.metaDetail.isTips=='1'){
+            this.form.metaDetail.isTips='超期已提醒'
+          }
+        }
         this.open = true
         this.open = true
         this.formTitle = '提醒记录详情'
         this.formTitle = '提醒记录详情'
       })
       })

+ 2 - 1
src/views/clw/records/modules/registerForm.vue

@@ -25,7 +25,7 @@
         ></a-col>
         ></a-col>
         <a-col :span="10">
         <a-col :span="10">
           <a-form-model-item label="提醒类型">
           <a-form-model-item label="提醒类型">
-            <a-input v-model="form.remindType" placeholder="暂无信息" :disabled="formType == 3" /> </a-form-model-item
+            <a-input :value="dict.label['remind_type'][form.remindType]" placeholder="暂无信息" :disabled="formType == 3" /> </a-form-model-item
         ></a-col>
         ></a-col>
       </a-row>
       </a-row>
       <a-divider orientation="left">
       <a-divider orientation="left">
@@ -147,6 +147,7 @@
   // import {user}
   // import {user}
   export default {
   export default {
     name: 'CreateForm',
     name: 'CreateForm',
+    dicts: ['remind_type'],
     props: {},
     props: {},
     components: {
     components: {
       SubTable,
       SubTable,

+ 2 - 0
src/views/clw/register/modules/CreateForm.vue

@@ -276,6 +276,7 @@ export default {
       const insuranceId = row ? row.insuranceId : ids
       const insuranceId = row ? row.insuranceId : ids
       getRegister(insuranceId).then((response) => {
       getRegister(insuranceId).then((response) => {
         this.form = response.data
         this.form = response.data
+        console.log(response.data);
         if (response.data.warrantyFile) {
         if (response.data.warrantyFile) {
           this.warrantyImageId = '/api' + response.data.warrantyFile.fileUrl
           this.warrantyImageId = '/api' + response.data.warrantyFile.fileUrl
         }
         }
@@ -333,6 +334,7 @@ export default {
     },
     },
     // 保险
     // 保险
     UpdateInvoice(val) {
     UpdateInvoice(val) {
+      console.log('-----',val);
       this.insuranceInvoice = val.response.url
       this.insuranceInvoice = val.response.url
       this.form.insuranceInvoice = val.response.id
       this.form.insuranceInvoice = val.response.id
     },
     },

+ 5 - 5
src/views/system/user/index.vue

@@ -130,11 +130,11 @@
                 <a-icon type="eye" />
                 <a-icon type="eye" />
                 详情
                 详情
               </a>
               </a>
-              <!-- <a-divider type="vertical" v-hasPermi="['system:user:remove']" />
-              <a @click="handleDelete(record)" v-hasPermi="['system:user:remove']">
-                <a-icon type="delete" />
-                删除
-              </a> -->
+              <a-divider type="vertical" v-hasPermi="['system:user:remove']" />
+              <a @click="$refs.createForm.handleEdit(record,2)" v-hasPermi="['system:user:remove']">
+                <a-icon type="edit" />
+                编辑
+              </a>
               <a-divider type="vertical" v-hasPermi="['system:user:resetPwd', 'system:user:edit']" />
               <a-divider type="vertical" v-hasPermi="['system:user:resetPwd', 'system:user:edit']" />
               <a-dropdown v-hasPermi="['system:user:resetPwd', 'system:user:edit']">
               <a-dropdown v-hasPermi="['system:user:resetPwd', 'system:user:edit']">
                 <a class="ant-dropdown-link" @click="(e) => e.preventDefault()">
                 <a class="ant-dropdown-link" @click="(e) => e.preventDefault()">

+ 128 - 66
src/views/system/user/modules/CreateForm.vue

@@ -4,7 +4,7 @@
     <a-divider orientation="left">
     <a-divider orientation="left">
       <b>{{ formTitle }}</b>
       <b>{{ formTitle }}</b>
     </a-divider>
     </a-divider>
-    <a-form-model ref="form" :model="form" :rules="rules">
+    <a-form-model ref="form" :model="form">
       <a-row>
       <a-row>
         <a-col :span="10">
         <a-col :span="10">
           <a-form-model-item label="用户昵称" prop="nickName">
           <a-form-model-item label="用户昵称" prop="nickName">
@@ -121,32 +121,42 @@
         </a-col>
         </a-col>
       </a-row>
       </a-row>
       <a-divider orientation="left">
       <a-divider orientation="left">
-      <b>驾驶证信息</b>
-    </a-divider>
-    <a-row>
+        <b>驾驶证信息</b>
+      </a-divider>
+      <a-row>
         <a-col :span="10">
         <a-col :span="10">
-          <a-form-model-item label="驾驶证号码" prop="userName">
-            <a-input v-model="form.jczhm" placeholder="暂无信息"  />
+          <a-form-model-item label="驾驶证号码">
+            <a-input v-model="drivingLicense.drivingLicenseCode" placeholder="暂无信息" />
           </a-form-model-item>
           </a-form-model-item>
         </a-col>
         </a-col>
         <a-col :span="10">
         <a-col :span="10">
           <a-form-model-item label="准驾车辆分类" prop="password">
           <a-form-model-item label="准驾车辆分类" prop="password">
-            <a-input-password v-model="form.zjclfl" placeholder="暂无信息" :maxLength="20"  />
+            <a-input v-model="drivingLicense.drivingLicenseType" placeholder="暂无信息" :maxLength="20" />
           </a-form-model-item>
           </a-form-model-item>
         </a-col>
         </a-col>
       </a-row>
       </a-row>
       <a-row>
       <a-row>
         <a-col :span="10">
         <a-col :span="10">
-          <a-form-model-item label="初次申领日期" prop="userName">
-            <a-input v-model="form.jczhm" placeholder="暂无信息"  />
+          <a-form-model-item label="初次申领日期">
+            <a-date-picker style="width: 100%" v-model="drivingLicense.firstTime" format="YYYY-MM-DD" allow-clear />
+            <!-- <a-input v-model="drivingLicense.firstTime" placeholder="暂无信息" /> -->
           </a-form-model-item>
           </a-form-model-item>
         </a-col>
         </a-col>
         <a-col :span="10">
         <a-col :span="10">
-          <a-form-model-item label="驾驶证有效期" prop="password">
-            <a-input-password v-model="form.zjclfl" placeholder="暂无信息" :maxLength="20"  />
+          <a-form-model-item label="驾驶证有效期">
+            <a-date-picker
+              style="width: 100%"
+              v-model="drivingLicense.expirationTime"
+              format="YYYY-MM-DD"
+              allow-clear
+            />
+            <!-- <a-input v-model="drivingLicense.expirationTime" placeholder="暂无信息" :maxLength="20" /> -->
           </a-form-model-item>
           </a-form-model-item>
         </a-col>
         </a-col>
       </a-row>
       </a-row>
+      <a-form-model-item label="驾驶证照片" prop="photo">
+        <file-upload v-model="photoUrl" type="image" module="car" @UpdateImg="UpdateImgs"></file-upload>
+      </a-form-model-item>
       <!-- <a-row>
       <!-- <a-row>
         <a-col :span="10">
         <a-col :span="10">
           <a-form-model-item label="性别" prop="sex">
           <a-form-model-item label="性别" prop="sex">
@@ -181,7 +191,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { getUser, addUser, updateUser } from '@/api/system/user'
+import { getUser, addUser, updateUser, drivingLicense } from '@/api/system/user'
 
 
 export default {
 export default {
   name: 'CreateForm',
   name: 'CreateForm',
@@ -225,33 +235,44 @@ export default {
         remark: undefined,
         remark: undefined,
         postIds: [],
         postIds: [],
         roleIds: [],
         roleIds: [],
+        drivingLicense: null,
       },
       },
-      open: false,
-      rules: {
-        userName: [{ required: true, message: '用户名不能为空', trigger: 'blur' }],
-        nickName: [{ required: true, message: '用户昵称不能为空', trigger: 'blur' }],
-        deptId: [{ required: true, message: '部门不能为空', trigger: 'change' }],
-        password: [
-          { required: true, message: '密码不能为空', trigger: 'blur' },
-          { min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' },
-        ],
-        email: [
-          { required: true, message: '邮箱不能为空', trigger: 'blur' },
-          {
-            type: 'email',
-            message: '请正确填写邮箱地址',
-            trigger: ['blur', 'change'],
-          },
-        ],
-        phonenumber: [
-          { required: true, message: '手机号不能为空', trigger: 'blur' },
-          {
-            pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
-            message: '请正确填写手机号',
-            trigger: 'blur',
-          },
-        ],
+      drivingLicense: {
+        drivingLicenseCode: null,
+        drivingLicenseImageUrl: null,
+        drivingLicenseType: null,
+        expirationTime: null,
+        firstTime: null,
+        drivingLicenseImageId: null,
+        userId: null,
       },
       },
+      open: false,
+      photoUrl: '',
+      // rules: {
+      //   userName: [{ required: true, message: '用户名不能为空', trigger: 'blur' }],
+      //   nickName: [{ required: true, message: '用户昵称不能为空', trigger: 'blur' }],
+      //   deptId: [{ required: true, message: '部门不能为空', trigger: 'change' }],
+      //   password: [
+      //     { required: true, message: '密码不能为空', trigger: 'blur' },
+      //     { min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' },
+      //   ],
+      //   email: [
+      //     { required: true, message: '邮箱不能为空', trigger: 'blur' },
+      //     {
+      //       type: 'email',
+      //       message: '请正确填写邮箱地址',
+      //       trigger: ['blur', 'change'],
+      //     },
+      //   ],
+      //   phonenumber: [
+      //     { required: true, message: '手机号不能为空', trigger: 'blur' },
+      //     {
+      //       pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+      //       message: '请正确填写手机号',
+      //       trigger: 'blur',
+      //     },
+      //   ],
+      // },
     }
     }
   },
   },
   filters: {},
   filters: {},
@@ -287,6 +308,15 @@ export default {
         postIds: [],
         postIds: [],
         roleIds: [],
         roleIds: [],
       }
       }
+      this.drivingLicense = {
+        drivingLicenseCode: null,
+        drivingLicenseImageUrl: null,
+        drivingLicenseType: null,
+        expirationTime: null,
+        firstTime: null,
+        drivingLicenseImageId: null,
+      }
+      this.photoUrl = ''
     },
     },
     /** 新增按钮操作 */
     /** 新增按钮操作 */
     handleAdd() {
     handleAdd() {
@@ -300,7 +330,7 @@ export default {
         this.form.password = this.initPassword
         this.form.password = this.initPassword
       })
       })
     },
     },
-    /** 修改按钮操作 */
+    /** 详情 */
     handleUpdate(row, ids) {
     handleUpdate(row, ids) {
       this.reset()
       this.reset()
       this.$emit('select-tree')
       this.$emit('select-tree')
@@ -311,41 +341,73 @@ export default {
         this.roleOptions = response.roles
         this.roleOptions = response.roles
         this.form.postIds = response.postIds
         this.form.postIds = response.postIds
         this.form.roleIds = response.roleIds
         this.form.roleIds = response.roleIds
+        if (response.data.drivingLicense) {
+          this.drivingLicense = response.data.drivingLicense
+          this.photoUrl = '/api' + response.data.drivingLicense.drivingLicenseImageUrl
+        }
         this.open = true
         this.open = true
         this.formTitle = '用户详情'
         this.formTitle = '用户详情'
         this.form.password = ''
         this.form.password = ''
       })
       })
     },
     },
+    /** 修改按钮操作 */
+    handleEdit(row, ids) {
+      console.log(row);
+      this.reset()
+      this.formType = 2
+      const userId = row ? row.userId : ids
+      getUser(userId).then((response) => {      
+        this.form = response.data
+        this.postOptions = response.posts
+        this.roleOptions = response.roles
+        this.form.postIds = response.postIds
+        this.form.roleIds = response.roleIds
+        if (response.data.drivingLicense) {
+          this.drivingLicense = response.data.drivingLicense
+          this.photoUrl = '/api' + response.data.drivingLicense.drivingLicenseImageUrl
+        }
+        this.drivingLicense.userId = response.data.userId || row.userId
+        this.open = true
+        this.formTitle = '编辑'
+        this.form.password = ''
+      })
+    },
+    // 上传驾驶证
+    UpdateImgs(val) {
+      this.drivingLicense.drivingLicenseImageId = val.response.id
+      this.photoUrl = '/api' + val.response.fileName
+    },
     /** 提交按钮 */
     /** 提交按钮 */
     submitForm: function () {
     submitForm: function () {
+      this.submitLoading = false
       this.$refs.form.validate((valid) => {
       this.$refs.form.validate((valid) => {
-        if (valid) {
-          this.submitLoading = true
-          if (this.form.userId !== undefined) {
-            updateUser(this.form)
-              .then((response) => {
-                this.$message.success('修改成功', 3)
-                this.open = false
-                this.$emit('ok')
-              })
-              .finally(() => {
-                this.submitLoading = false
-              })
-          } else {
-            addUser(this.form)
-              .then((response) => {
-                this.$message.success('新增成功', 3)
-                this.open = false
-                this.$emit('ok')
-              })
-              .finally(() => {
-                this.submitLoading = false
-              })
+        this.submitLoading = true
+        if (this.drivingLicense) {
+          // this.form.drivingLicense = this.drivingLicense
+          if (this.drivingLicense.firstTime?.format) {
+            this.drivingLicense.firstTime = this.drivingLicense.firstTime.format('YYYY-MM-DD')
+          }
+          if (this.drivingLicense.expirationTime?.format) {
+            this.drivingLicense.expirationTime = this.drivingLicense.expirationTime.format('YYYY-MM-DD')
           }
           }
-        } else {
-          return false
         }
         }
+        // const params = {
+        //   firstTime: this.form.drivingLicense.firstTime,
+        //   expirationTime: this.form.drivingLicense.expirationTime,
+        // }
+        drivingLicense(this.drivingLicense)
+          .then((response) => {
+            this.$message.success('修改成功', 3)
+            this.submitLoading = false
+            this.open = false
+            this.reset()
+            this.$emit('ok')
+          })
+          .catch(() => {
+            this.submitLoading = false
+          })
       })
       })
+      this.submitLoading = false
     },
     },
   },
   },
 }
 }
@@ -354,10 +416,10 @@ export default {
 /deep/.ant-form-item {
 /deep/.ant-form-item {
   margin-right: 50px;
   margin-right: 50px;
 }
 }
-/deep/.ant-select{
-color: #000;
+/deep/.ant-select {
+  color: #000;
 }
 }
-/deep/.ant-input{
- color: #000;
+/deep/.ant-input {
+  color: #000;
 }
 }
 </style>
 </style>

+ 2 - 2
vue.config.js

@@ -110,8 +110,8 @@ const vueConfig = {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
       [process.env.VUE_APP_BASE_API]: {
         // target: `https://ruoyi.setworld.net`,
         // target: `https://ruoyi.setworld.net`,
-        // target: `http://113.249.153.164:7618/api`,
-        target:`http://192.168.31.129:8080/`,
+        target: `http://113.249.153.164:7618/api`,
+        // target:`http://192.168.31.129:8080/`,
         changeOrigin: true,
         changeOrigin: true,
         pathRewrite: {
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''
           ['^' + process.env.VUE_APP_BASE_API]: ''