ソースを参照

公司培训记录表

lamphua 6ヶ月前
コミット
27f4135e2c

+ 97
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcTrainController.java ファイルの表示

@@ -0,0 +1,97 @@
1
+package com.ruoyi.web.controller.oa;
2
+
3
+import java.util.List;
4
+import javax.servlet.http.HttpServletResponse;
5
+import org.springframework.beans.factory.annotation.Autowired;
6
+import org.springframework.web.bind.annotation.GetMapping;
7
+import org.springframework.web.bind.annotation.PostMapping;
8
+import org.springframework.web.bind.annotation.PutMapping;
9
+import org.springframework.web.bind.annotation.DeleteMapping;
10
+import org.springframework.web.bind.annotation.PathVariable;
11
+import org.springframework.web.bind.annotation.RequestBody;
12
+import org.springframework.web.bind.annotation.RequestMapping;
13
+import org.springframework.web.bind.annotation.RestController;
14
+import com.ruoyi.common.annotation.Log;
15
+import com.ruoyi.common.core.controller.BaseController;
16
+import com.ruoyi.common.core.domain.AjaxResult;
17
+import com.ruoyi.common.enums.BusinessType;
18
+import com.ruoyi.oa.domain.CmcTrain;
19
+import com.ruoyi.oa.service.ICmcTrainService;
20
+import com.ruoyi.common.utils.poi.ExcelUtil;
21
+import com.ruoyi.common.core.page.TableDataInfo;
22
+
23
+/**
24
+ * 培训记录Controller
25
+ * 
26
+ * @author cmc
27
+ * @date 2024-09-25
28
+ */
29
+@RestController
30
+@RequestMapping("/oa/train")
31
+public class CmcTrainController extends BaseController
32
+{
33
+    @Autowired
34
+    private ICmcTrainService cmcTrainService;
35
+
36
+    /**
37
+     * 查询培训记录列表
38
+     */
39
+    @GetMapping("/list")
40
+    public TableDataInfo list(CmcTrain cmcTrain)
41
+    {
42
+        startPage();
43
+        List<CmcTrain> list = cmcTrainService.selectCmcTrainList(cmcTrain);
44
+        return getDataTable(list);
45
+    }
46
+
47
+    /**
48
+     * 导出培训记录列表
49
+     */
50
+    @Log(title = "培训记录", businessType = BusinessType.EXPORT)
51
+    @PostMapping("/export")
52
+    public void export(HttpServletResponse response, CmcTrain cmcTrain)
53
+    {
54
+        List<CmcTrain> list = cmcTrainService.selectCmcTrainList(cmcTrain);
55
+        ExcelUtil<CmcTrain> util = new ExcelUtil<CmcTrain>(CmcTrain.class);
56
+        util.exportExcel(response, list, "培训记录数据");
57
+    }
58
+
59
+    /**
60
+     * 获取培训记录详细信息
61
+     */
62
+    @GetMapping(value = "/{trainId}")
63
+    public AjaxResult getInfo(@PathVariable("trainId") Integer trainId)
64
+    {
65
+        return success(cmcTrainService.selectCmcTrainByTrainId(trainId));
66
+    }
67
+
68
+    /**
69
+     * 新增培训记录
70
+     */
71
+    @Log(title = "培训记录", businessType = BusinessType.INSERT)
72
+    @PostMapping
73
+    public AjaxResult add(@RequestBody CmcTrain cmcTrain)
74
+    {
75
+        return toAjax(cmcTrainService.insertCmcTrain(cmcTrain));
76
+    }
77
+
78
+    /**
79
+     * 修改培训记录
80
+     */
81
+    @Log(title = "培训记录", businessType = BusinessType.UPDATE)
82
+    @PutMapping
83
+    public AjaxResult edit(@RequestBody CmcTrain cmcTrain)
84
+    {
85
+        return toAjax(cmcTrainService.updateCmcTrain(cmcTrain));
86
+    }
87
+
88
+    /**
89
+     * 删除培训记录
90
+     */
91
+    @Log(title = "培训记录", businessType = BusinessType.DELETE)
92
+	@DeleteMapping("/{trainIds}")
93
+    public AjaxResult remove(@PathVariable Integer[] trainIds)
94
+    {
95
+        return toAjax(cmcTrainService.deleteCmcTrainByTrainIds(trainIds));
96
+    }
97
+}

+ 139
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcTrain.java ファイルの表示

