Parcourir la source

修改一些前端小问题

余思翰 il y a 10 mois
Parent
révision
42a5bc7628

+ 1
- 1
oa-ui/public/index.html Voir le fichier

@@ -118,7 +118,7 @@
118 118
       top: 0;
119 119
       width: 51%;
120 120
       height: 100%;
121
-      background: #7171C6;
121
+      background: #324865;
122 122
       z-index: 1000;
123 123
       -webkit-transform: translateX(0);
124 124
       -ms-transform: translateX(0);

+ 0
- 6
oa-ui/src/api/oa/project/project.js Voir le fichier

@@ -4,12 +4,6 @@
4 4
  * @LastEditors: wrh
5 5
  * @LastEditTime: 2024-04-16 16:05:21
6 6
  */
7
-/*
8
- * @Author: wrh
9
- * @Date: 2024-01-30 16:37:46
10
- * @LastEditors: Please set LastEditors
11
- * @LastEditTime: 2024-02-28 16:53:30
12
- */
13 7
 import request from '@/utils/request'
14 8
 
15 9
 // 查询cmc项目列表

+ 35
- 8
oa-ui/src/views/flowable/form/budget/components/choosePeople.vue Voir le fichier

@@ -14,8 +14,9 @@
14 14
         <el-button @click="getList" type="primary">搜索</el-button>
15 15
       </el-form-item>
16 16
     </el-form>
17
-    <el-table ref="chooseUser" :data="userList" @selection-change="handleSelectionChange" :row-key="getRowKeys">
18
-      <el-table-column type="selection" width="50" align="center" :reserve-selection="true" />
17
+    <el-table ref="chooseUser" :data="userList" @selection-change="handleSelectionChange" :row-key="getRowKeys"
18
+      @current-change="handleCurrentChange" @row-dblclick="confirmChooseBySingle" :highlight-current-row="!multiple">
19
+      <el-table-column type="selection" width="50" align="center" :reserve-selection="true" v-if="multiple" />
19 20
       <!-- <el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" /> -->
20 21
       <el-table-column label="姓名" align="center" key="nickName" prop="nickName" :show-overflow-tooltip="true" />
21 22
       <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" :show-overflow-tooltip="true" />
@@ -32,18 +33,21 @@
32 33
       <el-table-column label="岗级" align="center" key="postLevel" :show-overflow-tooltip="true">
33 34
         <template slot-scope="scope">
34 35
           {{ formatLevel(scope.row.postLevel, scope.row.salaryLevel,
35
-      dict.type.sys_user_postlevel, dict.type.sys_user_salarylevel) }}
36
+            dict.type.sys_user_postlevel, dict.type.sys_user_salarylevel) }}
36 37
         </template>
37 38
       </el-table-column>
38 39
     </el-table>
39 40
     <div style="text-align: right;">
40
-      <el-pagination @current-change="getList" :current-page.sync="queryParams.pageNum"
41
-        :page-size="queryParams.pageSize" layout="total, prev, pager, next" :total="total">
41
+      <el-pagination @current-change="getList" :current-page.sync="queryParams.pageNum" :page-size="queryParams.pageSize"
42
+        layout="total, prev, pager, next" :total="total">
42 43
       </el-pagination>
43 44
     </div>
44
-    <div>
45
+    <div v-if="multiple">
45 46
       已选人员:<el-tag v-for="item in chooseUser" style="margin: 5px;" :key="item.userId">{{ item.nickName }}</el-tag>
46 47
     </div>
48
+    <div v-if="!multiple">
49
+      已选人员:<el-tag style="margin: 5px;">{{ chooseUser.nickName }}</el-tag>
50
+    </div>
47 51
     <div style="text-align: center;margin-top: 20px;">
48 52
       <el-button type="primary" @click="confirmChoose">确认选择</el-button>
49 53
       <el-button @click="clearChoose">清空选择</el-button>
