Browse Source

Merge branch 'master' of http://101.36.160.140:21044/csc/csc-szls-vue

linyanfei 3 years ago
parent
commit
b1e69e077c

+ 84 - 0
shanXiPlatform/src/api/reservesManagement/fumigationManagement.js

@@ -0,0 +1,84 @@
1
+import request from '@/utils/request'
2
+
3
+//机械通风列表
4
+export function getList(data) {
5
+    return request({
6
+      url: `csc-szls-business/ventilation/processAudit/getPage`,
7
+      method: 'post',
8
+      data
9
+    })
10
+  }
11
+
12
+
13
+
14
+  //新增时初始化页面数据
15
+  export function getAddList(type) {
16
+    return request({
17
+      url: `csc-szls-business/ventilation/processMain/getAllProcess/${type}`,
18
+      method: 'get',
19
+    
20
+    })
21
+  }  
22
+
23
+  //流程新增接口
24
+  export function addList(data) {
25
+    return request({
26
+      url: `csc-szls-business/ventilation/processAudit/add`,
27
+      method: 'post',
28
+      data
29
+    })
30
+  }
31
+
32
+
33
+  
34
+
35
+  //流程数据
36
+  export function getProcessList(type,userId,depotId) {
37
+    return request({
38
+      url: `csc-szls-business/ventilation/processBasis/getBasisByType/${type}/${userId}/${depotId}`,
39
+      method: 'get',
40
+    
41
+    })
42
+  }
43
+
44
+
45
+
46
+  //删除按钮
47
+  export function deleteTfList(id) {
48
+    return request({
49
+      url: `/csc-szls-business/ventilation/processAudit/deleteById/${id}`,
50
+      method: 'get',
51
+    
52
+    })
53
+  }
54
+
55
+
56
+  //用户字典列表
57
+  export function userList() {
58
+    return request({
59
+      url: `/csc-szls-system-manage/user/authority/getAll`,
60
+      method: 'get',
61
+    
62
+    })
63
+  }
64
+
65
+//查看接口
66
+
67
+export function checkList(processId) {
68
+  return request({
69
+    url: `/csc-szls-business/ventilation/processAudit/getDataByProcessId/${processId}`,
70
+    method: 'get',
71
+   
72
+  })
73
+}
74
+
75
+
76
+//步骤修改接口
77
+export function updateList(data) {
78
+  return request({
79
+    url: `/csc-szls-business/ventilation/processAudit/detailsAdd`,
80
+    method: 'post',
81
+    data
82
+  })
83
+}
84
+

+ 52 - 11
shanXiPlatform/src/router/index.js

@@ -744,6 +744,32 @@ export const constantRoutes = [
744 744
         name: 'FumigationManagement',
745 745
         meta: { title: '熏蒸管理', icon: 'dashboard', affix: false }
746 746
       } */
747
+
748
+      //  储量管理/熏蒸管理
749
+      {
750
+        path: 'fumigationManagement',
751
+        component: () => import('@/views/reservesManagement/fumigationManagement/index'),
752
+        name: 'FumigationManagement',
753
+        meta: { title: '熏蒸管理', icon: 'tongfeng', affix: false, relation: 'house', istable: true },
754
+        resourceCode: 169
755
+      },
756
+      //  储量管理/熏蒸管理/新增
757
+      {
758
+        path: '/reservesManagement/fumigationManagement/steps',
759
+        component: () => import('@/views/reservesManagement/fumigationManagement/steps'),
760
+        name: 'FumigationManagementStep',
761
+        hidden: true,
762
+        meta: { title: '熏蒸管理新增', icon: 'dashboard', affix: false, noCache: true, relation: 'house', istable: false }
763
+      },
764
+
765
+      //  储量管理/熏蒸管理/已完成
766
+      {
767
+        path: '/reservesManagement/fumigationManagement/completed',
768
+        component: () => import('@/views/reservesManagement/fumigationManagement/completed'),
769
+        name: 'FumigationManagementCompleted',
770
+        hidden: true,
771
+        meta: { title: '熏蒸管理已完成', icon: 'dashboard', affix: false, noCache: true, relation: 'house', istable: false }
772
+      },
747 773
     ]
748 774
   },
749 775
 
@@ -852,9 +878,6 @@ export const constantRoutes = [
852 878
           name: 'FacilitiesManagemen',
853 879
           meta: { title: '设施管理', icon: 'dashboard', affix: false,istable: true ,relation: 'library'},
854 880
           resourceCode: 243,
855
-
856
-
857
-
858 881
           children: [
859 882
             {
860 883
               path: 'newFacilities',
@@ -864,9 +887,6 @@ export const constantRoutes = [
864 887
               hidden: true,
865 888
               meta: { title: '最新设施检查记录', icon: 'dashboard', affix: false,relation: 'library', istable: true}
866 889
             },
867
-
868
-
869
-
870 890
             {
871 891
               path: 'allFacilities',
872 892
               component: () => import('@/views/facilitiesEquipment/facilitiesManagement/allFacilities/index'),
@@ -875,24 +895,45 @@ export const constantRoutes = [
875 895
               hidden: true,
876 896
               meta: { title: '全部设施检查记录', icon: 'dashboard', affix: false ,relation: 'library', istable: true}
877 897
             },
898
+            // {
899
+            //   path: 'maintenance',
900
+            //   component: () => import('@/views/facilitiesEquipment/facilitiesManagement/maintenance/index'),
901
+            //   name: 'Maintenance',
878 902
 
903
+            //   hidden: true,
904
+            //   meta: { title: '设施维修改造', icon: 'dashboard', affix: false }
905
+            // },
879 906
 
907
+            //  设施维修改造
880 908
             {
881 909
               path: 'maintenance',
882 910
               component: () => import('@/views/facilitiesEquipment/facilitiesManagement/maintenance/index'),
883 911
               name: 'Maintenance',
884
-
885 912
               hidden: true,
886
-              meta: { title: '设施维修改造', icon: 'dashboard', affix: false }
913
+              meta: { title: '设施维修改造', icon: 'tongfeng', affix: false, relation: 'house', istable: true },
887 914
             },
888
-
889
-
890 915
           ]
916
+        },
917
+        //  设施维修改造/新增
918
+        {
919
+          path: '/facilitiesEquipment/facilitiesManagement/maintenance/steps',
920
+          component: () => import('@/views/facilitiesEquipment/facilitiesManagement/maintenance/steps'),
921
+          name: 'MaintenanceStep',
922
+          hidden: true,
923
+          meta: { title: '设施维修改造新增', icon: 'dashboard', affix: false, noCache: true, relation: 'house', istable: false }
924
+        },
891 925
 
892
-
926
+        //  设施维修改造/已完成
927
+        {
928
+          path: '/facilitiesEquipment/facilitiesManagement/maintenance/completed',
929
+          component: () => import('@/views/facilitiesEquipment/facilitiesManagement/maintenance/completed'),
930
+          name: 'MaintenanceCompleted',
931
+          hidden: true,
932
+          meta: { title: '设施维修改造已完成', icon: 'dashboard', affix: false, noCache: true, relation: 'house', istable: false }
893 933
         },
894 934
 
895 935
 
936
+
896 937
         //  设施设备/设施管理/新增
897 938
         {
898 939
           path: '/facilitiesManagement/addType',

+ 1 - 1
shanXiPlatform/src/views/facilitiesEquipment/facilitiesManagement/facilitiesTabs.vue

@@ -10,7 +10,7 @@
10 10
           label="全部设施检查记录"
11 11
           name="AllFacilities"
12 12
         ></el-tab-pane>
13
-        <!-- <el-tab-pane label="设施维修改造" name="Maintenance"></el-tab-pane> -->
13
+        <el-tab-pane label="设施维修改造" name="Maintenance"></el-tab-pane>
14 14
       </el-tabs>
15 15
         <div id="main">
16 16
 

+ 320 - 0
shanXiPlatform/src/views/facilitiesEquipment/facilitiesManagement/maintenance/completed.vue

@@ -0,0 +1,320 @@
1
+<template>
2
+  <div class="global">
3
+    <div class="mainContainer">
4
+      <div class="steps">
5
+        <el-steps :active="stepActive" align-center direction="horizontal">
6
+          <el-step
7
+          
8
+            style="color: black"
9
+            icon="iconfont iconrun-line"
10
+            v-for="(item, index) in tableData"
11
+              :title="item.step.title"
12
+            :key="index"
13
+            @click.native="stepClick(index)"
14
+          >
15
+            <template>
16
+              <i
17
+                slot="icon"
18
+                class="iconfont iconNotStarted"
19
+                v-if="stepActive < index"
20
+              />
21
+              <i
22
+                slot="icon"
23
+                class="iconfont iconcurrent"
24
+                v-if="stepActive == index"
25
+              />
26
+              <i
27
+                slot="icon"
28
+                class="iconfont iconfinished"
29
+                v-if="stepActive > index"
30
+              />
31
+            </template>
32
+          </el-step>
33
+        </el-steps>
34
+      </div>
35
+
36
+      <div id="step1">
37
+        <el-table
38
+          border
39
+          stripe
40
+          highlight-current-row
41
+          :data="totalData"
42
+          :span-method="arraySpanMethod"
43
+        >
44
+          <el-table-column
45
+            align="center"
46
+            label="序号"
47
+            width="100px"
48
+            type="index"
49
+          >
50
+            <template slot-scope="scope">
51
+              <div
52
+                v-if="
53
+                  scope.row.hasOwnProperty('process') &&
54
+                  scope.row.process.length != 0
55
+                "
56
+                style="height: 400px"
57
+              >
58
+                <div class="tf_title">
59
+                  <i class="iconfont iconshu"></i>流程(机械通风审批)
60
+                </div>
61
+                <el-steps direction="vertical" :active="processActive">
62
+                  <el-step
63
+                    v-for="(item, index) in scope.row.process"
64
+                    :key="index"
65
+                    icon="el-icon-edit"
66
+                  >
67
+                    <template>
68
+                      <div slot="title" class="stepTitle">
69
+                        <div class="stepTitleFont">
70
+                          {{ item.title }}
71
+                        </div>
72
+
73
+                        <div style="display: flex; flex-direction: column">
74
+                          <div
75
+                            :class="{
76
+                              active:
77
+                                index == 0 ||
78
+                                (item.auditState != null &&
79
+                                  item.auditState == 1),
80
+                              noActive: item.auditState == 2,
81
+                            }"
82
+                          >
83
+                            {{ perList[item.content] }}
84
+                          </div>
85
+
86
+                          <div v-if="item.auditState == 0">待审批</div>
87
+                          <div
88
+                            v-if="item.auditState == 1"
89
+                            class="stepTitleFont"
90
+                          >
91
+                            审批通过
92
+                          </div>
93
+                          <div v-if="item.auditState == 2">审批不通过</div>
94
+                          <div class="stepTitleFont">{{ item.auditTime }}</div>
95
+                        </div>
96
+                      </div>
97
+                    </template>
98
+                    <template>
99
+                      <i
100
+                        slot="icon"
101
+                        class="iconfont iconstep_current"
102
+                        v-if="
103
+                          index != 0 &&
104
+                          (item.auditState == null || item.auditState == 0)
105
+                        "
106
+                      >
107
+                      </i>
108
+                      <i
109
+                        slot="icon"
110
+                        style="color: red"
111
+                        class="iconfont iconstep_err"
112
+                        v-if="item.auditState == 2"
113
+                      ></i>
114
+                      <i
115
+                        slot="icon"
116
+                        style="color: green"
117
+                        class="iconfont iconstep_complete"
118
+                        v-if="item.auditState == 1 || index == 0"
119
+                      ></i>
120
+                    </template>
121
+                  </el-step>
122
+                </el-steps>
123
+              </div>
124
+
125
+              <div v-else>{{ scope.row.index }}</div>
126
+            </template>
127
+          </el-table-column>
128
+          <el-table-column
129
+            label="时间"
130
+            prop="operationTime"
131
+            align="center"
132
+            width="300px"
133
+          >
134
+          </el-table-column>
135
+
136
+          <el-table-column prop="title" label="工作项" align="center" />
137
+          <el-table-column prop="option" label="选项" align="center">
138
+            <template slot-scope="scope">
139
+              <el-radio-group v-model="scope.row.subData">
140
+                <el-radio :label="0" :disabled="disabled">{{
141
+                  scope.row.details.split(",")[0]
142
+                }}</el-radio>
143
+                <el-radio :label="1" :disabled="disabled">{{
144
+                  scope.row.details.split(",")[1]
145
+                }}</el-radio>
146
+              </el-radio-group>
147
+            </template>
148
+          </el-table-column>
149
+        </el-table>
150
+        <div class="btns">
151
+          <el-button class="backBtn" type="cancel" plain @click="goBack()"
152
+            >返回</el-button
153
+          >
154
+        </div>
155
+      </div>
156
+    </div>
157
+  </div>
158
+</template>
159
+<script>
160
+//时间格式的转化
161
+import { getNowFormatDate } from "@/utils"
162
+import { checkList } from "@/api/reservesManagement/mechanicalVentilation"
163
+import { getUser } from "@/utils/auth"
164
+export default {
165
+  name: "AddMeVentilation",
166
+
167
+  data() {
168
+    return {
169
+      userInfo: {},
170
+      //人员字典数据
171
+      perList: {},
172
+      //流程id
173
+      processId: null,
174
+      //初始化点击的步骤
175
+      step: "",
176
+      //初始化步骤高亮显示到第几步
177
+      stepActive: null,
178
+      //表格数据
179
+      totalData: [],
180
+      tableData: [],
181
+      //审批流程
182
+      process: [],
183
+      disabled: true,
184
+    }
185
+  },
186
+  methods: {
187
+    //查看接口
188
+    getCheckList() {
189
+      var processId = this.processId
190
+      checkList(processId).then((res) => {
191
+        console.log(res, ".......")
192
+        if (res.code == 200) {
193
+          var index = 1
194
+          this.tableData = res.data.process
195
+          this.tableData.forEach((item1) => {
196
+            item1.list.forEach((item) => {
197
+              item.index = index
198
+              this.totalData.push(item)
199
+              index++
200
+            })
201
+          })
202
+          // console.log(this.totalData,"totalData.......")
203
+          for (let i = 0; i < res.data.audit.length - 1; i++) {
204
+            var ele = res.data.audit[i]
205
+            if (ele.auditState != null) {
206
+              this.processActive = i
207
+            }
208
+            this.process.push(ele)
209
+            if (this.process[0].content == 0) {
210
+              this.process[0].content = this.userInfo.uid
211
+            } else {
212
+              this.process[0].content = res.data.audit[0].content
213
+            }
214
+          }
215
+
216
+          // this.totalData[1].process=this.process;
217
+          this.totalData.splice(1, 0, { details: "是,否" })
218
+          this.$set(this.totalData[1], "process", this.process)
219
+          console.log(this.totalData, "totalData.......")
220
+        }
221
+      })
222
+    },
223
+    //合并列或行
224
+    arraySpanMethod({ row, column, rowIndex, columnIndex }) {
225
+      if (rowIndex === 1) {
226
+        if (columnIndex === 0) {
227
+          return [1, 4]
228
+        }
229
+      }
230
+    },
231
+
232
+    //点击返回按钮
233
+    goBack() {
234
+      this.$router.push({ path: "/reservesManagement/mechanicalVentilation" })
235
+    },
236
+  },
237
+  mounted() {
238
+    this.userInfo = JSON.parse(getUser())
239
+    console.log(this.userInfo, "this.userInfo.....?????")
240
+    this.processId = this.$route.query.processId
241
+    console.log(this.processId, "//////")
242
+    this.stepActive = parseInt(this.$route.query.ongoingStep)
243
+    this.getCheckList()
244
+    //获取人员字典数据
245
+    this.perList = JSON.parse(localStorage.getItem("perList"))
246
+  },
247
+}
248
+</script>
249
+<style lang="scss" scoped>
250
+.global {
251
+  height: calc(100vh - 70px - 83px);
252
+  min-height: 500px;
253
+  overflow-y: scroll;
254
+  .mainContainer {
255
+    background: #fff;
256
+    padding: 10px;
257
+    .steps {
258
+      height: 80px;
259
+      margin: 10px 0;
260
+
261
+      .iconfont {
262
+        font-size: 55px;
263
+      }
264
+    }
265
+    #step1,
266
+    #step2,
267
+    #step3,
268
+    #step4,
269
+    #process {
270
+      display: block;
271
+    }
272
+    #process {
273
+      margin-top: 20px;
274
+      padding: 20px;
275
+      background: rgb(235, 233, 233);
276
+      .process_title {
277
+        margin-bottom: 20px;
278
+      }
279
+      .stepTitle {
280
+        display: flex;
281
+        justify-content: space-between;
282
+      }
283
+    }
284
+    .stepTitle {
285
+      display: flex;
286
+      justify-content: space-between;
287
+    }
288
+    .btns {
289
+      text-align: right;
290
+      margin-top: 20px;
291
+    }
292
+    .active {
293
+      color: #037d41;
294
+    }
295
+    .noActive {
296
+      color: red;
297
+    }
298
+    .stepTitleFont {
299
+      color: black;
300
+    }
301
+    .tf_title {
302
+      margin-bottom: 20px;
303
+      font-weight: 500;
304
+      text-align: left;
305
+      color: #037d41;
306
+      font-size: 18px;
307
+    }
308
+  }
309
+}
310
+</style>
311
+<style>
312
+/* .backBtn.is-plain {
313
+  color: #037d41;
314
+  background-color: #fff;
315
+  border-color: #037d41;
316
+} */
317
+.el-steps {
318
+  height: 350px !important;
319
+}
320
+</style>