@@ -0,0 +1,139 @@
1
+package com.ruoyi.oa.domain;
2
+
3
+import java.util.Date;
4
+import com.fasterxml.jackson.annotation.JsonFormat;
5
+import org.apache.commons.lang3.builder.ToStringBuilder;
6
+import org.apache.commons.lang3.builder.ToStringStyle;
7
+import com.ruoyi.common.annotation.Excel;
8
+import com.ruoyi.common.core.domain.BaseEntity;
9
+
10
+/**
11
+ * 培训记录对象 cmc_train
12
+ * 
13
+ * @author cmc
14
+ * @date 2024-09-25
15
+ */
16
+public class CmcTrain extends BaseEntity
17
+{
18
+    private static final long serialVersionUID = 1L;
19
+
20
+    /** 培训记录id */
21
+    private Integer trainId;
22
+
23
+    /** 培训名称 */
24
+    @Excel(name = "培训名称")
25
+    private String name;
26
+
27
+    /** 培训地点 */
28
+    @Excel(name = "培训地点")
29
+    private String place;
30
+
31
+    /** 组织者 */
32
+    @Excel(name = "组织者")
33
+    private String organizer;
34
+
35
+    /** 人数 */
36
+    @Excel(name = "人数")
37
+    private Integer num;
38
+
39
+    /** 参培人员 */
40
+    @Excel(name = "参培人员")
41
+    private String participates;
42
+
43
+    /** 开始时间 */
44
+    @JsonFormat(pattern = "yyyy-MM-dd")
45
+    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
46
+    private Date beginDate;
47
+
48
+    /** 结束时间 */
49
+    @JsonFormat(pattern = "yyyy-MM-dd")
50
+    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
51
+    private Date endDate;
52
+
53
+    public void setTrainId(Integer trainId) 
54
+    {
55
+        this.trainId = trainId;
56
+    }
57
+
58
+    public Integer getTrainId() 
59
+    {
60
+        return trainId;
61
+    }
62
+    public void setName(String name) 
63
+    {
64
+        this.name = name;
65
+    }
66
+
67
+    public String getName() 
68
+    {
69
+        return name;
70
+    }
71
+    public void setPlace(String place) 
72
+    {
73
+        this.place = place;
74
+    }
75
+
76
+    public String getPlace() 
77
+    {
78
+        return place;
79
+    }
80
+    public void setOrganizer(String organizer) 
81
+    {
82
+        this.organizer = organizer;
83
+    }
84
+
85
+    public String getOrganizer() 
86
+    {
87
+        return organizer;
88
+    }
89
+    public void setNum(Integer num) 
90
+    {
91
+        this.num = num;
92
+    }
93
+
94
+    public Integer getNum() 
95
+    {
96
+        return num;
97
+    }
98
+    public void setParticipates(String participates) 
99
+    {
100
+        this.participates = participates;
101
+    }
102
+
103
+    public String getParticipates() 
104
+    {
105
+        return participates;
106
+    }
107
+    public void setBeginDate(Date beginDate) 
108
+    {
109
+        this.beginDate = beginDate;
110
+    }
111
+
112
+    public Date getBeginDate() 
113
+    {
114
+        return beginDate;
115
+    }
116
+    public void setEndDate(Date endDate) 
117
+    {
118
+        this.endDate = endDate;
119
+    }
120
+
121
+    public Date getEndDate() 
122
+    {
123
+        return endDate;
124
+    }
125
+
126
+    @Override
127
+    public String toString() {
128
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
129
+            .append("trainId", getTrainId())
130
+            .append("name", getName())
131
+            .append("place", getPlace())
132
+            .append("organizer", getOrganizer())
133
+            .append("num", getNum())
134
+            .append("participates", getParticipates())
135
+            .append("beginDate", getBeginDate())
136
+            .append("endDate", getEndDate())
137
+            .toString();
138
+    }
139
+}

+ 61
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcTrainMapper.java ファイルの表示

