Przeglądaj źródła

新增项目管理界面

余思翰 1 rok temu
rodzic
commit
3390a881f4

+ 1
- 1
oa-ui/public/index.html Wyświetl plik

5
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
5
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6
     <meta name="renderer" content="webkit">
6
     <meta name="renderer" content="webkit">
7
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
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
     <title><%= webpackConfig.name %></title>
9
     <title><%= webpackConfig.name %></title>
10
     <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
10
     <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
11
 	  <style>
11
 	  <style>

BIN
oa-ui/public/logo.png Wyświetl plik


BIN
oa-ui/src/assets/logo/logo.png Wyświetl plik


+ 2
- 1
oa-ui/src/assets/styles/variables.scss Wyświetl plik

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

+ 2
- 1
oa-ui/src/views/flowable/form/jsTable.vue Wyświetl plik

68
       </tr>
68
       </tr>
69
       <tr>
69
       <tr>
70
         <td class="table-title">入职年月</td>
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
         <td class="table-title">年龄</td>
73
         <td class="table-title">年龄</td>
73
         <td style="text-align:left;padding-left:10px;">{{ tableForm.age }}</td>
74
         <td style="text-align:left;padding-left:10px;">{{ tableForm.age }}</td>
74
       </tr>
75
       </tr>

+ 2
- 1
oa-ui/src/views/flowable/form/jyTable.vue Wyświetl plik

63
       </tr>
63
       </tr>
64
       <tr>
64
       <tr>
65
         <td class="table-title">入职年月</td>
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
         <td class="table-title">年龄</td>
68
         <td class="table-title">年龄</td>
68
         <td style="text-align:left;padding-left:10px;">{{ tableForm.age }}</td>
69
         <td style="text-align:left;padding-left:10px;">{{ tableForm.age }}</td>
69
       </tr>
70
       </tr>

+ 2
- 1
oa-ui/src/views/flowable/form/scTable.vue Wyświetl plik

89
       </tr>
89
       </tr>
90
       <tr>
90
       <tr>
91
         <td class="table-title">入职年月</td>
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
         <td class="table-title">年龄</td>
94
         <td class="table-title">年龄</td>
94
         <td style="text-align:left;padding-left:10px;">{{ tableForm.age }}</td>
95
         <td style="text-align:left;padding-left:10px;">{{ tableForm.age }}</td>
95
       </tr>
96
       </tr>

+ 2
- 1
oa-ui/src/views/flowable/form/xmTable.vue Wyświetl plik

63
       </tr>
63
       </tr>
64
       <tr>
64
       <tr>
65
         <td class="table-title">入职年月</td>
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
         <td class="table-title">年龄</td>
68
         <td class="table-title">年龄</td>
68
         <td style="text-align:left;padding-left:10px;">{{ tableForm.age }}</td>
69
         <td style="text-align:left;padding-left:10px;">{{ tableForm.age }}</td>
69
       </tr>
70
       </tr>

+ 2
- 1
oa-ui/src/views/flowable/form/zhTable.vue Wyświetl plik

63
       </tr>
63
       </tr>
64
       <tr>
64
       <tr>
65
         <td class="table-title">入职年月</td>
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
         <td class="table-title">年龄</td>
68
         <td class="table-title">年龄</td>
68
         <td style="text-align:left;padding-left:10px;">{{ tableForm.age }}</td>
69
         <td style="text-align:left;padding-left:10px;">{{ tableForm.age }}</td>
69
       </tr>
70
       </tr>

+ 8
- 6
oa-ui/src/views/flowable/task/todo/detail/index.vue Wyświetl plik

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

+ 59
- 13
oa-ui/src/views/index.vue Wyświetl plik

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-01-03 09:23:11
3
  * @Date: 2024-01-03 09:23:11
4
  * @LastEditors: Please set LastEditors
4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-02-27 10:33:41
5
+ * @LastEditTime: 2024-02-27 14:12:01
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="app-container home">
8
   <div class="app-container home">
12
         <el-row align="bottom" :gutter="40">
12
         <el-row align="bottom" :gutter="40">
13
           <el-col :span="4">
13
           <el-col :span="4">
14
             <h3 style="font-weight: bold;text-align: right;font-size: 18px;"> {{ user.nickName }},您好! </h3>
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
             <el-row style="font-size:12px;text-align: right;"> {{ "2024-01-22" }} {{ "星期一" }} </el-row>
16
             <el-row style="font-size:12px;text-align: right;"> {{ "2024-01-22" }} {{ "星期一" }} </el-row>
17
           </el-col>
17
           </el-col>
18
           <el-col :span="4" style="text-align: center;">
18
           <el-col :span="4" style="text-align: center;">
20
           </el-col>
20
           </el-col>
21
           <el-col :span="16">
21
           <el-col :span="16">
22
             <el-row style="font-size: 20px;font-weight: bold;margin-bottom: 20px;">
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
             </el-row>
24
             </el-row>
25
             <el-row>
25
             <el-row>
26
               <el-col :span="4">
26
               <el-col :span="4">
28
                   入职时间
28
                   入职时间
29
                 </el-row>
29
                 </el-row>
30
                 <el-row class="userinfo-data">
30
                 <el-row class="userinfo-data">
31
-                  {{ user.entryDate }}
31
+                  {{ user.entryDate != null ? user.entryDate.substring(0, 7) : user.entryDate }}
32
                 </el-row>
32
                 </el-row>
33
               </el-col>
33
               </el-col>
