dev01 8 місяців тому
батько
коміт
c442f70780

+ 72 - 0
src/api/system/record.js

@@ -17,4 +17,76 @@ export function batchExamineRecord(data) {
     method: 'post',
     data: data
   })
+}
+
+// 导入考勤数据
+export function importUserClock(data) {
+  return request({
+    url: '/system/user/importUserClock',
+    method: 'post',
+    data: data
+  })
+}
+
+// 用户打卡数据列表
+export function selectUserClock(query) {
+  return request({
+    url: '/system/user/selectUserClock',
+    method: 'get',
+    params: query
+  })
+}
+
+// 批量更新考勤数据
+export function updateAllUserClock(query) {
+  return request({
+    url: '/system/user/updateAllUserClock',
+    method: 'post',
+    params: query
+  })
+}
+
+// 打卡数据匹配 (匹配工时)
+export function mateUserRecord(query) {
+  return request({
+    url: '/api/project/mateUserRecord',
+    method: 'post',
+    params: query
+  })
+}
+
+//  考勤数据合并(核对)
+export function userRecordMerge(data) {
+  return request({
+    url: '/system/user/userRecordMerge',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改单条考勤核对数据
+export function updateUserRecord(data) {
+  return request({
+    url: '/system/user/updateUserRecord',
+    method: 'post',
+    data: data
+  })
+}
+
+// 多打卡数据列表
+export function UserClockDetails(query) {
+  return request({
+    url: '/system/user/UserClockDetails',
+    method: 'get',
+    params: query
+  })
+}
+
+// 修改考勤对应多打卡
+export function updateUserClockDetails(data) {
+  return request({
+    url: '/system/user/updateUserClockDetails',
+    method: 'post',
+    data: data
+  })
 }

+ 3 - 4
src/views/index.vue

@@ -14,14 +14,14 @@ export default {
   data() {
     return {
       // 版本号
-      version: "3.8.6"
+      version: "3.8.6",
     };
   },
   methods: {
     goTarget(href) {
       window.open(href, "_blank");
-    }
-  }
+    },
+  },
 };
 </script>
 
@@ -88,4 +88,3 @@ export default {
   }
 }
 </style>
-

+ 161 - 71
src/views/monitor/job/index.vue

@@ -1,6 +1,13 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
       <el-form-item label="任务名称" prop="jobName">
         <el-input
           v-model="queryParams.jobName"