@@ -0,0 +1,61 @@
1
+package com.ruoyi.oa.mapper;
2
+
3
+import java.util.List;
4
+import com.ruoyi.oa.domain.CmcTrain;
5
+
6
+/**
7
+ * 培训记录Mapper接口
8
+ * 
9
+ * @author cmc
10
+ * @date 2024-09-25
11
+ */
12
+public interface CmcTrainMapper 
13
+{
14
+    /**
15
+     * 查询培训记录
16
+     * 
17
+     * @param trainId 培训记录主键
18
+     * @return 培训记录
19
+     */
20
+    public CmcTrain selectCmcTrainByTrainId(Integer trainId);
21
+
22
+    /**
23
+     * 查询培训记录列表
24
+     * 
25
+     * @param cmcTrain 培训记录
26
+     * @return 培训记录集合
27
+     */
28
+    public List<CmcTrain> selectCmcTrainList(CmcTrain cmcTrain);
29
+
30
+    /**
31
+     * 新增培训记录
32
+     * 
33
+     * @param cmcTrain 培训记录
34
+     * @return 结果
35
+     */
36
+    public int insertCmcTrain(CmcTrain cmcTrain);
37
+
38
+    /**
39
+     * 修改培训记录
40
+     * 
41
+     * @param cmcTrain 培训记录
42
+     * @return 结果
43
+     */
44
+    public int updateCmcTrain(CmcTrain cmcTrain);
45
+
46
+    /**
47
+     * 删除培训记录
48
+     * 
49
+     * @param trainId 培训记录主键
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcTrainByTrainId(Integer trainId);
53
+
54
+    /**
55
+     * 批量删除培训记录
56
+     * 
57
+     * @param trainIds 需要删除的数据主键集合
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcTrainByTrainIds(Integer[] trainIds);
61
+}

+ 61
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcTrainService.java ファイルの表示

@@ -0,0 +1,61 @@
1
+package com.ruoyi.oa.service;
2
+
3
+import java.util.List;
4
+import com.ruoyi.oa.domain.CmcTrain;
5
+
6
+/**
7
+ * 培训记录Service接口
8
+ * 
9
+ * @author cmc
10
+ * @date 2024-09-25
11
+ */
12
+public interface ICmcTrainService 
13
+{
14
+    /**
15
+     * 查询培训记录
16
+     * 
17
+     * @param trainId 培训记录主键
18
+     * @return 培训记录
19
+     */
20
+    public CmcTrain selectCmcTrainByTrainId(Integer trainId);
21
+
22
+    /**
23
+     * 查询培训记录列表
24
+     * 
25
+     * @param cmcTrain 培训记录
26
+     * @return 培训记录集合
27
+     */
28
+    public List<CmcTrain> selectCmcTrainList(CmcTrain cmcTrain);
29
+
30
+    /**
31
+     * 新增培训记录
32
+     * 
33
+     * @param cmcTrain 培训记录
34
+     * @return 结果
35
+     */
36
+    public int insertCmcTrain(CmcTrain cmcTrain);
37
+
38
+    /**
39
+     * 修改培训记录
40
+     * 
41
+     * @param cmcTrain 培训记录
42
+     * @return 结果
43
+     */
44
+    public int updateCmcTrain(CmcTrain cmcTrain);
45
+
46
+    /**
47
+     * 批量删除培训记录
48
+     * 
49
+     * @param trainIds 需要删除的培训记录主键集合
50
+     * @return 结果
51
+     */
52
+    public int deleteCmcTrainByTrainIds(Integer[] trainIds);
53
+
54
+    /**
55
+     * 删除培训记录信息
56
+     * 
57
+     * @param trainId 培训记录主键
58
+     * @return 结果
59
+     */
60
+    public int deleteCmcTrainByTrainId(Integer trainId);
61
+}

+ 93
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcTrainServiceImpl.java ファイルの表示

@@ -0,0 +1,93 @@
1
+package com.ruoyi.oa.service.impl;
2
+
3
+import java.util.List;
4
+import org.springframework.beans.factory.annotation.Autowired;
5
+import org.springframework.stereotype.Service;
6
+import com.ruoyi.oa.mapper.CmcTrainMapper;
7
+import com.ruoyi.oa.domain.CmcTrain;
8
+import com.ruoyi.oa.service.ICmcTrainService;
9
+
10
+/**
11
+ * 培训记录Service业务层处理
12
+ * 
13
+ * @author cmc
14
+ * @date 2024-09-25
15
+ */
16
+@Service
17
+public class CmcTrainServiceImpl implements ICmcTrainService 
18
+{
19
+    @Autowired
20
+    private CmcTrainMapper cmcTrainMapper;
21
+
22
+    /**
23
+     * 查询培训记录
24
+     * 
25
+     * @param trainId 培训记录主键
26
+     * @return 培训记录
27
+     */
28
+    @Override
29
+    public CmcTrain selectCmcTrainByTrainId(Integer trainId)
30
+    {
31
+        return cmcTrainMapper.selectCmcTrainByTrainId(trainId);
32
+    }
33
+
34
+    /**
35
+     * 查询培训记录列表
36
+     * 
37
+     * @param cmcTrain 培训记录
38
+     * @return 培训记录
39
+     */
40
+    @Override
41
+    public List<CmcTrain> selectCmcTrainList(CmcTrain cmcTrain)
42
+    {
43
+        return cmcTrainMapper.selectCmcTrainList(cmcTrain);
44
+    }
45
+
46
+    /**
47
+     * 新增培训记录
48
+     * 
49
+     * @param cmcTrain 培训记录
50
+     * @return 结果
51
+     */
52
+    @Override
53
+    public int insertCmcTrain(CmcTrain cmcTrain)
54
+    {
55
+        return cmcTrainMapper.insertCmcTrain(cmcTrain);
56
+    }
57
+
58
+    /**
59
+     * 修改培训记录
60
+     * 
61
+     * @param cmcTrain 培训记录
62
+     * @return 结果
63
+     */
64
+    @Override
65
+    public int updateCmcTrain(CmcTrain cmcTrain)
66
+    {
67
+        return cmcTrainMapper.updateCmcTrain(cmcTrain);
68
+    }
69
+
70
+    /**
71
+     * 批量删除培训记录
72
+     * 
73
+     * @param trainIds 需要删除的培训记录主键
74
+     * @return 结果
75
+     */
76
+    @Override
77
+    public int deleteCmcTrainByTrainIds(Integer[] trainIds)
78
+    {
79
+        return cmcTrainMapper.deleteCmcTrainByTrainIds(trainIds);
80
+    }
81
+
82
+    /**
83
+     * 删除培训记录信息
84
+     * 
85
+     * @param trainId 培训记录主键
86
+     * @return 结果
87
+     */
88
+    @Override
89
+    public int deleteCmcTrainByTrainId(Integer trainId)
90
+    {
91
+        return cmcTrainMapper.deleteCmcTrainByTrainId(trainId);
92
+    }
93
+}

+ 1
- 0
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcContractMapper.xml ファイルの表示

@@ -85,6 +85,7 @@
85 85
             <if test="contractCode!= null  and contractCode != ''"> and c.contract_code like concat('%', #{contractCode}, '%')</if>
86 86
             <if test="tenderId != null  and tenderId != ''"> and c.tender_id = #{tenderId}</if>
87 87
             <if test="contractNumber != null  and contractNumber != ''"> and c.contract_number = #{contractNumber}</if>
88
+            <if test="partyAId != null  and partyAId != ''"> and c.party_a_id = #{partyAId}</if>
88 89
             <if test="amount != null "> and c.amount = #{amount}</if>
89 90
             <if test="deposit != null "> and c.deposit = #{deposit}</if>
90 91
             <if test="contractDocument != null  and contractDocument != ''"> and c.contract_document = #{contractDocument}</if>

+ 2
- 0
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcProjectMapper.xml ファイルの表示

@@ -140,6 +140,7 @@
140 140
             <if test="exitTime != null "> and p.exit_time = #{exitTime}</if>
141 141
             <if test="participates != null  and participates != ''"> and find_in_set(#{participates}, p.participates)</if>
142 142
         </where>
143
+        group by p.project_id
143 144
         order by p.register_time desc, p.project_number desc
144 145
     </select>
145 146
 
@@ -168,6 +169,7 @@
168 169
             <if test="exitTime != null "> and p.exit_time = #{exitTime}</if>
169 170
             <if test="participates != null  and participates != ''"> and find_in_set(#{participates}, p.participates)</if>
170 171
         </where>
172
+        group by p.project_id
171 173
         order by p.register_time desc, p.project_number desc
172 174
     </select>
173 175
 

+ 86
- 0
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcTrainMapper.xml ファイルの表示

@@ -0,0 +1,86 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.ruoyi.oa.mapper.CmcTrainMapper">
6
+    
7
+    <resultMap type="CmcTrain" id="CmcTrainResult">
8
+        <result property="trainId"    column="train_id"    />
9
+        <result property="name"    column="name"    />
10
+        <result property="place"    column="place"    />
11
+        <result property="organizer"    column="organizer"    />
12
+        <result property="num"    column="num"    />
13
+        <result property="participates"    column="participates"    />
14
+        <result property="beginDate"    column="begin_date"    />
15
+        <result property="endDate"    column="end_date"    />
16
+    </resultMap>
17
+
18
+    <sql id="selectCmcTrainVo">
19
+        select train_id, name, place, organizer, num, participates, begin_date, end_date from cmc_train
20
+    </sql>
21
+
22
+    <select id="selectCmcTrainList" parameterType="CmcTrain" resultMap="CmcTrainResult">
23
+        <include refid="selectCmcTrainVo"/>
24
+        <where>  
25
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
26
+            <if test="place != null  and place != ''"> and place = #{place}</if>
27
+            <if test="organizer != null  and organizer != ''"> and organizer = #{organizer}</if>
28
+            <if test="num != null "> and num = #{num}</if>
29
+            <if test="participates != null  and participates != ''"> and participates = #{participates}</if>
30
+            <if test="beginDate != null "> and begin_date = #{beginDate}</if>
31
+            <if test="endDate != null "> and end_date = #{endDate}</if>
32
+        </where>
33
+    </select>
34
+    
35
+    <select id="selectCmcTrainByTrainId" parameterType="Integer" resultMap="CmcTrainResult">
36
+        <include refid="selectCmcTrainVo"/>
37
+        where train_id = #{trainId}
38
+    </select>
39
+        
40
+    <insert id="insertCmcTrain" parameterType="CmcTrain" useGeneratedKeys="true" keyProperty="trainId">
41
+        insert into cmc_train
42
+        <trim prefix="(" suffix=")" suffixOverrides=",">
43
+            <if test="name != null">name,</if>
44
+            <if test="place != null">place,</if>
45
+            <if test="organizer != null">organizer,</if>
46
+            <if test="num != null">num,</if>
47
+            <if test="participates != null">participates,</if>
48
+            <if test="beginDate != null">begin_date,</if>
49
+            <if test="endDate != null">end_date,</if>
50
+         </trim>
51
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
52
+            <if test="name != null">#{name},</if>
53
+            <if test="place != null">#{place},</if>
54
+            <if test="organizer != null">#{organizer},</if>
55
+            <if test="num != null">#{num},</if>
56
+            <if test="participates != null">#{participates},</if>
57
+            <if test="beginDate != null">#{beginDate},</if>
58
+            <if test="endDate != null">#{endDate},</if>
59
+         </trim>
60
+    </insert>
61
+
62
+    <update id="updateCmcTrain" parameterType="CmcTrain">
63
+        update cmc_train
64
+        <trim prefix="SET" suffixOverrides=",">
65
+            <if test="name != null">name = #{name},</if>
66
+            <if test="place != null">place = #{place},</if>
67
+            <if test="organizer != null">organizer = #{organizer},</if>
68
+            <if test="num != null">num = #{num},</if>
69
+            <if test="participates != null">participates = #{participates},</if>
70
+            <if test="beginDate != null">begin_date = #{beginDate},</if>
71
+            <if test="endDate != null">end_date = #{endDate},</if>
72
+        </trim>
73
+        where train_id = #{trainId}
74
+    </update>
75
+
76
+    <delete id="deleteCmcTrainByTrainId" parameterType="Integer">
77
+        delete from cmc_train where train_id = #{trainId}
78
+    </delete>
79
+
80
+    <delete id="deleteCmcTrainByTrainIds" parameterType="String">
81
+        delete from cmc_train where train_id in 
82
+        <foreach item="trainId" collection="array" open="(" separator="," close=")">
83
+            #{trainId}
84
+        </foreach>
85
+    </delete>
86
+</mapper>

+ 62
- 33
oa-back/sql/sq.sql
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 44
- 0
oa-ui/src/api/oa/train/train.js ファイルの表示

@@ -0,0 +1,44 @@
1
+import request from '@/utils/request'
2
+
3
+// 查询培训记录列表
4
+export function listTrain(query) {
5
+  return request({
6
+    url: '/oa/train/list',
7
+    method: 'get',
8
+    params: query
9
+  })
10
+}
11
+
12
+// 查询培训记录详细
13
+export function getTrain(trainId) {
14
+  return request({
15
+    url: '/oa/train/' + trainId,
16
+    method: 'get'
17
+  })
18
+}
19
+
20
+// 新增培训记录
21
+export function addTrain(data) {
22
+  return request({
23
+    url: '/oa/train',
24
+    method: 'post',
25
+    data: data
26
+  })
27
+}
28
+
29
+// 修改培训记录
30
+export function updateTrain(data) {
31
+  return request({
32
+    url: '/oa/train',
33
+    method: 'put',
34
+    data: data
35
+  })
36
+}
37
+
38
+// 删除培训记录
39
+export function delTrain(trainId) {
40
+  return request({
41
+    url: '/oa/train/' + trainId,
42
+    method: 'delete'
43
+  })
44
+}

+ 3
- 3
oa-ui/src/views/flowable/form/oa/carForm.vue ファイルの表示

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-02-29 11:44:28
4
- * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-09-19 10:53:41
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2024-09-25 15:38:52
6 6
 -->
7 7
 
8 8
 <template>
@@ -213,7 +213,7 @@
213 213
                 <el-checkbox-group v-model="form.cars" :disabled="taskName != '安排用车'">
214 214
                   <el-checkbox :label="item.carId" v-for="item in carList" :key="item.carId" :value="item.carId"
215 215
                     v-if="item.remark == null">
216
-                    {{ item.licensePlate + item.brand }}
216
+                    {{ item.licensePlate + (item.brand ? item.brand : '') + (item.series ? item.series : '') }}
217 217
                   </el-checkbox>
218 218
                 </el-checkbox-group>
219 219
               </el-form-item>

+ 8
- 4
oa-ui/src/views/flowable/form/technicalForm.vue ファイルの表示

@@ -235,10 +235,14 @@ export default {
235 235
         else {
236 236
           this.formTotal = 1;
237 237
           this.form = res.data;
238
-          this.acceptUser = this.$store.getters.name;
239
-          this.confirmUser = this.$store.getters.name;
240
-          this.form.acceptTime = new Date();
241
-          this.form.confirmTime = new Date();
238
+          if (this.taskName == '接受交底') {
239
+            this.acceptUser = this.$store.getters.name;
240
+            this.form.acceptTime = new Date();
241
+          }
242
+          if (this.taskName == '确认交底') {
243
+            this.confirmUser = this.$store.getters.name;
244
+            this.form.confirmTime = new Date();
245
+          }
242 246
         }
243 247
       })
244 248
     },

+ 4
- 4
oa-ui/src/views/oa/car/index.vue ファイルの表示

@@ -23,10 +23,10 @@
23 23
         <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
24 24
           v-hasPermi="['oa:car:edit']">修改</el-button>
25 25
       </el-col>
26
-      <el-col :span="1.5">
26
+      <!-- <el-col :span="1.5">
27 27
         <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
28 28
           v-hasPermi="['oa:car:remove']">删除</el-button>
29
-      </el-col>
29
+      </el-col> -->
30 30
       <el-col :span="1.5">
31 31
         <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
32 32
           v-hasPermi="['oa:car:export']">导出</el-button>
@@ -79,8 +79,8 @@
79 79
             v-hasPermi="['oa:car:query']">查看明细</el-button>
80 80
           <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
81 81
             v-hasPermi="['oa:car:edit']">修改</el-button>
82
-          <el-button size="mini" type="text" icon="el-icon-delete" style="color: #fc0000;"
83
-            @click="handleDelete(scope.row)" v-hasPermi="['oa:car:remove']">删除</el-button>
82
+          <!-- <el-button size="mini" type="text" icon="el-icon-delete" style="color: #fc0000;"
83
+            @click="handleDelete(scope.row)" v-hasPermi="['oa:car:remove']">删除</el-button> -->
84 84
         </template>
85 85
       </el-table-column>
86 86
     </el-table>

+ 15
- 4
oa-ui/src/views/oa/device/index.vue ファイルの表示

@@ -114,8 +114,13 @@
114 114
         </el-row>
115 115
         <el-row :gutter="20">
116 116
           <el-col :span="12">
117
-            <el-form-item label="设备类别" prop="place">
118
-              <el-input v-model="form.type" placeholder="请输入设备类别" />
117
+            <el-form-item label="设备类别" prop="type">
118
+              <el-select v-model="form.type" placeholder="请输入设备类别">
119
+                <el-option label="仪器设备" value="仪器设备">
120
+                </el-option>
121
+                <el-option label="办公设备" value="办公设备">
122
+                </el-option>
123
+              </el-select>
119 124
             </el-form-item>
120 125
           </el-col>
121 126
           <el-col :span="12">
@@ -170,7 +175,8 @@
170 175
           <el-col :span="12">
171 176
             <el-form-item label="管理部门" prop="manageDept">
172 177
               <el-select v-model="form.manageDept" filterable placeholder="请选择" clearable>
173
-                <el-option v-for="item in $store.state.user.deptList" :key="item.deptId" :label="item.deptName" :value="item.deptId">
178
+                <el-option v-for="item in $store.state.user.deptList" :key="item.deptId" :label="item.deptName"
179
+                  :value="item.deptId">
174 180
                 </el-option>
175 181
               </el-select>
176 182
             </el-form-item>
@@ -185,11 +191,16 @@
185 191
           </el-col>
186 192
         </el-row>
187 193
         <el-row :gutter="20">
188
-          <el-col :span="24">
194
+          <el-col :span="12">
189 195
             <el-form-item label="备注" prop="remark">
190 196
               <el-input type="textarea" v-model="form.remark" placeholder="请输入备注" />
191 197
             </el-form-item>
192 198
           </el-col>
199
+          <el-col :span="12">
200
+            <el-form-item label="设备编号" prop="deviceNumber">
201
+              <el-input v-model="form.deviceNumber" placeholder="请输入设备编号" />
202
+            </el-form-item>
203
+          </el-col>
193 204
         </el-row>
194 205
       </el-form>
195 206
 

+ 299
- 0
oa-ui/src/views/oa/train/index.vue ファイルの表示

@@ -0,0 +1,299 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
4
+      <el-form-item label="培训名称" prop="name">
5
+        <el-input
6
+          v-model="queryParams.name"
7
+          placeholder="请输入培训名称"
8
+          clearable
9
+          @keyup.enter.native="handleQuery"
10
+        />
11
+      </el-form-item>      
12
+      <el-form-item>
13
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
14
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
15
+      </el-form-item>
16
+    </el-form>
17
+
18
+    <el-row :gutter="10" class="mb8">
19
+      <el-col :span="1.5">
20
+        <el-button
21
+          type="primary"
22
+          plain
23
+          icon="el-icon-plus"
24
+          size="mini"
25
+          @click="handleAdd"
26
+          v-hasPermi="['oa:train:add']"
27
+        >新增</el-button>
28
+      </el-col>
29
+      <el-col :span="1.5">
30
+        <el-button
31
+          type="success"
32
+          plain
33
+          icon="el-icon-edit"
34
+          size="mini"
35
+          :disabled="single"
36
+          @click="handleUpdate"
37
+          v-hasPermi="['oa:train:edit']"
38
+        >修改</el-button>
39
+      </el-col>
40
+      <el-col :span="1.5">
41
+        <el-button
42
+          type="danger"
43
+          plain
44
+          icon="el-icon-delete"
45
+          size="mini"
46
+          :disabled="multiple"
47
+          @click="handleDelete"
48
+          v-hasPermi="['oa:train:remove']"
49
+        >删除</el-button>
50
+      </el-col>
51
+      <el-col :span="1.5">
52
+        <el-button
53
+          type="warning"
54
+          plain
55
+          icon="el-icon-download"
56
+          size="mini"
57
+          @click="handleExport"
58
+          v-hasPermi="['oa:train:export']"
59
+        >导出</el-button>
60
+      </el-col>
61
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
62
+    </el-row>
63
+
64
+    <el-table v-loading="loading" :data="trainList" @selection-change="handleSelectionChange">
65
+      <el-table-column type="selection" width="55" align="center" />
66
+      <!-- <el-table-column label="培训记录id" align="center" prop="trainId" /> -->
67
+      <el-table-column label="培训名称" align="center" prop="name" />
68
+      <el-table-column label="培训地点" align="center" prop="place" />
69
+      <el-table-column label="组织者" align="center" prop="organizer" />
70
+      <el-table-column label="人数" align="center" prop="num" />
71
+      <el-table-column label="参培人员" align="center" prop="participates" :show-overflow-tooltip="true" width="200" />
72
+      <el-table-column label="开始时间" align="center" prop="beginDate" width="180">
73
+        <template slot-scope="scope">
74
+          <span>{{ parseTime(scope.row.beginDate, '{y}-{m}-{d}') }}</span>
75
+        </template>
76
+      </el-table-column>
77
+      <el-table-column label="结束时间" align="center" prop="endDate" width="180">
78
+        <template slot-scope="scope">
79
+          <span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</span>
80
+        </template>
81
+      </el-table-column>
82
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
83
+        <template slot-scope="scope">
84
+          <el-button
85
+            size="mini"
86
+            type="text"
87
+            icon="el-icon-edit"
88
+            @click="handleUpdate(scope.row)"
89
+            v-hasPermi="['oa:train:edit']"
90
+          >修改</el-button>
91
+          <el-button
92
+            size="mini"
93
+            type="text"
94
+            icon="el-icon-delete"
95
+            @click="handleDelete(scope.row)"
96
+            v-hasPermi="['oa:train:remove']"
97
+          >删除</el-button>
98
+        </template>
99
+      </el-table-column>
100
+    </el-table>
101
+    
102
+    <pagination
103
+      v-show="total>0"
104
+      :total="total"
105
+      :page.sync="queryParams.pageNum"
106
+      :limit.sync="queryParams.pageSize"
107
+      @pagination="getList"
108
+    />
109
+
110
+    <!-- 添加或修改培训记录对话框 -->
111
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
112
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
113
+        <el-form-item label="培训名称" prop="name">
114
+          <el-input v-model="form.name" placeholder="请输入培训名称" />
115
+        </el-form-item>
116
+        <el-form-item label="培训地点" prop="place">
117
+          <el-input v-model="form.place" placeholder="请输入培训地点" />
118
+        </el-form-item>
119
+        <el-form-item label="组织者" prop="organizer">
120
+          <el-input v-model="form.organizer" placeholder="请输入组织者" />
121
+        </el-form-item>
122
+        <el-form-item label="人数" prop="num">
123
+          <el-input v-model="form.num" placeholder="请输入人数" />
124
+        </el-form-item>
125
+        <el-form-item label="参培人员" prop="participates">
126
+          <el-input type="textarea" :rows="4" v-model="form.participates" placeholder="请输入参培人员" />
127
+        </el-form-item>
128
+        <el-form-item label="开始时间" prop="beginDate">
129
+          <el-date-picker clearable
130
+            v-model="form.beginDate"
131
+            type="date"
132
+            value-format="yyyy-MM-dd"
133
+            placeholder="请选择开始时间">
134
+          </el-date-picker>
135
+        </el-form-item>
136
+        <el-form-item label="结束时间" prop="endDate">
137
+          <el-date-picker clearable
138
+            v-model="form.endDate"
139
+            type="date"
140
+            value-format="yyyy-MM-dd"
141
+            placeholder="请选择结束时间">
142
+          </el-date-picker>
143
+        </el-form-item>
144
+      </el-form>
145
+      <div slot="footer" class="dialog-footer">
146
+        <el-button type="primary" @click="submitForm">确 定</el-button>
147
+        <el-button @click="cancel">取 消</el-button>
148
+      </div>
149
+    </el-dialog>
150
+  </div>
151
+</template>
152
+
153
+<script>
154
+import { listTrain, getTrain, delTrain, addTrain, updateTrain } from "@/api/oa/train/train";
155
+
156
+export default {
157
+  name: "Train",
158
+  data() {
159
+    return {
160
+      // 遮罩层
161
+      loading: true,
162
+      // 选中数组
163
+      ids: [],
164
+      // 非单个禁用
165
+      single: true,
166
+      // 非多个禁用
167
+      multiple: true,
168
+      // 显示搜索条件
169
+      showSearch: true,
170
+      // 总条数
171
+      total: 0,
172
+      // 培训记录表格数据
173
+      trainList: [],
174
+      // 弹出层标题
175
+      title: "",
176
+      // 是否显示弹出层
177
+      open: false,
178
+      // 查询参数
179
+      queryParams: {
180
+        pageNum: 1,
181
+        pageSize: 10,
182
+        name: null,
183
+        place: null,
184
+        organizer: null,
185
+        num: null,
186
+        participates: null,
187
+        beginDate: null,
188
+        endDate: null
189
+      },
190
+      // 表单参数
191
+      form: {},
192
+      // 表单校验
193
+      rules: {
194
+      }
195
+    };
196
+  },
197
+  created() {
198
+    this.getList();
199
+  },
200
+  methods: {
201
+    /** 查询培训记录列表 */
202
+    getList() {
203
+      this.loading = true;
204
+      listTrain(this.queryParams).then(response => {
205
+        this.trainList = response.rows;
206
+        this.total = response.total;
207
+        this.loading = false;
208
+      });
209
+    },
210
+    // 取消按钮
211
+    cancel() {
212
+      this.open = false;
213
+      this.reset();
214
+    },
215
+    // 表单重置
216
+    reset() {
217
+      this.form = {
218
+        trainId: null,
219
+        name: null,
220
+        place: null,
221
+        organizer: null,
222
+        num: null,
223
+        participates: null,
224
+        beginDate: null,
225
+        endDate: null
226
+      };
227
+      this.resetForm("form");
228
+    },
229
+    /** 搜索按钮操作 */
230
+    handleQuery() {
231
+      this.queryParams.pageNum = 1;
232
+      this.getList();
233
+    },
234
+    /** 重置按钮操作 */
235
+    resetQuery() {
236
+      this.resetForm("queryForm");
237
+      this.handleQuery();
238
+    },
239
+    // 多选框选中数据
240
+    handleSelectionChange(selection) {
241
+      this.ids = selection.map(item => item.trainId)
242
+      this.single = selection.length!==1
243
+      this.multiple = !selection.length
244
+    },
245
+    /** 新增按钮操作 */
246
+    handleAdd() {
247
+      this.reset();
248
+      this.open = true;
249
+      this.title = "添加培训记录";
250
+    },
251
+    /** 修改按钮操作 */
252
+    handleUpdate(row) {
253
+      this.reset();
254
+      const trainId = row.trainId || this.ids
255
+      getTrain(trainId).then(response => {
256
+        this.form = response.data;
257
+        this.open = true;
258
+        this.title = "修改培训记录";
259
+      });
260
+    },
261
+    /** 提交按钮 */
262
+    submitForm() {
263
+      this.$refs["form"].validate(valid => {
264
+        if (valid) {
265
+          if (this.form.trainId != null) {
266
+            updateTrain(this.form).then(response => {
267
+              this.$modal.msgSuccess("修改成功");
268
+              this.open = false;
269
+              this.getList();
270
+            });
271
+          } else {
272
+            addTrain(this.form).then(response => {
273
+              this.$modal.msgSuccess("新增成功");
274
+              this.open = false;
275
+              this.getList();
276
+            });
277
+          }
278
+        }
279
+      });
280
+    },
281
+    /** 删除按钮操作 */
282
+    handleDelete(row) {
283
+      const trainIds = row.trainId || this.ids;
284
+      this.$modal.confirm('是否确认删除培训记录编号为"' + trainIds + '"的数据项?').then(function() {
285
+        return delTrain(trainIds);
286
+      }).then(() => {
287
+        this.getList();
288
+        this.$modal.msgSuccess("删除成功");
289
+      }).catch(() => {});
290
+    },
291
+    /** 导出按钮操作 */
292
+    handleExport() {
293
+      this.download('oa/train/export', {
294
+        ...this.queryParams
295
+      }, `train_${new Date().getTime()}.xlsx`)
296
+    }
297
+  }
298
+};
299
+</script>

読み込み中…
キャンセル
保存