Selaa lähdekoodia

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

coys 2 vuotta sitten
vanhempi
commit
26a14ccfcd
3 muutettua tiedostoa jossa 57 lisäystä ja 18 poistoa
  1. 7 0
      src/api/safetycheck/task.js
  2. 37 8
      src/views/check/task/index.vue
  3. 13 10
      src/views/core/send/index.vue

+ 7 - 0
src/api/safetycheck/task.js

@@ -9,6 +9,13 @@ export function page(query) {
   });
 }
 
+export function remove(taskId) {
+  return request({
+    url: "/core/safetyTask/task/"+taskId,
+    method: "delete",
+  });
+}
+
 //获取计划列表
 export function getPlans(args) {
   return request({

+ 37 - 8
src/views/check/task/index.vue

@@ -123,7 +123,6 @@
                   start-placeholder="开始日期"
                   end-placeholder="结束日期"
                   v-model="queryParams.range"
-                  :picker-options="pickerOptions"
                 >
                 </DataRangePicker>
               </el-form-item>
@@ -173,6 +172,7 @@
             >
             </el-table-column>
             <el-table-column
+              header-align="center"
               prop="title"
               label="任务名称"
               width="250px"
@@ -181,9 +181,9 @@
             >
             </el-table-column>
             <el-table-column
+              header-align="center"
               prop="checkOrgName"
               label="检查主体"
-              align="center"
               width="180px"
               v-if="columns[5].visible"
             >
@@ -207,7 +207,7 @@
               prop="status"
               label="任务进度"
               align="center"
-              width="180px"
+              width="120px"
               v-if="columns[10].visible"
             >
               <template slot-scope="r">
@@ -225,7 +225,7 @@
             <el-table-column
               prop="orgName"
               label="受检机构"
-              align="center"
+              header-align="center"
               width="180px"
               v-if="columns[4].visible"
             >
@@ -234,7 +234,7 @@
             <el-table-column
               prop="planStartTime"
               label="任务时间"
-              align="center"
+              header-align="center"
               width="300px"
               v-if="columns[2].visible"
               ><template slot-scope="r">
@@ -280,7 +280,7 @@
               align="center"
               prop="exceptionCount"
               label="隐患问题数"
-              width="180px"
+              width="120px"
               v-if="columns[9].visible"
             >
             </el-table-column>
@@ -295,8 +295,8 @@
             <el-table-column
               label="操作"
               fixed="right"
-              align="center"
-              width="180px"
+              header-align="center"
+              width="200px"
             >
               <template slot-scope="r">
                 <!-- <el-button v-if="
@@ -317,6 +317,7 @@
                 <el-button
                   type="text"
                   @click="showscanRecord(r.row)"
+                  v-if="r.row.status == 2 || r.row.status == 3"
                   v-hasPermi="['resumption:taskManager:query']"
                   >扫描记录</el-button
                 >
@@ -326,6 +327,19 @@
                   v-if="showRegisterBtn(r.row)"
                   >任务登记</el-button
                 >
+                <el-button
+                  type="text"
+                  size="mini"
+                  slot="reference"
+                  icon="el-icon-delete"
+                  @click="handleDel(r.row.id)"
+                  v-if="
+                    r.row.status == 3 &&
+                    r.row.submitorId == userId &&
+                    r.row.sourceType == 1
+                  "
+                  >删除</el-button
+                >
               </template>
             </el-table-column>
           </el-table>
@@ -507,6 +521,21 @@ export default {
       let path = "/safetycheck/tempregister/add";
       this.$router.push(path);
     },
+    handleDel(taskId) {
+      this.$modal
+        .confirm("确认删除该临时登记?")
+        .then(() => {
+          return api.remove(taskId);
+        })
+        .then((r) => {
+          if (r && r.data) {
+            this.$message.info("删除成功");
+            this.getList();
+          } else {
+            this.$message.warning("删除失败");
+          }
+        });
+    },
     async getList() {
       console.log(this.queryParams, "this.queryParams");
       this.loading = true;

+ 13 - 10
src/views/core/send/index.vue

@@ -1,6 +1,9 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <div class="main-right-box">
+          <div class="main-search-box">
+
+            <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
       <el-form-item label="标题" prop="title">
         <el-input maxlength="50" v-model="queryParams.title" placeholder="请输入标题" clearable
           @keyup.enter.native="handleQuery" />
@@ -13,11 +16,6 @@
                          :value="`${dict.value}`"></el-option>
             </el-select>
           </el-form-item>
- 
-      <!-- <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item> -->
     </el-form>
 
     <el-row :gutter="10" class="mb8">
@@ -36,8 +34,11 @@
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
-
-    <el-table v-loading="loading" :data="sendList">
+          </div>
+          <el-table border
+                    height="650"
+                    size="small"
+                    v-loading="loading" :data="sendList">
       <el-table-column label="标题" align="center" prop="title" />
       <el-table-column label="类型" align="center" key="type" prop="type" width="80">
         <template slot-scope="scope">
@@ -72,6 +73,7 @@
 
     <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
       @pagination="getList" />
+        </div>
 
     <!-- 添加或修改【请填写功能名称】对话框 -->
     <DialogCom :title="title" :visible.sync="open" width="500px" append-to-body>
@@ -157,9 +159,9 @@
           </el-date-picker>
         </el-form-item>
       </el-form>
-      <!-- <div slot="footer" class="dialog-footer">
+    <div slot="footer" class="dialog-footer">
         <el-button @click="cancel">取 消</el-button>
-      </div> -->
+      </div> 
    </DialogCom>
   </div>
 </template>
@@ -275,6 +277,7 @@ export default {
     // 取消按钮
     cancel() {
       this.open = false;
+      this.yes=false;
       this.reset();
     },
     // 表单重置