Compare commits
2 Commits
e370203b13
...
5f2fa46633
Author | SHA1 | Date |
---|---|---|
|
5f2fa46633 | |
|
80e80848d8 |
|
@ -9,7 +9,7 @@ ruoyi:
|
|||
# 实例演示开关
|
||||
demoEnabled: true
|
||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||
profile: /data/uploadPath
|
||||
profile: D:/data/uploadPath
|
||||
# 获取ip地址开关
|
||||
addressEnabled: false
|
||||
# 验证码类型 math 数字计算 char 字符验证
|
||||
|
|
|
@ -42,6 +42,7 @@ public class BaseEntity implements Serializable
|
|||
private String nowRole;
|
||||
private String nowDept;
|
||||
private String nowUser;
|
||||
private String nowUserName;
|
||||
|
||||
/** 请求参数 */
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
|
@ -139,6 +140,14 @@ public class BaseEntity implements Serializable
|
|||
this.activeName = activeName;
|
||||
}
|
||||
|
||||
public String getNowUserName() {
|
||||
return nowUserName;
|
||||
}
|
||||
|
||||
public void setNowUserName(String nowUserName) {
|
||||
this.nowUserName = nowUserName;
|
||||
}
|
||||
|
||||
public Map<String, Object> getParams()
|
||||
{
|
||||
if (params == null)
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询演练培训列表
|
||||
export function listWorkTrain(query) {
|
||||
return request({
|
||||
url: '/work/emergencyDrill/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询演练培训详细
|
||||
export function getWorkTrain(id) {
|
||||
return request({
|
||||
url: '/work/emergencyDrill/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增演练培训
|
||||
export function addWorkTrain(data) {
|
||||
return request({
|
||||
url: '/work/emergencyDrill',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改演练培训
|
||||
export function updateWorkTrain(data) {
|
||||
return request({
|
||||
url: '/work/emergencyDrill',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除演练培训
|
||||
export function delWorkTrain(id) {
|
||||
return request({
|
||||
url: '/work/emergencyDrill/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询演练培训列表
|
||||
export function listProjectUnit(query) {
|
||||
return request({
|
||||
url: '/work/emergencyDrill/projectUnitList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
|
@ -42,3 +42,12 @@ export function delWorkTrain(id) {
|
|||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询演练培训列表
|
||||
export function listProjectUnit(query) {
|
||||
return request({
|
||||
url: '/work/workTrain/projectUnitList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
|
@ -64,7 +64,7 @@ export default {
|
|||
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||
fileType: {
|
||||
type: Array,
|
||||
default: () => ["doc", "docx", "xls", "xlsx", "ppt", "txt", "pdf", "png", "jpg", "jpeg", "mp4"],
|
||||
default: () => ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt", "pdf", "png", "jpg", "jpeg", "mp4"],
|
||||
},
|
||||
// 是否显示提示
|
||||
isShowTip: {
|
||||
|
|
|
@ -190,12 +190,16 @@
|
|||
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['project:surProject:remove']">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="handleDelete" icon="el-icon-delete"
|
||||
v-hasPermi="['project:surProject:remove']">删除项目</el-dropdown-item>
|
||||
<el-dropdown-item command="handleAssess" icon="el-icon-coordinate"
|
||||
v-hasPermi="['system:assess:list']">季度考核管理</el-dropdown-item>
|
||||
<el-dropdown-item command="handleBuildNode" icon="el-icon-data-analysis"
|
||||
v-hasPermi="['project:build_node_data:list']">计划节点管理</el-dropdown-item>
|
||||
<el-dropdown-item command="handleWorkTrain" icon="el-icon-notebook-2"
|
||||
v-hasPermi="['work:workTrain:add']">专项培训</el-dropdown-item>
|
||||
<el-dropdown-item command="handleEmergencyDrill" icon="el-icon-first-aid-kit"
|
||||
v-hasPermi="['work:emergencyDrill:add']">应急演练</el-dropdown-item>
|
||||
<el-dropdown-item command="handleDelete" icon="el-icon-delete"
|
||||
v-hasPermi="['project:surProject:remove']">删除项目</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
|
@ -438,6 +442,14 @@
|
|||
<assess-drawer ref="assessDrawer"></assess-drawer>
|
||||
<baidu-map ref="map" @success="mapSuccess"></baidu-map>
|
||||
<build-node-drawer ref="nodeDrawer"></build-node-drawer>
|
||||
<workTrainDrawer
|
||||
size="50%"
|
||||
:visible.sync="workTrainDrawerVisible"
|
||||
:form-data="formData"></workTrainDrawer>
|
||||
<emergencyDrillDrawer
|
||||
size="50%"
|
||||
:visible.sync="emergencyDrillDrawerVisible"
|
||||
:form-data="formData"></emergencyDrillDrawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -448,15 +460,20 @@ import projectUserInfoDrawer from '../surProjectUserInfo/projectUserInfoDrawer.v
|
|||
import BaiduMap from '@/components/BaiduMap/Map.vue'
|
||||
import AssessDrawer from '../surProjectQuarterlyAssess/assessDrawer.vue'
|
||||
import buildNodeDrawer from '../surBuildNode/buildNodeDrawer.vue'
|
||||
import workTrainDrawer from '../../work/workTrain/workTrainDrawer.vue'
|
||||
import emergencyDrillDrawer from '../../work/emergencyDrill/emergencyDrillDrawer.vue'
|
||||
|
||||
export default {
|
||||
name: "SurProject",
|
||||
components:{
|
||||
ProjectScheduleDlg,projectUserInfoDrawer,BaiduMap,AssessDrawer,buildNodeDrawer
|
||||
ProjectScheduleDlg,projectUserInfoDrawer,BaiduMap,AssessDrawer,buildNodeDrawer,workTrainDrawer,emergencyDrillDrawer
|
||||
},
|
||||
dicts: ['sys_check_state','sur_project_xmjd', 'project_build_type', 'sys_common_isdel', 'project_category','project_level','sur_project_weight'],
|
||||
data() {
|
||||
return {
|
||||
projectUserInfoDrawerVisible: false,
|
||||
workTrainDrawerVisible: false,
|
||||
emergencyDrillDrawerVisible: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
|
@ -659,6 +676,12 @@ export default {
|
|||
case "handleBuildNode":
|
||||
this.$refs.nodeDrawer.show(row);
|
||||
break;
|
||||
case "handleWorkTrain":
|
||||
this.handleWorkTrain(row);
|
||||
break;
|
||||
case "handleEmergencyDrill":
|
||||
this.handleEmergencyDrill(row);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -667,7 +690,7 @@ export default {
|
|||
handleProjectUserinfo(row) {
|
||||
this.formData.projectId = row.id;
|
||||
this.formData.projectName = row.projectName;
|
||||
this.projectUserInfoDrawerVisible = true
|
||||
this.projectUserInfoDrawerVisible = true;
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
|
@ -739,6 +762,16 @@ export default {
|
|||
this.$modal.msgSuccess("修改成功");
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
handleWorkTrain(row){
|
||||
this.formData.projectId = row.id;
|
||||
this.formData.projectName = row.projectName;
|
||||
this.workTrainDrawerVisible = true;
|
||||
},
|
||||
handleEmergencyDrill(row){
|
||||
this.formData.projectId = row.id;
|
||||
this.formData.projectName = row.projectName;
|
||||
this.emergencyDrillDrawerVisible = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
<dict-tag :options="dict.type.ssp_aqyhlx" :value="scope.row.projectType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="施工部位" align="center" prop="positionPart" width="150" show-overflow-tooltip/>
|
||||
<el-table-column label="问题描述" align="center" prop="positionPart" width="150" show-overflow-tooltip/>
|
||||
<el-table-column label="留痕说明" align="center" prop="marksRemark" width="200" show-overflow-tooltip/>
|
||||
<el-table-column label="审核人" align="center" prop="auditorPerson" />
|
||||
<el-table-column label="审核人手机号" align="center" prop="auditorPhone" />
|
||||
|
@ -202,8 +202,8 @@
|
|||
<el-form-item label="工序名称" prop="processName">
|
||||
<el-input v-model="form.processName" placeholder="请输入工序名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="施工部位" prop="positionPart">
|
||||
<el-input v-model="form.positionPart" placeholder="请输入施工部位" />
|
||||
<el-form-item label="问题描述" prop="positionPart">
|
||||
<el-input v-model="form.positionPart" placeholder="请输入问题描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="留痕说明" prop="marksRemark">
|
||||
<el-input v-model="form.marksRemark" placeholder="请输入留痕说明" />
|
||||
|
|
|
@ -27,10 +27,10 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="施工部位" prop="workParts">
|
||||
<el-form-item label="问题描述" prop="workParts">
|
||||
<el-input
|
||||
v-model="queryParams.workParts"
|
||||
placeholder="请输入施工部位"
|
||||
placeholder="请输入问题描述"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
@ -101,7 +101,7 @@
|
|||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="全部数据" name="all"></el-tab-pane>
|
||||
<el-tab-pane label="待整改" name="dzg"></el-tab-pane>
|
||||
<el-tab-pane label="待确认" name="dqr"></el-tab-pane>
|
||||
<el-tab-pane label="待复检" name="dqr"></el-tab-pane>
|
||||
<el-tab-pane label="已处理" name="ycl"></el-tab-pane>
|
||||
<el-table v-loading="loading" :data="sspProblemmodifyList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="40" align="center" v-if="false"/>
|
||||
|
@ -121,7 +121,7 @@
|
|||
<dict-tag :options="dict.type.ssp_aqyhlx" :value="scope.row.dangerType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="施工部位" align="center" prop="workParts" width="100" show-overflow-tooltip/>
|
||||
<el-table-column label="问题描述" align="center" prop="workParts" width="100" show-overflow-tooltip/>
|
||||
<el-table-column label="整改要求" align="center" prop="changeInfo" width="200" show-overflow-tooltip/>
|
||||
<el-table-column label="隐患整改人" align="left" width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
|
@ -198,8 +198,8 @@
|
|||
<el-form-item label="拍摄位置" prop="problemArea">
|
||||
<el-input v-model="form.problemArea" placeholder="请输入拍摄位置" />
|
||||
</el-form-item>
|
||||
<el-form-item label="施工部位" prop="workParts">
|
||||
<el-input v-model="form.workParts" placeholder="请输入施工部位" />
|
||||
<el-form-item label="问题描述" prop="workParts">
|
||||
<el-input v-model="form.workParts" placeholder="请输入问题描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="整改要求" prop="changeInfo">
|
||||
<el-input v-model="form.changeInfo" placeholder="请输入整改要求" />
|
||||
|
|
|
@ -112,7 +112,7 @@
|
|||
<dict-tag :options="dict.type.ssp_zlyhlx" :value="scope.row.projectType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="施工部位" align="center" prop="positionPart" width="150" show-overflow-tooltip/>
|
||||
<el-table-column label="问题描述" align="center" prop="positionPart" width="150" show-overflow-tooltip/>
|
||||
<el-table-column label="留痕说明" align="center" prop="marksRemark" width="200" show-overflow-tooltip/>
|
||||
<el-table-column label="审核人" align="center" prop="auditorPerson" />
|
||||
<el-table-column label="审核人手机号" align="center" prop="auditorPhone" />
|
||||
|
@ -202,8 +202,8 @@
|
|||
<el-form-item label="工序名称" prop="processName">
|
||||
<el-input v-model="form.processName" placeholder="请输入工序名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="施工部位" prop="positionPart">
|
||||
<el-input v-model="form.positionPart" placeholder="请输入施工部位" />
|
||||
<el-form-item label="问题描述" prop="positionPart">
|
||||
<el-input v-model="form.positionPart" placeholder="请输入问题描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="留痕说明" prop="marksRemark">
|
||||
<el-input v-model="form.marksRemark" placeholder="请输入留痕说明" />
|
||||
|
|
|
@ -27,10 +27,10 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="施工部位" prop="workParts">
|
||||
<el-form-item label="问题描述" prop="workParts">
|
||||
<el-input
|
||||
v-model="queryParams.workParts"
|
||||
placeholder="请输入施工部位"
|
||||
placeholder="请输入问题描述"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
@ -101,7 +101,7 @@
|
|||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="全部数据" name="all"></el-tab-pane>
|
||||
<el-tab-pane label="待整改" name="dzg"></el-tab-pane>
|
||||
<el-tab-pane label="待确认" name="dqr"></el-tab-pane>
|
||||
<el-tab-pane label="待复检" name="dqr"></el-tab-pane>
|
||||
<el-tab-pane label="已处理" name="ycl"></el-tab-pane>
|
||||
<el-table v-loading="loading" :data="sspProblemmodifyList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="40" align="center" v-if="false"/>
|
||||
|
@ -121,7 +121,7 @@
|
|||
<dict-tag :options="dict.type.ssp_zlyhlx" :value="scope.row.dangerType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="施工部位" align="center" prop="workParts" width="100" show-overflow-tooltip/>
|
||||
<el-table-column label="问题描述" align="center" prop="workParts" width="100" show-overflow-tooltip/>
|
||||
<el-table-column label="整改要求" align="center" prop="changeInfo" width="200" show-overflow-tooltip/>
|
||||
<el-table-column label="隐患整改人" align="left" width="120" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
|
@ -198,8 +198,8 @@
|
|||
<el-form-item label="拍摄位置" prop="problemArea">
|
||||
<el-input v-model="form.problemArea" placeholder="请输入拍摄位置" />
|
||||
</el-form-item>
|
||||
<el-form-item label="施工部位" prop="workParts">
|
||||
<el-input v-model="form.workParts" placeholder="请输入施工部位" />
|
||||
<el-form-item label="问题描述" prop="workParts">
|
||||
<el-input v-model="form.workParts" placeholder="请输入问题描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="整改要求" prop="changeInfo">
|
||||
<el-input v-model="form.changeInfo" placeholder="请输入整改要求" />
|
||||
|
|
|
@ -0,0 +1,380 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-drawer v-bind="$attrs" v-if="onOpen" v-on="$listeners" @opened="onOpen" @close="onClose" style="padding-left: 20px;">
|
||||
<el-row :gutter="10" class="mb8" style="margin-left: 25px; margin-top:10px;">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['work:emergencyDrill:add']"
|
||||
>添加</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getworkTrainList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="workTrainList" style="margin-left: 20px;margin-right: 20px;" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="演练主图" align="center" prop="mainImage" width="80">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.mainImage" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="演练类型" align="center" prop="trainNature" width="130" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.train_nature_yjyl" :value="scope.row.trainNature"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="参与人数" align="center" prop="trainParticipants" width="90"/>
|
||||
<el-table-column label="开始时间" align="center" prop="beginDate" width="100">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ parseTime(scope.row.beginDate, '{y}-{m}-{d}') }}</div>
|
||||
<div>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="演练内容" align="center" prop="trainContent" width="150" show-overflow-tooltip />
|
||||
<el-table-column label="协同部门" align="center" prop="trainDeptNames" width="220" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<div class='div_tag' v-for="dept in getTrainDeptNames(scope.row.trainDeptNames)"><el-tag>{{ dept }}</el-tag></div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="120" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.vDel=='0'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['work:emergencyDrill:edit']"
|
||||
>修改</el-button>
|
||||
<el-button v-if="scope.row.vDel=='0'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['work:emergencyDrill:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getworkTrainList"
|
||||
/>
|
||||
<el-dialog :title="title" v-if="open" :visible.sync="open" width="680px" append-to-body :close-on-click-modal="false" :close-on-press-escape="false">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="项目名称">
|
||||
<el-input placeholder="项目名称" v-model="form.projectName" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="演练主图" prop="mainImage">
|
||||
<image-upload v-model="form.mainImage" :limit="1"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="演练类型" prop="trainNature">
|
||||
<el-select v-model="form.trainNature" placeholder="请选择演练类型" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="dict in dict.type.train_nature_yjyl"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="参与人数" prop="trainParticipants">
|
||||
<el-input type="number" v-model="form.trainParticipants" placeholder="请输入参与人数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="演练日期" prop="daterangeMarksTime">
|
||||
<el-date-picker
|
||||
v-model="daterangeMarksTime"
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="演练内容" prop="trainContent">
|
||||
<el-input type="textarea" v-model="form.trainContent" placeholder="请输入演练内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="协同部门" prop="remark">
|
||||
<el-select v-model="form.workTrainDeptList" multiple placeholder="请选择协同部门" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in deptOptions"
|
||||
:key="item.deptId"
|
||||
:label="item.deptName"
|
||||
:value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listWorkTrain, getWorkTrain, delWorkTrain, addWorkTrain, updateWorkTrain, listProjectUnit } from "@/api/work/emergencyDrill";
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
props: {
|
||||
formData: {
|
||||
projectId: String,
|
||||
projectName: String
|
||||
}
|
||||
},
|
||||
dicts: ['train_nature_yjyl'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 应急演练表格数据
|
||||
workTrainList: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
deptOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
trainType: 1,
|
||||
projectId: null
|
||||
},
|
||||
daterangeMarksTime: [],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
mainImage: [
|
||||
{ required: true, message: "请上传演练主图", trigger: "blur" }
|
||||
],
|
||||
trainNature: [
|
||||
{ required: true, message: "请选择演练类型", trigger: "blur" }
|
||||
],
|
||||
trainParticipants: [
|
||||
{ required: true, message: "请输入参与人数", trigger: "blur" }
|
||||
],
|
||||
trainContent: [
|
||||
{ required: true, message: "请输入演练内容", trigger: "blur" },
|
||||
{ maxlength: 1000, message: '演练内容长度在最多1000个字符',trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {
|
||||
formData: {
|
||||
handler(value) {
|
||||
this.formData = value
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
getTrainDeptNames(vals){
|
||||
if(vals!=null){
|
||||
return vals.split(',');
|
||||
}else{
|
||||
return [];
|
||||
}
|
||||
},
|
||||
onOpen() {
|
||||
this.getworkTrainList();
|
||||
},
|
||||
onClose() {},
|
||||
/** 查询应急演练列表 */
|
||||
getworkTrainList() {
|
||||
if(this.formData.projectId){
|
||||
this.loading = true;
|
||||
this.queryParams.projectId = this.formData.projectId;
|
||||
listWorkTrain(this.queryParams).then(response => {
|
||||
this.workTrainList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
projectId: null,
|
||||
deptId: null,
|
||||
deptName: null,
|
||||
deptType: null,
|
||||
jobType: null,
|
||||
userId: null,
|
||||
isDel: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null
|
||||
};
|
||||
this.deptOptions=[];
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.form.projectId=this.formData.projectId;
|
||||
this.form.projectName=this.formData.projectName;
|
||||
this.daterangeMarksTime=[];
|
||||
this.open = true;
|
||||
this.title = "添加应急演练";
|
||||
this.getDeptList();
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 获取协同部门列表
|
||||
getDeptList(id) {
|
||||
this.loading = true;
|
||||
let param = {
|
||||
projectId:this.form.projectId
|
||||
}
|
||||
//获取项目部门列表的接口
|
||||
listProjectUnit(param).then(response => {
|
||||
this.loading = false;
|
||||
this.deptOptions = response.data;
|
||||
})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (null != this.daterangeMarksTime && '' != this.daterangeMarksTime) {
|
||||
this.form.beginDate = this.daterangeMarksTime[0];
|
||||
this.form.endDate = this.daterangeMarksTime[1];
|
||||
}else{
|
||||
this.$modal.msgWarning("请选择演练时间");
|
||||
return false;
|
||||
}
|
||||
// 重新组装部门数据
|
||||
let depts = [];
|
||||
this.form.workTrainDeptList.forEach(item => {
|
||||
depts.push({deptId:item});
|
||||
});
|
||||
this.form.workTrainDeptList = depts;
|
||||
if (this.form.id != null) {
|
||||
updateWorkTrain(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getworkTrainList();
|
||||
});
|
||||
} else {
|
||||
this.form.trainType = 1;
|
||||
this.form.isDel = 0;
|
||||
addWorkTrain(this.form).then(response => {
|
||||
this.$modal.msgSuccess("添加成功");
|
||||
this.open = false;
|
||||
this.getworkTrainList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.title = "修改应急演练";
|
||||
const id = row.id || this.ids
|
||||
let param = {
|
||||
projectId:this.formData.projectId
|
||||
}
|
||||
//获取项目部门列表的接口
|
||||
listProjectUnit(param).then(response => {
|
||||
this.deptOptions = response.data;
|
||||
this.open = true;
|
||||
})
|
||||
getWorkTrain(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.daterangeMarksTime=[];
|
||||
this.daterangeMarksTime[0] = new Date(this.form.beginDate);
|
||||
this.daterangeMarksTime[1] = new Date(this.form.endDate);
|
||||
let depts = [];
|
||||
this.form.workTrainDeptList.forEach(item => {
|
||||
depts.push(item.deptId);
|
||||
})
|
||||
this.form.workTrainDeptList = depts;
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除应急演练编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delSurProjectUserInfo(ids);
|
||||
}).then(() => {
|
||||
this.getworkTrainList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
//日期格式化
|
||||
getDateTime(unixtimestamp) {
|
||||
var unixtimestamp = new Date(unixtimestamp);
|
||||
var year = 1900 + unixtimestamp.getYear();
|
||||
var month = "0" + (unixtimestamp.getMonth() + 1);
|
||||
var date = "0" + unixtimestamp.getDate();
|
||||
var hour = "0" + unixtimestamp.getHours();
|
||||
var minute = "0" + unixtimestamp.getMinutes();
|
||||
var second = "0" + unixtimestamp.getSeconds();
|
||||
return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length) +
|
||||
" " + hour.substring(hour.length - 2, hour.length) + ":" +
|
||||
minute.substring(minute.length - 2, minute.length) + ":" +
|
||||
second.substring(second.length - 2, second.length);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import '@/styles/mixin.scss';
|
||||
|
||||
::v-deep .el-drawer__header {
|
||||
display: none;
|
||||
}
|
||||
@include action-bar;
|
||||
|
||||
.json-editor{
|
||||
height: calc(100vh - 33px);
|
||||
}
|
||||
.div_tag{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
|
@ -1,31 +1,42 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="工作性质" prop="trainNature">
|
||||
<el-form-item label="项目名称" prop="projectName">
|
||||
<el-input
|
||||
v-model="queryParams.trainNature"
|
||||
placeholder="请输入工作性质"
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标识" prop="isDel">
|
||||
<el-select v-model="queryParams.isDel" placeholder="请选择删除标识" clearable>
|
||||
<el-form-item label="演练类型" prop="trainNature">
|
||||
<el-select v-model="queryParams.trainNature" @keyup.enter.native="handleQuery" placeholder="请选择演练类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_common_isdel"
|
||||
v-for="dict in dict.type.train_nature_yjyl"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="演练时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeMarksTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
|
@ -69,49 +80,53 @@
|
|||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
|
||||
<el-table v-loading="loading" :data="workTrainList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="主图" align="center" prop="mainImage" width="100">
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" width="200"/>
|
||||
<el-table-column label="演练主图" align="center" prop="mainImage" width="200">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.mainImage" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作类型" align="center" prop="trainType" />
|
||||
<el-table-column label="工作性质" align="center" prop="trainNature">
|
||||
<el-table-column label="演练类型" align="center" prop="trainNature">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.train_nature_yjyl" :value="scope.row.trainNature"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作参与者" align="center" prop="trainParticipants" />
|
||||
<el-table-column label="开始时间" align="center" prop="beginDate" width="180">
|
||||
<el-table-column label="参与人数" align="center" prop="trainParticipants" />
|
||||
<el-table-column label="开始时间" align="center" prop="beginDate" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.beginDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束时间" align="center" prop="endDate" width="180">
|
||||
<el-table-column label="结束时间" align="center" prop="endDate" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="删除标识" align="center" prop="isDel">
|
||||
<el-table-column label="演练内容" align="center" prop="trainContent" width="150" show-overflow-tooltip />
|
||||
<el-table-column label="协同部门" align="center" prop="trainDeptNames" width="220" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<div class='div_tag' v-for="dept in getTrainDeptNames(scope.row.trainDeptNames)"><el-tag>{{ dept }}</el-tag></div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数据状态" align="center" prop="isDel">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_common_isdel" :value="scope.row.isDel"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
<el-button v-if="scope.row.vDel=='0'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['work:workTrain:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
<el-button v-if="scope.row.vDel=='0'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
|
@ -130,70 +145,52 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改演练培训对话框 -->
|
||||
<!-- 添加或修改演练演练对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="主图" prop="mainImage">
|
||||
<image-upload v-model="form.mainImage"/>
|
||||
<el-form-item label="项目名称">
|
||||
<el-input placeholder="请输入项目名称" v-model="form.projectName" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="演练主图" prop="mainImage">
|
||||
<image-upload v-model="form.mainImage" :limit="1"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工作性质" prop="trainNature">
|
||||
<el-input v-model="form.trainNature" placeholder="请输入工作性质" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工作参与者" prop="trainParticipants">
|
||||
<el-input v-model="form.trainParticipants" placeholder="请输入工作参与者" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开始时间" prop="beginDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.beginDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择开始时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="结束时间" prop="endDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.endDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择结束时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标识" prop="isDel">
|
||||
<el-select v-model="form.isDel" placeholder="请选择删除标识">
|
||||
<el-form-item label="演练类型" prop="trainNature">
|
||||
<el-select v-model="form.trainNature" filterable placeholder="请选择演练类型" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_common_isdel"
|
||||
v-for="dict in dict.type.train_nature_yjyl"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
<el-form-item label="参与人数" prop="trainParticipants">
|
||||
<el-input type="number" v-model="form.trainParticipants" placeholder="请输入工作参与者" />
|
||||
</el-form-item>
|
||||
<el-form-item label="演练日期" prop="daterangeMarksTime">
|
||||
<el-date-picker
|
||||
v-model="daterangeMarksTime"
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="演练内容" prop="trainContent">
|
||||
<el-input type="textarea" v-model="form.trainContent" placeholder="请输入演练内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="协同部门" prop="workTrainDeptList">
|
||||
<el-select v-model="form.workTrainDeptList" multiple placeholder="请选择协同部门" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in deptOptions"
|
||||
:key="item.deptId"
|
||||
:label="item.deptName"
|
||||
:value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-divider content-position="center">演练培训协同部门信息</el-divider>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddWorkTrainDept">添加</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteWorkTrainDept">删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :data="workTrainDeptList" :row-class-name="rowWorkTrainDeptIndex" @selection-change="handleWorkTrainDeptSelectionChange" ref="workTrainDept">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
||||
<el-table-column label="协同部门主键" prop="deptId" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.deptId" placeholder="请输入协同部门主键" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否组织部门" prop="isMain" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.isMain" placeholder="请输入是否组织部门" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
|
@ -204,11 +201,11 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { listWorkTrain, getWorkTrain, delWorkTrain, addWorkTrain, updateWorkTrain } from "@/api/work/workTrain";
|
||||
import { listWorkTrain, getWorkTrain, delWorkTrain, addWorkTrain, updateWorkTrain, listProjectUnit } from "@/api/work/emergencyDrill";
|
||||
|
||||
export default {
|
||||
name: "WorkTrain",
|
||||
dicts: ['sys_common_isdel'],
|
||||
dicts: ['train_nature_yjyl','sys_common_isdel'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
@ -225,10 +222,13 @@ export default {
|
|||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 演练培训表格数据
|
||||
deptOptions: [],
|
||||
// 演练演练表格数据
|
||||
workTrainList: [],
|
||||
// 演练培训协同部门表格数据
|
||||
// 演练演练协同部门表格数据
|
||||
workTrainDeptList: [],
|
||||
// 时间范围
|
||||
daterangeMarksTime: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
|
@ -237,7 +237,8 @@ export default {
|
|||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
trainType: null,
|
||||
projectName: '',
|
||||
trainType: 1,
|
||||
trainNature: null,
|
||||
isDel: null,
|
||||
},
|
||||
|
@ -252,9 +253,21 @@ export default {
|
|||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询演练培训列表 */
|
||||
getTrainDeptNames(vals){
|
||||
if(vals!=null){
|
||||
return vals.split(',');
|
||||
}else{
|
||||
return [];
|
||||
}
|
||||
},
|
||||
/** 查询演练演练列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeMarksTime && '' != this.daterangeMarksTime) {
|
||||
this.queryParams.params["beginMarksTime"] = this.daterangeMarksTime[0];
|
||||
this.queryParams.params["endMarksTime"] = this.daterangeMarksTime[1];
|
||||
}
|
||||
listWorkTrain(this.queryParams).then(response => {
|
||||
this.workTrainList = response.rows;
|
||||
this.total = response.total;
|
||||
|
@ -270,6 +283,8 @@ export default {
|
|||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
projectId: null,
|
||||
projectName: null,
|
||||
mainImage: null,
|
||||
trainType: null,
|
||||
trainNature: null,
|
||||
|
@ -306,24 +321,49 @@ export default {
|
|||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加演练培训";
|
||||
this.title = "添加演练演练";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
const id = row.id || this.ids;
|
||||
let param = {
|
||||
projectId:row.projectId
|
||||
}
|
||||
this.open = true;
|
||||
//获取项目部门列表的接口
|
||||
listProjectUnit(param).then(response => {
|
||||
this.deptOptions = response.data;
|
||||
})
|
||||
getWorkTrain(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.workTrainDeptList = response.data.workTrainDeptList;
|
||||
this.open = true;
|
||||
this.title = "修改演练培训";
|
||||
this.form = response.data;
|
||||
this.daterangeMarksTime=[];
|
||||
this.daterangeMarksTime[0] = new Date(this.form.beginDate);
|
||||
this.daterangeMarksTime[1] = new Date(this.form.endDate);
|
||||
let depts = [];
|
||||
this.form.workTrainDeptList.forEach(item => {
|
||||
depts.push(item.deptId);
|
||||
})
|
||||
this.form.workTrainDeptList = depts;
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.form.workTrainDeptList = this.workTrainDeptList;
|
||||
if (null != this.daterangeMarksTime && '' != this.daterangeMarksTime) {
|
||||
this.form.beginDate = this.daterangeMarksTime[0];
|
||||
this.form.endDate = this.daterangeMarksTime[1];
|
||||
}else{
|
||||
this.$modal.msgWarning("请选择演练时间");
|
||||
return false;
|
||||
}
|
||||
// 重新组装部门数据
|
||||
let depts = [];
|
||||
this.form.workTrainDeptList.forEach(item => {
|
||||
depts.push({deptId:item});
|
||||
});
|
||||
this.form.workTrainDeptList = depts;
|
||||
if (this.form.id != null) {
|
||||
updateWorkTrain(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
|
@ -343,28 +383,28 @@ export default {
|
|||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除演练培训编号为"' + ids + '"的数据项?').then(function() {
|
||||
this.$modal.confirm('是否确认删除演练演练编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delWorkTrain(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 演练培训协同部门序号 */
|
||||
/** 演练演练协同部门序号 */
|
||||
rowWorkTrainDeptIndex({ row, rowIndex }) {
|
||||
row.index = rowIndex + 1;
|
||||
},
|
||||
/** 演练培训协同部门添加按钮操作 */
|
||||
/** 演练演练协同部门添加按钮操作 */
|
||||
handleAddWorkTrainDept() {
|
||||
let obj = {};
|
||||
obj.deptId = "";
|
||||
obj.isMain = "";
|
||||
this.workTrainDeptList.push(obj);
|
||||
},
|
||||
/** 演练培训协同部门删除按钮操作 */
|
||||
/** 演练演练协同部门删除按钮操作 */
|
||||
handleDeleteWorkTrainDept() {
|
||||
if (this.checkedWorkTrainDept.length == 0) {
|
||||
this.$modal.msgError("请先选择要删除的演练培训协同部门数据");
|
||||
this.$modal.msgError("请先选择要删除的演练演练协同部门数据");
|
||||
} else {
|
||||
const workTrainDeptList = this.workTrainDeptList;
|
||||
const checkedWorkTrainDept = this.checkedWorkTrainDept;
|
||||
|
@ -386,3 +426,8 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.div_tag{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
|
@ -1,7 +1,15 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="工作性质" prop="trainNature">
|
||||
<el-form-item label="项目名称" prop="projectName">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="培训类型" prop="trainNature">
|
||||
<el-select v-model="queryParams.trainNature" @keyup.enter.native="handleQuery" placeholder="请选择培训类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.train_nature_zxpx"
|
||||
|
@ -11,15 +19,16 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标识" prop="isDel">
|
||||
<el-select v-model="queryParams.isDel" placeholder="请选择删除标识" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_common_isdel"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-form-item label="培训时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeMarksTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
|
@ -27,7 +36,7 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
|
@ -71,11 +80,10 @@
|
|||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
|
||||
<el-table v-loading="loading" :data="workTrainList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" v-if="false"/>
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" width="200"/>
|
||||
<el-table-column label="培训主图" align="center" prop="mainImage" width="200">
|
||||
<template slot-scope="scope">
|
||||
|
@ -88,32 +96,37 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="参与人数" align="center" prop="trainParticipants" />
|
||||
<el-table-column label="开始时间" align="center" prop="beginDate" width="180">
|
||||
<el-table-column label="开始时间" align="center" prop="beginDate" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.beginDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结束时间" align="center" prop="endDate" width="180">
|
||||
<el-table-column label="结束时间" align="center" prop="endDate" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="删除标识" align="center" prop="isDel">
|
||||
<el-table-column label="培训内容" align="center" prop="trainContent" width="150" show-overflow-tooltip />
|
||||
<el-table-column label="协同部门" align="center" prop="trainDeptNames" width="220" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<div class='div_tag' v-for="dept in getTrainDeptNames(scope.row.trainDeptNames)"><el-tag>{{ dept }}</el-tag></div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数据状态" align="center" prop="isDel">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_common_isdel" :value="scope.row.isDel"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
<el-button v-if="scope.row.vDel=='0'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['work:workTrain:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
<el-button v-if="scope.row.vDel=='0'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
|
@ -135,13 +148,16 @@
|
|||
<!-- 添加或修改演练培训对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="项目名称">
|
||||
<el-input placeholder="请输入项目名称" v-model="form.projectName" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="培训主图" prop="mainImage">
|
||||
<image-upload v-model="form.mainImage" :limit="1"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="培训类型" prop="trainNature">
|
||||
<el-select v-model="form.trainNature" filterable placeholder="请选择培训类型" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_job_type"
|
||||
v-for="dict in dict.type.train_nature_zxpx"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
|
@ -151,10 +167,10 @@
|
|||
<el-form-item label="参与人数" prop="trainParticipants">
|
||||
<el-input type="number" v-model="form.trainParticipants" placeholder="请输入工作参与者" />
|
||||
</el-form-item>
|
||||
<el-form-item label="培训日期" prop="daterangeMarksTime" style="width: 100%;">
|
||||
<el-form-item label="培训日期" prop="daterangeMarksTime">
|
||||
<el-date-picker
|
||||
v-model="daterangeMarksTime"
|
||||
style="width: 240px"
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
|
@ -162,35 +178,19 @@
|
|||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="培训内容" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
<el-form-item label="培训内容" prop="trainContent">
|
||||
<el-input type="textarea" v-model="form.trainContent" placeholder="请输入培训内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
<el-form-item label="协同部门" prop="workTrainDeptList">
|
||||
<el-select v-model="form.workTrainDeptList" multiple placeholder="请选择协同部门" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in deptOptions"
|
||||
:key="item.deptId"
|
||||
:label="item.deptName"
|
||||
:value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-divider content-position="center">演练培训协同部门信息</el-divider>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddWorkTrainDept">添加</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteWorkTrainDept">删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :data="workTrainDeptList" :row-class-name="rowWorkTrainDeptIndex" @selection-change="handleWorkTrainDeptSelectionChange" ref="workTrainDept">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
||||
<el-table-column label="协同部门主键" prop="deptId" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.deptId" placeholder="请输入协同部门主键" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否组织部门" prop="isMain" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.isMain" placeholder="请输入是否组织部门" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
|
@ -201,7 +201,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { listWorkTrain, getWorkTrain, delWorkTrain, addWorkTrain, updateWorkTrain } from "@/api/work/workTrain";
|
||||
import { listWorkTrain, getWorkTrain, delWorkTrain, addWorkTrain, updateWorkTrain, listProjectUnit } from "@/api/work/workTrain";
|
||||
|
||||
export default {
|
||||
name: "WorkTrain",
|
||||
|
@ -222,6 +222,7 @@ export default {
|
|||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
deptOptions: [],
|
||||
// 演练培训表格数据
|
||||
workTrainList: [],
|
||||
// 演练培训协同部门表格数据
|
||||
|
@ -236,7 +237,8 @@ export default {
|
|||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
trainType: null,
|
||||
projectName: '',
|
||||
trainType: 0,
|
||||
trainNature: null,
|
||||
isDel: null,
|
||||
},
|
||||
|
@ -251,9 +253,21 @@ export default {
|
|||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
getTrainDeptNames(vals){
|
||||
if(vals!=null){
|
||||
return vals.split(',');
|
||||
}else{
|
||||
return [];
|
||||
}
|
||||
},
|
||||
/** 查询演练培训列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeMarksTime && '' != this.daterangeMarksTime) {
|
||||
this.queryParams.params["beginMarksTime"] = this.daterangeMarksTime[0];
|
||||
this.queryParams.params["endMarksTime"] = this.daterangeMarksTime[1];
|
||||
}
|
||||
listWorkTrain(this.queryParams).then(response => {
|
||||
this.workTrainList = response.rows;
|
||||
this.total = response.total;
|
||||
|
@ -269,6 +283,8 @@ export default {
|
|||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
projectId: null,
|
||||
projectName: null,
|
||||
mainImage: null,
|
||||
trainType: null,
|
||||
trainNature: null,
|
||||
|
@ -310,19 +326,44 @@ export default {
|
|||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
const id = row.id || this.ids;
|
||||
let param = {
|
||||
projectId:row.projectId
|
||||
}
|
||||
this.open = true;
|
||||
//获取项目部门列表的接口
|
||||
listProjectUnit(param).then(response => {
|
||||
this.deptOptions = response.data;
|
||||
})
|
||||
getWorkTrain(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.workTrainDeptList = response.data.workTrainDeptList;
|
||||
this.open = true;
|
||||
this.title = "修改演练培训";
|
||||
this.form = response.data;
|
||||
this.daterangeMarksTime=[];
|
||||
this.daterangeMarksTime[0] = new Date(this.form.beginDate);
|
||||
this.daterangeMarksTime[1] = new Date(this.form.endDate);
|
||||
let depts = [];
|
||||
this.form.workTrainDeptList.forEach(item => {
|
||||
depts.push(item.deptId);
|
||||
})
|
||||
this.form.workTrainDeptList = depts;
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.form.workTrainDeptList = this.workTrainDeptList;
|
||||
if (null != this.daterangeMarksTime && '' != this.daterangeMarksTime) {
|
||||
this.form.beginDate = this.daterangeMarksTime[0];
|
||||
this.form.endDate = this.daterangeMarksTime[1];
|
||||
}else{
|
||||
this.$modal.msgWarning("请选择培训时间");
|
||||
return false;
|
||||
}
|
||||
// 重新组装部门数据
|
||||
let depts = [];
|
||||
this.form.workTrainDeptList.forEach(item => {
|
||||
depts.push({deptId:item});
|
||||
});
|
||||
this.form.workTrainDeptList = depts;
|
||||
if (this.form.id != null) {
|
||||
updateWorkTrain(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
|
@ -385,3 +426,8 @@ export default {
|
|||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.div_tag{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,380 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-drawer v-bind="$attrs" v-if="onOpen" v-on="$listeners" @opened="onOpen" @close="onClose" style="padding-left: 20px;">
|
||||
<el-row :gutter="10" class="mb8" style="margin-left: 25px; margin-top:10px;">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['work:workTrain:add']"
|
||||
>添加</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getworkTrainList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="workTrainList" style="margin-left: 20px;margin-right: 20px;" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="培训主图" align="center" prop="mainImage" width="80">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.mainImage" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="培训类型" align="center" prop="trainNature" width="130" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.train_nature_zxpx" :value="scope.row.trainNature"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="参与人数" align="center" prop="trainParticipants" width="90"/>
|
||||
<el-table-column label="开始时间" align="center" prop="beginDate" width="100">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ parseTime(scope.row.beginDate, '{y}-{m}-{d}') }}</div>
|
||||
<div>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="培训内容" align="center" prop="trainContent" width="150" show-overflow-tooltip />
|
||||
<el-table-column label="协同部门" align="center" prop="trainDeptNames" width="220" show-overflow-tooltip >
|
||||
<template slot-scope="scope">
|
||||
<div class='div_tag' v-for="dept in getTrainDeptNames(scope.row.trainDeptNames)"><el-tag>{{ dept }}</el-tag></div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="120" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.vDel=='0'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['work:workTrain:edit']"
|
||||
>修改</el-button>
|
||||
<el-button v-if="scope.row.vDel=='0'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['work:workTrain:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getworkTrainList"
|
||||
/>
|
||||
<el-dialog :title="title" v-if="open" :visible.sync="open" width="680px" append-to-body :close-on-click-modal="false" :close-on-press-escape="false">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="项目名称">
|
||||
<el-input placeholder="请输入项目名称" v-model="form.projectName" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="培训主图" prop="mainImage">
|
||||
<image-upload v-model="form.mainImage" :limit="1"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="培训类型" prop="trainNature">
|
||||
<el-select v-model="form.trainNature" placeholder="请选择培训类型" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="dict in dict.type.train_nature_zxpx"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="参与人数" prop="trainParticipants">
|
||||
<el-input type="number" v-model="form.trainParticipants" placeholder="请输入参与人数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="培训日期" prop="daterangeMarksTime">
|
||||
<el-date-picker
|
||||
v-model="daterangeMarksTime"
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="培训内容" prop="trainContent">
|
||||
<el-input type="textarea" v-model="form.trainContent" placeholder="请输入培训内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="协同部门" prop="workTrainDeptList">
|
||||
<el-select v-model="form.workTrainDeptList" multiple placeholder="请选择协同部门" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="item in deptOptions"
|
||||
:key="item.deptId"
|
||||
:label="item.deptName"
|
||||
:value="item.deptId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listWorkTrain, getWorkTrain, delWorkTrain, addWorkTrain, updateWorkTrain, listProjectUnit } from "@/api/work/workTrain";
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
props: {
|
||||
formData: {
|
||||
projectId: String,
|
||||
projectName: String
|
||||
}
|
||||
},
|
||||
dicts: ['train_nature_zxpx'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 专项培训表格数据
|
||||
workTrainList: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
deptOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
trainType: 0,
|
||||
projectId: null
|
||||
},
|
||||
daterangeMarksTime: [],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
mainImage: [
|
||||
{ required: true, message: "请上传培训主图", trigger: "blur" }
|
||||
],
|
||||
trainNature: [
|
||||
{ required: true, message: "请选择培训类型", trigger: "blur" }
|
||||
],
|
||||
trainParticipants: [
|
||||
{ required: true, message: "请输入参与人数", trigger: "blur" }
|
||||
],
|
||||
trainContent: [
|
||||
{ required: true, message: "请输入培训内容", trigger: "blur" },
|
||||
{ maxlength: 1000, message: '培训内容长度在最多1000个字符',trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {
|
||||
formData: {
|
||||
handler(value) {
|
||||
this.formData = value
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
getTrainDeptNames(vals){
|
||||
if(vals!=null){
|
||||
return vals.split(',');
|
||||
}else{
|
||||
return [];
|
||||
}
|
||||
},
|
||||
onOpen() {
|
||||
this.getworkTrainList();
|
||||
},
|
||||
onClose() {},
|
||||
/** 查询专项培训列表 */
|
||||
getworkTrainList() {
|
||||
if(this.formData.projectId){
|
||||
this.loading = true;
|
||||
this.queryParams.projectId = this.formData.projectId;
|
||||
listWorkTrain(this.queryParams).then(response => {
|
||||
this.workTrainList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
projectId: null,
|
||||
deptId: null,
|
||||
deptName: null,
|
||||
deptType: null,
|
||||
jobType: null,
|
||||
userId: null,
|
||||
isDel: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null
|
||||
};
|
||||
this.deptOptions=[];
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.form.projectId=this.formData.projectId;
|
||||
this.form.projectName=this.formData.projectName;
|
||||
this.daterangeMarksTime=[];
|
||||
this.open = true;
|
||||
this.title = "添加专项培训";
|
||||
this.getDeptList();
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 获取协同部门列表
|
||||
getDeptList(id) {
|
||||
this.loading = true;
|
||||
let param = {
|
||||
projectId:this.form.projectId
|
||||
}
|
||||
//获取项目部门列表的接口
|
||||
listProjectUnit(param).then(response => {
|
||||
this.loading = false;
|
||||
this.deptOptions = response.data;
|
||||
})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (null != this.daterangeMarksTime && '' != this.daterangeMarksTime) {
|
||||
this.form.beginDate = this.daterangeMarksTime[0];
|
||||
this.form.endDate = this.daterangeMarksTime[1];
|
||||
}else{
|
||||
this.$modal.msgWarning("请选择培训时间");
|
||||
return false;
|
||||
}
|
||||
// 重新组装部门数据
|
||||
let depts = [];
|
||||
this.form.workTrainDeptList.forEach(item => {
|
||||
depts.push({deptId:item});
|
||||
});
|
||||
this.form.workTrainDeptList = depts;
|
||||
if (this.form.id != null) {
|
||||
updateWorkTrain(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getworkTrainList();
|
||||
});
|
||||
} else {
|
||||
this.form.trainType = 0;
|
||||
this.form.isDel = 0;
|
||||
addWorkTrain(this.form).then(response => {
|
||||
this.$modal.msgSuccess("添加成功");
|
||||
this.open = false;
|
||||
this.getworkTrainList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.title = "修改专项培训";
|
||||
const id = row.id || this.ids
|
||||
let param = {
|
||||
projectId:this.formData.projectId
|
||||
}
|
||||
this.open = true;
|
||||
//获取项目部门列表的接口
|
||||
listProjectUnit(param).then(response => {
|
||||
this.deptOptions = response.data;
|
||||
})
|
||||
getWorkTrain(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.daterangeMarksTime=[];
|
||||
this.daterangeMarksTime[0] = new Date(this.form.beginDate);
|
||||
this.daterangeMarksTime[1] = new Date(this.form.endDate);
|
||||
let depts = [];
|
||||
this.form.workTrainDeptList.forEach(item => {
|
||||
depts.push(item.deptId);
|
||||
})
|
||||
this.form.workTrainDeptList = depts;
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除专项培训编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delSurProjectUserInfo(ids);
|
||||
}).then(() => {
|
||||
this.getworkTrainList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
//日期格式化
|
||||
getDateTime(unixtimestamp) {
|
||||
var unixtimestamp = new Date(unixtimestamp);
|
||||
var year = 1900 + unixtimestamp.getYear();
|
||||
var month = "0" + (unixtimestamp.getMonth() + 1);
|
||||
var date = "0" + unixtimestamp.getDate();
|
||||
var hour = "0" + unixtimestamp.getHours();
|
||||
var minute = "0" + unixtimestamp.getMinutes();
|
||||
var second = "0" + unixtimestamp.getSeconds();
|
||||
return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length) +
|
||||
" " + hour.substring(hour.length - 2, hour.length) + ":" +
|
||||
minute.substring(minute.length - 2, minute.length) + ":" +
|
||||
second.substring(second.length - 2, second.length);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import '@/styles/mixin.scss';
|
||||
|
||||
::v-deep .el-drawer__header {
|
||||
display: none;
|
||||
}
|
||||
@include action-bar;
|
||||
|
||||
.json-editor{
|
||||
height: calc(100vh - 33px);
|
||||
}
|
||||
.div_tag{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
|
@ -219,16 +219,17 @@ public class PshServiceImpl implements IPshService {
|
|||
ChangeNickedInfo.put("fileListImg", fileListImg);
|
||||
} else {
|
||||
ChangeNickedInfo.put("fileListImgState", "NO");
|
||||
ChangeNickedInfo.put("fileListImg", new ArrayList<>());
|
||||
}
|
||||
//视频
|
||||
map.put("fileType","1");
|
||||
List<Map<String, Object>> fileListVideo = pshMapper.listChangeNickedFile(map);
|
||||
if(fileListVideo != null && fileListVideo.size() > 0) {
|
||||
ChangeNickedInfo.put("fileListVideoState", "OK");
|
||||
ChangeNickedInfo.put("fileListVideo", fileListVideo);
|
||||
} else {
|
||||
//map.put("fileType","1");
|
||||
//List<Map<String, Object>> fileListVideo = pshMapper.listChangeNickedFile(map);
|
||||
//if(fileListVideo != null && fileListVideo.size() > 0) {
|
||||
// ChangeNickedInfo.put("fileListVideoState", "OK");
|
||||
// ChangeNickedInfo.put("fileListVideo", fileListVideo);
|
||||
//} else {
|
||||
ChangeNickedInfo.put("fileListVideoState", "NO");
|
||||
}
|
||||
//}
|
||||
//审核流程的信息 查询状态为0的信息 基本信息和文件信息 当前审批流是否存在驳回
|
||||
Map<String, Object> opinionMap;
|
||||
if("2".equals(map.get("numState").toString()) || "3".equals(map.get("numState").toString())) {
|
||||
|
|
|
@ -226,6 +226,7 @@ public class SspServiceImpl implements ISspService {
|
|||
ChangeNickedInfo.put("fileListImg", fileListImg);
|
||||
} else {
|
||||
ChangeNickedInfo.put("fileListImgState", "NO");
|
||||
ChangeNickedInfo.put("fileListImg", new ArrayList<>());
|
||||
}
|
||||
//视频
|
||||
//map.put("fileType","1");
|
||||
|
|
|
@ -28,8 +28,8 @@ public class SspMarks
|
|||
private String projectType;
|
||||
/** 工序名称 */
|
||||
private String processName;
|
||||
/** 施工部位 */
|
||||
@Excel(name = "施工部位")
|
||||
/** 问题描述 */
|
||||
@Excel(name = "问题描述")
|
||||
private String positionPart;
|
||||
/** 留痕说明 */
|
||||
@Excel(name = "留痕说明")
|
||||
|
@ -241,7 +241,7 @@ public class SspMarks
|
|||
}
|
||||
|
||||
/**
|
||||
* 设置:施工部位
|
||||
* 设置:问题描述
|
||||
*/
|
||||
public void setPositionPart(String positionPart)
|
||||
{
|
||||
|
@ -249,7 +249,7 @@ public class SspMarks
|
|||
}
|
||||
|
||||
/**
|
||||
* 获取:施工部位
|
||||
* 获取:问题描述
|
||||
*/
|
||||
public String getPositionPart()
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ public class SspMarksDto
|
|||
private String pointType;
|
||||
/** 工序名称 */
|
||||
private String processName;
|
||||
/** 施工部位 */
|
||||
/** 问题描述 */
|
||||
private String positionPart;
|
||||
/** 留痕说明 */
|
||||
private String marksRemark;
|
||||
|
@ -165,7 +165,7 @@ public class SspMarksDto
|
|||
}
|
||||
|
||||
/**
|
||||
* 设置:施工部位
|
||||
* 设置:问题描述
|
||||
*/
|
||||
public void setPositionPart(String positionPart)
|
||||
{
|
||||
|
@ -173,7 +173,7 @@ public class SspMarksDto
|
|||
}
|
||||
|
||||
/**
|
||||
* 获取:施工部位
|
||||
* 获取:问题描述
|
||||
*/
|
||||
public String getPositionPart()
|
||||
{
|
||||
|
|
|
@ -81,4 +81,8 @@
|
|||
}
|
||||
.loading_p div{
|
||||
margin-top: 20px;
|
||||
}
|
||||
.loading_p img{
|
||||
width:32px;
|
||||
height:32px;
|
||||
}
|
|
@ -141,7 +141,7 @@ label{
|
|||
.spp-state-yzg{
|
||||
background: #11A983; /*已审批 已整改*/
|
||||
font-weight:700;
|
||||
color: #aaaaaa;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
/*浮窗图标*/
|
||||
.spp-buoy{
|
||||
|
|
|
@ -250,18 +250,21 @@
|
|||
|
||||
//信息提交
|
||||
$("#saveBut").click(function () {
|
||||
showLoading();
|
||||
var id = $("#changeId").val();
|
||||
|
||||
var opinion = $("#opinion").val();
|
||||
if(opinion == null || opinion == "") {
|
||||
alert("填写整改说明")
|
||||
hideLoading();
|
||||
alert("填写整改说明");
|
||||
return false;
|
||||
}
|
||||
|
||||
var nameSrc = $("[name='imgName']");
|
||||
|
||||
if(nameSrc.length <= 0) {
|
||||
alert("至少上传一张图片")
|
||||
hideLoading();
|
||||
alert("至少上传一张图片");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -132,10 +132,10 @@
|
|||
<!-- </div>-->
|
||||
<div class="ssp-block">
|
||||
<div class="spp-block-title">
|
||||
施工部位
|
||||
问题描述
|
||||
</div>
|
||||
<div class="ssp-block-input">
|
||||
<input type="text" placeholder="请输入施工部位" id="constructionSite" v-model="form.positionPart" autocomplete="off">
|
||||
<input type="text" placeholder="请输入问题描述" id="constructionSite" v-model="form.positionPart" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="ssp-block">
|
||||
|
@ -190,7 +190,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!--施工部位下拉框-->
|
||||
<!--问题描述下拉框-->
|
||||
<!-- <div class="ssp-select-fixed" id="selectFixedPo">
|
||||
<div class="ssp-select-content" id="selectConPo">
|
||||
<ul class="spp-select-ul">
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!--施工部位 下拉框-->
|
||||
<!--问题描述 下拉框-->
|
||||
<div class="ssp-select-fixed" id="selectFixedPo">
|
||||
<div class="ssp-select-content" id="selectConPo">
|
||||
<ul class="spp-select-ul">
|
||||
|
|
|
@ -108,10 +108,11 @@
|
|||
</div>
|
||||
<div class="ssp-block">
|
||||
<div class="spp-block-title">
|
||||
施工部位
|
||||
问题描述
|
||||
</div>
|
||||
<div class="ssp-block-input">
|
||||
<input type="text" placeholder="请填写施工部位" id="constructionSite" >
|
||||
<div class="ssp-ri-textarea">
|
||||
<textarea placeholder="请输入问题描述" id="constructionSite"></textarea>
|
||||
<!-- <input type="text" placeholder="请填写问题描述" id="constructionSite" >-->
|
||||
<!--onclick="constructionSite()"-->
|
||||
</div>
|
||||
</div>
|
||||
|
@ -548,6 +549,7 @@
|
|||
|
||||
//页面提交
|
||||
function dataSubmit() {
|
||||
showLoading();
|
||||
var problemArea = $("#problemArea").text();
|
||||
|
||||
//图片
|
||||
|
@ -556,7 +558,7 @@
|
|||
var videoUrl = $("#bigFile").val();
|
||||
//隐患类型
|
||||
var projectType = $("#projectType").val();
|
||||
//施工部位
|
||||
//问题描述
|
||||
var constructionSite = $("#constructionSite").val();
|
||||
//整改要求
|
||||
var changeText = $("#changeText").val();
|
||||
|
@ -571,6 +573,7 @@
|
|||
var cctoPhone = $("#cctoPhone").val();
|
||||
|
||||
if(nameSrc.length <= 0) {
|
||||
hideLoading();
|
||||
toast({
|
||||
message:"至少上传一张图片",
|
||||
time:3000
|
||||
|
@ -583,6 +586,7 @@
|
|||
}
|
||||
|
||||
if(projectType == "" || projectType == null) {
|
||||
hideLoading();
|
||||
toast({
|
||||
message:"请选择安全隐患类型",
|
||||
time:3000
|
||||
|
@ -590,14 +594,16 @@
|
|||
return false;
|
||||
}
|
||||
if(constructionSite == "" || constructionSite == null) {
|
||||
hideLoading();
|
||||
toast({
|
||||
message:"请填写施工部位",
|
||||
message:"请填写问题描述",
|
||||
time:3000
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
if(changeText == "" || changeText == null) {
|
||||
hideLoading();
|
||||
toast({
|
||||
message:"请填写整改要求",
|
||||
time:3000
|
||||
|
@ -606,6 +612,7 @@
|
|||
}
|
||||
|
||||
if(mainGiver == "" || mainGiver == null) {
|
||||
hideLoading();
|
||||
toast({
|
||||
message:"请选择整改人",
|
||||
time:3000
|
||||
|
@ -614,6 +621,7 @@
|
|||
}
|
||||
|
||||
if(reinspector == "" || reinspector == null) {
|
||||
hideLoading();
|
||||
toast({
|
||||
message:"请选择复检人",
|
||||
time:3000
|
||||
|
@ -622,6 +630,7 @@
|
|||
}
|
||||
|
||||
if(ccto == "" || ccto == null) {
|
||||
hideLoading();
|
||||
toast({
|
||||
message:"请选择抄送人",
|
||||
time:3000
|
||||
|
@ -631,6 +640,7 @@
|
|||
|
||||
//抄送人主送人判断
|
||||
if(ccto.search(mainGiver) != -1) {
|
||||
hideLoading();
|
||||
toast({
|
||||
message:"抄送人中不能包含整改人",
|
||||
time:3000
|
||||
|
@ -640,6 +650,7 @@
|
|||
|
||||
//抄送人复检人判断
|
||||
if(ccto.search(reinspector) != -1) {
|
||||
hideLoading();
|
||||
toast({
|
||||
message:"抄送人中不能包含复检人",
|
||||
time:3000
|
||||
|
|
|
@ -464,7 +464,7 @@
|
|||
'<div class="ssp-record-name">'+result.publishMarks[i].positionPart+'</div>'+
|
||||
'<table class="ssp-record-table">'+
|
||||
'<tr>'+
|
||||
'<td>'+'施工部位:'+'</td>'+
|
||||
'<td>'+'问题描述:'+'</td>'+
|
||||
'<td>'+result.publishMarks[i].positionPart+'</td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
|
|
|
@ -474,7 +474,7 @@
|
|||
'<div class="ssp-record-name">'+result.publishMarksMy[i].positionPart+'</div>'+
|
||||
'<table class="ssp-record-table">'+
|
||||
'<tr>'+
|
||||
'<td>'+'施工部位:'+'</td>'+
|
||||
'<td>'+'问题描述:'+'</td>'+
|
||||
'<td>'+result.publishMarksMy[i].positionPart+'</td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
|
@ -504,7 +504,7 @@
|
|||
'<div class="ssp-record-name">'+result.publishMarksMy[i].positionPart+'</div>'+
|
||||
'<table class="ssp-record-table">'+
|
||||
'<tr>'+
|
||||
'<td>'+'施工部位:'+'</td>'+
|
||||
'<td>'+'问题描述:'+'</td>'+
|
||||
'<td>'+result.publishMarksMy[i].positionPart+'</td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
</div>
|
||||
<div class="ssp-block">
|
||||
<div class="spp-block-title">
|
||||
施工部位
|
||||
问题描述
|
||||
</div>
|
||||
<div class="ssp-block-word" th:text="${dbSSpMark.positionPart}">
|
||||
|
||||
|
|
|
@ -52,9 +52,9 @@
|
|||
图片
|
||||
</div>
|
||||
<div class="my-gallery row">
|
||||
<figure th:if="${queryChangeNicked.fileListImgState == 'OK'}" th:each="fileListImgObj:${queryChangeNicked.fileListImg}">
|
||||
<a th:href="@{${fileListImgObj.fileUrl}}">
|
||||
<img th:src="${fileListImgObj.fileUrl}" class="img-border"/>
|
||||
<figure th:if="${queryChangeNicked.fileListImgState == 'OK' && queryChangeNicked?.fileListImg!=null}" th:each="fileListImgObj,loop:${queryChangeNicked?.fileListImg}">
|
||||
<a th:href="@{${fileListImgObj?.fileUrl}}">
|
||||
<img th:src="${fileListImgObj?.fileUrl}" class="img-border"/>
|
||||
</a>
|
||||
</figure>
|
||||
</div>
|
||||
|
|
|
@ -250,18 +250,21 @@
|
|||
|
||||
//信息提交
|
||||
$("#saveBut").click(function () {
|
||||
showLoading();
|
||||
var id = $("#changeId").val();
|
||||
|
||||
var opinion = $("#opinion").val();
|
||||
if(opinion == null || opinion == "") {
|
||||
alert("填写整改说明")
|
||||
hideLoading();
|
||||
alert("填写整改说明");
|
||||
return false;
|
||||
}
|
||||
|
||||
var nameSrc = $("[name='imgName']");
|
||||
|
||||
if(nameSrc.length <= 0) {
|
||||
alert("至少上传一张图片")
|
||||
hideLoading();
|
||||
alert("至少上传一张图片");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -132,10 +132,10 @@
|
|||
<!-- </div>-->
|
||||
<div class="ssp-block">
|
||||
<div class="spp-block-title">
|
||||
施工部位
|
||||
问题描述
|
||||
</div>
|
||||
<div class="ssp-block-input">
|
||||
<input type="text" placeholder="请输入施工部位" id="constructionSite" v-model="form.positionPart" autocomplete="off">
|
||||
<input type="text" placeholder="请输入问题描述" id="constructionSite" v-model="form.positionPart" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="ssp-block">
|
||||
|
@ -190,7 +190,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!--施工部位下拉框-->
|
||||
<!--问题描述下拉框-->
|
||||
<!-- <div class="ssp-select-fixed" id="selectFixedPo">
|
||||
<div class="ssp-select-content" id="selectConPo">
|
||||
<ul class="spp-select-ul">
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!--施工部位 下拉框-->
|
||||
<!--问题描述 下拉框-->
|
||||
<div class="ssp-select-fixed" id="selectFixedPo">
|
||||
<div class="ssp-select-content" id="selectConPo">
|
||||
<ul class="spp-select-ul">
|
||||
|
|
|
@ -108,10 +108,11 @@
|
|||
</div>
|
||||
<div class="ssp-block">
|
||||
<div class="spp-block-title">
|
||||
施工部位
|
||||
问题描述
|
||||
</div>
|
||||
<div class="ssp-block-input">
|
||||
<input type="text" placeholder="请填写施工部位" id="constructionSite" >
|
||||
<div class="ssp-ri-textarea">
|
||||
<textarea placeholder="请输入问题描述" id="constructionSite"></textarea>
|
||||
<!-- <input type="text" placeholder="请填写问题描述" id="constructionSite" >-->
|
||||
<!--onclick="constructionSite()"-->
|
||||
</div>
|
||||
</div>
|
||||
|
@ -548,6 +549,7 @@
|
|||
|
||||
//页面提交
|
||||
function dataSubmit() {
|
||||
showLoading();
|
||||
var problemArea = $("#problemArea").text();
|
||||
|
||||
//图片
|
||||
|
@ -556,7 +558,7 @@
|
|||
var videoUrl = $("#bigFile").val();
|
||||
//隐患类型
|
||||
var projectType = $("#projectType").val();
|
||||
//施工部位
|
||||
//问题描述
|
||||
var constructionSite = $("#constructionSite").val();
|
||||
//整改要求
|
||||
var changeText = $("#changeText").val();
|
||||
|
@ -571,6 +573,7 @@
|
|||
var cctoPhone = $("#cctoPhone").val();
|
||||
|
||||
if(nameSrc.length <= 0) {
|
||||
hideLoading();
|
||||
toast({
|
||||
message:"至少上传一张图片",
|
||||
time:3000
|
||||
|
@ -583,6 +586,7 @@
|
|||
}
|
||||
|
||||
if(projectType == "" || projectType == null) {
|
||||
hideLoading();
|
||||
toast({
|
||||
message:"请选择质量隐患类型",
|
||||
time:3000
|
||||
|
@ -590,14 +594,16 @@
|
|||
return false;
|
||||
}
|
||||
if(constructionSite == "" || constructionSite == null) {
|
||||
hideLoading();
|
||||
toast({
|
||||
message:"请填写施工部位",
|
||||
message:"请填写问题描述",
|
||||
time:3000
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
if(changeText == "" || changeText == null) {
|
||||
hideLoading();
|
||||
toast({
|
||||
message:"请填写整改要求",
|
||||
time:3000
|
||||
|
@ -606,6 +612,7 @@
|
|||
}
|
||||
|
||||
if(mainGiver == "" || mainGiver == null) {
|
||||
hideLoading();
|
||||
toast({
|
||||
message:"请选择整改人",
|
||||
time:3000
|
||||
|
@ -614,6 +621,7 @@
|
|||
}
|
||||
|
||||
if(reinspector == "" || reinspector == null) {
|
||||
hideLoading();
|
||||
toast({
|
||||
message:"请选择复检人",
|
||||
time:3000
|
||||
|
@ -622,6 +630,7 @@
|
|||
}
|
||||
|
||||
if(ccto == "" || ccto == null) {
|
||||
hideLoading();
|
||||
toast({
|
||||
message:"请选择抄送人",
|
||||
time:3000
|
||||
|
@ -631,6 +640,7 @@
|
|||
|
||||
//抄送人主送人判断
|
||||
if(ccto.search(mainGiver) != -1) {
|
||||
hideLoading();
|
||||
toast({
|
||||
message:"抄送人中不能包含整改人",
|
||||
time:3000
|
||||
|
@ -640,6 +650,7 @@
|
|||
|
||||
//抄送人复检人判断
|
||||
if(ccto.search(reinspector) != -1) {
|
||||
hideLoading();
|
||||
toast({
|
||||
message:"抄送人中不能包含复检人",
|
||||
time:3000
|
||||
|
|
|
@ -463,7 +463,7 @@
|
|||
'<div class="ssp-record-name">'+result.publishMarks[i].positionPart+'</div>'+
|
||||
'<table class="ssp-record-table">'+
|
||||
'<tr>'+
|
||||
'<td>'+'施工部位:'+'</td>'+
|
||||
'<td>'+'问题描述:'+'</td>'+
|
||||
'<td>'+result.publishMarks[i].positionPart+'</td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
|
|
|
@ -474,7 +474,7 @@
|
|||
'<div class="ssp-record-name">'+result.publishMarksMy[i].positionPart+'</div>'+
|
||||
'<table class="ssp-record-table">'+
|
||||
'<tr>'+
|
||||
'<td>'+'施工部位:'+'</td>'+
|
||||
'<td>'+'问题描述:'+'</td>'+
|
||||
'<td>'+result.publishMarksMy[i].positionPart+'</td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
|
@ -504,7 +504,7 @@
|
|||
'<div class="ssp-record-name">'+result.publishMarksMy[i].positionPart+'</div>'+
|
||||
'<table class="ssp-record-table">'+
|
||||
'<tr>'+
|
||||
'<td>'+'施工部位:'+'</td>'+
|
||||
'<td>'+'问题描述:'+'</td>'+
|
||||
'<td>'+result.publishMarksMy[i].positionPart+'</td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
</div>
|
||||
<div class="ssp-block">
|
||||
<div class="spp-block-title">
|
||||
施工部位
|
||||
问题描述
|
||||
</div>
|
||||
<div class="ssp-block-word" th:text="${dbSSpMark.positionPart}">
|
||||
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
package com.yanzhu.jh.bigscreen.web.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.yanzhu.jh.work.domain.WorkFile;
|
||||
import com.yanzhu.jh.work.service.IWorkFileService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 工作传达文件Conller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bgscreen/workfile")
|
||||
public class WorkFileConller extends BaseController {
|
||||
|
||||
@Autowired
|
||||
IWorkFileService workFileService;
|
||||
|
||||
/**
|
||||
* 根据文件归属查询文件
|
||||
* @param fileBelong
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getWorkFileList")
|
||||
public TableDataInfo getWorkFileList(String fileBelong){
|
||||
WorkFile workFile = new WorkFile();
|
||||
workFile.setFileBelong(fileBelong);
|
||||
return getDataTable(workFileService.selectWorkFileListLimit20(workFile));
|
||||
}
|
||||
|
||||
}
|
|
@ -26,6 +26,8 @@ public class SurProjectUnitInfo extends BaseEntity
|
|||
@Excel(name = "单位id")
|
||||
private Long unitId;
|
||||
|
||||
private Long deptId;
|
||||
|
||||
/** 单位分类(1 建设单位 2 设计单位 3 施工单位 4监理单位 5 监测机构) */
|
||||
@Excel(name = "单位分类", readConverterExp = "1=,建=设单位,2=,设=计单位,3=,施=工单位,4=监理单位,5=,监=测机构")
|
||||
private Long unitType;
|
||||
|
@ -34,6 +36,8 @@ public class SurProjectUnitInfo extends BaseEntity
|
|||
@Excel(name = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
private String deptName;
|
||||
|
||||
/** 单位负责人名称 */
|
||||
@Excel(name = "单位负责人名称")
|
||||
private String unitPersonName;
|
||||
|
@ -130,6 +134,22 @@ public class SurProjectUnitInfo extends BaseEntity
|
|||
this.unitId = unitId;
|
||||
}
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
package com.yanzhu.jh.project.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.jh.project.domain.SurProjectUnitInfo;
|
||||
|
||||
/**
|
||||
* 建设单位信息Service接口
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-11
|
||||
*/
|
||||
public interface ISurProjectUnitInfoService
|
||||
{
|
||||
/**
|
||||
* 查询建设单位信息
|
||||
*
|
||||
* @param id 建设单位信息主键
|
||||
* @return 建设单位信息
|
||||
*/
|
||||
public SurProjectUnitInfo selectSurProjectUnitInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询建设单位信息列表
|
||||
*
|
||||
* @param surProjectUnitInfo 建设单位信息
|
||||
* @return 建设单位信息集合
|
||||
*/
|
||||
public List<SurProjectUnitInfo> selectSurProjectUnitInfoList(SurProjectUnitInfo surProjectUnitInfo);
|
||||
|
||||
/**
|
||||
* 新增建设单位信息
|
||||
*
|
||||
* @param surProjectUnitInfo 建设单位信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSurProjectUnitInfo(SurProjectUnitInfo surProjectUnitInfo);
|
||||
|
||||
/**
|
||||
* 修改建设单位信息
|
||||
*
|
||||
* @param surProjectUnitInfo 建设单位信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSurProjectUnitInfo(SurProjectUnitInfo surProjectUnitInfo);
|
||||
|
||||
/**
|
||||
* 批量删除建设单位信息
|
||||
*
|
||||
* @param ids 需要删除的建设单位信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectUnitInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除建设单位信息信息
|
||||
*
|
||||
* @param id 建设单位信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSurProjectUnitInfoById(Long id);
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
package com.yanzhu.jh.project.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yanzhu.jh.project.mapper.SurProjectUnitInfoMapper;
|
||||
import com.yanzhu.jh.project.domain.SurProjectUnitInfo;
|
||||
import com.yanzhu.jh.project.service.ISurProjectUnitInfoService;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
/**
|
||||
* 建设单位信息Service业务层处理
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-11
|
||||
*/
|
||||
@Service
|
||||
public class SurProjectUnitInfoServiceImpl implements ISurProjectUnitInfoService
|
||||
{
|
||||
@Autowired
|
||||
private SurProjectUnitInfoMapper surProjectUnitInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询建设单位信息
|
||||
*
|
||||
* @param id 建设单位信息主键
|
||||
* @return 建设单位信息
|
||||
*/
|
||||
@Override
|
||||
public SurProjectUnitInfo selectSurProjectUnitInfoById(Long id)
|
||||
{
|
||||
return surProjectUnitInfoMapper.selectSurProjectUnitInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询建设单位信息列表
|
||||
*
|
||||
* @param surProjectUnitInfo 建设单位信息
|
||||
* @return 建设单位信息
|
||||
*/
|
||||
@Override
|
||||
public List<SurProjectUnitInfo> selectSurProjectUnitInfoList(SurProjectUnitInfo surProjectUnitInfo)
|
||||
{
|
||||
return surProjectUnitInfoMapper.selectSurProjectUnitInfoList(surProjectUnitInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增建设单位信息
|
||||
*
|
||||
* @param surProjectUnitInfo 建设单位信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSurProjectUnitInfo(SurProjectUnitInfo surProjectUnitInfo)
|
||||
{
|
||||
surProjectUnitInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return surProjectUnitInfoMapper.insertSurProjectUnitInfo(surProjectUnitInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改建设单位信息
|
||||
*
|
||||
* @param surProjectUnitInfo 建设单位信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSurProjectUnitInfo(SurProjectUnitInfo surProjectUnitInfo)
|
||||
{
|
||||
return surProjectUnitInfoMapper.updateSurProjectUnitInfo(surProjectUnitInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除建设单位信息
|
||||
*
|
||||
* @param ids 需要删除的建设单位信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurProjectUnitInfoByIds(Long[] ids)
|
||||
{
|
||||
return surProjectUnitInfoMapper.deleteSurProjectUnitInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除建设单位信息信息
|
||||
*
|
||||
* @param id 建设单位信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSurProjectUnitInfoById(Long id)
|
||||
{
|
||||
return surProjectUnitInfoMapper.deleteSurProjectUnitInfoById(id);
|
||||
}
|
||||
}
|
|
@ -49,8 +49,8 @@ public class SmzSspMarks extends BaseEntity
|
|||
@Excel(name = "工序名称")
|
||||
private String processName;
|
||||
|
||||
/** 施工部位 */
|
||||
@Excel(name = "施工部位")
|
||||
/** 问题描述 */
|
||||
@Excel(name = "问题描述")
|
||||
private String positionPart;
|
||||
|
||||
/** 留痕说明 */
|
||||
|
|
|
@ -32,8 +32,8 @@ public class SmzSspProblemmodify extends BaseEntity
|
|||
@Excel(name = "拍摄位置")
|
||||
private String problemArea;
|
||||
|
||||
/** 施工部位 */
|
||||
@Excel(name = "施工部位")
|
||||
/** 问题描述 */
|
||||
@Excel(name = "问题描述")
|
||||
private String workParts;
|
||||
|
||||
/** 整改要求 */
|
||||
|
|
|
@ -0,0 +1,117 @@
|
|||
package com.yanzhu.jh.work.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.yanzhu.jh.project.domain.SurProjectUnitInfo;
|
||||
import com.yanzhu.jh.project.service.ISurProjectUnitInfoService;
|
||||
import com.yanzhu.jh.work.domain.WorkTrain;
|
||||
import com.yanzhu.jh.work.service.IWorkTrainService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 演练培训Controller
|
||||
*
|
||||
* @author JiangYuQi
|
||||
* @date 2023-08-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/work/emergencyDrill")
|
||||
public class EmergencyDrillController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWorkTrainService workTrainService;
|
||||
|
||||
@Autowired
|
||||
private ISurProjectUnitInfoService surProjectUnitInfoService;
|
||||
|
||||
/**
|
||||
* 查询演练培训列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('work:emergencyDrill:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WorkTrain workTrain)
|
||||
{
|
||||
startPage();
|
||||
workTrain.setNowRole(Convert.toStr(getUserFirstRole()));
|
||||
workTrain.setNowUserName(getUsername());
|
||||
List<WorkTrain> list = workTrainService.selectWorkTrainList(workTrain);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出演练培训列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('work:emergencyDrill:export')")
|
||||
@Log(title = "演练培训", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WorkTrain workTrain)
|
||||
{
|
||||
List<WorkTrain> list = workTrainService.selectWorkTrainList(workTrain);
|
||||
ExcelUtil<WorkTrain> util = new ExcelUtil<WorkTrain>(WorkTrain.class);
|
||||
util.exportExcel(response, list, "演练培训数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取演练培训详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('work:emergencyDrill:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(workTrainService.selectWorkTrainById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增演练培训
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('work:emergencyDrill:add')")
|
||||
@Log(title = "演练培训", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WorkTrain workTrain)
|
||||
{
|
||||
return toAjax(workTrainService.insertWorkTrain(workTrain));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改演练培训
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('work:emergencyDrill:edit')")
|
||||
@Log(title = "演练培训", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WorkTrain workTrain)
|
||||
{
|
||||
return toAjax(workTrainService.updateWorkTrain(workTrain));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除演练培训
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('work:emergencyDrill:remove')")
|
||||
@Log(title = "演练培训", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(workTrainService.deleteWorkTrainByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询协同演练部门列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('work:emergencyDrill:query')")
|
||||
@GetMapping("/projectUnitList")
|
||||
public AjaxResult projectUnitList(SurProjectUnitInfo surProjectUnitInfo)
|
||||
{
|
||||
return success(surProjectUnitInfoService.selectSurProjectUnitInfoList(surProjectUnitInfo));
|
||||
}
|
||||
|
||||
}
|
|
@ -2,6 +2,10 @@ package com.yanzhu.jh.work.controller;
|
|||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.yanzhu.jh.project.domain.SurProjectUnitInfo;
|
||||
import com.yanzhu.jh.project.service.ISurProjectUnitInfoService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
@ -34,6 +38,9 @@ public class WorkTrainController extends BaseController
|
|||
@Autowired
|
||||
private IWorkTrainService workTrainService;
|
||||
|
||||
@Autowired
|
||||
private ISurProjectUnitInfoService surProjectUnitInfoService;
|
||||
|
||||
/**
|
||||
* 查询演练培训列表
|
||||
*/
|
||||
|
@ -42,6 +49,8 @@ public class WorkTrainController extends BaseController
|
|||
public TableDataInfo list(WorkTrain workTrain)
|
||||
{
|
||||
startPage();
|
||||
workTrain.setNowRole(Convert.toStr(getUserFirstRole()));
|
||||
workTrain.setNowUserName(getUsername());
|
||||
List<WorkTrain> list = workTrainService.selectWorkTrainList(workTrain);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
@ -101,4 +110,15 @@ public class WorkTrainController extends BaseController
|
|||
{
|
||||
return toAjax(workTrainService.deleteWorkTrainByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询协同演练部门列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('work:workTrain:query')")
|
||||
@GetMapping("/projectUnitList")
|
||||
public AjaxResult projectUnitList(SurProjectUnitInfo surProjectUnitInfo)
|
||||
{
|
||||
return success(surProjectUnitInfoService.selectSurProjectUnitInfoList(surProjectUnitInfo));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ public class WorkFile extends BaseEntity
|
|||
private Long readNum;
|
||||
|
||||
//文件列表
|
||||
private List<Map<String,String>> fileList;
|
||||
private List<Map<String,Object>> fileList;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
|
@ -151,11 +151,11 @@ public class WorkFile extends BaseEntity
|
|||
return readNum;
|
||||
}
|
||||
|
||||
public List<Map<String, String>> getFileList() {
|
||||
public List<Map<String, Object>> getFileList() {
|
||||
return fileList;
|
||||
}
|
||||
|
||||
public void setFileList(List<Map<String, String>> fileList) {
|
||||
public void setFileList(List<Map<String, Object>> fileList) {
|
||||
this.fileList = fileList;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,13 @@ public class WorkTrain extends BaseEntity
|
|||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 项目主键 */
|
||||
private Long projectId;
|
||||
|
||||
/** 项目名称 */
|
||||
@Excel(name = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
/** 主图 */
|
||||
@Excel(name = "主图")
|
||||
private String mainImage;
|
||||
|
@ -58,6 +65,10 @@ public class WorkTrain extends BaseEntity
|
|||
/** 演练培训协同部门信息 */
|
||||
private List<WorkTrainDept> workTrainDeptList;
|
||||
|
||||
private String trainDeptIds;
|
||||
private String trainDeptNames;
|
||||
private String vDel;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
|
@ -149,10 +160,52 @@ public class WorkTrain extends BaseEntity
|
|||
this.trainContent = trainContent;
|
||||
}
|
||||
|
||||
public Long getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public void setProjectId(Long projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
|
||||
public void setProjectName(String projectName) {
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
public String getvDel() {
|
||||
return vDel;
|
||||
}
|
||||
|
||||
public void setvDel(String vDel) {
|
||||
this.vDel = vDel;
|
||||
}
|
||||
|
||||
public String getTrainDeptIds() {
|
||||
return trainDeptIds;
|
||||
}
|
||||
|
||||
public void setTrainDeptIds(String trainDeptIds) {
|
||||
this.trainDeptIds = trainDeptIds;
|
||||
}
|
||||
|
||||
public String getTrainDeptNames() {
|
||||
return trainDeptNames;
|
||||
}
|
||||
|
||||
public void setTrainDeptNames(String trainDeptNames) {
|
||||
this.trainDeptNames = trainDeptNames;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("projectId", getProjectId())
|
||||
.append("projectName", getProjectName())
|
||||
.append("mainImage", getMainImage())
|
||||
.append("trainType", getTrainType())
|
||||
.append("trainNature", getTrainNature())
|
||||
|
|
|
@ -23,6 +23,10 @@ public class WorkTrainDept extends BaseEntity
|
|||
@Excel(name = "协同部门主键")
|
||||
private Long deptId;
|
||||
|
||||
/** 协同部门名称 */
|
||||
@Excel(name = "协同部门名称")
|
||||
private String deptName;
|
||||
|
||||
/** 是否组织部门 */
|
||||
@Excel(name = "是否组织部门")
|
||||
private Long isMain;
|
||||
|
@ -45,7 +49,16 @@ public class WorkTrainDept extends BaseEntity
|
|||
{
|
||||
return deptId;
|
||||
}
|
||||
public void setIsMain(Long isMain)
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public void setIsMain(Long isMain)
|
||||
{
|
||||
this.isMain = isMain;
|
||||
}
|
||||
|
|
|
@ -28,6 +28,14 @@ public interface WorkFileMapper
|
|||
*/
|
||||
public List<WorkFile> selectWorkFileList(WorkFile workFile);
|
||||
|
||||
/**
|
||||
* 查询文件传达列表
|
||||
*
|
||||
* @param workFile 文件传达
|
||||
* @return 文件传达集合
|
||||
*/
|
||||
public List<WorkFile> selectWorkFileListLimit20(WorkFile workFile);
|
||||
|
||||
/**
|
||||
* 新增文件传达
|
||||
*
|
||||
|
|
|
@ -28,6 +28,14 @@ public interface IWorkFileService
|
|||
*/
|
||||
public List<WorkFile> selectWorkFileList(WorkFile workFile);
|
||||
|
||||
/**
|
||||
* 查询文件传达列表
|
||||
*
|
||||
* @param workFile 文件传达
|
||||
* @return 文件传达集合
|
||||
*/
|
||||
public List<WorkFile> selectWorkFileListLimit20(WorkFile workFile);
|
||||
|
||||
/**
|
||||
* 新增文件传达
|
||||
*
|
||||
|
|
|
@ -51,6 +51,18 @@ public class WorkFileServiceImpl implements IWorkFileService
|
|||
return workFileMapper.selectWorkFileList(workFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询文件传达列表
|
||||
*
|
||||
* @param workFile 文件传达
|
||||
* @return 文件传达
|
||||
*/
|
||||
@Override
|
||||
public List<WorkFile> selectWorkFileListLimit20(WorkFile workFile)
|
||||
{
|
||||
return workFileMapper.selectWorkFileListLimit20(workFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增文件传达
|
||||
*
|
||||
|
@ -62,16 +74,16 @@ public class WorkFileServiceImpl implements IWorkFileService
|
|||
public int insertWorkFile(WorkFile workFile)
|
||||
{
|
||||
|
||||
List<Map<String,String>> fileList = workFile.getFileList();
|
||||
List<Map<String,Object>> fileList = workFile.getFileList();
|
||||
int res = 0;
|
||||
DecimalFormat df = new DecimalFormat ("#.#");
|
||||
if(fileList!=null && fileList.size()>0){
|
||||
for(Map<String,String> fileMap:fileList){
|
||||
for(Map<String,Object> fileMap:fileList){
|
||||
WorkFile lastingModel = new WorkFile();
|
||||
lastingModel.setFileBelong(workFile.getFileBelong());
|
||||
lastingModel.setFileType(FileUtils.getFileLastNameUpCase(fileMap.get("original")));
|
||||
lastingModel.setFileName(fileMap.get("original"));
|
||||
lastingModel.setFilePath(fileMap.get("name"));
|
||||
lastingModel.setFileType(FileUtils.getFileLastNameUpCase(Convert.toStr(fileMap.get("original"))));
|
||||
lastingModel.setFileName(Convert.toStr(fileMap.get("original")));
|
||||
lastingModel.setFilePath(Convert.toStr(fileMap.get("name")));
|
||||
String filesize = df.format(Convert.toInt(fileMap.get("size"))/1024/1024);
|
||||
if(filesize.equals("0")){
|
||||
filesize = "0.1";
|
||||
|
|
|
@ -125,6 +125,7 @@ public class WorkTrainServiceImpl implements IWorkTrainService
|
|||
for (WorkTrainDept workTrainDept : workTrainDeptList)
|
||||
{
|
||||
workTrainDept.setTrainId(id);
|
||||
workTrainDept.setIsMain(0L);
|
||||
list.add(workTrainDept);
|
||||
}
|
||||
if (list.size() > 0)
|
||||
|
|
|
@ -265,11 +265,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</update>
|
||||
|
||||
<delete id="deleteSurProjectById" parameterType="Long">
|
||||
delete from sur_project where id = #{id}
|
||||
update sur_project set isDel = 1 where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSurProjectByIds" parameterType="String">
|
||||
delete from sur_project where id in
|
||||
update sur_project set isDel = 1 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
|
|
@ -8,8 +8,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="id" column="id" />
|
||||
<result property="projectId" column="projectId" />
|
||||
<result property="unitId" column="unitId" />
|
||||
<result property="deptId" column="deptId" />
|
||||
<result property="unitType" column="unitType" />
|
||||
<result property="unitName" column="unitName" />
|
||||
<result property="deptName" column="deptName" />
|
||||
<result property="unitPersonName" column="unitPersonName" />
|
||||
<result property="unitPersonPhone" column="unitPersonPhone" />
|
||||
<result property="createUser" column="createUser" />
|
||||
|
@ -18,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectSurProjectUnitInfoVo">
|
||||
select id, projectId, unitId, unitType, unitName, unitPersonName, unitPersonPhone, createUser, createTime, del_flag from sur_project_unit_info
|
||||
select id, projectId, unitId, unitId as deptId, unitType, unitName, unitName as deptName,unitPersonName, unitPersonPhone, createUser, createTime, del_flag from sur_project_unit_info
|
||||
</sql>
|
||||
|
||||
<select id="selectSurProjectUnitInfoList" parameterType="SurProjectUnitInfo" resultMap="SurProjectUnitInfoResult">
|
||||
|
|
|
@ -36,6 +36,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectWorkFileListLimit20" parameterType="WorkFile" resultMap="WorkFileResult">
|
||||
<include refid="selectWorkFileVo"/>
|
||||
<where>
|
||||
and is_del = 0
|
||||
<if test="fileBelong != null and fileBelong != ''"> and file_belong = #{fileBelong}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
Limit 20
|
||||
</select>
|
||||
|
||||
<select id="selectWorkFileById" parameterType="Long" resultMap="WorkFileResult">
|
||||
<include refid="selectWorkFileVo"/>
|
||||
|
|
|
@ -6,6 +6,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<resultMap type="WorkTrain" id="WorkTrainResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="projectName" column="project_name" />
|
||||
<result property="mainImage" column="main_image" />
|
||||
<result property="trainType" column="train_type" />
|
||||
<result property="trainNature" column="train_nature" />
|
||||
|
@ -19,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="vDel" column="v_del" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="WorkTrainWorkTrainDeptResult" type="WorkTrain" extends="WorkTrainResult">
|
||||
|
@ -28,24 +31,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<resultMap type="WorkTrainDept" id="WorkTrainDeptResult">
|
||||
<result property="trainId" column="sub_train_id" />
|
||||
<result property="deptId" column="sub_dept_id" />
|
||||
<result property="deptName" column="sub_dept_name" />
|
||||
<result property="isMain" column="sub_is_main" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWorkTrainVo">
|
||||
select id, main_image, train_type, train_nature, train_participants, begin_date, end_date, train_content, is_del, create_by, create_time, update_by, update_time, remark from work_train
|
||||
select id, project_id, project_name, main_image, train_type, train_nature, train_participants, begin_date, end_date, train_content, is_del, create_by, create_time, update_by, update_time, remark from work_train
|
||||
</sql>
|
||||
|
||||
<select id="selectWorkTrainList" parameterType="WorkTrain" resultMap="WorkTrainResult">
|
||||
<include refid="selectWorkTrainVo"/>
|
||||
<where>
|
||||
select wt.id, wt.project_id, wt.project_name, wt.main_image, wt.train_type, wt.train_nature, wt.train_participants, wt.begin_date, wt.end_date, wt.train_content, wt.is_del, wt.create_by, wt.create_time, wt.update_by, wt.update_time, wt.remark, group_concat(sd.dept_id) as trainDeptIds, group_concat(sd.dept_name) as trainDeptNames,
|
||||
CASE
|
||||
WHEN (
|
||||
wt.create_by = #{nowUserName}
|
||||
OR #{nowRole} IN ('1', '2', '3', '4')
|
||||
)
|
||||
AND end_date > NOW() THEN
|
||||
0
|
||||
ELSE
|
||||
1
|
||||
END v_del
|
||||
from work_train wt
|
||||
left join work_train_dept wtd on wtd.train_id = wt.id
|
||||
left join sys_dept sd on sd.dept_id = wtd.dept_id
|
||||
<where>
|
||||
<if test="projectId != null"> and wt.project_id = #{projectId}</if>
|
||||
<if test="projectName != null and projectName != ''"> and wt.project_name like concat('%', #{projectName}, '%')</if>
|
||||
<if test="trainType != null and trainType != ''"> and train_type = #{trainType}</if>
|
||||
<if test="trainNature != null and trainNature != ''"> and train_nature = #{trainNature}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
<if test="trainNature != null and trainNature != ''"> and wt.train_nature = #{trainNature}</if>
|
||||
<if test="isDel != null "> and wt.is_del = #{isDel}</if>
|
||||
<if test="params.beginMarksTime != null and params.beginMarksTime != '' and params.endMarksTime != null and params.endMarksTime != ''"> and ((wt.begin_date between #{params.beginMarksTime} and #{params.endMarksTime}) or (wt.end_date between #{params.beginMarksTime} and #{params.endMarksTime}) )</if>
|
||||
</where>
|
||||
group by wt.train_id
|
||||
order by wt.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectWorkTrainById" parameterType="Long" resultMap="WorkTrainWorkTrainDeptResult">
|
||||
select a.id, a.main_image, a.train_type, a.train_nature, a.train_participants, a.begin_date, a.end_date, a.train_content, a.is_del, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
|
||||
select a.id, a.project_id, a.project_name, a.main_image, a.train_type, a.train_nature, a.train_participants, a.begin_date, a.end_date, a.train_content, a.is_del, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
|
||||
b.train_id as sub_train_id, b.dept_id as sub_dept_id, b.is_main as sub_is_main
|
||||
from work_train a
|
||||
left join work_train_dept b on b.train_id = a.id
|
||||
|
@ -55,6 +77,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<insert id="insertWorkTrain" parameterType="WorkTrain" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into work_train
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="projectName != null">project_name,</if>
|
||||
<if test="mainImage != null">main_image,</if>
|
||||
<if test="trainType != null">train_type,</if>
|
||||
<if test="trainNature != null">train_nature,</if>
|
||||
|
@ -70,6 +94,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="projectName != null">#{projectName},</if>
|
||||
<if test="mainImage != null">#{mainImage},</if>
|
||||
<if test="trainType != null">#{trainType},</if>
|
||||
<if test="trainNature != null">#{trainNature},</if>
|
||||
|
@ -89,6 +115,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<update id="updateWorkTrain" parameterType="WorkTrain">
|
||||
update work_train
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="projectName != null">project_name = #{projectName},</if>
|
||||
<if test="mainImage != null">main_image = #{mainImage},</if>
|
||||
<if test="trainType != null">train_type = #{trainType},</if>
|
||||
<if test="trainNature != null">train_nature = #{trainNature},</if>
|
||||
|
|
Loading…
Reference in New Issue