Browse Source

修改主页

余思翰 1 year ago
parent
commit
d0635deeb2

BIN
oa-ui/src/assets/images/user.png View File


+ 2
- 2
oa-ui/src/assets/styles/sidebar.scss View File

@@ -24,8 +24,8 @@
24 24
     left: 0;
25 25
     z-index: 1001;
26 26
     overflow: hidden;
27
-    -webkit-box-shadow: 2px 0 6px rgba(0,21,41,.35);
28
-    box-shadow: 2px 0 6px rgba(0,21,41,.35);
27
+    -webkit-box-shadow: 2px 0 20px rgba(0,21,41,.15);
28
+    box-shadow: 2px 0 20px rgba(0,21,41,.15);
29 29
 
30 30
     // reset element-ui css
31 31
     .horizontal-collapse-transition {

+ 2
- 2
oa-ui/src/layout/components/Navbar.vue View File

@@ -6,7 +6,7 @@
6 6
     <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
7 7
 
8 8
     <div class="right-menu">
9
-      <template v-if="device!=='mobile'">
9
+      <!-- <template v-if="device!=='mobile'">
10 10
         <search id="header-search" class="right-menu-item" />
11 11
 
12 12
         <el-tooltip content="源码地址" effect="dark" placement="bottom">
@@ -23,7 +23,7 @@
23 23
           <size-select id="size-select" class="right-menu-item hover-effect" />
24 24
         </el-tooltip>
25 25
 
26
-      </template>
26
+      </template> -->
27 27
 
28 28
       <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
29 29
         <div class="avatar-wrapper">

+ 16
- 4
oa-ui/src/views/flowable/form/carForm.vue View File

@@ -2,7 +2,7 @@
2 2
  * @Author: wrh
3 3
  * @Date: 2024-02-29 17:24:39
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-03-05 10:55:59
5
+ * @LastEditTime: 2024-03-06 17:24:51
6 6
 -->
7 7
 
8 8
 <template>
@@ -74,13 +74,13 @@
74 74
         <el-divider></el-divider>
75 75
         <!-- 综合事务部管理人员填写 -->
76 76
 
77
-        <el-form-item label="车牌号:">
77
+        <el-form-item label="车牌号:"  v-if="taskName != '用车申请'">
78 78
           <el-select v-model="form.licensePlate" filterable multiple placeholder="请选择" clearable>
79 79
             <el-option v-for="item in carList" :key="item.id" :label="item.licensePlate" :value="item.id">
80 80
             </el-option>
81 81
           </el-select>
82 82
         </el-form-item>
83
-        <el-form-item label="驾驶员:">
83
+        <el-form-item label="驾驶员:"  v-if="taskName != '用车申请'">
84 84
           <!-- <el-select v-model="form.driver" filterable multiple placeholder="请选择" clearable>
85 85
             <el-option v-for="item in driverList" :key="item.userId" :label="item.nickName" :value="item.userId">
86 86
             </el-option>
@@ -90,6 +90,9 @@
90 90
           </el-checkbox-group>
91 91
         </el-form-item>
92 92
       </el-form>
93
+      <el-row style="text-align: center;" v-if="taskName == '用车申请'">
94
+        <el-button type="primary" @click="submit">提交申请</el-button>
95
+      </el-row>
93 96
     </div>
94 97
   </div>
95 98
 </template>
@@ -99,6 +102,12 @@ import { listProject, getProject } from "@/api/oa/project/project";
99 102
 import { listCar } from "@/api/oa/car/car";
100 103
 import { listDriver } from "@/api/system/post";
101 104
 export default {
105
+  props: {
106
+    taskName: {
107
+      type: String,
108
+      required: true
109
+    }
110
+  },
102 111
   created() {
103 112
     this.form.user = this.$store.getters.name;
104 113
     this.form.deptName = this.$store.getters.deptName;
@@ -111,7 +120,7 @@ export default {
111 120
       form: {
112 121
         date: new Date(),
113 122
         day: '',
114
-        driver:[]
123
+        driver: []
115 124
       },
116 125
       projectList: [],
117 126
       carList: [],
@@ -121,6 +130,9 @@ export default {
121 130
     }
122 131
   },
123 132
   methods: {
133
+    submit(){
134
+      this.$emit('submit',form)
135
+    },
124 136
     // 查询项目列表
125 137
     getProjectList() {
126 138
       this.loading = true

+ 2
- 3
oa-ui/src/views/flowable/task/todo/detail/index.vue View File

@@ -22,8 +22,8 @@
22 22
             v-else-if="taskForm.procDefName == '财务部考核'"></cw-table>
23 23
           <zh-table :tableForm="tableForm" :taskName="taskName" @submit="handleComplete"
24 24
             v-else-if="taskForm.procDefName == '综合事务部考核'"></zh-table>
25
-          <car-form v-else-if="taskForm.procDefName == '用车审批'"></car-form>
26
-          <el-row type="flex" justify="center" v-show="isShowApprove">
25
+          <car-form :taskName="taskName" v-else-if="taskForm.procDefName == '用车审批'" @submit="handleComplete"></car-form>
26
+          <el-row type="flex" justify="center" v-show="isShowApprove()">
27 27
             <el-button v-if="!formKeyExist" icon="el-icon-edit-outline" type="success" size="mini"
28 28
               @click="handleComplete">审核通过
29 29
             </el-button>
@@ -534,7 +534,6 @@ export default {
534 534
     },
535 535
     // 是否显示审批通过
536 536
     isShowApprove(){
537
-      debugger
538 537
       if(this.taskName == '员工填报' || this.taskName == '用车申请'){
539 538
         return false
540 539
       }else{

+ 170
- 301
oa-ui/src/views/index.vue View File

@@ -2,156 +2,48 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-01-03 09:23:11
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-02-27 14:12:01
5
+ * @LastEditTime: 2024-03-06 16:14:12
6 6
 -->
7
+
7 8
 <template>
8 9
   <div class="app-container home">
9
-    <div class="left">
10
-      <!-- 用户信息 -->
11
-      <div class="user-info">
12
-        <el-row align="bottom" :gutter="40">
13
-          <el-col :span="4">
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> -->
16
-            <el-row style="font-size:12px;text-align: right;"> {{ "2024-01-22" }} {{ "星期一" }} </el-row>
17
-          </el-col>
18
-          <el-col :span="4" style="text-align: center;">
10
+    <el-row style="height:350px;" :gutter="20">
11
+      <el-col :span="8">
12
+        <div class="header">个人信息</div>
13
+        <div class="user-wrapper">
14
+          <div class="avatar">
19 15
             <img :src="avatar" class="user-avatar" />
20
-          </el-col>
21
-          <el-col :span="16">
22
-            <el-row style="font-size: 20px;font-weight: bold;margin-bottom: 20px;">
23
-              {{ user.nickName }} <el-tag type="warning">{{ titles }}</el-tag>
24
-            </el-row>
25
-            <el-row>
26
-              <el-col :span="4">
27
-                <el-row class="userinfo-item">
28
-                  入职时间
29
-                </el-row>
30
-                <el-row class="userinfo-data">
31
-                  {{ user.entryDate != null ? user.entryDate.substring(0, 7) : user.entryDate }}
32
-                </el-row>
33
-              </el-col>
34
-              <el-col :span="4">
35
-                <el-row class="userinfo-item">
36
-                  工龄
37
-                </el-row>
38
-                <el-row class="userinfo-data">
39
-                  {{ getObtainSeniority(user.entryDate) }}
40
-                </el-row>
41
-              </el-col>
42
-              <el-col :span="4">
43
-                <el-row class="userinfo-item">
44
-                  所在部门
45
-                </el-row>
46
-                <el-row class="userinfo-data">
47
-                  {{ user.dept ? user.dept.deptName : '' }}
48
-                </el-row>
49
-              </el-col>
50
-              <el-col :span="4">
51
-                <el-row class="userinfo-item">
52
-                  岗级
53
-                </el-row>
54
-                <el-row class="userinfo-data">
55
-                  {{ engineerLevel }}
56
-                </el-row>
57
-              </el-col>
58
-              <el-col :span="4">
59
-                <el-row class="userinfo-item">
60
-                  技术职称
61
-                </el-row>
62
-                <el-row class="userinfo-data">
63
-                  {{ titles }}
64
-                </el-row>
65
-              </el-col>
66
-            </el-row>
67
-          </el-col>
68
-        </el-row>
69
-      </div>
70
-      <!-- 快捷菜单 -->
71
-      <el-row class="meau" type="flex">
72
-        <el-col :span="12" class="meau-left">
73
-          <div class="titles">
74
-            <span class="title-line"></span>
75
-            <span class="title-text">快捷菜单</span>
76
-            <span class="title-more">更多</span>
77 16
           </div>
78
-          <el-row style="text-align: center;">
79
-            <el-col :span="4" class="item" style="background-color: #42b983;padding:3px" @click.native="gotoTask">
80
-              <el-row class="item-icon"><i class="el-icon-tickets"></i></el-row>
81
-              <el-row>新建申请</el-row>
82
-            </el-col>
83
-            <!-- <el-col :span="4" class="item" style="background-color: #40A9FF;padding:3px">
84
-              <el-row class="item-icon"><i class="el-icon-s-order"></i></el-row>
85
-              <el-row>已办任务</el-row>
86
-            </el-col> -->
87
-          </el-row>
88
-        </el-col>
89
-        <el-col :span="12" class="meau-right">
90
-          <div class="titles">
91
-            <span class="title-line"></span>
92
-            <span class="title-text">我的待办</span>
17
+          <div class="username">
18
+            {{  user.nickName }}
93 19
           </div>
94
-          <el-row>
95
-            <el-col :span="6" class="db-item" @click.native="$router.push({ path: '/task/todo' })">
96
-              <el-row class="db-text">考核待审</el-row>
97
-              <el-row class="db-number">{{ detail }}</el-row>
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>
103
-          </el-row>
104
-        </el-col>
105
-      </el-row>
106
-      <!-- 公告列表和日历 -->
107
-      <el-row class="notice">
108
-        <el-col :span="16">
109
-          <div class="titles">
110
-            <span class="title-line"></span>
111
-            <span class="title-text">公告列表</span>
20
+        </div>
21
+      </el-col>
22
+      <el-col :span="15" :xs="24">
23
+        <div class="header">快捷入口</div>
24
+        <div class="nav-wrapper">
25
+          <div class="nav-item" v-for="nav in navItem" @click="goToPath(nav.id)">
26
+            <div class="nav-logo" :style="{ 'background-color': nav.bgColor, 'box-shadow': nav.boxShadow }">
27
+              <div class="icon">
28
+                <svg-icon slot="prefix" :icon-class="nav.icon" class="el-input__icon input-icon" />
29
+              </div>
30
+            </div>
31
+            <div class="nav-text">{{ nav.name }}</div>
112 32
           </div>
113
-          <el-table :data="noticeData" style="width: 100%">
114
-            <el-table-column prop="type" label="公告分类">
115
-            </el-table-column>
116
-            <el-table-column prop="name" label="公告标题">
117
-            </el-table-column>
118
-            <el-table-column prop="time" label="发布时间">
119
-            </el-table-column>
120
-          </el-table>
121
-        </el-col>
122
-        <el-col :span="8">
123
-          <el-calendar v-model="times" style="margin-top: 80px;">
33
+        </div>
34
+      </el-col>
35
+    </el-row>
36
+    <el-row>
37
+      <el-col :span="8">
38
+        <div class="header">日历</div>
39
+        <div class="calendar">
40
+          <el-calendar v-model="times">
124 41
           </el-calendar>
125
-        </el-col>
126
-      </el-row>
127
-    </div>
128
-    <div class="right">
129
-      <div class="titles">
130
-        <span class="title-line"></span>
131
-        <span class="title-text">项目列表</span>
132
-      </div>
133
-      <el-table :data="projectData" style="width: 100%">
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">
142
-        </el-table-column>
143
-        <el-table-column prop="projectLeader" label="项目负责人" width="90px">
144
-        </el-table-column>
145
-        <el-table-column prop="projectName" label="项目名称">
146
-        </el-table-column>
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
-
154
-    </div>
42
+        </div>
43
+      </el-col>
44
+      <el-col></el-col>
45
+      <el-col></el-col>
46
+    </el-row>
155 47
   </div>
156 48
 </template>
157 49
 
@@ -161,17 +53,19 @@ import { getUserProfile } from "@/api/system/user";
161 53
 import { listProject } from "@/api/oa/project/project";
162 54
 import { todoList } from "@/api/flowable/todo";
163 55
 import { finishedList } from "@/api/flowable/finished";
164
-import { getDicts as getDicts, getData } from '@/api/system/dict/data'
165 56
 export default {
166
-  name: "index",
167 57
   computed: {
168 58
     ...mapGetters(["avatar"]),
169 59
   },
170
-  dicts: ['sys_user_engineerlevel', 'sys_user_titles'],
60
+  created() {
61
+    this.getUser();
62
+    this.getDetail();
63
+    this.getProject();
64
+  },
171 65
   data() {
172 66
     return {
67
+      times: new Date(),
173 68
       user: {},
174
-      weather: {},
175 69
       noticeData: [],
176 70
       projectData: [],
177 71
       projectQueryParams: {
@@ -179,45 +73,86 @@ export default {
179 73
         pageSize: 16
180 74
       },
181 75
       projectTotal: 0,
182
-      times: new Date(),
183 76
       detail: 0,
184 77
       finish: 0,
185 78
       engineerLevel: '',
186 79
       titles: '',
187
-    };
188
-  },
189
-  created() {
190
-    this.getUser();
191
-    this.getDetail();
192
-    this.getProject();
80
+      navItem: [
81
+        {
82
+          id: 1,
83
+          name: '发起流程',
84
+          icon: 'cascader',
85
+          bgColor: '#785aee',
86
+          boxShadow: '0 5px 20px rgba(120,90,238,0.5)'
87
+        }, {
88
+          id: 2,
89
+          name: '待办任务',
90
+          icon: 'log',
91
+          bgColor: '#e66794',
92
+          boxShadow: '0 5px 20px rgba(230,103,148,0.5)'
93
+        }, {
94
+          id: 3,
95
+          name: '已办任务',
96
+          icon: 'excel',
97
+          bgColor: '#6389f4',
98
+          boxShadow: '0 5px 20px rgba(99,137,244,0.5)'
99
+        }, {
100
+          id: 4,
101
+          name: '项目管理',
102
+          icon: 'dict',
103
+          bgColor: '#e64c56',
104
+          boxShadow: '0 5px 20px rgba(230,76,86,0.5)'
105
+        }, {
106
+          id: 5,
107
+          name: '车辆管理',
108
+          icon: 'car',
109
+          bgColor: '#eeb62f',
110
+          boxShadow: '0 5px 20px rgba(238,182,47,0.5)'
111
+        }, {
112
+          id: 6,
113
+          name: '设备管理',
114
+          icon: 'lock',
115
+          bgColor: '#0be1bd',
116
+          boxShadow: '0 5px 20px rgba(11,225,189,0.5)'
117
+        }
118
+      ]
119
+    }
193 120
   },
194 121
   methods: {
195
-    goTarget(href) {
196
-      window.open(href, "_blank");
122
+    goToPath(id) {
123
+      if (id == 1) {
124
+        this.$router.push({ path: "/task/process" });
125
+      } else if (id == 2) {
126
+        this.$router.push({ path: "/task/todo" });
127
+      } else if (id == 3) {
128
+        this.$router.push({ path: "/task/finished" });
129
+      } else if (id == 4) {
130
+        this.$router.push({ path: "/project" });
131
+      } else if (id == 5) {
132
+        this.$router.push({ path: "/car" });
133
+      } else if (id == 6) {
134
+        this.$router.push({ path: "/device" });
135
+      }
197 136
     },
198 137
     getUser() {
199 138
       getUserProfile().then(response => {
200 139
         this.user = response.data;
201
-        for (let d of this.dict.type.sys_user_engineerlevel) {
202
-          if (d.value == response.data.engineerLevel) {
203
-            console.log(d);
204
-            this.engineerLevel = d.label
205
-          }
206
-        }
207
-        for (let t of this.dict.type.sys_user_titles) {
208
-          if (t.value == response.data.titles) {
209
-            console.log(t);
210
-            this.titles = t.label
211
-          }
212
-        }
140
+        console.log(this.user);
141
+        // for (let d of this.dict.type.sys_user_engineerlevel) {
142
+        //   if (d.value == response.data.engineerLevel) {
143
+        //     console.log(d);
144
+        //     this.engineerLevel = d.label
145
+        //   }
146
+        // }
147
+        // for (let t of this.dict.type.sys_user_titles) {
148
+        //   if (t.value == response.data.titles) {
149
+        //     console.log(t);
150
+        //     this.titles = t.label
151
+        //   }
152
+        // }
213 153
       });
214 154
     },
215
-    gotoTask() {
216
-      this.$router.push({ path: "/task/process" });
217
-    },
218
-    goTodo() {
219
-      this.$router.push({ path: "/task/todo" });
220
-    },
155
+    // 获取项目列表
221 156
     getProject() {
222 157
       listProject(this.projectQueryParams).then(response => {
223 158
         this.projectData = response.rows;
@@ -252,161 +187,95 @@ export default {
252 187
         this.finish = response.data.total;
253 188
       })
254 189
     },
255
-    // 获取工龄
256
-    getObtainSeniority(entryDate) {
257
-      if (entryDate != "" && entryDate != undefined && entryDate != null) {
258
-        let curYear = new Date();
259
-        let e = entryDate.substring(0, 4);
260
-        return (curYear.getFullYear() - parseInt(e)) + '年'
261
-      }
262
-
263
-
264
-    }
265
-  },
266
-};
190
+  }
191
+}
267 192
 </script>
268 193
 
269 194
 <style scoped lang="scss">
270 195
 .home {
271
-  display: flex;
272
-  background-color: #f5f5f5;
196
+  padding: 20px 40px;
197
+  background-color: #f0f4f7;
198
+  width: 100%;
199
+  // height: calc(100vh - 100px);
273 200
 }
274 201
 
275
-.left {
276
-  flex: 2;
277
-  margin-right: 20px;
278
-
279
-  .user-info {
280
-    width: 100%;
281
-    height: 160px;
282
-    padding: 10px;
283
-    margin-bottom: 20px;
284
-    background-color: #fff;
285
-
286
-    .user-avatar {
287
-      width: 120px;
288
-      height: 120px;
289
-      border-radius: 50%;
290
-    }
291
-
292
-    .userinfo-item {
293
-      font-size: 18px;
294
-      font-family: 'Times New Roman', '黑体', Times, serif, ;
295
-      font-weight: bold;
296
-      color: #6D6D6D;
297
-      margin: 5px;
298
-    }
202
+.header {
203
+  font-size: 20px;
204
+  line-height: 60px;
205
+}
299 206
 
300
-    .userinfo-data {
301
-      font-size: 14px;
302
-      font-family: '微软雅黑';
303
-      font-weight: bold;
304
-      margin: 5px;
305
-    }
306
-  }
207
+.nav-wrapper {
208
+  display: flex;
209
+  flex-wrap: wrap;
210
+  gap: 15px;
307 211
 
308
-  .meau {
309
-    height: 150px;
310
-    margin-bottom: 20px;
212
+  .nav-item {
213
+    background-color: #ffffff;
214
+    max-width: 240px;
215
+    flex-grow: 1;
216
+    height: 120px;
217
+    border-radius: 10px;
218
+    display: flex;
219
+    align-items: center;
220
+    padding: 0 30px;
221
+    margin-bottom: 10px;
311 222
 
312
-    .meau-left {
313
-      background-color: #fff;
314
-      padding: 0px 20px 10px;
223
+    .nav-logo {
224
+      width: 55px;
225
+      height: 55px;
226
+      border-radius: 10px;
315 227
       margin-right: 20px;
316
-    }
317
-
318
-    .meau-right {
319
-      background-color: #fff;
320
-      padding: 0px 20px 10px;
321
-      margin-left: 20px;
322
-
323
-      .db-item {
324
-        text-align: center;
325
-        background-color: #F5F5F5;
326
-        padding: 10px 20px;
327
-        margin: 0 5px;
328
-        cursor: pointer;
329
-
330
-        .db-text {}
228
+      text-align: center;
229
+      line-height: 55px;
331 230
 
332
-        .db-number {
333
-          font-weight: bold;
334
-          color: #e67153;
335
-          line-height: 30px;
336
-          font-size: 19px;
337
-        }
231
+      .icon {
232
+        font-size: 27px;
233
+        color: #ffffff;
338 234
       }
339 235
     }
340 236
 
341
-    .item {
342
-      color: #fff;
343
-      margin: 0 10px;
344
-      cursor: pointer;
345
-    }
346
-
347
-    .item-icon {
348
-      width: 100%;
349
-      height: 100%;
350
-      text-align: center;
237
+    .nav-text {
238
+      font-size: 18px;
351 239
 
352
-      i {
353
-        display: inline-block;
354
-        font-size: 40px;
355
-        color: #fff;
356
-      }
357 240
     }
358 241
   }
359 242
 
360
-  .notice {
361
-    padding: 0px 20px 10px;
362
-    background-color: #fff;
243
+  .nav-item:hover {
244
+    cursor: pointer;
245
+    box-shadow: 0 0 15px rgba($color: #242d42, $alpha: 0.1);
363 246
   }
364 247
 }
365 248
 
366
-.right {
367
-  padding: 0px 20px 10px;
368
-  background-color: #fff;
369
-  flex: 1;
370
-}
371
-
372
-.border {
373
-  border: 1px solid #CDCDCD;
374
-}
249
+.user-wrapper {
250
+  background-color: #ffffff;
251
+  height: 267px;
252
+  border-radius: 10px;
375 253
 
376
-.titles {
377
-  line-height: 55px;
378
-  vertical-align: middle;
379
-  font-weight: bold;
380
-  position: relative;
381
-  margin-bottom: 10px;
254
+  .avatar {
255
+    text-align: center;
256
+    padding: 10px 0;
382 257
 
383
-  .title-line {
384
-    position: absolute;
385
-    top: 50%;
386
-    left: 0;
387
-    transform: translate(0%, -50%);
388
-    width: 5px;
389
-    height: 30px;
390
-    background-color: #42b983;
258
+    .user-avatar {
259
+      width: 100px;
260
+      height: 100px;
261
+      border-radius: 50%;
262
+    }
391 263
   }
392 264
 
393
-  .title-text {
394
-    display: inline-block;
395
-    padding-left: 15px;
265
+  .username {
266
+    text-align: center;
267
+    font-size: 18px;
268
+    font-weight: bold;
269
+    font-family: '微软雅黑';
396 270
   }
271
+}
397 272
 
398
-  .title-more {
399
-    position: absolute;
400
-    top: 50%;
401
-    right: 0;
402
-    transform: translate(0%, -50%);
403
-    color: #40A9FF;
404
-    font-size: 14px;
405
-    cursor: pointer;
406
-  }
407 273
 
408
-  .title-more:hover {
409
-    color: #e4b82a;
410
-  }
274
+.calendar {
275
+  height: 300px;
276
+}
277
+
278
+::v-deep .el-calendar-table .el-calendar-day {
279
+  height: 32px;
411 280
 }
412 281
 </style>

+ 2
- 2
oa-ui/src/views/login.vue View File

@@ -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-21 17:20:33
5
+ * @LastEditTime: 2024-03-05 17:52:02
6 6
 -->
7 7
 <template>
8 8
   <el-row class="login-wrapper">
@@ -42,7 +42,7 @@
42 42
       </el-form-item> -->
43 43
         <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
44 44
         <el-form-item style="width:100%;">
45
-          <el-button :loading="loading" size="medium" type="primary" style="width:100%;"
45
+          <el-button :loading="loading" size="medium" type="primary" style="width:100%;border-radius: 30px;box-shadow: 0 5px 10px  rgba(0,0,0,0.3);"
46 46
             @click.native.prevent="handleLogin">
47 47
             <span v-if="!loading">登 录</span>
48 48
             <span v-else>登 录 中...</span>

+ 22
- 15
oa-ui/src/views/oa/car/index.vue View File

@@ -5,9 +5,9 @@
5 5
         <el-input v-model="queryParams.licensePlate" placeholder="请输入车牌号" clearable @keyup.enter.native="handleQuery" />
6 6
       </el-form-item>
7 7
 
8
-      <el-form-item label="驾驶员" prop="driver">
8
+      <!-- <el-form-item label="驾驶员" prop="driver">
9 9
         <el-input v-model="queryParams.driver" placeholder="请输入驾驶员" clearable @keyup.enter.native="handleQuery" />
10
-      </el-form-item>
10
+      </el-form-item> -->
11 11
       <el-form-item>
12 12
         <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
13 13
         <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
@@ -35,20 +35,25 @@
35 35
     </el-row>
36 36
     <el-table v-loading="loading" :data="carList" @selection-change="handleSelectionChange">
37 37
       <el-table-column type="selection" width="55" align="center" />
38
-      <el-table-column label="车辆id" align="center" prop="carId" />
38
+      <!-- <el-table-column label="车辆id" align="center" prop="carId" /> -->
39 39
       <el-table-column label="车牌号" align="center" prop="licensePlate" />
40
-      <el-table-column label="驾驶员" align="center" prop="driver" />
40
+      <!-- <el-table-column label="驾驶员" align="center" prop="driver" /> -->
41 41
       <el-table-column label="车系" align="center" prop="series" />
42 42
       <el-table-column label="车级" align="center" prop="level" />
43
-      <el-table-column label="购卖时间" align="center" prop="time" />
44
-      <el-table-column label="购买金额" align="center" prop="cost" />
43
+      <el-table-column label="购卖时间" align="center" prop="acquisitionTime" />
44
+      <el-table-column label="总价" align="center" prop="cost">
45
+        <template slot-scope="scope">
46
+          {{ scope.row.cost + '万元' }}
47
+        </template>
48
+      </el-table-column>
45 49
       <el-table-column label="预计使用年限" align="center" prop="expectLife" />
46 50
       <!-- <el-table-column label="使用成本(天)" align="center" prop="driver" /> -->
47 51
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
52
+
48 53
         <template slot-scope="scope">
49 54
           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
50 55
             v-hasPermi="['oa:car:edit']">修改</el-button>
51
-          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
56
+          <el-button size="mini" type="text" icon="el-icon-delete" style="color: #fc0000;" @click="handleDelete(scope.row)"
52 57
             v-hasPermi="['oa:car:remove']">删除</el-button>
53 58
         </template>
54 59
       </el-table-column>
@@ -69,20 +74,21 @@
69 74
         <el-form-item label="车级" prop="level">
70 75
           <el-input v-model="form.level" placeholder="请输入车级" />
71 76
         </el-form-item>
72
-        <el-form-item label="购卖时间" prop="time">
73
-          <el-date-picker v-model="form.time" type="date" placeholder="选择日期" format="yyyy-MM-dd"
77
+        <el-form-item label="购卖时间" prop="acquisitionTime">
78
+          <el-date-picker v-model="form.acquisitionTime" type="date" placeholder="选择日期" format="yyyy-MM-dd"
74 79
             value-format="yyyy-MM-dd">
75 80
           </el-date-picker>
76 81
         </el-form-item>
77
-        <el-form-item label="购买金额" prop="cost">
78
-          <el-input style="width:130px;margin-right:10px;" v-model="form.cost" placeholder="请输入金额" /><el-tag
79
-            type="warning">万元</el-tag>
82
+        <el-form-item label="总价" prop="cost">
83
+          <el-input style="width:130px;margin-right:10px;" v-model="form.cost" placeholder="请输入金额" />
84
+          <span>万元</span>
80 85
         </el-form-item>
81 86
         <el-form-item label="预计使用年限" prop="expectLife">
82
-          <el-input  v-model="form.expectLife" placeholder="请输入" />
87
+          <el-input v-model="form.expectLife" placeholder="请输入年限"  style="width:130px;margin-right:10px;" />
88
+          <span>年</span>
83 89
         </el-form-item>
84 90
         <el-form-item label="驾驶员" prop="driver">
85
-          <el-select v-model="form.driver" filterable  placeholder="请选择" clearable>
91
+          <el-select v-model="form.driver" filterable placeholder="请选择" clearable>
86 92
             <el-option v-for="item in driverList" :key="item.userId" :label="item.nickName" :value="item.userId">
87 93
             </el-option>
88 94
           </el-select>
@@ -229,7 +235,8 @@ export default {
229 235
     /** 删除按钮操作 */
230 236
     handleDelete(row) {
231 237
       const carIds = row.carId || this.ids;
232
-      this.$modal.confirm('是否确认删除cmc车辆信息编号为"' + carIds + '"的数据项?').then(function () {
238
+      const licensePlate = row.licensePlate
239
+      this.$modal.confirm('是否确认删除车牌号为【"' + licensePlate + '"】的车辆数据?').then(function () {
233 240
         return delCar(carIds);
234 241
       }).then(() => {
235 242
         this.getList();

+ 45
- 110
oa-ui/src/views/oa/device/index.vue View File

@@ -2,44 +2,11 @@
2 2
   <div class="app-container">
3 3
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
4 4
       <el-form-item label="设备编号" prop="code">
5
-        <el-input
6
-          v-model="queryParams.code"
7
-          placeholder="请输入设备编号"
8
-          clearable
9
-          @keyup.enter.native="handleQuery"
10
-        />
11
-      </el-form-item>
12
-      <el-form-item label="购置时间" prop="acquisitionTime">
13
-        <el-date-picker clearable
14
-          v-model="queryParams.acquisitionTime"
15
-          type="date"
16
-          value-format="yyyy-MM-dd"
17
-          placeholder="请选择购置时间">
18
-        </el-date-picker>
19
-      </el-form-item>
20
-      <el-form-item label="总价" prop="cost">
21
-        <el-input
22
-          v-model="queryParams.cost"
23
-          placeholder="请输入总价"
24
-          clearable
25
-          @keyup.enter.native="handleQuery"
26
-        />
27
-      </el-form-item>
28
-      <el-form-item label="预计使用年限" prop="expectLife">
29
-        <el-input
30
-          v-model="queryParams.expectLife"
31
-          placeholder="请输入预计使用年限"
32
-          clearable
33
-          @keyup.enter.native="handleQuery"
34
-        />
5
+        <el-input v-model="queryParams.code" placeholder="请输入设备编号" clearable @keyup.enter.native="handleQuery" />
35 6
       </el-form-item>
7
+
36 8
       <el-form-item label="设备系列" prop="series">
37
-        <el-input
38
-          v-model="queryParams.series"
39
-          placeholder="请输入设备系列"
40
-          clearable
41
-          @keyup.enter.native="handleQuery"
42
-        />
9
+        <el-input v-model="queryParams.series" placeholder="请输入设备系列" clearable @keyup.enter.native="handleQuery" />
43 10
       </el-form-item>
44 11
       <el-form-item>
45 12
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -49,113 +16,80 @@
49 16
 
50 17
     <el-row :gutter="10" class="mb8">
51 18
       <el-col :span="1.5">
52
-        <el-button
53
-          type="primary"
54
-          plain
55
-          icon="el-icon-plus"
56
-          size="mini"
57
-          @click="handleAdd"
58
-          v-hasPermi="['oa:device:add']"
59
-        >新增</el-button>
19
+        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
20
+          v-hasPermi="['oa:device:add']">新增</el-button>
60 21
       </el-col>
61 22
       <el-col :span="1.5">
62
-        <el-button
63
-          type="success"
64
-          plain
65
-          icon="el-icon-edit"
66
-          size="mini"
67
-          :disabled="single"
68
-          @click="handleUpdate"
69
-          v-hasPermi="['oa:device:edit']"
70
-        >修改</el-button>
23
+        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
24
+          v-hasPermi="['oa:device:edit']">修改</el-button>
71 25
       </el-col>
72 26
       <el-col :span="1.5">
73
-        <el-button
74
-          type="danger"
75
-          plain
76
-          icon="el-icon-delete"
77
-          size="mini"
78
-          :disabled="multiple"
79
-          @click="handleDelete"
80
-          v-hasPermi="['oa:device:remove']"
81
-        >删除</el-button>
27
+        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
28
+          v-hasPermi="['oa:device:remove']">删除</el-button>
82 29
       </el-col>
83 30
       <el-col :span="1.5">
84
-        <el-button
85
-          type="warning"
86
-          plain
87
-          icon="el-icon-download"
88
-          size="mini"
89
-          @click="handleExport"
90
-          v-hasPermi="['oa:device:export']"
91
-        >导出</el-button>
31
+        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
32
+          v-hasPermi="['oa:device:export']">导出</el-button>
92 33
       </el-col>
93 34
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
94 35
     </el-row>
95 36
 
96 37
     <el-table v-loading="loading" :data="deviceList" @selection-change="handleSelectionChange">
97 38
       <el-table-column type="selection" width="55" align="center" />
98
-      <el-table-column label="设备id" align="center" prop="deviceId" />
39
+      <!-- <el-table-column label="设备id" align="center" prop="deviceId" /> -->
99 40
       <el-table-column label="设备编号" align="center" prop="code" />
100 41
       <el-table-column label="设备类别" align="center" prop="type" />
42
+      <el-table-column label="设备系列" align="center" prop="series" />
101 43
       <el-table-column label="购置时间" align="center" prop="acquisitionTime" width="180">
102 44
         <template slot-scope="scope">
103 45
           <span>{{ parseTime(scope.row.acquisitionTime, '{y}-{m}-{d}') }}</span>
104 46
         </template>
105 47
       </el-table-column>
106
-      <el-table-column label="总价" align="center" prop="cost" />
48
+      <el-table-column label="总价" align="center" prop="cost">
49
+
50
+        <template slot-scope="scope">
51
+          {{ scope.row.cost + '万元' }}
52
+        </template>
53
+      </el-table-column>
107 54
       <el-table-column label="预计使用年限" align="center" prop="expectLife" />
108
-      <el-table-column label="设备系列" align="center" prop="series" />
109 55
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
56
+
110 57
         <template slot-scope="scope">
111
-          <el-button
112
-            size="mini"
113
-            type="text"
114
-            icon="el-icon-edit"
115
-            @click="handleUpdate(scope.row)"
116
-            v-hasPermi="['oa:device:edit']"
117
-          >修改</el-button>
118
-          <el-button
119
-            size="mini"
120
-            type="text"
121
-            icon="el-icon-delete"
122
-            @click="handleDelete(scope.row)"
123
-            v-hasPermi="['oa:device:remove']"
124
-          >删除</el-button>
58
+          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
59
+            v-hasPermi="['oa:device:edit']">修改</el-button>
60
+          <el-button size="mini" type="text" icon="el-icon-delete" style="color: #fc0000;" @click="handleDelete(scope.row)"
61
+            v-hasPermi="['oa:device:remove']">删除</el-button>
125 62
         </template>
126 63
       </el-table-column>
127 64
     </el-table>
128
-    
129
-    <pagination
130
-      v-show="total>0"
131
-      :total="total"
132
-      :page.sync="queryParams.pageNum"
133
-      :limit.sync="queryParams.pageSize"
134
-      @pagination="getList"
135
-    />
65
+
66
+    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
67
+      @pagination="getList" />
136 68
 
137 69
     <!-- 添加或修改cmc设备信息对话框 -->
138 70
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
139
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
71
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
140 72
         <el-form-item label="设备编号" prop="code">
141 73
           <el-input v-model="form.code" placeholder="请输入设备编号" />
142 74
         </el-form-item>
75
+        <el-form-item label="设备系列" prop="series">
76
+          <el-input v-model="form.series" placeholder="请输入设备系列" />
77
+        </el-form-item>
78
+        <el-form-item label="设备类别" prop="type">
79
+          <el-input v-model="form.type" placeholder="请输入设备类别" />
80
+        </el-form-item>
143 81
         <el-form-item label="购置时间" prop="acquisitionTime">
144
-          <el-date-picker clearable
145
-            v-model="form.acquisitionTime"
146
-            type="date"
147
-            value-format="yyyy-MM-dd"
82
+          <el-date-picker clearable v-model="form.acquisitionTime" type="date" value-format="yyyy-MM-dd"
148 83
             placeholder="请选择购置时间">
149 84
           </el-date-picker>
150 85
         </el-form-item>
151 86
         <el-form-item label="总价" prop="cost">
152
-          <el-input v-model="form.cost" placeholder="请输入总价" />
87
+          <el-input style="width:130px;margin-right:10px;" v-model="form.cost" placeholder="请输入金额" />
88
+          <span>万元</span>
153 89
         </el-form-item>
154 90
         <el-form-item label="预计使用年限" prop="expectLife">
155
-          <el-input v-model="form.expectLife" placeholder="请输入预计使用年限" />
156
-        </el-form-item>
157
-        <el-form-item label="设备系列" prop="series">
158
-          <el-input v-model="form.series" placeholder="请输入设备系列" />
91
+          <el-input v-model="form.expectLife" placeholder="请输入年限" style="width:130px;margin-right:10px;" />
92
+          <span>年</span>
159 93
         </el-form-item>
160 94
       </el-form>
161 95
       <div slot="footer" class="dialog-footer">
@@ -253,14 +187,14 @@ export default {
253 187
     // 多选框选中数据
254 188
     handleSelectionChange(selection) {
255 189
       this.ids = selection.map(item => item.deviceId)
256
-      this.single = selection.length!==1
190
+      this.single = selection.length !== 1
257 191
       this.multiple = !selection.length
258 192
     },
259 193
     /** 新增按钮操作 */
260 194
     handleAdd() {
261 195
       this.reset();
262 196
       this.open = true;
263
-      this.title = "添加cmc设备信息";
197
+      this.title = "添加设备信息";
264 198
     },
265 199
     /** 修改按钮操作 */
266 200
     handleUpdate(row) {
@@ -269,7 +203,7 @@ export default {
269 203
       getDevice(deviceId).then(response => {
270 204
         this.form = response.data;
271 205
         this.open = true;
272
-        this.title = "修改cmc设备信息";
206
+        this.title = "修改设备信息";
273 207
       });
274 208
     },
275 209
     /** 提交按钮 */
@@ -295,12 +229,13 @@ export default {
295 229
     /** 删除按钮操作 */
296 230
     handleDelete(row) {
297 231
       const deviceIds = row.deviceId || this.ids;
298
-      this.$modal.confirm('是否确认删除cmc设备信息编号为"' + deviceIds + '"的数据项?').then(function() {
232
+      const code = row.code
233
+      this.$modal.confirm('是否确认删除设备编号为【"' + code + '"】的设备数据?').then(function () {
299 234
         return delDevice(deviceIds);
300 235
       }).then(() => {
301 236
         this.getList();
302 237
         this.$modal.msgSuccess("删除成功");
303
-      }).catch(() => {});
238
+      }).catch(() => { });
304 239
     },
305 240
     /** 导出按钮操作 */
306 241
     handleExport() {

Loading…
Cancel
Save