+ 370 - 113
shanXiPlatform/src/views/facilitiesEquipment/facilitiesManagement/maintenance/index.vue

@@ -1,144 +1,401 @@
1 1
 <template>
2
-  <div class="container">
3
-    <div class="header">
4
-      <el-form :inline="true" :model="query" class="demo-form-inline">
5
-        <el-form-item label="维修时间:">
6
-          <el-date-picker
7
-            v-model="query.start"
8
-            type="date"
9
-            placeholder="选择日期"
10
-            format="yyyy 年 MM 月 dd 日"
11
-            value-format="yyyy-MM-dd"
12
-          >
13
-          </el-date-picker>
14
-        </el-form-item>
15
-        <el-form-item label="-">
16
-          <el-date-picker
17
-            v-model="query.end"
18
-            type="date"
19
-            placeholder="选择日期"
20
-            format="yyyy 年 MM 月 dd 日"
21
-            value-format="yyyy-MM-dd"
2
+      <div class="container">
3
+        <div class="header">
4
+          <el-form :inline="true" :model="query" class="demo-form-inline">
5
+            <el-form-item label="检测时间">
6
+              <el-date-picker
7
+                v-model="query.value1"
8
+                type="daterange"
9
+                format="yyyy 年 MM 月 dd 日"
10
+                 value-format="yyyy-MM-dd"
11
+                range-separator="至"
12
+                start-placeholder="开始日期"
13
+                end-placeholder="结束日期"
14
+              >
15
+              </el-date-picker>
16
+            </el-form-item>
17
+            <el-form-item>
18
+              <el-button
19
+                type="info"
20
+                plain
21
+                @click="clear()"
22
+                class="iconfont iconclear"
23
+              >
24
+                清空</el-button
25
+              >
26
+              <el-button
27
+                type="success"
28
+                icon="el-icon-search"
29
+                plain
30
+                @click="search()"
31
+                >查询</el-button
32
+              >
33
+            </el-form-item>
34
+          </el-form>
35
+          <div style="float:right">
36
+            <el-button
37
+              v-if="$tools.IsPermission(228)"
38
+              type="success"
39
+              icon="el-icon-circle-plus"
40
+              plain
41
+              @click="add(1)"
42
+              >新增</el-button
43
+            >
44
+          </div>
45
+        </div>
46
+
47
+        <el-table
48
+          border
49
+          stripe
50
+          :data="tfData"
51
+          highlight-current-row
52
+          style="width: 100%"
53
+          :header-cell-style="{ background: '#f8f8f8' }"
54
+        >
55
+          <el-table-column
56
+            :index="indexMethod"
57
+            type="index"
58
+            align="center"
59
+            label="序号"
60
+            width="50px"
22 61
           >
23
-          </el-date-picker>
24
-        </el-form-item>
62
+          </el-table-column>
25 63
 
26
-        <el-form-item>
27
-          <el-button type="success" plain @click="search()">查询</el-button>
28
-          <el-button type="success" plain @click="clear()">清空</el-button>
29
-        </el-form-item>
30
-      </el-form>
64
+          <el-table-column prop="type" label="类型" align="center">
65
+          </el-table-column>
66
+          <el-table-column prop="applyTime" label="时间" align="center">
67
+          </el-table-column>
68
+          <el-table-column prop="auditState" label="状态" align="center">
69
+            <template slot-scope="scope">
70
+              <div v-if="scope.row.auditState == 0">待审批</div>
71
+              <div v-if="scope.row.auditState == 1">待审批</div>
72
+              <div v-if="scope.row.auditState == 2">审批不通过</div>
73
+              <div v-if="scope.row.auditState == 3">进行中</div>
74
+              <div v-if="scope.row.auditState == 4">已完成</div>
75
+            </template>
76
+          </el-table-column>
31 77
 
32
-      <div>
33
-          <el-button type="success" plain>新增</el-button>
34
-      </div>
35
-    </div>
36
-
37
-    <el-table
38
-      border
39
-      stripe
40
-      :data="maintence"
41
-      highlight-current-row
42
-      @current-change="handleCurrentChange"
43
-      style="width: 100%"
44
-    >
45
-      <el-table-column type="index" align="center" label="序号" width="50px">
46
-      </el-table-column>
47
-
48
-      <el-table-column prop="name" label="名称" align="center">
49
-      </el-table-column>
50
-      <el-table-column prop="checkTime" label="检查时间" align="center">
51
-      </el-table-column>
52
-      <el-table-column prop="status" label="状态" align="center">
53
-      </el-table-column>
54
-
55
-      <el-table-column
56
-        prop="operation"
57
-        label="操作"
58
-        align="center"
59
-        width="300px"
60
-      >
61
-        <template slot-scope="scope">
62
-          <el-button
63
-            size="mini"
64
-            @click="handleCheck(3, scope.$index, scope.row)"
65
-            >查看</el-button
78
+          <el-table-column
79
+            prop="operation"
80
+            label="操作"
81
+            align="center"
82
+            width="300px"
66 83
           >
84
+            <template slot-scope="scope">
85
+              <el-button
86
+                v-if="$tools.IsPermission(230)"
87
+                size="mini"
88
+                type="detailbtn"
89
+                @click="handleCheck(3, scope.$index, scope.row)"
90
+                >查看</el-button
91
+              >
67 92
 
68
-          <el-button size="mini" @click="handleDelete(scope.$index, scope.row)"
69
-            >删除</el-button
70
-          >
71
-        </template>
72
-      </el-table-column>
73
-    </el-table>
74
-    <pagination
75
-      v-show="total > 0"
76
-      :total="total"
77
-      :page.sync="listQuery.page"
78
-      :limit.sync="listQuery.limit"
79
-      @pagination="getPageList(page, limit)"
80
-    />
81
-  </div>
93
+              <el-button
94
+                size="mini"
95
+                type="editbtn"
96
+                @click="handleEdit(2, scope.$index, scope.row)"
97
+                v-if="
98
+                  scope.row.auditState != 0 &&
99
+                  scope.row.auditState != 4 &&
100
+                  scope.row.auditState != 1 &&
101
+                  scope.row.auditState != 2 &&
102
+                  $tools.IsPermission(229)
103
+                "
104
+                >修改</el-button
105
+              >
106
+              <!-- <el-button
107
+                size="mini"
108
+                type="danger"
109
+                plain
110
+                @click="handleDelete(scope.$index, scope.row)"
111
+                >删除</el-button
112
+              > -->
113
+            </template>
114
+          </el-table-column>
115
+        </el-table>
116
+        <el-pagination
117
+          background
118
+          @size-change="sizeChange"
119
+          @current-change="handleCurrentChange"
120
+          :page-count="5"
121
+          :page-sizes="[10, 20, 30, 40]"
122
+          :page-size="pagination.pageSize"
123
+          layout="total, sizes, prev, pager, next, jumper"
124
+          :total="pagination.total"
125
+        ></el-pagination>
126
+      </div>
82 127
 </template>
83 128
 <script>
129
+//引入分页
84 130
 import Pagination from "@/components/Pagination"
