提交代码

dev_xds
姜玉琦 2023-08-27 22:25:04 +08:00
parent 6aa8452c2d
commit db245cdc98
3 changed files with 124 additions and 85 deletions

View File

@ -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,16 +779,8 @@
<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>
<workTrainDrawer ref="workTrainDrawer"></workTrainDrawer>
<emergencyDrillDrawer ref="emergencyDrillDrawer"></emergencyDrillDrawer>
<surProjectSpecialDrawer
size="50%"
:visible.sync="projectSpecialDrawerVisible"
@ -828,7 +822,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 +843,7 @@ export default {
materialSealDrawer,
projectMeasureDrawer,
videoConfigDrawer,
costOutputDrawer
costOutputDrawer,
},
dicts: [
"sys_check_state",
@ -863,8 +857,6 @@ export default {
data() {
return {
projectUserInfoDrawerVisible: false,
workTrainDrawerVisible: false,
emergencyDrillDrawerVisible: false,
projectSpecialDrawerVisible: false,
//
loading: true,
@ -1070,10 +1062,10 @@ 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);
@ -1200,16 +1192,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;

View File

@ -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="65%"
style="padding-left: 20px"
>
<template slot="title">
<div>{{ title + " 【应急演练管理】" }}</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"
@ -260,12 +274,6 @@ export default {
components: {
ElImageViewer,
},
props: {
formData: {
projectId: String,
projectName: String,
},
},
dicts: ["train_nature_yjyl"],
data() {
return {
@ -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() {},
@ -354,18 +359,42 @@ export default {
onOpen() {
this.getworkTrainList();
},
onClose() {},
show(project) {
this.project = project;
this.title = 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 = [];
}
});
this.$api.publics
.selectProjectUnitUser({
projectId: project.id,
})
.then((d) => {
this.deptUserData = d.data;
});
},
/** 查询应急演练列表 */
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 +429,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 +486,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 +511,7 @@ export default {
this.$modal
.confirm('是否确认删除应急演练编号为"' + ids + '"的数据项?')
.then(function () {
return delSurProjectUserInfo(ids);
return delWorkTrain(ids);
})
.then(() => {
this.getworkTrainList();

View File

@ -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="65%"
style="padding-left: 20px"
>
<template slot="title">
<div>{{ title + " 【专项培训管理】" }}</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"
@ -318,17 +332,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() {},
@ -354,18 +365,35 @@ export default {
onOpen() {
this.getworkTrainList();
},
onClose() {},
show(project) {
this.project = project;
this.title = 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 = [];
}
});
},
/** 查询专项培训列表 */
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 +511,7 @@ export default {
this.$modal
.confirm('是否确认删除专项培训编号为"' + ids + '"的数据项?')
.then(function () {
return delSurProjectUserInfo(ids);
return delWorkTrain(ids);
})
.then(() => {
this.getworkTrainList();