Просмотр исходного кода

Merge branch 'hhl' of SH-Arbitrate/Mediation-Frontend into dev

hhlxayunmei 2 лет назад
Родитель
Сommit
0620ab8a43

+ 9
- 2
src/views/caseManagement/caseList.vue Просмотреть файл

@@ -284,14 +284,21 @@ export default {
284 284
                 }
285 285
                 this.caseStausArr.push(item);
286 286
             });
287
-            if (this.$route.query.caseFlowId) {
287
+            // if (this.$route.query.caseFlowId) {
288
+            //     let querydata = Number(this.$route.query.caseFlowId);
289
+            //     if (querydata > 0) {
290
+            //         this.$set(this.queryParams, 'caseFlowId', querydata)
291
+            //     }
292
+            // }
293
+            // this.getList(this.queryParams);
294
+        });
295
+        if (this.$route.query.caseFlowId) {
288 296
                 let querydata = Number(this.$route.query.caseFlowId);
289 297
                 if (querydata > 0) {
290 298
                     this.$set(this.queryParams, 'caseFlowId', querydata)
291 299
                 }
292 300
             }
293 301
             this.getList(this.queryParams);
294
-        });
295 302
     },
296 303
     methods: {
297 304
         /**所有按钮事件 */

+ 17
- 2
src/views/caseprocessManagement/caseprocessManage.vue Просмотреть файл

@@ -33,6 +33,12 @@
33 33
             <el-table-column label="案件状态" align="center" prop="caseStatusName" :show-overflow-tooltip="true" />
34 34
             <el-table-column label="驳回节点" align="center" prop="backFlowName" :show-overflow-tooltip="true" />
35 35
             <el-table-column label="关联角色" align="center" prop="roleNames" :show-overflow-tooltip="true" />
36
+            <el-table-column label="节点图标" align="center" prop="nodeIcon" :show-overflow-tooltip="true">
37
+                <template slot-scope="scope">
38
+                    <img v-if="scope.row.fileName" class="nodeIcon" :src="iconHead+scope.row.fileName"/>
39
+                    <span v-else>暂无图标</span>
40
+                </template>
41
+            </el-table-column>
36 42
             <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
37 43
                 <template slot-scope="scope">
38 44
                     <el-button size="mini" @click="moveDown(scope.row)" type="text" icon="el-icon-arrow-down"></el-button>
@@ -80,10 +86,14 @@ export default {
80 86
             dataList: [],
81 87
             addvisiable: false,//新增弹窗
82 88
             editData: {},
89
+            iconHead: process.env.VUE_APP_BASE_API
83 90
         };
84 91
     },
85 92
     created() {
86
-        this.getList(this.queryParams)
93
+        this.getList(this.queryParams);
94
+    },
95
+    computed: {
96
+        
87 97
     },
