修复问题

zhangtao
laozt 1 year ago
parent 69c1b9b835
commit 5baca05809

@ -48,13 +48,13 @@
<!-- tabs-content --> <!-- tabs-content -->
<div v-show="activeTab == 0"> <div v-show="activeTab == 0">
<tab1 @nextTab="selectTab" /> <tab1 ref="tabs1" @nextTab="selectTab" />
</div> </div>
<div v-show="activeTab == 1"> <div v-show="activeTab == 1">
<tab2 @nextTab="selectTab" /> <tab2 ref="tabs2" @nextTab="selectTab" />
</div> </div>
<div v-show="activeTab == 2"> <div v-show="activeTab == 2">
<tab3 ref="tabs" @closeDialogtabs="closeDialog"/> <tab3 ref="tabs" @closeDialogtabs="closeDialog" />
</div> </div>
</div> </div>
</div> </div>
@ -85,19 +85,24 @@ export default {
created() {}, created() {},
methods: { methods: {
selectTab(index) { selectTab(index) {
console.log(index); // console.log(index);
this.activeTab = index; this.activeTab = index;
if (index == 2) { if (index == 0) {
this.$refs.tabs1.refreshList();
} else if (index == 1) {
this.$refs.tabs2.refreshList();
} else if (index == 2) {
this.$refs.tabs.reList(); this.$refs.tabs.reList();
} }
}, },
// //
openDialog(item, dept) { openDialog() {
this.activeTab = 0;
this.dialogVisible = true; this.dialogVisible = true;
}, },
// //
closeDialog() { closeDialog() {
this.$emit("closeDialog") this.$emit("closeDialog");
this.dialogVisible = false; this.dialogVisible = false;
}, },
}, },

@ -39,7 +39,7 @@
clearable clearable
/> />
</el-form-item> </el-form-item>
<el-form-item label="安全风险等级" prop="riskLevel"> <el-form-item label="安全风险等级" prop="riskLevel">
<el-select <el-select
v-model="queryParams.riskLevel" v-model="queryParams.riskLevel"
placeholder="请输入安全风险等级" placeholder="请输入安全风险等级"
@ -180,7 +180,14 @@ import firmDialog from "@/views/components/firmDialog/index.vue";
import dictzh from "@/utils/dictzh.js"; import dictzh from "@/utils/dictzh.js";
// //
import executive from "../../yingji/echarts/executive.vue"; import executive from "../../yingji/echarts/executive.vue";
import { listNew, listGetNew ,getNew, delNew, addNew, updateNew } from "@/api/yingji/new"; import {
listNew,
listGetNew,
getNew,
delNew,
addNew,
updateNew,
} from "@/api/yingji/new";
import { import {
listEnterprise, listEnterprise,
getEnterprise, getEnterprise,
@ -196,7 +203,7 @@ export default {
"is_point", "is_point",
"entpr_color", "entpr_color",
"major_hazard_level", "major_hazard_level",
"dict_risk_level", "dict_risk_level",
"dict_stand_level", "dict_stand_level",
], ],
components: { firmDialog, executive }, components: { firmDialog, executive },
@ -235,7 +242,7 @@ export default {
updateId: null, updateId: null,
userId: null, userId: null,
deptId: null, deptId: null,
isPoint: 1, isPoint: 1,
}, },
// //
form: {}, form: {},
@ -271,15 +278,18 @@ export default {
}; };
}, },
created() { created() {
let userInfo = JSON.parse(sessionStorage.getItem("USER_INFO")); this.refreshList()
if (userInfo.lawLevel == "县级" || userInfo.lawLevel == "镇级") {
this.queryParams.district = userInfo.permissionCode;
this.queryPlanEnterpriseParams.district = userInfo.permissionCode;
}
this.getList();
this.getPlanEnterpriseList();
}, },
methods: { methods: {
refreshList() {
let userInfo = JSON.parse(sessionStorage.getItem("USER_INFO"));
if (userInfo.lawLevel == "县级" || userInfo.lawLevel == "镇级") {
this.queryParams.district = userInfo.permissionCode;
this.queryPlanEnterpriseParams.district = userInfo.permissionCode;
}
this.getList();
this.getPlanEnterpriseList();
},
/** 查询计划企业列表 */ /** 查询计划企业列表 */
getPlanEnterpriseList() { getPlanEnterpriseList() {
listEnterprise(this.queryPlanEnterpriseParams).then((response) => { listEnterprise(this.queryPlanEnterpriseParams).then((response) => {

@ -278,15 +278,18 @@ export default {
}; };
}, },
created() { created() {
let userInfo = JSON.parse(sessionStorage.getItem("USER_INFO")); this.refreshList();
if (userInfo.lawLevel == "县级" || userInfo.lawLevel == "镇级") {
this.queryParams.district = userInfo.permissionCode;
this.queryPlanEnterpriseParams.district = userInfo.permissionCode;
}
this.getList();
this.getPlanEnterpriseList();
}, },
methods: { methods: {
refreshList() {
let userInfo = JSON.parse(sessionStorage.getItem("USER_INFO"));
if (userInfo.lawLevel == "县级" || userInfo.lawLevel == "镇级") {
this.queryParams.district = userInfo.permissionCode;
this.queryPlanEnterpriseParams.district = userInfo.permissionCode;
}
this.getList();
this.getPlanEnterpriseList();
},
/** 查询计划企业列表 */ /** 查询计划企业列表 */
getPlanEnterpriseList() { getPlanEnterpriseList() {
listEnterprise(this.queryPlanEnterpriseParams).then((response) => { listEnterprise(this.queryPlanEnterpriseParams).then((response) => {

@ -42,7 +42,7 @@
<el-table-column label="状态" align="center" prop="status"> <el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.isPoint == 1 ? "正式" : "草稿" }}</span> <span>{{ scope.row.status == 1 ? "正式" : "草稿" }}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -190,7 +190,7 @@ export default {
.then(({ value }) => { .then(({ value }) => {
// //
if (row.id != null) { if (row.id != null) {
row.createTime = null; // row.createTime = null;
row.plannedMonth = value; row.plannedMonth = value;
updateEnterprise(row).then((response) => { updateEnterprise(row).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");

@ -388,7 +388,7 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.$refs.addDialog.openDialog("newlyIncreased", this.dept); this.$refs.addDialog.openDialog();
}, },
/** 详情按钮操作 */ /** 详情按钮操作 */
handleInfo(row) { handleInfo(row) {

Loading…
Cancel
Save