@@ -59,6 +63,10 @@ export default {
59 63
   props: {
60 64
     deptId: {
61 65
       type: Number
66
+    },
67
+    multiple: {
68
+      type: Boolean,
69
+      default: true
62 70
     }
63 71
   },
64 72
   data() {
@@ -112,14 +120,33 @@ export default {
112 120
     handleSelectionChange(val) {
113 121
       this.chooseUser = val
114 122
     },
123
+    handleCurrentChange(val) {
124
+      console.log(val);
125
+      if (!this.multiple) {
126
+        this.chooseUser = val
127
+      }
128
+    },
115 129
     getRowKeys(row) {
116 130
       return row.userId;
117 131
     },
118 132
     confirmChoose() {
119
-      this.$emit('chooseUser', this.chooseUser)
133
+      debugger
134
+      if (this.chooseUser)
135
+        this.$emit('chooseUser', this.chooseUser)
136
+    },
137
+    confirmChooseBySingle() {
138
+      debugger
139
+      if (!this.multiple) {
140
+        if (this.chooseUser)
141
+          this.$emit('chooseUser', this.chooseUser)
142
+      }
120 143
     },
121 144
     clearChoose() {
122
-      this.$refs.chooseUser.clearSelection();
145
+      if (this.multiple)
146
+        this.$refs.chooseUser.clearSelection();
147
+      else {
148
+        this.chooseUser = {}
149
+      }
123 150
     },
124 151
     getAgeByIdCard(idCard) {
125 152
       const sexAndAge = {}

+ 1
- 2
oa-ui/src/views/flowable/form/business/contractForm.vue Voir le fichier

@@ -68,8 +68,7 @@
68 68
 
69 69
           </el-row>
70 70
           <el-form-item label="合同文件" prop="contractDocument">
71
-            <FileUpload :disabled="taskName != '合同拟稿'"
72
-              v-if="form.contractDocument == '' || form.contractDocument == null" ref="contractFile" :limit="1"
71
+            <FileUpload v-if="taskName == '合同拟稿'" :disabled="taskName != '合同拟稿'" ref="contractFile" :limit="1"
73 72
               :filePathName="'承接合同/合同文件'" :fileType="['doc', 'docx', 'xls', 'xlsx', 'pdf']" @input="getContractPath">
74 73
             </FileUpload>
75 74
             <div v-if="form.contractDocument && taskName != '合同拟稿'">

+ 14
- 7
oa-ui/src/views/flowable/form/projectProcess/addproject.vue Voir le fichier

@@ -36,7 +36,7 @@
36 36
       <el-form-item label="合同编号:">
37 37
         <el-input v-model="chooseContractInfo.contractNumber" disabled></el-input>
38 38
       </el-form-item>
39
-      <el-form-item label="甲方单位:" prop="partyA">
39
+      <el-form-item label="甲方单位:" prop="partyAId">
40 40
         <el-select allow-create v-model="addForm.partyAId" filterable placeholder="请选择" style="width: 100%;" clearable>
41 41
           <el-option v-for="item in partyAList" :key="item.value" :label="item.partyAName" :value="item.partyAId">
42 42
           </el-option>
@@ -71,8 +71,7 @@
71 71
             </td>
72 72
             <td>
73 73
               <el-select v-model="work.unit" placeholder="请选择" clearable>
74
-                <el-option v-for="dict in dict.type.cmc_unit" :key="dict.value" :label="dict.label"
75
-                  :value="dict.label" />
74
+                <el-option v-for="dict in dict.type.cmc_unit" :key="dict.value" :label="dict.label" :value="dict.label" />
76 75
               </el-select>
77 76
             </td>
78 77
             <td>
@@ -116,7 +115,7 @@
116 115
         <el-col :span="6" :xs="24" :offset="12">
117 116
           <el-form-item label="项目登记人:" prop="registrantUser">
118 117
             <span class="auditor"> {{ addForm.projectRegistrantUser ? addForm.projectRegistrantUser.nickName :
119
-      registrantUser }} </span>
118
+              registrantUser }} </span>
120 119
           </el-form-item>
121 120
         </el-col>
122 121
         <el-col :span="6">
@@ -189,7 +188,10 @@ export default {
189 188
         projectSource: "0",
190 189
         projectLevel: "0"
191 190
       },
192
-      chooseContractInfo: {},
191
+      chooseContractInfo: {
192
+        contractCode: '',
193
+        contractNumber: ''
194
+      },
193 195
       contractCode: "",
194 196
       contractNumber: "",
195 197
       rules: {
@@ -314,12 +316,17 @@ export default {
314 316
     // 查询业主单位列表
315 317
     getPartyAList() {
316 318
       this.loading = true
319
+      let partyAName = ''
320
+      if (this.taskName == '项目登记') {
321
+        partyAName = '中国电建集团成都勘测设计研究院有限公司'
322
+      }
317 323
       listPartyA({
318 324
         pageNum: 1,
319
-        pageSize: 99999999,
320
-        partyAName: '中国电建集团成都勘测设计研究院有限公司'
325
+        pageSize: 999999,
326
+        partyAName: partyAName
321 327
       }).then(response => {
322 328
         this.partyAList = response.rows;
329
+        console.log(this.addForm, this.partyAList);
323 330
       })
324 331
     },
325 332
     cancel() {

+ 3
- 3
oa-ui/src/views/login.vue Voir le fichier

@@ -71,8 +71,8 @@ export default {
71 71
     return {
72 72
       codeUrl: "",
73 73
       loginForm: {
74
-        username: "admin",
75
-        password: "admin123",
74
+        username: "",
75
+        password: "",
76 76
         rememberMe: false,
77 77
         code: "",
78 78
         uuid: ""
@@ -164,7 +164,7 @@ export default {
164 164
     flex: 1.8;
165 165
     min-width: 0%;
166 166
     background: url('../assets/images/login.jpg') no-repeat;
167
-    background-size: 100% 100%;
167
+    background-size: 100% 110%;
168 168
     position: relative;
169 169
   }
170 170
 

+ 3
- 0
oa-ui/src/views/oa/project/index.vue Voir le fichier

@@ -311,6 +311,9 @@ export default {
311 311
               } else {
312 312
                 this.$set(project, 'percentage', 0)
313 313
               }
314
+              if(project.isFinished == '1'){
315
+                this.$set(project, 'percentage', 100)
316
+              }
314 317
             }
315 318
           })
316 319
         }

+ 45
- 15
oa-ui/src/views/oa/project/info.vue Voir le fichier

@@ -56,7 +56,7 @@
56 56
                 <svg-icon slot="prefix" icon-class="school" />
57 57
                 甲方单位
58 58
               </template>
59
-              {{ project.partyA.partyAName }}
59
+              {{ project.partyA ? project.partyA.partyAName : '' }}
60 60
             </el-descriptions-item>
61 61
             <el-descriptions-item>
62 62
               <template slot="label">
@@ -174,7 +174,15 @@
174 174
                 <svg-icon slot="prefix" icon-class="user" />
175 175
                 项目负责人
176 176
               </template>
177
-              {{ project.projectLeaderUser ? project.projectLeaderUser.nickName : "" }}
177
+              <div style="display: flex;justify-content:space-between;">
178
+                <div>{{ project.projectLeaderUser ? project.projectLeaderUser.nickName : "" }}</div>
179
+                <div>
180
+                  <el-button class="ml20" type="warning" plain size="mini" icon="el-icon-plus"
181
+                    @click="prLeaderOpen = true" v-hasPermi="['oa:project:edit']">
182
+                    更换项目负责人
183
+                  </el-button>
184
+                </div>
185
+              </div>
178 186
             </el-descriptions-item>
179 187
             <el-descriptions-item>
180 188
               <template slot="label">
@@ -232,8 +240,8 @@
232 240
                 <el-input disabled type="textarea" v-model="projectComment.jyComment"></el-input>
233 241
                 <div class="sign mt10">
234 242
                   <div class="mr20">签名:<span class="auditor">{{ projectComment.jyUser ? projectComment.jyUser.nickName :
235
-        ''
236
-                      }}</span>
243
+                    ''
244
+                  }}</span>
237 245
                   </div>
238 246
                   <div class="ml20"><span>审核时间:{{ projectComment.jyApprovalTime }}</span></div>
239 247
                 </div>
@@ -248,7 +256,7 @@
248 256
                 <el-input disabled type="textarea" v-model="projectComment.manageComment"></el-input>
249 257
                 <div class="sign mt10">
250 258
                   <div class="mr20">签名:<span class="auditor">{{ projectComment.managerUser ?
251
-        projectComment.managerUser.nickName : '' }}</span>
259
+                    projectComment.managerUser.nickName : '' }}</span>
252 260
                   </div>
