Compare commits
3 Commits
4e0dc26ff0
...
ae19c41891
Author | SHA1 | Date |
---|---|---|
|
ae19c41891 | |
|
577d3b57ec | |
|
db245cdc98 |
|
@ -385,7 +385,8 @@
|
|||
command="handleAssess"
|
||||
icon="el-icon-coordinate"
|
||||
v-hasPermi="['project:assess:list']"
|
||||
>季度考核管理</el-dropdown-item>
|
||||
>季度考核管理</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item
|
||||
command="handleBuildNode"
|
||||
icon="el-icon-data-analysis"
|
||||
|
@ -456,13 +457,14 @@
|
|||
command="handleCostOutput"
|
||||
icon="el-icon-money"
|
||||
v-hasPermi="['project:costOutput:edit']"
|
||||
>项目成本产值管理</el-dropdown-item>
|
||||
>项目成本产值管理</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item
|
||||
command="handleDelete"
|
||||
icon="el-icon-delete"
|
||||
v-hasPermi="['project:surProject:remove']"
|
||||
>删除项目</el-dropdown-item>
|
||||
|
||||
>删除项目</el-dropdown-item
|
||||
>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
|
@ -777,21 +779,9 @@
|
|||
<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>
|
||||
<surProjectSpecialDrawer
|
||||
size="50%"
|
||||
:visible.sync="projectSpecialDrawerVisible"
|
||||
:form-data="formData"
|
||||
></surProjectSpecialDrawer>
|
||||
<workTrainDrawer ref="workTrainDrawer"></workTrainDrawer>
|
||||
<emergencyDrillDrawer ref="emergencyDrillDrawer"></emergencyDrillDrawer>
|
||||
<surProjectSpecialDrawer ref="projectSpecial"></surProjectSpecialDrawer>
|
||||
<attendance-drawer ref="attDrawer"></attendance-drawer>
|
||||
<projectDeptWroksDrawer ref="deptWroksDrawer"></projectDeptWroksDrawer>
|
||||
<insuranceDrawer ref="insurance"></insuranceDrawer>
|
||||
|
@ -828,7 +818,7 @@ import projectCheckingDrawer from "../projectChecking/projectCheckingDrawer.vue"
|
|||
import materialSealDrawer from "@/views/project/materialSeal/projectMaterialSealDrawer.vue";
|
||||
import projectMeasureDrawer from "../projectMeasure/projectMeasureDrawer.vue";
|
||||
import videoConfigDrawer from "@/views/video/videoConfig/videoConfigDrawer";
|
||||
import costOutputDrawer from '@/views/project/costOutput/costOutputDrawer.vue'
|
||||
import costOutputDrawer from "@/views/project/costOutput/costOutputDrawer.vue";
|
||||
import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
|
||||
|
||||
export default {
|
||||
|
@ -849,7 +839,7 @@ export default {
|
|||
materialSealDrawer,
|
||||
projectMeasureDrawer,
|
||||
videoConfigDrawer,
|
||||
costOutputDrawer
|
||||
costOutputDrawer,
|
||||
},
|
||||
dicts: [
|
||||
"sys_check_state",
|
||||
|
@ -863,8 +853,6 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
projectUserInfoDrawerVisible: false,
|
||||
workTrainDrawerVisible: false,
|
||||
emergencyDrillDrawerVisible: false,
|
||||
projectSpecialDrawerVisible: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
|
@ -1070,13 +1058,13 @@ export default {
|
|||
this.$refs.nodeDrawer.show(row);
|
||||
break;
|
||||
case "handleWorkTrain":
|
||||
this.handleWorkTrain(row);
|
||||
this.$refs.workTrainDrawer.show(row);
|
||||
break;
|
||||
case "handleEmergencyDrill":
|
||||
this.handleEmergencyDrill(row);
|
||||
this.$refs.emergencyDrillDrawer.show(row);
|
||||
break;
|
||||
case "handleProjectSpecial":
|
||||
this.handleProjectSpecial(row);
|
||||
this.$refs.projectSpecial.show(row);
|
||||
break;
|
||||
case "handleProjectDeptWroks":
|
||||
this.$refs.deptWroksDrawer.show(row);
|
||||
|
@ -1200,16 +1188,6 @@ export default {
|
|||
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;
|
||||
},
|
||||
handleProjectSpecial(row) {
|
||||
this.formData.projectId = row.id;
|
||||
this.formData.projectName = row.projectName;
|
||||
|
|
|
@ -1,13 +1,27 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-drawer
|
||||
v-bind="$attrs"
|
||||
v-if="onOpen"
|
||||
v-on="$listeners"
|
||||
@opened="onOpen"
|
||||
@close="onClose"
|
||||
:visible.sync="onOpen"
|
||||
direction="rtl"
|
||||
size="60%"
|
||||
style="padding-left: 20px"
|
||||
>
|
||||
<template slot="title">
|
||||
<div>{{ drawerTitle + " 【特种人员管理】" }}</div>
|
||||
</template>
|
||||
<el-tabs
|
||||
v-model="unitActiveName"
|
||||
style="margin-left: 20px; margin-right: 20px"
|
||||
@tab-click="getList"
|
||||
>
|
||||
<el-tab-pane
|
||||
v-for="(it, idx) in nodes"
|
||||
:label="it.unitName + ''"
|
||||
:name="it.unitId + ''"
|
||||
:key="idx"
|
||||
></el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-row
|
||||
:gutter="10"
|
||||
class="mb8"
|
||||
|
@ -297,12 +311,7 @@ export default {
|
|||
components: {
|
||||
ElImageViewer,
|
||||
},
|
||||
props: {
|
||||
formData: {
|
||||
projectId: String,
|
||||
projectName: String,
|
||||
},
|
||||
},
|
||||
props: {},
|
||||
dicts: ["sys_user_sex", "project_special_type"],
|
||||
data() {
|
||||
return {
|
||||
|
@ -330,6 +339,7 @@ export default {
|
|||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
projectId: null,
|
||||
deptId: null,
|
||||
activeName: null,
|
||||
},
|
||||
// 表单参数
|
||||
|
@ -376,17 +386,15 @@ export default {
|
|||
wgq: "未过期(0)",
|
||||
ygq: "已过期(0)",
|
||||
},
|
||||
project: null,
|
||||
nodes: [],
|
||||
unitActiveName: "",
|
||||
onOpen: false,
|
||||
drawerTitle: "",
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {
|
||||
formData: {
|
||||
handler(value) {
|
||||
this.formData = value;
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
created() {},
|
||||
mounted() {},
|
||||
beforeDestroy() {},
|
||||
|
@ -423,23 +431,37 @@ export default {
|
|||
this.rules.credentialExpirationTime[0].required = false;
|
||||
}
|
||||
},
|
||||
onOpen() {
|
||||
this.queryParams.activeName = this.activeName;
|
||||
this.getList();
|
||||
show(project) {
|
||||
this.project = project;
|
||||
this.drawerTitle = project.projectName;
|
||||
this.onOpen = true;
|
||||
this.queryParams.projectId = project.id;
|
||||
this.$api.publics
|
||||
.queryUnitList({
|
||||
projectId: project.id,
|
||||
unitTypes: "2,4".split(","),
|
||||
})
|
||||
.then((d) => {
|
||||
this.nodes = d.rows;
|
||||
if (d.rows.length > 0) {
|
||||
this.unitActiveName = this.nodes[0].unitId + "";
|
||||
this.getList();
|
||||
} else {
|
||||
this.surProjectSpecialList = [];
|
||||
}
|
||||
});
|
||||
},
|
||||
onClose() {},
|
||||
/** 查询特种人员列表 */
|
||||
getList() {
|
||||
if (this.formData.projectId) {
|
||||
this.loading = true;
|
||||
this.queryParams.projectId = this.formData.projectId;
|
||||
this.queryCount();
|
||||
listSurProjectSpecial(this.queryParams).then((response) => {
|
||||
this.surProjectSpecialList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
this.loading = true;
|
||||
this.queryParams.deptId = this.unitActiveName;
|
||||
this.queryParams.activeName = this.activeName;
|
||||
this.queryCount();
|
||||
listSurProjectSpecial(this.queryParams).then((response) => {
|
||||
this.surProjectSpecialList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
queryCount() {
|
||||
findWorkSpecialCount(this.queryParams).then((response) => {
|
||||
|
@ -494,8 +516,9 @@ export default {
|
|||
handleAdd() {
|
||||
this.reset();
|
||||
this.credential = false;
|
||||
this.form.projectId = this.formData.projectId;
|
||||
this.form.projectName = this.formData.projectName;
|
||||
this.form.projectId = this.project.id;
|
||||
this.form.projectName = this.project.projectName;
|
||||
this.form.deptId = this.unitActiveName;
|
||||
this.open = true;
|
||||
this.title = "添加特种人员";
|
||||
},
|
||||
|
@ -567,15 +590,4 @@ export default {
|
|||
},
|
||||
};
|
||||
</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);
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
|
@ -132,7 +132,7 @@ export default {
|
|||
videoDvrNumber: this.formData.videoDvrNumber,
|
||||
passageState: "2",
|
||||
};
|
||||
editPassageState(param);
|
||||
//editPassageState(param);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -164,7 +164,7 @@ export default {
|
|||
videoDvrNumber: this.videoDvrNumber,
|
||||
passageState: "2",
|
||||
};
|
||||
editPassageState(param);
|
||||
//editPassageState(param);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,17 +1,31 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="emergency-container">
|
||||
<el-drawer
|
||||
v-bind="$attrs"
|
||||
v-if="onOpen"
|
||||
v-on="$listeners"
|
||||
@opened="onOpen"
|
||||
@close="onClose"
|
||||
:visible.sync="onOpen"
|
||||
direction="rtl"
|
||||
size="60%"
|
||||
style="padding-left: 20px"
|
||||
>
|
||||
<template slot="title">
|
||||
<div>{{ drawerTitle + " 【应急演练管理】" }}</div>
|
||||
</template>
|
||||
<el-tabs
|
||||
v-model="activeName"
|
||||
style="margin-left: 20px; margin-right: 20px"
|
||||
@tab-click="getworkTrainList"
|
||||
>
|
||||
<el-tab-pane
|
||||
v-for="(it, idx) in nodes"
|
||||
:label="it.unitName + ''"
|
||||
:name="it.unitId + ''"
|
||||
:key="idx"
|
||||
></el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-row
|
||||
:gutter="10"
|
||||
class="mb8"
|
||||
style="margin-left: 25px; margin-top: 10px; margin-right: 0px"
|
||||
style="margin-left: 25px; margin-top: 10px; margin-right: 20px"
|
||||
>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
|
@ -34,9 +48,8 @@
|
|||
v-loading="loading"
|
||||
:data="workTrainList"
|
||||
@selection-change="handleSelectionChange"
|
||||
style="margin-left: 25px"
|
||||
>
|
||||
<el-table-column label="演练主图" align="center" prop="mainImage" width="75">
|
||||
<el-table-column label="演练主图" align="center" prop="mainImage" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-image
|
||||
ref="preview"
|
||||
|
@ -50,7 +63,7 @@
|
|||
label="演练类型"
|
||||
align="center"
|
||||
prop="trainNature"
|
||||
width="130"
|
||||
width="180"
|
||||
show-overflow-tooltip
|
||||
v-if="false"
|
||||
>
|
||||
|
@ -65,7 +78,7 @@
|
|||
label="演练标题"
|
||||
align="center"
|
||||
prop="trainTitle"
|
||||
width="160"
|
||||
width="220"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
|
@ -83,7 +96,6 @@
|
|||
label="演练内容"
|
||||
align="center"
|
||||
prop="trainContent"
|
||||
width="170"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
|
@ -246,6 +258,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from "vuex";
|
||||
import {
|
||||
listWorkTrain,
|
||||
getWorkTrain,
|
||||
|
@ -260,12 +273,6 @@ export default {
|
|||
components: {
|
||||
ElImageViewer,
|
||||
},
|
||||
props: {
|
||||
formData: {
|
||||
projectId: String,
|
||||
projectName: String,
|
||||
},
|
||||
},
|
||||
dicts: ["train_nature_yjyl"],
|
||||
data() {
|
||||
return {
|
||||
|
@ -288,6 +295,7 @@ export default {
|
|||
open: false,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
drawerTitle: "",
|
||||
deptOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
|
@ -318,17 +326,14 @@ export default {
|
|||
},
|
||||
previewList: [],
|
||||
files: [],
|
||||
project: null,
|
||||
nodes: [],
|
||||
activeName: "",
|
||||
onOpen: false,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {
|
||||
formData: {
|
||||
handler(value) {
|
||||
this.formData = value;
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
created() {},
|
||||
mounted() {},
|
||||
beforeDestroy() {},
|
||||
|
@ -351,21 +356,35 @@ export default {
|
|||
return [];
|
||||
}
|
||||
},
|
||||
onOpen() {
|
||||
this.getworkTrainList();
|
||||
show(project) {
|
||||
this.project = project;
|
||||
this.drawerTitle = project.projectName;
|
||||
this.onOpen = true;
|
||||
this.queryParams.projectId = project.id;
|
||||
this.$api.publics
|
||||
.queryUnitList({
|
||||
projectId: project.id,
|
||||
unitTypes: "2,4".split(","),
|
||||
})
|
||||
.then((d) => {
|
||||
this.nodes = d.rows;
|
||||
if (d.rows.length > 0) {
|
||||
this.activeName = this.nodes[0].unitId + "";
|
||||
this.getworkTrainList();
|
||||
} else {
|
||||
this.workTrainList = [];
|
||||
}
|
||||
});
|
||||
},
|
||||
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;
|
||||
});
|
||||
}
|
||||
this.loading = true;
|
||||
this.queryParams.deptId = this.activeName;
|
||||
listWorkTrain(this.queryParams).then((response) => {
|
||||
this.workTrainList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
|
@ -400,8 +419,8 @@ export default {
|
|||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.form.projectId = this.formData.projectId;
|
||||
this.form.projectName = this.formData.projectName;
|
||||
this.form.projectId = this.project.id;
|
||||
this.form.projectName = this.project.projectName;
|
||||
this.open = true;
|
||||
this.title = "添加应急演练";
|
||||
this.getDeptList();
|
||||
|
@ -457,7 +476,7 @@ export default {
|
|||
this.title = "修改应急演练";
|
||||
const id = row.id || this.ids;
|
||||
let param = {
|
||||
projectId: this.formData.projectId,
|
||||
projectId: this.project.id,
|
||||
};
|
||||
//获取项目部门列表的接口
|
||||
listProjectUnit(param).then((response) => {
|
||||
|
@ -482,7 +501,7 @@ export default {
|
|||
this.$modal
|
||||
.confirm('是否确认删除应急演练编号为"' + ids + '"的数据项?')
|
||||
.then(function () {
|
||||
return delSurProjectUserInfo(ids);
|
||||
return delWorkTrain(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getworkTrainList();
|
||||
|
@ -510,18 +529,4 @@ export default {
|
|||
},
|
||||
};
|
||||
</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>
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
|
@ -1,17 +1,31 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-drawer
|
||||
v-bind="$attrs"
|
||||
v-if="onOpen"
|
||||
v-on="$listeners"
|
||||
@opened="onOpen"
|
||||
@close="onClose"
|
||||
:visible.sync="onOpen"
|
||||
direction="rtl"
|
||||
size="60%"
|
||||
style="padding-left: 20px"
|
||||
>
|
||||
<template slot="title">
|
||||
<div>{{ drawerTitle + " 【专项培训管理】" }}</div>
|
||||
</template>
|
||||
<el-tabs
|
||||
v-model="activeName"
|
||||
style="margin-left: 20px; margin-right: 20px"
|
||||
@tab-click="getworkTrainList"
|
||||
>
|
||||
<el-tab-pane
|
||||
v-for="(it, idx) in nodes"
|
||||
:label="it.unitName + ''"
|
||||
:name="it.unitId + ''"
|
||||
:key="idx"
|
||||
></el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-row
|
||||
:gutter="10"
|
||||
class="mb8"
|
||||
style="margin-left: 25px; margin-top: 10px; margin-right: 0px"
|
||||
style="margin-left: 20px; margin-top: 10px; margin-right: 20px"
|
||||
>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
|
@ -34,9 +48,8 @@
|
|||
v-loading="loading"
|
||||
:data="workTrainList"
|
||||
@selection-change="handleSelectionChange"
|
||||
style="margin-left: 25px"
|
||||
>
|
||||
<el-table-column label="培训主图" align="center" prop="mainImage" width="75">
|
||||
<el-table-column label="培训主图" align="center" prop="mainImage" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-image
|
||||
ref="preview"
|
||||
|
@ -50,7 +63,7 @@
|
|||
label="培训类型"
|
||||
align="center"
|
||||
prop="trainNature"
|
||||
width="130"
|
||||
width="180"
|
||||
show-overflow-tooltip
|
||||
v-if="false"
|
||||
>
|
||||
|
@ -65,7 +78,7 @@
|
|||
label="培训标题"
|
||||
align="center"
|
||||
prop="trainTitle"
|
||||
width="160"
|
||||
width="220"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
|
@ -83,7 +96,6 @@
|
|||
label="培训内容"
|
||||
align="center"
|
||||
prop="trainContent"
|
||||
width="170"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
|
@ -288,6 +300,7 @@ export default {
|
|||
open: false,
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
drawerTitle: "",
|
||||
deptOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
|
@ -318,17 +331,14 @@ export default {
|
|||
},
|
||||
previewList: [],
|
||||
files: [],
|
||||
project: null,
|
||||
nodes: [],
|
||||
activeName: "",
|
||||
onOpen: false,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {
|
||||
formData: {
|
||||
handler(value) {
|
||||
this.formData = value;
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
created() {},
|
||||
mounted() {},
|
||||
beforeDestroy() {},
|
||||
|
@ -351,21 +361,35 @@ export default {
|
|||
return [];
|
||||
}
|
||||
},
|
||||
onOpen() {
|
||||
this.getworkTrainList();
|
||||
show(project) {
|
||||
this.project = project;
|
||||
this.drawerTitle = project.projectName;
|
||||
this.onOpen = true;
|
||||
this.queryParams.projectId = project.id;
|
||||
this.$api.publics
|
||||
.queryUnitList({
|
||||
projectId: project.id,
|
||||
unitTypes: "2,4".split(","),
|
||||
})
|
||||
.then((d) => {
|
||||
this.nodes = d.rows;
|
||||
if (d.rows.length > 0) {
|
||||
this.activeName = this.nodes[0].unitId + "";
|
||||
this.getworkTrainList();
|
||||
} else {
|
||||
this.workTrainList = [];
|
||||
}
|
||||
});
|
||||
},
|
||||
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;
|
||||
});
|
||||
}
|
||||
this.loading = true;
|
||||
this.queryParams.deptId = this.activeName;
|
||||
listWorkTrain(this.queryParams).then((response) => {
|
||||
this.workTrainList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
|
@ -483,7 +507,7 @@ export default {
|
|||
this.$modal
|
||||
.confirm('是否确认删除专项培训编号为"' + ids + '"的数据项?')
|
||||
.then(function () {
|
||||
return delSurProjectUserInfo(ids);
|
||||
return delWorkTrain(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getworkTrainList();
|
||||
|
@ -511,18 +535,4 @@ export default {
|
|||
},
|
||||
};
|
||||
</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>
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
package com.ruoyi.web.project.controller;
|
||||
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.web.project.service.WxIProjectInfoService;
|
||||
import com.yanzhu.jh.project.service.ISurProjectUserinfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* @version : V1.0
|
||||
|
@ -23,6 +25,9 @@ import java.util.Map;
|
|||
@RequestMapping("/wechat/project")
|
||||
public class ProjectController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Autowired
|
||||
WxIProjectInfoService IProjectInfoService;
|
||||
|
||||
|
@ -56,7 +61,15 @@ public class ProjectController extends BaseController {
|
|||
*/
|
||||
@RequestMapping("/selectProjectByCompanyId")
|
||||
public Object selectProjectByCompanyId(@RequestParam Map<String,Object> map) {
|
||||
return IProjectInfoService.getProjectByDeptIdAndCompanyId(map);
|
||||
//设置缓存
|
||||
String key="wechat_project_selectProjectByCompanyId-deptId_"+map.get("deptId")+"-userId_"+map.get("userId")+"-minRoleId_"+map.get("minRoleId");
|
||||
Object obj=redisCache.getCacheObject(key);
|
||||
if(obj!=null){
|
||||
return obj;
|
||||
}
|
||||
List<Map<String,Object>> list = IProjectInfoService.getProjectByDeptIdAndCompanyId(map);
|
||||
redisCache.setCacheObject(key, list, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -66,7 +79,14 @@ public class ProjectController extends BaseController {
|
|||
*/
|
||||
@RequestMapping("/getProjectUnitList")
|
||||
public Object getProjectUnitList(String projectId){
|
||||
return IProjectInfoService.getProjectUnitList(projectId);
|
||||
String key="wechat_project_getProjectUnitList-projectId_"+projectId;
|
||||
Object obj=redisCache.getCacheObject(key);
|
||||
if(obj!=null){
|
||||
return obj;
|
||||
}
|
||||
List<Map<String,Object>> list = IProjectInfoService.getProjectUnitList(projectId);
|
||||
redisCache.setCacheObject(key, list, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
|
||||
return list;
|
||||
}
|
||||
|
||||
/***
|
||||
|
|
|
@ -4,13 +4,17 @@ import com.ruoyi.common.constant.Constants;
|
|||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.model.LoginBody;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.framework.web.service.SysLoginService;
|
||||
import com.ruoyi.framework.web.service.TokenService;
|
||||
import com.ruoyi.web.userLogin.service.IWechatUserLoginService;
|
||||
import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* @version : V1.0
|
||||
|
@ -23,6 +27,9 @@ import java.util.Map;
|
|||
@RequestMapping("/wechat")
|
||||
public class WechatUserLoginController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Autowired
|
||||
private SysLoginService loginService;
|
||||
|
||||
|
@ -61,8 +68,18 @@ public class WechatUserLoginController extends BaseController {
|
|||
public AjaxResult openIdLogin(@RequestBody LoginBody loginBody)
|
||||
{
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
Map<String,Object> data = null;
|
||||
//设置缓存
|
||||
String key="wechat_openIdLogin-"+loginBody.getOpenId();
|
||||
Object obj=redisCache.getCacheObject(key);
|
||||
if(obj!=null){
|
||||
data = (Map<String,Object>) obj;
|
||||
ajax.put("data",data);
|
||||
return ajax;
|
||||
}
|
||||
ajax.put(Constants.TOKEN, "");
|
||||
Map<String,Object> data = wechatUserLoginService.getLoginUserByOpenId(loginBody.getOpenId());
|
||||
data = wechatUserLoginService.getLoginUserByOpenId(loginBody.getOpenId());
|
||||
redisCache.setCacheObject(key, data, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
|
||||
if(data!=null){
|
||||
ajax.put("data",data);
|
||||
return ajax;
|
||||
|
@ -99,7 +116,17 @@ public class WechatUserLoginController extends BaseController {
|
|||
*/
|
||||
@RequestMapping("/selectDeptAll")
|
||||
public AjaxResult selectDeptAll(@RequestParam Map<String,Object> map){
|
||||
return success(wechatUserLoginService.getDeptAll(map));
|
||||
Map<String,Object> data = null;
|
||||
//设置缓存
|
||||
String key="wechat_selectDeptAll-deptId_"+map.get("deptId")+"-userId_"+map.get("userId")+"-minRoleId_"+map.get("minRoleId");
|
||||
Object obj=redisCache.getCacheObject(key);
|
||||
if(obj!=null){
|
||||
data = (Map<String,Object>) obj;
|
||||
return success(data);
|
||||
}
|
||||
data = wechatUserLoginService.getDeptAll(map);
|
||||
redisCache.setCacheObject(key, data, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
|
||||
return success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -83,7 +83,7 @@ public class SurProjectWorkSpecialServiceImpl implements ISurProjectWorkSpecialS
|
|||
public int insertSurProjectWorkSpecial(SurProjectWorkSpecial surProjectWorkSpecial)
|
||||
{
|
||||
surProjectWorkSpecial.setCreateBy(SecurityUtils.getUsername());
|
||||
surProjectWorkSpecial.setDeptId(SecurityUtils.getDeptId());
|
||||
//surProjectWorkSpecial.setDeptId(SecurityUtils.getDeptId());
|
||||
surProjectWorkSpecial.setCreateTime(DateUtils.getNowDate());
|
||||
surProjectWorkSpecial.setCredentialType(FileUtils.getFileLastNameUpCase(surProjectWorkSpecial.getCredentialFile()));
|
||||
return surProjectWorkSpecialMapper.insertSurProjectWorkSpecial(surProjectWorkSpecial);
|
||||
|
|
|
@ -62,8 +62,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> left join sur_project_unit_info spui on spui.projectId = sp.id</if>
|
||||
<!--普通用户查询项目人员-->
|
||||
<if test='nowRole == "99"'> left join sur_project_userinfo spu on spu.project_id = sp.id</if>
|
||||
<if test="deptId != null"> left join work_train_dept wtd2 on wtd2.train_id = wt.id and wtd2.is_main ='Y'</if>
|
||||
<where>
|
||||
<if test="projectId != null"> and wt.project_id = #{projectId}</if>
|
||||
<if test="deptId != null"> and wtd2.dept_id = #{deptId}</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="trainTitle != null and trainTitle != ''"> and train_title like concat('%', #{trainTitle}, '%')</if>
|
||||
|
@ -76,8 +78,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test='nowRole == "4"'> and sp.deptId = #{nowDept}</if>
|
||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
|
||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and spui.unitId = #{nowDept}</if>
|
||||
<!--普通用户查询项目人员-->
|
||||
<if test='nowRole == "99"'> and spu.user_id = #{nowUser} and spu.is_del=0</if>
|
||||
</where>
|
||||
|
|
Loading…
Reference in New Issue