Procházet zdrojové kódy

Merge remote-tracking branch 'origin/dev' into dev

jingyuanchao před 2 roky
rodič
revize
72815d5f83

+ 7 - 7
src/api/resumption/taskManger.js

@@ -1,9 +1,9 @@
 import request from "@/utils/request";
 
 // 查询【请填写功能名称】列表
-export function list(query) {
+export function page(query) {
   return request({
-    url: "/core/resumption/list",
+    url: "/core/resumption/record/page",
     method: "get",
     params: query,
   });
@@ -13,7 +13,7 @@ export function list(query) {
 export function getPlans(args) {
   return request({
     url: "/core/resumption/record/plan",
-    method: "post",
+    method: "get",
     params: args,
   });
 }
@@ -21,8 +21,8 @@ export function getPlans(args) {
 //获取执行岗位
 export function getRoles(args) {
   return request({
-    url: "/core/resumption/role",
-    method: "post",
+    url: "/core/resumption/record/role",
+    method: "get",
     params: args,
   });
 }
@@ -37,9 +37,9 @@ export function exportResumptionRecord(args) {
 /**
  * 查询
  */
-export function oneNew(args) {
+export function one(args) {
   return request({
-    url: "/core/resumption/" + args,
+    url: "/core/resumption/record/" + args,
     method: "get",
     params: query,
   });

+ 29 - 0
src/views/core/accessPlan/index.vue

@@ -118,6 +118,35 @@
             :value="`${dict.value}`"></el-option>
         </el-select>
       </el-form-item>
+
+
+
+    
+            <el-form-item style="width: 100%;" v-if="form.planCycle==1" label="开始时间" prop="startTime">
+              <el-date-picker
+                clearable
+                v-model="form.startTime"
+                type="date"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                placeholder="请选择时间">
+              </el-date-picker>
+            </el-form-item>
+ 
+
+
+        
+            <el-form-item style="width: 100%;" v-if="form.planCycle==1" label="结束时间" prop="endTime">
+              <el-date-picker
+                clearable
+                v-model="form.endTime"
+                type="date"
+                value-format="yyyy-MM-dd HH:mm:ss"
+                placeholder="请选择时间">
+              </el-date-picker>
+            </el-form-item>
+      
+
+
       <el-form-item label="调阅角色" prop="roleId">
         <el-select style="width: 100%;" v-model="form.roleId" placeholder="请选择">
           <el-option v-for="item in roleList" :key="item.id" :label="item.roleName" :value="item.id"></el-option>

+ 7 - 6
src/views/resumption/protection/index.vue

@@ -62,6 +62,7 @@
               icon="el-icon-search"
               size="mini"
               @click="getList"
+              v-hasPermi="['device:protection']"
               >搜索</el-button
             >
             <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
@@ -79,7 +80,7 @@
               icon="el-icon-plus"
               size="mini"
               @click="handleAdd()"
-              v-hasPermi="['core:protection:add']"
+              v-hasPermi="['device:protection:add']"
               >新增</el-button
             >
           </el-col>
@@ -166,7 +167,7 @@
                 type="text"
                 icon="el-icon-edit"
                 @click="updateStatus(r.row.id, 1)"
-                v-hasPermi="['core:protection:status']"
+                v-hasPermi="['device:protection:maintain']"
                 >布防</el-button
               >
               <el-button
@@ -174,7 +175,7 @@
                 type="text"
                 icon="el-icon-edit"
                 @click="updateStatus(r.row.id, 0)"
-                v-hasPermi="['core:protection:status']"
+                v-hasPermi="['device:protection:maintain']"
                 >撤防</el-button
               >
               <el-button
@@ -182,7 +183,7 @@
                 type="text"
                 icon="el-icon-edit"
                 @click="onEdit(r.row.id)"
-                v-hasPermi="['core:protection:edit']"
+                v-hasPermi="['device:protection:edit']"
                 >修改</el-button
               >
               <el-button
@@ -190,7 +191,7 @@
                 type="text"
                 icon="el-icon-edit"
                 @click="onHistory(r.row)"
-                v-hasPermi="['core:protection:edit']"
+                v-hasPermi="['device:protection']"
                 >布撤防历史</el-button
               >
               <el-popover
@@ -202,7 +203,7 @@
                   size="mini"
                   type="text"
                   icon="el-icon-delete"
-                  v-hasPermi="['core:protection:remove']"
+                  v-hasPermi="['device:protection:remove']"
                   slot="reference"
                   >删除</el-button
                 >

+ 4 - 3
src/views/resumption/rule/index.vue

@@ -69,6 +69,7 @@
               icon="el-icon-search"
               size="mini"
               @click="getList"
+              v-hasPermi="['resumption:rule:query']"
               >搜索</el-button
             >
             <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
@@ -86,7 +87,7 @@
               icon="el-icon-plus"
               size="mini"
               @click="handleAdd()"
-              v-hasPermi="['system:user:add']"
+              v-hasPermi="['resumption:rule:add']"
               >新增</el-button
             >
           </el-col>
@@ -177,14 +178,14 @@
                 type="text"
                 icon="el-icon-edit"
                 @click="onEdit(r.row.id)"
-                v-hasPermi="['system:user:edit']"
+                v-hasPermi="['resumption:rule:edit']"
               >修改</el-button>
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-delete"
                 @click="onDel(r.row.id)"
-                v-hasPermi="['system:user:remove']"
+                v-hasPermi="['resumption:rule:remove']"
               >删除</el-button>              
             </template>
           </el-table-column>

+ 4 - 1
src/views/resumption/ruleManager/index.vue

@@ -57,6 +57,7 @@
               icon="el-icon-search"
               size="mini"
               @click="getList"
+              v-hasPermi="['resumption:ruleManager']"
               >搜索</el-button
             >
             <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
@@ -71,6 +72,7 @@
               type="primary"
               @click="onAddItem()"
               :disabled="rule ? false : true"
+              v-hasPermi="['resumption:ruleManager:add']"
               >新 增</el-button
             ><el-button
               type="primary"
@@ -172,6 +174,7 @@
                 size="small"
                 icon="el-icon-edit"
                 @click="onEditItem(scope.row.id)"
+                v-hasPermi="['resumption:ruleManager:edit']"
                 >编辑</el-button
               > 
                     
@@ -179,7 +182,7 @@
                 title="将删除履职项及其下所有履职内容,确定删除?"
                 @confirm="deldata(scope.row.id)"
               >
-                <el-button type="text" size="small" slot="reference" icon="el-icon-delete">删除</el-button>
+                <el-button type="text" size="small" slot="reference" icon="el-icon-delete" v-hasPermi="['resumption:ruleManager:remove']">删除</el-button>
               </el-popconfirm>
             </template>
           </el-table-column>

+ 141 - 106
src/views/resumption/taskManager/dialog.detail.vue

@@ -1,119 +1,154 @@
 <template>
-    <div>
-        <el-dialog :title="title + '详情'" :visible.sync="isShow" width="1200px" :destroy-on-close="true">
-            <el-table :data="tableData" row-key="itemId" height="441" style="max-height: 450px;overflow-y: auto;" default-expand-all>
-                <!-- align="left" -->
-                <el-table-column type="expand">
-                    <template slot-scope="props">
-                        <el-table v-if="props.row.dataInfoList" :data="props.row.dataInfoList">
-                            <el-table-column label="检查要点编号" align="center" :show-overflow-tooltip="true"
-                                prop="rulePointNum">
-                            </el-table-column>
-                            <el-table-column label="检查要点" align="center" :show-overflow-tooltip="true"
-                                prop="rulePointName">
-                            </el-table-column>
-                            <el-table-column label="安防类型" align="center" :show-overflow-tooltip="true" prop="safeType">
-                            </el-table-column>
-                            <el-table-column label="检查区域" align="center" :show-overflow-tooltip="true"
-                                prop="checkAreaName">
-                            </el-table-column>
-                            <el-table-column label="执行结果" align="center" :show-overflow-tooltip="true"
-                               >
-                                 <template slot-scope="scope">
-                                   <span style="color: green;" v-if="scope.row.executeFlag =='001' ">{{scope.row.executeResult}}</span>
-                                    <span style="color: red;" v-else-if="scope.row.executeFlag == '002' ">{{scope.row.executeResult}}</span>
-                                    </template>
-                     
-                            </el-table-column>
-                            <el-table-column label="执行时间" align="center" :show-overflow-tooltip="true"
-                                prop="executeTime">
-                                     </el-table-column>
-                            <el-table-column label="检查图片" align="center">
-                                <template slot-scope="scope">
-                                    <div class="block" v-for="img in scope.row.appResumptionDataImgList">
-                                        <el-image style="width: 50px; height: 50px;margin-right: 5px;" :src="img.imgPath" fit="fit"
-                                            :preview-src-list="imgPreviewSrcList(scope.row.appResumptionDataImgList)">
-                                        </el-image>
-                                    </div>
-                                </template>
-                            </el-table-column>
-                            <el-table-column label="描述" align="center" :show-overflow-tooltip="true" prop="resRemark">
-                            </el-table-column>
-
-                            <!-- 0 待履职,1 按时完成,3 未完成,5 补登完成 -->
-                            <!-- <el-table-column label="状态" align="center" :show-overflow-tooltip="true">
-                                <template slot-scope="scope">
-                                    <span style="color: blue;" v-if="scope.row.executeStatus == 0">待履职</span>
-                                    <span style="color: green;" v-else-if="scope.row.executeStatus == 1">按时完成</span>
-                                    <span style="color: red;" v-else-if="scope.row.executeStatus == 3">未完成</span>
-                                    <span style="color:orange;" v-else-if="scope.row.executeStatus == 5">补登完成</span>
-                                </template>
-                            </el-table-column> -->
-                        </el-table>
-                    </template>
-                </el-table-column>
-                 <el-table-column label="检查项编号" align="center" prop="itemNum" :show-overflow-tooltip="true" />
-                <el-table-column label="检查项" align="center" prop="itemName" :show-overflow-tooltip="true" />
-                <el-table-column label="标准及其要求" align="center" :show-overflow-tooltip="true" prop="itemDesc">
-                </el-table-column>
+  <div>
+    <el-dialog
+      :title="title + '详情'"
+      :visible.sync="isShow"
+      width="1200px"
+      :destroy-on-close="true"
+    >
+      <el-table
+        :data="tableData"
+        row-key="itemId"
+        height="441"
+        style="max-height: 450px; overflow-y: auto"
+        default-expand-all
+      >
+        <!-- align="left" -->
+        <el-table-column type="expand">
+          <template slot-scope="props">
+            <el-table
+              v-if="props.row.dataInfoList"
+              :data="props.row.dataInfoList"
+            >
+              <el-table-column
+                label="履职内容"
+                align="center"
+                :show-overflow-tooltip="true"
+                prop="pointName"
+              >
+              </el-table-column>
+              <el-table-column
+                label="履职区域"
+                align="center"
+                :show-overflow-tooltip="true"
+                prop="areaName"
+              >
+              </el-table-column>
+              <el-table-column
+                label="履职结果"
+                align="center"
+                :show-overflow-tooltip="true"
+              >
+                <template slot-scope="scope">
+                  <span
+                    style="color: green"
+                    v-if="scope.row.executeFlag == '001'"
+                    >{{ scope.row.executeResult }}</span
+                  >
+                  <span
+                    style="color: red"
+                    v-else-if="scope.row.executeFlag == '002'"
+                    >{{ scope.row.executeResult }}</span
+                  >
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="履职时间"
+                align="center"
+                :show-overflow-tooltip="true"
+                prop="executeTime"
+              >
+              </el-table-column>
+              <el-table-column label="履职图片" align="center">
+                <template slot-scope="scope">
+                  <div
+                    class="block"
+                    v-for="img in scope.row.appResumptionDataImgList"
+                  >
+                    <el-image
+                      style="width: 50px; height: 50px; margin-right: 5px"
+                      :src="img.imgPath"
+                      fit="fit"
+                      :preview-src-list="
+                        imgPreviewSrcList(scope.row.appResumptionDataImgList)
+                      "
+                    >
+                    </el-image>
+                  </div>
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="问题描述"
+                align="center"
+                :show-overflow-tooltip="true"
+                prop="resRemark"
+              >
+              </el-table-column>
             </el-table>
-            <div slot="footer" class="dialog-footer">
-                <el-button @click="onHide">取消</el-button>
-            </div>
-        </el-dialog>
-    </div>
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="履职项"
+          align="center"
+          prop="itemName"
+          :show-overflow-tooltip="true"
+        />
+      </el-table>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="onHide">取消</el-button>
+      </div>
+    </el-dialog>
+  </div>
 </template>
 <script>
 import * as api from "@/api/resumption/taskManger.js";
 export default {
-    data() {
-        return {
-            isShow: false,
-            title: "",
-            tableData: [],
-        }
+  data() {
+    return {
+      isShow: false,
+      title: "",
+      tableData: [],
+    };
+  },
+  methods: {
+    async refresh(id) {
+      let detail = await api.one(id);
+      if (detail && detail.length > 0) {
+        this.tableData = detail;
+      } else {
+        this.tableData = [];
+      }
     },
-    methods: {
-        async refresh(id) {
-            let detail = await api.one(id);
-            if (detail && detail.length > 0) {
-                this.tableData = detail;
-            }
-            else {
-                this.tableData = [];
-            }
-        },
-        async show(id, title) {
-            // console.log(id,title);
-            this.title = title;
-            await this.refresh(id);
-            this.isShow = true;
-        },
-        onHide() {
-            this.isShow = false;
-        },
-        reset() {
-            this.tableData = [];
-        },
-        imgPreviewSrcList(imgList)
-        {
-            let srcList=[];
-            imgList.forEach(element => {
-                srcList.push(element.imgPath)
-            });
-            return srcList;
-        }
+    async show(id, title) {
+      // console.log(id,title);
+      this.title = title;
+      await this.refresh(id);
+      this.isShow = true;
     },
-}
+    onHide() {
+      this.isShow = false;
+    },
+    reset() {
+      this.tableData = [];
+    },
+    imgPreviewSrcList(imgList) {
+      let srcList = [];
+      imgList.forEach((element) => {
+        srcList.push(element.imgPath);
+      });
+      return srcList;
+    },
+  },
+};
 </script>
 
 <style lang="scss">
 .block {
-    // padding: 10px 10px;
-    text-align: center;
-    // border-right: 1px solid #eff2f6;
-    display: inline-block;
-    // width: 20%;
-    // vertical-align: top;    
+  // padding: 10px 10px;
+  text-align: center;
+  // border-right: 1px solid #eff2f6;
+  display: inline-block;
+  // width: 20%;
+  // vertical-align: top;
 }
-</style>
+</style>

+ 12 - 3
src/views/resumption/taskManager/dialog.scanrecord.vue

@@ -21,7 +21,7 @@
           prop="collectionAreaName"
         >
         </el-table-column>
-        
+
         <el-table-column
           label="扫描时间"
           align="center"
@@ -33,15 +33,24 @@
           label="扫描方式"
           align="center"
           :show-overflow-tooltip="true"
-          prop="excuteMode"
+          prop="scanMethod"
         >
         </el-table-column>
         <el-table-column
           label="扫描方式"
           align="center"
           :show-overflow-tooltip="true"
-          prop="detail"
+          prop="img"
         >
+          <template slot-scope="r">
+            <label v-if="r.row.scanMethod == 0">-</label>
+            <el-image
+              v-else
+              style="width: 50px; height: 50px"
+              :src="r.row.img"
+              :preview-src-list="[r.row.img]"
+            ></el-image>
+          </template>
         </el-table-column>
       </el-table>
       <div slot="footer" class="dialog-footer">

+ 130 - 115
src/views/resumption/taskManager/index.vue

@@ -51,7 +51,7 @@
           </el-form-item>
           <el-form-item label="履职周期">
             <el-select
-              v-model="queryParams.planCycle"
+              v-model="queryParams.executeCycle"
               placeHolder="请选择履职周期"
               clearable
               @change="changeType($event)"
@@ -82,7 +82,7 @@
             class="searchTitle"
             label="计划时间"
             v-if="
-              queryParams.executeCycle == 1 || queryParams.executeCycle == 0
+              queryParams.executeCycle == 1 || queryParams.executeCycle == 2 || queryParams.executeCycle == null
             "
           >
             <DataRangePicker
@@ -95,7 +95,7 @@
           <el-form-item
             class="searchTitle"
             label="计划时间"
-            v-if="queryParams.executeCycle == 2"
+            v-if="queryParams.executeCycle == 3"
           >
             <!-- :format='weekStart+" 到 "+weekEnd+ 第WW周'  format=" yyyy 第 WW 周"-->
             <el-date-picker
@@ -114,7 +114,7 @@
           <el-form-item
             class="searchTitle"
             label="计划时间"
-            v-if="queryParams.executeCycle == 3"
+            v-if="queryParams.executeCycle == 4"
           >
             <el-date-picker
               v-model="monthRange"
@@ -133,7 +133,7 @@
           <el-form-item
             class="searchTitle"
             label="计划时间"
-            v-if="queryParams.executeCycle == 4"
+            v-if="queryParams.executeCycle == 5"
           >
             <el-date-picker
               :clearable="timeClearable"
@@ -177,7 +177,7 @@
             </el-select>
           </el-form-item>
 
-          <el-form-item label="计划时间" v-if="queryParams.executeCycle == 5">
+          <el-form-item label="计划时间" v-if="queryParams.executeCycle == 6">
             <el-date-picker
               :clearable="timeClearable"
               type="year"
@@ -223,7 +223,7 @@
           <el-form-item
             class="searchTitle"
             label="计划时间"
-            v-if="queryParams.executeCycle == 6"
+            v-if="queryParams.executeCycle == 7"
           >
             <el-date-picker
               :clearable="timeClearable"
@@ -280,8 +280,7 @@
         </el-row>
         <el-table v-loading="loading" :data="pageData">
           <el-table-column
-            prop="order"
-            label="序号"
+          type="index"
             min-width="4%"
             v-if="columns[0].visible"
           >
@@ -368,7 +367,9 @@
             v-if="columns[9].visible"
           >
             <template slot-scope="r">
-              {{ getLabel(dict.type.resumtipn_status, r.row.status) }}
+              <label :style="statusStyle(r.row.status)">
+                {{ getLabel(dict.type.resumption_status, r.row.status) }}</label
+              >
             </template>
           </el-table-column>
           <el-table-column label="操作" min-width="13%">
@@ -419,43 +420,43 @@ export default {
   dicts: ["plan_cycle", "resumption_status"],
   components: { DialogDetail, DialogScanRecord, DataRangePicker, OrgTree },
   data() {
-    const { params, query } = this.$route;
+    // const { params, query } = this.$route;
     let sDate = new Date();
     let eDate = new Date();
-    if (query.startDate != undefined) {
-      sDate = new Date(query.startDate);
-    }
-    if (query.endDate != undefined) {
-      eDate = new Date(query.endDate);
-    }
-    let tempType = 0;
-    let tempOrgId = 1;
-    let tempRole = null;
-    let tempstatus = null;
-    if (query.executeCycle != undefined) tempType = query.executeCycle;
-    if (query.orgId != undefined) tempOrgId = parseInt(query.orgId);
-    else {
-      if (
-        this.loginUser != undefined &&
-        this.loginUser.org != undefined &&
-        this.loginUser.org.id != undefined
-      )
-        tempOrgId = parseInt(this.loginUser.org.id);
-    }
-    if (query.executeRole != undefined && query.executeRole != "all")
-      tempRole = query.executeRole;
-    if (query.status != undefined && query.status != "all")
-      tempstatus = query.status;
+    // if (query.startDate != undefined) {
+    //   sDate = new Date(query.startDate);
+    // }
+    // if (query.endDate != undefined) {
+    //   eDate = new Date(query.endDate);
+    // }
+    // let tempType = 1;
+    // let tempOrgId = 1;
+    // let tempRole = null;
+    // let tempstatus = null;
+    // if (query.executeCycle != undefined) tempType = query.executeCycle;
+    // if (query.orgId != undefined) tempOrgId = parseInt(query.orgId);
+    // else {
+    //   if (
+    //     this.loginUser != undefined &&
+    //     this.loginUser.org != undefined &&
+    //     this.loginUser.org.id != undefined
+    //   )
+    //     tempOrgId = parseInt(this.loginUser.org.id);
+    // }
+    // if (query.executeRole != undefined && query.executeRole != "all")
+    //   tempRole = query.executeRole;
+    // if (query.status != undefined && query.status != "all")
+    //   tempstatus = query.status;
 
     let temphalfyearE = 1;
     let temphalfyearS = 1;
     let tempquarterE = 1;
     let tempquarterS = 1;
 
-    if (query.halfyearE != undefined) temphalfyearE = parseInt(query.halfyearE);
-    if (query.halfyearS != undefined) temphalfyearS = parseInt(query.halfyearS);
-    if (query.quarterE != undefined) tempquarterE = parseInt(query.quarterE);
-    if (query.quarterS != undefined) tempquarterS = parseInt(query.quarterS);
+    // if (query.halfyearE != undefined) temphalfyearE = parseInt(query.halfyearE);
+    // if (query.halfyearS != undefined) temphalfyearS = parseInt(query.halfyearS);
+    // if (query.quarterE != undefined) tempquarterE = parseInt(query.quarterE);
+    // if (query.quarterS != undefined) tempquarterS = parseInt(query.quarterS);
     return {
       loading: false,
       showSearch: true,
@@ -464,8 +465,6 @@ export default {
       options: [],
       roleList: [],
       planList: [],
-      roleVal: tempRole == null ? "all" : tempRole,
-      statusVal: tempstatus == null ? "all" : tempstatus,
       yearS: sDate,
       yearE: eDate,
       halfyearE: temphalfyearE,
@@ -497,12 +496,12 @@ export default {
         { key: "4", value: 4, text: "第四季度" },
       ],
       queryParams: {
-        executeCycle: tempType,
+        executeCycle: "1",
         checkSub: false,
-        orgId: tempOrgId,
+        orgId: null,
         range: [sDate, eDate],
-        executeRole: tempRole,
-        status: tempstatus,
+        executeRole: null,
+        status: null,
         planId: null,
         pageNum: 1,
         pageSize: 10,
@@ -525,30 +524,25 @@ export default {
   },
   props: {},
   watch: {
-    org: {
-      deep: true,
-      immediate: true,
-      handler(nOrg) {
-        if (nOrg.id) {
-          this.queryParams.orgId = nOrg.id;
-        } else {
-          this.queryParams.orgId = this.loginUser.org.id;
-        }
-        this.roleVal = "all";
-        this.planVal = -1;
-        this.loadRoles(this.queryParams.orgId);
-      },
-    },
+    // org: {
+    //   deep: true,
+    //   immediate: true,
+    //   handler(nOrg) {
+    //     if (nOrg.id) {
+    //       this.queryParams.orgId = nOrg.id;
+    //     } else {
+    //       this.queryParams.orgId = this.loginUser.org.id;
+    //     }
+    //     this.roleVal = "all";
+    //     this.planVal = -1;
+    //     this.loadRoles(this.queryParams.orgId);
+    //   },
+    // },
     statusVal(value) {
       if (value == undefined) return;
       if (value == "all") this.queryParams.status = null;
       else this.queryParams.status = value;
     },
-    roleVal(value) {
-      if (value == undefined) return;
-      if (value == "all") this.queryParams.executeRole = null;
-      else this.queryParams.executeRole = value;
-    },
     planVal(value) {
       if (value == undefined) return;
       if (value == -1) this.queryParams.planId = null;
@@ -624,7 +618,7 @@ export default {
     getLabel,
     toName(row) {
       // const ymd = row.ymd;
-      const ymd = this.$moment(row.ymdDate);
+      const ymd = new Date(row.ymdDate);
       switch (row.executeCycle) {
         case 0:
           return `${ymd.year}年${ymd.month}月${ymd.day}日-${row.formTypeText}`;
@@ -666,15 +660,20 @@ export default {
     getDefaultKey(key) {
       this.queryParams.orgId = key;
       this.getList();
+      this.loadRoles(key);
+      this.loadPlanList();
     },
     //单选框状态改变
     checkChange(state) {
       this.queryParams.checkSub = state;
+      
       this.getList();
     },
     // 节点单击事件
     clickTreeNode(data) {
       this.queryParams.orgId = data.id;
+      this.loadPlanList();
+      this.loadRoles();
       this.getList();
     },
     resetQuery() {
@@ -688,7 +687,7 @@ export default {
       this.loading = true;
       console.log("this.queryParams", this.queryParams);
       api
-        .list(this.queryParams)
+        .page(this.queryParams)
         .then((r) => {
           this.pageData = r.rows;
           this.total = r.total;
@@ -698,11 +697,29 @@ export default {
           this.loading = false;
         });
     },
+    loadRoles() {
+      api
+        .getRoles({
+          orgId: this.queryParams.orgId,
+          planCycle: Number(this.queryParams.executeCycle),
+        })
+        .then((r) => (this.roleList = r.data));
+    },
+
+    loadPlanList() {
+      api
+        .getPlans({
+          orgId: this.queryParams.orgId,
+          // checkSub: this.queryParams.checkSub,
+        })
+        .then((r) => {
+          this.planList = r.data;
+        });
+    },
     async changeType(selectValue) {
       // console.log("selectValue",selectValue.target.value)
-      this.roleVal = "all";
-      this.planVal = -1;
-      this.queryParams.executeCycle = Number(selectValue.target.value);
+      // this.planVal = -1;
+      this.queryParams.executeCycle = selectValue;
 
       let nowDate = new Date();
       let nowMonth = nowDate.getMonth();
@@ -727,40 +744,24 @@ export default {
         this.halfyearS = 2;
         this.halfyearE = 2;
       }
-      // 0每日;1每周;2每月;3每季度;4每半年;5每年
-      if (this.queryParams.executeCycle == 1) {
-        if (!this.week) this.week = this.$moment();
-        var date = this.$moment(this.week).isoWeekday(1);
-        this.weekStart = date.weekday(1).format("YYYY-MM-DD");
-        this.weekEnd = date.weekday(7).format("YYYY-MM-DD");
+      // 1每小时;2每天.......;3每月;4每季度;4每半年;5每年
+      if (this.queryParams.executeCycle == 3) {
+        if (!this.week) this.week = new Date();
+        
+        let oneDayLong = 24*60*60*1000
+        let c_day = this.week.getDay()
+        let monday=this.week-(c_day==0?6:(c_day-1))*oneDayLong;
+        let sunday=this.week+(c_day==0?0:(7-c_day))*oneDayLong;
+
+        this.weekStart =`${monday.getYear()}-${monday.getMonth()}-${monday.getDate()}`;
+        this.weekEnd = `${sunday.getYear()}-${sunday.getMonth()}-${sunday.getDate()}`;
         // this.weekChanged();
       }
       this.resetRangeParam();
     },
 
-    loadRoles(orgId) {
-      let tempOrgId = orgId ? orgId : this.loginUser.org.id;
-      api
-        .getRoles({
-          orgId: tempOrgId,
-          type: Number(this.queryParams.executeCycle),
-        })
-        .then((r) => (this.roleList = r.data));
-    },
-
-    loadPlanList() {
-      api
-        .getPlans({
-          orgId: this.queryParams.orgId,
-          checkSub: this.queryParams.checkSub,
-        })
-        .then((r) => {
-          this.planList = r.data;
-        });
-
-      this.planList = planresult;
-    },
     weekChanged() {
+
       var date = this.$moment(this.week).isoWeekday(1);
       this.weekStart = date.weekday(1).format("YYYY-MM-DD");
       this.weekEnd = date.weekday(7).format("YYYY-MM-DD");
@@ -769,7 +770,7 @@ export default {
     monthChanged() {
       this.resetRangeParam();
     },
-    async resetRangeParam() {
+    async resetRangeParam() {      
       if (this.queryParams.executeCycle == 3) {
         let yearSval = this.yearS.getFullYear();
         let yearEval = this.yearE.getFullYear();
@@ -806,7 +807,7 @@ export default {
             break;
         }
 
-        this.queryParams.range = [this.$moment(sQDate), this.$moment(eQData)];
+        this.queryParams.range = [new Date(sQDate), new Date(eQData)];
       } else if (this.queryParams.executeCycle == 4) {
         let yearSval = this.yearS.getFullYear();
         let yearEval = this.yearE.getFullYear();
@@ -830,14 +831,14 @@ export default {
             eHData += "12-31";
             break;
         }
-        this.queryParams.range = [this.$moment(sHDate), this.$moment(eHData)];
+        this.queryParams.range = [new Date(sHDate), new Date(eHData)];
       } else if (this.queryParams.executeCycle == 5) {
         let yearSval = this.yearS.getFullYear();
         let yearEval = this.yearE.getFullYear();
         let sYDate = yearSval + "-01-01";
         let eYData = yearEval + "-12-31";
 
-        this.queryParams.range = [this.$moment(sYDate), this.$moment(eYData)];
+        this.queryParams.range = [new Date(sYDate), new Date(eYData)];
       } else if (this.queryParams.executeCycle == 2) {
         if (!this.monthRange || this.monthRange.length != 2) {
           this.queryParams.range = null;
@@ -949,12 +950,12 @@ export default {
                 break;
             }
           }
-          this.queryParams.range = [this.$moment(sMDate), this.$moment(eMData)];
+          this.queryParams.range = [new Date(sMDate), new Date(eMData)];
         }
       } else if (this.queryParams.executeCycle == 1) {
         this.queryParams.range = [
-          this.$moment(this.weekStart),
-          this.$moment(this.weekEnd),
+          new Date(this.weekStart),
+          new Date(this.weekEnd),
         ];
       } else if (
         this.queryParams.executeCycle === 0 ||
@@ -963,19 +964,33 @@ export default {
         this.queryParams.range = this.$dateRange.before(0);
       }
     },
-  },
-  async mounted() {
-    const { params, query } = this.$route;
-    if (this.loginUser && this.loginUser.org && this.loginUser.org.id) {
-      if (query == undefined || query.orgId == undefined) {
-        this.queryParams.orgId = this.loginUser.org.id;
+    statusStyle(status) {
+      let color = "";
+      switch (status) {
+        case "1":
+          color = "#BFBFBF";
+        case "2":
+          color = "1890FF";
+        case "3":
+          color = "52C41A";
+        case "4":
+          color = "F5222D";
       }
-    }
-    this.loadRoles(this.queryParams.orgId);
-    await this.loadtypes();
-    this.loadPlanList();
 
-    await this.refresh();
+      return "list-style-type:disc;color:" + color;
+    },
+  },
+  async mounted() {
+    // const { params, query } = this.$route;
+    // if (this.loginUser && this.loginUser.org && this.loginUser.org.id) {
+    //   if (query == undefined || query.orgId == undefined) {
+    //     this.queryParams.orgId = this.loginUser.org.id;
+    //   }
+    // }
+    // this.loadRoles(this.queryParams.orgId);
+    // await this.loadtypes();
+    // this.loadPlanList();
+    // await this.refresh();
   },
 };
 </script>