131
+import {
132
+  getList,
133
+  deleteTfList,
134
+} from "@/api/reservesManagement/fumigationManagement"
135
+import { getUser } from "@/utils/auth"
85 136
 export default {
86 137
   components: { Pagination },
87 138
   data() {
88 139
     return {
140
+      //存储用户信息
141
+      userInfo: {},
142
+      //仓房编号
143
+      houseId: this.$store.state.houseId,
144
+      //库编号
145
+      depotId: this.$store.state.depotId,
146
+      //类型
147
+      type: "tf",
148
+      value: "",
89 149
       query: {
90
-        start: "",
91
-        end: "",
150
+        // startTime: "",
151
+        // endTime: "",
152
+        value1:""
92 153
       },
93
-
94 154
       //分页
95
-      total: 30,
96
-      listLoading: true,
97
-      listQuery: {
98
-        page: 1,
99
-        limit: 10,
100
-        importance: undefined,
101
-        title: undefined,
102
-        type: undefined,
103
-        sort: "+id",
155
+
156
+      pagination: {
157
+        //当前页数
158
+        curPage: 1,
159
+        //每页显示的条数
160
+        pageSize: 10,
161
+        //总条数
162
+        total: 0,
104 163
       },
164
+      // 列表数据
165
+      tfData: [],
166
+    }
167
+  },
168
+  methods: {
169
+    //新增
170
+    add(type) {
171
+      this.$router.push({
172
+        path: "/facilitiesEquipment/facilitiesManagement/maintenance/steps",
173
+        query: {
174
+          type: type,
175
+        },
176
+      })
177
+    },
178
+    //查看
179
+    handleCheck(type, index, row) {
180
+      console.log(row, "row")
105 181
 
106
-      maintence: [
107
-        {
108
-          name: "设施维修改造",
109
-          checkTime: "2020-2-2",
182
+      if (row.auditState == 4) {
183
+        console.log(4444444)
184
+        this.$router.push({
185
+          path: "/facilitiesEquipment/facilitiesManagement/maintenance/completed",
186
+          query: {
187
+            type: type,
188
+            processId: row.processId,
189
+            ongoingStep: row.ongoingStep,
190
+          },
191
+        })
192
+      } else {
193
+        console.log(row.auditState, "row.status....")
194
+        this.$router.push({
195
+          path: "/facilitiesEquipment/facilitiesManagement/maintenance/steps",
196
+          query: {
197
+            type: type,
198
+            processId: row.processId,
199
+            ongoingStep: row.ongoingStep,
200
+          },
201
+        })
202
+      }
203
+    },
110 204
 
111
-          status: "已完成",
205
+    //修改
206
+    handleEdit(type, index, row) {
207
+      console.log(row, "修改row...")
208
+      this.$router.push({
209
+        path: "/facilitiesEquipment/facilitiesManagement/maintenance/steps",
210
+        query: {
211
+          type: type,
212
+          processId: row.processId,
213
+          ongoingStep: row.ongoingStep,
214
+          auditState: row.auditState,
112 215
         },
113
-         {
114
-          name: "设施维修改造",
115
-          checkTime: "2020-2-2",
216
+      })
217
+    },
116 218
 
117
-          status: "已完成",
118
-        },
119
-         {
120
-          name: "设施维修改造",
121
-          checkTime: "2020-2-2",
219
+    //删除接口
220
+    deleteList() {
221
+      console.log("shancuu")
222
+      this.$confirm("确定删除该项记录?", "提示", {
223
+        confirmButtonText: "确定",
224
+        cancelButtonText: "取消",
225
+        type: "warning",
226
+      }).then(() => {
227
+        console.log(11111)
122 228
 
123
-          status: "已完成",
124
-        },
125
-      ],
126
-    }
229
+        var id = this.id
230
+
231
+        console.log(id, "删除id")
232
+        deleteTfList(id)
233
+          .then((res) => {
234
+            if (res.code == 200) {
235
+              this.tfList()
236
+              this.$message({
237
+                type: "success",
238
+                message: "删除成功!",
239
+              })
240
+            }
241
+          })
242
+          .catch(() => {
243
+            this.$message({
244
+              type: "info",
245
+              message: "已取消删除",
246
+            })
247
+          })
248
+      })
249
+    },
250
+    //删除
251
+    handleDelete(index, row) {
252
+      console.log(row, "row....")
253
+      this.id = row.id
254
+      this.deleteList()
255
+    },
256
+
257
+    //获取列表
258
+    tfList() {
259
+      var condition = {
260
+        houseId: this.houseId,
261
+        depotId: this.depotId,
262
+        type: this.type,
263
+        startTime: this.query.value1[0],
264
+        endTime: this.query.value1[1],
265
+       
266
+      }
267
+      console.log(condition, "condition.....")
268
+      condition = JSON.stringify(condition)
269
+      var data = {
270
+        pageIndex: this.pagination.curPage,
271
+        pageSize: this.pagination.pageSize,
272
+        condition: condition,
273
+      }
274
+      getList(data)
275
+        .then((res) => {
276
+          if (res.code == 200) {
277
+            // this.tfData = res.data.list;
278
+            this.tfData = res.data.records
279
+            this.tfData.forEach((item) => {
280
+              if (item.type == "tf") {
281
+                item.type = "熏蒸管理"
282
+              }
283
+            })
284
+
285
+            this.pagination.pageSize = res.data.size
286
+            this.pagination.total = res.data.total
287
+          }
288
+        })
289
+        .catch((err) => {
290
+          console.log(err)
291
+        })
292
+    },
293
+    //清空
294
+    clear() {
295
+      this.query.value1 = []
296
+      this.tfList()
297
+    },
298
+
299
+    //查询
300
+    search() {
301
+      
302
+      this.tfList()
303
+    },
304
+    //当前页发生变化时
305
+    handleCurrentChange(val) {
306
+      console.log(val, "val...")
307
+      this.pagination.curPage = val
308
+      this.tfList()
309
+    },
310
+
311
+    //页数大小发生变化时
312
+    sizeChange(v) {
313
+      this.pagination.pageSize = v
314
+      this.tfList()
315
+    },
316
+
317
+    /* ----- 格式化表格序号 -----*/
318
+    indexMethod(index) {
319
+      return (
320
+        (this.pagination.curPage - 1) * this.pagination.pageSize + index + 1
321
+      )
322
+    },
127 323
   },
128
-  methods: {
129
-    handleCurrentChange() {},
324
+
325
+  computed: {
326
+    HouseId() {
327
+      return this.$store.state.houseId
328
+    },
329
+    // DepotId() {
330
+    //   return this.$store.state.depotId
331
+    // },
332
+  },
333
+  watch: {
334
+    HouseId: function (val) {
335
+      // findbyTreeDatac(this.$store.state.depotId).then(res => {
336
+      //   this.treeData = res.data
337
+      // })
338
+      this.houseId = val
339
+      var houseData = JSON.parse(localStorage.getItem("houseData"))
340
+      console.log(houseData, "houseData...")
341
+
342
+      this.depotId = houseData.parentCode
343
+      console.log(this.depotId, "库id")
344
+      this.tfList()
345
+    },
346
+  },
347
+  mounted() {
348
+    console.log(this.$store.state.houseId, ">>>>>>>???????")
349
+
350
+    //获取当前缓存的用户信息
351
+    // this.userInfo = JSON.parse(localStorage.getItem("userInfo"))
352
+    // console.log(this.userInfo, "this.userInfo.....")
353
+    this.userInfo = JSON.parse(getUser())
354
+    console.log(this.userInfo, "this.userInfo.....?????")
355
+    this.tfList()
356
+
357
+    // this.bus.$on("tfList", function() {
358
+    //     this.tfList();
359
+    //   });
130 360
   },
131 361
 }
132 362
 </script>
133
-<style lang="scss">
134
-.container {
135
-  padding: 10px;
136
-  .header {
363
+<style lang="scss" scoped>
364
+.contentContainer {
365
+  background: #fff;
366
+  .top {
367
+    padding-left: 10px;
137 368
     height: 40px;
138 369
     line-height: 40px;
139
-    display: flex;
140
-    justify-content: space-between;
141
-    margin-bottom: 20px;
370
+    border-bottom: 1px solid #ccc;
371
+    font-weight: 400;
372
+    font-size: 16px;
373
+  }
374
+  .container {
375
+    padding: 10px;
376
+    .header {
377
+      height: 40px;
378
+      line-height: 40px;
379
+      display: flex;
380
+      justify-content: space-between;
381
+      margin-bottom: 20px;
382
+    }
383
+    .el-pagination {
384
+      text-align: right;
385
+      margin-top: 20px;
386
+    }
387
+  }
388
+  .checkBtn.is-plain {
389
+    color: #037d41;
390
+    background-color: #fff;
391
+    border-color: #037d41;
392
+  }
393
+  .checkBtn.is-plain:hover {
394
+    color: #fff !important;
395
+    background-color: #13ce66 !important;
396
+    border: 1px solid #13ce66 !important;
142 397
   }
143 398
 }
144 399
 </style>
400
+<style>
401
+</style>

+ 805 - 0
shanXiPlatform/src/views/facilitiesEquipment/facilitiesManagement/maintenance/steps.vue

@@ -0,0 +1,805 @@
1
+<template>
2
+  <div class="global">
3
+    <div class="mainContainer">
4
+      <div class="div_parent">
5
+      <div class="steps">
6
+        <el-steps :active="stepActive" align-center direction="horizontal">
7
+          <el-step
8
+            id="el_step"
9
+            :title="item.step.title"
10
+            v-for="(item, index) in totalData"
11
+            :key="index"
12
+            @click.native="stepClick(index)"
13
+          >
14
+            <svg-icon
15
+            class='icon_wai'
16
+              slot="icon"
17
+              icon-class="NotStarted"
18
+              v-if="stepActive < index"
19
+            />
20
+            <svg-icon
21
+             class='icon_wai'
22
+              slot="icon"
23
+              icon-class="current"
24
+              v-if="stepActive == index"
25
+            />
26
+            <svg-icon
27
+             class='icon_wai'
28
+              slot="icon"
29
+              icon-class="finished"
30
+              v-if="stepActive > index"
31
+            />
32
+
33
+            <!-- <template>
34
+              <i
35
+                slot="icon"
36
+                class="iconfont iconNotStarted"
37
+                v-if="stepActive < index"
38
+              />
39
+              <i
40
+                slot="icon"
41
+                class="iconfont iconcurrent"
42
+                v-if="stepActive == index"
43
+              />
44
+              <i
45
+                slot="icon"
46
+                class="iconfont iconfinished"
47
+                v-if="stepActive > index"
48
+              />
49
+            </template> -->
50
+          </el-step>
51
+        </el-steps>
52
+      </div>
53
+
54
+      <div id="step1">
55
+        <el-table
56
+          border
57
+          stripe
58
+          highlight-current-row
59
+          :data="tableData"
60
+          :span-method="arraySpanMethod"
61
+        >
62
+          <el-table-column
63
+            label="序号"
64
+            prop="step"
65
+            align="center"
66
+            width="100px"
67
+          >
68
+            <template slot-scope="scope">
69
+              <div
70
+                v-if="
71
+                  scope.row.hasOwnProperty('process') &&
72
+                  scope.row.process.length != 0
73
+                "
74
+                style="height: 400px"
75
+              >
76
+                <div class="tf_title">
77
+                  <i class="iconfont iconshu"></i>流程(熏蒸管理审批)
78
+                </div>
79
+                <el-steps direction="vertical" :active="1">
80
+                  <el-step
81
+                    v-for="(item, index) in scope.row.process"
82
+                    :key="index"
83
+                    icon="el-icon-edit"
84
+                  >
85
+                    <template>
86
+                      <div
87
+                        slot="title"
88
+                        class="stepTitle"
89
+                        style="display: flex; justify-content: space-between"
90
+                      >
91
+                        <div class="stepTitleFont">
92
+                          {{ item.title }}
93
+                        </div>
94
+
95
+                        <div style="width: 200px">
96
+                          <div
97
+                            :class="{
98
+                              active:
99
+                                (item.auditState == null &&
100
+                                  processActive >= index) ||
101
+                                item.auditState == 1,
102
+                              noActive: item.auditState == 2,
103
+                            }"
104
+                          >
105
+                            {{ perList[item.content] }}
106
+                          </div>
107
+                          <div v-if="item.auditState == 0">待审批</div>
108
+                          <div v-if="item.auditState == 1">审批通过</div>
109
+                          <div v-if="item.auditState == 2">审批不通过</div>
110
+                          <div class="stepTitleFont">{{ item.auditTime }}</div>
111
+
112
+                          <div style="width: 200px; display: flex">
113
+                            <!-- <el-button
114
+                              type="danger"
115
+                              size="mini"
116
+                              v-if="
117
+                                item.content == userInfo.uid &&
118
+                                item.auditState == 0
119
+                              "
120
+                              @click="noAgree(item)"
121
+                              >审批不通过</el-button
122
+                            >
123
+                            <el-button
124
+                              type="success"
125
+                              size="mini"
126
+                              v-if="
127
+                                item.content == userInfo.uid &&
128
+                                item.auditState == 0
129
+                              "
130
+                              @click="agree(item)"
131
+                              >审批通过</el-button
132
+                            > -->
133
+                          </div>
134
+                        </div>
135
+                      </div>
136
+                    </template>
137
+                    <template>
138
+                      <i
139
+                        slot="icon"
140
+                        class="iconfont iconstep_current"
141
+                        v-if="item.auditState != 2 && processActive <= index"
142
+                      >
143
+                      </i>
144
+                      <i
145
+                        slot="icon"
146
+                        style="color: red"
147
+                        class="iconfont iconstep_err"
148
+                        v-if="item.auditState == 2"
149
+                      ></i>
150
+                      <i
151
+                        slot="icon"
152
+                        style="color: green"
153
+                        class="iconfont iconstep_complete"
154
+                        v-if="
155
+                          (processActive == index && item.auditState == 4) ||
156
+                          processActive > index
157
+                        "
158
+                      ></i>
159
+                    </template>
160
+                  </el-step>
161
+                </el-steps>
162
+              </div>
163
+              <div v-else>{{ scope.row.step }}</div>
164
+            </template>
165
+          </el-table-column>
166
+          <el-table-column prop="operationTime" label="时间" align="center">
167
+          </el-table-column>
168
+
169
+          <el-table-column prop="title" label="工作项" align="center" />
170
+          <el-table-column prop="details" label="选项" align="center">
171
+            <template slot-scope="scope">
172
+              <el-radio-group
173
+                v-model="scope.row.subData"
174
+                @change="radioChange(scope.row)"
175
+              >
176
+                <el-radio :label="0" :disabled="pageType == 3 || disabled">{{
177
+                  scope.row.details.split(",")[0]
178
+                }}</el-radio>
179
+                <el-radio :label="1" :disabled="pageType == 3 || disabled">{{
180
+                  scope.row.details.split(",")[1]
181
+                }}</el-radio>
182
+              </el-radio-group>
183
+            </template>
184
+          </el-table-column>
185
+        </el-table>
186
+
187
+        <div class="btns">
188
+          <el-button  type="cancel"  @click="goBack()"
189
+            >返回</el-button
190
+          >
191
+          <el-button class="saveBtn" v-show="isShow" type="savebtn"  @click="save()" :loading="loading">{{
192
+            this.button
193
+          }}</el-button>
194
+        </div>
195
+      </div>
196
+      </div>
197
+    </div>
198
+  </div>
199
+</template>
200
+<script>
201
+//时间格式的转化
202
+import { getNowFormatDate } from "@/utils"
203
+import { getUser } from "@/utils/auth"
204
+import {
205
+  addList,
206
+  getAddList,
207
+  getProcessList,
208
+  userList,
209
+  checkList,
210
+  updateList,
211
+} from "@/api/reservesManagement/mechanicalVentilation"
212
+
213
+import { pSelect } from "@/api/system/userManagement/approver"
214
+export default {
215
+  name: "AddMeVentilation",
216
+
217
+  data() {
218
+    return {
219
+      //进度条
220
+      loading:false,
221
+      isShow: true,
222
+      //初始化空对象
223
+      obj: {},
224
+      pageType: 0,
225
+
226
+      //流程id
227
+      processId: "",
228
+      //当前登录人信息
229
+      userInfo: {},
230
+      //仓房id
231
+      houseId: null,
232
+      //仓库id
233
+      depotId: null,
234
+      perList: {},
235
+      //人员列表
236
+      approverSelect: [],
237
+      //初始化当前登录人
238
+      loginPeople: "",
239
+      index: null,
240
+      //状态  3=进行中
241
+      auditState: 3,
242
+      //当前流程索引值
243
+      ongongstep: null,
244
+      //申请人
245
+      applyPeople: null,
246
+
247
+      //审批人id
248
+      //toPeople:null,
249
+      //提交人
250
+      fromPeople: null,
251
+      //主流程id
252
+      mainId: null,
253
+      //初始化流程高亮显示
254
+      processActive: 0,
255
+      //初始化radio是否禁用
256
+      disabled: false,
257
+      //初始化按钮的内容为空
258
+      button: "",
259
+      //初始化表格数据
260
+      tableData: [],
261
+      //初始化点击的步骤
262
+      step: 0,
263
+      //初始化步骤高亮显示到第几步
264
+      stepActive: 0,
265
+      //步骤1
266
+      totalData: [],
267
+
268
+      //审批流程
269
+      process: [],
270
+      //流程选项
271
+
272
+      subList: [],
273
+    }
274
+  },
275
+  methods: {
276
+    //合并列或行
277
+    arraySpanMethod({ row, column, rowIndex, columnIndex }) {
278
+      if (this.step != 1) {
279
+        return
280
+      }
281
+      if (rowIndex === 1) {
282
+        if (columnIndex === 0) {
283
+          return [1, 4]
284
+        }
285
+      }
286
+    },
287
+
288
+    // 用户字典列表
289
+    getUserList() {
290
+      // var params = {
291
+      //   depotId: this.depotId,
292
+      // }
293
+      userList().then((res) => {
294
+        if (res.code == 200) {
295
+          console.log(res, "用户列表。。。。。")
296
+          this.perList = res.data
297
+        }
298
+      })
299
+    },
300
+
301
+    //获取流程数据
302
+    processList() {
303
+      var type = "tf"
304
+      var userId = this.userInfo.uid
305
+      var depotId = this.userInfo.depotId
306
+      getProcessList(type, userId, depotId).then((res) => {
307
+        if (res.code == 200) {
308
+          for (let i = 0; i < res.data.length - 1; i++) {
309
+            var ele = res.data[i]
310
+            if (ele.auditState != null) {
311
+              this.processActive = i
312
+            }
313
+            console.log(ele, "ele.....")
314
+
315
+            this.process.push(ele)
316
+          }
317
+          // this.process[0].uName = this.userInfo.uname;
318
+          console.log(this.process, "this.process...")
319
+
320
+          if (this.process[0].content == 0) {
321
+            this.process[0].content = this.userInfo.uid
322
+            console.log(this.process[0].content, "this.process[0].content....")
323
+          }
324
+
325
+          //申请人
326
+          this.applyPeople = this.process[0].content
327
+          //审批人
328
+          // this.toPeople=this.process[1].content;
329
+          //提交人
330
+          this.fromPeople = this.process[0].content
331
+        }
332
+      })
333
+    },
334
+
335
+    //初始化应该显示第几步的表格、
336
+    tableShow() {
337
+      if (this.stepActive == 0) {
338
+        this.tableData = this.totalData[0].list
339
+        // this.subList = this.tableData
340
+        //主流程ID
341
+        this.mainId = this.totalData[0].step.id
342
+      } else if (this.stepActive == 1) {
343
+        this.tableData = this.totalData[1].list
344
+      } else if (this.stepActive == 2) {
345
+        this.tableData = this.totalData[2].list
346
+      } else if (this.stepActive == 3) {
347
+        this.tableData = this.totalData[3].list
348
+      }
349
+      // this.tableData = this.totalData[this.stepActive].list
350
+    },
351
+    //radio选项改变是
352
+    radioChange(row) {
353
+      console.log(getNowFormatDate())
354
+      row.operationTime = getNowFormatDate()
355
+      this.changeBtn(this.tableData)
356
+    },
357
+
358
+    changeBtn(arr) {
359
+      console.log(arr, "arrr")
360
+      //完成标记
361
+      var finish = true
362
+      for (var i = 0; i < arr.length; i++) {
363
+        if (arr[i].process == null && arr[i].subData == null) {
364
+          finish = false
365
+          break
366
+        }
367
+      }
368
+
369
+      if (finish) {
370
+        if (this.stepActive == 0) {
371
+          this.button = "保存并提交"
372
+        } else if (this.stepActive != 3 || this.step != 4) {
373
+          this.button = "保存"
374
+        } else {
375
+          this.button = "完成"
376
+        }
377
+      } else {
378
+        if (this.step == 1) {
379
+          this.button = "保存并提交"
380
+        } else {
381
+          this.button = "暂存"
382
+        }
383
+      }
384
+    },
385
+    //点击每步时
386
+    stepClick(index) {
387
+      //this.step = index + 1
388
+      console.log(this.step, this.stepActive + 1)
389
+      if (index > this.stepActive) {
390
+        return
391
+      }
392
+      this.step = index + 1
393
+
394
+      if (this.pageType == 2) {
395
+        this.isShow = true
396
+      } else {
397
+        this.isShow = false
398
+      }
399
+
400
+      console.log("step:" + this.step);
401
+
402
+      if (this.step == 1) {
403
+        this.tableData = this.totalData[0].list
404
+
405
+        this.button = "保存并提交"
406
+        //2修改  3查看
407
+
408
+        // if (this.pageType == 2||this.pageType ==3) {
409
+        //   //保存按钮隐藏
410
+        //   this.isShow = false
411
+        //   //  this.disabled=true
412
+        //  console.log(this.disabled,"this.disabled...")
413
+
414
+        // }else{
415
+        //    this.isShow = true
416
+        // }
417
+
418
+        // if(this.pageType !=3){
419
+        //   this.disabled=false
420
+        // }else{
421
+        //   this.disabled = true
422
+        // }
423
+        if (this.pageType == 1) {
424
+          this.disabled = false
425
+          this.isShow = true
426
+        } else if (this.pageType == 2) {
427
+          this.disabled = true;
428
+          this.isShow = false
429
+        } else {
430
+          this.disabled = true
431
+          this.isShow = false
432
+        }
433
+      } else if (this.step == 2) {
434
+        // this.isShow = true
435
+        this.tableData = this.totalData[1].list
436
+        console.log(this.tableData, "第二步")
437
+        this.button = "暂存"
438
+        this.disabled = false
439
+      } else if (this.step == 3) {
440
+        // this.isShow = true
441
+        this.tableData = this.totalData[2].list
442
+        this.button = "暂存"
443
+        this.disabled = false
444
+      } else if (this.step == 4) {
445
+        // this.isShow = true
446
+        this.tableData = this.totalData[3].list
447
+        this.button = "暂存"
448
+        this.disabled = false
449
+      }
450
+      console.log(this.tableData, "???")
451
+      this.changeBtn(this.tableData)
452
+    },
453
+
454
+    //点击返回按钮
455
+    goBack() {
456
+      this.$router.push({ path: "/reservesManagement/mechanicalVentilation" })
457
+    },
458
+    //新增时初始化页面
459
+    processFirst() {
460
+      var type = "tf"
461
+      getAddList(type)
462
+        .then((res) => {
463
+          if (res.code == 200) {
464
+            this.totalData = res.data
465
+
466
+            this.totalData[0].list.splice(1, 0, {
467
+              details: "是,否",
468
+              process: this.process,
469
+            })
470
+
471
+            // this.$set(this.totalData[0].list, "process", this.process)
472
+            this.main_id = this.totalData[0].step.id
473
+            console.log(this.totalData, "this.totalData..")
474
+            this.tableShow()
475
+          }
476
+        })
477
+        .catch((err) => {
478
+          console.log(err)
479
+        })
480
+    },
481
+
482
+    //流程新增
483
+    tfAdd() {
484
+      this.loading=true;
485
+      var data = {
486
+        //流程类型
487
+        type: "tf",
488
+        //主流程id
489
+        mainId: this.mainId,
490
+        //主流程索引
491
+        ongoingStep: this.stepActive,
492
+
493
+        subList: this.subList,
494
+        //仓房id
495
+        houseId: this.$store.state.houseId,
496
+        //库id
497
+        depotId: this.$store.state.depotId,
498
+        //发起人
499
+        fromPeople: this.fromPeople,
500
+        //申请人
501
+        applyPeople: this.applyPeople,
502
+        //审批人
503
+        toPeople: this.toPeople,
504
+        //申请时间
505
+        applyTime: getNowFormatDate(),
506
+      }
507
+      console.log(data, "新增数据。。。")
508
+      addList(data)
509
+        .then((res) => {
510
+          console.log(res.data)
511
+          if (res.code == 200) {
512
+            this.loading=true;
513
+            this.$router.push({
514
+              path: "/reservesManagement/mechanicalVentilation",
515
+            })
516
+          }
517
+        })
518
+        .catch((err) => {
519
+          console.log(err)
520
+        })
521
+    },
522
+
523
+    //点击保存并提交按钮时
524
+    save() {
525
+      console.log(this.tableData,"this.tableData...>>>>>")
526
+      if( this.totalData[0].list[0].subData == 1){
527
+         this.$message("只有选择是才能发起申请");
528
+        return;
529
+      }
530
+      this.tableData.forEach((ele) => {
531
+        var obj = {}
532
+        console.log(ele)
533
+        obj.subData = ele.subData
534
+        obj.subId = ele.id
535
+        obj.mainId = ele.zid
536
+        obj.operationTime = ele.operationTime
537
+        console.log(obj, "obj.....")
538
+        if (obj.subData != null) {
539
+          this.subList.push(obj)
540
+        }
541
+      })
542
+      console.log(this.subList, "??????")
543
+
544
+      if (this.button == "保存并提交") {
545
+        console.log(this.totalData, "......")
546
+        console.log(this.process, "process....s")
547
+        if (this.totalData[0].list[0].subData == null) {
548
+          this.$message("请先选择选项");
549
+          
550
+         
551
+          return;
552
+           
553
+        }
554
+         
555
+        //判断是否选择了审批人
556
+        var flag = true
557
+        this.process.forEach((item) => {
558
+          if (item.content == null) {
559
+            this.$message("请先选择审批人")
560
+            flag = false
561
+            return
562
+          }
563
+        })
564
+
565
+        if (flag) {
566
+          // if(this.totalData[0].list[0].subData == 1){
567
+            
568
+          //    this.$message("只有选择是才能发起申请");
569
+            
570
+          //    return;
571
+          // }
572
+          this.tfAdd()
573
+         
574
+        
575
+        }
576
+      } else {
577
+        //this.getUpdateList()
578
+        if (this.button == "暂存") {
579
+          this.auditState = 3
580
+          this.ongoingStep = this.stepActive
581
+          this.getUpdateList()
582
+        } else if (this.button == "保存" || this.button == "完成") {
583
+          console.log("保存。。")
584
+          if (this.stepActive + 1 == this.step) {
585
+            this.stepActive = this.stepActive + 1
586
+          }
587
+          if (this.button == "保存") {
588
+            this.auditState = 3
589
+          } else {
590
+            this.auditState = 4
591
+          }
592
+
593
+          // if (this.stepActive < this.tableData.length - 1) {
594
+          //   this.auditState = 3
595
+          //   this.stepActive = this.stepActive + 1
596
+          // } else {
597
+          //   this.auditState = 4
598
+          //   this.stepActive = this.stepActive + 1
599
+          // }
600
+
601
+          this.getUpdateList()
602
+        }
603
+      }
604
+    },
605
+
606
+    //查看接口
607
+    getCheckList() {
608
+      var processId = this.processId
609
+      checkList(processId).then((res) => {
610
+        console.log(res.data, "查看数据")
611
+        if (res.code == 200) {
612
+          this.tableData = res.data.process
613
+          this.totalData = this.tableData
614
+
615
+          for (let i = 0; i < res.data.audit.length - 1; i++) {
616
+            var ele = res.data.audit[i]
617
+            if (ele.auditState != null) {
618
+              this.processActive = i
619
+            }
620
+            this.process.push(ele)
621
+            if (this.process[0].content == 0) {
622
+              this.process[0].content = this.userInfo.uid
623
+            } else {
624
+              this.process[0].content = res.data.audit[0].content
625
+            }
626
+          }
627
+          console.log(this.process, " this.process.....")
628
+          console.log(this.stepActive, "this.stepActive...")
629
+          this.tableData = res.data.process[this.stepActive].list
630
+          console.log(this.tableData, "tableData.......??????")
631
+          this.totalData[0].list.splice(1, 0, {
632
+            details: "是,否",
633
+            process: this.process,
634
+          })
635
+        }
636
+      })
637
+    },
638
+
639
+    //每步新增/修改
640
+    getUpdateList() {
641
+      this.loading=true;
642
+      var data = {
643
+        processId: this.processId,
644
+        type: "tf",
645
+        auditState: this.auditState,
646
+        ongoingStep: this.stepActive,
647
+        subList: this.subList,
648
+      }
649
+      updateList(data).then((res) => {
650
+        if (res.code == 200) {
651
+          this.loading=false;
652
+          this.$router.push({
653
+            path: "/reservesManagement/mechanicalVentilation",
654
+          })
655
+        }
656
+      })
657
+    },
658
+  },
659
+
660
+  mounted() {
661
+    //获取当前缓存的用户信息
662
+    // this.userInfo = JSON.parse(localStorage.getItem("userInfo"))
663
+    // console.log(this.userInfo, "this.userInfo.....")
664
+    this.userInfo = JSON.parse(getUser())
665
+    console.log(this.userInfo, "this.userInfo.....?????")
666
+
667
+    console.log(this.$route.query, "route...")
668
+    this.pageType = this.$route.query.type
669
+    console.log(this.pageType, "pageType......")
670
+    this.step = this.stepActive + 1
671
+    console.log(this.stepActive, "stepActive.....")
672
+
673
+    this.getUserList()
674
+    // this.userInfo = JSON.parse(localStorage.getItem("userInfo"))
675
+    // console.log(this.userInfo, "this.userInfo.....")
676
+
677
+    if (this.$route.query.type == 1) {
678
+      this.isShow = true
679
+      this.disabled = false
680
+      this.processFirst()
681
+      this.processList()
682
+    } else if (this.$route.query.type == 2) {
683
+      this.isShow = true
684
+      this.disabled = false
685
+      this.stepActive = parseInt(this.$route.query.ongoingStep)
686
+      console.log(this.stepActive, "修改this.stepActive....")
687
+      this.processId = this.$route.query.processId
688
+      // this.pageType = this.$route.query.type
689
+      this.step = this.stepActive + 1
690
+
691
+      this.getCheckList()
692
+    } else if (this.$route.query.type == 3) {
693
+      this.isShow = false
694
+      this.disabled = true
695
+      console.log(this.$route.query.processId, "this.$route.query....")
696
+      //返回按钮
697
+      // this.pageType = this.$route.query.type
698
+      this.processId = this.$route.query.processId
699
+      //高亮显示
700
+      this.stepActive = parseInt(this.$route.query.ongoingStep)
701
+      this.step = this.stepActive + 1
702
+      console.log(this.processId, "this.processId...")
703
+      this.getCheckList()
704
+    }
705
+
706
+    if (this.stepActive == 0) {
707
+      this.button = "保存并提交"
708
+    } else {
709
+      this.button = "暂存"
710
+    }
711
+  },
712
+} 
713
+</script>
714
+<style lang="scss" scoped>
715
+.mainContainer {
716
+  background: #fff;
717
+  padding: 10px;
718
+   height: calc(100% - 40px);
719
+ 
720
+  .div_parent{
721
+  height:100%;
722
+  overflow-y:auto ;
723
+  .steps {
724
+    height: 80px;
725
+    margin: 10px 0;
726
+    // line-height:80px;
727
+    .iconfont {
728
+      font-size: 55px;
729
+    }
730
+  }
731
+  #step1,
732
+  #step2,
733
+  #step3,
734
+  #step4,
735
+  #process {
736
+    display: block;
737
+  }
738
+  #process {
739
+    margin-top: 20px;
740
+    padding: 20px;
741
+    background: rgb(235, 233, 233);
742
+    .process_title {
743
+      margin-bottom: 20px;
744
+    }
745
+    .stepTitle {
746
+      display: flex;
747
+      justify-content: space-between;
748
+    }
749
+  }
750
+  .btns {
751
+    text-align: right;
752
+    margin: 20px 10px 0 0;
753
+  }
754
+  // .saveBtn{
755
+  //   width:120px;
756
+  // }
757
+  .active {
758
+    color: #037d41;
759
+  }
760
+  .noActive {
761
+    color: red;
762
+  }
763
+  .stepTitleFont {
764
+    color: black;
765
+  }
766
+  .tf_title {
767
+    margin-bottom: 20px;
768
+    font-weight: 500;
769
+    text-align: left;
770
+    color: #037d41;
771
+    font-size: 18px;
772
+  }
773
+  .el-steps {
774
+  height: 330px !important;
775
+}
776
+
777
+.icon_wai{
778
+  width:3em;
779
+  height:3em;
780
+}
781
+
782
+}
783
+
784
+}
785
+</style>
786
+<style>
787
+.backBtn.is-plain {
788
+  color: #037d41;
789
+  background-color: #fff;
790
+  border-color: #037d41;
791
+}
792
+.el-step__icon.is-text{
793
+  width:50px;
794
+  height:50px;
795
+}
796
+
797
+.el-step.is-horizontal .el-step__line{
798
+  top:21px !important;
799
+}
800
+.el-step__icon.is-text{
801
+  border:none !important;
802
+}
803
+
804
+
805
+</style>

+ 320 - 0
shanXiPlatform/src/views/reservesManagement/fumigationManagement/completed.vue

@@ -0,0 +1,320 @@
1
+<template>
2
+  <div class="global">
3
+    <div class="mainContainer">
4
+      <div class="steps">
5
+        <el-steps :active="stepActive" align-center direction="horizontal">
6
+          <el-step
7
+          
8
+            style="color: black"
9
+            icon="iconfont iconrun-line"
10
+            v-for="(item, index) in tableData"
11
+              :title="item.step.title"
12
+            :key="index"
13
+            @click.native="stepClick(index)"
14
+          >
15
+            <template>
16
+              <i
17
+                slot="icon"
18
+                class="iconfont iconNotStarted"
19
+                v-if="stepActive < index"
20
+              />
21
+              <i
22
+                slot="icon"
23
+                class="iconfont iconcurrent"
24
+                v-if="stepActive == index"
25
+              />
26
+              <i
27
+                slot="icon"
28
+                class="iconfont iconfinished"
29
+                v-if="stepActive > index"
30
+              />
31
+            </template>
32
+          </el-step>
33
+        </el-steps>
34
+      </div>
35
+
36
+      <div id="step1">
37
+        <el-table
38
+          border
39
+          stripe
40
+          highlight-current-row
41
+          :data="totalData"
42
+          :span-method="arraySpanMethod"
43
+        >
44
+          <el-table-column
45
+            align="center"
46
+            label="序号"
47
+            width="100px"
48
+            type="index"
49
+          >
50
+            <template slot-scope="scope">
51
+              <div
52
+                v-if="
53
+                  scope.row.hasOwnProperty('process') &&
54
+                  scope.row.process.length != 0
55
+                "
56
+                style="height: 400px"
57
+              >
58
+                <div class="tf_title">
59
+                  <i class="iconfont iconshu"></i>流程(机械通风审批)
60
+                </div>
61
+                <el-steps direction="vertical" :active="processActive">
62
+                  <el-step
63
+                    v-for="(item, index) in scope.row.process"
64
+                    :key="index"
65
+                    icon="el-icon-edit"
66
+                  >
67
+                    <template>
68
+                      <div slot="title" class="stepTitle">
69
+                        <div class="stepTitleFont">
70
+                          {{ item.title }}
71
+                        </div>
72
+
73
+                        <div style="display: flex; flex-direction: column">
74
+                          <div
75
+                            :class="{
76
+                              active:
77
+                                index == 0 ||
78
+                                (item.auditState != null &&
79
+                                  item.auditState == 1),
80
+                              noActive: item.auditState == 2,
81
+                            }"
82
+                          >
83
+                            {{ perList[item.content] }}
84
+                          </div>
85
+
86
+                          <div v-if="item.auditState == 0">待审批</div>
87
+                          <div
88
+                            v-if="item.auditState == 1"
89
+                            class="stepTitleFont"
90
+                          >
91
+                            审批通过
92
+                          </div>
93
+                          <div v-if="item.auditState == 2">审批不通过</div>
94
+                          <div class="stepTitleFont">{{ item.auditTime }}</div>
95
+                        </div>
96
+                      </div>
97
+                    </template>
98
+                    <template>
99
+                      <i
100
+                        slot="icon"
101
+                        class="iconfont iconstep_current"
102
+                        v-if="
103
+                          index != 0 &&
104
+                          (item.auditState == null || item.auditState == 0)
105
+                        "
106
+                      >
107
+                      </i>
108
+                      <i
109
+                        slot="icon"
110
+                        style="color: red"
111
+                        class="iconfont iconstep_err"
112
+                        v-if="item.auditState == 2"
113
+                      ></i>
114
+                      <i
115
+                        slot="icon"
116
+                        style="color: green"
117
+                        class="iconfont iconstep_complete"
118
+                        v-if="item.auditState == 1 || index == 0"
119
+                      ></i>
120
+                    </template>
121
+                  </el-step>
122
+                </el-steps>
123
+              </div>
124
+
125
+              <div v-else>{{ scope.row.index }}</div>
126
+            </template>
127
+          </el-table-column>
128
+          <el-table-column
129
+            label="时间"
130
+            prop="operationTime"
131
+            align="center"
132
+            width="300px"
133
+          >
134
+          </el-table-column>
135
+
136
+          <el-table-column prop="title" label="工作项" align="center" />
137
+          <el-table-column prop="option" label="选项" align="center">
138
+            <template slot-scope="scope">
139
+              <el-radio-group v-model="scope.row.subData">
140
+                <el-radio :label="0" :disabled="disabled">{{
141
+                  scope.row.details.split(",")[0]
142
+                }}</el-radio>
143
+                <el-radio :label="1" :disabled="disabled">{{
144
+                  scope.row.details.split(",")[1]
145
+                }}</el-radio>
146
+              </el-radio-group>
147
+            </template>
148
+          </el-table-column>
149
+        </el-table>
150
+        <div class="btns">
151
+          <el-button class="backBtn" type="cancel" plain @click="goBack()"
152
+            >返回</el-button
153
+          >
154
+        </div>
155
+      </div>
156
+    </div>
157
+  </div>
158
+</template>
159
+<script>
160
+//时间格式的转化
161
+import { getNowFormatDate } from "@/utils"
162
+import { checkList } from "@/api/reservesManagement/mechanicalVentilation"
163
+import { getUser } from "@/utils/auth"
164
+export default {
165
+  name: "AddMeVentilation",
166
+
167
+  data() {
168
+    return {
169
+      userInfo: {},
170
+      //人员字典数据
171
+      perList: {},
172
+      //流程id
173
+      processId: null,
174
+      //初始化点击的步骤
175
+      step: "",
176
+      //初始化步骤高亮显示到第几步
177
+      stepActive: null,
178
+      //表格数据
179
+      totalData: [],
180
+      tableData: [],
181
+      //审批流程
182
+      process: [],
183
+      disabled: true,
184
+    }
185
+  },
186
+  methods: {
187
+    //查看接口
188
+    getCheckList() {
189
+      var processId = this.processId
190
+      checkList(processId).then((res) => {
191
+        console.log(res, ".......")
192
+        if (res.code == 200) {
193
+          var index = 1
194
+          this.tableData = res.data.process
195
+          this.tableData.forEach((item1) => {
196
+            item1.list.forEach((item) => {
197
+              item.index = index
198
+              this.totalData.push(item)
199
+              index++
200
+            })
201
+          })
202
+          // console.log(this.totalData,"totalData.......")
203
+          for (let i = 0; i < res.data.audit.length - 1; i++) {
204
+            var ele = res.data.audit[i]
205
+            if (ele.auditState != null) {
206
+              this.processActive = i
207
+            }
208
+            this.process.push(ele)
209
+            if (this.process[0].content == 0) {
210
+              this.process[0].content = this.userInfo.uid
211
+            } else {
212
+              this.process[0].content = res.data.audit[0].content
213
+            }
214
+          }
215
+
216
+          // this.totalData[1].process=this.process;
217
+          this.totalData.splice(1, 0, { details: "是,否" })
218
+          this.$set(this.totalData[1], "process", this.process)
219
+          console.log(this.totalData, "totalData.......")
220
+        }
221
+      })
222
+    },
223
+    //合并列或行
224
+    arraySpanMethod({ row, column, rowIndex, columnIndex }) {
225
+      if (rowIndex === 1) {
226
+        if (columnIndex === 0) {
227
+          return [1, 4]
228
+        }
229
+      }
230
+    },
231
+
232
+    //点击返回按钮
233
+    goBack() {
234
+      this.$router.push({ path: "/reservesManagement/mechanicalVentilation" })
235
+    },
236
+  },
237
+  mounted() {
238
+    this.userInfo = JSON.parse(getUser())
239
+    console.log(this.userInfo, "this.userInfo.....?????")
240
+    this.processId = this.$route.query.processId
241
+    console.log(this.processId, "//////")
242
+    this.stepActive = parseInt(this.$route.query.ongoingStep)
243
+    this.getCheckList()
244
+    //获取人员字典数据
245
+    this.perList = JSON.parse(localStorage.getItem("perList"))
246
+  },
247
+}
248
+</script>
249
+<style lang="scss" scoped>
250
+.global {
251
+  height: calc(100vh - 70px - 83px);
252
+  min-height: 500px;
253
+  overflow-y: scroll;
254
+  .mainContainer {
255
+    background: #fff;
256
+    padding: 10px;
257
+    .steps {
258
+      height: 80px;
259
+      margin: 10px 0;
260
+
261
+      .iconfont {
262
+        font-size: 55px;
263
+      }
264
+    }
265
+    #step1,
266
+    #step2,
267
+    #step3,
268
+    #step4,
269
+    #process {
270
+      display: block;
271
+    }
272
+    #process {
273
+      margin-top: 20px;
274
+      padding: 20px;
275
+      background: rgb(235, 233, 233);
276
+      .process_title {
277
+        margin-bottom: 20px;
278
+      }
279
+      .stepTitle {
280
+        display: flex;
281
+        justify-content: space-between;
282
+      }
283
+    }
284
+    .stepTitle {
285
+      display: flex;
286
+      justify-content: space-between;
287
+    }
288
+    .btns {
289
+      text-align: right;
290
+      margin-top: 20px;
291
+    }
292
+    .active {
293
+      color: #037d41;
294
+    }
295
+    .noActive {
296
+      color: red;
297
+    }
298
+    .stepTitleFont {
299
+      color: black;
300
+    }
301
+    .tf_title {
302
+      margin-bottom: 20px;
303
+      font-weight: 500;
304
+      text-align: left;
305
+      color: #037d41;
306
+      font-size: 18px;
307
+    }
308
+  }
309
+}
310
+</style>
311
+<style>
312
+/* .backBtn.is-plain {
313
+  color: #037d41;
314
+  background-color: #fff;
315
+  border-color: #037d41;
316
+} */
317
+.el-steps {
318
+  height: 350px !important;
319
+}
320
+</style>