34
               <el-col :span="4">
34
               <el-col :span="4">
44
                   所在部门
44
                   所在部门
45
                 </el-row>
45
                 </el-row>
46
                 <el-row class="userinfo-data">
46
                 <el-row class="userinfo-data">
47
-                  {{ }}
47
+                  {{ user.dept ? user.dept.deptName : '' }}
48
                 </el-row>
48
                 </el-row>
49
               </el-col>
49
               </el-col>
50
               <el-col :span="4">
50
               <el-col :span="4">
92
             <span class="title-text">我的待办</span>
92
             <span class="title-text">我的待办</span>
93
           </div>
93
           </div>
94
           <el-row>
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
               <el-row class="db-text">考核待审</el-row>
96
               <el-row class="db-text">考核待审</el-row>
97
               <el-row class="db-number">{{ detail }}</el-row>
97
               <el-row class="db-number">{{ detail }}</el-row>
98
             </el-col>
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
           </el-row>
103
           </el-row>
100
         </el-col>
104
         </el-col>
101
       </el-row>
105
       </el-row>
116
           </el-table>
120
           </el-table>
117
         </el-col>
121
         </el-col>
118
         <el-col :span="8">
122
         <el-col :span="8">
119
-          <el-calendar v-model="times">
123
+          <el-calendar v-model="times" style="margin-top: 80px;">
120
           </el-calendar>
124
           </el-calendar>
121
         </el-col>
125
         </el-col>
122
       </el-row>
126
       </el-row>
127
         <span class="title-text">项目列表</span>
131
         <span class="title-text">项目列表</span>
128
       </div>
132
       </div>
129
       <el-table :data="projectData" style="width: 100%">
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
         </el-table-column>
142
         </el-table-column>
132
-        <el-table-column prop="projectNumber" label="项目编号">
143
+        <el-table-column prop="projectLeader" label="项目负责人" width="90px">
133
         </el-table-column>
144
         </el-table-column>
134
         <el-table-column prop="projectName" label="项目名称">
145
         <el-table-column prop="projectName" label="项目名称">
135
         </el-table-column>
146
         </el-table-column>
136
       </el-table>
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
     </div>
154
     </div>
138
   </div>
155
   </div>
139
 </template>
156
 </template>
143
 import { getUserProfile } from "@/api/system/user";
160
 import { getUserProfile } from "@/api/system/user";
144
 import { listProject } from "@/api/oa/project/project";
161
 import { listProject } from "@/api/oa/project/project";
145
 import { todoList } from "@/api/flowable/todo";
162
 import { todoList } from "@/api/flowable/todo";
163
+import { finishedList } from "@/api/flowable/finished";
146
 import { getDicts as getDicts, getData } from '@/api/system/dict/data'
164
 import { getDicts as getDicts, getData } from '@/api/system/dict/data'
147
 export default {
165
 export default {
148
   name: "index",
166
   name: "index",
156
       weather: {},
174
       weather: {},
157
       noticeData: [],
175
       noticeData: [],
158
       projectData: [],
176
       projectData: [],
177
+      projectQueryParams: {
178
+        pageNum: 1,
179
+        pageSize: 16
180
+      },
181
+      projectTotal: 0,
159
       times: new Date(),
182
       times: new Date(),
160
       detail: 0,
183
       detail: 0,
184
+      finish: 0,
161
       engineerLevel: '',
185
       engineerLevel: '',
162
-      titles: ''
186
+      titles: '',
163
     };
187
     };
164
   },
188
   },
165
   created() {
189
   created() {
191
     gotoTask() {
215
     gotoTask() {
192
       this.$router.push({ path: "/task/process" });
216
       this.$router.push({ path: "/task/process" });
193
     },
217
     },
218
+    goTodo() {
219
+      this.$router.push({ path: "/task/todo" });
220
+    },
194
     getProject() {
221
     getProject() {
195
-      listProject({pageSize: 100}).then(response => {
222
+      listProject(this.projectQueryParams).then(response => {
196
         this.projectData = response.rows;
223
         this.projectData = response.rows;
224
+        this.projectTotal = response.total;
197
       })
225
       })
198
     },
226
     },
199
     // 获取考核待办
227
     // 获取考核待办
207
         this.detail = response.data.total;
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
     getObtainSeniority(entryDate) {
256
     getObtainSeniority(entryDate) {
212
       if (entryDate != "" && entryDate != undefined && entryDate != null) {
257
       if (entryDate != "" && entryDate != undefined && entryDate != null) {
213
         let curYear = new Date();
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
         text-align: center;
324
         text-align: center;
280
         background-color: #F5F5F5;
325
         background-color: #F5F5F5;
281
         padding: 10px 20px;
326
         padding: 10px 20px;
327
+        margin: 0 5px;
282
         cursor: pointer;
328
         cursor: pointer;
283
 
329
 
284
         .db-text {}
330
         .db-text {}

+ 190
- 0
oa-ui/src/views/project/list/index.vue Wyświetl plik

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 Wyświetl plik

548
       this.$refs["form"].validate(valid => {
548
       this.$refs["form"].validate(valid => {
549
         if (valid) {
549
         if (valid) {
550
           if (this.form.userId != undefined) {
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
             updateUser(this.form).then(response => {
553
             updateUser(this.form).then(response => {
553
               this.$modal.msgSuccess("修改成功");
554
               this.$modal.msgSuccess("修改成功");
554
               this.open = false;
555
               this.open = false;

Ładowanie…
Anuluj
Zapisz