Browse Source

Merge branch 'dev' of http://10.87.10.227:4000/jzyd_yyds/soc_web into dev

coys 2 years ago
parent
commit
b8204fd505

+ 1 - 1
.env.development

@@ -10,7 +10,7 @@ ENV = 'development'
 #罗俊
 VUE_APP_BASE_API = 'http://10.87.10.55:8080'
 #罗伟
-#VUE_APP_BASE_API = 'http://10.87.10.47:8080'
+VUE_APP_BASE_API = 'http://10.87.10.47:8080'
 #高雄
 #VUE_APP_BASE_API = 'http://10.87.11.94:8080'
 # 路由懒加载

+ 6 - 6
src/api/system/plan.js → src/api/core/accessPlan.js

@@ -3,7 +3,7 @@ import request from '@/utils/request'
 // 查询列表监控调阅计划
 export function listPlan(query) {
   return request({
-    url: '/system/plan/list',
+    url: '/core/accessPlan/list',
     method: 'get',
     params: query
   })
@@ -12,7 +12,7 @@ export function listPlan(query) {
 // 查询详细监控调阅计划
 export function getPlan(id) {
   return request({
-    url: '/system/plan/' + id,
+    url: '/core/accessPlan/' + id,
     method: 'get'
   })
 }
@@ -20,14 +20,14 @@ export function getPlan(id) {
 // 下发
 export function distribute(id) {
   return request({
-    url: '/system/plan/distribute/' + id,
+    url: '/core/accessPlan/distribute/' + id,
     method: 'get'
   })
 }
 // 新增监控调阅计划
 export function addPlan(data) {
   return request({
-    url: '/system/plan',
+    url: '/core/accessPlan',
     method: 'post',
     data: data
   })
@@ -36,7 +36,7 @@ export function addPlan(data) {
 // 修改监控调阅计划
 export function updatePlan(data) {
   return request({
-    url: '/system/plan',
+    url: '/core/accessPlan',
     method: 'put',
     data: data
   })
@@ -45,7 +45,7 @@ export function updatePlan(data) {
 // 删除监控调阅计划
 export function delPlan(id) {
   return request({
-    url: '/system/plan/' + id,
+    url: '/core/accessPlan/' + id,
     method: 'delete'
   })
 }

+ 36 - 0
src/api/resumption/plan.js

@@ -0,0 +1,36 @@
+import request from '@/utils/request'
+
+// 查询【请填写功能名称】列表
+export function list(query) {
+  return request({
+    url: '/core/api/plan/find',
+    method: 'post',
+    data: query
+  })
+}
+
+// 查询【请填写功能名称】详细
+export function get(id) {
+  return request({
+    url: '/core/api/plan/find/' + id,
+    method: 'get'
+  })
+}
+
+
+// 修改【请填写功能名称】
+export function update(data) {
+  return request({
+    url: '/core/api/plan/edit',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除【请填写功能名称】
+export function delelte(id) {
+  return request({
+    url: '/core/api/plan/' + id,
+    method: 'delete'
+  })
+}

+ 55 - 0
src/api/resumption/protection.js

@@ -0,0 +1,55 @@
+import request from "@/utils/request";
+
+// 查询【请填写功能名称】列表
+export function list(query) {
+  return request({
+    url: "/core/resumption/protection/page",
+    method: "get",
+    params: query,
+  });
+}
+
+// 查询【请填写功能名称】详细
+export function get(id) {
+  return request({
+    url: "/core/resumption/protection/" + id,
+    method: "get",
+  });
+}
+
+// 修改【请填写功能名称】
+export function update(data) {
+  return request({
+    url: "/core/resumption/protection/edit",
+    method: "post",
+    data: data,
+  });
+}
+
+// 删除【请填写功能名称】
+export function del(id) {
+  return request({
+    url: "/core/resumption/protection/" + id,
+    method: "delete",
+  });
+}
+
+// 更新状态
+export function updateStatus(id,status) {
+    return request({
+      url: `/core/resumption/protection/updatestatus/${id}/${status}`,
+      method: "post",
+    });
+  }
+
+  
+// 更新状态
+export function history(query) {
+  // query.startTime=new Date().toLocaleString()
+  // delete query.updateTime;
+  return request({
+    url: `/core/resumption/protection/log/page`,
+    method: "get",
+    params:query
+  });
+}

+ 18 - 18
src/api/resumption/rule.js

@@ -1,20 +1,20 @@
-import request from '@/utils/request'
+import request from "@/utils/request";
 
 // 查询【请填写功能名称】列表
 export function list(query) {
   return request({
-    url: '/core/resumption/rule/page',
-    method: 'get',
-    params: query
-  })
+    url: "/core/resumption/rule/page",
+    method: "get",
+    params: query,
+  });
 }
 
 // 查询【请填写功能名称】详细
 export function get(id) {
   return request({
-    url: '/core/resumption/rule/' + id,
-    method: 'get'
-  })
+    url: "/core/resumption/rule/" + id,
+    method: "get",
+  });
 }
 
 // // 新增【请填写功能名称】
@@ -27,9 +27,9 @@ export function get(id) {
 // }
 //  /**
 //    * 检查新的规范类型在检查项】检查内容是否需要更新
-//    * @param id 
-//    * @param ruleType 
-//    * @returns 
+//    * @param id
+//    * @param ruleType
+//    * @returns
 //    */
 //  export function checkRuleType(id, ruleType) {
 //     return request(`/appRule/check/${id}/${ruleType}`);
@@ -38,16 +38,16 @@ export function get(id) {
 // 修改【请填写功能名称】
 export function update(data) {
   return request({
-    url: '/core/resumption/rule/edit',
-    method: 'post',
-    data: data
-  })
+    url: "/core/resumption/rule/edit",
+    method: "post",
+    data: data,
+  });
 }
 
 // 删除【请填写功能名称】
 export function delelte(id) {
   return request({
-    url: '/core/resumption/rule/' + id,
-    method: 'delete'
-  })
+    url: "/core/resumption/rule/" + id,
+    method: "delete",
+  });
 }

+ 57 - 0
src/api/resumption/taskManger.js

@@ -0,0 +1,57 @@
+import request from "@/utils/request";
+
+// 查询【请填写功能名称】列表
+export function list(query) {
+  return request({
+    url: "/core/resumption/list",
+    method: "get",
+    params: query,
+  });
+}
+
+//获取计划列表
+export function getPlans(args) {
+  return request({
+    url: "/core/resumption/record/plan",
+    method: "post",
+    params: args,
+  });
+}
+
+//获取执行岗位
+export function getRoles(args) {
+  return request({
+    url: "/core/resumption/role",
+    method: "post",
+    params: args,
+  });
+}
+
+/**
+ * PC端履职记录导出
+ */
+export function exportResumptionRecord(args) {
+  // sdk.exportFile(`/resumption/record/export`, args);
+}
+
+/**
+ * 查询
+ */
+export function oneNew(args) {
+  return request({
+    url: "/core/resumption/" + args,
+    method: "get",
+    params: query,
+  });
+}
+
+/**
+ * 查询 扫描记录
+ */
+export function findNfcScanRecord(args) {
+  return request({
+    url: "/core/resumption/record/nfc",
+    method: "get",
+    params: args,
+  });
+}

+ 18 - 0
src/components/computed.sync.ts

@@ -0,0 +1,18 @@
+// type sg = (src: any) => {};
+
+export default function(name, getCallback, setCallback) {
+    return {
+        get() {
+            if (getCallback) {
+                return getCallback(this[name]);
+            }
+            return this[name];
+        },
+        set(v) {
+            if (setCallback) {
+                v = setCallback(v);
+            }
+            this.$emit(name == "value" ? `input` : `update:${name}`, v);
+        }
+    };
+}

+ 82 - 0
src/components/dateTime/daterange.picker.vue

@@ -0,0 +1,82 @@
+<template>
+    <el-date-picker
+        v-model="value"
+        type="daterange"
+        :clearable="clearable"
+        :picker-options="pickerOptions"
+        v-on:change="onSelect()"
+        v-bind="$attrs"
+    />
+</template>
+<script lang="ts">
+
+export default {
+    inheritAttrs: false,
+    data() {
+        return {};
+    },
+    computed: {
+        // pv: sync("value"),
+        pickerOptions() {
+            return {
+                shortcuts: [
+                    {
+                        text: "今天",
+                        onClick: (picker) => {
+                            let date = this.$dateRange.before(0);
+                            date[1] = date[0];
+                            console.log(date);
+                            picker.$emit("pick", date);
+                        },
+                    },
+                    {
+                        text: "昨天",
+                        onClick: (picker) => {
+                            let date = this.$dateRange.yesterday(-1);
+                            date[1] = date[0];
+                            console.log(date);
+                            picker.$emit("pick", date);
+                        },
+                    },
+                    {
+                        text: "最近一周",
+                        onClick: (picker) => {
+                            picker.$emit("pick", this.$dateRange.before(-6));
+                        },
+                    },
+                    {
+                        text: "最近一个月",
+                        onClick: (picker) => {
+                            picker.$emit("pick", this.$dateRange.before(-29));
+                        },
+                    },
+                    {
+                        text: "最近三个月",
+                        onClick: (picker) => {
+                            picker.$emit("pick", this.$dateRange.before(-90));
+                        },
+                    },
+                ],
+            };
+        },
+    },
+    watch: {},
+    props: {
+        value: {},
+        clearable:{
+            type: Boolean,
+            default: true,
+        },
+    },
+    methods: {
+        onSelect() {
+            this.$emit("refresh");
+        },
+    },
+    mounted() {},
+};
+</script>
+<style lang="scss">
+.k-date-range {
+}
+</style>

+ 73 - 0
src/components/orgTree/orgDropDown.vue

@@ -0,0 +1,73 @@
+<template>
+  <treeselect
+    v-model="val"
+    :options="deptOptions"
+    :normalizer="normalizer"
+    v-bind="$attrs"
+    @select="select"
+  />
+</template>
+<script>
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import { deptTreeSelect } from "@/api/system/public";
+import sync from '@/components/computed.sync.ts'
+export default {
+  name: "orgTree",
+  prop:{
+    // value:{
+    //   type:String
+    // }
+  },
+  watch:{
+    // value(v){
+    //   debugger
+    //   this.val=value
+    // },
+    // val(v){
+    //   this.$emit('input',v) 
+    // }
+  },
+  computed:{
+    val:sync('value')
+  },
+  components: { Treeselect },
+  data(){
+      return {
+        deptOptions:[]
+      }
+    },
+  methods: {
+    
+    /** 查询机构下拉树结构 */
+    getDeptTree() {
+      deptTreeSelect().then((response) => {
+        this.deptOptions = response.data;
+        console.log(this.deptOptions, " this.deptOptions");
+        if (response.data && response.data.length > 0) {
+          // this.val = response.data[0].id;
+          // this.$emit('input',response.data[0].id) 
+          // this.$emit("select", response.data[0]);
+        }
+      });
+    },
+    /** 转换机构数据结构 */
+    normalizer(node) {
+      if (node.children && !node.children.length) {
+        delete node.children;
+      }
+      return {
+        id: node.id,
+        label: node.name,
+        children: node.children,
+      };
+    },
+    select(node){
+      this.$emit('select',node);
+    }
+  },
+  mounted() {
+    this.getDeptTree();
+  },
+};
+</script>

+ 5 - 1
src/utils/ruoyi.js

@@ -209,7 +209,11 @@ export function tansParams(params) {
           if (value[key] !== null && value[key] !== "" && typeof (value[key]) !== 'undefined') {
             let params = propName + '[' + key + ']';
             var subPart = encodeURIComponent(params) + "=";
-            result += subPart + encodeURIComponent(value[key]) + "&";
+            if(value[key] && Object.prototype.toString.call(value[key]) === '[object Date]'){
+              result += subPart + encodeURIComponent(value[key].toLocaleString()) + "&";
+            }else{
+              result += subPart + encodeURIComponent(value[key]) + "&";
+            }            
           }
         }
       } else {

+ 2 - 2
src/views/system/plan/index.vue → src/views/core/accessPlan/index.vue

@@ -90,7 +90,7 @@
         <template slot-scope="scope">
           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
             v-hasPermi="['system:plan:edit']">修改</el-button>
-          <el-button size="mini" type="text" icon="el-icon-add" @click="handDistribute(scope.row)"
+          <el-button size="mini" type="text" v-if="scope.row.planStatus!=0" icon="el-icon-add" @click="handDistribute(scope.row)"
             v-hasPermi="['system:plan:add']">下发</el-button>
         </template>
       </el-table-column>
@@ -139,7 +139,7 @@
 </template>
 
 <script>
-import { listPlan, getPlan, delPlan, addPlan, updatePlan,distribute } from "@/api/system/plan";
+import { listPlan, getPlan, delPlan, addPlan, updatePlan,distribute } from "@/api/core/accessPlan";
 import { listRole } from "@/api/system/role";
 export default {
   name: "Plan",

+ 335 - 0
src/views/resumption/plan/dialog.edit.vue

@@ -0,0 +1,335 @@
+<template>
+  <div class="rule-type">
+    <el-dialog
+      :title="id ? '编辑履职计划' : '新增履职计划'"
+      :visible.sync="isShow"
+      width="1500px"
+    >
+      <div class="page-body">
+        <el-form
+          :model="formData"
+          :rules="formDataRules"
+          size="small"
+          ref="form"
+          label-position="right"
+          label-width="130px"
+          label-prefix=":"
+        >
+          <el-row>
+            <el-col :span="6">
+              <el-form-item prop="planName" label="计划名称:">
+                <el-input
+                  v-model="formData.planName"
+                  :maxlength="50"
+                  name="planName"
+                  placeholder="请输入"
+                  clearable
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item prop="planType" label="计划类型:">
+                <el-select
+                  label="计划类型"
+                  v-model="formData.planType"
+                  placeholder="请选择计划类型"
+                  clearable
+                >
+                  <el-option
+                    v-for="item in planType"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item prop="planCycle" label="履职周期:">
+                <el-select
+                  prop="planCycle"
+                  label="履职周期"
+                  v-model="formData.planCycle"
+                  placeholder="请选择履职周期"
+                  clearable
+                >
+                  <el-option
+                    v-for="item in planCycle"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item prop="planStatus" label="计划状态:">
+                <el-select
+                  prop="planStatus"
+                  label="计划状态"
+                  v-model="formData.planStatus"
+                  placeholder="请选择计划状态"
+                  clearable
+                >
+                  <el-option
+                    v-for="item in statusOptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="6">
+              <el-form-item prop="execOrgType" label="履职机构类型:">
+                <el-select
+                  label="履职机构类型"
+                  v-model="formData.execOrgType"
+                  placeholder="请选择履职机构类型"
+                  clearable
+                >
+                  <el-option
+                    v-for="item in execOrgType"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item prop="roleNames" label="履职角色:">
+                <el-select
+                  label="履职角色"
+                  v-model="formData.roleNames"
+                  placeholder="请选择履职角色"
+                  clearable
+                >
+                  <el-option
+                    v-for="item in roleNames"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item prop="count" label="履职次数:">
+                <el-select
+                  prop="count"
+                  label="履职次数"
+                  v-model="formData.count"
+                  placeholder="请选择履职次数"
+                  clearable
+                >
+                  <el-option
+                    v-for="item in orgTypeOptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-form-item prop="description" label="备注">
+            <el-input
+              v-model="formData.description"
+              :maxlength="255"
+              clearable
+            />
+          </el-form-item>
+        </el-form>
+        <el-table :data="tableData" style="width: 100%">
+          <el-table-column
+            :prop="propItem.prop"
+            :label="propItem.label"
+            v-for="propItem in propList"
+            :key="propItem.prop"
+          >
+            <template v-slot="{ row }">
+              <span v-if="!propItem.component">{{ row[propItem.prop] }}</span>
+              <component
+                v-else
+                v-bind:is="propItem.component"
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                >删除</component
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="onHide">取消</el-button>
+        <el-button type="primary" @click="onSubmit">确定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { mapState, mapMutations } from "vuex";
+import * as api from "@/api/resumption/plan";
+import { statusOptions } from "./../../commonOption";
+
+export default {
+  data() {
+    // const params = this.$route.params;
+    // let o1=options;
+    // let o=statusOptions;
+    // debugger
+    return {
+      propItem: "",
+      propList: [
+        {
+          label: "是否扫描",
+          prop: "name",
+        },
+        {
+          label: "必须履职",
+          prop: "date",
+        },
+        {
+          label: "履职内容库",
+          prop: "address",
+        },
+        {
+          label: "履职项",
+          prop: "address",
+        },
+        {
+          label: "履职内容",
+          prop: "address",
+        },
+        {
+          label: "履职区域",
+          prop: "address",
+        },
+        {
+          label: "履职项",
+          prop: "lc-component",
+          component: "el-button",
+        },
+      ],
+      row: "",
+      tableData: [
+        {
+          date: "2016-05-02",
+          name: "王小虎",
+          address: "上海市普陀区金沙江路 1518 弄",
+        },
+        {
+          date: "2016-05-04",
+          name: "王小虎",
+          address: "上海市普陀区金沙江路 1517 弄",
+        },
+        {
+          date: "2016-05-01",
+          name: "王小虎",
+          address: "上海市普陀区金沙江路 1519 弄",
+        },
+        {
+          date: "2016-05-03",
+          name: "王小虎",
+          address: "上海市普陀区金沙江路 1516 弄",
+        },
+      ],
+      id: null,
+      isShow: false,
+      formData: this.reset(),
+      formDataRules: {
+        name: [{ required: true, message: "请输入履职内容库名称" }],
+        type: [{ required: true, message: "请选择履职类型" }],
+        orgType: [{ required: true, message: "请选择履职机构类型" }],
+        status: [{ required: true, message: "请选择状态" }],
+      },
+      statusOptions: statusOptions,
+    };
+  },
+  props: {
+    orgTypeOptions: {
+      type: Array,
+    },
+    ruleTypeOptions: {
+      type: Array,
+    },
+  },
+  watch: {},
+  computed: {
+    ...mapState([]),
+  },
+  methods: {
+    ...mapMutations([]),
+    reset() {
+      return {
+        id: null,
+        name: null,
+        type: null,
+        orgType: null,
+        status: null,
+        remark: null,
+      };
+    },
+    findItem(id){
+      this.loading = true;
+      api
+        .list(this.queryParams)
+        .then((response) => {
+          this.pageData = response.data.records;
+          this.total = response.data.total;
+          this.loading = false;
+        })
+        .catch(() => {
+          this.loading = false;
+        });
+    },
+    async refresh(id, other) {
+      this.formData = id ? (await api.get(id)).data : this.reset(other);
+    },
+    async show(id, other = {}) {
+      this.id = id;
+      await this.refresh(id, other);
+      this.isShow = true;
+    },
+
+    // 事件
+    onHide() {
+      this.isShow = false;
+    },
+    onSubmit() {
+      this.$refs.form.validate(async (isValidate) => {
+        if (!isValidate) return;
+        await api.update(this.formData);
+        this.$emit("success");
+        this.onHide();
+      });
+    },
+
+    // 事件
+    //apimark//
+  },
+  mounted() {},
+  components: {},
+};
+</script>
+
+<style lang="scss" scoped>
+.brand_info {
+  .el-form {
+    width: 600px;
+    padding-top: 40px;
+  }
+}
+</style>

+ 417 - 0
src/views/resumption/plan/index.vue

@@ -0,0 +1,417 @@
+<template>
+  <div class="app-container">
+    <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 :span="20" :xs="24">
+        <!--    搜索条件    -->
+        <el-form
+          :model="queryParams"
+          ref="search"
+          size="small"
+          :inline="true"
+          v-show="showSearch"
+          label-width="100px"
+        >
+        <el-form-item prop="planType" label="计划类型">
+            <el-select
+              prop="planType"
+              label="计划类型"
+              v-model="queryParams.planType"
+              placeholder="请选择计划类型"
+              clearable
+            >
+              <el-option
+                v-for="dict in dict.type.planType"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
+          <el-form-item prop="resumptionRole" label="履职角色">
+            <el-select
+              prop="resumptionRole"
+              label="履职角色"
+              v-model="queryParams.resumptionRole"
+              placeholder="请选择履职角色"
+              clearable
+            >
+              <el-option
+                v-for="dict in dict.type.resumptionRole"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
+
+          <el-form-item prop="planCycle" label="履职周期">
+            <el-select
+              prop="planCycle"
+              label="履职周期"
+              v-model="queryParams.planCycle"
+              placeholder="请选择履职周期"
+              clearable
+            >
+              <el-option
+                v-for="item in dict.type.planCycle"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item prop="planStatus" label="计划状态">
+            <el-select
+              prop="planStatus"
+              label="任务状态"
+              v-model="queryParams.planStatus"
+              placeholder="请选择任务状态"
+              clearable
+            >
+              <el-option
+                v-for="item in dict.type.planStatus"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item prop="planName" label="计划名称">
+            <el-select
+              prop="planName"
+              label="计划名称"
+              v-model="queryParams.planName"
+              placeholder="请输入计划名称"
+              clearable
+            >
+              <el-option
+                v-for="item in dict.type.planName"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <el-button
+              type="primary"
+              icon="el-icon-search"
+              size="mini"
+              @click="getList"
+              >搜索</el-button
+            >
+            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+              >重置</el-button
+            >
+          </el-form-item>
+        </el-form>
+
+        <!--    按纽    -->
+        <el-row :gutter="10" class="mb8">
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              plain
+              icon="el-icon-plus"
+              size="mini"
+              @click="handleAdd()"
+              v-hasPermi="['system:user:add']"
+              >新增</el-button
+            >
+          </el-col>
+          <!-- <el-col :span="1.5">
+            <el-button
+              type="success"
+              plain
+              icon="el-icon-edit"
+              size="mini"
+              :disabled="single"
+              @click="handleUpdate"
+              v-hasPermi="['system:user:edit']"
+              >修改</el-button
+            >
+          </el-col>
+          <el-col :span="1.5">
+            <el-button
+              type="danger"
+              plain
+              icon="el-icon-delete"
+              size="mini"
+              :disabled="multiple"
+              @click="handleDelete"
+              v-hasPermi="['system:user:remove']"
+              >删除</el-button
+            > 
+          </el-col>-->
+
+          <right-toolbar
+            :showSearch.sync="showSearch"
+            @queryTable="getList"
+            :columns="columns"
+          ></right-toolbar>
+        </el-row>
+
+        <el-table
+          v-loading="loading"
+          :data="pageData"
+          @selection-change="handleSelectionChange"
+        >
+          <el-table-column
+            type="index"
+            label="序号"
+            v-if="columns[0].visible"
+          ></el-table-column>
+          <el-table-column
+            prop="planName"
+            label="计划名称"
+            v-if="columns[1].visible"
+          ></el-table-column>
+          <el-table-column
+            prop="planType"
+            label="计划类型"
+            v-if="columns[2].visible"
+          >
+            <!-- <template slot-scope="r"
+              >{{ getLabel(dict.type.rule_type, r.row.type) }}
+            </template> -->
+          </el-table-column>
+          <el-table-column
+            prop="planCreateOrgName"
+            label="计划创建机构"
+            v-if="columns[3].visible"
+          >
+            <!-- <template slot-scope="r"
+              >{{ getLabel(dict.type.sys_org_type, r.row.execOrgType) }}
+            </template> -->
+          </el-table-column>
+          <el-table-column
+            prop="planOfOrgName"
+            label="计划所属机构"
+            v-if="columns[4].visible"
+          ></el-table-column>
+        
+          <el-table-column
+            prop="execOrgType"
+            label="履职机构类型"
+            v-if="columns[6].visible"
+          ></el-table-column>
+
+          <el-table-column
+            prop="roleNames"
+            label="履职角色"
+            v-if="columns[6].visible"
+          ></el-table-column>
+          <el-table-column
+            prop="planCycle"
+            label="履职周期"
+            v-if="columns[6].visible"
+          ></el-table-column>
+
+
+          <el-table-column
+            prop="count"
+            label="履职次数"
+            v-if="columns[6].visible"
+          ></el-table-column>
+
+          <el-table-column
+            prop="planExec"
+            label="履职时间"
+            v-if="columns[6].visible"
+          ></el-table-column>
+
+
+          <el-table-column
+            prop="modifiedName"
+            label="修改人"
+            v-if="columns[6].visible"
+          ></el-table-column>
+
+
+          <el-table-column
+            prop="planStatus"
+            label="计划状态"
+            v-if="columns[6].visible"
+          ></el-table-column>
+
+          <el-table-column label="操作">
+            <template slot-scope="r">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="onEdit(r.row.id)"
+                v-hasPermi="['system:user:edit']"
+              >修改</el-button>
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-delete"
+                @click="onDel(r.row.id)"
+                v-hasPermi="['system:user:remove']"
+              >删除</el-button>              
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <pagination
+          v-show="total > 0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
+      </el-col>
+    </el-row>
+    <dialog-edit
+      ref="editDialog"
+      @success="getList()"
+      :orgTypeOptions="dict.type.sys_org_type"
+      :ruleTypeOptions="dict.type.rule_type"
+    ></dialog-edit>
+  </div>
+</template>
+
+<script>
+import OrgTree from "@/components/orgTree";
+import { mapState, mapMutations } from "vuex";
+import DialogEdit from "./dialog.edit";
+import * as api from "@/api/resumption/plan";
+import { statusOptions, getLabel } from "./../../commonOption";
+
+export default {
+  name: "resumptionplan",
+  dicts: ["sys_org_type", "rule_type"],
+  components: {
+    DialogEdit,
+    OrgTree,
+  },
+  data() {
+    const { params, query } = this.$route;
+    return {
+      isShow: false,
+      loading: false,
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      total: 0,
+      queryParams: {
+        orgId: null,
+        planType: null,
+        resumptionRole: null,
+        planCycle: null,
+        planStatus: null,
+        planName: null,
+        pageNum:1,
+        pageSize:10,
+        ...query,
+      },
+      pageData: [],
+      // 列信息
+      columns: [
+        { key: 0, label: `序号`, visible: true },
+        { key: 1, label: `计划名称`, visible: true },
+        { key: 2, label: `计划类型`, visible: true },
+        { key: 3, label: `计划创建机构`, visible: true },
+        { 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 },
+      ],
+    };
+  },
+  props: {},
+  watch: {},
+  computed: {
+    ...mapState([]),
+  },
+  methods: {
+    ...mapMutations([]),
+    getList() {
+      this.loading = true;
+      console.info(this.dict.type);
+      api
+        .list(this.queryParams)
+        .then((response) => {
+          this.pageData = response.data.records;
+          this.total = response.data.total;
+          this.loading = false;
+        })
+        .catch(() => {
+          this.loading = false;
+        });
+    },
+    getDefaultKey(key) {
+      this.queryParams.orgId = key;
+      this.getList();
+    },
+    handleAdd(id, other = {}) {
+      this.$refs.editDialog.show(id, other);
+    },
+    onEdit(id, other = {}) {
+      this.$refs.editDialog.show(id, other);
+    },
+    async onDel(id) {
+      await api.delRule(id);
+      this.getList();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.userId);
+      this.single = selection.length != 1;
+      this.multiple = !selection.length;
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.queryParams.orgId = undefined;
+      this.$refs.tree.setCurrentKey(null);
+      this.getList();
+    },
+    //单选框状态改变
+    checkChange(state) {
+      this.queryParams.checkSub = state;
+      this.getList();
+    },
+    // 节点单击事件
+    clickTreeNode(data) {
+      this.queryParams.orgId = data.id;
+      this.getList();
+    },
+    getStatusLabel(value) {
+      return getLabel(statusOptions, value);
+    },
+    getLabel(options, value) {
+      return getLabel(options, value);
+    },
+    //apimark//
+  },
+  mounted() {},
+};
+</script>
+
+<style lang="scss" scoped>
+.brand {
+}
+</style>

+ 126 - 0
src/views/resumption/protection/dialog.edit.vue

@@ -0,0 +1,126 @@
+<template>
+  <div class="rule-type">
+    <el-dialog
+      :title="id ? '编辑防区' : '新增防区'"
+      :visible.sync="isShow"
+      width="500px"
+    >
+      <div class="page-body">
+        <el-form
+          :model="formData"
+          :rules="formDataRules"
+          size="small"
+          ref="form"
+          label-position="right"
+          label-width="130px"
+          label-prefix=":"
+        >
+          <el-form-item label="所属机构" prop="orgId">
+            <orgDropDown v-model="formData.orgId" placeholder="选择所属机构" @select="onOrgSelect"/>
+          </el-form-item>
+          <el-form-item prop="name" label="防区名称:">
+            <el-input
+              v-model="formData.name"
+              :maxlength="50"
+              name="name"
+              placeholder="请输入防区名称"
+              clearable
+            />
+          </el-form-item>
+
+          <el-form-item prop="type" label="24小时防区:">
+            <el-switch
+              v-model="formData.allHour"
+              :active-value="1"
+              :inactive-value="0"
+            >
+            </el-switch>
+          </el-form-item>
+        </el-form>
+      </div>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="onHide">取消</el-button>
+        <el-button type="primary" @click="onSubmit">确定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { mapState, mapMutations } from "vuex";
+import * as api from "@/api/resumption/protection";
+import orgDropDown from "../../../components/orgTree/orgDropDown.vue";
+export default {
+  data() {
+    return {
+      id: null,
+      isShow: false,
+      formData: this.reset(),
+      // 机构树选项
+      formDataRules: {
+        name: [{ required: true, message: "请选择所属机构" }],
+        name: [{ required: true, message: "请输入防区名称" }],
+      },
+    };
+  },
+  props: {},
+  watch: {},
+  computed: {
+    ...mapState([]),
+  },
+  methods: {
+    ...mapMutations([]),
+    reset() {
+      return {
+        id: null,
+        orgId: null,
+        orgPath:null,
+        orgName:null,
+        name: null,
+        allHour: null,
+      };
+    },
+    async refresh(id, other) {
+      this.formData = id ? (await api.get(id)).data : this.reset(other);
+    },
+    async show(id, other = {}) {
+      this.id = id;
+      await this.refresh(id, other);
+      this.isShow = true;
+    },
+
+    // 事件
+    onHide() {
+      this.$refs.form.resetFields();
+      this.formData=this.reset();
+      this.isShow = false;
+    },
+    onSubmit() {
+      this.$refs.form.validate(async (isValidate) => {
+        if (!isValidate) return;
+        await api.update(this.formData);
+        this.$emit("success");
+        this.onHide();
+      });
+    },  
+    onOrgSelect(node){      
+      this.formData.orgPath=node.path;
+      this.formData.orgName=node.name;
+    }
+  },
+  created() {
+  },
+  mounted() {},
+  components: { orgDropDown },
+};
+</script>
+
+<style lang="scss" scoped>
+.brand_info {
+  .el-form {
+    width: 600px;
+    padding-top: 40px;
+  }
+}
+</style>

+ 159 - 0
src/views/resumption/protection/dialog.history.vue

@@ -0,0 +1,159 @@
+<template>
+  <div class="device-info">
+    <el-dialog
+      title="布防历史"
+      :visible.sync="isShow"
+      width="600px"
+      @close="close"
+    >
+      <div class="page-body">
+        <div>
+          <div style="margin-bottom: 20px">
+            <span> 所属机构:</span>
+            <span>{{ protection.orgName }}</span>
+          </div>
+          <div style="margin-bottom: 20px">
+            <span>防区名称:</span>
+            <span>{{ protection.name }}</span>
+          </div>
+          <div style="margin-bottom: 20px">
+            <span> 24小时防区:</span>
+            <span>{{ protection.allHour ? "是" : "否" }}</span>
+          </div>
+          <div style="margin-bottom: 20px">
+            <span>上报时间范围:</span>
+            <el-date-picker
+              v-model="search.updateTime"
+              :default-time="defaultTime"
+              type="datetimerange"
+              range-separator="至"
+              clearable
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+              @change="refresh"
+            >
+            </el-date-picker>
+          </div>
+          <el-table :data="tableData" border style="width: 100%">
+            <el-table-column type="index" label="序号"></el-table-column>
+            <el-table-column prop="statusText" label="布防状态"
+              ><template slot-scope="r">
+                {{ getLabel(statusDict, r.row.status) }}
+              </template></el-table-column
+            >
+            <el-table-column prop="updateTime" label="上报时间">             
+            </el-table-column>
+            <el-table-column
+              prop="statusUpdatorName"
+              label="上报人"
+            ></el-table-column>
+          </el-table>
+          <div style="margin-top: 20px; text-align: right">
+            <el-pagination
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="currentPage"
+              :page-sizes="[10, 20, 30, 40, 50, 100]"
+              :page-size="search.size"
+              layout="total, sizes, prev, pager, next, jumper"
+              :total="total"
+            >
+            </el-pagination>
+          </div>
+        </div>
+      </div>
+
+      <div slot="footer" class="dialog-footer">
+        <!-- <el-button @click="onHide">取消</el-button>
+          <el-button type="primary" @click="onSubmit">确定</el-button> -->
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import * as api from "@/api/resumption/protection";
+import { getLabel } from "./../../commonOption";
+export default {
+  data() {
+    const params = this.$route.params;
+    return {
+      id: params ? params.id : null,
+      isShow: false,
+      protection: {},
+      tableData: [],
+      defaultTime: ["00:00:00", "23:59:59"],
+      search: this.resetSearch(),
+      total: 1,
+      currentPage: 1,
+    };
+  },
+  props: {
+    statusDict: {
+      type: Array,
+    },
+  },
+  watch: {},
+  computed: {},
+  methods: {
+    getLabel,
+    async refresh() {
+      this.currentPage = 1;
+      this.getlist();
+    },
+    async getlist() {
+      this.search.page = this.currentPage - 1;      
+      await api.history(this.search).then((v) => {
+        this.tableData = v.rows;
+        this.total = v.total;
+      });
+    },
+    close() {
+      this.search = this.resetSearch();
+      this.tableData=[];
+      this.total=0;
+    },
+    async show(protection) {
+      this.protection=protection;
+      this.search = this.resetSearch();
+      this.search.protectionId = protection.id;
+      await this.refresh();
+      this.isShow = true;
+    },
+    handleSizeChange(val) {
+      this.currentPage = 1;
+      this.search.size = val;
+      this.getlist();
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getlist();
+    },
+    resetSearch() {
+      return {
+        size: 10,
+        page: 0,
+        protectionId: null,
+        updateTime: [new Date( new Date() - 3600 * 1000 * 24 * 90), new Date()],
+      };
+    },
+    // 事件
+    //apimark//
+  },
+  created() {},
+  mounted() {},
+  components: {
+    // EditAttribute,
+  },
+};
+</script>
+
+<style lang="scss">
+.device_info {
+  .el-form {
+    width: 600px;
+    padding-top: 40px;
+  }
+}
+</style>

+ 359 - 0
src/views/resumption/protection/index.vue

@@ -0,0 +1,359 @@
+<template>
+  <div class="app-container">
+    <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 :span="20" :xs="24">
+        <!--    搜索条件    -->
+        <el-form
+          :model="queryParams"
+          ref="search"
+          size="small"
+          :inline="true"
+          v-show="showSearch"
+          label-width="120px"
+        >
+          <el-form-item prop="key" label="关键字">
+            <el-input
+              v-model="queryParams.key"
+              :maxlength="50"
+              placeholder="请输入搜索关键字"
+              clearable
+            />
+          </el-form-item>
+          <el-form-item prop="ruleTypeId" label="防区状态">
+            <el-select
+              prop="ruleTypeId"
+              label="防区状态"
+              v-model="queryParams.status"
+              placeholder="请选择防区状态"
+              clearable
+            >
+              <el-option
+                v-for="dict in dict.type.protection_status"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
+
+          <el-form-item prop="orgType" label="布撤防时间范围">
+            <el-date-picker
+              v-model="queryParams.dateRange"
+              type="datetimerange"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+            >
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item>
+            <el-button
+              type="primary"
+              icon="el-icon-search"
+              size="mini"
+              @click="getList"
+              >搜索</el-button
+            >
+            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+              >重置</el-button
+            >
+          </el-form-item>
+        </el-form>
+
+        <!--    按纽    -->
+        <el-row :gutter="10" class="mb8">
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              plain
+              icon="el-icon-plus"
+              size="mini"
+              @click="handleAdd()"
+              v-hasPermi="['core:protection:add']"
+              >新增</el-button
+            >
+          </el-col>
+          <!-- <el-col :span="1.5">
+            <el-button
+              type="success"
+              plain
+              icon="el-icon-edit"
+              size="mini"
+              :disabled="single"
+              @click="handleUpdate"
+              v-hasPermi="['system:user:edit']"
+              >修改</el-button
+            >
+          </el-col>
+          <el-col :span="1.5">
+            <el-button
+              type="danger"
+              plain
+              icon="el-icon-delete"
+              size="mini"
+              :disabled="multiple"
+              @click="handleDelete"
+              v-hasPermi="['system:user:remove']"
+              >删除</el-button
+            > 
+          </el-col>-->
+
+          <right-toolbar
+            :showSearch.sync="showSearch"
+            @queryTable="getList"
+            :columns="columns"
+          ></right-toolbar>
+        </el-row>
+
+        <el-table
+          v-loading="loading"
+          :data="pageData"
+          @selection-change="handleSelectionChange"
+        >
+          <el-table-column
+            type="index"
+            label="序号"
+            v-if="columns[0].visible"
+          ></el-table-column>
+          <el-table-column
+            prop="orgName"
+            label="所属机构"
+            v-if="columns[1].visible"
+          ></el-table-column>
+          <el-table-column
+            prop="name"
+            label="防区名称"
+            v-if="columns[2].visible"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="allHour"
+            label="24小时防区"
+            v-if="columns[3].visible"
+            ><template slot-scope="r"
+              >{{ r.row.allHour ? "是" : "否" }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="status"
+            label="防区状态"
+            v-if="columns[4].visible"
+          >
+            <template slot-scope="r"
+              >{{ getLabel(dict.type.protection_status, r.row.status) }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="statusUpdateTime"
+            label="布撤防时间"
+            v-if="columns[5].visible"
+          >
+          </el-table-column>
+          <el-table-column label="操作">
+            <template slot-scope="r">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="updateStatus(r.row.id, 1)"
+                v-hasPermi="['core:protection:status']"
+                >布防</el-button
+              >
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="updateStatus(r.row.id, 0)"
+                v-hasPermi="['core:protection:status']"
+                >撤防</el-button
+              >
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="onEdit(r.row.id)"
+                v-hasPermi="['core:protection:edit']"
+                >修改</el-button
+              >
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-edit"
+                @click="onHistory(r.row)"
+                v-hasPermi="['core:protection:edit']"
+                >布撤防历史</el-button
+              >
+              <el-popover
+                placement="top-start"
+                @confirm="onDel(r.row.id)"
+                content="点击确定删除防区"
+              >
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-delete"
+                  v-hasPermi="['core:protection:remove']"
+                  slot="reference"
+                  >删除</el-button
+                >
+              </el-popover>
+            </template>
+          </el-table-column>
+        </el-table>
+
+        <pagination
+          v-show="total > 0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
+      </el-col>
+    </el-row>
+    <dialog-edit
+      ref="editDialog"
+      @success="getList()"
+      :orgTypeOptions="dict.type.sys_org_type"
+      :ruleTypeOptions="dict.type.rule_type"
+    ></dialog-edit>
+    <dialog-history ref="historyDialog" :statusDict="dict.type.protection_status"></dialog-history>
+  </div>
+</template>
+
+<script>
+import OrgTree from "@/components/orgTree";
+import { mapState, mapMutations } from "vuex";
+import DialogEdit from "./dialog.edit";
+import DialogHistory from "./dialog.history";
+import * as api from "@/api/resumption/protection";
+import { getLabel } from "./../../commonOption";
+
+export default {
+  name: "protection",
+  dicts: ["protection_status"],
+  components: {
+    DialogEdit,
+    OrgTree,
+    DialogHistory,
+  },
+  data() {
+    const { params, query } = this.$route;
+    return {
+      isShow: false,
+      loading: false,
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      total: 0,
+      queryParams: {
+        orgId: null,
+        checkSub: 0,
+        key: null,
+        status: null,
+        dateRange: null,
+        pageNum: 1,
+        pageSize: 10,
+        ...query,
+      },
+      pageData: [],
+      // 列信息
+      columns: [
+        { key: 0, label: `序号`, visible: true },
+        { key: 1, label: `所属机构`, visible: true },
+        { key: 2, label: `防区名称`, visible: true },
+        { key: 3, label: `24小时防区`, visible: true },
+        { key: 4, label: `防区状态`, visible: true },
+        { key: 5, label: `布撤防时间`, visible: true },
+      ],
+    };
+  },
+  props: {},
+  watch: {},
+  computed: {
+    ...mapState([]),
+  },
+  methods: {
+    ...mapMutations([]),
+    getLabel,
+    getList() {
+      this.loading = true;
+      api
+        .list(this.queryParams)
+        .then((response) => {
+          this.pageData = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        })
+        .catch(() => {
+          this.loading = false;
+        });
+    },
+    getDefaultKey(key) {
+      this.queryParams.orgId = key;
+      this.getList();
+    },
+    handleAdd(id, other = {}) {
+      this.$refs.editDialog.show(id, other);
+    },
+    onEdit(id, other = {}) {
+      this.$refs.editDialog.show(id, other);
+    },
+    onHistory(row) {
+      this.$refs.historyDialog.show(row);
+    },
+    async onDel(id) {
+      await api.del(id);
+      this.getList();
+    },
+    updateStatus(id, status) {
+      api.updateStatus(id, status).then((r) => {
+        this.$message.info("更新状态成功");
+        this.getList();
+      });
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.userId);
+      this.single = selection.length != 1;
+      this.multiple = !selection.length;
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.queryParams.orgId = undefined;
+      this.$refs.tree.setCurrentKey(null);
+      this.getList();
+    },
+    //单选框状态改变
+    checkChange(state) {
+      this.queryParams.checkSub = state;
+      this.getList();
+    },
+    // 节点单击事件
+    clickTreeNode(data) {
+      this.queryParams.orgId = data.id;
+      this.getList();
+    },
+  },
+  mounted() {},
+};
+</script>
+
+<style lang="scss" scoped>
+.brand {
+}
+</style>

+ 0 - 4
src/views/resumption/rule/dialog.edit.vue

@@ -15,10 +15,6 @@
           label-width="130px"
           label-prefix=":"
         >
-          <el-form-item prop="id" label="规范名称:" hidden>
-            <el-input v-model="formData.id" clearable maxlength="50" />
-          </el-form-item>
-
           <el-form-item prop="name" label="履职内容库名称:">
             <el-input
               v-model="formData.name"

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

@@ -264,6 +264,7 @@ export default {
   },
   methods: {
     ...mapMutations([]),
+    getLabel,
     getList() {
       this.loading = true;
       console.info(this.dict.type);
@@ -318,9 +319,7 @@ export default {
     getStatusLabel(value) {
       return getLabel(statusOptions, value);
     },
-    getLabel(options, value) {
-      return getLabel(options, value);
-    },
+    
     //apimark//
   },
   mounted() {},

+ 119 - 0
src/views/resumption/taskManager/dialog.detail.vue

@@ -0,0 +1,119 @@
+<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>
+            </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: [],
+        }
+    },
+    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;
+        }
+    },
+}
+</script>
+
+<style lang="scss">
+.block {
+    // padding: 10px 10px;
+    text-align: center;
+    // border-right: 1px solid #eff2f6;
+    display: inline-block;
+    // width: 20%;
+    // vertical-align: top;    
+}
+</style>

+ 89 - 0
src/views/resumption/taskManager/dialog.scanrecord.vue

@@ -0,0 +1,89 @@
+<template>
+  <div>
+    <el-dialog
+      title="扫描记录"
+      :visible.sync="isShow"
+      width="800px"
+      :destroy-on-close="true"
+    >
+      <el-table :data="tableData" border>
+        <el-table-column
+          label="履职区域"
+          align="center"
+          :show-overflow-tooltip="true"
+          prop="areaName"
+        >
+        </el-table-column>
+        <el-table-column
+          label="NFC点位名称"
+          align="center"
+          :show-overflow-tooltip="true"
+          prop="collectionAreaName"
+        >
+        </el-table-column>
+        
+        <el-table-column
+          label="扫描时间"
+          align="center"
+          :show-overflow-tooltip="true"
+          prop="executeTime"
+        >
+        </el-table-column>
+        <el-table-column
+          label="扫描方式"
+          align="center"
+          :show-overflow-tooltip="true"
+          prop="excuteMode"
+        >
+        </el-table-column>
+        <el-table-column
+          label="扫描方式"
+          align="center"
+          :show-overflow-tooltip="true"
+          prop="detail"
+        >
+        </el-table-column>
+      </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,
+      tableData: [],
+    };
+  },
+  methods: {
+    async refresh(id, orgId) {
+      let detail = await api.findNfcScanRecord({
+        orgId: orgId,
+        resumptionId: id,
+      });
+      // console.log(detail);
+      if (detail) {
+        this.tableData = detail;
+      } else {
+        this.tableData = [];
+      }
+    },
+    async show(id, orgId) {
+      await this.refresh(id, orgId);
+      this.isShow = true;
+    },
+    onHide() {
+      this.isShow = false;
+    },
+    reset() {
+      this.tableData = [];
+    },
+  },
+};
+</script>
+
+<style lang="scss"></style>

