Bladeren bron

新增项目管理界面

余思翰 1 jaar geleden
bovenliggende
commit
3390a881f4

+ 1
- 1
oa-ui/public/index.html Bestand weergeven

@@ -5,7 +5,7 @@
5 5
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6 6
     <meta name="renderer" content="webkit">
7 7
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
8
-    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
8
+    <link rel="icon" href="<%= BASE_URL %>logo.png">
9 9
     <title><%= webpackConfig.name %></title>
10 10
     <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
11 11
 	  <style>

BIN
oa-ui/public/logo.png Bestand weergeven


BIN
oa-ui/src/assets/logo/logo.png Bestand weergeven


+ 2
- 1
oa-ui/src/assets/styles/variables.scss Bestand weergeven

@@ -9,7 +9,8 @@ $yellow:#FEC171;
9 9
 $panGreen: #30B08F;
10 10
 
11 11
 // 默认菜单主题风格
12
-$base-menu-color:#bfcbd9;
12
+// $base-menu-color:#bfcbd9;
13
+$base-menu-color:#fff;
13 14
 $base-menu-color-active:#f4f4f5;
14 15
 $base-menu-background:#304156;
15 16
 $base-logo-title-color: #ffffff;

+ 2
- 1
oa-ui/src/views/flowable/form/jsTable.vue Bestand weergeven

@@ -68,7 +68,8 @@
68 68
       </tr>
69 69
       <tr>
70 70
         <td class="table-title">入职年月</td>
71
-        <td style="text-align:left;padding-left:10px;">{{ tableForm.entryDate }}</td>
71
+        <td style="text-align:left;padding-left:10px;">{{ tableForm.entryDate != null ?
72
+          tableForm.entryDate.substring(0, 10) : tableForm.entryDate }}</td>
72 73
         <td class="table-title">年龄</td>
73 74
         <td style="text-align:left;padding-left:10px;">{{ tableForm.age }}</td>
74 75
       </tr>

+ 2
- 1
oa-ui/src/views/flowable/form/jyTable.vue Bestand weergeven

@@ -63,7 +63,8 @@
63 63
       </tr>
64 64
       <tr>
65 65
         <td class="table-title">入职年月</td>
66
-        <td style="text-align:left;padding-left:10px;">{{ tableForm.entryDate }}</td>
66
+        <td style="text-align:left;padding-left:10px;">{{ tableForm.entryDate != null ?
67
+          tableForm.entryDate.substring(0, 10) : tableForm.entryDate }}</td>
67 68
         <td class="table-title">年龄</td>
68 69
         <td style="text-align:left;padding-left:10px;">{{ tableForm.age }}</td>
69 70
       </tr>

+ 2
- 1
oa-ui/src/views/flowable/form/scTable.vue Bestand weergeven

@@ -89,7 +89,8 @@
89 89
       </tr>
90 90
       <tr>
91 91
         <td class="table-title">入职年月</td>
92
-        <td style="text-align:left;padding-left:10px;">{{ tableForm.entryDate }}</td>
92
+        <td style="text-align:left;padding-left:10px;">{{ tableForm.entryDate != null ?
93
+          tableForm.entryDate.substring(0, 10) : tableForm.entryDate }}</td>
93 94
         <td class="table-title">年龄</td>
94 95
         <td style="text-align:left;padding-left:10px;">{{ tableForm.age }}</td>
95 96
       </tr>

+ 2
- 1
oa-ui/src/views/flowable/form/xmTable.vue Bestand weergeven

@@ -63,7 +63,8 @@
63 63
       </tr>
64 64
       <tr>
65 65
         <td class="table-title">入职年月</td>
66
-        <td style="text-align:left;padding-left:10px;">{{ tableForm.entryDate }}</td>
66
+        <td style="text-align:left;padding-left:10px;">{{ tableForm.entryDate != null ?
67
+          tableForm.entryDate.substring(0, 10) : tableForm.entryDate }}</td>
67 68
         <td class="table-title">年龄</td>
68 69
         <td style="text-align:left;padding-left:10px;">{{ tableForm.age }}</td>
69 70
       </tr>

+ 2
- 1
oa-ui/src/views/flowable/form/zhTable.vue Bestand weergeven

@@ -63,7 +63,8 @@
63 63
       </tr>
64 64
       <tr>
65 65
         <td class="table-title">入职年月</td>
66
-        <td style="text-align:left;padding-left:10px;">{{ tableForm.entryDate }}</td>
66
+        <td style="text-align:left;padding-left:10px;">{{ tableForm.entryDate != null ?
67
+          tableForm.entryDate.substring(0, 10) : tableForm.entryDate }}</td>
67 68
         <td class="table-title">年龄</td>
