Kaynağa Gözat

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

zhulu 2 yıl önce
ebeveyn
işleme
a1f6d67f44

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

@@ -37,9 +37,9 @@ export function exportResumptionRecord(args) {
 /**
  * 查询
  */
-export function one(id,ymd) {
+export function one(id) {
   return request({
-    url: "/core/resumption/record/" + id+"/"+ymd,
+    url: "/core/resumption/record/" + id,
     method: "get"
   });
 }

+ 5 - 4
src/components/table/mix.search.js

@@ -6,7 +6,7 @@ export default {
     return {
       dataList: [],
       total: 0,
-      pageIndex: 0,
+      pageIndex: 1,
       pageSize: 10,
     };
   },
@@ -78,8 +78,8 @@ export default {
      */
     async load(params) {
       params = params || {};
-      params.page = this.pageIndex >= 1 ? this.pageIndex - 1 : this.pageIndex;
-      params.size = this.pageSize;
+      params.pageNum = this.pageIndex<1?1:this.pageIndex;
+      params.pageSize = this.pageSize;
       console.log(params);
 
       let data;
@@ -95,6 +95,7 @@ export default {
       // this.$emit("select-all", []);
       // this.$emit("handleSelectionChange", []);
       this.$emit("load", data);
+      
       if (data.length) {
         this.dataList = this.checkSelect(data);
         this.total = data.length;
@@ -104,7 +105,7 @@ export default {
       }
       else{
         this.dataList = this.checkSelect(data.rows);
-        this.total = data.totalElements;
+        this.total = data.total;
       }
       this.$emit("totalCount", this.total);
     },

+ 2 - 2
src/views/core/edu/plan/index.vue

@@ -207,12 +207,12 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <!-- <el-col :span="12">
+           <el-col :span="12">
             <el-form-item label="培训机构" prop="planExecOrgIdList">
               <tree-select v-model="form.planExecOrgIdList" :options="deptOptions" :show-count="true"
                 :normalizer="tenantIdnormalizer" :props="{ checkStrictly: true, label: 'name' }" placeholder="请选择培训机构" />
             </el-form-item>
-          </el-col> -->
+          </el-col>
         </el-row>
         <el-row>
           <el-col :span="12">

+ 1 - 1
src/views/core/edu/task/index.vue

@@ -103,7 +103,7 @@
           <el-button type="text" v-if="scope.row.pdfUrl" @click="onDown(scope.row.pdfUrl)"
             >培训登记簿
           </el-button>
-          <!-- <el-button type="text" @click="onEdit(scope.row)">查看</el-button>            
+          <!-- <el-button type="text" @click="onEdit(scope.row)">查看</el-button>
           <el-button
               type="text"
               v-if="

+ 1 - 1
src/views/resumption/protection/dialog.edit.vue

@@ -89,7 +89,7 @@ export default {
         orgPath: null,
         orgName: null,
         name: null,
-        allHour: null,
+        allHour: 0,
       };
     },
     async refresh(id, other) {

+ 9 - 2
src/views/resumption/ruleManager/dialog.editPoint.vue

@@ -5,7 +5,11 @@
       :title="index >= 0 ? '编辑履职内容' : '新增履职内容'"
       :visible.sync="dataVisible"
       :show-close="false"
-      @close="()=>{this.$refs.form.resetFields();}"
+      @close="
+        () => {
+          this.$refs.form.resetFields();
+        }
+      "
       append-to-body
     >
       <div>
@@ -125,7 +129,6 @@ export default {
       };
     },
     async show(index, data) {
-      
       if (index >= 0) {
         this.index = index;
         this.formData = data;
@@ -148,6 +151,10 @@ export default {
         if (!isValidate) return;
         let obj = {};
         obj = { ...this.formData };
+        if (obj.businessType == "") {
+          obj.businessType = null;
+        }
+
         this.$emit("submit", this.index, obj);
         this.dataVisible = false;
       });

+ 47 - 15
src/views/resumption/taskManager/dialog.detail.vue

@@ -40,16 +40,13 @@
                 :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
-                  >
+                  <span v-if="scope.row.executeResult === '0'">
+                    <i class="circle" style="background-color: #1890ff" />
+                    <label style="color: #1890ff"> 正常</label> </span
+                  ><span v-else>
+                    <i class="circle" style="background-color: #f5222d" />
+                    <label style="color: #f5222d"> 异常</label>
+                  </span>
                 </template>
               </el-table-column>
               <el-table-column
@@ -111,18 +108,17 @@ export default {
     };
   },
   methods: {
-    async refresh(id, ymd) {
-      let detail = await api.one(id, ymd);
+    async refresh(id) {
+      let detail = (await api.one(id)).data;
       if (detail && detail.length > 0) {
         this.tableData = detail;
       } else {
         this.tableData = [];
       }
     },
-    async show(id, title, ymd) {
-      // console.log(id,title);
+    async show(id, title) {
       this.title = title;
-      await this.refresh(id, ymd);
+      await this.refresh(id);
       this.isShow = true;
     },
     onHide() {
@@ -138,6 +134,32 @@ export default {
       });
       return srcList;
     },
+    valueColor(v) {
+      let color = "";
+      switch (v) {
+        case "0":
+          color = "1890FF";
+          break;
+        case "1":
+          color = "F5222D";
+          break;
+      }
+
+      return "color:" + color;
+    },
+    valueBgColor(v) {
+      let color = "";
+      switch (v) {
+        case "0":
+          color = "1890FF";
+          break;
+        case "1":
+          color = "F5222D";
+          break;
+      }
+
+      return "background-color:" + color;
+    },
   },
 };
 </script>
@@ -151,4 +173,14 @@ export default {
   // width: 20%;
   // vertical-align: top;
 }
+
+.circle {
+  display: inline-block;
+  width: 5px;
+  height: 5px;
+  border-radius: 5px;
+  background-color: red;
+  border: none;
+  margin-bottom: 3px;
+}
 </style>

+ 13 - 5
src/views/resumption/taskManager/dialog.scanrecord.vue

@@ -26,18 +26,24 @@
           label="扫描时间"
           align="center"
           :show-overflow-tooltip="true"
+          width="180px"
           prop="executeTime"
         >
         </el-table-column>
         <el-table-column
           label="扫描方式"
           align="center"
+          width="80px"
           :show-overflow-tooltip="true"
           prop="scanMethod"
         >
+          <template slot-scope="r">
+            <span v-if="r.row.scanMethod === 0">扫描</span>
+            <span v-else>拍照</span>
+          </template>
         </el-table-column>
         <el-table-column
-          label="扫描方式"
+          label="详情"
           align="center"
           :show-overflow-tooltip="true"
           prop="img"
@@ -70,10 +76,12 @@ export default {
   },
   methods: {
     async refresh(id, orgId) {
-      let detail = await api.findNfcScanRecord({
-        orgId: orgId,
-        resumptionId: id,
-      });
+      let detail = (
+        await api.findNfcScanRecord({
+          orgId: orgId,
+          resumptionId: id,
+        })
+      ).data;
       // console.log(detail);
       if (detail) {
         this.tableData = detail;

+ 45 - 45
src/views/resumption/taskManager/index.vue

@@ -57,7 +57,7 @@
               @change="changeType($event)"
             >
               <el-option
-                v-for="item in dict.type.plan_cycle"
+                v-for="item in dict.type.resumption_plan_cycle"
                 :key="item.value"
                 :label="item.label"
                 :value="item.value"
@@ -82,7 +82,9 @@
             class="searchTitle"
             label="计划时间"
             v-if="
-              queryParams.executeCycle == 1 || queryParams.executeCycle == 2 || queryParams.executeCycle == null || queryParams.executeCycle==0
+              queryParams.executeCycle == 1 ||
+              queryParams.executeCycle == 2 ||
+              queryParams.executeCycle == null
             "
           >
             <DataRangePicker
@@ -280,11 +282,11 @@
         </el-row>
         <el-table v-loading="loading" :data="pageData">
           <el-table-column
-          type="index"
+            type="index"
             min-width="4%"
+            label="序号"
             v-if="columns[0].visible"
           >
-            <template slot-scope="r">{{ r.row.order }}</template>
           </el-table-column>
           <el-table-column
             prop="name"
@@ -292,7 +294,6 @@
             min-width="20%"
             v-if="columns[1].visible"
           >
-            <template slot-scope="r">{{ r.row.planName }}</template>
           </el-table-column>
           <el-table-column
             prop="planStartTime"
@@ -308,34 +309,25 @@
           />
 
           <el-table-column
-            prop="status"
+            prop="parentOrgName"
             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"
+            prop="orgName"
             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"
+            prop="roleName"
             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"
@@ -358,17 +350,16 @@
             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%"
+            width="100px"
             v-if="columns[9].visible"
           >
             <template slot-scope="r">
-              <label :style="statusStyle(r.row.status)">
-                {{ getLabel(dict.type.resumption_status, r.row.status) }}</label
+              <ul :style="statusStyle(r.row.status)"><li>{{ getLabel(dict.type.resumption_status, r.row.status) }}</li>
+                </ul
               >
             </template>
           </el-table-column>
@@ -383,8 +374,16 @@
                             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)" v-show="r.row.status!=2 || r.row.status!=3">查看</el-button>
-              <el-button type="text" @click="showscanRecord(r.row)" v-show="r.row.status!=2 || r.row.status!=3"
+              <el-button
+                type="text"
+                @click="showDetail(r.row)"
+                v-show="r.row.status != 2 || r.row.status != 3"
+                >查看</el-button
+              >
+              <el-button
+                type="text"
+                @click="showscanRecord(r.row)"
+                v-show="r.row.status != 2 || r.row.status != 3"
                 >扫描记录</el-button
               >
             </template>
@@ -417,7 +416,7 @@ import { getLabel } from "@/views/commonOption.js";
 
 export default {
   name: "overviewDetialList",
-  dicts: ["plan_cycle", "resumption_status"],
+  dicts: ["resumption_plan_cycle", "resumption_status"],
   components: { DialogDetail, DialogScanRecord, DataRangePicker, OrgTree },
   data() {
     // const { params, query } = this.$route;
@@ -496,7 +495,7 @@ export default {
         { key: "4", value: 4, text: "第四季度" },
       ],
       queryParams: {
-        executeCycle: "1",
+        executeCycle: "2",
         checkSub: false,
         orgId: null,
         range: [sDate, eDate],
@@ -650,7 +649,7 @@ export default {
       await api.exportResumptionRecord(this.queryParams);
     },
     showDetail(row) {
-      this.$refs.detaildialog.show(row.resumptionId, row.name,row.ymd);
+      this.$refs.detaildialog.show(row.resumptionId, row.name);
       //this.$refs.detaildialog.show("75246a09eba74e018b60ade0b1f336f8", row.planName);
     },
     showscanRecord(row) {
@@ -666,7 +665,7 @@ export default {
     //单选框状态改变
     checkChange(state) {
       this.queryParams.checkSub = state;
-      
+
       this.getList();
     },
     // 节点单击事件
@@ -701,7 +700,7 @@ export default {
       api
         .getRoles({
           orgId: this.queryParams.orgId,
-          planCycle: Number(this.queryParams.executeCycle),
+          planCycle: this.queryParams.executeCycle
         })
         .then((r) => (this.roleList = r.data));
     },
@@ -710,7 +709,7 @@ export default {
       api
         .getPlans({
           orgId: this.queryParams.orgId,
-          // checkSub: this.queryParams.checkSub,
+          planCycle: this.queryParams.executeCycle
         })
         .then((r) => {
           this.planList = r.data;
@@ -747,21 +746,22 @@ export default {
       // 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()}`;
+        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();
+      this.loadPlanList();
+      this.loadRoles();
     },
 
     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");
@@ -770,8 +770,8 @@ export default {
     monthChanged() {
       this.resetRangeParam();
     },
-    async resetRangeParam() {  
-      if (this.queryParams.executeCycle == 3) {
+    async resetRangeParam() {
+      if (this.queryParams.executeCycle == 5) {
         let yearSval = this.yearS.getFullYear();
         let yearEval = this.yearE.getFullYear();
         let sQDate = yearSval + "-";
@@ -808,7 +808,7 @@ export default {
         }
 
         this.queryParams.range = [new Date(sQDate), new Date(eQData)];
-      } else if (this.queryParams.executeCycle == 4) {
+      } else if (this.queryParams.executeCycle == 6) {
         let yearSval = this.yearS.getFullYear();
         let yearEval = this.yearE.getFullYear();
         let sHDate = yearSval + "-";
@@ -832,14 +832,14 @@ export default {
             break;
         }
         this.queryParams.range = [new Date(sHDate), new Date(eHData)];
-      } else if (this.queryParams.executeCycle == 5) {
+      } else if (this.queryParams.executeCycle == 7) {
         let yearSval = this.yearS.getFullYear();
         let yearEval = this.yearE.getFullYear();
         let sYDate = yearSval + "-01-01";
         let eYData = yearEval + "-12-31";
 
         this.queryParams.range = [new Date(sYDate), new Date(eYData)];
-      } else if (this.queryParams.executeCycle == 2) {
+      } else if (this.queryParams.executeCycle == 4) {
         if (!this.monthRange || this.monthRange.length != 2) {
           this.queryParams.range = null;
         } else {
@@ -952,14 +952,14 @@ export default {
           }
           this.queryParams.range = [new Date(sMDate), new Date(eMData)];
         }
-      } else if (this.queryParams.executeCycle == 1) {
+      } else if (this.queryParams.executeCycle == 3) {
         this.queryParams.range = [
           new Date(this.weekStart),
           new Date(this.weekEnd),
         ];
       } else if (
-        this.queryParams.executeCycle === 0 ||
-        this.queryParams.executeCycle == 6
+        this.queryParams.executeCycle === 1 ||
+        this.queryParams.executeCycle == 2
       ) {
         this.queryParams.range = this.$dateRange.before(0);
       }
@@ -977,7 +977,7 @@ export default {
           color = "F5222D";
       }
 
-      return "list-style-type:disc;color:" + color;
+      return "list-style-type:disc;padding-left:10px;color:" + color;
     },
   },
   async mounted() {