Explorar el Código

Merge branch 'V0.0.2' of http://10.87.10.227:4000/jzyd_yyds/soc_web into V0.0.2

jiawuxian hace 2 años
padre
commit
ca4e1bf4b1

+ 12 - 3
src/views/system/dept/extend.vue

@@ -1130,6 +1130,14 @@ export default {
   props: [],
   components: {},
   data() {
+    let formatRule = function(rule, value, callback) {
+      console.log(value,'value')
+      if (!value.length) {
+        callback(new Error("证书为必填项"));
+      } else {
+        callback();
+      }
+    };
     return {
       reqmsg: false,
       //表单验证
@@ -1142,9 +1150,9 @@ export default {
             trigger: "blur",
           },
         ],
-        // certificate: [
-        //   { validator: this.isreq, message: "请选择图片", trigger: "blur" },
-        // ],
+        certificate: [
+          { validator: this.isreq, message: "请选择图片", trigger: "blur" },
+        ],
       },
 
       //基础信息key
@@ -1529,6 +1537,7 @@ export default {
       this.Businessreset();
       const id = row.id || this.Businessids;
       getOrgPhysicalDefenseConstruction(id).then((response) => {
+        // console.log(response.data,"response.data")
         this.Businessform = response.data;
         this.Businessopen = true;
         this.Businesstitle = "编辑安全防范设施建设达标情况";

+ 17 - 16
src/views/system/user/extend.vue

@@ -101,6 +101,13 @@
               </el-select>
             </el-form-item>
           </el-col> -->
+            <el-col :xs="24" :sm="12" :md="8" :lg="6">
+            <el-form-item prop="bornTime" label="出生日期">
+              <el-date-picker v-model="formData.bornTime" @change="startDateChanged"
+                :picker-options="startDatepickerOptions" align="right" type="date" placeholder="选择出生日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
           <el-col :xs="24" :sm="12" :md="8" :lg="6">
             <el-form-item label="参加工作时间" prop="workTime">
               <el-date-picker style="width: 217px;" v-model="formData.workTime" :picker-options="endDatepickerOptions"
@@ -109,13 +116,7 @@
             </el-form-item>
           </el-col>
 
-          <el-col :xs="24" :sm="12" :md="8" :lg="6">
-            <el-form-item prop="bornTime" label="出生日期">
-              <el-date-picker v-model="formData.bornTime" @change="startDateChanged"
-                :picker-options="startDatepickerOptions" align="right" type="date" placeholder="选择出生日期">
-              </el-date-picker>
-            </el-form-item>
-          </el-col>
+        
           <el-col :xs="24" :sm="12" :md="8" :lg="6">
             <el-form-item prop="entryTime" label="现任职时间">
               <el-date-picker v-model="formData.entryTime" :picker-options="endDatepickerOptions" align="right"
@@ -145,8 +146,7 @@
         <el-row>
           <el-col :xs="24" :sm="24" :md="24" :lg="24">
             <el-form-item label="上传相关证书">
-              <image-upload :limit="5" :value="formData.qualificationCertificateUrl" :fileSize="2"
-                @input="getImgUrl"></image-upload>
+              <imgs-upload :limit="5" v-model="formData.qualificationCertificateUrl" :fileSize="2"></imgs-upload>
             </el-form-item>
           </el-col>
           <!--<el-col :xs="24" :sm="12" :md="8" :lg="6">
@@ -172,6 +172,7 @@ import uploadpng from "@/assets/images/upload.png";
 import uplpng from "@/assets/images/upl.png";
 import { getUser } from "@/api/system/user";
 import TreeSelect from '@riophae/vue-treeselect'
+import ImgsUpload from "@/components/ImgsUpload";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import { deptTreeList } from "@/api/system/public";
 
@@ -179,7 +180,7 @@ import { extendUserInformation } from "@/api/system/information";
 
 export default {
   props: [],
-  components: { TreeSelect },
+  components: { TreeSelect ,ImgsUpload},
   dicts: ['sys_highest_education', "sys_work_type", "sys_duties", "sys_education_type", 'sys_department_type', 'post_no_pass', 'current_position'],
   data() {
     return {
@@ -395,23 +396,23 @@ export default {
         this.roleName = data.roleName;
         this.sex = data.sex;
         this.status = data.status;
-        console.log(data.information.qualificationCertificateUrl, '5555')
-        let img = data.information.qualificationCertificateUrl.split(',');
+        //console.log(data.information.qualificationCertificateUrl, '5555')
+        //let img = data.information.qualificationCertificateUrl.split(',');
         this.formData = data.information;
-        this.formData.qualificationCertificateUrl = img.map((v, i) => { return this.imageUrl(v) });
+        //this.formData.qualificationCertificateUrl = img.map((v, i) => { return this.imageUrl(v) });
       });
     },
 
 
     saveExtend() {
       this.formData.userId = this.$route.params.userId;
-      let imgs = JSON.parse(JSON.stringify(this.imgs));
-      let qualificationCertificateUrl = imgs.toString(',');
+     // let imgs = JSON.parse(JSON.stringify(this.imgs));
+     // let qualificationCertificateUrl = imgs.toString(',');
       this.$refs['form'].validate((valid) => {
         if (valid) {
           let data = {
             ...this.formData,
-            qualificationCertificateUrl
+           // qualificationCertificateUrl
           }
           extendUserInformation(data).then(res => {
             this.$message.success('保存成功!')

+ 27 - 23
src/views/system/user/index.vue

@@ -1,11 +1,14 @@
 <template>
   <div class="app-container">
-    <layoutCom>
-      <org-tree slot="leftBar" v-model="queryParams.orgId" @defaultKey="getDefaultKey" @checkChange="checkChange"
-        @click="clickTreeNode"></org-tree>
-      <el-row slot="rightBar">
+
+      <el-row :gutter="20">
+        <!--机构数据-->
+        <el-col :span="4" :xs="24">
+          <org-tree  v-model="queryParams.orgId" @defaultKey="getDefaultKey" @checkChange="checkChange" @click="clickTreeNode">
+          </org-tree>
+        </el-col>
         <!--用户数据-->
-        <el-col>
+        <el-col :span="20" :xs="24">
           <!--    搜索条件    -->
           <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
             label-width="68px">
@@ -118,8 +121,8 @@
               width="120" />
             <el-table-column label="操作" align="center" width="300" fixed="right" class-name="small-padding fixed-width">
               <template slot-scope="scope">
-                <el-button size="mini" type="text" icon="el-icon-plus" @click="handleExtend(scope.row)"
-                  v-hasPermi="['system:user:extend']" v-if="scope.row.isManage == 'Y'">补充信息</el-button>
+                <el-button size="mini" type="text" icon="el-icon-plus" v-if="scope.row.isManage=='Y'" @click="handleExtend(scope.row)"
+                  v-hasPermi="['system:user:extend']" >补充信息</el-button>
                 <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
                   v-hasPermi="['system:user:edit']" >编辑</el-button>
                 <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
@@ -142,7 +145,7 @@
             :limit.sync="queryParams.pageSize" @pagination="getList" />
         </el-col>
       </el-row>
-    </layoutCom>
+
 
     <!-- 添加或编辑配置对话框 -->
     <DialogCom :title="title" :visible.sync="open" width="800px" append-to-body>
@@ -161,8 +164,8 @@
         </el-row>
         <el-row>
           <el-col :span="20">
-            <el-form-item label="所属机构" prop="orgId" @click="clickk">
-              <tree-select v-model="form.orgId" :options="deptOptions" :show-count="true" :normalizer="tenantIdnormalizer"
+            <el-form-item label="所属机构" prop="orgId" >
+              <tree-select @select="changeRoleIds()" v-model="form.orgId" :options="deptOptions" :show-count="true" :normalizer="tenantIdnormalizer"
                 :props="{ checkStrictly: true, label: 'name' }" placeholder="请选择所属机构" :disabled="form.source == 1" />
             </el-form-item>
           </el-col>
@@ -171,7 +174,7 @@
           <el-col :span="10">
             <el-form-item label="用户角色" prop="roleIds">
               <el-select @visible-change="selectRoles" style="width: 100%" v-model="form.roleIds" multiple
-                placeholder="请选择用户角色">
+                placeholder="请选择用户角色" ref="configSelect">
                 <el-option v-for="item in roleOptions" :key="item.id" :label="item.roleName" :value="item.id"
                   :disabled="item.status == 1"></el-option>
               </el-select>
@@ -424,13 +427,13 @@ export default {
 
   },
   watch: {
-    'form.orgId'(newValue) {
-      if (this.isRoleIdsChanged) {
-        this.form.roleIds = null;
-      } else {
-        this.isRoleIdsChanged = true;
-      }
-    }
+    // 'form.orgId'(newValue) {
+    //   if (this.isRoleIdsChanged) {
+    //     this.form.roleIds = null;
+    //   } else {
+    //     this.isRoleIdsChanged = true;
+    //   }
+    // }
     // 'form.orgId': {
     //   handler(newValue, oldValue) {
     //     if(oldValue!=undefined){
@@ -446,10 +449,11 @@ export default {
     // }
   },
   methods: {
-    clickk() {
-      console.log("clickk")
-    },
+
     changeRoleIds() {
+      //手动关闭下拉框
+      this.$refs.configSelect.blur();
+      //清空角色
       this.form.roleIds = null;
     },
     formatter(content) {
@@ -719,7 +723,7 @@ export default {
         {
           ...this.queryParams,
         },
-        `user_${new Date().getTime()}.xlsx`
+        `人员信息管理-用户角色_${new Date().getTime()}.xlsx`
       );
     },
     handleExportManager() {
@@ -728,7 +732,7 @@ export default {
         {
           ...this.queryParams,
         },
-        `manager_${new Date().getTime()}.xlsx`
+        `人员信息管理-管理人员_${new Date().getTime()}.xlsx`
       );
     },
     /** 导入按钮操作 */

+ 1 - 1
src/views/system/workTimeSet/dialog.add.vue

@@ -6,7 +6,7 @@
         <el-form label-width="90px" label-suffix="" label-position="right">
 
           <el-form-item label="分配机构">
-            <org-tree-select ref="orgTreeSelect" v-model="orgIdList"></org-tree-select>
+            <org-tree-select ref="orgTreeSelect" :checkShow="true"  v-model="orgIdList"></org-tree-select>
           </el-form-item >
           <el-form-item label="调整日期">
             <el-button type="primary" @click="addData">新增日期</el-button>

+ 2 - 2
src/views/system/workTimeSet/dialog.template.vue

@@ -47,8 +47,8 @@
                     <el-radio-group
                         v-model="r.row.isWorkday"
                         @change="onEnableChange(r.row)">
-                      <el-radio text-color="#48bb78" :label="1">营业</el-radio>
-                      <el-radio text-color="#f56565" :label="0">歇业</el-radio>
+                      <el-radio text-color="#48bb78" label="1">营业</el-radio>
+                      <el-radio text-color="#f56565" label="0">歇业</el-radio>
                     </el-radio-group>
                   </template>
                 </el-table-column>

+ 7 - 7
src/views/system/workTimeSet/json.js

@@ -2,7 +2,7 @@ export let json = [
   {
     "id": null,
     "workTimeSetId": null,
-    "isWorkday": 1,
+    "isWorkday": '1',
     "dayOfWeek": 2,
     "dayOfWeekText": "星期一",
     "workTime": "07:00",
@@ -15,7 +15,7 @@ export let json = [
   {
     "id": null,
     "workTimeSetId": null,
-    "isWorkday": 1,
+    "isWorkday": '1',
     "dayOfWeek": 3,
     "dayOfWeekText": "星期二",
     "workTime": "07:00",
@@ -28,7 +28,7 @@ export let json = [
   {
     "id": null,
     "workTimeSetId": null,
-    "isWorkday": 1,
+    "isWorkday": '1',
     "dayOfWeek": 4,
     "dayOfWeekText": "星期三",
     "workTime": "07:00",
@@ -41,7 +41,7 @@ export let json = [
   {
     "id": null,
     "workTimeSetId": null,
-    "isWorkday": 1,
+    "isWorkday": '1',
     "dayOfWeek": 5,
     "dayOfWeekText": "星期四",
     "workTime": "07:00",
@@ -54,7 +54,7 @@ export let json = [
   {
     "id": null,
     "workTimeSetId": null,
-    "isWorkday": 1,
+    "isWorkday": '1',
     "dayOfWeek": 6,
     "dayOfWeekText": "星期五",
     "workTime": "07:00",
@@ -67,7 +67,7 @@ export let json = [
   {
     "id": null,
     "workTimeSetId": null,
-    "isWorkday": 0,
+    "isWorkday": '0',
     "dayOfWeek": 7,
     "dayOfWeekText": "星期六",
     "workTime": null,
@@ -80,7 +80,7 @@ export let json = [
   {
     "id": null,
     "workTimeSetId": null,
-    "isWorkday": 0,
+    "isWorkday": '0',
     "dayOfWeek": 1,
     "dayOfWeekText": "星期日",
     "workTime": null,

+ 221 - 157
src/views/system/workTimeSet/workTime.vue

@@ -1,145 +1,193 @@
 <template>
   <div class="tabs-container">
-      <el-row :gutter="20">
-        <!--机构数据-->
-        <el-col :span="4" :xs="24">
-          <org-tree
-            v-model="queryParams.orgId"
-            @defaultKey="getDefaultKey"
-            @checkChange="changeCheckBox"
-            @click="handleNodeClick"
-          ></org-tree>
-        </el-col>
-        <!--table数据-->
-        <el-col :span="20" :xs="24">
+    <el-row :gutter="20">
+      <!--机构数据-->
+      <el-col :span="4" :xs="24">
+        <org-tree
+          v-model="queryParams.orgId"
+          @defaultKey="getDefaultKey"
+          @checkChange="changeCheckBox"
+          @click="handleNodeClick"
+        ></org-tree>
+      </el-col>
+      <!--table数据-->
+      <el-col :span="20" :xs="24">
+        <!--    搜索条件    -->
+        <el-form
+          :model="queryParams"
+          ref="queryForm"
+          size="small"
+          :inline="true"
+          v-show="showSearch"
+          label-width="68px"
+        >
+          <el-form-item label="起止日期">
+            <el-date-picker
+              v-model="queryParams.range"
+              style="width: 240px"
+              value-format="yyyy-MM-dd hh:mm:ss"
+              type="daterange"
+              range-separator="-"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+              :clearable="false"
+            ></el-date-picker>
+          </el-form-item>
+          <el-form-item label="营业状态" prop="status">
+            <el-select
+              v-model="queryParams.isEnable"
+              placeholder="请选择"
+              clearable
+              style="width: 240px"
+            >
+              <el-option
+                v-for="dict in dict.type.sys_business_type"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <el-button
+              type="primary"
+              icon="el-icon-search"
+              size="mini"
+              @click="handleQuery"
+              >搜索</el-button
+            >
+            <el-button icon="el-icon-refresh" size="mini" @click="resetForm"
+              >重置</el-button
+            >
+          </el-form-item>
+        </el-form>
 
-          <!--    搜索条件    -->
-          <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
-            <el-form-item label="起止日期">
-              <el-date-picker
-                v-model="queryParams.range"
-                style="width: 240px"
-                value-format="yyyy-MM-dd hh:mm:ss"
-                type="daterange"
-                range-separator="-"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-                :clearable="false"
-              ></el-date-picker>
-            </el-form-item>
-            <el-form-item label="营业状态" prop="status">
-              <el-select
-                v-model="queryParams.isEnable"
-                placeholder="请选择"
-                clearable
-                style="width: 240px">
-                <el-option
-                  v-for="dict in dict.type.sys_business_type"
-                  :key="dict.value"
-                  :label="dict.label"
-                  :value="dict.value"
-                />
-              </el-select>
-            </el-form-item>
-            <el-form-item>
-              <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-              <el-button icon="el-icon-refresh" size="mini" @click="resetForm">重置</el-button>
-            </el-form-item>
-          </el-form>
-
-          <!--    按纽    -->
-          <el-row :gutter="10" class="mb8">
-            <el-col :span="1.5">
-              <el-button
-                type="primary"
-                plain
-                size="mini"
-                icon="el-icon-thumb"
-                @click="clickAdd"
-                v-hasPermi="['system:time:add']"
-              >新增作息配置</el-button>
-            </el-col>
-            <el-col :span="1.5">
-              <!-- <el-button
+        <!--    按纽    -->
+        <el-row :gutter="10" class="mb8">
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              plain
+              size="mini"
+              icon="el-icon-thumb"
+              @click="clickAdd"
+              v-hasPermi="['system:time:add']"
+              >新增作息配置</el-button
+            >
+          </el-col>
+          <el-col :span="1.5">
+            <!-- <el-button
                 type="warning"
                 plain
                 icon="el-icon-download"
                 size="mini"
                 @click="handleExport"
                 v-hasPermi="['system:time:export']">导出</el-button> -->
-            </el-col>
-            <right-toolbar :showSearch.sync="showSearch" size="mini" @queryTable="getList" :columns="columns"></right-toolbar>
-          </el-row>
+          </el-col>
+          <right-toolbar
+            :showSearch.sync="showSearch"
+            size="mini"
+            @queryTable="getList"
+            :columns="columns"
+          ></right-toolbar>
+        </el-row>
 
-          <el-table
-            height="600"
-            size="small"
-            v-loading="loading"
-            style="width: auto;"
-            border
-            :data="tableList">
-            <el-table-column label="序号" type="index" align="center" width="50"></el-table-column>
-            <el-table-column v-if="columns[0].visible" prop="orgName" label="机构"  :show-overflow-tooltip="true"></el-table-column>
-            <el-table-column v-if="columns[1].visible" label="日期" >
-              <span slot-scope="scope">{{scope.row.ymdDate}}</span>
-            </el-table-column>
-            <el-table-column v-if="columns[2].visible" label="营业状态">
-              <template slot-scope="r">{{r.row.isEnable=='1'?'营业':'歇业'}}</template>
-            </el-table-column>
-  <!--          <el-table-column v-if="columns[3].visible" label="上下班时间段">-->
-  <!--            <template slot-scope="r">-->
-  <!--              <span>{{r.row.workTime}}-{{r.row.workOffTime}}</span>-->
-  <!--            </template>-->
-  <!--          </el-table-column>-->
-            <el-table-column v-if="columns[4].visible" label="营业时间段">
-              <template slot-scope="r">
-                <span>{{r.row.openTime}}-{{r.row.closeTime}}</span>
-              </template>
-            </el-table-column>
-  <!--          <el-table-column v-if="columns[5].visible" label="午休时间段">-->
-  <!--            <template slot-scope="scope">-->
-  <!--              <span>{{scope.row.noonbreakStart}}-{{scope.row.noonbreakEnd}}</span>-->
-  <!--            </template>-->
-  <!--          </el-table-column>-->
-            <el-table-column v-if="columns[6].visible" prop="modifiedName" label="更新人" ></el-table-column>
-            <el-table-column v-if="columns[7].visible" label="更新时间" >
-              <span slot-scope="scope">{{scope.row.updateTime}}</span>
-            </el-table-column>
-            <el-table-column v-if="columns[8].visible" label="操作列表" width="100" >
-              <template slot-scope="r">
-                <el-button type="text"  v-hasPermi="['system:time:edit']" @click="onEditTime(r.row)">编辑</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
+        <el-table
+          height="600"
+          size="small"
+          v-loading="loading"
+          style="width: auto"
+          border
+          :data="tableList"
+        >
+          <el-table-column
+            label="序号"
+            type="index"
+            align="center"
+            width="50"
+          ></el-table-column>
+          <el-table-column
+            v-if="columns[0].visible"
+            prop="orgName"
+            label="机构"
+            :show-overflow-tooltip="true"
+          ></el-table-column>
+          <el-table-column v-if="columns[1].visible" label="日期">
+            <span slot-scope="scope">{{ scope.row.ymdDate }}</span>
+          </el-table-column>
+          <el-table-column v-if="columns[2].visible" label="营业状态">
+            <template slot-scope="r">{{
+              r.row.isEnable == "1" ? "营业" : "歇业"
+            }}</template>
+          </el-table-column>
+          <!--          <el-table-column v-if="columns[3].visible" label="上下班时间段">-->
+          <!--            <template slot-scope="r">-->
+          <!--              <span>{{r.row.workTime}}-{{r.row.workOffTime}}</span>-->
+          <!--            </template>-->
+          <!--          </el-table-column>-->
+          <el-table-column v-if="columns[4].visible" label="营业时间段">
+            <template slot-scope="r">
+              <span>{{ r.row.openTime }}-{{ r.row.closeTime }}</span>
+            </template>
+          </el-table-column>
+          <!--          <el-table-column v-if="columns[5].visible" label="午休时间段">-->
+          <!--            <template slot-scope="scope">-->
+          <!--              <span>{{scope.row.noonbreakStart}}-{{scope.row.noonbreakEnd}}</span>-->
+          <!--            </template>-->
+          <!--          </el-table-column>-->
+          <el-table-column
+            v-if="columns[6].visible"
+            prop="modifiedName"
+            label="更新人"
+          ></el-table-column>
+          <el-table-column v-if="columns[7].visible" label="更新时间">
+            <span slot-scope="scope">{{ scope.row.updateTime }}</span>
+          </el-table-column>
+          <el-table-column
+            v-if="columns[8].visible"
+            label="操作列表"
+            width="100"
+          >
+            <template slot-scope="r">
+              <el-button
+                type="text"
+                v-if="hideEdit(r.row)"
+                v-hasPermi="['system:time:edit']"
+                @click="onEditTime(r.row)"
+                >编辑</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
 
-          <pagination
-            class="pages-box"
-            v-show="total>0"
-            :total="total"
-            :page.sync="queryParams.pageNum"
-            :limit.sync="queryParams.pageSize"
-            @pagination="getList"
-          />
-        </el-col>
-      </el-row>
+        <pagination
+          class="pages-box"
+          v-show="total > 0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
+      </el-col>
+    </el-row>
 
     <!--  编辑作息  -->
-    <dialog-edit ref="modalEdit" @ok="getList" ></dialog-edit>
+    <dialog-edit ref="modalEdit" @ok="getList"></dialog-edit>
     <!--  指定日期配置  -->
-    <dialog-add ref="modalAdd" @ok="getList" ></dialog-add>
-
+    <dialog-add ref="modalAdd" @ok="getList"></dialog-add>
   </div>
 </template>
 
 <script>
-import OrgTree from '@/components/orgTree'
-import DialogEdit from './dialog.edit'
-import DialogAdd from './dialog.add'
+import dayjs from "dayjs";
+import OrgTree from "@/components/orgTree";
+import DialogEdit from "./dialog.edit";
+import DialogAdd from "./dialog.add";
 
 /** 引入节点树接口*/
 import { deptTreeSelect } from "@/api/system/public";
 import { tableList } from "./api";
-import {formatTime} from "@/utils/ruoyi";
+import { formatTime } from "@/utils/ruoyi";
 //初始化查询日期
 let timea = new Date();
 timea.setHours(0, 0, 0, 0);
@@ -147,15 +195,16 @@ let timeb = new Date(timea.getTime() - 3600 * 1000 * 24 * 30);
 timeb.setHours(0, 0, 0, 0);
 export default {
   /**  得先引入字典才能使用 */
-  dicts: ['sys_business_type'],
+  dicts: ["sys_business_type"],
   /** 引入基础minxins*/
-  components: {OrgTree,DialogEdit,DialogAdd},
+  components: { OrgTree, DialogEdit, DialogAdd },
   data() {
     return {
+      nowTime: null,
       // 遮罩层
       loading: false,
       //选中的行
-      selectRow:null,
+      selectRow: null,
       // 显示搜索条件
       showSearch: true,
       // 用户表格数据
@@ -171,18 +220,18 @@ export default {
       //自定义机构树数据
       defaultProps: {
         children: "children",
-        label: "name"
+        label: "name",
       },
       // 查询参数
-     queryParams: {
+      queryParams: {
         checkSub: true,
         orgId: null,
-        isEnable:'1',
-        pageNum:1,
-        pageSize:10,
+        isEnable: "1",
+        pageNum: 1,
+        pageSize: 10,
         range: [formatTime(timeb), formatTime(timea)],
       },
-      total:0,
+      total: 0,
       // 列信息
       columns: [
         { key: 0, label: `机构`, visible: true },
@@ -193,43 +242,59 @@ export default {
         { key: 5, label: `午休时间段`, visible: true },
         { key: 6, label: `更新人`, visible: true },
         { key: 7, label: `更新时间`, visible: true },
-        { key: 8, label: `操作`, visible: true }
+        { key: 8, label: `操作`, visible: true },
       ],
       //默认选中节点
-      defaultKeys:[],
-      pickerOptions:{
+      defaultKeys: [],
+      pickerOptions: {
         start: "00:00",
         end: "24:00",
         step: "00:10",
       },
     };
   },
+  created() {
+    this.getNowTime();
+  },
   methods: {
+    getNowTime() {
+      const dateObj = new Date(); // 获取当前时间对象
+      const year = dateObj.getFullYear(); // 获取年份
+      const month = String(dateObj.getMonth() + 1).padStart(2, "0"); // 获取月份,并补齐两位数
+      const day = String(dateObj.getDate()).padStart(2, "0"); // 获取日期,并补齐两位数
+      this.nowTime = `${year}-${month}-${day}`;
+    },
+    hideEdit(row) {
+      const startDate = new Date(row.ymdDate);
+      const endDate = new Date(this.nowTime);
+      return startDate >= endDate;
+    },
     getDefaultKey(key) {
       this.queryParams.orgId = key;
       this.getList();
     },
     /** 下穿状态改变*/
-    changeCheckBox(){
-      this.queryParams.checkSub=!this.queryParams.checkSub;
+    changeCheckBox() {
+      this.queryParams.checkSub = !this.queryParams.checkSub;
       this.getList();
     },
     /** 查询列表 */
     getList() {
       this.loading = true;
-      console.log(this.queryParams,'pages')
-      tableList(this.queryParams).then(response => {
+      console.log(this.queryParams, "pages");
+      tableList(this.queryParams)
+        .then((response) => {
           this.tableList = response.rows;
           this.total = response.total;
           this.loading = false;
-        }
-      ).catch(err=>{
-        this.loading = false;
-      })
+        })
+        .catch((err) => {
+          this.loading = false;
+        });
     },
     /** 查询机构树 */
     getDeptTree() {
-      deptTreeSelect().then(response => {
+      deptTreeSelect().then((response) => {
         this.deptOptions = response.data;
         this.defaultKeys.push(response.data[0].id);
         this.queryParams.orgId = response.data[0].id;
@@ -247,7 +312,7 @@ export default {
       this.handleQuery();
     },
     //添加指定日期作息
-    clickAdd(){
+    clickAdd() {
       this.$refs.modalAdd.add();
     },
     /** 编辑按钮操作 */
@@ -257,20 +322,22 @@ export default {
     },
 
     /** 提交按钮 */
-    submitForm: function() {
-
-    },
+    submitForm: function () {},
     /** 导出按钮操作 */
     handleExport() {
-      this.download('system/time/export', {
-        ...this.queryParams
-      }, `user_${new Date().getTime()}.xlsx`)
+      this.download(
+        "system/time/export",
+        {
+          ...this.queryParams,
+        },
+        `user_${new Date().getTime()}.xlsx`
+      );
     },
     /* 重置搜索 */
-    resetForm(name){
-      this.queryParams.isEnable = '1';
-      this.queryParams.pageNum= 1;
-      this.queryParams.pageSize=10;
+    resetForm(name) {
+      this.queryParams.isEnable = "1";
+      this.queryParams.pageNum = 1;
+      this.queryParams.pageSize = 10;
       this.queryParams.range = [formatTime(timeb), formatTime(timea)];
       this.getList();
     },
@@ -279,10 +346,7 @@ export default {
       this.queryParams.pageNum = 1;
       this.getList();
     },
-  }
+  },
 };
-
 </script>
-<style lang="scss">
-
-</style>
+<style lang="scss"></style>