88 98
     methods: {
89 99
         // 删除
@@ -160,4 +170,9 @@ export default {
160 170
 };
161 171
 </script>
162 172
   
163
-<style lang="scss" scoped></style>
173
+<style lang="scss" scoped>
174
+.nodeIcon {
175
+    width: 20%;
176
+    height: 20%;
177
+}
178
+</style>

+ 88
- 4
src/views/caseprocessManagement/components/addNodeprocess.vue Просмотреть файл

@@ -28,6 +28,20 @@
28 28
                 <el-form-item label="权限字符" prop="buttonAuthFlag">
29 29
                     <el-input v-model="ruleForm.buttonAuthFlag" placeholder="请输入"></el-input>
30 30
                 </el-form-item>
31
+                <el-form-item label="节点图标" prop="nodeIcon">
32
+                    <el-upload
33
+                      class="avatar-uploader"
34
+                      :action="uploadImgUrl"
35
+                      :show-file-list="false"
36
+                      :headers="headers"
37
+                      :data="filedata" 
38
+                      :on-success="handleAvatarSuccess"
39
+                      :before-upload="beforeAvatarUpload">
40
+                      <img v-if="imageUrl" :src="imgSvgUrl" class="avatar">
41
+                      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
42
+                      <div slot="tip" class="el-upload__tip">只能上传SVG图片</div>
43
+                    </el-upload>
44
+                </el-form-item>
31 45
             </el-form>
32 46
             <div slot="footer" class="dialog-footer">
33 47
                 <el-button @click="cancel" class="endbutton"><span>取 消</span></el-button>
@@ -39,6 +53,7 @@
39 53
 <script>
40 54
 import { queryCaseFlowInfo, saveCaseFlow } from "@/api/caseprocessManagement/caseprocessManagement.js";
41 55
 import { listRole } from "@/api/system/role";
56
+import { getToken } from "@/utils/auth";
42 57
 export default {
43 58
     props: ["addvisiable", "editData", "queryParams"],
44 59
     dicts: ["case_flow_node"],
@@ -49,7 +64,9 @@ export default {
49 64
             backflowArr: [],//驳回节点
50 65
             roleArr: [],//关联角色
51 66
             isImg: false,
52
-            filedata: {},
67
+            filedata: {
68
+                annexType: 11,
69
+            },
53 70
             flagBtn: false,
54 71
             ruleForm: {},
55 72
             rules: {
@@ -67,16 +84,38 @@ export default {
67 84
                 ]
68 85
             },
69 86
             dealvalue: [],
87
+            imageUrl: '',
88
+            uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
89
+            headers: {
90
+                Authorization: "Bearer " + getToken(),
91
+            },
92
+            fileName: '',
93
+            imgSvgUrl: ''
70 94
         };
71 95
     },
72 96
     watch: {
73 97
         addvisiable(val) {
74 98
             if (val) {
75 99
                 this.ruleForm = this.editData;
100
+                console.log(this.ruleForm,'this.ruleForm');
76 101
                 this.getRoles();
77
-                this.getbackflowArr()
102
+                this.getbackflowArr();
103
+                if (this.ruleForm && this.ruleForm.fileName) {
104
+                    this.imgSvgUrl = process.env.VUE_APP_BASE_API + this.ruleForm.fileName;
105
+                } else {
106
+                    this.imgSvgUrl = ''
107
+                }
78 108
             }
109
+        },
110
+        fileName: {
111
+            handler(val) {
112
+                if (val) {
113
+                    this.imgSvgUrl = this.imageUrl
114
+                }
115
+            },
116
+            deep: true
79 117
         }
118
+
80 119
     },
81 120
     created() {
82 121
 
@@ -119,6 +158,22 @@ export default {
119 158
         cancel() {
120 159
             this.$emit("cancelAdd");
121 160
         },
161
+        // 图标上传
162
+        handleAvatarSuccess(res, file) {
163
+        this.fileName = ''
164
+        console.log(file.response.fileName,'上传成功的file');
165
+            this.imageUrl = URL.createObjectURL(file.raw);
166
+            this.fileName = file.response.fileName
167
+        console.log(this.imageUrl,'上传成功的this.imageUrl');
168
+        },
169
+        beforeAvatarUpload(file) {
170
+        console.log(file,'file');
171
+            const isSvg = file.type === 'image/svg+xml';
172
+            if (!isSvg) {
173
+            this.$message.error('上传图片只能是 SVG 格式!');
174
+            }
175
+            return isSvg;
176
+        },
122 177
         // 提交
123 178
         submitForm() {
124 179
             this.$refs['ruleForm'].validate((valid) => {
@@ -141,7 +196,8 @@ export default {
141 196
                             backFlowId: this.ruleForm.backFlowId,
142 197
                             roleIds: this.ruleForm.roleIds,
143 198
                             sort: this.ruleForm.sort,
144
-                            buttonAuthFlag: this.ruleForm.buttonAuthFlag
199
+                            buttonAuthFlag: this.ruleForm.buttonAuthFlag,
200
+                            fileName: this.fileName
145 201
                         }
146 202
                     } else {
147 203
                         let nodevalue = this.dict.type.case_flow_node;
@@ -158,7 +214,8 @@ export default {
158 214
                             caseStatusName: this.ruleForm.caseStatusName,
159 215
                             backFlowId: this.ruleForm.backFlowId,
160 216
                             roleIds: this.ruleForm.roleIds,
161
-                            buttonAuthFlag: this.ruleForm.buttonAuthFlag
217
+                            buttonAuthFlag: this.ruleForm.buttonAuthFlag,
218
+                            fileName: this.fileName
162 219
                         }
163 220
                     }
164 221
                     if (params.backFlowId == undefined) {
@@ -181,4 +238,31 @@ export default {
181 238
 ::v-deep .el-select {
182 239
     width: 100%;
183 240
 }
241
+.avatar-uploader .el-upload {
242
+    border: 1px dashed #d9d9d9;
243
+    border-radius: 6px;
244
+    cursor: pointer;
245
+    position: relative;
246
+    overflow: hidden;
247
+  }
248
+//   .avatar-uploader .el-upload:hover {
249
+//     border-color: #409EFF;
250
+//   }
251
+  .avatar-uploader-icon {
252
+    border: 1px dashed #d9d9d9;
253
+    font-size: 28px;
254
+    color: #8c939d;
255
+    width: 100px;
256
+    height: 100px;
257
+    line-height: 100px;
258
+    text-align: center;
259
+  }
260
+  .avatar-uploader-icon:hover {
261
+    border-color: #409EFF;
262
+  }
263
+  .avatar {
264
+    width: 100px;
265
+    height: 100px;
266
+    display: block;
267
+  }
184 268
 </style>

+ 25
- 13
src/views/index.vue Просмотреть файл

@@ -5,12 +5,17 @@
5 5
       <div class="headerMain">我的待办</div>
6 6
     </div>
7 7
     <div class="homeMain">
8
-      <div class="cardList" v-for="(item, index) in pendingTasks" :key="index" @click="pushPage(item.caseFlowId)">
9
-        <div class="badge">{{item.caseCount}}</div>
8
+      <div
9
+        class="cardList"
10
+        v-for="(item, index) in pendingTasks"
11
+        :key="index"
12
+        @click="pushPage(item.caseFlowId)"
13
+      >
14
+        <div class="badge">{{ item.caseCount }}</div>
10 15
         <div class="cardMain">
11
-          <img class="iconImg" src="@/assets/images/daiban.png" alt="" />
16
+          <img class="iconImg" :src="iconHead + item.fileName" alt="" />
12 17
         </div>
13
-        <div class="cardMain">
18
+        <div class="cardMain1">
14 19
           <div class="imgTitle">{{ item.caseStatusName }}</div>
15 20
         </div>
16 21
       </div>
@@ -27,6 +32,7 @@ export default {
27 32
       // 版本号
28 33
       version: "3.8.6",
29 34
       pendingTasks: [], //案件代办状态
35
+      iconHead: process.env.VUE_APP_BASE_API
30 36
     };
31 37
   },
32 38
   created() {
@@ -39,14 +45,17 @@ export default {
39 45
     // 查询代办状态
40 46
     gettodoCount() {
41 47
       todoCount({}).then((res) => {
42
-      this.pendingTasks = res.data.toDoCountList
43
-      console.log(res.data.toDoCountList, "this.pendingTasks");
48
+        this.pendingTasks = res.data.toDoCountList;
49
+        console.log(res.data.toDoCountList, "this.pendingTasks");
44 50
       });
45 51
     },
46 52
     // 点击待办按钮跳转
47 53
     pushPage(status) {
48
-      this.$router.push({ path: '/caseManagement/caseManagement/caseList', query: { caseFlowId: status + '' } })
49
-    }
54
+      this.$router.push({
55
+        path: "/caseManagement/caseManagement/caseList",
56
+        query: { caseFlowId: status + "" },
57
+      });
58
+    },
50 59
   },
51 60
 };
52 61
 </script>
@@ -99,9 +108,9 @@ export default {
99 108
         line-height: 30px;
100 109
         font-size: 18px;
101 110
         font-weight: 500;
102
-        color: #e32a4f;
111
+        color: red;
103 112
         border-radius: 10px 30px 10px 30px;
104
-        background-color: #05baf1;
113
+        background-color: #1296DB;
105 114
         position: absolute;
106 115
         right: 0;
107 116
       }
@@ -110,13 +119,16 @@ export default {
110 119
         width: 100%;
111 120
         display: flex;
112 121
         justify-content: center;
113
-        margin-top: 20px;
114
-
122
+        margin-top: 40px;
115 123
         .iconImg {
116 124
           width: 100px;
117 125
           height: 110px;
118 126
         }
119
-
127
+      }
128
+      .cardMain1 {
129
+        width: 100%;
130
+        display: flex;
131
+        justify-content: center;
120 132
         .imgTitle {
121 133
           font-size: 15px;
122 134
           font-weight: 900;