68 69
         <td style="text-align:left;padding-left:10px;">{{ tableForm.age }}</td>
69 70
       </tr>

+ 8
- 6
oa-ui/src/views/flowable/task/todo/detail/index.vue Bestand weergeven

@@ -90,6 +90,9 @@
90 90
             <el-input type="textarea" v-model="taskForm.comment" placeholder="请输入处理意见" />
91 91
           </el-form-item> -->
92 92
         </el-form>
93
+        <el-row v-if="!checkSendUser" style="text-align: center;">
94
+          <h2>已达到最后节点,点击确定后审核完成</h2>
95
+        </el-row>
93 96
         <span slot="footer" class="dialog-footer">
94 97
           <el-button @click="completeOpen = false">取 消</el-button>
95 98
           <el-button type="primary" @click="taskComplete">确 定</el-button>
@@ -346,10 +349,10 @@ export default {
346 349
     },
347 350
     // 获取需要处理的表单表格信息
348 351
     getAssessByAssessId(formId) {
349
-      
352
+
350 353
       getAssess(formId).then(res => {
351 354
         let data = res.data;
352
-        
355
+
353 356
         for (let d in data) {
354 357
           if (d.includes('role')) {
355 358
             if (data[d] != "" && data[d] != undefined && data[d] != null)
@@ -370,7 +373,7 @@ export default {
370 373
       // this.completeOpen = true;
371 374
       // this.completeTitle = "流程审批";
372 375
       // this.submitForm(null);
373
-      
376
+
374 377
       let formData = new FormData();
375 378
       this.tableForm.formId = this.tableForm.assessId;
376 379
       let form = JSON.stringify(this.tableForm);
@@ -420,7 +423,6 @@ export default {
420 423
     },
421 424
     /** 返回页面 */
422 425
     goBack() {
423
-      console.log(this.tableForm);
424 426
       // 关闭当前标签页并返回上个页面
425 427
       const obj = { path: "/task/todo", query: { t: Date.now() } };
426 428
       this.$tab.closeOpenPage(obj);
@@ -487,12 +489,12 @@ export default {
487 489
     /** 申请流程表单数据提交 */
488 490
     submitForm(formData, assessId) {
489 491
       listAssess({ assessId }).then(result => {
490
-        
492
+
491 493
         let list = result;
492 494
         if (list.total != 0) {
493 495
           modifyAssess(formData).then(res => {
494 496
           });
495
-        }else{
497
+        } else {
496 498
           submitAssess(formData)
497 499
         }
498 500
       })

+ 59
- 13
oa-ui/src/views/index.vue Bestand weergeven

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-01-03 09:23:11
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-02-27 10:33:41
5
+ * @LastEditTime: 2024-02-27 14:12:01
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container home">
@@ -12,7 +12,7 @@
12 12
         <el-row align="bottom" :gutter="40">
13 13
           <el-col :span="4">
14 14
             <h3 style="font-weight: bold;text-align: right;font-size: 18px;"> {{ user.nickName }},您好! </h3>
15
-            <h2 style="text-align: right;font-size: 24px;font-weight: bold;"> {{ 10 }}℃ </h2>
15
+            <!-- <h2 style="text-align: right;font-size: 24px;font-weight: bold;"> {{ 10 }}℃ </h2> -->
16 16
             <el-row style="font-size:12px;text-align: right;"> {{ "2024-01-22" }} {{ "星期一" }} </el-row>
17 17
           </el-col>
18 18
           <el-col :span="4" style="text-align: center;">
@@ -20,7 +20,7 @@
20 20
           </el-col>
21 21
           <el-col :span="16">
22 22
             <el-row style="font-size: 20px;font-weight: bold;margin-bottom: 20px;">
23
-              {{ user.nickName }} <el-tag type="warning">{{ "高级工程师" }}</el-tag>
23
+              {{ user.nickName }} <el-tag type="warning">{{ titles }}</el-tag>
24 24
             </el-row>
25 25
             <el-row>
26 26
               <el-col :span="4">
@@ -28,7 +28,7 @@
28 28
                   入职时间
29 29
                 </el-row>
30 30
                 <el-row class="userinfo-data">
31
-                  {{ user.entryDate }}
31
+                  {{ user.entryDate != null ? user.entryDate.substring(0, 7) : user.entryDate }}
32 32
                 </el-row>
33 33
               </el-col>
34 34
               <el-col :span="4">
@@ -44,7 +44,7 @@
44 44
                   所在部门
45 45
                 </el-row>
46 46
                 <el-row class="userinfo-data">
47
-                  {{ }}
47
+                  {{ user.dept ? user.dept.deptName : '' }}
48 48
                 </el-row>
49 49
               </el-col>
50 50
               <el-col :span="4">
@@ -92,10 +92,14 @@
92 92
             <span class="title-text">我的待办</span>
93 93
           </div>
94 94
           <el-row>
95
-            <el-col :span="6" class="db-item">
95
+            <el-col :span="6" class="db-item" @click.native="$router.push({ path: '/task/todo' })">
96 96
               <el-row class="db-text">考核待审</el-row>
97 97
               <el-row class="db-number">{{ detail }}</el-row>
98 98
             </el-col>
99
+            <el-col :span="6" class="db-item" @click.native="$router.push({ path: '/task/finished' })">
100
+              <el-row class="db-text">已办任务</el-row>
101
+              <el-row class="db-number">{{ finish }}</el-row>
102
+            </el-col>
99 103
           </el-row>
100 104
         </el-col>
101 105
       </el-row>
@@ -116,7 +120,7 @@
116 120
           </el-table>
117 121
         </el-col>
118 122
         <el-col :span="8">
119
-          <el-calendar v-model="times">
123
+          <el-calendar v-model="times" style="margin-top: 80px;">
120 124
           </el-calendar>
121 125
         </el-col>
122 126
       </el-row>
@@ -127,13 +131,26 @@
127 131
         <span class="title-text">项目列表</span>
128 132
       </div>
129 133
       <el-table :data="projectData" style="width: 100%">
130
-        <el-table-column prop="isFinshed" label="状态"> {{ isFinished == '1' ? '已结束' : '进行中' }}
134
+        <el-table-column prop="isFinshed" label="状态" width="90px">
135
+          <template slot-scope="scope">
136
+            <el-tag :type="scope.row.isFinished === '0' ? 'success' : 'warning'" disable-transitions>
137
+              {{ scope.row.isFinished == '0' ? '进行中' : '已结束' }}
138
+            </el-tag>
139
+          </template>
140
+        </el-table-column>
141
+        <el-table-column prop="projectNumber" label="项目编号" width="90px">
131 142
         </el-table-column>
132
-        <el-table-column prop="projectNumber" label="项目编号">
143
+        <el-table-column prop="projectLeader" label="项目负责人" width="90px">
133 144
         </el-table-column>
134 145
         <el-table-column prop="projectName" label="项目名称">
135 146
         </el-table-column>
136 147
       </el-table>
148
+      <div style="text-align: right;margin-top: 20px;">
149
+        <el-pagination @current-change="getProject" :current-page.sync="projectQueryParams.pageNum"
150
+          :page-size="projectQueryParams.pageSize" layout="total, prev, pager, next,jumper" :total="projectTotal">
151
+        </el-pagination>
152
+      </div>
153
+
137 154
     </div>
138 155
   </div>
139 156
 </template>
@@ -143,6 +160,7 @@ import { mapGetters } from "vuex";
143 160
 import { getUserProfile } from "@/api/system/user";
144 161
 import { listProject } from "@/api/oa/project/project";
145 162
 import { todoList } from "@/api/flowable/todo";
163
+import { finishedList } from "@/api/flowable/finished";
146 164
 import { getDicts as getDicts, getData } from '@/api/system/dict/data'
147 165
 export default {
148 166
   name: "index",
@@ -156,10 +174,16 @@ export default {
156 174
       weather: {},
157 175
       noticeData: [],
158 176
       projectData: [],
177
+      projectQueryParams: {
178
+        pageNum: 1,
179
+        pageSize: 16
180
+      },
181
+      projectTotal: 0,
159 182
       times: new Date(),
160 183
       detail: 0,
184
+      finish: 0,
161 185
       engineerLevel: '',
162
-      titles: ''
186
+      titles: '',
163 187
     };
164 188
   },
165 189
   created() {
@@ -191,9 +215,13 @@ export default {
191 215
     gotoTask() {
192 216
       this.$router.push({ path: "/task/process" });
193 217
     },
218
+    goTodo() {
219
+      this.$router.push({ path: "/task/todo" });
220
+    },
194 221
     getProject() {
195
-      listProject({pageSize: 100}).then(response => {
222
+      listProject(this.projectQueryParams).then(response => {
196 223
         this.projectData = response.rows;
224
+        this.projectTotal = response.total;
197 225
       })
198 226
     },
199 227
     // 获取考核待办
@@ -207,12 +235,29 @@ export default {
207 235
         this.detail = response.data.total;
208 236
       });
209 237
     },
238
+    getFinish() {
239
+      finishedList({
240
+        pageNum: 1,
241
+        pageSize: 10,
242
+        name: null,
243
+        category: null,
244
+        key: null,
245
+        tenantId: null,
246
+        deployTime: null,
247
+        derivedFrom: null,
248
+        derivedFromRoot: null,
249
+        parentDeploymentId: null,
250
+        engineVersion: null
251
+      }).then(response => {
252
+        this.finish = response.data.total;
253
+      })
254
+    },
210 255
     // 获取工龄
211 256
     getObtainSeniority(entryDate) {
212 257
       if (entryDate != "" && entryDate != undefined && entryDate != null) {
213 258
         let curYear = new Date();
214
-        let e = entryDate.substring(0, 5);
215
-        return curYear - parseInt(e)
259
+        let e = entryDate.substring(0, 4);
260
+        return (curYear.getFullYear() - parseInt(e)) + '年'
216 261
       }
217 262
 
218 263
 
@@ -279,6 +324,7 @@ export default {
279 324
         text-align: center;
280 325
         background-color: #F5F5F5;
281 326
         padding: 10px 20px;
327
+        margin: 0 5px;
282 328
         cursor: pointer;
283 329
 
284 330
         .db-text {}

+ 190
- 0
oa-ui/src/views/project/list/index.vue Bestand weergeven

@@ -0,0 +1,190 @@
1
+<!--
2
+ * @Author: ysh
3
+ * @Date: 2024-02-27 14:49:15
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-02-27 16:57:10
6
+-->
7
+<template>
8
+  <div class="project-wrapper">
9
+    <!-- 搜索栏 -->
10
+    <el-row>
11
+      <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="88px">
12
+        <el-form-item label="项目编号" prop="projectNumber">
13
+          <el-input v-model="queryParams.projectNumber" placeholder="请输入项目编号" clearable
14
+            @keyup.enter.native="handleQuery" />
15
+        </el-form-item>
16
+        <el-form-item label="项目负责人" prop="projectLeader">
17
+          <el-input v-model="queryParams.projectLeader" placeholder="请输入项目负责人" clearable
18
+            @keyup.enter.native="handleQuery" />
19
+        </el-form-item>
20
+        <el-form-item label="项目名称" prop="projectName">
21
+          <el-input v-model="queryParams.projectName" placeholder="请输入项目名称" clearable @keyup.enter.native="handleQuery" />
22
+        </el-form-item>
23
+        <el-form-item>
24
+          <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
25
+        </el-form-item>
26
+      </el-form>
27
+    </el-row>
28
+    <!-- 项目统计 -->
29
+    <el-row>
30
+      <el-col>
31
+        <el-row :gutter="10">
32
+          <el-col :span="8">
33
+            <el-card>
34
+              <el-col :span="12">
35
+                <div>项目数量</div>
36
+                <h2>127</h2>
37
+              </el-col>
38
+              <el-col :span="12"></el-col>
39
+            </el-card>
40
+          </el-col>
41
+          <el-col :span="8">
42
+            <el-card>
43
+              <el-col :span="12">
44
+                <div>预算金额</div>
45
+                <h2>679999</h2>
46
+              </el-col>
47
+              <el-col :span="12"></el-col>
48
+            </el-card>
49
+          </el-col>
50
+          <el-col :span="8">
51
+            <el-card>
52
+              <el-col :span="12">
53
+                <div>项目成本</div>
54
+                <h2>679999</h2>
55
+              </el-col>
56
+              <el-col :span="12"></el-col>
57
+            </el-card>
58
+          </el-col>
59
+        </el-row>
60
+      </el-col>
61
+    </el-row>
62
+    <!-- 项目列表 -->
63
+    <el-card style="margin-top: 20px;">
64
+      <div slot="header" class="card-header">
65
+        <div style="font-weight: bold;font-size: 20px;">项目列表</div>
66
+        <div>
67
+          <el-button style="float: right;margin-right: 10px;" type="warning" size="mini" icon="el-icon-plus"
68
+            @click="handleAdd">新增项目</el-button>
69
+        </div>
70
+      </div>
71
+      <el-table v-loading="loading" :data="projectList" style="margin-top: 30px;" header-row-class-name="table-header">
72
+        <el-table-column type="index" width="50">
73
+        </el-table-column>
74
+        <el-table-column prop="isFinshed" label="状态" width="90px">
75
+          <template slot-scope="scope">
76
+            <el-tag :type="scope.row.isFinished === '0' ? 'success' : 'warning'" disable-transitions>
77
+              {{ scope.row.isFinished == '0' ? '进行中' : '已结束' }}
78
+            </el-tag>
79
+          </template>
80
+        </el-table-column>
81
+        <el-table-column label="项目编号" align="center" key="projectNumber" prop="projectNumber" />
82
+        <el-table-column label="项目名称" align="center" key="projectName" prop="projectName" />
83
+        <el-table-column label="项目负责人" align="center" key="projectLeader" prop="projectLeader" />
84
+        <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
85
+          <template slot-scope="scope" v-if="scope.row.userId !== 1">
86
+            <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
87
+              v-hasPermi="['system:user:edit']">修改</el-button>
88
+            <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
89
+              v-hasPermi="['system:user:remove']">删除</el-button>
90
+          </template>
91
+        </el-table-column>
92
+      </el-table>
93
+      <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
94
+        @pagination="getList" />
95
+    </el-card>
96
+    <!-- 新建项目 -->
97
+    <el-dialog :title="title" :visible.sync="addOpen" :rules="rules" append-to-body>
98
+      <el-form :model="addForm" label-width="100px">
99
+        <el-form-item label="项目编号:" prop="projectNumber">
100
+          <el-input v-model="addForm.projectNumber"></el-input>
101
+        </el-form-item>
102
+        <el-form-item label="项目名称:" prop="projectName">
103
+          <el-input v-model="addForm.projectName"></el-input>
104
+        </el-form-item>
105
+        <el-form-item label="项目负责人:" prop="projectNumber">
106
+          <el-button type="primary" plain icon="el-icon-plus" size="mini">选择</el-button>
107
+        </el-form-item>
108
+      </el-form>
109
+      <div slot="footer" class="dialog-footer" style="text-align: center;">
110
+        <el-button type="primary" @click="confirmAddForm">确 定</el-button>
111
+        <el-button @click="addOpen = false">取 消</el-button>
112
+      </div>
113
+    </el-dialog>
114
+  </div>
115
+</template>
116
+
117
+<script>
118
+import { listProject } from "@/api/oa/project/project";
119
+
120
+export default {
121
+  data() {
122
+    return {
123
+      // 查询参数
124
+      queryParams: {
125
+        pageNum: 1,
126
+        pageSize: 10,
127
+        projectNumber: undefined,
128
+        projectLeader: undefined,
129
+        projectName: undefined,
130
+      },
131
+      projectList: [],
132
+      total: 0,
133
+      loading: true,
134
+      addOpen: false,
135
+      title: '',
136
+      addForm: {},
137
+      rules: {
138
+        projectNumber: [{ required: true, message: '请输入项目编号', trigger: 'blur' }]
139
+      }
140
+    }
141
+  },
142
+  created() {
143
+    this.getList();
144
+  },
145
+  methods: {
146
+    // 查询项目列表
147
+    getList() {
148
+      this.loading = true
149
+      listProject(this.queryForm).then(response => {
150
+        this.projectList = response.rows;
151
+        this.total = response.total;
152
+        this.loading = false;
153
+      })
154
+    },
155
+    handleQuery() {
156
+      this.queryParams.pageNum = 1;
157
+      this.getList();
158
+    },
159
+    handleAdd() {
160
+      this.title = '新增项目'
161
+      this.addOpen = true
162
+    },
163
+    handleUpdate(row) {
164
+
165
+    },
166
+    handleDelete(row) {
167
+
168
+    },
169
+    confirmAddForm(){
170
+
171
+    }
172
+  },
173
+}
174
+</script>
175
+
176
+<style lang="scss" scoped>
177
+.project-wrapper {
178
+  padding: 25px;
179
+}
180
+
181
+.table-header {
182
+  background-color: #f5f5f5;
183
+}
184
+
185
+.card-header {
186
+  display: flex;
187
+  justify-content: space-between;
188
+  padding: 0 10px;
189
+}
190
+</style>

+ 2
- 1
oa-ui/src/views/system/user/index.vue Bestand weergeven

@@ -548,7 +548,8 @@ export default {
548 548
       this.$refs["form"].validate(valid => {
549 549
         if (valid) {
550 550
           if (this.form.userId != undefined) {
551
-            this.form.titles = this.form.titles.join(',')
551
+            if(this.form.titles != "" && this.form.titles != undefined && this.form.titles != null)
552
+              this.form.titles = this.form.titles.join(',')
552 553
             updateUser(this.form).then(response => {
553 554
               this.$modal.msgSuccess("修改成功");
554 555
               this.open = false;

Laden…
Annuleren
Opslaan