253 261
                   <div class="ml20"><span>审核时间:{{ projectComment.manageApprovalTime }}</span></div>
254 262
                 </div>
@@ -299,7 +307,7 @@
299 307
               </template>
300 308
               <el-select v-model="devices" multiple disabled style="width:100%">
301 309
                 <el-option v-for="item in deviceList" :key="item.deviceId" :label="item.name + '【' + (item.brand != null ? item.brand : '') + (item.series != null ? '-' + item.series + '】' : '')
302
-        + (item.code != null ? '(设备编号:' + item.code + ')' : '') + '📍' + item.place" :value="item.deviceId">
310
+                  + (item.code != null ? '(设备编号:' + item.code + ')' : '') + '📍' + item.place" :value="item.deviceId">
303 311
                 </el-option>
304 312
               </el-select>
305 313
             </el-descriptions-item>
@@ -396,6 +404,9 @@
396 404
     <el-dialog title="技术交底记录表" :visible.sync="openTech" width="1000px" append-to-body>
397 405
       <technical-tab :taskForm="taskForm"></technical-tab>
398 406
     </el-dialog>
407
+    <el-dialog title="更换项目负责人" :visible.sync="prLeaderOpen" width="1000px" append-to-body>
408
+      <choose-people :multiple="false" @chooseUser="changeProjectLeader"></choose-people>
409
+    </el-dialog>
399 410
   </div>
400 411
 </template>
401 412
 
@@ -403,7 +414,7 @@
403 414
 import { getDept } from "@/api/system/dept";
404 415
 import { getUsersDeptLeaderByDept } from '@/api/system/post'
405 416
 import { listUser, getUser } from "@/api/system/user";