+ 431 - 0
shanXiPlatform/src/views/reservesManagement/fumigationManagement/index.vue

@@ -0,0 +1,431 @@
1
+<template>
2
+  <div class="global">
3
+    <div class="contentContainer">
4
+      <div class="top">熏蒸管理</div>
5
+      <div class="container">
6
+        <div class="header">
7
+          <el-form :inline="true" :model="query" class="demo-form-inline">
8
+            <!-- <el-form-item label="检测时间">
9
+              <el-date-picker
10
+                v-model="query.startTime"
11
+                type="date"
12
+                placeholder="选择日期"
13
+                format="yyyy 年 MM 月 dd 日"
14
+                value-format="yyyy-MM-dd"
15
+              >
16
+              </el-date-picker>
17
+            </el-form-item>
18
+            <el-form-item>
19
+              <div style="display:inline-block;width:8px;border-top:1px solid #ccc"></div>
20
+            </el-form-item>
21
+          
22
+            <el-form-item label="">
23
+              <el-date-picker
24
+                v-model="query.endTime"
25
+                type="date"
26
+                placeholder="选择日期"
27
+                format="yyyy 年 MM 月 dd 日"
28
+                value-format="yyyy-MM-dd"
29
+              >
30
+              </el-date-picker>
31
+            </el-form-item> -->
32
+            <el-form-item label="检测时间">
33
+              <el-date-picker
34
+                v-model="query.value1"
35
+                type="daterange"
36
+                format="yyyy 年 MM 月 dd 日"
37
+                 value-format="yyyy-MM-dd"
38
+                range-separator="至"
39
+                start-placeholder="开始日期"
40
+                end-placeholder="结束日期"
41
+              >
42
+              </el-date-picker>
43
+            </el-form-item>
44
+            <el-form-item>
45
+              <el-button
46
+                type="info"
47
+                plain
48
+                @click="clear()"
49
+                class="iconfont iconclear"
50
+              >
51
+                清空</el-button
52
+              >
53
+
54
+              <el-button
55
+                type="success"
56
+                icon="el-icon-search"
57
+                plain
58
+                @click="search()"
59
+                >查询</el-button
60
+              >
61
+            </el-form-item>
62
+          </el-form>
63
+          <div>
64
+            <el-button
65
+              v-if="$tools.IsPermission(228)"
66
+              type="success"
67
+              icon="el-icon-circle-plus"
68
+              plain
69
+              @click="add(1)"
70
+              >新增</el-button
71
+            >
72
+          </div>
73
+        </div>
74
+
75
+        <el-table
76
+          border
77
+          stripe
78
+          :data="tfData"
79
+          highlight-current-row
80
+          style="width: 100%"
81
+          :header-cell-style="{ background: '#f8f8f8' }"
82
+        >
83
+          <el-table-column
84
+            :index="indexMethod"
85
+            type="index"
86
+            align="center"
87
+            label="序号"
88
+            width="50px"
89
+          >
90
+          </el-table-column>
91
+
92
+          <el-table-column prop="type" label="类型" align="center">
93
+          </el-table-column>
94
+          <el-table-column prop="applyTime" label="时间" align="center">
95
+          </el-table-column>
96
+          <el-table-column prop="auditState" label="状态" align="center">
97
+            <template slot-scope="scope">
98
+              <div v-if="scope.row.auditState == 0">待审批</div>
99
+              <div v-if="scope.row.auditState == 1">待审批</div>
100
+              <div v-if="scope.row.auditState == 2">审批不通过</div>
101
+              <div v-if="scope.row.auditState == 3">进行中</div>
102
+              <div v-if="scope.row.auditState == 4">已完成</div>
103
+            </template>
104
+          </el-table-column>
105
+
106
+          <el-table-column
107
+            prop="operation"
108
+            label="操作"
109
+            align="center"
110
+            width="300px"
111
+          >
112
+            <template slot-scope="scope">
113
+              <el-button
114
+                v-if="$tools.IsPermission(230)"
115
+                size="mini"
116
+                type="detailbtn"
117
+                @click="handleCheck(3, scope.$index, scope.row)"
118
+                >查看</el-button
119
+              >
120
+
121
+              <el-button
122
+                size="mini"
123
+                type="editbtn"
124
+                @click="handleEdit(2, scope.$index, scope.row)"
125
+                v-if="
126
+                  scope.row.auditState != 0 &&
127
+                  scope.row.auditState != 4 &&
128
+                  scope.row.auditState != 1 &&
129
+                  scope.row.auditState != 2 &&
130
+                  $tools.IsPermission(229)
131
+                "
132
+                >修改</el-button
133
+              >
134
+              <!-- <el-button
135
+                size="mini"
136
+                type="danger"
137
+                plain
138
+                @click="handleDelete(scope.$index, scope.row)"
139
+                >删除</el-button
140
+              > -->
141
+            </template>
142
+          </el-table-column>
143
+        </el-table>
144
+        <el-pagination
145
+          background
146
+          @size-change="sizeChange"
147
+          @current-change="handleCurrentChange"
148
+          :page-count="5"
149
+          :page-sizes="[10, 20, 30, 40]"
150
+          :page-size="pagination.pageSize"
151
+          layout="total, sizes, prev, pager, next, jumper"
152
+          :total="pagination.total"
153
+        ></el-pagination>
154
+      </div>
155
+    </div>
156
+  </div>
157
+</template>
158
+<script>
159
+//引入分页
160
+import Pagination from "@/components/Pagination"
161
+import {
162
+  getList,
163
+  deleteTfList,
164
+} from "@/api/reservesManagement/fumigationManagement"
165
+import { getUser } from "@/utils/auth"
166
+export default {
167
+  components: { Pagination },
168
+  data() {
169
+    return {
170
+      //存储用户信息
171
+      userInfo: {},
172
+      //仓房编号
173
+      houseId: this.$store.state.houseId,
174
+      //库编号
175
+      depotId: this.$store.state.depotId,
176
+      //类型
177
+      type: "tf",
178
+      value: "",
179
+      query: {
180
+        // startTime: "",
181
+        // endTime: "",
182
+        value1:""
183
+      },
184
+      //分页
185
+
186
+      pagination: {
187
+        //当前页数
188
+        curPage: 1,
189
+        //每页显示的条数
190
+        pageSize: 10,
191
+        //总条数
192
+        total: 0,
193
+      },
194
+      // 列表数据
195
+      tfData: [],
196
+    }
197
+  },
198
+  methods: {
199
+    //新增
200
+    add(type) {
201
+      this.$router.push({
202
+        path: "/reservesManagement/fumigationManagement/steps",
203
+        query: {
204
+          type: type,
205
+        },
206
+      })
207
+    },
208
+    //查看
209
+    handleCheck(type, index, row) {
210
+      console.log(row, "row")
211
+
212
+      if (row.auditState == 4) {
213
+        console.log(4444444)
214
+        this.$router.push({
215
+          path: "/reservesManagement/fumigationManagement/completed",
216
+          query: {
217
+            type: type,
218
+            processId: row.processId,
219
+            ongoingStep: row.ongoingStep,
220
+          },
221
+        })
222
+      } else {
223
+        console.log(row.auditState, "row.status....")
224
+        this.$router.push({
225
+          path: "/reservesManagement/fumigationManagement/steps",
226
+          query: {
227
+            type: type,
228
+            processId: row.processId,
229
+            ongoingStep: row.ongoingStep,
230
+          },
231
+        })
232
+      }
233
+    },
234
+
235
+    //修改
236
+    handleEdit(type, index, row) {
237
+      console.log(row, "修改row...")
238
+      this.$router.push({
239
+        path: "/reservesManagement/fumigationManagement/steps",
240
+        query: {
241
+          type: type,
242
+          processId: row.processId,
243
+          ongoingStep: row.ongoingStep,
244
+          auditState: row.auditState,
245
+        },
246
+      })
247
+    },
248
+
249
+    //删除接口
250
+    deleteList() {
251
+      console.log("shancuu")
252
+      this.$confirm("确定删除该项记录?", "提示", {
253
+        confirmButtonText: "确定",
254
+        cancelButtonText: "取消",
255
+        type: "warning",
256
+      }).then(() => {
257
+        console.log(11111)
258
+
259
+        var id = this.id
260
+
261
+        console.log(id, "删除id")
262
+        deleteTfList(id)
263
+          .then((res) => {
264
+            if (res.code == 200) {
265
+              this.tfList()
266
+              this.$message({
267
+                type: "success",
268
+                message: "删除成功!",
269
+              })
270
+            }
271
+          })
272
+          .catch(() => {
273
+            this.$message({
274
+              type: "info",
275
+              message: "已取消删除",
276
+            })
277
+          })
278
+      })
279
+    },
280
+    //删除
281
+    handleDelete(index, row) {
282
+      console.log(row, "row....")
283
+      this.id = row.id
284
+      this.deleteList()
285
+    },
286
+
287
+    //获取列表
288
+    tfList() {
289
+      var condition = {
290
+        houseId: this.houseId,
291
+        depotId: this.depotId,
292
+        type: this.type,
293
+        startTime: this.query.value1[0],
294
+        endTime: this.query.value1[1],
295
+       
296
+      }
297
+      console.log(condition, "condition.....")
298
+      condition = JSON.stringify(condition)
299
+      var data = {
300
+        pageIndex: this.pagination.curPage,
301
+        pageSize: this.pagination.pageSize,
302
+        condition: condition,
303
+      }
304
+      getList(data)
305
+        .then((res) => {
306
+          if (res.code == 200) {
307
+            // this.tfData = res.data.list;
308
+            this.tfData = res.data.records
309
+            this.tfData.forEach((item) => {
310
+              if (item.type == "tf") {
311
+                item.type = "熏蒸管理"
312
+              }
313
+            })
314
+
315
+            this.pagination.pageSize = res.data.size
316
+            this.pagination.total = res.data.total
317
+          }
318
+        })
319
+        .catch((err) => {
320
+          console.log(err)
321
+        })
322
+    },
323
+    //清空
324
+    clear() {
325
+      this.query.value1 = []
326
+      this.tfList()
327
+    },
328
+
329
+    //查询
330
+    search() {
331
+      
332
+      this.tfList()
333
+    },
334
+    //当前页发生变化时
335
+    handleCurrentChange(val) {
336
+      console.log(val, "val...")
337
+      this.pagination.curPage = val
338
+      this.tfList()
339
+    },
340
+
341
+    //页数大小发生变化时
342
+    sizeChange(v) {
343
+      this.pagination.pageSize = v
344
+      this.tfList()
345
+    },
346
+
347
+    /* ----- 格式化表格序号 -----*/
348
+    indexMethod(index) {
349
+      return (
350
+        (this.pagination.curPage - 1) * this.pagination.pageSize + index + 1
351
+      )
352
+    },
353
+  },
354
+
355
+  computed: {
356
+    HouseId() {
357
+      return this.$store.state.houseId
358
+    },
359
+    // DepotId() {
360
+    //   return this.$store.state.depotId
361
+    // },
362
+  },
363
+  watch: {
364
+    HouseId: function (val) {
365
+      // findbyTreeDatac(this.$store.state.depotId).then(res => {
366
+      //   this.treeData = res.data
367
+      // })
368
+      this.houseId = val
369
+      var houseData = JSON.parse(localStorage.getItem("houseData"))
370
+      console.log(houseData, "houseData...")
371
+
372
+      this.depotId = houseData.parentCode
373
+      console.log(this.depotId, "库id")
374
+      this.tfList()
375
+    },
376
+  },
377
+  mounted() {
378
+    console.log(this.$store.state.houseId, ">>>>>>>???????")
379
+
380
+    //获取当前缓存的用户信息
381
+    // this.userInfo = JSON.parse(localStorage.getItem("userInfo"))
382
+    // console.log(this.userInfo, "this.userInfo.....")
383
+    this.userInfo = JSON.parse(getUser())
384
+    console.log(this.userInfo, "this.userInfo.....?????")
385
+    this.tfList()
386
+
387
+    // this.bus.$on("tfList", function() {
388
+    //     this.tfList();
389
+    //   });
390
+  },
391
+}
392
+</script>
393
+<style lang="scss" scoped>
394
+.contentContainer {
395
+  background: #fff;
396
+  .top {
397
+    padding-left: 10px;
398
+    height: 40px;
399
+    line-height: 40px;
400
+    border-bottom: 1px solid #ccc;
401
+    font-weight: 400;
402
+    font-size: 16px;
403
+  }
404
+  .container {
405
+    padding: 10px;
406
+    .header {
407
+      height: 40px;
408
+      line-height: 40px;
409
+      display: flex;
410
+      justify-content: space-between;
411
+      margin-bottom: 20px;
412
+    }
413
+    .el-pagination {
414
+      text-align: right;
415
+      margin-top: 20px;
416
+    }
417
+  }
418
+  .checkBtn.is-plain {
419
+    color: #037d41;
420
+    background-color: #fff;
421
+    border-color: #037d41;
422
+  }
423
+  .checkBtn.is-plain:hover {
424
+    color: #fff !important;
425
+    background-color: #13ce66 !important;
426
+    border: 1px solid #13ce66 !important;
427
+  }
428
+}
429
+</style>
430
+<style>
431
+</style>

