jiawuxian 2 роки тому
батько
коміт
2e6ffddda5

+ 3 - 4
src/api/resumption/taskManger.js

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

+ 14 - 7
src/components/dateTime/daterange.picker.vue

@@ -4,19 +4,26 @@
         type="daterange"
         :clearable="clearable"
         :picker-options="pickerOptions"
-        v-on:change="onSelect()"
+        @change="onSelect"
         v-bind="$attrs"
     />
 </template>
-<script lang="ts">
-
+<script>
+// import sync from '@/components/computed.sync.ts'
+// import { set } from 'vue/types/umd';
 export default {
     inheritAttrs: false,
     data() {
         return {};
     },
-    computed: {
-        // pv: sync("value"),
+    computed: {        // pv: sync("value"),
+       
+        // val:{
+        //     get(){return this.value},
+        //     set(v){
+        //         this.$emit("input",v)
+        //     }
+        // },
         pickerOptions() {
             return {
                 shortcuts: [
@@ -69,8 +76,8 @@ export default {
         },
     },
     methods: {
-        onSelect() {
-            this.$emit("refresh");
+        onSelect(v) {
+            this.$emit("input",v);
         },
     },
     mounted() {},

+ 26 - 33
src/views/resumption/protection/dialog.history.vue

@@ -23,7 +23,7 @@
           <div style="margin-bottom: 20px">
             <span>上报时间范围:</span>
             <el-date-picker
-              v-model="search.updateTime"
+              v-model="queryParams.updateTime"
               :default-time="defaultTime"
               type="datetimerange"
               range-separator="至"
@@ -41,7 +41,7 @@
                 {{ getLabel(statusDict, r.row.status) }}
               </template></el-table-column
             >
-            <el-table-column prop="updateTime" label="上报时间">             
+            <el-table-column prop="updateTime" label="上报时间">
             </el-table-column>
             <el-table-column
               prop="statusUpdatorName"
@@ -49,16 +49,13 @@
             ></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"
+            <pagination
+              v-show="total > 0"
               :total="total"
-            >
-            </el-pagination>
+              :page.sync="queryParams.pageNum"
+              :limit.sync="queryParams.pageSize"
+              @pagination="getList"
+            />
           </div>
         </div>
       </div>
@@ -83,9 +80,8 @@ export default {
       protection: {},
       tableData: [],
       defaultTime: ["00:00:00", "23:59:59"],
-      search: this.resetSearch(),
+      queryParams: this.resetSearch(),
       total: 1,
-      currentPage: 1,
     };
   },
   props: {
@@ -98,44 +94,41 @@ export default {
   methods: {
     getLabel,
     async refresh() {
-      this.currentPage = 1;
-      this.getlist();
+      this.pageNum = 1;
+      this.getList();
     },
-    async getlist() {
-      this.search.page = this.currentPage - 1;      
-      await api.history(this.search).then((v) => {
+    async getList() {
+      await api.history(this.queryParams).then((v) => {
         this.tableData = v.rows;
         this.total = v.total;
       });
     },
     close() {
-      this.search = this.resetSearch();
-      this.tableData=[];
-      this.total=0;
+      this.queryParams = this.resetSearch();
+      this.tableData = [];
+      this.total = 0;
     },
     async show(protection) {
-      this.protection=protection;
-      this.search = this.resetSearch();
-      this.search.protectionId = protection.id;
+      this.protection = protection;
+      this.queryParams = this.resetSearch();
+      this.queryParams.protectionId = protection.id;
       await this.refresh();
       this.isShow = true;
     },
     handleSizeChange(val) {
-      this.currentPage = 1;
-      this.search.size = val;
-      this.getlist();
-      console.log(`每页 ${val} 条`);
+      this.queryParams.pageSize = val;
+      this.getList();
     },
     handleCurrentChange(val) {
-      this.currentPage = val;
-      this.getlist();
+      this.queryParams.pageNum = val;
+      this.getList();
     },
     resetSearch() {
       return {
-        size: 10,
-        page: 0,
+        pageNum: 1,
+        pageSize: 10,
         protectionId: null,
-        updateTime: [new Date( new Date() - 3600 * 1000 * 24 * 90), new Date()],
+        updateTime: [new Date(new Date() - 3600 * 1000 * 24 * 90), new Date()],
       };
     },
     // 事件

+ 8 - 8
src/views/resumption/protection/index.vue

@@ -29,9 +29,8 @@
               clearable
             />
           </el-form-item>
-          <el-form-item prop="ruleTypeId" label="防区状态">
+          <el-form-item prop="status" label="防区状态">
             <el-select
-              prop="ruleTypeId"
               label="防区状态"
               v-model="queryParams.status"
               placeholder="请选择防区状态"
@@ -46,10 +45,11 @@
             </el-select>
           </el-form-item>
 
-          <el-form-item prop="orgType" label="布撤防时间范围">
+          <el-form-item prop="dateRange" label="布撤防时间范围">
             <el-date-picker
               v-model="queryParams.dateRange"
               type="datetimerange"
+              format="yyyy-MM-dd HH:mm"
               range-separator="至"
               start-placeholder="开始日期"
               end-placeholder="结束日期"
@@ -162,7 +162,7 @@
           </el-table-column>
           <el-table-column label="操作">
             <template slot-scope="r">
-              <el-button
+              <!-- <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-edit"
@@ -177,7 +177,7 @@
                 @click="updateStatus(r.row.id, 0)"
                 v-hasPermi="['device:protection:maintain']"
                 >撤防</el-button
-              >
+              > -->
               <el-button
                 size="mini"
                 type="text"
@@ -334,9 +334,9 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
-      this.queryParams.orgId = undefined;
-      this.$refs.tree.setCurrentKey(null);
+      this.resetForm("search");
+      // this.queryParams.orgId = undefined;
+      // this.$refs.tree.setCurrentKey(null);
       this.getList();
     },
     //单选框状态改变

+ 16 - 9
src/views/resumption/rule/index.vue

@@ -21,7 +21,7 @@
           v-show="showSearch"
           label-width="100px"
         >
-          <el-form-item prop="ruleName" label="履职库名称">
+          <el-form-item prop="name" label="履职库名称">
             <el-input
               v-model="queryParams.name"
               :maxlength="50"
@@ -29,7 +29,7 @@
               clearable
             />
           </el-form-item>
-          <el-form-item prop="ruleTypeId" label="履职库类型">
+          <el-form-item prop="type" label="履职库类型">
             <el-select
               prop="ruleTypeId"
               label="履职库类型"
@@ -68,7 +68,7 @@
               type="primary"
               icon="el-icon-search"
               size="mini"
-              @click="getList"
+              @click="refresh"
               v-hasPermi="['resumption:rule:query']"
               >搜索</el-button
             >
@@ -179,14 +179,17 @@
                 icon="el-icon-edit"
                 @click="onEdit(r.row.id)"
                 v-hasPermi="['resumption:rule:edit']"
-              >修改</el-button>
+                >修改</el-button
+              >
               <el-button
                 size="mini"
                 type="text"
                 icon="el-icon-delete"
                 @click="onDel(r.row.id)"
                 v-hasPermi="['resumption:rule:remove']"
-              >删除</el-button>              
+                class="red-btn"
+                >删除</el-button
+              >
             </template>
           </el-table-column>
         </el-table>
@@ -266,6 +269,10 @@ export default {
   methods: {
     ...mapMutations([]),
     getLabel,
+    refresh() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
     getList() {
       this.loading = true;
       console.info(this.dict.type);
@@ -302,9 +309,9 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
-      this.queryParams.orgId = undefined;
-      this.$refs.tree.setCurrentKey(null);
+      this.resetForm("search");
+      // this.queryParams.orgId = undefined;
+      // this.$refs.tree.setCurrentKey(null);
       this.getList();
     },
     //单选框状态改变
@@ -320,7 +327,7 @@ export default {
     getStatusLabel(value) {
       return getLabel(statusOptions, value);
     },
-    
+
     //apimark//
   },
   mounted() {},

+ 18 - 23
src/views/resumption/ruleManager/index.vue

@@ -33,13 +33,12 @@
           v-show="showSearch"
           label-width="100px"
         >
-          <el-form-item prop="ruleItemName" label="履职项">
+          <el-form-item prop="itemName" label="履职项">
             <el-input
               v-model="queryParams.itemName"
               placeholder="请输入内容"
               maxlength="50"
               clearable
-              @input="refresh"
             ></el-input>
           </el-form-item>
           <el-form-item prop="pointName" label="履职内容">
@@ -48,7 +47,6 @@
               placeholder="请输入履职内容"
               maxlength="50"
               clearable
-              @input="refresh"
             ></el-input>
           </el-form-item>
           <el-form-item>
@@ -56,7 +54,7 @@
               type="primary"
               icon="el-icon-search"
               size="mini"
-              @click="getList"
+              @click="refresh"
               v-hasPermi="['resumption:ruleManager']"
               >搜索</el-button
             >
@@ -74,11 +72,12 @@
               :disabled="rule ? false : true"
               v-hasPermi="['resumption:ruleManager:add']"
               >新 增</el-button
-            ><el-button
+            >
+            <!-- <el-button
               type="primary"
               @click="onSelect()"
               >选择</el-button
-            >
+            > -->
             <el-button
               type="warning"
               @click="dakai"
@@ -151,7 +150,7 @@
             </template>
           </el-table-column>
           <el-table-column
-            prop="order"
+            type="index"
             label="序号"
             width="80"
             v-if="columns[0].visible"
@@ -187,17 +186,13 @@
             </template>
           </el-table-column>
         </el-table>
-
-        <el-pagination
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="queryParams.currentPage"
-          :page-sizes="[10, 20, 30, 40, 50, 100]"
-          :page-size="queryParams.pagesize"
-          layout="total, sizes, prev, pager, next, jumper"
+        <pagination
+          v-show="total > 0"
           :total="total"
-        >
-        </el-pagination>
+          :page.sync="queryParams.pageNum"
+          :limit.sync="queryParams.pageSize"
+          @pagination="getList"
+        />
       </el-col>
     </el-row>
     <dialog-edit
@@ -224,8 +219,8 @@ export default {
         ruleId: null,
         itemName: null,
         pointName: null,
-        currentPage: 1,
-        pagesize: 10,
+        pageNum: 1,
+        pageSize: 10,
       },
       filterText: null,
       showSearch: true,
@@ -341,10 +336,10 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
-      this.queryParams.ruleId = undefined;
-      this.$refs.tree.setCurrentKey(null);
-      this.tableData = [];
+      this.resetForm("search");
+      // this.queryParams.ruleId = undefined;
+      // this.$refs.tree.setCurrentKey(null);
+      this.getList();
     },
     onAddItem() {
       if (!this.rule) {

+ 4 - 4
src/views/resumption/taskManager/dialog.detail.vue

@@ -111,18 +111,18 @@ export default {
     };
   },
   methods: {
-    async refresh(id) {
-      let detail = await api.one(id);
+    async refresh(id, ymd) {
+      let detail = await api.one(id, ymd);
       if (detail && detail.length > 0) {
         this.tableData = detail;
       } else {
         this.tableData = [];
       }
     },
-    async show(id, title) {
+    async show(id, title, ymd) {
       // console.log(id,title);
       this.title = title;
-      await this.refresh(id);
+      await this.refresh(id, ymd);
       this.isShow = true;
     },
     onHide() {

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

@@ -82,11 +82,11 @@
             class="searchTitle"
             label="计划时间"
             v-if="
-              queryParams.executeCycle == 1 || queryParams.executeCycle == 2 || queryParams.executeCycle == null
+              queryParams.executeCycle == 1 || queryParams.executeCycle == 2 || queryParams.executeCycle == null || queryParams.executeCycle==0
             "
           >
             <DataRangePicker
-              :value="queryParams.range"
+              v-model="queryParams.range"
               key="daterange"
               type="daterange"
               :clearable="timeClearable"
@@ -287,8 +287,8 @@
             <template slot-scope="r">{{ r.row.order }}</template>
           </el-table-column>
           <el-table-column
-            prop="planName"
-            label="计划名称"
+            prop="name"
+            label="任务名称"
             min-width="20%"
             v-if="columns[1].visible"
           >
@@ -383,8 +383,8 @@
                             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 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>
@@ -650,7 +650,7 @@ export default {
       await api.exportResumptionRecord(this.queryParams);
     },
     showDetail(row) {
-      this.$refs.detaildialog.show(row.resumptionId, row.time);
+      this.$refs.detaildialog.show(row.resumptionId, row.name,row.ymd);
       //this.$refs.detaildialog.show("75246a09eba74e018b60ade0b1f336f8", row.planName);
     },
     showscanRecord(row) {
@@ -770,7 +770,7 @@ export default {
     monthChanged() {
       this.resetRangeParam();
     },
-    async resetRangeParam() {      
+    async resetRangeParam() {  
       if (this.queryParams.executeCycle == 3) {
         let yearSval = this.yearS.getFullYear();
         let yearEval = this.yearE.getFullYear();