406
-import { getProject } from "@/api/oa/project/project";
417
+import { getProject, updateProject } from "@/api/oa/project/project";
407 418
 import { listProjectWork, addProjectWork } from "@/api/oa/project/projectWork";
408 419
 import { listProjectComment, getProjectComment } from "@/api/oa/project/projectComment";
409 420
 import { listProjectProgress, getProjectProgress } from "@/api/oa/project/projectProgress";
@@ -411,15 +422,16 @@ import { listProjectContract, addProjectContract } from "@/api/oa/contract/proje
411 422
 import { listContract, getContract, delContract, addContract, updateContract } from "@/api/oa/contract/contract";
412 423
 import { listDevice } from "@/api/oa/device/device";
413 424
 import { listCar } from '@/api/oa/car/car';
414
-import budgetInfo from '../../flowable/form/budget/budgetInfo.vue';
415
-import SafeTab from '../../flowable/form/projectProcess/safeTab.vue';
416
-import TechnicalTab from '../../flowable/form/projectProcess/technicalTab.vue';
417
-import SettleData from '../../flowable/form/inProgress/settleData.vue';
418
-import BorrowData from '../../flowable/form/inProgress/borrowData.vue';
419
-import BudgetTab from '../../flowable/form/projectProcess/budgetTab.vue';
420
-import achiData from "../../flowable/form/inProgress/achiData.vue";
425
+import budgetInfo from '@/views/flowable/form/budget/budgetInfo.vue';
426
+import SafeTab from '@/views/flowable/form/projectProcess/safeTab.vue';
427
+import TechnicalTab from '@/views/flowable/form/projectProcess/technicalTab.vue';
428
+import SettleData from '@/views/flowable/form/inProgress/settleData.vue';
429
+import BorrowData from '@/views/flowable/form/inProgress/borrowData.vue';
430
+import BudgetTab from '@/views/flowable/form/projectProcess/budgetTab.vue';
431
+import achiData from "@/views/flowable/form/inProgress/achiData.vue";
432
+import choosePeople from '@/views/flowable/form/budget/components/choosePeople.vue'
421 433
 export default {
422
-  components: { budgetInfo, SafeTab, TechnicalTab, SettleData, BorrowData, BudgetTab, achiData },
434
+  components: { budgetInfo, SafeTab, TechnicalTab, SettleData, BorrowData, BudgetTab, achiData, choosePeople },
423 435
   created() {
424 436
     this.getUserList();
425 437
     this.getDeviceList();
@@ -451,6 +463,7 @@ export default {
451 463
       openBudget: false,
452 464
       openSafe: false,
453 465
       openTech: false,
466
+      prLeaderOpen: false,
454 467
       taskForm: {
455 468
         formId: ''
456 469
       },
@@ -590,6 +603,23 @@ export default {
590 603
           url: url
591 604
         }
592 605
       })
606
+    },
607
+    changeProjectLeader(val) {
608
+      let preLeader = this.getUserName(this.project.projectLeader);
609
+      let curLeader = val.nickName;
610
+      this.$confirm('项目负责人将由' + preLeader + '变更为' + curLeader + ',是否确认', '提示', {
611
+        confirmButtonText: '确定',
612
+        cancelButtonText: '取消',
613
+        type: 'warning'
614
+      }).then(() => {
615
+        updateProject(
616
+          { projectId: this.project.projectId, projectLeader: val.userId }
617
+        ).then(res => {
618
+          this.$message.success('项目负责人修改成功');
619
+          this.prLeaderOpen = false;
620
+          this.$router.go(0);
621
+        })
622
+      }).catch(() => { });
593 623
     }
594 624
   },
595 625
 }

+ 4
- 1
oa-ui/src/views/oa/staff/index.vue Voir le fichier

@@ -78,7 +78,7 @@
78 78
           <!-- <el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" /> -->
79 79
           <el-table-column label="姓名" align="center" key="nickName" prop="nickName" v-if="columns[0].visible"
80 80
             :show-overflow-tooltip="true" />
81
-          <el-table-column label="年龄" align="center" key="age" prop="age" v-if="columns[1].visible" sortable>
81
+          <el-table-column label="年龄" align="center" key="age" prop="age" v-if="columns[1].visible" sortable :sort-method="sortAge">
82 82
             <template slot-scope="scope">
83 83
               {{ getAgeByIdCard(scope.row.idCard) }}
84 84
             </template>
@@ -756,6 +756,9 @@ export default {
756 756
         newStr = str.join(splitStr)
757 757
       }
758 758
       return newStr
759
+    },
760
+    sortAge(a, b) {
761
+      return this.getAgeByIdCard(a.idCard) - this.getAgeByIdCard(b.idCard);
759 762
     }
760 763
   }
761 764
 };

Loading…
Annuler
Enregistrer