+ 805 - 0
shanXiPlatform/src/views/reservesManagement/fumigationManagement/steps.vue

@@ -0,0 +1,805 @@
1
+<template>
2
+  <div class="global">
3
+    <div class="mainContainer">
4
+      <div class="div_parent">
5
+      <div class="steps">
6
+        <el-steps :active="stepActive" align-center direction="horizontal">
7
+          <el-step
8
+            id="el_step"
9
+            :title="item.step.title"
10
+            v-for="(item, index) in totalData"
11
+            :key="index"
12
+            @click.native="stepClick(index)"
13
+          >
14
+            <svg-icon
15
+            class='icon_wai'
16
+              slot="icon"
17
+              icon-class="NotStarted"
18
+              v-if="stepActive < index"
19
+            />
20
+            <svg-icon
21
+             class='icon_wai'
22
+              slot="icon"
23
+              icon-class="current"
24
+              v-if="stepActive == index"
25
+            />
26
+            <svg-icon
27
+             class='icon_wai'
28
+              slot="icon"
29
+              icon-class="finished"
30
+              v-if="stepActive > index"
31
+            />
32
+
33
+            <!-- <template>
34
+              <i
35
+                slot="icon"
36
+                class="iconfont iconNotStarted"
37
+                v-if="stepActive < index"
38
+              />
39
+              <i
40
+                slot="icon"
41
+                class="iconfont iconcurrent"
42
+                v-if="stepActive == index"
43
+              />
44
+              <i
45
+                slot="icon"
46
+                class="iconfont iconfinished"
47
+                v-if="stepActive > index"
48
+              />
49
+            </template> -->
50
+          </el-step>
51
+        </el-steps>
52
+      </div>
53
+
54
+      <div id="step1">
55
+        <el-table
56
+          border
57
+          stripe
58
+          highlight-current-row
59
+          :data="tableData"
60
+          :span-method="arraySpanMethod"
61
+        >
62
+          <el-table-column
63
+            label="序号"
64
+            prop="step"
65
+            align="center"
66
+            width="100px"
67
+          >
68
+            <template slot-scope="scope">
69
+              <div
70
+                v-if="
71
+                  scope.row.hasOwnProperty('process') &&
72
+                  scope.row.process.length != 0
73
+                "
74
+                style="height: 400px"
75
+              >
76
+                <div class="tf_title">
77
+                  <i class="iconfont iconshu"></i>流程(熏蒸管理审批)
78
+                </div>
79
+                <el-steps direction="vertical" :active="1">
80
+                  <el-step
81
+                    v-for="(item, index) in scope.row.process"
82
+                    :key="index"
83
+                    icon="el-icon-edit"
84
+                  >
85
+                    <template>
86
+                      <div
87
+                        slot="title"
88
+                        class="stepTitle"
89
+                        style="display: flex; justify-content: space-between"
90
+                      >
91
+                        <div class="stepTitleFont">
92
+                          {{ item.title }}
93
+                        </div>
94
+
95
+                        <div style="width: 200px">
96
+                          <div
97
+                            :class="{
98
+                              active:
99
+                                (item.auditState == null &&
100
+                                  processActive >= index) ||
101
+                                item.auditState == 1,
102
+                              noActive: item.auditState == 2,
103
+                            }"
104
+                          >
105
+                            {{ perList[item.content] }}
106
+                          </div>
107
+                          <div v-if="item.auditState == 0">待审批</div>
108
+                          <div v-if="item.auditState == 1">审批通过</div>
109
+                          <div v-if="item.auditState == 2">审批不通过</div>
110
+                          <div class="stepTitleFont">{{ item.auditTime }}</div>
111
+
112
+                          <div style="width: 200px; display: flex">
113
+                            <!-- <el-button
114
+                              type="danger"
115
+                              size="mini"
116
+                              v-if="
117
+                                item.content == userInfo.uid &&
118
+                                item.auditState == 0
119
+                              "
120
+                              @click="noAgree(item)"
121
+                              >审批不通过</el-button
122
+                            >
123
+                            <el-button
124
+                              type="success"
125
+                              size="mini"
126
+                              v-if="
127
+                                item.content == userInfo.uid &&
128
+                                item.auditState == 0
129
+                              "
130
+                              @click="agree(item)"
131
+                              >审批通过</el-button
132
+                            > -->
133
+                          </div>
134
+                        </div>
135
+                      </div>
136
+                    </template>
137
+                    <template>
138
+                      <i
139
+                        slot="icon"
140
+                        class="iconfont iconstep_current"
141
+                        v-if="item.auditState != 2 && processActive <= index"
142
+                      >
143
+                      </i>
144
+                      <i
145
+                        slot="icon"
146
+                        style="color: red"
147
+                        class="iconfont iconstep_err"
148
+                        v-if="item.auditState == 2"
149
+                      ></i>
150
+                      <i
151
+                        slot="icon"
152
+                        style="color: green"
153
+                        class="iconfont iconstep_complete"
154
+                        v-if="
155
+                          (processActive == index && item.auditState == 4) ||
156
+                          processActive > index
157
+                        "
158
+                      ></i>
159
+                    </template>
160
+                  </el-step>
161
+                </el-steps>
162
+              </div>
163
+              <div v-else>{{ scope.row.step }}</div>
164
+            </template>
165
+          </el-table-column>
166
+          <el-table-column prop="operationTime" label="时间" align="center">
167
+          </el-table-column>
168
+
169
+          <el-table-column prop="title" label="工作项" align="center" />
170
+          <el-table-column prop="details" label="选项" align="center">
171
+            <template slot-scope="scope">
172
+              <el-radio-group
173
+                v-model="scope.row.subData"
174
+                @change="radioChange(scope.row)"
175
+              >
176
+                <el-radio :label="0" :disabled="pageType == 3 || disabled">{{
177
+                  scope.row.details.split(",")[0]
178
+                }}</el-radio>
179
+                <el-radio :label="1" :disabled="pageType == 3 || disabled">{{
180
+                  scope.row.details.split(",")[1]
181
+                }}</el-radio>
182
+              </el-radio-group>
183
+            </template>
184
+          </el-table-column>
185
+        </el-table>
186
+
187
+        <div class="btns">
188
+          <el-button  type="cancel"  @click="goBack()"
189
+            >返回</el-button
190
+          >
191
+          <el-button class="saveBtn" v-show="isShow" type="savebtn"  @click="save()" :loading="loading">{{
192
+            this.button
193
+          }}</el-button>
194
+        </div>
195
+      </div>
196
+      </div>
197
+    </div>
198
+  </div>
199
+</template>
200
+<script>
201
+//时间格式的转化
202
+import { getNowFormatDate } from "@/utils"
203
+import { getUser } from "@/utils/auth"
204
+import {
205
+  addList,
206
+  getAddList,
207
+  getProcessList,
208
+  userList,
209
+  checkList,
210
+  updateList,
211
+} from "@/api/reservesManagement/fumigationManagement"
212
+
213
+import { pSelect } from "@/api/system/userManagement/approver"
214
+export default {
215
+  name: "AddMeVentilation",
216
+
217
+  data() {
218
+    return {
219
+      //进度条
220
+      loading:false,
221
+      isShow: true,
222
+      //初始化空对象
223
+      obj: {},
224
+      pageType: 0,
225
+
226
+      //流程id
227
+      processId: "",
228
+      //当前登录人信息
229
+      userInfo: {},
230
+      //仓房id
231
+      houseId: null,
232
+      //仓库id
233
+      depotId: null,
234
+      perList: {},
235
+      //人员列表
236
+      approverSelect: [],
237
+      //初始化当前登录人
238
+      loginPeople: "",
239
+      index: null,
240
+      //状态  3=进行中
241
+      auditState: 3,
242
+      //当前流程索引值
243
+      ongongstep: null,
244
+      //申请人
245
+      applyPeople: null,
246
+
247
+      //审批人id
248
+      //toPeople:null,
249
+      //提交人
250
+      fromPeople: null,
251
+      //主流程id
252
+      mainId: null,
253
+      //初始化流程高亮显示
254
+      processActive: 0,
255
+      //初始化radio是否禁用
256
+      disabled: false,
257
+      //初始化按钮的内容为空
258
+      button: "",
259
+      //初始化表格数据
260
+      tableData: [],
261
+      //初始化点击的步骤
262
+      step: 0,
263
+      //初始化步骤高亮显示到第几步
264
+      stepActive: 0,
265
+      //步骤1
266
+      totalData: [],
267
+
268
+      //审批流程
269
+      process: [],
270
+      //流程选项
271
+
272
+      subList: [],
273
+    }
274
+  },
275
+  methods: {
276
+    //合并列或行
277
+    arraySpanMethod({ row, column, rowIndex, columnIndex }) {
278
+      if (this.step != 1) {
279
+        return
280
+      }
281
+      if (rowIndex === 1) {
282
+        if (columnIndex === 0) {
283
+          return [1, 4]
284
+        }
285
+      }
286
+    },
287
+
288
+    // 用户字典列表
289
+    getUserList() {
290
+      // var params = {
291
+      //   depotId: this.depotId,
292
+      // }
293
+      userList().then((res) => {
294
+        if (res.code == 200) {
295
+          console.log(res, "用户列表。。。。。")
296
+          this.perList = res.data
297
+        }
298
+      })
299
+    },
300
+
301
+    //获取流程数据
302
+    processList() {
303
+      var type = "tf"
304
+      var userId = this.userInfo.uid
305
+      var depotId = this.userInfo.depotId
306
+      getProcessList(type, userId, depotId).then((res) => {
307
+        if (res.code == 200) {
308
+          for (let i = 0; i < res.data.length - 1; i++) {
309
+            var ele = res.data[i]
310
+            if (ele.auditState != null) {
311
+              this.processActive = i
312
+            }
313
+            console.log(ele, "ele.....")
314
+
315
+            this.process.push(ele)
316
+          }
317
+          // this.process[0].uName = this.userInfo.uname;
318
+          console.log(this.process, "this.process...")
319
+
320
+          if (this.process[0].content == 0) {
321
+            this.process[0].content = this.userInfo.uid
322
+            console.log(this.process[0].content, "this.process[0].content....")
323
+          }
324
+
325
+          //申请人
326
+          this.applyPeople = this.process[0].content
327
+          //审批人
328
+          // this.toPeople=this.process[1].content;
329
+          //提交人
330
+          this.fromPeople = this.process[0].content
331
+        }
332
+      })
333
+    },
334
+
335
+    //初始化应该显示第几步的表格、
336
+    tableShow() {
337
+      if (this.stepActive == 0) {
338
+        this.tableData = this.totalData[0].list
339
+        // this.subList = this.tableData
340
+        //主流程ID
341
+        this.mainId = this.totalData[0].step.id
342
+      } else if (this.stepActive == 1) {
343
+        this.tableData = this.totalData[1].list
344
+      } else if (this.stepActive == 2) {
345
+        this.tableData = this.totalData[2].list
346
+      } else if (this.stepActive == 3) {
347
+        this.tableData = this.totalData[3].list
348
+      }
349
+      // this.tableData = this.totalData[this.stepActive].list
350
+    },
351
+    //radio选项改变是
352
+    radioChange(row) {
353
+      console.log(getNowFormatDate())
354
+      row.operationTime = getNowFormatDate()
355
+      this.changeBtn(this.tableData)
356
+    },
357
+
358
+    changeBtn(arr) {
359
+      console.log(arr, "arrr")
360
+      //完成标记
361
+      var finish = true
362
+      for (var i = 0; i < arr.length; i++) {
363
+        if (arr[i].process == null && arr[i].subData == null) {
364
+          finish = false
365
+          break
366
+        }
367
+      }
368
+
369
+      if (finish) {
370
+        if (this.stepActive == 0) {
371
+          this.button = "保存并提交"
372
+        } else if (this.stepActive != 3 || this.step != 4) {
373
+          this.button = "保存"
374
+        } else {
375
+          this.button = "完成"
376
+        }
377
+      } else {
378
+        if (this.step == 1) {
379
+          this.button = "保存并提交"
380
+        } else {
381
+          this.button = "暂存"
382
+        }
383
+      }
384
+    },
385
+    //点击每步时
386
+    stepClick(index) {
387
+      //this.step = index + 1
388
+      console.log(this.step, this.stepActive + 1)
389
+      if (index > this.stepActive) {
390
+        return
391
+      }
392
+      this.step = index + 1
393
+
394
+      if (this.pageType == 2) {
395
+        this.isShow = true
396
+      } else {
397
+        this.isShow = false
398
+      }
399
+
400
+      console.log("step:" + this.step);
401
+
402
+      if (this.step == 1) {
403
+        this.tableData = this.totalData[0].list
404
+
405
+        this.button = "保存并提交"
406
+        //2修改  3查看
407
+
408
+        // if (this.pageType == 2||this.pageType ==3) {
409
+        //   //保存按钮隐藏
410
+        //   this.isShow = false
411
+        //   //  this.disabled=true
412
+        //  console.log(this.disabled,"this.disabled...")
413
+
414
+        // }else{
415
+        //    this.isShow = true
416
+        // }
417
+
418
+        // if(this.pageType !=3){
419
+        //   this.disabled=false
420
+        // }else{
421
+        //   this.disabled = true
422
+        // }
423
+        if (this.pageType == 1) {
424
+          this.disabled = false
425
+          this.isShow = true
426
+        } else if (this.pageType == 2) {
427
+          this.disabled = true;
428
+          this.isShow = false
429
+        } else {
430
+          this.disabled = true
431
+          this.isShow = false
432
+        }
433
+      } else if (this.step == 2) {
434
+        // this.isShow = true
435
+        this.tableData = this.totalData[1].list
436
+        console.log(this.tableData, "第二步")
437
+        this.button = "暂存"
438
+        this.disabled = false
439
+      } else if (this.step == 3) {
440
+        // this.isShow = true
441
+        this.tableData = this.totalData[2].list
442
+        this.button = "暂存"
443
+        this.disabled = false
444
+      } else if (this.step == 4) {
445
+        // this.isShow = true
446
+        this.tableData = this.totalData[3].list
447
+        this.button = "暂存"
448
+        this.disabled = false
449
+      }
450
+      console.log(this.tableData, "???")
451
+      this.changeBtn(this.tableData)
452
+    },
453
+
454
+    //点击返回按钮
455
+    goBack() {
456
+      this.$router.push({ path: "/reservesManagement/fumigationManagement" })
457
+    },
458
+    //新增时初始化页面
459
+    processFirst() {
460
+      var type = "tf"
461
+      getAddList(type)
462
+        .then((res) => {
463
+          if (res.code == 200) {
464
+            this.totalData = res.data
465
+
466
+            this.totalData[0].list.splice(1, 0, {
467
+              details: "是,否",
468
+              process: this.process,
469
+            })
470
+
471
+            // this.$set(this.totalData[0].list, "process", this.process)
472
+            this.main_id = this.totalData[0].step.id
473
+            console.log(this.totalData, "this.totalData..")
474
+            this.tableShow()
475
+          }
476
+        })
477
+        .catch((err) => {
478
+          console.log(err)
479
+        })
480
+    },
481
+
482
+    //流程新增
483
+    tfAdd() {
484
+      this.loading=true;
485
+      var data = {
486
+        //流程类型
487
+        type: "tf",
488
+        //主流程id
489
+        mainId: this.mainId,
490
+        //主流程索引
491
+        ongoingStep: this.stepActive,
492
+
493
+        subList: this.subList,
494
+        //仓房id
495
+        houseId: this.$store.state.houseId,
496
+        //库id
497
+        depotId: this.$store.state.depotId,
498
+        //发起人
499
+        fromPeople: this.fromPeople,
500
+        //申请人
501
+        applyPeople: this.applyPeople,
502
+        //审批人
503
+        toPeople: this.toPeople,
504
+        //申请时间
505
+        applyTime: getNowFormatDate(),
506
+      }
507
+      console.log(data, "新增数据。。。")
508
+      addList(data)
509
+        .then((res) => {
510
+          console.log(res.data)
511
+          if (res.code == 200) {
512
+            this.loading=true;
513
+            this.$router.push({
514
+              path: "/reservesManagement/fumigationManagement",
515
+            })
516
+          }
517
+        })
518
+        .catch((err) => {
519
+          console.log(err)
520
+        })
521
+    },
522
+
523
+    //点击保存并提交按钮时
524
+    save() {
525
+      console.log(this.tableData,"this.tableData...>>>>>")
526
+      if( this.totalData[0].list[0].subData == 1){
527
+         this.$message("只有选择是才能发起申请");
528
+        return;
529
+      }
530
+      this.tableData.forEach((ele) => {
531
+        var obj = {}
532
+        console.log(ele)
533
+        obj.subData = ele.subData
534
+        obj.subId = ele.id
535
+        obj.mainId = ele.zid
536
+        obj.operationTime = ele.operationTime
537
+        console.log(obj, "obj.....")
538
+        if (obj.subData != null) {
539
+          this.subList.push(obj)
540
+        }
541
+      })
542
+      console.log(this.subList, "??????")
543
+
544
+      if (this.button == "保存并提交") {
545
+        console.log(this.totalData, "......")
546
+        console.log(this.process, "process....s")
547
+        if (this.totalData[0].list[0].subData == null) {
548
+          this.$message("请先选择选项");
549
+          
550
+         
551
+          return;
552
+           
553
+        }
554
+         
555
+        //判断是否选择了审批人
556
+        var flag = true
557
+        this.process.forEach((item) => {
558
+          if (item.content == null) {
559
+            this.$message("请先选择审批人")
560
+            flag = false
561
+            return
562
+          }
563
+        })
564
+
565
+        if (flag) {
566
+          // if(this.totalData[0].list[0].subData == 1){
567
+            
568
+          //    this.$message("只有选择是才能发起申请");
569
+            
570
+          //    return;
571
+          // }
572
+          this.tfAdd()
573
+         
574
+        
575
+        }
576
+      } else {
577
+        //this.getUpdateList()
578
+        if (this.button == "暂存") {
579
+          this.auditState = 3
580
+          this.ongoingStep = this.stepActive
581
+          this.getUpdateList()
582
+        } else if (this.button == "保存" || this.button == "完成") {
583
+          console.log("保存。。")
584
+          if (this.stepActive + 1 == this.step) {
585
+            this.stepActive = this.stepActive + 1
586
+          }
587
+          if (this.button == "保存") {
588
+            this.auditState = 3
589
+          } else {
590
+            this.auditState = 4
591
+          }
592
+
593
+          // if (this.stepActive < this.tableData.length - 1) {
594
+          //   this.auditState = 3
595
+          //   this.stepActive = this.stepActive + 1
596
+          // } else {
597
+          //   this.auditState = 4
598
+          //   this.stepActive = this.stepActive + 1
599
+          // }
600
+
601
+          this.getUpdateList()
602
+        }
603
+      }
604
+    },
605
+
606
+    //查看接口
607
+    getCheckList() {
608
+      var processId = this.processId
609
+      checkList(processId).then((res) => {
610
+        console.log(res.data, "查看数据")
611
+        if (res.code == 200) {
612
+          this.tableData = res.data.process
613
+          this.totalData = this.tableData
614
+
615
+          for (let i = 0; i < res.data.audit.length - 1; i++) {
616
+            var ele = res.data.audit[i]
617
+            if (ele.auditState != null) {
618
+              this.processActive = i
619
+            }
620
+            this.process.push(ele)
621
+            if (this.process[0].content == 0) {
622
+              this.process[0].content = this.userInfo.uid
623
+            } else {
624
+              this.process[0].content = res.data.audit[0].content
625
+            }
626
+          }
627
+          console.log(this.process, " this.process.....")
628
+          console.log(this.stepActive, "this.stepActive...")
629
+          this.tableData = res.data.process[this.stepActive].list
630
+          console.log(this.tableData, "tableData.......??????")
631
+          this.totalData[0].list.splice(1, 0, {
632
+            details: "是,否",
633
+            process: this.process,
634
+          })
635
+        }
636
+      })
637
+    },
638
+
639
+    //每步新增/修改
640
+    getUpdateList() {
641
+      this.loading=true;
642
+      var data = {
643
+        processId: this.processId,
644
+        type: "tf",
645
+        auditState: this.auditState,
646
+        ongoingStep: this.stepActive,
647
+        subList: this.subList,
648
+      }
649
+      updateList(data).then((res) => {
650
+        if (res.code == 200) {
651
+          this.loading=false;
652
+          this.$router.push({
653
+            path: "/reservesManagement/fumigationManagement",
654
+          })
655
+        }
656
+      })
657
+    },
658
+  },
659
+
660
+  mounted() {
661
+    //获取当前缓存的用户信息
662
+    // this.userInfo = JSON.parse(localStorage.getItem("userInfo"))
663
+    // console.log(this.userInfo, "this.userInfo.....")
664
+    this.userInfo = JSON.parse(getUser())
665
+    console.log(this.userInfo, "this.userInfo.....?????")
666
+
667
+    console.log(this.$route.query, "route...")
668
+    this.pageType = this.$route.query.type
669
+    console.log(this.pageType, "pageType......")
670
+    this.step = this.stepActive + 1
671
+    console.log(this.stepActive, "stepActive.....")
672
+
673
+    this.getUserList()
674
+    // this.userInfo = JSON.parse(localStorage.getItem("userInfo"))
675
+    // console.log(this.userInfo, "this.userInfo.....")
676
+
677
+    if (this.$route.query.type == 1) {
678
+      this.isShow = true
679
+      this.disabled = false
680
+      this.processFirst()
681
+      this.processList()
682
+    } else if (this.$route.query.type == 2) {
683
+      this.isShow = true
684
+      this.disabled = false
685
+      this.stepActive = parseInt(this.$route.query.ongoingStep)
686
+      console.log(this.stepActive, "修改this.stepActive....")
687
+      this.processId = this.$route.query.processId
688
+      // this.pageType = this.$route.query.type
689
+      this.step = this.stepActive + 1
690
+
691
+      this.getCheckList()
692
+    } else if (this.$route.query.type == 3) {
693
+      this.isShow = false
694
+      this.disabled = true
695
+      console.log(this.$route.query.processId, "this.$route.query....")
696
+      //返回按钮
697
+      // this.pageType = this.$route.query.type
698
+      this.processId = this.$route.query.processId
699
+      //高亮显示
700
+      this.stepActive = parseInt(this.$route.query.ongoingStep)
701
+      this.step = this.stepActive + 1
702
+      console.log(this.processId, "this.processId...")
703
+      this.getCheckList()
704
+    }
705
+
706
+    if (this.stepActive == 0) {
707
+      this.button = "保存并提交"
708
+    } else {
709
+      this.button = "暂存"
710
+    }
711
+  },
712
+} 
713
+</script>
714
+<style lang="scss" scoped>
715
+.mainContainer {
716
+  background: #fff;
717
+  padding: 10px;
718
+   height: calc(100% - 40px);
719
+ 
720
+  .div_parent{
721
+  height:100%;
722
+  overflow-y:auto ;
723
+  .steps {
724
+    height: 80px;
725
+    margin: 10px 0;
726
+    // line-height:80px;
727
+    .iconfont {
728
+      font-size: 55px;
729
+    }
730
+  }
731
+  #step1,
732
+  #step2,
733
+  #step3,
734
+  #step4,
735
+  #process {
736
+    display: block;
737
+  }
738
+  #process {
739
+    margin-top: 20px;
740
+    padding: 20px;
741
+    background: rgb(235, 233, 233);
742
+    .process_title {
743
+      margin-bottom: 20px;
744
+    }
745
+    .stepTitle {
746
+      display: flex;
747
+      justify-content: space-between;
748
+    }
749
+  }
750
+  .btns {
751
+    text-align: right;
752
+    margin: 20px 10px 0 0;
753
+  }
754
+  // .saveBtn{
755
+  //   width:120px;
756
+  // }
757
+  .active {
758
+    color: #037d41;
759
+  }
760
+  .noActive {
761
+    color: red;
762
+  }
763
+  .stepTitleFont {
764
+    color: black;
765
+  }
766
+  .tf_title {
767
+    margin-bottom: 20px;
768
+    font-weight: 500;
769
+    text-align: left;
770
+    color: #037d41;
771
+    font-size: 18px;
772
+  }
773
+  .el-steps {
774
+  height: 330px !important;
775
+}
776
+
777
+.icon_wai{
778
+  width:3em;
779
+  height:3em;
780
+}
781
+
782
+}
783
+
784
+}
785
+</style>
786
+<style>
787
+.backBtn.is-plain {
788
+  color: #037d41;
789
+  background-color: #fff;
790
+  border-color: #037d41;
791
+}
792
+.el-step__icon.is-text{
793
+  width:50px;
794
+  height:50px;
795
+}
796
+
797
+.el-step.is-horizontal .el-step__line{
798
+  top:21px !important;
799
+}
800
+.el-step__icon.is-text{
801
+  border:none !important;
802
+}
803
+
804
+
805
+</style>