+ 995 - 0
src/views/resumption/taskManager/index.vue

@@ -0,0 +1,995 @@
+<template>
+  <div class="bg-transparent flex resumption">
+    <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 :span="20" :xs="24">
+        <!--    搜索条件    -->
+        <el-form
+          :model="queryParams"
+          ref="queryParams"
+          size="small"
+          :inline="true"
+          v-show="showSearch"
+          label-width="100px"
+        >
+          <el-form-item label="履职计划">
+            <el-select
+              v-model="queryParams.planId"
+              filterable
+              placeholder="请选择履职计划"
+            >
+              <el-option
+                v-for="item in planList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="履职角色">
+            <el-select
+              v-model="queryParams.executeRole"
+              placeHolder="请选择履职角色"
+              clearable
+            >
+              <el-option
+                v-for="item in roleList"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="履职周期">
+            <el-select
+              v-model="queryParams.planCycle"
+              placeHolder="请选择履职周期"
+              clearable
+              @change="changeType($event)"
+            >
+              <el-option
+                v-for="item in dict.type.plan_cycle"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="任务状态">
+            <el-select
+              v-model="queryParams.status"
+              placeHolder="请选择任务状态"
+              clearable
+            >
+              <el-option
+                v-for="item in dict.type.resumption_status"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item
+            class="searchTitle"
+            label="计划时间"
+            v-if="
+              queryParams.executeCycle == 1 || queryParams.executeCycle == 0
+            "
+          >
+            <DataRangePicker
+              :value="queryParams.range"
+              key="daterange"
+              type="daterange"
+              :clearable="timeClearable"
+            />
+          </el-form-item>
+          <el-form-item
+            class="searchTitle"
+            label="计划时间"
+            v-if="queryParams.executeCycle == 2"
+          >
+            <!-- :format='weekStart+" 到 "+weekEnd+ 第WW周'  format=" yyyy 第 WW 周"-->
+            <el-date-picker
+              :picker-options="{ firstDayOfWeek: 1 }"
+              key="week"
+              v-model="week"
+              @change="weekChanged"
+              :clearable="timeClearable"
+              type="week"
+              format=" yyyy 第 WW 周"
+              placeholder="选择周"
+            >
+            </el-date-picker>
+          </el-form-item>
+
+          <el-form-item
+            class="searchTitle"
+            label="计划时间"
+            v-if="queryParams.executeCycle == 3"
+          >
+            <el-date-picker
+              v-model="monthRange"
+              @change="monthChanged"
+              type="monthrange"
+              key="monthRange"
+              align="right"
+              :clearable="timeClearable"
+              unlink-panels
+              range-separator="-"
+              start-placeholder="开始月份"
+              end-placeholder="结束月份"
+            />
+          </el-form-item>
+
+          <el-form-item
+            class="searchTitle"
+            label="计划时间"
+            v-if="queryParams.executeCycle == 4"
+          >
+            <el-date-picker
+              :clearable="timeClearable"
+              type="year"
+              align="right"
+              key="quarterSyearS"
+              v-model="yearS"
+            />
+            -
+            <el-select v-model="quarterS" placeholder="请选择">
+              <el-option
+                v-for="item in optionsQS"
+                :key="item.key"
+                :label="item.text"
+                :value="item.value"
+                :clearable="timeClearable"
+              />
+            </el-select>
+
+            <label
+              class="el-form-item__label"
+              style="margin: 0 10px; padding: 0"
+              >至</label
+            >
+            <el-date-picker
+              :clearable="timeClearable"
+              type="year"
+              v-model="yearE"
+              key="quarterSyearE"
+              align="right"
+            />
+            -
+            <el-select v-model="quarterE" placeholder="请选择">
+              <el-option
+                v-for="item in optionsQE"
+                :key="item.key"
+                :label="item.text"
+                :value="item.value"
+                :clearable="timeClearable"
+              />
+            </el-select>
+          </el-form-item>
+
+          <el-form-item label="计划时间" v-if="queryParams.executeCycle == 5">
+            <el-date-picker
+              :clearable="timeClearable"
+              type="year"
+              align="right"
+              key="halfyearS"
+              v-model="yearS"
+            />
+            -
+            <el-select v-model="halfyearS" placeholder="请选择">
+              <el-option
+                v-for="item in optionsHS"
+                :key="item.key"
+                :label="item.text"
+                :value="item.value"
+                :clearable="timeClearable"
+              />
+            </el-select>
+
+            <label
+              class="el-form-item__label"
+              style="margin: 0 10px; padding: 0"
+              >至</label
+            >
+            <el-date-picker
+              :clearable="timeClearable"
+              type="year"
+              v-model="yearE"
+              key="halfyearE"
+              align="right"
+            />
+            -
+            <el-select v-model="halfyearE" placeholder="请选择">
+              <el-option
+                v-for="item in optionsHE"
+                :key="item.key"
+                :label="item.text"
+                :value="item.value"
+                :clearable="timeClearable"
+              />
+            </el-select>
+          </el-form-item>
+
+          <el-form-item
+            class="searchTitle"
+            label="计划时间"
+            v-if="queryParams.executeCycle == 6"
+          >
+            <el-date-picker
+              :clearable="timeClearable"
+              type="year"
+              align="right"
+              v-model="yearS"
+              key="yearS"
+            />
+            <label
+              class="el-form-item__label"
+              style="margin: 0 10px; padding: 0"
+              >至</label
+            >
+            <el-date-picker
+              :clearable="timeClearable"
+              type="year"
+              v-model="yearE"
+              align="right"
+              key="yearE"
+            />
+          </el-form-item>
+          <el-form-item>
+            <el-button
+              type="primary"
+              icon="el-icon-search"
+              size="mini"
+              @click="getList"
+              >搜索</el-button
+            >
+            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+              >重置</el-button
+            >
+          </el-form-item>
+        </el-form>
+        <!--    按纽    -->
+        <el-row :gutter="10" class="mb8">
+          <el-col :span="1.5">
+            <el-button
+              type="primary"
+              plain
+              icon="el-icon-download"
+              size="mini"
+              @click="exportExcel()"
+              v-hasPermi="['system:user:add']"
+              >导出</el-button
+            >
+          </el-col>
+
+          <right-toolbar
+            :showSearch.sync="showSearch"
+            @queryTable="getList"
+            :columns="columns"
+          ></right-toolbar>
+        </el-row>
+        <el-table v-loading="loading" :data="pageData">
+          <el-table-column
+            prop="order"
+            label="序号"
+            min-width="4%"
+            v-if="columns[0].visible"
+          >
+            <template slot-scope="r">{{ r.row.order }}</template>
+          </el-table-column>
+          <el-table-column
+            prop="planName"
+            label="计划名称"
+            min-width="20%"
+            v-if="columns[1].visible"
+          >
+            <template slot-scope="r">{{ r.row.planName }}</template>
+          </el-table-column>
+          <el-table-column
+            prop="planStartTime"
+            label="任务开始时间"
+            min-width="15%"
+            v-if="columns[2].visible"
+          />
+          <el-table-column
+            prop="planEndTime"
+            label="任务结束时间"
+            min-width="15%"
+            v-if="columns[3].visible"
+          />
+
+          <el-table-column
+            prop="status"
+            label="上级机构"
+            min-width="15%"
+            v-if="columns[4].visible"
+          >
+            <template slot-scope="r">
+              {{ r.row.parentOrgName }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="status"
+            label="履职机构"
+            min-width="15%"
+            v-if="columns[5].visible"
+          >
+            <template slot-scope="r">
+              {{ r.row.orgName }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="status"
+            label="履职角色"
+            min-width="10%"
+            v-if="columns[6].visible"
+          >
+            <template slot-scope="r">
+              {{ r.row.roleName }}
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="submitter"
+            label="提交人"
+            min-width="10%"
+            v-if="columns[7].visible"
+          ></el-table-column>
+          <el-table-column
+            label="提交时间"
+            min-width="15%"
+            v-if="columns[8].visible"
+          >
+            <template slot-scope="r">{{
+              r.row.submitTime | dateTime
+            }}</template>
+          </el-table-column>
+          <el-table-column
+            prop="abnormalDataNums"
+            label="异常个数"
+            min-width="9%"
+            v-if="columns[8].visible"
+          >
+            <template slot-scope="r">{{ r.row.abnormalDataNums }}</template>
+          </el-table-column>
+          <el-table-column
+            prop="status"
+            label="任务状态"
+            min-width="8%"
+            v-if="columns[9].visible"
+          >
+            <template slot-scope="r">
+              {{ getLabel(dict.type.resumtipn_status, r.row.status) }}
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" min-width="13%">
+            <template slot-scope="r">
+              <!-- <el-button v-if="
+                            r.row.status == 'WAIT' &&
+                            queryParams.type == 'QUARTER'
+                        " type="text" @click="onEdit(r.row.id)">履职</el-button>
+                        <el-button v-else-if="
+                            r.row.status != 'NA' &&
+                            r.row.status != 'NOT' &&
+                            r.row.status != 'WAIT'
+                        " type="text" @click="onEdit(r.row.id, { isRead: true })">查看</el-button> -->
+              <el-button type="text" @click="showDetail(r.row)">查看</el-button>
+              <el-button type="text" @click="showscanRecord(r.row)"
+                >扫描记录</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+        <pagination
+          v-show="total > 0"
+          :total="total"
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
+      </el-col>
+    </el-row>
+    <!-- 详情 -->
+    <dialog-detail ref="detaildialog"></dialog-detail>
+    <dialog-scan-record ref="scanrecorddialog"></dialog-scan-record>
+  </div>
+</template>
+
+<script>
+import { mapState, mapMutations } from "vuex";
+// import { Message } from "element-ui";
+import DialogDetail from "./dialog.detail";
+import DialogScanRecord from "./dialog.scanrecord";
+import DataRangePicker from "@/components/dateTime/daterange.picker.vue";
+import OrgTree from "@/components/orgTree";
+import * as api from "@/api/resumption/taskManger.js";
+import { getLabel } from "@/views/commonOption.js";
+
+export default {
+  name: "overviewDetialList",
+  dicts: ["plan_cycle", "resumption_status"],
+  components: { DialogDetail, DialogScanRecord, DataRangePicker, OrgTree },
+  data() {
+    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;
+
+    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);
+    return {
+      loading: false,
+      showSearch: true,
+      total: 0,
+      timeClearable: false,
+      options: [],
+      roleList: [],
+      planList: [],
+      roleVal: tempRole == null ? "all" : tempRole,
+      statusVal: tempstatus == null ? "all" : tempstatus,
+      yearS: sDate,
+      yearE: eDate,
+      halfyearE: temphalfyearE,
+      halfyearS: temphalfyearS,
+      quarterE: tempquarterE,
+      quarterS: tempquarterS,
+      monthRange: [sDate, eDate],
+      week: sDate,
+      weekStart: null,
+      weekEnd: null,
+      optionsHS: [
+        { key: "1", value: 1, text: "上半年" },
+        { key: "2", value: 2, text: "下半年" },
+      ],
+      optionsHE: [
+        { key: "1", value: 1, text: "上半年" },
+        { key: "2", value: 2, text: "下半年" },
+      ],
+      optionsQS: [
+        { key: "1", value: 1, text: "第一季度" },
+        { key: "2", value: 2, text: "第二季度" },
+        { key: "3", value: 3, text: "第三季度" },
+        { key: "4", value: 4, text: "第四季度" },
+      ],
+      optionsQE: [
+        { key: "1", value: 1, text: "第一季度" },
+        { key: "2", value: 2, text: "第二季度" },
+        { key: "3", value: 3, text: "第三季度" },
+        { key: "4", value: 4, text: "第四季度" },
+      ],
+      queryParams: {
+        executeCycle: tempType,
+        checkSub: false,
+        orgId: tempOrgId,
+        range: [sDate, eDate],
+        executeRole: tempRole,
+        status: tempstatus,
+        planId: null,
+        pageNum: 1,
+        pageSize: 10,
+      },
+      pageData: [],
+      columns: [
+        { key: 0, label: `序号`, visible: true },
+        { key: 1, label: `计划名称`, visible: true },
+        { key: 2, label: `开始时间`, visible: true },
+        { key: 3, label: `结束时间`, visible: true },
+        { key: 4, label: `上级机构`, visible: true },
+        { key: 5, label: `履职机构`, visible: true },
+        { key: 6, label: `履职角色`, visible: true },
+        { key: 2, label: `提交人`, visible: true },
+        { key: 3, label: `提交时间`, visible: true },
+        { key: 4, label: `异常个数`, visible: true },
+        { key: 5, label: `任务状态`, visible: true },
+      ],
+    };
+  },
+  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);
+      },
+    },
+    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;
+      else this.queryParams.planId = value;
+    },
+    $route(v) {
+      //this.queryParams.type = this.$route.params.type.toUpperCase();
+    },
+    // 0每日;1每周;2每月;3每季度;4每半年;5每年
+    yearS(val) {
+      if (this.yearE < val) {
+        this.yearE = val;
+        if (this.queryParams.executeCycle == 3) {
+          if (this.quarterS > this.quarterE) {
+            this.quarterS = this.quarterE;
+          } else this.resetRangeParam();
+        } else if (this.queryParams.executeCycle == 4) {
+          if (this.halfyearS > this.halfyearE) {
+            this.halfyearS = this.quarterE;
+          } else this.resetRangeParam();
+        }
+      } else this.resetRangeParam();
+    },
+    yearE(val) {
+      if (val < this.yearS) {
+        this.yearS = val;
+        if (this.queryParams.executeCycle == 3) {
+          if (this.quarterS > this.quarterE) {
+            this.quarterS = this.quarterE;
+          } else this.resetRangeParam();
+        } else if (this.queryParams.executeCycle == 4) {
+          if (this.halfyearS > this.halfyearE) {
+            this.halfyearS = this.halfyearE;
+          } else this.resetRangeParam();
+        }
+      } else this.resetRangeParam();
+    },
+    quarterS(val) {
+      if (this.yearS == this.yearE) {
+        if (val > this.quarterE) this.quarterE = val;
+        else this.resetRangeParam();
+      } else this.resetRangeParam();
+    },
+    quarterE(val) {
+      if (this.yearS == this.yearE) {
+        if (val < this.quarterS) this.quarterS = val;
+        else this.resetRangeParam();
+      } else this.resetRangeParam();
+    },
+    halfyearS(val) {
+      console.log("ccccccccc", val);
+      if (this.yearS == this.yearE) {
+        if (val > this.halfyearE) this.halfyearE = val;
+        else this.resetRangeParam();
+      } else this.resetRangeParam();
+    },
+    halfyearE(val) {
+      console.log("dddddddddd", val);
+      if (this.yearS == this.yearE) {
+        if (val < this.halfyearS) this.halfyearS = val;
+        else this.resetRangeParam();
+      } else this.resetRangeParam();
+    },
+    monthRange(val) {
+      this.resetRangeParam();
+    },
+  },
+  computed: {
+    ...mapState(["org", "loginUser"]),
+  },
+  methods: {
+    ...mapMutations([]),
+    getLabel,
+    toName(row) {
+      // const ymd = row.ymd;
+      const ymd = this.$moment(row.ymdDate);
+      switch (row.executeCycle) {
+        case 0:
+          return `${ymd.year}年${ymd.month}月${ymd.day}日-${row.formTypeText}`;
+        case 1:
+          return `${ymd.year}年第${ymd.week}周-${row.formTypeText}`;
+        case 2:
+          return `${ymd.year}年第${ymd.month}月`;
+        case 3:
+          return `${ymd.year}年第${ymd.quarter}季`;
+        case 4:
+          let text = ymd.halfyear == 1 ? "上" : "下";
+          return `${ymd.year}年${text}每半年`;
+        case 5:
+          return `${ymd.year}年`;
+        case 6:
+          return `${ymd.year}年${ymd.month}月${ymd.day}日${ymd.hour}小时${ymd.minute}分钟-${row.formTypeText}`;
+      }
+    },
+
+    async exportExcel() {
+      if (!this.isTableHaveData) {
+        Message.error({
+          message: `暂无可用数据导出!`,
+          type: "error",
+          duration: 2000,
+        });
+        return;
+      }
+      await api.exportResumptionRecord(this.queryParams);
+    },
+    showDetail(row) {
+      this.$refs.detaildialog.show(row.resumptionId, row.time);
+      //this.$refs.detaildialog.show("75246a09eba74e018b60ade0b1f336f8", row.planName);
+    },
+    showscanRecord(row) {
+      this.$refs.scanrecorddialog.show(row.resumptionId, row.orgId);
+    },
+
+    getDefaultKey(key) {
+      this.queryParams.orgId = key;
+      this.getList();
+    },
+    //单选框状态改变
+    checkChange(state) {
+      this.queryParams.checkSub = state;
+      this.getList();
+    },
+    // 节点单击事件
+    clickTreeNode(data) {
+      this.queryParams.orgId = data.id;
+      this.getList();
+    },
+    resetQuery() {
+      this.resetForm("queryParams");
+      this.queryParams.orgId = undefined;
+      this.queryParams.checkSub = false;
+      this.$refs.tree.setCurrentKey(null);
+      this.getList();
+    },
+    async getList() {
+      this.loading = true;
+      console.log("this.queryParams", this.queryParams);
+      api
+        .list(this.queryParams)
+        .then((r) => {
+          this.pageData = r.rows;
+          this.total = r.total;
+          this.loading = false;
+        })
+        .catch((e) => {
+          this.loading = false;
+        });
+    },
+    async changeType(selectValue) {
+      // console.log("selectValue",selectValue.target.value)
+      this.roleVal = "all";
+      this.planVal = -1;
+      this.queryParams.executeCycle = Number(selectValue.target.value);
+
+      let nowDate = new Date();
+      let nowMonth = nowDate.getMonth();
+      if (nowMonth <= 2) {
+        this.quarterS = 1;
+        this.quarterE = 1;
+        this.halfyearS = 1;
+        this.halfyearE = 1;
+      } else if (nowMonth <= 5) {
+        this.quarterS = 2;
+        this.quarterE = 2;
+        this.halfyearS = 1;
+        this.halfyearE = 1;
+      } else if (nowMonth <= 8) {
+        this.quarterS = 3;
+        this.quarterE = 3;
+        this.halfyearS = 2;
+        this.halfyearE = 2;
+      } else if (nowMonth <= 11) {
+        this.quarterS = 4;
+        this.quarterE = 4;
+        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");
+        // 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");
+      this.resetRangeParam();
+    },
+    monthChanged() {
+      this.resetRangeParam();
+    },
+    async resetRangeParam() {
+      if (this.queryParams.executeCycle == 3) {
+        let yearSval = this.yearS.getFullYear();
+        let yearEval = this.yearE.getFullYear();
+        let sQDate = yearSval + "-";
+        let eQData = yearEval + "-";
+
+        switch (this.quarterS) {
+          case 1:
+            sQDate += "01-01";
+            break;
+          case 2:
+            sQDate += "04-01";
+            break;
+          case 3:
+            sQDate += "07-01";
+            break;
+          case 4:
+            sQDate += "10-01";
+            break;
+        }
+
+        switch (this.quarterE) {
+          case 1:
+            eQData += "03-31";
+            break;
+          case 2:
+            eQData += "06-30";
+            break;
+          case 3:
+            eQData += "09-30";
+            break;
+          case 4:
+            eQData += "12-31";
+            break;
+        }
+
+        this.queryParams.range = [this.$moment(sQDate), this.$moment(eQData)];
+      } else if (this.queryParams.executeCycle == 4) {
+        let yearSval = this.yearS.getFullYear();
+        let yearEval = this.yearE.getFullYear();
+        let sHDate = yearSval + "-";
+        let eHData = yearEval + "-";
+
+        switch (this.halfyearS) {
+          case 1:
+            sHDate += "01-01";
+            break;
+          case 2:
+            sHDate += "07-01";
+            break;
+        }
+
+        switch (this.halfyearE) {
+          case 1:
+            eHData += "06-30";
+            break;
+          case 2:
+            eHData += "12-31";
+            break;
+        }
+        this.queryParams.range = [this.$moment(sHDate), this.$moment(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)];
+      } else if (this.queryParams.executeCycle == 2) {
+        if (!this.monthRange || this.monthRange.length != 2) {
+          this.queryParams.range = null;
+        } else {
+          let dateObjS = this.monthRange[0];
+          let dateObjE = this.monthRange[1];
+          if (dateObjS.getFullYear == undefined) {
+            dateObjS = new Date(dateObjS);
+            dateObjE = new Date(dateObjE);
+          }
+          let sMDate =
+            dateObjS.getFullYear() + "-" + (dateObjS.getMonth() + 1) + "-1";
+          let eMData =
+            dateObjE.getFullYear() + "-" + (dateObjE.getMonth() + 1) + "-1";
+
+          let tempDate = new Date(
+            dateObjE.getFullYear(),
+            dateObjE.getMonth(),
+            29
+          );
+          if (dateObjE.getMonth() == 1 && tempDate.getDate() === 29) {
+            eMData =
+              dateObjE.getFullYear() + "-" + (dateObjE.getMonth() + 1) + "-29";
+          } else {
+            switch (dateObjE.getMonth()) {
+              case 0:
+                eMData =
+                  dateObjE.getFullYear() +
+                  "-" +
+                  (dateObjE.getMonth() + 1) +
+                  "-31";
+                break;
+              case 1:
+                eMData =
+                  dateObjE.getFullYear() +
+                  "-" +
+                  (dateObjE.getMonth() + 1) +
+                  "-28";
+                break;
+              case 2:
+                eMData =
+                  dateObjE.getFullYear() +
+                  "-" +
+                  (dateObjE.getMonth() + 1) +
+                  "-31";
+                break;
+              case 3:
+                eMData =
+                  dateObjE.getFullYear() +
+                  "-" +
+                  (dateObjE.getMonth() + 1) +
+                  "-30";
+                break;
+              case 4:
+                eMData =
+                  dateObjE.getFullYear() +
+                  "-" +
+                  (dateObjE.getMonth() + 1) +
+                  "-31";
+                break;
+              case 5:
+                eMData =
+                  dateObjE.getFullYear() +
+                  "-" +
+                  (dateObjE.getMonth() + 1) +
+                  "-30";
+                break;
+              case 6:
+                eMData =
+                  dateObjE.getFullYear() +
+                  "-" +
+                  (dateObjE.getMonth() + 1) +
+                  "-31";
+                break;
+              case 7:
+                eMData =
+                  dateObjE.getFullYear() +
+                  "-" +
+                  (dateObjE.getMonth() + 1) +
+                  "-31";
+                break;
+              case 8:
+                eMData =
+                  dateObjE.getFullYear() +
+                  "-" +
+                  (dateObjE.getMonth() + 1) +
+                  "-30";
+                break;
+              case 9:
+                eMData =
+                  dateObjE.getFullYear() +
+                  "-" +
+                  (dateObjE.getMonth() + 1) +
+                  "-31";
+                break;
+              case 10:
+                eMData =
+                  dateObjE.getFullYear() +
+                  "-" +
+                  (dateObjE.getMonth() + 1) +
+                  "-30";
+                break;
+              case 11:
+                eMData =
+                  dateObjE.getFullYear() +
+                  "-" +
+                  (dateObjE.getMonth() + 1) +
+                  "-31";
+                break;
+            }
+          }
+          this.queryParams.range = [this.$moment(sMDate), this.$moment(eMData)];
+        }
+      } else if (this.queryParams.executeCycle == 1) {
+        this.queryParams.range = [
+          this.$moment(this.weekStart),
+          this.$moment(this.weekEnd),
+        ];
+      } else if (
+        this.queryParams.executeCycle === 0 ||
+        this.queryParams.executeCycle == 6
+      ) {
+        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;
+      }
+    }
+    this.loadRoles(this.queryParams.orgId);
+    await this.loadtypes();
+    this.loadPlanList();
+
+    await this.refresh();
+  },
+};
+</script>
+
+<style lang="scss">
+// .searchItem {
+//   margin-right: 10px;
+//   margin-top: 5px;
+//   margin-bottom: 5px;
+// }
+
+// .searchTitle {
+//   margin-right: 10px !important;
+//   margin-bottom: 0 !important;
+//   margin-top: 0 !important;
+// }
+</style>