@@ -30,7 +37,9 @@
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <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>
@@ -44,7 +53,8 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['monitor:job:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -55,7 +65,8 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['monitor:job:edit']"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -66,7 +77,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['monitor:job:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -76,7 +88,8 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['monitor:job:export']"
-        >导出</el-button>
+          >导出</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -86,22 +99,44 @@
           size="mini"
           @click="handleJobLog"
           v-hasPermi="['monitor:job:query']"
-        >日志</el-button>
+          >日志</el-button
+        >
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="jobList" border @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="jobList"
+      border
+      @selection-change="handleSelectionChange"
+      @cell-dblclick="handleUpdate"
+    >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="任务编号" width="100" align="center" prop="jobId" />
-      <el-table-column label="任务名称" align="center" prop="jobName" :show-overflow-tooltip="true" />
+      <el-table-column
+        label="任务名称"
+        align="center"
+        prop="jobName"
+        :show-overflow-tooltip="true"
+      />
       <el-table-column label="任务组名" align="center" prop="jobGroup">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_job_group" :value="scope.row.jobGroup"/>
+          <dict-tag :options="dict.type.sys_job_group" :value="scope.row.jobGroup" />
         </template>
       </el-table-column>
-      <el-table-column label="调用目标字符串" align="center" prop="invokeTarget" :show-overflow-tooltip="true" />
-      <el-table-column label="cron执行表达式" align="center" prop="cronExpression" :show-overflow-tooltip="true" />
+      <el-table-column
+        label="调用目标字符串"
+        align="center"
+        prop="invokeTarget"
+        :show-overflow-tooltip="true"
+      />
+      <el-table-column
+        label="cron执行表达式"
+        align="center"
+        prop="cronExpression"
+        :show-overflow-tooltip="true"
+      />
       <el-table-column label="状态" align="center">
         <template slot-scope="scope">
           <el-switch
@@ -120,23 +155,43 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['monitor:job:edit']"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['monitor:job:remove']"
-          >删除</el-button>
-          <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['monitor:job:changeStatus', 'monitor:job:query']">
-            <el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
+            >删除</el-button
+          >
+          <el-dropdown
+            size="mini"
+            @command="(command) => handleCommand(command, scope.row)"
+            v-hasPermi="['monitor:job:changeStatus', 'monitor:job:query']"
+          >
+            <el-button size="mini" type="text" icon="el-icon-d-arrow-right"
+              >更多</el-button
+            >
             <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item command="handleRun" icon="el-icon-caret-right"
-                v-hasPermi="['monitor:job:changeStatus']">执行一次</el-dropdown-item>
-              <el-dropdown-item command="handleView" icon="el-icon-view"
-                v-hasPermi="['monitor:job:query']">任务详细</el-dropdown-item>
-              <el-dropdown-item command="handleJobLog" icon="el-icon-s-operation"
-                v-hasPermi="['monitor:job:query']">调度日志</el-dropdown-item>
+              <el-dropdown-item
+                command="handleRun"
+                icon="el-icon-caret-right"
+                v-hasPermi="['monitor:job:changeStatus']"
+                >执行一次</el-dropdown-item
+              >
+              <el-dropdown-item
+                command="handleView"
+                icon="el-icon-view"
+                v-hasPermi="['monitor:job:query']"
+                >任务详细</el-dropdown-item
+              >
+              <el-dropdown-item
+                command="handleJobLog"
+                icon="el-icon-s-operation"
+                v-hasPermi="['monitor:job:query']"
+                >调度日志</el-dropdown-item
+              >
             </el-dropdown-menu>
           </el-dropdown>
         </template>
@@ -144,7 +199,7 @@
     </el-table>
 
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
@@ -207,7 +262,8 @@
                   v-for="dict in dict.type.sys_job_status"
                   :key="dict.value"
                   :label="dict.value"
-                >{{dict.label}}</el-radio>
+                  >{{ dict.label }}</el-radio
+                >
               </el-radio-group>
             </el-form-item>
           </el-col>
@@ -236,8 +292,18 @@
       </div>
     </el-dialog>
 
-    <el-dialog title="Cron表达式生成器" :visible.sync="openCron" append-to-body destroy-on-close class="scrollbar">
-      <crontab @hide="openCron=false" @fill="crontabFill" :expression="expression"></crontab>
+    <el-dialog
+      title="Cron表达式生成器"
+      :visible.sync="openCron"
+      append-to-body
+      destroy-on-close
+      class="scrollbar"
+    >
+      <crontab
+        @hide="openCron = false"
+        @fill="crontabFill"
+        :expression="expression"
+      ></crontab>
     </el-dialog>
 
     <!-- 任务日志详细 -->
@@ -256,7 +322,9 @@
             <el-form-item label="cron表达式:">{{ form.cronExpression }}</el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item label="下次执行时间:">{{ parseTime(form.nextValidTime) }}</el-form-item>
+            <el-form-item label="下次执行时间:">{{
+              parseTime(form.nextValidTime)
+            }}</el-form-item>
           </el-col>
           <el-col :span="24">
             <el-form-item label="调用目标方法:">{{ form.invokeTarget }}</el-form-item>
@@ -291,13 +359,21 @@
 </template>
 
 <script>
-import { listJob, getJob, delJob, addJob, updateJob, runJob, changeJobStatus } from "@/api/monitor/job";
-import Crontab from '@/components/Crontab'
+import {
+  listJob,
+  getJob,
+  delJob,
+  addJob,
+  updateJob,
+  runJob,
+  changeJobStatus,
+} from "@/api/monitor/job";
+import Crontab from "@/components/Crontab";
 
 export default {
   components: { Crontab },
   name: "Job",
-  dicts: ['sys_job_group', 'sys_job_status'],
+  dicts: ["sys_job_group", "sys_job_status"],
   data() {
     return {
       // 遮罩层
@@ -330,22 +406,20 @@ export default {
         pageSize: 10,
         jobName: undefined,
         jobGroup: undefined,
-        status: undefined
+        status: undefined,
       },
       // 表单参数
       form: {},
       // 表单校验
       rules: {
-        jobName: [
-          { required: true, message: "任务名称不能为空", trigger: "blur" }
-        ],
+        jobName: [{ required: true, message: "任务名称不能为空", trigger: "blur" }],
         invokeTarget: [
-          { required: true, message: "调用目标字符串不能为空", trigger: "blur" }
+          { required: true, message: "调用目标字符串不能为空", trigger: "blur" },
         ],
         cronExpression: [
-          { required: true, message: "cron执行表达式不能为空", trigger: "blur" }
-        ]
-      }
+          { required: true, message: "cron执行表达式不能为空", trigger: "blur" },
+        ],
+      },
     };
   },
   created() {
@@ -355,7 +429,7 @@ export default {
     /** 查询定时任务列表 */
     getList() {
       this.loading = true;
-      listJob(this.queryParams).then(response => {
+      listJob(this.queryParams).then((response) => {
         this.jobList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -380,7 +454,7 @@ export default {
         cronExpression: undefined,
         misfirePolicy: 1,
         concurrent: 1,
-        status: "0"
+        status: "0",
       };
       this.resetForm("form");
     },
@@ -396,7 +470,7 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.jobId);
+      this.ids = selection.map((item) => item.jobId);
       this.single = selection.length != 1;
       this.multiple = !selection.length;
     },
@@ -419,25 +493,33 @@ export default {
     // 任务状态修改
     handleStatusChange(row) {
       let text = row.status === "0" ? "启用" : "停用";
-      this.$modal.confirm('确认要"' + text + '""' + row.jobName + '"任务吗?').then(function() {
-        return changeJobStatus(row.jobId, row.status);
-      }).then(() => {
-        this.$modal.msgSuccess(text + "成功");
-      }).catch(function() {
-        row.status = row.status === "0" ? "1" : "0";
-      });
+      this.$modal
+        .confirm('确认要"' + text + '""' + row.jobName + '"任务吗?')
+        .then(function () {
+          return changeJobStatus(row.jobId, row.status);
+        })
+        .then(() => {
+          this.$modal.msgSuccess(text + "成功");
+        })
+        .catch(function () {
+          row.status = row.status === "0" ? "1" : "0";
+        });
     },
     /* 立即执行一次 */
     handleRun(row) {
-      this.$modal.confirm('确认要立即执行一次"' + row.jobName + '"任务吗?').then(function() {
-        return runJob(row.jobId, row.jobGroup);
-      }).then(() => {
-        this.$modal.msgSuccess("执行成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm('确认要立即执行一次"' + row.jobName + '"任务吗?')
+        .then(function () {
+          return runJob(row.jobId, row.jobGroup);
+        })
+        .then(() => {
+          this.$modal.msgSuccess("执行成功");
+        })
+        .catch(() => {});
     },
     /** 任务详细信息 */
     handleView(row) {
-      getJob(row.jobId).then(response => {
+      getJob(row.jobId).then((response) => {
         this.form = response.data;
         this.openView = true;
       });
@@ -454,7 +536,7 @@ export default {
     /** 任务日志列表查询 */
     handleJobLog(row) {
       const jobId = row.jobId || 0;
-      this.$router.push('/monitor/job-log/index/' + jobId)
+      this.$router.push("/monitor/job-log/index/" + jobId);
     },
     /** 新增按钮操作 */
     handleAdd() {
@@ -466,24 +548,24 @@ export default {
     handleUpdate(row) {
       this.reset();
       const jobId = row.jobId || this.ids;
-      getJob(jobId).then(response => {
+      getJob(jobId).then((response) => {
         this.form = response.data;
         this.open = true;
         this.title = "修改任务";
       });
     },
     /** 提交按钮 */
-    submitForm: function() {
-      this.$refs["form"].validate(valid => {
+    submitForm: function () {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.jobId != undefined) {
-            updateJob(this.form).then(response => {
+            updateJob(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addJob(this.form).then(response => {
+            addJob(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -495,19 +577,27 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const jobIds = row.jobId || this.ids;
-      this.$modal.confirm('是否确认删除定时任务编号为"' + jobIds + '"的数据项?').then(function() {
-        return delJob(jobIds);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm('是否确认删除定时任务编号为"' + jobIds + '"的数据项?')
+        .then(function () {
+          return delJob(jobIds);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('monitor/job/export', {
-        ...this.queryParams
-      }, `job_${new Date().getTime()}.xlsx`)
-    }
-  }
+      this.download(
+        "monitor/job/export",
+        {
+          ...this.queryParams,
+        },
+        `job_${new Date().getTime()}.xlsx`
+      );
+    },
+  },
 };
 </script>

+ 131 - 55
src/views/monitor/operlog/index.vue

@@ -1,12 +1,19 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
       <el-form-item label="系统模块" prop="title">
         <el-input
           v-model="queryParams.title"
           placeholder="请输入系统模块"
           clearable
-          style="width: 240px;"
+          style="width: 240px"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
@@ -15,7 +22,7 @@
           v-model="queryParams.operName"
           placeholder="请输入操作人员"
           clearable
-          style="width: 240px;"
+          style="width: 240px"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
@@ -62,7 +69,9 @@
         ></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 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>
@@ -77,7 +86,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['monitor:operlog:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -87,7 +97,8 @@
           size="mini"
           @click="handleClean"
           v-hasPermi="['monitor:operlog:remove']"
-        >清空</el-button>
+          >清空</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -97,34 +108,83 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['monitor:operlog:export']"
-        >导出</el-button>
+          >导出</el-button
+        >
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table ref="tables" v-loading="loading" :data="list" border @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
+    <el-table
+      ref="tables"
+      v-loading="loading"
+      :data="list"
+      border
+      @selection-change="handleSelectionChange"
+      :default-sort="defaultSort"
+      @sort-change="handleSortChange"
+      @cell-dblclick="handleView"
+    >
       <el-table-column type="selection" width="50" align="center" />
       <el-table-column label="日志编号" align="center" prop="operId" />
-      <el-table-column label="系统模块" align="center" prop="title" :show-overflow-tooltip="true" />
+      <el-table-column
+        label="系统模块"
+        align="center"
+        prop="title"
+        :show-overflow-tooltip="true"
+      />
       <el-table-column label="操作类型" align="center" prop="businessType">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_oper_type" :value="scope.row.businessType"/>
+          <dict-tag :options="dict.type.sys_oper_type" :value="scope.row.businessType" />
         </template>
       </el-table-column>
-      <el-table-column label="操作人员" align="center" prop="operName" width="110" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
-      <el-table-column label="操作地址" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
-      <el-table-column label="操作地点" align="center" prop="operLocation" :show-overflow-tooltip="true" />
+      <el-table-column
+        label="操作人员"
+        align="center"
+        prop="operName"
+        width="110"
+        :show-overflow-tooltip="true"
+        sortable="custom"
+        :sort-orders="['descending', 'ascending']"
+      />
+      <el-table-column
+        label="操作地址"
+        align="center"
+        prop="operIp"
+        width="130"
+        :show-overflow-tooltip="true"
+      />
+      <el-table-column
+        label="操作地点"
+        align="center"
+        prop="operLocation"
+        :show-overflow-tooltip="true"
+      />
       <el-table-column label="操作状态" align="center" prop="status">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_common_status" :value="scope.row.status"/>
+          <dict-tag :options="dict.type.sys_common_status" :value="scope.row.status" />
         </template>
       </el-table-column>
-      <el-table-column label="操作日期" align="center" prop="operTime" width="160" sortable="custom" :sort-orders="['descending', 'ascending']">
+      <el-table-column
+        label="操作日期"
+        align="center"
+        prop="operTime"
+        width="160"
+        sortable="custom"
+        :sort-orders="['descending', 'ascending']"
+      >
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.operTime) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="消耗时间" align="center" prop="costTime" width="110" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']">
+      <el-table-column
+        label="消耗时间"
+        align="center"
+        prop="costTime"
+        width="110"
+        :show-overflow-tooltip="true"
+        sortable="custom"
+        :sort-orders="['descending', 'ascending']"
+      >
         <template slot-scope="scope">
           <span>{{ scope.row.costTime }}毫秒</span>
         </template>
@@ -135,15 +195,16 @@
             size="mini"
             type="text"
             icon="el-icon-view"
-            @click="handleView(scope.row,scope.index)"
+            @click="handleView(scope.row, scope.index)"
             v-hasPermi="['monitor:operlog:query']"
-          >详细</el-button>
+            >详细</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
 
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
@@ -155,10 +216,13 @@
       <el-form ref="form" :model="form" label-width="100px" size="mini">
         <el-row>
           <el-col :span="12">
-            <el-form-item label="操作模块:">{{ form.title }} / {{ typeFormat(form) }}</el-form-item>
-            <el-form-item
-              label="登录信息:"
-            >{{ form.operName }} / {{ form.operIp }} / {{ form.operLocation }}</el-form-item>
+            <el-form-item label="操作模块:"
+              >{{ form.title }} / {{ typeFormat(form) }}</el-form-item
+            >
+            <el-form-item label="登录信息:"
+              >{{ form.operName }} / {{ form.operIp }} /
+              {{ form.operLocation }}</el-form-item
+            >
           </el-col>
           <el-col :span="12">
             <el-form-item label="请求地址:">{{ form.operUrl }}</el-form-item>
@@ -186,7 +250,9 @@
             <el-form-item label="操作时间:">{{ parseTime(form.operTime) }}</el-form-item>
           </el-col>
           <el-col :span="24">
-            <el-form-item label="异常信息:" v-if="form.status === 1">{{ form.errorMsg }}</el-form-item>
+            <el-form-item label="异常信息:" v-if="form.status === 1">{{
+              form.errorMsg
+            }}</el-form-item>
           </el-col>
         </el-row>
       </el-form>
@@ -202,7 +268,7 @@ import { list, delOperlog, cleanOperlog } from "@/api/monitor/operlog";
 
 export default {
   name: "Operlog",
-  dicts: ['sys_oper_type', 'sys_common_status'],
+  dicts: ["sys_oper_type", "sys_common_status"],
   data() {
     return {
       // 遮罩层
@@ -222,7 +288,7 @@ export default {
       // 日期范围
       dateRange: [],
       // 默认排序
-      defaultSort: {prop: 'operTime', order: 'descending'},
+      defaultSort: { prop: "operTime", order: "descending" },
       // 表单参数
       form: {},
       // 查询参数
@@ -232,8 +298,8 @@ export default {
         title: undefined,
         operName: undefined,
         businessType: undefined,
-        status: undefined
-      }
+        status: undefined,
+      },
     };
   },
   created() {
@@ -243,12 +309,11 @@ export default {
     /** 查询登录日志 */
     getList() {
       this.loading = true;
-      list(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
-          this.list = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        }
-      );
+      list(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
+        this.list = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
     },
     // 操作日志类型字典翻译
     typeFormat(row, column) {
@@ -264,12 +329,12 @@ export default {
       this.dateRange = [];
       this.resetForm("queryForm");
       this.queryParams.pageNum = 1;
-      this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
+      this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
     },
     /** 多选框选中数据 */
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.operId)
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.operId);
+      this.multiple = !selection.length;
     },
     /** 排序触发事件 */
     handleSortChange(column, prop, order) {
@@ -285,29 +350,40 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const operIds = row.operId || this.ids;
-      this.$modal.confirm('是否确认删除日志编号为"' + operIds + '"的数据项?').then(function() {
-        return delOperlog(operIds);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm('是否确认删除日志编号为"' + operIds + '"的数据项?')
+        .then(function () {
+          return delOperlog(operIds);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 清空按钮操作 */
     handleClean() {
-      this.$modal.confirm('是否确认清空所有操作日志数据项?').then(function() {
-        return cleanOperlog();
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("清空成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm("是否确认清空所有操作日志数据项?")
+        .then(function () {
+          return cleanOperlog();
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("清空成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('monitor/operlog/export', {
-        ...this.queryParams
-      }, `operlog_${new Date().getTime()}.xlsx`)
-    }
-  }
+      this.download(
+        "monitor/operlog/export",
+        {
+          ...this.queryParams,
+        },
+        `operlog_${new Date().getTime()}.xlsx`
+      );
+    },
+  },
 };
 </script>
-

+ 105 - 54
src/views/system/config/index.vue

@@ -1,6 +1,13 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
       <el-form-item label="参数名称" prop="configName">
         <el-input
           v-model="queryParams.configName"
@@ -41,7 +48,9 @@
         ></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 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>
@@ -55,7 +64,8 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['system:config:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -66,7 +76,8 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['system:config:edit']"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -77,7 +88,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['system:config:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -87,7 +99,8 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['system:config:export']"
-        >导出</el-button>
+          >导出</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -97,23 +110,50 @@
           size="mini"
           @click="handleRefreshCache"
           v-hasPermi="['system:config:remove']"
-        >刷新缓存</el-button>
+          >刷新缓存</el-button
+        >
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="configList" border @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="configList"
+      border
+      @selection-change="handleSelectionChange"
+      @cell-dblclick="handleUpdate"
+    >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="参数主键" align="center" prop="configId" />
-      <el-table-column label="参数名称" align="center" prop="configName" :show-overflow-tooltip="true" />
-      <el-table-column label="参数键名" align="center" prop="configKey" :show-overflow-tooltip="true" />
-      <el-table-column label="参数键值" align="center" prop="configValue" :show-overflow-tooltip="true" />
+      <el-table-column
+        label="参数名称"
+        align="center"
+        prop="configName"
+        :show-overflow-tooltip="true"
+      />
+      <el-table-column
+        label="参数键名"
+        align="center"
+        prop="configKey"
+        :show-overflow-tooltip="true"
+      />
+      <el-table-column
+        label="参数键值"
+        align="center"
+        prop="configValue"
+        :show-overflow-tooltip="true"
+      />
       <el-table-column label="系统内置" align="center" prop="configType">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.configType"/>
+          <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.configType" />
         </template>
       </el-table-column>
-      <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
+      <el-table-column
+        label="备注"
+        align="center"
+        prop="remark"
+        :show-overflow-tooltip="true"
+      />
       <el-table-column label="创建时间" align="center" prop="createTime" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.createTime) }}</span>
@@ -127,20 +167,22 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['system:config:edit']"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['system:config:remove']"
-          >删除</el-button>
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
 
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
@@ -165,7 +207,8 @@
               v-for="dict in dict.type.sys_yes_no"
               :key="dict.value"
               :label="dict.value"
-            >{{dict.label}}</el-radio>
+              >{{ dict.label }}</el-radio
+            >
           </el-radio-group>
         </el-form-item>
         <el-form-item label="备注" prop="remark">
@@ -181,11 +224,18 @@
 </template>
 
 <script>
-import { listConfig, getConfig, delConfig, addConfig, updateConfig, refreshCache } from "@/api/system/config";
+import {
+  listConfig,
+  getConfig,
+  delConfig,
+  addConfig,
+  updateConfig,
+  refreshCache,
+} from "@/api/system/config";
 
 export default {
   name: "Config",
-  dicts: ['sys_yes_no'],
+  dicts: ["sys_yes_no"],
   data() {
     return {
       // 遮罩层
@@ -214,22 +264,16 @@ export default {
         pageSize: 10,
         configName: undefined,
         configKey: undefined,
-        configType: undefined
+        configType: undefined,
       },
       // 表单参数
       form: {},
       // 表单校验
       rules: {
-        configName: [
-          { required: true, message: "参数名称不能为空", trigger: "blur" }
-        ],
-        configKey: [
-          { required: true, message: "参数键名不能为空", trigger: "blur" }
-        ],
-        configValue: [
-          { required: true, message: "参数键值不能为空", trigger: "blur" }
-        ]
-      }
+        configName: [{ required: true, message: "参数名称不能为空", trigger: "blur" }],
+        configKey: [{ required: true, message: "参数键名不能为空", trigger: "blur" }],
+        configValue: [{ required: true, message: "参数键值不能为空", trigger: "blur" }],
+      },
     };
   },
   created() {
@@ -239,12 +283,11 @@ export default {
     /** 查询参数列表 */
     getList() {
       this.loading = true;
-      listConfig(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
-          this.configList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        }
-      );
+      listConfig(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
+        this.configList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
     },
     // 取消按钮
     cancel() {
@@ -259,7 +302,7 @@ export default {
         configKey: undefined,
         configValue: undefined,
         configType: "Y",
-        remark: undefined
+        remark: undefined,
       };
       this.resetForm("form");
     },
@@ -282,32 +325,32 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.configId)
-      this.single = selection.length!=1
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.configId);
+      this.single = selection.length != 1;
+      this.multiple = !selection.length;
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const configId = row.configId || this.ids
-      getConfig(configId).then(response => {
+      const configId = row.configId || this.ids;
+      getConfig(configId).then((response) => {
         this.form = response.data;
         this.open = true;
         this.title = "修改参数";
       });
     },
     /** 提交按钮 */
-    submitForm: function() {
-      this.$refs["form"].validate(valid => {
+    submitForm: function () {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.configId != undefined) {
-            updateConfig(this.form).then(response => {
+            updateConfig(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addConfig(this.form).then(response => {
+            addConfig(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -319,25 +362,33 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const configIds = row.configId || this.ids;
-      this.$modal.confirm('是否确认删除参数编号为"' + configIds + '"的数据项?').then(function() {
+      this.$modal
+        .confirm('是否确认删除参数编号为"' + configIds + '"的数据项?')
+        .then(function () {
           return delConfig(configIds);
-        }).then(() => {
+        })
+        .then(() => {
           this.getList();
           this.$modal.msgSuccess("删除成功");
-        }).catch(() => {});
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('system/config/export', {
-        ...this.queryParams
-      }, `config_${new Date().getTime()}.xlsx`)
+      this.download(
+        "system/config/export",
+        {
+          ...this.queryParams,
+        },
+        `config_${new Date().getTime()}.xlsx`
+      );
     },
     /** 刷新缓存按钮操作 */
     handleRefreshCache() {
       refreshCache().then(() => {
         this.$modal.msgSuccess("刷新成功");
       });
-    }
-  }
+    },
+  },
 };
 </script>

+ 13 - 2
src/views/system/dept/index.vue

@@ -66,10 +66,21 @@
       row-key="deptId"
       :default-expand-all="isExpandAll"
       :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+      @cell-dblclick="handleUpdate"
     >
       <el-table-column prop="deptName" label="部门名称" width="280"></el-table-column>
-      <el-table-column prop="maxDuration" align="center" label="最高工时" width="90"></el-table-column>
-      <el-table-column prop="orderNum" align="center" label="排序" width="60"></el-table-column>
+      <el-table-column
+        prop="maxDuration"
+        align="center"
+        label="最高工时"
+        width="90"
+      ></el-table-column>
+      <el-table-column
+        prop="orderNum"
+        align="center"
+        label="排序"
+        width="60"
+      ></el-table-column>
       <el-table-column prop="status" align="center" label="状态" width="100">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />

+ 106 - 56
src/views/system/dict/index.vue

@@ -1,6 +1,13 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
       <el-form-item label="字典名称" prop="dictName">
         <el-input
           v-model="queryParams.dictName"
@@ -46,7 +53,9 @@
         ></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 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>
@@ -60,7 +69,8 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['system:dict:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -71,7 +81,8 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['system:dict:edit']"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -82,7 +93,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['system:dict:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -92,7 +104,8 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['system:dict:export']"
-        >导出</el-button>
+          >导出</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -102,28 +115,48 @@
           size="mini"
           @click="handleRefreshCache"
           v-hasPermi="['system:dict:remove']"
-        >刷新缓存</el-button>
+          >刷新缓存</el-button
+        >
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="typeList" border @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="typeList"
+      border
+      @selection-change="handleSelectionChange"
+      @cell-dblclick="handleUpdate"
+    >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="字典编号" align="center" prop="dictId" />
-      <el-table-column label="字典名称" align="center" prop="dictName" :show-overflow-tooltip="true" />
+      <el-table-column
+        label="字典名称"
+        align="center"
+        prop="dictName"
+        :show-overflow-tooltip="true"
+      />
       <el-table-column label="字典类型" align="center" :show-overflow-tooltip="true">
         <template slot-scope="scope">
-          <router-link :to="'/system/dict-data/index/' + scope.row.dictId" class="link-type">
+          <router-link
+            :to="'/system/dict-data/index/' + scope.row.dictId"
+            class="link-type"
+          >
             <span>{{ scope.row.dictType }}</span>
           </router-link>
         </template>
       </el-table-column>
       <el-table-column label="状态" align="center" prop="status">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
+          <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />
         </template>
       </el-table-column>
-      <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
+      <el-table-column
+        label="备注"
+        align="center"
+        prop="remark"
+        :show-overflow-tooltip="true"
+      />
       <el-table-column label="创建时间" align="center" prop="createTime" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.createTime) }}</span>
@@ -137,20 +170,22 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['system:dict:edit']"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['system:dict:remove']"
-          >删除</el-button>
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
 
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
@@ -172,11 +207,16 @@
               v-for="dict in dict.type.sys_normal_disable"
               :key="dict.value"
               :label="dict.value"
-            >{{dict.label}}</el-radio>
+              >{{ dict.label }}</el-radio
+            >
           </el-radio-group>
         </el-form-item>
         <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
+          <el-input
+            v-model="form.remark"
+            type="textarea"
+            placeholder="请输入内容"
+          ></el-input>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -188,11 +228,18 @@
 </template>
 
 <script>
-import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
+import {
+  listType,
+  getType,
+  delType,
+  addType,
+  updateType,
+  refreshCache,
+} from "@/api/system/dict/type";
 
 export default {
   name: "Dict",
-  dicts: ['sys_normal_disable'],
+  dicts: ["sys_normal_disable"],
   data() {
     return {
       // 遮罩层
@@ -221,19 +268,15 @@ export default {
         pageSize: 10,
         dictName: undefined,
         dictType: undefined,
-        status: undefined
+        status: undefined,
       },
       // 表单参数
       form: {},
       // 表单校验
       rules: {
-        dictName: [
-          { required: true, message: "字典名称不能为空", trigger: "blur" }
-        ],
-        dictType: [
-          { required: true, message: "字典类型不能为空", trigger: "blur" }
-        ]
-      }
+        dictName: [{ required: true, message: "字典名称不能为空", trigger: "blur" }],
+        dictType: [{ required: true, message: "字典类型不能为空", trigger: "blur" }],
+      },
     };
   },
   created() {
@@ -243,12 +286,11 @@ export default {
     /** 查询字典类型列表 */
     getList() {
       this.loading = true;
-      listType(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
-          this.typeList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        }
-      );
+      listType(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
+        this.typeList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
     },
     // 取消按钮
     cancel() {
@@ -262,7 +304,7 @@ export default {
         dictName: undefined,
         dictType: undefined,
         status: "0",
-        remark: undefined
+        remark: undefined,
       };
       this.resetForm("form");
     },
@@ -285,32 +327,32 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.dictId)
-      this.single = selection.length!=1
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.dictId);
+      this.single = selection.length != 1;
+      this.multiple = !selection.length;
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const dictId = row.dictId || this.ids
-      getType(dictId).then(response => {
+      const dictId = row.dictId || this.ids;
+      getType(dictId).then((response) => {
         this.form = response.data;
         this.open = true;
         this.title = "修改字典类型";
       });
     },
     /** 提交按钮 */
-    submitForm: function() {
-      this.$refs["form"].validate(valid => {
+    submitForm: function () {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.dictId != undefined) {
-            updateType(this.form).then(response => {
+            updateType(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addType(this.form).then(response => {
+            addType(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -322,26 +364,34 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const dictIds = row.dictId || this.ids;
-      this.$modal.confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?').then(function() {
-        return delType(dictIds);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?')
+        .then(function () {
+          return delType(dictIds);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('system/dict/type/export', {
-        ...this.queryParams
-      }, `type_${new Date().getTime()}.xlsx`)
+      this.download(
+        "system/dict/type/export",
+        {
+          ...this.queryParams,
+        },
+        `type_${new Date().getTime()}.xlsx`
+      );
     },
     /** 刷新缓存按钮操作 */
     handleRefreshCache() {
       refreshCache().then(() => {
         this.$modal.msgSuccess("刷新成功");
-        this.$store.dispatch('dict/cleanDict');
+        this.$store.dispatch("dict/cleanDict");
       });
-    }
-  }
+    },
+  },
 };
-</script>
+</script>

+ 138 - 66
src/views/system/menu/index.vue

@@ -1,6 +1,12 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+    >
       <el-form-item label="菜单名称" prop="menuName">
         <el-input
           v-model="queryParams.menuName"
@@ -20,7 +26,9 @@
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <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>
@@ -34,7 +42,8 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['system:menu:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -43,7 +52,8 @@
           icon="el-icon-sort"
           size="mini"
           @click="toggleExpandAll"
-        >展开/折叠</el-button>
+          >展开/折叠</el-button
+        >
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
@@ -55,20 +65,34 @@
       border
       row-key="menuId"
       :default-expand-all="isExpandAll"
-      :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
+      :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+      @cell-dblclick="handleUpdate"
     >
-      <el-table-column prop="menuName" label="菜单名称" :show-overflow-tooltip="true" width="160"></el-table-column>
+      <el-table-column
+        prop="menuName"
+        label="菜单名称"
+        :show-overflow-tooltip="true"
+        width="160"
+      ></el-table-column>
       <el-table-column prop="icon" label="图标" align="center" width="100">
         <template slot-scope="scope">
           <svg-icon :icon-class="scope.row.icon" />
         </template>
       </el-table-column>
       <el-table-column prop="orderNum" label="排序" width="60"></el-table-column>
-      <el-table-column prop="perms" label="权限标识" :show-overflow-tooltip="true"></el-table-column>
-      <el-table-column prop="component" label="组件路径" :show-overflow-tooltip="true"></el-table-column>
+      <el-table-column
+        prop="perms"
+        label="权限标识"
+        :show-overflow-tooltip="true"
+      ></el-table-column>
+      <el-table-column
+        prop="component"
+        label="组件路径"
+        :show-overflow-tooltip="true"
+      ></el-table-column>
       <el-table-column prop="status" label="状态" width="80">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
+          <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />
         </template>
       </el-table-column>
       <el-table-column label="创建时间" align="center" prop="createTime">
@@ -84,21 +108,24 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['system:menu:edit']"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
             size="mini"
             type="text"
             icon="el-icon-plus"
             @click="handleAdd(scope.row)"
             v-hasPermi="['system:menu:add']"
-          >新增</el-button>
+            >新增</el-button
+          >
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['system:menu:remove']"
-          >删除</el-button>
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
@@ -135,13 +162,22 @@
                 trigger="click"
                 @show="$refs['iconSelect'].reset()"
               >
-                <IconSelect ref="iconSelect" @selected="selected" :active-icon="form.icon" />
-                <el-input slot="reference" v-model="form.icon" placeholder="点击选择图标" readonly>
+                <IconSelect
+                  ref="iconSelect"
+                  @selected="selected"
+                  :active-icon="form.icon"
+                />
+                <el-input
+                  slot="reference"
+                  v-model="form.icon"
+                  placeholder="点击选择图标"
+                  readonly
+                >
                   <svg-icon
                     v-if="form.icon"
                     slot="prefix"
                     :icon-class="form.icon"
-                    style="width: 25px;"
+                    style="width: 25px"
                   />
                   <i v-else slot="prefix" class="el-icon-search el-input__icon" />
                 </el-input>
@@ -155,14 +191,21 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="显示排序" prop="orderNum">
-              <el-input-number v-model="form.orderNum" controls-position="right" :min="0" />
+              <el-input-number
+                v-model="form.orderNum"
+                controls-position="right"
+                :min="0"
+              />
             </el-form-item>
           </el-col>
           <el-col :span="12" v-if="form.menuType != 'F'">
             <el-form-item prop="isFrame">
               <span slot="label">
-                <el-tooltip content="选择是外链则路由地址需要以`http(s)://`开头" placement="top">
-                <i class="el-icon-question"></i>
+                <el-tooltip
+                  content="选择是外链则路由地址需要以`http(s)://`开头"
+                  placement="top"
+                >
+                  <i class="el-icon-question"></i>
                 </el-tooltip>
                 是否外链
               </span>
@@ -175,8 +218,11 @@
           <el-col :span="12" v-if="form.menuType != 'F'">
             <el-form-item prop="path">
               <span slot="label">
-                <el-tooltip content="访问的路由地址,如:`user`,如外网地址需内链访问则以`http(s)://`开头" placement="top">
-                <i class="el-icon-question"></i>
+                <el-tooltip
+                  content="访问的路由地址,如:`user`,如外网地址需内链访问则以`http(s)://`开头"
+                  placement="top"
+                >
+                  <i class="el-icon-question"></i>
                 </el-tooltip>
                 路由地址
               </span>
@@ -186,8 +232,11 @@
           <el-col :span="12" v-if="form.menuType == 'C'">
             <el-form-item prop="component">
               <span slot="label">
-                <el-tooltip content="访问的组件路径,如:`system/user/index`,默认在`views`目录下" placement="top">
-                <i class="el-icon-question"></i>
+                <el-tooltip
+                  content="访问的组件路径,如:`system/user/index`,默认在`views`目录下"
+                  placement="top"
+                >
+                  <i class="el-icon-question"></i>
                 </el-tooltip>
                 组件路径
               </span>
@@ -196,10 +245,17 @@
           </el-col>
           <el-col :span="12" v-if="form.menuType != 'M'">
             <el-form-item prop="perms">
-              <el-input v-model="form.perms" placeholder="请输入权限标识" maxlength="100" />
+              <el-input
+                v-model="form.perms"
+                placeholder="请输入权限标识"
+                maxlength="100"
+              />
               <span slot="label">
-                <el-tooltip content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasPermi('system:user:list')`)" placement="top">
-                <i class="el-icon-question"></i>
+                <el-tooltip
+                  content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasPermi('system:user:list')`)"
+                  placement="top"
+                >
+                  <i class="el-icon-question"></i>
                 </el-tooltip>
                 权限字符
               </span>
@@ -207,10 +263,17 @@
           </el-col>
           <el-col :span="12" v-if="form.menuType == 'C'">
             <el-form-item prop="query">
-              <el-input v-model="form.query" placeholder="请输入路由参数" maxlength="255" />
+              <el-input
+                v-model="form.query"
+                placeholder="请输入路由参数"
+                maxlength="255"
+              />
               <span slot="label">
-                <el-tooltip content='访问路由的默认传递参数,如:`{"id": 1, "name": "ry"}`' placement="top">
-                <i class="el-icon-question"></i>
+                <el-tooltip
+                  content='访问路由的默认传递参数,如:`{"id": 1, "name": "ry"}`'
+                  placement="top"
+                >
+                  <i class="el-icon-question"></i>
                 </el-tooltip>
                 路由参数
               </span>
@@ -219,8 +282,11 @@
           <el-col :span="12" v-if="form.menuType == 'C'">
             <el-form-item prop="isCache">
               <span slot="label">
-                <el-tooltip content="选择是则会被`keep-alive`缓存,需要匹配组件的`name`和地址保持一致" placement="top">
-                <i class="el-icon-question"></i>
+                <el-tooltip
+                  content="选择是则会被`keep-alive`缓存,需要匹配组件的`name`和地址保持一致"
+                  placement="top"
+                >
+                  <i class="el-icon-question"></i>
                 </el-tooltip>
                 是否缓存
               </span>
@@ -233,8 +299,11 @@
           <el-col :span="12" v-if="form.menuType != 'F'">
             <el-form-item prop="visible">
               <span slot="label">
-                <el-tooltip content="选择隐藏则路由将不会出现在侧边栏,但仍然可以访问" placement="top">
-                <i class="el-icon-question"></i>
+                <el-tooltip
+                  content="选择隐藏则路由将不会出现在侧边栏,但仍然可以访问"
+                  placement="top"
+                >
+                  <i class="el-icon-question"></i>
                 </el-tooltip>
                 显示状态
               </span>
@@ -243,15 +312,19 @@
                   v-for="dict in dict.type.sys_show_hide"
                   :key="dict.value"
                   :label="dict.value"
-                >{{dict.label}}</el-radio>
+                  >{{ dict.label }}</el-radio
+                >
               </el-radio-group>
             </el-form-item>
           </el-col>
           <el-col :span="12" v-if="form.menuType != 'F'">
             <el-form-item prop="status">
               <span slot="label">
-                <el-tooltip content="选择停用则路由将不会出现在侧边栏,也不能被访问" placement="top">
-                <i class="el-icon-question"></i>
+                <el-tooltip
+                  content="选择停用则路由将不会出现在侧边栏,也不能被访问"
+                  placement="top"
+                >
+                  <i class="el-icon-question"></i>
                 </el-tooltip>
                 菜单状态
               </span>
@@ -260,7 +333,8 @@
                   v-for="dict in dict.type.sys_normal_disable"
                   :key="dict.value"
                   :label="dict.value"
-                >{{dict.label}}</el-radio>
+                  >{{ dict.label }}</el-radio
+                >
               </el-radio-group>
             </el-form-item>
           </el-col>
@@ -282,7 +356,7 @@ import IconSelect from "@/components/IconSelect";
 
 export default {
   name: "Menu",
-  dicts: ['sys_show_hide', 'sys_normal_disable'],
+  dicts: ["sys_show_hide", "sys_normal_disable"],
   components: { Treeselect, IconSelect },
   data() {
     return {
@@ -305,22 +379,16 @@ export default {
       // 查询参数
       queryParams: {
         menuName: undefined,
-        visible: undefined
+        visible: undefined,
       },
       // 表单参数
       form: {},
       // 表单校验
       rules: {
-        menuName: [
-          { required: true, message: "菜单名称不能为空", trigger: "blur" }
-        ],
-        orderNum: [
-          { required: true, message: "菜单顺序不能为空", trigger: "blur" }
-        ],
-        path: [
-          { required: true, message: "路由地址不能为空", trigger: "blur" }
-        ]
-      }
+        menuName: [{ required: true, message: "菜单名称不能为空", trigger: "blur" }],
+        orderNum: [{ required: true, message: "菜单顺序不能为空", trigger: "blur" }],
+        path: [{ required: true, message: "路由地址不能为空", trigger: "blur" }],
+      },
     };
   },
   created() {
@@ -334,7 +402,7 @@ export default {
     /** 查询菜单列表 */
     getList() {
       this.loading = true;
-      listMenu(this.queryParams).then(response => {
+      listMenu(this.queryParams).then((response) => {
         this.menuList = this.handleTree(response.data, "menuId");
         this.loading = false;
       });
@@ -347,14 +415,14 @@ export default {
       return {
         id: node.menuId,
         label: node.menuName,
-        children: node.children
+        children: node.children,
       };
     },
     /** 查询菜单下拉树结构 */
     getTreeselect() {
-      listMenu().then(response => {
+      listMenu().then((response) => {
         this.menuOptions = [];
-        const menu = { menuId: 0, menuName: '主类目', children: [] };
+        const menu = { menuId: 0, menuName: "主类目", children: [] };
         menu.children = this.handleTree(response.data, "menuId");
         this.menuOptions.push(menu);
       });
@@ -376,7 +444,7 @@ export default {
         isFrame: "1",
         isCache: "0",
         visible: "0",
-        status: "0"
+        status: "0",
       };
       this.resetForm("form");
     },
@@ -413,24 +481,24 @@ export default {
     handleUpdate(row) {
       this.reset();
       this.getTreeselect();
-      getMenu(row.menuId).then(response => {
+      getMenu(row.menuId).then((response) => {
         this.form = response.data;
         this.open = true;
         this.title = "修改菜单";
       });
     },
     /** 提交按钮 */
-    submitForm: function() {
-      this.$refs["form"].validate(valid => {
+    submitForm: function () {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.menuId != undefined) {
-            updateMenu(this.form).then(response => {
+            updateMenu(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addMenu(this.form).then(response => {
+            addMenu(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -441,13 +509,17 @@ export default {
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      this.$modal.confirm('是否确认删除名称为"' + row.menuName + '"的数据项?').then(function() {
-        return delMenu(row.menuId);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
-    }
-  }
+      this.$modal
+        .confirm('是否确认删除名称为"' + row.menuName + '"的数据项?')
+        .then(function () {
+          return delMenu(row.menuId);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
+    },
+  },
 };
 </script>

+ 70 - 46
src/views/system/post/index.vue

@@ -1,6 +1,13 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
       <el-form-item label="岗位编码" prop="postCode">
         <el-input
           v-model="queryParams.postCode"
@@ -28,7 +35,9 @@
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <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>
@@ -42,7 +51,8 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['system:post:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -53,7 +63,8 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['system:post:edit']"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -64,7 +75,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['system:post:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -74,12 +86,19 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['system:post:export']"
-        >导出</el-button>
+          >导出</el-button
+        >
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="postList" border @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="postList"
+      border
+      @selection-change="handleSelectionChange"
+      @cell-dblclick="handleUpdate"
+    >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="岗位编号" align="center" prop="postId" />
       <el-table-column label="岗位编码" align="center" prop="postCode" />
@@ -87,7 +106,7 @@
       <el-table-column label="岗位排序" align="center" prop="postSort" />
       <el-table-column label="状态" align="center" prop="status">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
+          <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />
         </template>
       </el-table-column>
       <el-table-column label="创建时间" align="center" prop="createTime" width="180">
@@ -103,20 +122,22 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['system:post:edit']"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['system:post:remove']"
-          >删除</el-button>
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
 
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
@@ -141,7 +162,8 @@
               v-for="dict in dict.type.sys_normal_disable"
               :key="dict.value"
               :label="dict.value"
-            >{{dict.label}}</el-radio>
+              >{{ dict.label }}</el-radio
+            >
           </el-radio-group>
         </el-form-item>
         <el-form-item label="备注" prop="remark">
@@ -161,7 +183,7 @@ import { listPost, getPost, delPost, addPost, updatePost } from "@/api/system/po
 
 export default {
   name: "Post",
-  dicts: ['sys_normal_disable'],
+  dicts: ["sys_normal_disable"],
   data() {
     return {
       // 遮罩层
@@ -188,22 +210,16 @@ export default {
         pageSize: 10,
         postCode: undefined,
         postName: undefined,
-        status: undefined
+        status: undefined,
       },
       // 表单参数
       form: {},
       // 表单校验
       rules: {
-        postName: [
-          { required: true, message: "岗位名称不能为空", trigger: "blur" }
-        ],
-        postCode: [
-          { required: true, message: "岗位编码不能为空", trigger: "blur" }
-        ],
-        postSort: [
-          { required: true, message: "岗位顺序不能为空", trigger: "blur" }
-        ]
-      }
+        postName: [{ required: true, message: "岗位名称不能为空", trigger: "blur" }],
+        postCode: [{ required: true, message: "岗位编码不能为空", trigger: "blur" }],
+        postSort: [{ required: true, message: "岗位顺序不能为空", trigger: "blur" }],
+      },
     };
   },
   created() {
@@ -213,7 +229,7 @@ export default {
     /** 查询岗位列表 */
     getList() {
       this.loading = true;
-      listPost(this.queryParams).then(response => {
+      listPost(this.queryParams).then((response) => {
         this.postList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -232,7 +248,7 @@ export default {
         postName: undefined,
         postSort: 0,
         status: "0",
-        remark: undefined
+        remark: undefined,
       };
       this.resetForm("form");
     },
@@ -248,9 +264,9 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.postId)
-      this.single = selection.length!=1
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.postId);
+      this.single = selection.length != 1;
+      this.multiple = !selection.length;
     },
     /** 新增按钮操作 */
     handleAdd() {
@@ -261,25 +277,25 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const postId = row.postId || this.ids
-      getPost(postId).then(response => {
+      const postId = row.postId || this.ids;
+      getPost(postId).then((response) => {
         this.form = response.data;
         this.open = true;
         this.title = "修改岗位";
       });
     },
     /** 提交按钮 */
-    submitForm: function() {
-      this.$refs["form"].validate(valid => {
+    submitForm: function () {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.postId != undefined) {
-            updatePost(this.form).then(response => {
+            updatePost(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addPost(this.form).then(response => {
+            addPost(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -291,19 +307,27 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const postIds = row.postId || this.ids;
-      this.$modal.confirm('是否确认删除岗位编号为"' + postIds + '"的数据项?').then(function() {
-        return delPost(postIds);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm('是否确认删除岗位编号为"' + postIds + '"的数据项?')
+        .then(function () {
+          return delPost(postIds);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('system/post/export', {
-        ...this.queryParams
-      }, `post_${new Date().getTime()}.xlsx`)
-    }
-  }
+      this.download(
+        "system/post/export",
+        {
+          ...this.queryParams,
+        },
+        `post_${new Date().getTime()}.xlsx`
+      );
+    },
+  },
 };
 </script>

+ 3 - 1
src/views/project/list/index.vue

@@ -6,6 +6,7 @@
         :span="2"
         :xs="24"
         style="padding-left: 0; padding-right: 0; overflow-x: auto"
+        v-show="showSearch"
       >
         <div class="head-container">
           <el-input
@@ -165,12 +166,13 @@
           :data="userList"
           border
           @selection-change="handleSelectionChange"
+          @cell-dblclick="handleUpdate"
         >
           <el-table-column type="selection" width="50" align="center" />
           <el-table-column
             label="项目编号"
             align="center"
-            width="90"
+            width="100"
             key="projectNumber"
             prop="projectNumber"
             v-if="columns[0].visible"

+ 413 - 53
src/views/record/list/index.vue

@@ -6,6 +6,7 @@
         :span="2"
         :xs="24"
         style="padding-left: 0; padding-right: 0; overflow-x: auto"
+        v-show="showSearch"
       >
         <div class="head-container">
           <el-input
@@ -135,6 +136,21 @@
               />
             </el-select>
           </el-form-item>
+          <el-form-item label="考勤状态" prop="clockStatus">
+            <el-select
+              v-model="queryParams.clockStatus"
+              placeholder="考勤状态"
+              clearable
+              style="width: 240px"
+            >
+              <el-option
+                v-for="dict in dict.type.sys_attendance_status"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
           <el-form-item>
             <el-button
               type="primary"
@@ -196,6 +212,18 @@
               placeholder="选择审批日期时间"
             />
           </el-col>
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              size="mini"
+              @click="handleImports"
+              v-hasPermi="['system:user:import']"
+              >导入考勤</el-button
+            >
+          </el-col>
+          <el-col :span="1.5">
+            <el-button type="primary" size="mini" @click="mateHours">匹配工时</el-button>
+          </el-col>
           <right-toolbar
             :showSearch.sync="showSearch"
             @queryTable="getList"
@@ -265,25 +293,41 @@
             v-if="columns[6].visible"
           />
           <el-table-column
+            label="初始时长"
+            align="center"
+            width="50"
+            key="initDuration"
+            prop="initDuration"
+            v-if="columns[7].visible"
+          />
+          <el-table-column
+            label="考勤"
+            align="center"
+            width="50"
+            key="checkDuration"
+            prop="checkDuration"
+            v-if="columns[8].visible"
+          />
+          <el-table-column
             label="项目编号"
             align="center"
             key="projectNumber"
             prop="projectNumber"
-            v-if="columns[7].visible"
+            v-if="columns[9].visible"
           />
           <el-table-column
             label="项目名称"
             align="center"
             key="projectName"
             prop="projectName"
-            v-if="columns[8].visible"
+            v-if="columns[10].visible"
           />
           <el-table-column
             label="研发阶段"
             align="center"
             key="projectStatus"
             prop="projectStatus"
-            v-if="columns[9].visible"
+            v-if="columns[11].visible"
           >
             <template slot-scope="scope">
               <dict-tag
@@ -297,7 +341,7 @@
             align="center"
             key="content"
             prop="content"
-            v-if="columns[10].visible"
+            v-if="columns[12].visible"
             :show-overflow-tooltip="true"
           />
           <!-- :show-overflow-tooltip="true" -->
@@ -306,7 +350,7 @@
             align="center"
             key="processStatus"
             prop="processStatus"
-            v-if="columns[11].visible"
+            v-if="columns[13].visible"
           >
             <template slot-scope="scope">
               <dict-tag
@@ -320,7 +364,7 @@
             align="center"
             key="examineName"
             prop="examineName"
-            v-if="columns[12].visible"
+            v-if="columns[14].visible"
           />
           <el-table-column
             label="审核时间"
@@ -328,7 +372,7 @@
             align="center"
             key="examineTime"
             prop="examineTime"
-            v-if="columns[13].visible"
+            v-if="columns[15].visible"
           />
           <el-table-column
             label="附件"
@@ -396,7 +440,36 @@
         <el-button @click="upload.open = false">取 消</el-button>
       </div>
     </el-dialog>
-
+    <!-- 数据导入对话框 -->
+    <el-dialog
+      :title="uploads.title"
+      :visible.sync="uploads.open"
+      width="400px"
+      append-to-body
+    >
+      <el-upload
+        ref="uploads"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="uploads.headers"
+        :action="uploads.url + '?updateSupport=' + uploads.updateSupport"
+        :disabled="uploads.isUploading"
+        :on-progress="handleFileUploadProgresss"
+        :on-success="handleFileSuccesss"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+        <div class="el-upload__tip text-center" slot="tip">
+          <span>仅允许导入xls、xlsx格式文件。</span>
+        </div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForms">确 定</el-button>
+        <el-button @click="uploads.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
     <el-dialog :title="title" :visible.sync="open" width="400px" append-to-body>
       <template slot-scope="scope" v-if="!srcList">
         <span>暂无附件~</span>
@@ -405,7 +478,6 @@
         <ImagePreview :src="srcList" :width="100" :height="100" />
       </template>
     </el-dialog>
-
     <el-dialog title="审批意见" width="400px" :visible.sync="examineVisible">
       <el-input
         type="textarea"
@@ -418,11 +490,139 @@
         <el-button type="primary" @click="batchExamineRecord(2)">同 意</el-button>
       </div>
     </el-dialog>
+    <el-dialog
+      title="考勤校对表"
+      :visible.sync="checkVisible"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+    >
+      <div :style="{ textAlign: 'right', marginBottom: '10px' }">
+        <el-button size="mini" type="primary" @click="updateAllUserClock(0)"
+          >缺卡处理</el-button
+        >
+        <el-button size="mini" type="primary" @click="updateAllUserClock(2)"
+          >加班核算</el-button
+        >
+        <el-button size="mini" type="primary" @click="updateAllUserClock(1)"
+          >无加班核算</el-button
+        >
+      </div>
+      <el-table :data="checkData" border>
+        <el-table-column property="name" label="打卡人"></el-table-column>
+        <el-table-column property="recordTime" label="日期" width="100"></el-table-column>
+        <el-table-column
+          property="startTime"
+          label="开始时间"
+          width="160"
+        ></el-table-column>
+        <el-table-column
+          property="endTime"
+          label="结束时间"
+          width="160"
+        ></el-table-column>
+        <el-table-column
+          property="sumDuration"
+          align="center"
+          label="时长"
+          width="60"
+        ></el-table-column>
+        <el-table-column
+          property="checkDuration"
+          align="center"
+          label="核对时长"
+          width="80"
+        >
+          <template slot-scope="scope">
+            <div :style="{ cursor: 'pointer' }" @click="rowEdit(scope.row)">
+              {{ scope.row.checkDuration }}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column property="status" align="center" label="状态" width="70">
+          <template slot-scope="scope">
+            <span>{{ ["正常", "缺卡", "已修改"][scope.row.status] }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+          property="clockStatus"
+          align="center"
+          label="打卡状态"
+          width="80"
+        >
+          <template slot-scope="scope">
+            <span>{{ ["正常", "多打卡", "无匹配"][scope.row.clockStatus] }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="操作"
+          align="center"
+          width="70"
+          class-name="small-padding fixed-width"
+        >
+          <template slot-scope="scope" v-if="scope.row.clockStatus == 1">
+            <el-button size="mini" type="text" @click="selClockDetails(scope.row.id)"
+              >操作</el-button
+            >
+          </template>
+        </el-table-column>
+      </el-table>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="userRecordMerge">完成核对</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog title="修改核对工时" width="200px" :visible.sync="rowvbs">
+      <el-input type="number" v-model="ckDuration" placeholder="请填写工时"></el-input>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="rowvbs = false">取 消</el-button>
+        <el-button type="primary" @click="updateUserRecord">确 认</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog title="修改核对工时" width="540px" :visible.sync="clockDetails">
+      <el-table :data="detailData">
+        <el-table-column property="projectName" label="项目名称"></el-table-column>
+        <el-table-column
+          property="recordTime"
+          label="日期"
+          width="100px"
+        ></el-table-column>
+        <el-table-column
+          property="duration"
+          align="center"
+          label="工时"
+          width="60px"
+        ></el-table-column>
+        <el-table-column property="checkDuration" label="核对工时">
+          <template slot-scope="scope">
+            <el-input
+              type="number"
+              v-model="scope.row.checkDuration"
+              placeholder="请填写核对工时"
+            ></el-input>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="clockDetails = false">取 消</el-button>
+        <el-button type="primary" @click="updateUserClockDetails">确 认</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import { listRecord, batchExamineRecord } from "@/api/system/record";
+import {
+  listRecord,
+  batchExamineRecord,
+  selectUserClock,
+  importUserClock,
+  updateAllUserClock,
+  mateUserRecord,
+  userRecordMerge,
+  updateUserRecord,
+  UserClockDetails,
+  updateUserClockDetails,
+} from "@/api/system/record";
 import { deptTreeSelect } from "@/api/system/user";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
@@ -430,10 +630,24 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 
 export default {
   name: "Record",
-  dicts: ["sys_user_fulljob", "sys_record_stage", "sys_process_status"],
+  dicts: [
+    "sys_user_fulljob",
+    "sys_record_stage",
+    "sys_process_status",
+    "sys_attendance_status",
+  ],
   components: { Treeselect },
   data() {
     return {
+      clockDetails: false,
+      detailId: undefined,
+      detailData: [],
+      rowvbs: false,
+      ckDuration: 0,
+      // 校对表数据
+      checkData: [],
+      // 考勤核对
+      checkVisible: false,
       // 审核弹窗
       examineVisible: false,
       // 审核意见
@@ -474,10 +688,6 @@ export default {
       form: {},
       // 附件
       srcList: "",
-      year: [
-        { label: "非跨年", value: 0 },
-        { label: "跨年", value: 1 },
-      ],
       defaultProps: {
         children: "children",
         label: "label",
@@ -497,6 +707,21 @@ export default {
         // 上传的地址
         url: process.env.VUE_APP_BASE_API + "/api/project/listRecord/importData",
       },
+      // 数据导入参数
+      uploads: {
+        // 是否显示弹出层
+        open: false,
+        // 弹出层标题
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/system/user/importUserClock",
+      },
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -507,6 +732,7 @@ export default {
         projectYear: undefined,
         crossYear: undefined,
         deptId: undefined,
+        clockStatus: null,
       },
       // 列信息
       columns: [
@@ -517,42 +743,16 @@ export default {
         { key: 4, label: `打卡时间`, visible: true },
         { key: 5, label: `工时`, visible: true },
         { key: 6, label: `打卡月份`, visible: true },
-        { key: 7, label: `项目编号`, visible: true },
-        { key: 8, label: `项目名称`, visible: true },
-        { key: 9, label: `创建任务`, visible: true },
-        { key: 10, label: `日报内容`, visible: true },
-        { key: 11, label: `审核状态`, visible: true },
-        { key: 12, label: `审核人员`, visible: true },
-        { key: 13, label: `审核时间`, visible: true },
+        { key: 7, label: `初始时长`, visible: true },
+        { key: 8, label: `考勤`, visible: true },
+        { key: 9, label: `项目编号`, visible: true },
+        { key: 10, label: `项目名称`, visible: true },
+        { key: 11, label: `创建任务`, visible: true },
+        { key: 12, label: `日报内容`, visible: true },
+        { key: 13, label: `审核状态`, visible: true },
+        { key: 14, label: `审核人员`, visible: true },
+        { key: 15, label: `审核时间`, visible: true },
       ],
-      // 表单校验
-      rules: {
-        // projectNumber: [
-        //   { required: true, message: "用户名称不能为空", trigger: "blur" },
-        //   { min: 2, max: 20, message: '用户名称长度必须介于 2 和 20 之间', trigger: 'blur' }
-        // ],
-        // name: [
-        //   { required: true, message: "用户昵称不能为空", trigger: "blur" }
-        // ],
-        // password: [
-        //   { required: true, message: "用户密码不能为空", trigger: "blur" },
-        //   { min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur' }
-        // ],
-        // email: [
-        //   {
-        //     type: "email",
-        //     message: "请输入正确的邮箱地址",
-        //     trigger: ["blur", "change"]
-        //   }
-        // ],
-        // phonenumber: [
-        //   {
-        //     pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
-        //     message: "请输入正确的手机号码",
-        //     trigger: "blur"
-        //   }
-        // ]
-      },
     };
   },
   watch: {
@@ -647,6 +847,7 @@ export default {
       // }
       this.examineVisible = true;
     },
+    /** 审核 */
     batchExamineRecord(status) {
       if (!this.content) {
         this.$modal.msgWarning("请填写审批意见!");
@@ -665,9 +866,6 @@ export default {
           this.content = "";
           this.$modal.msgSuccess("操作成功");
         }
-        // this.userList = response.rows;
-        // this.total = response.total;
-        // this.loading = false;
       });
     },
     /** 下载附件 */
@@ -708,6 +906,18 @@ export default {
       this.upload.title = "项目导入";
       this.upload.open = true;
     },
+    handleImports() {
+      const _this = this;
+      selectUserClock().then((response) => {
+        if (!response.data || response.data.length == 0) {
+          _this.uploads.title = "数据导入";
+          _this.uploads.open = true;
+        } else {
+          _this.checkData = response.data;
+          _this.checkVisible = true;
+        }
+      });
+    },
     /** 下载模板操作 */
     importTemplate() {
       this.download(
@@ -738,6 +948,156 @@ export default {
     submitFileForm() {
       this.$refs.upload.submit();
     },
+    // 考勤数据上传中处理
+    handleFileUploadProgresss(event, file, fileList) {
+      this.uploads.isUploading = true;
+    },
+    // 考勤数据成功处理
+    handleFileSuccesss(response, file, fileList) {
+      if (response.code == 500) {
+        this.uploads.isUploading = false;
+        this.$refs.uploads.clearFiles();
+        this.$modal.msgError(response.msg);
+        return;
+      }
+      this.uploads.open = false;
+      this.uploads.isUploading = false;
+      this.$refs.uploads.clearFiles();
+      this.handleImports();
+    },
+    // 提交上传文件
+    submitFileForms() {
+      this.$refs.uploads.submit();
+    },
+    // 匹配工时
+    mateHours() {
+      let dateRange = Array.isArray(this.dateRange) ? this.dateRange : [];
+      if (dateRange.length > 0) {
+        this.queryParams.startTime = dateRange[0];
+        this.queryParams.endTime = dateRange[1];
+      } else {
+        this.queryParams.startTime = undefined;
+        this.queryParams.endTime = undefined;
+      }
+      let datResearch = Array.isArray(this.datResearch) ? this.datResearch : [];
+      if (datResearch.length > 0) {
+        this.queryParams.researchStart = datResearch[0];
+        this.queryParams.researchEnd = datResearch[1];
+      } else {
+        this.queryParams.researchStart = undefined;
+        this.queryParams.researchEnd = undefined;
+      }
+      this.queryParams.roleType = 3;
+      const _this = this;
+      this.$modal
+        .confirm(
+          "您是否确定将全部的考勤数据,同步工时数据。确定,即将考勤数据,同步至工时数据。无工时数据,则数据无需导入匹配。"
+        )
+        .then(function () {
+          _this.loading = true;
+          mateUserRecord(_this.queryParams)
+            .then((response) => {
+              if (response.code == 200) {
+                _this.$modal.msgSuccess(response.msg);
+                _this.getList();
+              }
+              _this.loading = false;
+            })
+            .catch(() => {
+              _this.loading = false;
+            });
+        })
+        .then(() => {})
+        .catch(() => {});
+    },
+    //
+    updateAllUserClock(type) {
+      let data = {
+        type,
+      };
+      const _this = this;
+      updateAllUserClock(data).then((response) => {
+        if (response.code == 200) {
+          selectUserClock().then((response) => {
+            _this.checkData = response.data;
+          });
+          this.$modal.msgSuccess("操作成功");
+        }
+      });
+    },
+    // 核对
+    userRecordMerge() {
+      userRecordMerge().then((response) => {
+        if (response.code == 200) {
+          this.getList();
+          this.checkData = [];
+          this.checkVisible = false;
+          this.$alert(
+            "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
+              response.msg +
+              "</div>",
+            { showClose: false, dangerouslyUseHTMLString: true }
+          );
+        }
+      });
+    },
+    rowEdit(row) {
+      this.rowvbs = true;
+      this.ckDuration = row.checkDuration;
+      this.ckid = row.id;
+    },
+    // 修改单条核对时长
+    updateUserRecord() {
+      let data = {
+        id: this.ckid,
+        checkDuration: this.ckDuration,
+      };
+      const _this = this;
+      updateUserRecord(data).then((response) => {
+        if (response.code == 200) {
+          selectUserClock().then((response) => {
+            _this.checkData = response.data;
+          });
+          this.$modal.msgSuccess("修改成功");
+          this.rowvbs = false;
+        }
+      });
+    },
+    // 查看多打卡数据
+    selClockDetails(id) {
+      UserClockDetails({ id }).then((response) => {
+        if (response.code == 200) {
+          this.detailId = response.data.id;
+          this.detailData = response.data.list || [];
+          this.clockDetails = true;
+        }
+      });
+    },
+    updateUserClockDetails() {
+      const _this = this;
+      const dlist = this.detailData;
+      let list = [];
+      for (var i = 0; i < dlist.length; i++) {
+        if (!dlist[i].checkDuration && dlist[i].checkDuration !== 0) {
+          this.$modal.msgWarning("核对工时不能为空");
+          return;
+        }
+        list.push({ id: dlist[i].id, checkDuration: dlist[i].checkDuration });
+      }
+      let data = {
+        id: this.detailId,
+        list,
+      };
+      updateUserClockDetails(data).then((response) => {
+        if (response.code == 200) {
+          selectUserClock().then((response) => {
+            _this.checkData = response.data;
+          });
+          this.$modal.msgSuccess("修改成功");
+          this.clockDetails = false;
+        }
+      });
+    },
   },
 };
 </script>

+ 1 - 1
src/views/system/role/authUser.vue

@@ -62,7 +62,7 @@
     <el-table v-loading="loading" :data="userList" border @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="用户名称" prop="userName" :show-overflow-tooltip="true" />
-      <el-table-column label="用户昵称" prop="nickName" :show-overflow-tooltip="true" />
+      <el-table-column label="员工姓名" prop="nickName" :show-overflow-tooltip="true" />
       <el-table-column label="邮箱" prop="email" :show-overflow-tooltip="true" />
       <el-table-column label="手机" prop="phonenumber" :show-overflow-tooltip="true" />
       <el-table-column label="状态" align="center" prop="status">

+ 229 - 131
src/views/system/role/index.vue

@@ -1,6 +1,12 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+    >
       <el-form-item label="角色名称" prop="roleName">
         <el-input
           v-model="queryParams.roleName"
@@ -46,7 +52,9 @@
         ></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 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>
@@ -60,7 +68,8 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['system:role:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -71,7 +80,8 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['system:role:edit']"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -82,7 +92,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['system:role:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -92,16 +103,33 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['system:role:export']"
-        >导出</el-button>
+          >导出</el-button
+        >
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="roleList" border @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="roleList"
+      border
+      @selection-change="handleSelectionChange"
+      @cell-dblclick="handleUpdate"
+    >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="角色编号" prop="roleId" width="120" />
-      <el-table-column label="角色名称" prop="roleName" :show-overflow-tooltip="true" width="150" />
-      <el-table-column label="权限字符" prop="roleKey" :show-overflow-tooltip="true" width="150" />
+      <el-table-column
+        label="角色名称"
+        prop="roleName"
+        :show-overflow-tooltip="true"
+        width="150"
+      />
+      <el-table-column
+        label="权限字符"
+        prop="roleKey"
+        :show-overflow-tooltip="true"
+        width="150"
+      />
       <el-table-column label="显示顺序" prop="roleSort" width="100" />
       <el-table-column label="状态" align="center" width="100">
         <template slot-scope="scope">
@@ -126,21 +154,37 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['system:role:edit']"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['system:role:remove']"
-          >删除</el-button>
-          <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">
-            <el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
+            >删除</el-button
+          >
+          <el-dropdown
+            size="mini"
+            @command="(command) => handleCommand(command, scope.row)"
+            v-hasPermi="['system:role:edit']"
+          >
+            <el-button size="mini" type="text" icon="el-icon-d-arrow-right"
+              >更多</el-button
+            >
             <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item command="handleDataScope" icon="el-icon-circle-check"
-                v-hasPermi="['system:role:edit']">数据权限</el-dropdown-item>
-              <el-dropdown-item command="handleAuthUser" icon="el-icon-user"
-                v-hasPermi="['system:role:edit']">分配用户</el-dropdown-item>
+              <el-dropdown-item
+                command="handleDataScope"
+                icon="el-icon-circle-check"
+                v-hasPermi="['system:role:edit']"
+                >数据权限</el-dropdown-item
+              >
+              <el-dropdown-item
+                command="handleAuthUser"
+                icon="el-icon-user"
+                v-hasPermi="['system:role:edit']"
+                >分配用户</el-dropdown-item
+              >
             </el-dropdown-menu>
           </el-dropdown>
         </template>
@@ -148,7 +192,7 @@
     </el-table>
 
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
@@ -156,14 +200,23 @@
     />
 
     <!-- 添加或修改角色配置对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :close-on-click-modal="false">
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="500px"
+      append-to-body
+      :close-on-click-modal="false"
+    >
       <el-form ref="form" :model="form" :rules="rules" label-width="100px">
         <el-form-item label="角色名称" prop="roleName">
           <el-input v-model="form.roleName" placeholder="请输入角色名称" />
         </el-form-item>
         <el-form-item prop="roleKey">
           <span slot="label">
-            <el-tooltip content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasRole('admin')`)" placement="top">
+            <el-tooltip
+              content="控制器中定义的权限字符,如:@PreAuthorize(`@ss.hasRole('admin')`)"
+              placement="top"
+            >
               <i class="el-icon-question"></i>
             </el-tooltip>
             权限字符
@@ -179,13 +232,26 @@
               v-for="dict in dict.type.sys_normal_disable"
               :key="dict.value"
               :label="dict.value"
-            >{{dict.label}}</el-radio>
+              >{{ dict.label }}</el-radio
+            >
           </el-radio-group>
         </el-form-item>
         <el-form-item label="菜单权限">
-          <el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox>
-          <el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">全选/全不选</el-checkbox>
-          <el-checkbox v-model="form.menuCheckStrictly" @change="handleCheckedTreeConnect($event, 'menu')">父子联动</el-checkbox>
+          <el-checkbox
+            v-model="menuExpand"
+            @change="handleCheckedTreeExpand($event, 'menu')"
+            >展开/折叠</el-checkbox
+          >
+          <el-checkbox
+            v-model="menuNodeAll"
+            @change="handleCheckedTreeNodeAll($event, 'menu')"
+            >全选/全不选</el-checkbox
+          >
+          <el-checkbox
+            v-model="form.menuCheckStrictly"
+            @change="handleCheckedTreeConnect($event, 'menu')"
+            >父子联动</el-checkbox
+          >
           <el-tree
             class="tree-border"
             :data="menuOptions"
@@ -198,7 +264,11 @@
           ></el-tree>
         </el-form-item>
         <el-form-item label="备注">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
+          <el-input
+            v-model="form.remark"
+            type="textarea"
+            placeholder="请输入内容"
+          ></el-input>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -227,9 +297,21 @@
           </el-select>
         </el-form-item>
         <el-form-item label="数据权限" v-show="form.dataScope == 2">
-          <el-checkbox v-model="deptExpand" @change="handleCheckedTreeExpand($event, 'dept')">展开/折叠</el-checkbox>
-          <el-checkbox v-model="deptNodeAll" @change="handleCheckedTreeNodeAll($event, 'dept')">全选/全不选</el-checkbox>
-          <el-checkbox v-model="form.deptCheckStrictly" @change="handleCheckedTreeConnect($event, 'dept')">父子联动</el-checkbox>
+          <el-checkbox
+            v-model="deptExpand"
+            @change="handleCheckedTreeExpand($event, 'dept')"
+            >展开/折叠</el-checkbox
+          >
+          <el-checkbox
+            v-model="deptNodeAll"
+            @change="handleCheckedTreeNodeAll($event, 'dept')"
+            >全选/全不选</el-checkbox
+          >
+          <el-checkbox
+            v-model="form.deptCheckStrictly"
+            @change="handleCheckedTreeConnect($event, 'dept')"
+            >父子联动</el-checkbox
+          >
           <el-tree
             class="tree-border"
             :data="deptOptions"
@@ -252,12 +334,21 @@
 </template>
 
 <script>
-import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role";
+import {
+  listRole,
+  getRole,
+  delRole,
+  addRole,
+  updateRole,
+  dataScope,
+  changeRoleStatus,
+  deptTreeSelect,
+} from "@/api/system/role";
 import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
 
 export default {
   name: "Role",
-  dicts: ['sys_normal_disable'],
+  dicts: ["sys_normal_disable"],
   data() {
     return {
       // 遮罩层
@@ -290,24 +381,24 @@ export default {
       dataScopeOptions: [
         {
           value: "1",
-          label: "全部数据权限"
+          label: "全部数据权限",
         },
         {
           value: "2",
-          label: "自定数据权限"
+          label: "自定数据权限",
         },
         {
           value: "3",
-          label: "本部门数据权限"
+          label: "本部门数据权限",
         },
         {
           value: "4",
-          label: "本部门及以下数据权限"
+          label: "本部门及以下数据权限",
         },
         {
           value: "5",
-          label: "仅本人数据权限"
-        }
+          label: "仅本人数据权限",
+        },
       ],
       // 菜单列表
       menuOptions: [],
@@ -319,26 +410,20 @@ export default {
         pageSize: 10,
         roleName: undefined,
         roleKey: undefined,
-        status: undefined
+        status: undefined,
       },
       // 表单参数
       form: {},
       defaultProps: {
         children: "children",
-        label: "label"
+        label: "label",
       },
       // 表单校验
       rules: {
-        roleName: [
-          { required: true, message: "角色名称不能为空", trigger: "blur" }
-        ],
-        roleKey: [
-          { required: true, message: "权限字符不能为空", trigger: "blur" }
-        ],
-        roleSort: [
-          { required: true, message: "角色顺序不能为空", trigger: "blur" }
-        ]
-      }
+        roleName: [{ required: true, message: "角色名称不能为空", trigger: "blur" }],
+        roleKey: [{ required: true, message: "权限字符不能为空", trigger: "blur" }],
+        roleSort: [{ required: true, message: "角色顺序不能为空", trigger: "blur" }],
+      },
     };
   },
   created() {
@@ -348,16 +433,15 @@ export default {
     /** 查询角色列表 */
     getList() {
       this.loading = true;
-      listRole(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
-          this.roleList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        }
-      );
+      listRole(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
+        this.roleList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
     },
     /** 查询菜单树结构 */
     getMenuTreeselect() {
-      menuTreeselect().then(response => {
+      menuTreeselect().then((response) => {
         this.menuOptions = response.data;
       });
     },
@@ -381,14 +465,14 @@ export default {
     },
     /** 根据角色ID查询菜单树结构 */
     getRoleMenuTreeselect(roleId) {
-      return roleMenuTreeselect(roleId).then(response => {
+      return roleMenuTreeselect(roleId).then((response) => {
         this.menuOptions = response.menus;
         return response;
       });
     },
     /** 根据角色ID查询部门树结构 */
     getDeptTree(roleId) {
-      return deptTreeSelect(roleId).then(response => {
+      return deptTreeSelect(roleId).then((response) => {
         this.deptOptions = response.depts;
         return response;
       });
@@ -396,13 +480,17 @@ export default {
     // 角色状态修改
     handleStatusChange(row) {
       let text = row.status === "0" ? "启用" : "停用";
-      this.$modal.confirm('确认要"' + text + '""' + row.roleName + '"角色吗?').then(function() {
-        return changeRoleStatus(row.roleId, row.status);
-      }).then(() => {
-        this.$modal.msgSuccess(text + "成功");
-      }).catch(function() {
-        row.status = row.status === "0" ? "1" : "0";
-      });
+      this.$modal
+        .confirm('确认要"' + text + '""' + row.roleName + '"角色吗?')
+        .then(function () {
+          return changeRoleStatus(row.roleId, row.status);
+        })
+        .then(() => {
+          this.$modal.msgSuccess(text + "成功");
+        })
+        .catch(function () {
+          row.status = row.status === "0" ? "1" : "0";
+        });
     },
     // 取消按钮
     cancel() {
@@ -419,22 +507,22 @@ export default {
       if (this.$refs.menu != undefined) {
         this.$refs.menu.setCheckedKeys([]);
       }
-      this.menuExpand = false,
-      this.menuNodeAll = false,
-      this.deptExpand = true,
-      this.deptNodeAll = false,
-      this.form = {
-        roleId: undefined,
-        roleName: undefined,
-        roleKey: undefined,
-        roleSort: 0,
-        status: "0",
-        menuIds: [],
-        deptIds: [],
-        menuCheckStrictly: true,
-        deptCheckStrictly: true,
-        remark: undefined
-      };
+      (this.menuExpand = false),
+        (this.menuNodeAll = false),
+        (this.deptExpand = true),
+        (this.deptNodeAll = false),
+        (this.form = {
+          roleId: undefined,
+          roleName: undefined,
+          roleKey: undefined,
+          roleSort: 0,
+          status: "0",
+          menuIds: [],
+          deptIds: [],
+          menuCheckStrictly: true,
+          deptCheckStrictly: true,
+          remark: undefined,
+        });
       this.resetForm("form");
     },
     /** 搜索按钮操作 */
@@ -450,9 +538,9 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.roleId)
-      this.single = selection.length!=1
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.roleId);
+      this.single = selection.length != 1;
+      this.multiple = !selection.length;
     },
     // 更多操作触发
     handleCommand(command, row) {
@@ -469,12 +557,12 @@ export default {
     },
     // 树权限(展开/折叠)
     handleCheckedTreeExpand(value, type) {
-      if (type == 'menu') {
+      if (type == "menu") {
         let treeList = this.menuOptions;
         for (let i = 0; i < treeList.length; i++) {
           this.$refs.menu.store.nodesMap[treeList[i].id].expanded = value;
         }
-      } else if (type == 'dept') {
+      } else if (type == "dept") {
         let treeList = this.deptOptions;
         for (let i = 0; i < treeList.length; i++) {
           this.$refs.dept.store.nodesMap[treeList[i].id].expanded = value;
@@ -483,18 +571,18 @@ export default {
     },
     // 树权限(全选/全不选)
     handleCheckedTreeNodeAll(value, type) {
-      if (type == 'menu') {
-        this.$refs.menu.setCheckedNodes(value ? this.menuOptions: []);
-      } else if (type == 'dept') {
-        this.$refs.dept.setCheckedNodes(value ? this.deptOptions: []);
+      if (type == "menu") {
+        this.$refs.menu.setCheckedNodes(value ? this.menuOptions : []);
+      } else if (type == "dept") {
+        this.$refs.dept.setCheckedNodes(value ? this.deptOptions : []);
       }
     },
     // 树权限(父子联动)
     handleCheckedTreeConnect(value, type) {
-      if (type == 'menu') {
-        this.form.menuCheckStrictly = value ? true: false;
-      } else if (type == 'dept') {
-        this.form.deptCheckStrictly = value ? true: false;
+      if (type == "menu") {
+        this.form.menuCheckStrictly = value ? true : false;
+      } else if (type == "dept") {
+        this.form.deptCheckStrictly = value ? true : false;
       }
     },
     /** 新增按钮操作 */
@@ -506,28 +594,30 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.reset();
-      const roleId = row.roleId || this.ids
-      const roleMenu = this.getRoleMenuTreeselect(roleId);
-      getRole(roleId).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.$nextTick(() => {
-          roleMenu.then(res => {
-            let checkedKeys = res.checkedKeys
-            checkedKeys.forEach((v) => {
-                this.$nextTick(()=>{
-                    this.$refs.menu.setChecked(v, true ,false);
-                })
-            })
+      if (row.roleId !== 1) {
+        this.reset();
+        const roleId = row.roleId || this.ids;
+        const roleMenu = this.getRoleMenuTreeselect(roleId);
+        getRole(roleId).then((response) => {
+          this.form = response.data;
+          this.open = true;
+          this.$nextTick(() => {
+            roleMenu.then((res) => {
+              let checkedKeys = res.checkedKeys;
+              checkedKeys.forEach((v) => {
+                this.$nextTick(() => {
+                  this.$refs.menu.setChecked(v, true, false);
+                });
+              });
+            });
           });
+          this.title = "修改角色";
         });
-        this.title = "修改角色";
-      });
+      }
     },
     /** 选择角色权限范围触发 */
     dataScopeSelectChange(value) {
-      if(value !== '2') {
+      if (value !== "2") {
         this.$refs.dept.setCheckedKeys([]);
       }
     },
@@ -535,11 +625,11 @@ export default {
     handleDataScope(row) {
       this.reset();
       const deptTreeSelect = this.getDeptTree(row.roleId);
-      getRole(row.roleId).then(response => {
+      getRole(row.roleId).then((response) => {
         this.form = response.data;
         this.openDataScope = true;
         this.$nextTick(() => {
-          deptTreeSelect.then(res => {
+          deptTreeSelect.then((res) => {
             this.$refs.dept.setCheckedKeys(res.checkedKeys);
           });
         });
@@ -547,24 +637,24 @@ export default {
       });
     },
     /** 分配用户操作 */
-    handleAuthUser: function(row) {
+    handleAuthUser: function (row) {
       const roleId = row.roleId;
       this.$router.push("/system/role-auth/user/" + roleId);
     },
     /** 提交按钮 */
-    submitForm: function() {
-      this.$refs["form"].validate(valid => {
+    submitForm: function () {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.roleId != undefined) {
             this.form.menuIds = this.getMenuAllCheckedKeys();
-            updateRole(this.form).then(response => {
+            updateRole(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
             this.form.menuIds = this.getMenuAllCheckedKeys();
-            addRole(this.form).then(response => {
+            addRole(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -574,10 +664,10 @@ export default {
       });
     },
     /** 提交按钮(数据权限) */
-    submitDataScope: function() {
+    submitDataScope: function () {
       if (this.form.roleId != undefined) {
         this.form.deptIds = this.getDeptAllCheckedKeys();
-        dataScope(this.form).then(response => {
+        dataScope(this.form).then((response) => {
           this.$modal.msgSuccess("修改成功");
           this.openDataScope = false;
           this.getList();
@@ -587,19 +677,27 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const roleIds = row.roleId || this.ids;
-      this.$modal.confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?').then(function() {
-        return delRole(roleIds);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm('是否确认删除角色编号为"' + roleIds + '"的数据项?')
+        .then(function () {
+          return delRole(roleIds);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('system/role/export', {
-        ...this.queryParams
-      }, `role_${new Date().getTime()}.xlsx`)
-    }
-  }
+      this.download(
+        "system/role/export",
+        {
+          ...this.queryParams,
+        },
+        `role_${new Date().getTime()}.xlsx`
+      );
+    },
+  },
 };
-</script>
+</script>

+ 1 - 1
src/views/system/role/selectUser.vue

@@ -27,7 +27,7 @@
       <el-table @row-click="clickRow" ref="table" :data="userList" border @selection-change="handleSelectionChange" height="260px">
         <el-table-column type="selection" width="55"></el-table-column>
         <el-table-column label="用户名称" prop="userName" :show-overflow-tooltip="true" />
-        <el-table-column label="用户昵称" prop="nickName" :show-overflow-tooltip="true" />
+        <el-table-column label="员工姓名" prop="nickName" :show-overflow-tooltip="true" />
         <el-table-column label="邮箱" prop="email" :show-overflow-tooltip="true" />
         <el-table-column label="手机" prop="phonenumber" :show-overflow-tooltip="true" />
         <el-table-column label="状态" align="center" prop="status">

+ 1 - 1
src/views/system/user/authRole.vue

@@ -4,7 +4,7 @@
     <el-form ref="form" :model="form" label-width="80px">
       <el-row>
         <el-col :span="8" :offset="2">
-          <el-form-item label="用户昵称" prop="nickName">
+          <el-form-item label="员工姓名" prop="nickName">
             <el-input v-model="form.nickName" disabled />
           </el-form-item>
         </el-col>

+ 22 - 11
src/views/system/user/index.vue

@@ -6,6 +6,7 @@
         :span="2"
         :xs="24"
         style="padding-left: 0; padding-right: 0; overflow-x: auto"
+        v-show="showSearch"
       >
         <div class="head-container">
           <el-input
@@ -41,7 +42,7 @@
           v-show="showSearch"
           label-width="68px"
         >
-          <el-form-item label="用户昵称" prop="nickName">
+          <el-form-item label="员工姓名" prop="nickName">
             <el-input
               v-model="queryParams.nickName"
               placeholder="请输入用户昵称"
@@ -253,6 +254,7 @@
           :data="userList"
           border
           @selection-change="handleSelectionChange"
+          @cell-dblclick="handleUpdate"
         >
           <el-table-column type="selection" width="50" align="center" />
           <el-table-column
@@ -278,7 +280,7 @@
             :show-overflow-tooltip="true"
           />
           <el-table-column
-            label="用户昵称"
+            label="员工姓名"
             align="center"
             key="nickName"
             prop="nickName"
@@ -353,14 +355,6 @@
                 :value="scope.row.status"
               />
             </template>
-            <!-- <template slot-scope="scope">
-              <el-switch
-                v-model="scope.row.status"
-                active-value="0"
-                inactive-value="1"
-                @change="handleStatusChange(scope.row)"
-              ></el-switch>
-            </template> -->
           </el-table-column>
           <el-table-column
             label="创建时间"
@@ -481,7 +475,7 @@
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item label="用户昵称" prop="nickName">
+            <el-form-item label="员工姓名" prop="nickName">
               <el-input
                 v-model="form.nickName"
                 placeholder="请输入用户昵称"
@@ -605,6 +599,17 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
+            <el-form-item label="钉钉编号">
+              <el-input
+                v-model="form.ddUserId"
+                placeholder="请输入钉钉编号"
+                maxlength="50"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
             <el-form-item label="状态">
               <el-radio-group v-model="form.status">
                 <el-radio
@@ -836,6 +841,12 @@ export default {
             trigger: "blur",
           },
         ],
+        ddUserId: [
+          {
+            message: "请输入钉钉编号",
+            trigger: "blur",
+          },
+        ],
       },
     };
   },

+ 2 - 2
src/views/system/user/profile/userInfo.vue

@@ -1,6 +1,6 @@
 <template>
   <el-form ref="form" :model="user" :rules="rules" label-width="80px">
-    <el-form-item label="用户昵称" prop="nickName">
+    <el-form-item label="员工姓名" prop="nickName">
       <el-input v-model="user.nickName" maxlength="30" />
     </el-form-item> 
     <el-form-item label="手机号码" prop="phonenumber">
@@ -36,7 +36,7 @@ export default {
       // 表单校验
       rules: {
         nickName: [
-          { required: true, message: "用户昵称不能为空", trigger: "blur" }
+          { required: true, message: "员工姓名不能为空", trigger: "blur" }
         ],
         email: [
           { required: true, message: "邮箱地址不能为空", trigger: "blur" },

+ 98 - 47
src/views/tool/gen/index.vue

@@ -1,6 +1,13 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
       <el-form-item label="表名称" prop="tableName">
         <el-input
           v-model="queryParams.tableName"
@@ -29,7 +36,9 @@
         ></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 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>
@@ -43,7 +52,8 @@
           size="mini"
           @click="handleGenTable"
           v-hasPermi="['tool:gen:code']"
-        >生成</el-button>
+          >生成</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -53,7 +63,8 @@
           size="mini"
           @click="openImportTable"
           v-hasPermi="['tool:gen:import']"
-        >导入</el-button>
+          >导入</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -64,7 +75,8 @@
           :disabled="single"
           @click="handleEditTable"
           v-hasPermi="['tool:gen:edit']"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -75,16 +87,25 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['tool:gen:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="tableList" border @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      :data="tableList"
+      border
+      @selection-change="handleSelectionChange"
+      @cell-dblclick="handlePreview"
+    >
       <el-table-column type="selection" align="center" width="55"></el-table-column>
       <el-table-column label="序号" type="index" width="50" align="center">
         <template slot-scope="scope">
-          <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
+          <span>{{
+            (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
+          }}</span>
         </template>
       </el-table-column>
       <el-table-column
@@ -118,55 +139,74 @@
             icon="el-icon-view"
             @click="handlePreview(scope.row)"
             v-hasPermi="['tool:gen:preview']"
-          >预览</el-button>
+            >预览</el-button
+          >
           <el-button
             type="text"
             size="small"
             icon="el-icon-edit"
             @click="handleEditTable(scope.row)"
             v-hasPermi="['tool:gen:edit']"
-          >编辑</el-button>
+            >编辑</el-button
+          >
           <el-button
             type="text"
             size="small"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['tool:gen:remove']"
-          >删除</el-button>
+            >删除</el-button
+          >
           <el-button
             type="text"
             size="small"
             icon="el-icon-refresh"
             @click="handleSynchDb(scope.row)"
             v-hasPermi="['tool:gen:edit']"
-          >同步</el-button>
+            >同步</el-button
+          >
           <el-button
             type="text"
             size="small"
             icon="el-icon-download"
             @click="handleGenTable(scope.row)"
             v-hasPermi="['tool:gen:code']"
-          >生成代码</el-button>
+            >生成代码</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
     <!-- 预览界面 -->
-    <el-dialog :title="preview.title" :visible.sync="preview.open" width="80%" top="5vh" append-to-body class="scrollbar">
+    <el-dialog
+      :title="preview.title"
+      :visible.sync="preview.open"
+      width="80%"
+      top="5vh"
+      append-to-body
+      class="scrollbar"
+    >
       <el-tabs v-model="preview.activeName">
         <el-tab-pane
           v-for="(value, key) in preview.data"
-          :label="key.substring(key.lastIndexOf('/')+1,key.indexOf('.vm'))"
-          :name="key.substring(key.lastIndexOf('/')+1,key.indexOf('.vm'))"
+          :label="key.substring(key.lastIndexOf('/') + 1, key.indexOf('.vm'))"
+          :name="key.substring(key.lastIndexOf('/') + 1, key.indexOf('.vm'))"
           :key="key"
         >
-          <el-link :underline="false" icon="el-icon-document-copy" v-clipboard:copy="value" v-clipboard:success="clipboardSuccess" style="float:right">复制</el-link>
+          <el-link
+            :underline="false"
+            icon="el-icon-document-copy"
+            v-clipboard:copy="value"
+            v-clipboard:success="clipboardSuccess"
+            style="float: right"
+            >复制</el-link
+          >
           <pre><code class="hljs" v-html="highlightedCode(value, key)"></code></pre>
         </el-tab-pane>
       </el-tabs>
@@ -217,15 +257,15 @@ export default {
         pageNum: 1,
         pageSize: 10,
         tableName: undefined,
-        tableComment: undefined
+        tableComment: undefined,
       },
       // 预览参数
       preview: {
         open: false,
         title: "代码预览",
         data: {},
-        activeName: "domain.java"
-      }
+        activeName: "domain.java",
+      },
     };
   },
   created() {
@@ -243,12 +283,11 @@ export default {
     /** 查询表集合 */
     getList() {
       this.loading = true;
-      listTable(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
-          this.tableList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        }
-      );
+      listTable(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
+        this.tableList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -262,8 +301,8 @@ export default {
         this.$modal.msgError("请选择要生成的数据");
         return;
       }
-      if(row.genType === "1") {
-        genCode(row.tableName).then(response => {
+      if (row.genType === "1") {
+        genCode(row.tableName).then((response) => {
           this.$modal.msgSuccess("成功生成到自定义路径:" + row.genPath);
         });
       } else {
@@ -273,11 +312,15 @@ export default {
     /** 同步数据库操作 */
     handleSynchDb(row) {
       const tableName = row.tableName;
-      this.$modal.confirm('确认要强制同步"' + tableName + '"表结构吗?').then(function() {
-        return synchDb(tableName);
-      }).then(() => {
-        this.$modal.msgSuccess("同步成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm('确认要强制同步"' + tableName + '"表结构吗?')
+        .then(function () {
+          return synchDb(tableName);
+        })
+        .then(() => {
+          this.$modal.msgSuccess("同步成功");
+        })
+        .catch(() => {});
     },
     /** 打开导入表弹窗 */
     openImportTable() {
@@ -291,7 +334,7 @@ export default {
     },
     /** 预览按钮 */
     handlePreview(row) {
-      previewTable(row.tableId).then(response => {
+      previewTable(row.tableId).then((response) => {
         this.preview.data = response.data;
         this.preview.open = true;
         this.preview.activeName = "domain.java";
@@ -302,7 +345,7 @@ export default {
       const vmName = key.substring(key.lastIndexOf("/") + 1, key.indexOf(".vm"));
       var language = vmName.substring(vmName.indexOf(".") + 1, vmName.length);
       const result = hljs.highlight(language, code || "", true);
-      return result.value || '&nbsp;';
+      return result.value || "&nbsp;";
     },
     /** 复制代码成功 */
     clipboardSuccess() {
@@ -310,8 +353,8 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.tableId);
-      this.tableNames = selection.map(item => item.tableName);
+      this.ids = selection.map((item) => item.tableId);
+      this.tableNames = selection.map((item) => item.tableName);
       this.single = selection.length != 1;
       this.multiple = !selection.length;
     },
@@ -320,18 +363,26 @@ export default {
       const tableId = row.tableId || this.ids[0];
       const tableName = row.tableName || this.tableNames[0];
       const params = { pageNum: this.queryParams.pageNum };
-      this.$tab.openPage("修改[" + tableName + "]生成配置", '/tool/gen-edit/index/' + tableId, params);
+      this.$tab.openPage(
+        "修改[" + tableName + "]生成配置",
+        "/tool/gen-edit/index/" + tableId,
+        params
+      );
     },
     /** 删除按钮操作 */
     handleDelete(row) {
       const tableIds = row.tableId || this.ids;
-      this.$modal.confirm('是否确认删除表编号为"' + tableIds + '"的数据项?').then(function() {
-        return delTable(tableIds);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
-    }
-  }
+      this.$modal
+        .confirm('是否确认删除表编号为"' + tableIds + '"的数据项?')
+        .then(function () {
+          return delTable(tableIds);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
+    },
+  },
 };
 </script>