+ 16 - 7
shanXiPlatform/src/views/systemManagement/earlyWarningManagement/index.vue

@@ -203,6 +203,9 @@ export default {
203 203
           case '1_week':
204 204
               return '周';
205 205
               break;
206
+          case '2_week':
207
+              return '2周';
208
+              break;
206 209
           case '1_month':
207 210
               return '月';
208 211
               break;
@@ -219,17 +222,23 @@ export default {
219 222
     },
220 223
     getWarningTime(row) {
221 224
       switch (row.warningTime) {
222
-          case '3_day':
223
-              return '到期前3天';
225
+          case '160_hour':
226
+              return '到期前6天16个小时';
224 227
               break;
225
-          case '2_day':
226
-              return '到期前2天';
228
+          case '88_hour':
229
+              return '到期前3天16个小时';
227 230
               break;
228
-          case '1_day':
229
-              return '到期前1天';
231
+          case '64_hour':
232
+              return '到期前2天16个小时';
230 233
               break;
234
+          case '16_hour':
235
+              return '到期前16个小时';
236
+              break;   
231 237
           case '10_hour':
232
-              return '到期前10小时';
238
+              return '到期前10个小时';
239
+              break;   
240
+          case '8_hour':
241
+              return '到期前8个小时';
233 242
               break;   
234 243
           case '1_minute':
235 244
               return '到期前1分钟';

+ 13 - 6
shanXiPlatform/src/views/systemManagement/userManagement/approverManagement/index.vue

@@ -75,10 +75,14 @@ export default {
75 75
                     label: "机械通风",
76 76
                     type: "tf"
77 77
                 },
78
-                // {
79
-                //   label: "熏蒸",
80
-                //   type: "xz",
81
-                // },
78
+                {
79
+                    label: "熏蒸计划",
80
+                    type: "xzjh",
81
+                },
82
+                {
83
+                    label: "熏蒸散气",
84
+                    type: "xzsq",
85
+                },
82 86
                 {
83 87
                     label: "药剂采购",
84 88
                     type: "yjcg"
@@ -178,7 +182,8 @@ export default {
178 182
                     title: "熏蒸计划报备与实施",
179 183
                     content: "保管员"
180 184
                 },
181
-
185
+            ],
186
+            fumigation1: [
182 187
                 {
183 188
                     step: "7",
184 189
                     type: "container",
@@ -547,8 +552,10 @@ export default {
547 552
         headChange() {
548 553
             if (this.type == "tf") {
549 554
                 this.tableData = this.meVentilation
550
-            } else if (this.type == "xz") {
555
+            } else if (this.type == "xzjh") {
551 556
                 this.tableData = this.fumigation
557
+            } else if (this.type == "xzsq") {
558
+                this.tableData = this.fumigation1
552 559
             } else if (this.type == "yjcg") {
553 560
                 this.tableData = this.drugPurchase
554 561
             } else if (this.type == "yjly") {