|
@@ -36,14 +36,14 @@
|
|
|
<!--></el-date-picker>-->
|
|
|
<!--</el-form-item>-->
|
|
|
<el-form-item style="float: right;" v-hasPermi="['laboratory:plan:add']">
|
|
|
- <p class="inquire-button-one" style="width:130px;" @click="handleClick('', '', 'add')">定制预案</p>
|
|
|
+ <p class="inquire-button-one" style="width:130px;" @click="tableClickButton(4)">定制预案</p>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<p class="inquire-button-one" @click="onSearch">查询</p>
|
|
|
<p class="reset-button-one" @click="resetForm">重置</p>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-table v-loading="loading" border :data="tableData" @selection-change="handleSelectionChange">
|
|
|
+ <el-table v-loading="loading" border :data="tableData">
|
|
|
<el-table-column label="预案名称" align="center" prop="name" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column label="启动条件" align="center" prop="funNum" :show-overflow-tooltip="true" width="340"/>
|
|
|
<el-table-column label="创建人" align="center" prop="createBy" width="180"/>
|
|
@@ -51,29 +51,9 @@
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="340" v-if="tableButtonType">
|
|
|
<template slot-scope="scope">
|
|
|
<div class="button-box">
|
|
|
- <p class="table-min-button" style="margin-left:20px!important;" v-hasPermi="['laboratory:planjoin:edit']">关联实验室</p>
|
|
|
- <p class="table-min-button" style="margin-left:40px!important;" v-show="userId==scope.row.userId" v-hasPermiAnd="['laboratory:plan:query','laboratory:plan:edit']">编辑</p>
|
|
|
- <p class="table-min-button" style="margin-left:40px!important;color:#FE2B2B;" v-show="userId==scope.row.userId" v-hasPermi="['laboratory:plan:remove']">删除</p>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <!--<p class="table-min-button" style="margin-right:10px;" v-hasPermi="['laboratory:plan:query']"-->
|
|
|
- <!--@click="handleClick(scope.$index, scope.row,'detail')">查看</p>-->
|
|
|
- <!--<el-dropdown @command="moreClick">-->
|
|
|
- <!--<p class="table-min-button">更多>></p>-->
|
|
|
- <!--<el-dropdown-menu slot="dropdown">-->
|
|
|
- <!--<el-dropdown-item style="margin:0 10px;" :command="{index:scope.$index,row:scope.row,command:1}"-->
|
|
|
- <!--v-hasPermi="['laboratory:planjoin:edit']">关联实验室</el-dropdown-item>-->
|
|
|
- <!--<el-dropdown-item style="margin:0 10px;" :command="{index:scope.$index,row:scope.row,command:2}"-->
|
|
|
- <!--v-hasPermi="['laboratory:distribution:list']">关联记录</el-dropdown-item>-->
|
|
|
- <!--<el-dropdown-item style="margin:0 10px;" :command="{index:scope.$index,row:scope.row,command:3}"-->
|
|
|
- <!--v-show="userId==scope.row.userId"-->
|
|
|
- <!--v-hasPermiAnd="['laboratory:plan:query','laboratory:plan:edit']">编辑</el-dropdown-item>-->
|
|
|
- <!--<el-dropdown-item style="margin:0 10px;" :command="{index:scope.$index,row:scope.row,command:4}"-->
|
|
|
- <!--v-show="userId==scope.row.userId"-->
|
|
|
- <!--v-hasPermi="['laboratory:plan:remove']">删除</el-dropdown-item>-->
|
|
|
- <!--</el-dropdown-menu>-->
|
|
|
- <!--</el-dropdown>-->
|
|
|
+ <p class="table-min-button" style="margin-left:20px!important;" v-hasPermi="['laboratory:planjoin:edit']" @click="tableClickButton(1,scope.row)">关联实验室</p>
|
|
|
+ <p class="table-min-button" style="margin-left:40px!important;" v-show="userId==scope.row.userId" v-hasPermiAnd="['laboratory:plan:query','laboratory:plan:edit']" @click="tableClickButton(2,scope.row)">编辑</p>
|
|
|
+ <p class="table-min-button" style="margin-left:40px!important;color:#FE2B2B;" v-show="userId==scope.row.userId" v-hasPermi="['laboratory:plan:remove']" @click="tableClickButton(3,scope.row)">删除</p>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -122,6 +102,7 @@ import {listDepartments} from "@/api/system/dept";
|
|
|
import {listClassifiedAll} from "@/api/laboratory/classified";
|
|
|
import {listClasstypeAll} from "@/api/laboratory/classtype";
|
|
|
import {authListSubject} from "@/api/laboratory/subject";
|
|
|
+import { selectRiskPlanLeveList } from "@/api/evacuation3_2/index";
|
|
|
|
|
|
|
|
|
export default {
|
|
@@ -161,7 +142,6 @@ export default {
|
|
|
dialogVisible:false,
|
|
|
//关联记录
|
|
|
dialogVisible2:false,
|
|
|
- deptOptions:[],
|
|
|
typeList:[],
|
|
|
levelList:[],
|
|
|
dialogTable:[],
|
|
@@ -172,9 +152,32 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 操作按钮 1.关联 2.编辑 3.删除 4.新增
|
|
|
+ tableClickButton(type,item){
|
|
|
+ if(type == 1){
|
|
|
+
|
|
|
+ }else if(type == 2){
|
|
|
+ this.$set(this,'pageData',item);
|
|
|
+ this.$set(this,'pageType',1);
|
|
|
+ }else if(type == 3){
|
|
|
+ this.$confirm('是否确认删除该预案?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function() {
|
|
|
+
|
|
|
+ }).then(() => {
|
|
|
+ }).catch(() => {});
|
|
|
+ }else if(type == 4){
|
|
|
+ this.$set(this,'pageData',null);
|
|
|
+ this.$set(this,'pageType',1);
|
|
|
+ }else if(type == 5){
|
|
|
+ this.$set(this,'pageType',0);
|
|
|
+ }
|
|
|
+ },
|
|
|
//查询
|
|
|
onSearch() {
|
|
|
- this.param.pageNo = 1;
|
|
|
+ // this.param.pageNo = 1;
|
|
|
this.getListPlan();
|
|
|
},
|
|
|
//重置
|
|
@@ -187,47 +190,6 @@ export default {
|
|
|
this.param.endTime = '';
|
|
|
this.onSearch();
|
|
|
},
|
|
|
- moreClick(data){
|
|
|
- if(data.command=='3'){//编辑
|
|
|
- this.pageType = 1;
|
|
|
- this.pageData = data.row;
|
|
|
- }else if(data.command=='4'){//删除
|
|
|
- const ids = data.row.id || this.ids;
|
|
|
- this.$confirm('是否确认删除风险预案?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function() {
|
|
|
- return delPlan(ids);
|
|
|
- }).then(() => {
|
|
|
- this.getListPlan();
|
|
|
- this.msgSuccess("删除成功");
|
|
|
- }).catch(() => {});
|
|
|
- }else if(data.command=='1'){
|
|
|
- this.pageType = 4;
|
|
|
- this.$set(this,'associationData',data)
|
|
|
- }else if(data.command=='2'){//关联记录
|
|
|
- this.dialogVisible2=true;
|
|
|
- this.pageData3.id=data.row.id
|
|
|
- this.pageType=3;
|
|
|
- }
|
|
|
- },
|
|
|
- handleClick(index, row, doType) {
|
|
|
- let _this = this;
|
|
|
- if(doType == 'add'){//定制预案
|
|
|
- this.pageType = 1;
|
|
|
- this.pageData = null
|
|
|
- }else if(doType=='detail'){//查看
|
|
|
- this.pageType = 2;
|
|
|
- this.pageData2.id = row.id
|
|
|
- }else if(doType=='back'){
|
|
|
- this.dialogVisible=false;
|
|
|
- this.pageType = 0;
|
|
|
- this.propsType = true;
|
|
|
- this.getListPlan();
|
|
|
- }
|
|
|
- this.$forceUpdate();
|
|
|
- },
|
|
|
//监听关联记录弹窗关闭
|
|
|
handleClose(){
|
|
|
this.pageType=0
|
|
@@ -259,14 +221,7 @@ export default {
|
|
|
getListPlan() {
|
|
|
let _this=this;
|
|
|
this.loading = true;
|
|
|
- if(this.dateRange&&this.dateRange.length>0){
|
|
|
- this.param.beginTime=this.dateRange[0]
|
|
|
- this.param.endTime=this.dateRange[1]
|
|
|
- }else{
|
|
|
- this.param.beginTime=null;
|
|
|
- this.param.endTime=null
|
|
|
- }
|
|
|
- listPlan(this.param).then(response => {
|
|
|
+ selectRiskPlanLeveList(this.param).then(response => {
|
|
|
this.$set(this,'tableData',response.rows)
|
|
|
// this.tableData = response.rows;
|
|
|
this.total = response.total;
|