This commit is contained in:
shijing 2022-10-19 11:59:19 +08:00
commit d9f95a8811
20 changed files with 5711 additions and 5242 deletions

View File

@ -79,13 +79,7 @@
<el-table-column label="姓名" prop="name"></el-table-column> <el-table-column label="姓名" prop="name"></el-table-column>
<el-table-column label="手机号" prop="phone"></el-table-column> <el-table-column label="手机号" prop="phone"></el-table-column>
<el-table-column label="部门" prop="belong_dept"> <el-table-column label="部门" prop="belong_dept_name"></el-table-column>
<template #default="scope">
<span v-if="scope.row.belong_dept_">{{
scope.row.belong_dept_.name
}}</span>
</template>
</el-table-column>
<el-table-column label="账号类型" prop="type"> <el-table-column label="账号类型" prop="type">
<template #default="scope"> <template #default="scope">
<span>{{userTypeOptions[scope.row.type]}}</span> <span>{{userTypeOptions[scope.row.type]}}</span>

View File

@ -229,7 +229,7 @@
</el-table-column> --> </el-table-column> -->
</scTable> </scTable>
</el-card> </el-card>
<el-card header="气体检测记录" style="margin-top: 8px" shadow="hover"> <el-card header="气体检测记录" style="margin-top: 8px" shadow="hover" v-show="oplcateCode=='fire'||oplcateCode=='space'||oplcateCode=='cooler'">
<scTable <scTable
ref="gasTable" ref="gasTable"
:data="gasData" :data="gasData"
@ -316,7 +316,7 @@
risks_checked: [], risks_checked: [],
}, },
initForm: {}, initForm: {},
oplcateCode: "", oplcateCode: 'fire',
operationId: "", operationId: "",
oplId: "", oplId: "",
leveloptions: [ leveloptions: [
@ -371,6 +371,7 @@
this.$API.opm.opl.read.req(this.oplId).then((res) => { this.$API.opm.opl.read.req(this.oplId).then((res) => {
this.mainLoading = false this.mainLoading = false
this.form = res; this.form = res;
this.oplcateCode = res.cate_code
// this.oplcateId = res.cate; // this.oplcateId = res.cate;
// this.operationId = res.operation; // this.operationId = res.operation;
// this.getOperation(); // this.getOperation();

View File

@ -1,28 +1,22 @@
<template> <template>
<div class="user-bar"> <div class="user-bar">
<!-- <div class="panel-item hidden-sm-and-down" @click="search">
<el-icon><el-icon-search /></el-icon>
</div> -->
<div class="screen panel-item hidden-sm-and-down" @click="screen"> <div class="screen panel-item hidden-sm-and-down" @click="screen">
<el-icon><el-icon-full-screen /></el-icon> <el-icon>
<el-icon-full-screen />
</el-icon>
</div>
<div class="panel-item hidden-sm-and-down" @click="openBook">
<el-icon>
<el-icon-files />
</el-icon>
</div> </div>
<div class="msg panel-item" @click="showMsg"> <div class="msg panel-item" @click="showMsg">
<el-badge <el-badge :hidden="msgList.length == 0" :value="msgList.length" class="badge" type="danger">
:hidden="msgList.length == 0" <el-icon>
:value="msgList.length" <el-icon-chat-dot-round />
class="badge" </el-icon>
type="danger"
>
<el-icon><el-icon-chat-dot-round /></el-icon>
</el-badge> </el-badge>
<el-drawer <el-drawer title="新消息" v-model="msg" style="width:400px !important" append-to-body destroy-on-close>
title="新消息"
v-model="msg"
style="width:400px !important"
append-to-body
destroy-on-close
>
<el-container> <el-container>
<el-main class="nopadding"> <el-main class="nopadding">
<el-scrollbar> <el-scrollbar>
@ -30,42 +24,23 @@
<li v-for="item in msgList" v-bind:key="item.id"> <li v-for="item in msgList" v-bind:key="item.id">
<div style="width: 100%; padding: 10px"> <div style="width: 100%; padding: 10px">
<div style="width: 35%; float: left"> <div style="width: 35%; float: left">
<el-span <el-span style="color:red:float:left" v-for="items in item.event_.cates_" :key="items.id"
style="color:red:float:left" :label="items.name" :value="items.id">{{ items.name }}</el-span>
v-for="items in item.event_.cates_"
:key="items.id"
:label="items.name"
:value="items.id"
>{{ items.name }}</el-span
>
</div> </div>
<div style="width: 32%; float: left"> <div style="width: 32%; float: left">
<p>{{ item.event_.create_time }}</p> <p>{{ item.event_.create_time }}</p>
</div> </div>
<div style="width: 30%; float: right"> <div style="width: 30%; float: right">
<el-button <el-button style="float: right" v-if="item.event_.handle_user == ''"
style="float: right" @click="createhandele(item.event_.id)">待处理</el-button>
v-if="item.event_.handle_user == ''" <el-button style="float: right" v-else @click="handele(item.event_.id)">已处理</el-button>
@click="createhandele(item.event_.id)"
>待处理</el-button
>
<el-button
style="float: right"
v-else
@click="handele(item.event_.id)"
>已处理</el-button
>
</div> </div>
</div> </div>
<div style="width: 100%; padding: 10px"> <div style="width: 100%; padding: 10px">
<p>警报信息{{ item.event_.voice_msg }}</p> <p>警报信息{{ item.event_.voice_msg }}</p>
</div> </div>
</li> </li>
<el-empty <el-empty v-if="msgList.length == 0" description="暂无新消息" :image-size="100"></el-empty>
v-if="msgList.length == 0"
description="暂无新消息"
:image-size="100"
></el-empty>
</ul> </ul>
</el-scrollbar> </el-scrollbar>
</el-main> </el-main>
@ -80,28 +55,21 @@
<div class="user-avatar"> <div class="user-avatar">
<el-avatar :size="34" shape="square">{{ userNameF }}</el-avatar> <el-avatar :size="34" shape="square">{{ userNameF }}</el-avatar>
<label>{{ userName }}</label> <label>{{ userName }}</label>
<el-icon class="el-icon--right"><el-icon-arrow-down /></el-icon> <el-icon class="el-icon--right">
<el-icon-arrow-down />
</el-icon>
</div> </div>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<el-dropdown-item command="uc">帐号信息</el-dropdown-item> <el-dropdown-item command="uc">帐号信息</el-dropdown-item>
<!-- <el-dropdown-item command="clearCache">清除缓存</el-dropdown-item> --> <!-- <el-dropdown-item command="clearCache">清除缓存</el-dropdown-item> -->
<el-dropdown-item divided command="outLogin" <el-dropdown-item divided command="outLogin">退出登录</el-dropdown-item>
>退出登录</el-dropdown-item
>
</el-dropdown-menu> </el-dropdown-menu>
</template> </template>
</el-dropdown> </el-dropdown>
</div> </div>
<el-dialog <el-dialog v-model="searchVisible" :width="700" title="搜索" custom-class="drawerBG" center destroy-on-close>
v-model="searchVisible"
:width="700"
title="搜索"
custom-class="drawerBG"
center
destroy-on-close
>
<search @success="searchVisible = false"></search> <search @success="searchVisible = false"></search>
</el-dialog> </el-dialog>
</template> </template>
@ -129,6 +97,9 @@ export default {
}, },
methods: { methods: {
openBook() {
window.open('/media/ehs_guide.pdf')
},
getMyVents() { getMyVents() {
this.$API.ecm.myevent.list this.$API.ecm.myevent.list
.req({ is_read: false, page: 0 }) .req({ is_read: false, page: 0 })
@ -137,26 +108,26 @@ export default {
}); });
}, },
goEvent() { goEvent() {
this.$router.push({name:"event"}) this.$router.push({ name: "event" })
}, },
createhandele(id) { createhandele(id) {
this.$router.push({ this.$router.push({
name: "eventhandlefrom", name: "eventhandlefrom",
query: { query: {
id: id, id: id,
}, },
}); });
this.msg=false; this.msg = false;
}, },
handele(id) { handele(id) {
this.$router.push({ this.$router.push({
name: "eventhandlefrom", name: "eventhandlefrom",
query: { query: {
id: id, id: id,
}, },
}); });
this.msg=false; this.msg = false;
}, },
// //
handleUser(command) { handleUser(command) {
if (command == "uc") { if (command == "uc") {
@ -208,7 +179,7 @@ this.msg=false;
// //
showMsg() { showMsg() {
this.msg = true; this.msg = true;
this.getMyVents(); this.getMyVents();
}, },
// //
markRead() { markRead() {
@ -228,6 +199,7 @@ this.msg=false;
align-items: center; align-items: center;
height: 100%; height: 100%;
} }
.user-bar .panel-item { .user-bar .panel-item {
padding: 0 10px; padding: 0 10px;
cursor: pointer; cursor: pointer;
@ -235,17 +207,21 @@ this.msg=false;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.user-bar .panel-item i { .user-bar .panel-item i {
font-size: 16px; font-size: 16px;
} }
.user-bar .panel-item:hover { .user-bar .panel-item:hover {
background: rgba(0, 0, 0, 0.1); background: rgba(0, 0, 0, 0.1);
} }
.user-bar .user-avatar { .user-bar .user-avatar {
height: 49px; height: 49px;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.user-bar .user-avatar label { .user-bar .user-avatar label {
display: inline-block; display: inline-block;
margin-left: 5px; margin-left: 5px;
@ -256,31 +232,38 @@ this.msg=false;
.msg-list li { .msg-list li {
border-top: 1px solid #eee; border-top: 1px solid #eee;
} }
.msg-list li a { .msg-list li a {
display: flex; display: flex;
padding: 20px; padding: 20px;
} }
.msg-list li a:hover { .msg-list li a:hover {
background: #ecf5ff; background: #ecf5ff;
} }
.msg-list__icon { .msg-list__icon {
width: 40px; width: 40px;
margin-right: 15px; margin-right: 15px;
} }
.msg-list__main { .msg-list__main {
flex: 1; flex: 1;
} }
.msg-list__main h2 { .msg-list__main h2 {
font-size: 15px; font-size: 15px;
font-weight: normal; font-weight: normal;
color: #333; color: #333;
} }
.msg-list__main p { .msg-list__main p {
font-size: 12px; font-size: 12px;
color: #999; color: #999;
line-height: 1.8; line-height: 1.8;
margin-top: 5px; margin-top: 5px;
} }
.msg-list__time { .msg-list__time {
width: 100px; width: 100px;
text-align: right; text-align: right;
@ -290,9 +273,11 @@ this.msg=false;
.dark .msg-list__main h2 { .dark .msg-list__main h2 {
color: #d0d0d0; color: #d0d0d0;
} }
.dark .msg-list li { .dark .msg-list li {
border-top: 1px solid #363636; border-top: 1px solid #363636;
} }
.dark .msg-list li a:hover { .dark .msg-list li a:hover {
background: #383838; background: #383838;
} }

View File

@ -1,6 +1,6 @@
<template> <template>
<el-row :gutter="6"> <el-row :gutter="6">
<el-col :md="4" :sm="24"> <el-col :md="3" :sm="24">
<el-card shadow="hover"> <el-card shadow="hover">
<template #header> <template #header>
<div class="card-header"> <div class="card-header">
@ -9,20 +9,15 @@
</template> </template>
<div class="card-body"> <div class="card-body">
<div v-for="item in dutyAgg" :key="item.workflow"> <div v-for="item in dutyAgg" :key="item.workflow">
<el-badge :value="item.count" class="item"> <el-badge :value="item.count" class="item">
<el-button <el-button icon="el-icon-promotion" type="primary" size="small" @click="toTicket"></el-button>
icon="el-icon-promotion" </el-badge>
type="primary" <div style="font-size:12px">{{ item.workflow__name }}</div>
size="small"
@click="toTicket"
></el-button>
</el-badge>
<div style="font-size:12px">{{ item.workflow__name }}</div>
</div>
</div> </div>
</div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="13" :sm="24">
<el-card shadow="hover"> <el-card shadow="hover">
<template #header> <template #header>
<div class="card-header"> <div class="card-header">
@ -31,75 +26,47 @@
</div> </div>
</template> </template>
<div style="height:340px"> <div style="height:340px">
<scTable <scTable ref="table" :apiObj="apiObj" :params="params" row-key="id" fit stripe hideDo>
ref="table" <!-- <el-table-column label="#" type="index" width="50"></el-table-column> -->
:apiObj="apiObj" <el-table-column label="事件种类">
:params="params" <template #default="scope">
row-key="id" <el-span v-for="item in scope.row.cates_" :key="item.id" :label="item.name" :value="item.id">{{
fit item.name }}/</el-span>
stripe </template>
hideDo </el-table-column>
> <el-table-column label="发生区域" prop="area_.name"></el-table-column>
<el-table-column label="#" type="index" width="50"></el-table-column> <el-table-column label="当事人" prop="employee_.name">
<el-table-column label="事件种类"> <template #default="scope">
<template #default="scope"> <span v-if="scope.row.employee && scope.row.obj_cate == 'people'">{{ scope.row.employee_.name }}</span>
<el-span <span v-else>未知人员</span>
v-for="item in scope.row.cates_" </template>
:key="item.id" </el-table-column>
:label="item.name"
:value="item.id"
>{{ item.name }}</el-span
>
</template>
</el-table-column>
<el-table-column label="发生区域" prop="area_.name"></el-table-column>
<el-table-column label="当事人" prop="employee_.name">
<template #default="scope">
<span
v-if="scope.row.employee && scope.row.obj_cate == 'people'"
>{{ scope.row.employee_.name }}</span
>
<span v-else>未知人员</span>
</template>
</el-table-column>
<el-table-column label="人员类型" prop="employee_.type"> <!-- <el-table-column label="人员类型" prop="employee_.type">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.employee && scope.row.obj_cate == 'people'"> <span v-if="scope.row.employee && scope.row.obj_cate == 'people'">
<span <span v-if="
v-if="
scope.row.employee_.type != '' && scope.row.employee_.type != '' &&
scope.row.employee_.type == 'employee' scope.row.employee_.type == 'employee'
" ">正式员工</span>
>正式员工</span <span v-if="
>
<span
v-if="
scope.row.employee_.type != '' && scope.row.employee_.type != '' &&
scope.row.employee_.type == 'remployee' scope.row.employee_.type == 'remployee'
" ">相关方</span>
>相关方</span <span v-if="
>
<span
v-if="
scope.row.employee_.type != '' && scope.row.employee_.type != '' &&
scope.row.employee_.type == 'visitor' scope.row.employee_.type == 'visitor'
" ">访客</span>
>访客</span </span>
> </template>
</span> </el-table-column> -->
</template> <el-table-column label="发生时间" prop="create_time"></el-table-column>
</el-table-column>
<el-table-column
label="发生时间"
prop="create_time"
></el-table-column>
<!-- <el-table-column <!-- <el-table-column
label="处理人" label="处理人"
prop="handle_user_name" prop="handle_user_name"
></el-table-column> --> ></el-table-column> -->
</scTable> </scTable>
</div> </div>
</el-card> </el-card>
@ -162,13 +129,21 @@ export default {
tooltip: { tooltip: {
trigger: "item", trigger: "item",
}, },
legend: {
// orient: 'vertical',
left: 'center'
},
series: [ series: [
{ {
name: "事件分类", name: "事件分类",
type: "pie", type: "pie",
radius: ["40%", "70%"], radius: ["40%", "70%"],
center: ["50%", "60%"], center: ["50%", "60%"],
label: false, label: {
formatter: '{c}',
position: 'inside',
color: 'white'
},
data: this.postOptions, data: this.postOptions,
}, },
], ],
@ -255,16 +230,18 @@ export default {
text-align: center; text-align: center;
margin: 40px 0 20px 0; margin: 40px 0 20px 0;
} }
.card-header { .card-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
height:24px; height: 24px;
} }
.card-body { .card-body {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-around; justify-content: space-around;
height:340px; height: 340px;
} }
</style> </style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,7 @@
:model="form" :model="form"
:rules="rules" :rules="rules"
label-width="110px" label-width="110px"
style="margin: 40px 40px 40px 40px" style="margin: 40px 40px 0px 40px"
> >
<el-row> <el-row>
<el-col :md="12" :sm="12" :xs="24"> <el-col :md="12" :sm="12" :xs="24">
@ -47,7 +47,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="12" :xs="24"> <el-col :md="12" :sm="12" :xs="24">
<el-form-item label="作业开始时间"> <el-form-item label="作业开始时间" prop="start_time">
<el-date-picker <el-date-picker
v-model="form.start_time" v-model="form.start_time"
type="datetime" type="datetime"
@ -56,7 +56,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="12" :xs="24"> <el-col :md="12" :sm="12" :xs="24">
<el-form-item label="作业结束时间"> <el-form-item label="作业结束时间" prop="end_time">
<el-date-picker <el-date-picker
v-model="form.end_time" v-model="form.end_time"
type="datetime" type="datetime"
@ -65,7 +65,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="12" :xs="24"> <el-col :md="12" :sm="12" :xs="24">
<el-form-item label="作业级别"> <el-form-item label="作业级别" prop="level">
<el-select v-model="form.level" placeholder="选择作业级别"> <el-select v-model="form.level" placeholder="选择作业级别">
<el-option <el-option
v-for="item in leveloptions" v-for="item in leveloptions"
@ -77,8 +77,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="12" :xs="24"> <el-col :md="12" :sm="12" :xs="24" >
<el-form-item label="作业部门"> <el-form-item label="作业部门" prop="dept_do">
<el-cascader <el-cascader
placeholder="选择作业部门" placeholder="选择作业部门"
getCheckedNodes="true" getCheckedNodes="true"
@ -96,7 +96,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="12" :xs="24"> <el-col :md="12" :sm="12" :xs="24">
<el-form-item label="作业负责人"> <el-form-item label="作业负责人" prop="charger">
<el-input <el-input
v-model="form.charger_name" v-model="form.charger_name"
style="width:200px" style="width:200px"
@ -114,7 +114,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="12" :xs="24"> <el-col :md="12" :sm="12" :xs="24">
<el-form-item label="作业监护人"> <el-form-item label="作业监护人" prop="monitor">
<el-input <el-input
v-model="form.monitor_name" v-model="form.monitor_name"
style="width:200px" style="width:200px"
@ -124,7 +124,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="24" :sm="12" :xs="24"> <el-col :md="24" :sm="12" :xs="24">
<el-form-item label="风险选择"> <el-form-item label="风险选择" prop="risks_checked">
<el-checkbox-group v-model="form.risks_checked"> <el-checkbox-group v-model="form.risks_checked">
<el-checkbox <el-checkbox
v-for="(item, index) in risklist" v-for="(item, index) in risklist"
@ -146,7 +146,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="24" :sm="12" :xs="24"> <el-col :md="24" :sm="12" :xs="24">
<el-form-item label="措施选择"> <el-form-item label="措施选择" prop="measures_checked">
<el-checkbox-group v-model="form.measures_checked"> <el-checkbox-group v-model="form.measures_checked">
<el-checkbox <el-checkbox
v-for="(item, index) in measurelist" v-for="(item, index) in measurelist"
@ -177,16 +177,12 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> </el-form>
<el-col :md="24" :sm="12" :xs="24"> <div style="margin-bottom: 20px; text-align:center">
<el-form-item> <el-button type="primary" plain @click="handleNextStep"
<el-button style="margin-top: 12px" type="primary" plain @click="handleNextStep"
>下一步 >下一步
</el-button> </el-button>
</el-form-item> </div>
</el-col>
</el-row>
</el-form>
</el-main> </el-main>
<!--作业人员!--> <!--作业人员!-->
@ -205,7 +201,7 @@
hidePagination hidePagination
stripe stripe
hideDo hideDo
style="height: 200px;" style="height: 300px;"
> >
<el-table-column <el-table-column
label="#" label="#"
@ -333,8 +329,9 @@
:data="apigasObj" :data="apigasObj"
row-key="id" row-key="id"
hidePagination hidePagination
hideDo
stripe stripe
style="height: 200px;" style="height: 300px;"
> >
<el-table-column <el-table-column
label="#" label="#"
@ -377,11 +374,6 @@
{{ scope.row.checker_.name }} {{ scope.row.checker_.name }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
label="创建时间"
prop="create_time"
width="150"
></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="200"> <el-table-column label="操作" fixed="right" align="center" width="200">
<template #default="scope"> <template #default="scope">
@ -396,7 +388,7 @@
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
<sc-dialog v-model="gasdialog" draggable title="气体检测记录"> <el-dialog v-model="gasdialog" draggable title="气体检测记录">
<el-form <el-form
ref="gasForm" ref="gasForm"
:model="formgas" :model="formgas"
@ -484,7 +476,7 @@
<el-button @click="dialoggase = false"> </el-button> <el-button @click="dialoggase = false"> </el-button>
<el-button type="primary" @click="submitgas"> </el-button> <el-button type="primary" @click="submitgas"> </el-button>
</template> </template>
</sc-dialog> </el-dialog>
<div style="margin-top:20px;text-align:center"> <div style="margin-top:20px;text-align:center">
<el-button @click="handleLastStep" style="margin-right:4px">上一步</el-button> <el-button @click="handleLastStep" style="margin-right:4px">上一步</el-button>
<el-button <el-button
@ -528,12 +520,13 @@
const defaultformworker = { const defaultformworker = {
id: "", id: "",
worker: null, worker: null,
duty: null, duty: "作业人员",
certificates: [], certificates: [],
opl: "", opl: "",
}; };
const defaultformgas = { const defaultformgas = {
id: "", id: "",
is_ok: true,
check_time: null, check_time: null,
opl: "", opl: "",
}; };
@ -592,7 +585,33 @@
true: "正常", true: "正常",
false: "不正常", false: "不正常",
}, },
tLoading: false tLoading: false,
rules: {
start_time: [
{required: true, message: '请选择'}
],
end_time: [
{required: true, message: '请选择'}
],
level: [
{required: true, message: '请选择'}
],
dept_do: [
{required: true, message: '请选择'}
],
charger: [
{required: true, message: '请选择'}
],
monitor: [
{required: true, message: '请选择'}
],
risks_checked: [
{required: true, message: '请选择'}
],
measures_checked: [
{required: true, message: '请选择'}
],
}
}; };
}, },
mounted() { mounted() {
@ -634,7 +653,7 @@
getData() { getData() {
this.$API.opm.opl.read.req(this.oplId).then((res) => { this.$API.opm.opl.read.req(this.oplId).then((res) => {
this.form = res; this.form = res;
this.oplId = res.id;
this.oplcateId = res.cate; this.oplcateId = res.cate;
this.operationId = res.operation; this.operationId = res.operation;
this.getOperation(); this.getOperation();
@ -686,9 +705,11 @@
}, },
// //
handleNextStep() { handleNextStep() {
if (this.active == 0) { if (this.active == 0) {
// console.log(this.oplId); this.$refs.dialogForm.validate((valid) => {
// if (valid) {
//
if (this.oplId == "") { if (this.oplId == "") {
// //
debugger; debugger;
@ -704,8 +725,8 @@
this.active = 1; this.active = 1;
this.oplId = res.id; this.oplId = res.id;
this.getworkerList(res.id); this.getworkerList();
this.getgasList(res.id); this.getgasList();
return res; return res;
}) })
.catch((err) => { .catch((err) => {
@ -717,14 +738,22 @@
this.$message.success("基本修改成功!"); this.$message.success("基本修改成功!");
this.issave = true; this.issave = true;
this.active = 1; this.active = 1;
this.getgasList(this.oplId); this.getgasList();
this.getworkerList(this.oplId); this.getworkerList();
}); });
} else { } else {
this.active = 1; this.active = 1;
} }
}
})
} else { } else {
if (this.active==1){
if(this.apiworkerObj.length==0){
this.$message.warning("请添加作业人员");
return
}
}
this.active = 2; this.active = 2;
} }
@ -742,8 +771,8 @@
}, },
// //
getworkerList(id) { getworkerList() {
this.$API.opm.worker.list.req({opl: id, page: 0}).then((res) => { this.$API.opm.worker.list.req({opl: this.oplId, page: 0}).then((res) => {
this.apiworkerObj = res; this.apiworkerObj = res;
console.log(res); console.log(res);
}); });
@ -761,7 +790,7 @@
.req(row.id) .req(row.id)
.then((res) => { .then((res) => {
this.$message.success("作业人员删除成功"); this.$message.success("作业人员删除成功");
this.$refs.workerTable.refresh(); this.getworkerList()
return res; return res;
}) })
.catch((err) => { .catch((err) => {
@ -777,7 +806,7 @@
.req(this.formworker) .req(this.formworker)
.then((res) => { .then((res) => {
this.$message.success("创建作业人员成功"); this.$message.success("创建作业人员成功");
this.getworkerList(this.oplId); this.getworkerList();
this.workerdialog = false; this.workerdialog = false;
}) })
.catch((err) => { .catch((err) => {
@ -787,8 +816,8 @@
}, },
// //
getgasList(id) { getgasList() {
this.$API.opm.gas.list.req({opl: id, page: 0}).then((res) => { this.$API.opm.gas.list.req({opl: this.oplId, page: 0}).then((res) => {
this.apigasObj = res; this.apigasObj = res;
console.log(res); console.log(res);
}); });
@ -809,7 +838,7 @@
.req(this.formgas) .req(this.formgas)
.then((res) => { .then((res) => {
this.$message.success("创建气体检测记录成功"); this.$message.success("创建气体检测记录成功");
this.getgasList(this.oplId); this.getgasList();
this.gasdialog = false; this.gasdialog = false;
}) })
@ -826,7 +855,7 @@
.req(row.id) .req(row.id)
.then((res) => { .then((res) => {
this.$message.success("气体检测记录删除成功"); this.$message.success("气体检测记录删除成功");
this.$refs.gasTable.refresh(); this.getgasList()
return res; return res;
}) })
.catch((err) => { .catch((err) => {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -55,7 +55,7 @@
</el-col> </el-col>
<el-col :md="12" :sm="24" :xs="24"> <el-col :md="12" :sm="24" :xs="24">
<el-form-item label="作业区域" prop="area"> <el-form-item label="作业区域" prop="area">
<el-select v-model="form.area" placeholder="选择作业区域"> <el-select v-model="form.area" placeholder="选择作业区域" @change="areaChange" clearable>
<el-option <el-option
v-for="item in areaoptions" v-for="item in areaoptions"
:key="item.id" :key="item.id"
@ -75,7 +75,6 @@
<el-form-item label="业务部门" prop="dept_bus"> <el-form-item label="业务部门" prop="dept_bus">
<el-cascader <el-cascader
placeholder="选择业务部门" placeholder="选择业务部门"
@change="dept1Change"
getCheckedNodes="true" getCheckedNodes="true"
:props="{ :props="{
expandTrigger: 'hover', // expandTrigger: 'hover', //
@ -93,17 +92,12 @@
<el-col :md="12" :sm="24" :xs="24"> <el-col :md="12" :sm="24" :xs="24">
<el-form-item label="部门协调员" prop="coordinator"> <el-form-item label="部门协调员" prop="coordinator">
<el-select <el-input
v-model="form.coordinator" v-model="form.coordinator_name"
placeholder="选择业务部门协调员" disabled
> style="width:200px"
<el-option ></el-input>
v-for="item in coordinatoroptions" <ehsUserSelect :multiple="false" @submit="getUser"/>
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24" :xs="24"> <el-col :md="12" :sm="24" :xs="24">
@ -129,6 +123,7 @@
<el-select <el-select
v-model="form.vchannels" v-model="form.vchannels"
:multiple = "true" :multiple = "true"
filterable
> >
<el-option <el-option
v-for="item in vchannelOptions" v-for="item in vchannelOptions"
@ -212,19 +207,27 @@ export default {
this.areaoptions = res; this.areaoptions = res;
}); });
}, },
dept1Change(val) { areaChange(val) {
// this.form.area = val
this.$API.system.user.list.req({ page: 0, belong_dept: val }).then((res) => { this.getVchannels()
this.coordinatoroptions = res;
});
}, },
// dept1Change(val) {
// //
// this.$API.system.user.list.req({ page: 0, belong_dept: val }).then((res) => {
// this.coordinatoroptions = res;
// });
// },
getVchannels(){ getVchannels(){
this.$API.third.tdevice.list.req({ type: 60, page: 0 }).then((res) => { this.$API.third.tdevice.list.req({ type: 60, page: 0, area: this.form.area }).then((res) => {
this.vchannelOptions = res; this.vchannelOptions = res;
}); });
}, },
getUser(data) {
//
this.form.coordinator=data.id;
this.form.coordinator_name=data.name
},
// //
open(mode = "add") { open(mode = "add") {
this.mode = mode; this.mode = mode;

View File

@ -22,17 +22,17 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="属地部门:"> <el-descriptions-item label="属地部门:">
<span v-if="operationObj.dept_ter_">{{ <span v-if="operationObj.dept_ter_">{{
operationObj.dept_ter_.name operationObj.dept_ter_.name
}}</span> }}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="业务部门:"> <el-descriptions-item label="业务部门:">
<span v-if="operationObj.dept_bus_">{{ <span v-if="operationObj.dept_bus_">{{
operationObj.dept_bus_.name operationObj.dept_bus_.name
}}</span> }}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="协调员:"> <el-descriptions-item label="协调员:">
<span v-if="operationObj.coordinator_">{{ <span v-if="operationObj.coordinator_">{{
operationObj.coordinator_.name operationObj.coordinator_.name
}}</span> }}</span>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
@ -40,91 +40,50 @@
<el-card header="许可证" style="margin-top: 8px"> <el-card header="许可证" style="margin-top: 8px">
<div class="left-panel"> <div class="left-panel">
<el-button <el-button icon="el-icon-plus" style="margin: 3px 0px 0px 10px" v-for="(item, index) in oplcateList"
icon="el-icon-plus" :key="index" :title="item.name" type="primary" v-auth="'opl.create'" @click="addOpl(item.id, item.code)">
style="margin: 3px 0px 0px 10px"
v-for="(item, index) in oplcateList"
:key="index"
:title="item.name"
type="primary"
v-auth="'opl.create'"
@click="addFire(item.id, item.name)"
>
{{ item.name }} {{ item.name }}
</el-button> </el-button>
</div> </div>
<el-divider /> <el-divider />
<scTable <scTable ref="table" :data="apiObj" row-key="id" @selection-change="selectionChange" stripe hidePagination
ref="table" hideRefresh @resetQuery="resetQuery">
:data="apiObj"
row-key="id"
@selection-change="selectionChange"
stripe
hidePagination
hideRefresh
@resetQuery="resetQuery"
>
<el-table-column label="#" type="index" width="50"></el-table-column> <el-table-column label="#" type="index" width="50"></el-table-column>
<el-table-column <el-table-column label="作业许可编号" prop="number" width="150"></el-table-column>
label="作业许可编号"
prop="number"
width="150"
></el-table-column>
<el-table-column label="作业级别" prop="level"></el-table-column> <el-table-column label="作业级别" prop="level"></el-table-column>
<el-table-column label="许可证种类" prop="cate_name"></el-table-column> <el-table-column label="许可证种类" prop="cate_name"></el-table-column>
<el-table-column label="流程状态" width="160"> <el-table-column label="流程状态" width="160">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.ticket">{{ scope.row.ticket_.state_.name }} <span v-if="scope.row.ticket">{{ scope.row.ticket_.state_.name }}
-{{act_states[scope.row.ticket_.act_state]}} -{{act_states[scope.row.ticket_.act_state]}}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="预计开始" prop="start_time" width="150"></el-table-column> <el-table-column label="预计开始" prop="start_time" width="150"></el-table-column>
<el-table-column label="作业部门" prop="dept_do" <el-table-column label="作业部门" prop="dept_do"><template #default="scope">
><template #default="scope">
{{ scope.row.dept_do_.name }} {{ scope.row.dept_do_.name }}
</template></el-table-column </template></el-table-column>
> <el-table-column label="作业负责人" prop="charger"><template #default="scope">
<el-table-column label="作业负责人" prop="charger"
><template #default="scope">
{{ scope.row.charger_.name }} {{ scope.row.charger_.name }}
</template></el-table-column </template></el-table-column>
> <el-table-column label="作业监护人" prop="monitor"><template #default="scope">
<el-table-column label="作业监护人" prop="monitor"
><template #default="scope">
{{ scope.row.monitor_.name }} {{ scope.row.monitor_.name }}
</template></el-table-column </template></el-table-column>
>
<el-table-column label="操作" fixed="right" width="80"> <el-table-column label="操作" fixed="right" width="80">
<template #default="scope"> <template #default="scope">
<el-button-group> <el-button-group>
<el-button <el-button text type="primary" size="small" @click="table_show(scope.row, scope.$index)">查看
text
type="primary"
size="small"
@click="table_show(scope.row, scope.$index)"
>查看
</el-button> </el-button>
<el-button <el-button v-if="operationObj.state === 10" text type="warning" size="small" v-auth="'opl.update'"
v-if="operationObj.state === 10" @click="table_edit(scope.row, scope.$index)">编辑
text
type="warning"
size="small"
v-auth="'opl.update'"
@click="table_edit(scope.row, scope.$index)"
>编辑
</el-button> </el-button>
</el-button-group> </el-button-group>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
</el-card> </el-card>
<el-drawer <el-drawer :size="'50%'" v-model="showLimited" :title="oplName + '作业许可证详情'">
:size="'50%'"
v-model="showLimited"
:title="oplName + '作业许可证详情'"
>
<sc-fire :id="oplId"></sc-fire> <sc-fire :id="oplId"></sc-fire>
</el-drawer> </el-drawer>
</el-main> </el-main>
@ -159,14 +118,14 @@ export default {
40: "进行中", 40: "进行中",
50: "已完成", 50: "已完成",
}, },
act_states: { act_states: {
0: "草稿中", 0: "草稿中",
1: "进行中", 1: "进行中",
2: "被退回", 2: "被退回",
3: "被撤回", 3: "被撤回",
4: "已完成", 4: "已完成",
5: "已关闭", 5: "已关闭",
}, },
}; };
}, },
@ -206,181 +165,30 @@ export default {
}, },
// //
addFire(id, name) { addOpl(id, code) {
switch (name) { this.$router.push({
case "动火": name: code,
this.$router.push({ query: {
name: "fire", operationid: this.$route.query.id, //ID
query: { oplcateId: id, //ID
operationid: this.$route.query.id, //ID oplId: "", //ID
oplcateId: id, //ID },
oplId: "", //ID });
},
});
break;
case "有限空间":
this.$router.push({
name: "space",
query: {
operationid: this.$route.query.id, //ID
oplcateId: id, //ID
oplId: "", //ID
},
});
break;
case "清库":
this.$router.push({
name: "clear",
query: {
operationid: this.$route.query.id, //ID
oplcateId: id, //ID
oplId: "", //ID
},
});
break;
case "高处":
this.$router.push({
name: "high",
query: {
operationid: this.$route.query.id, //ID
oplcateId: id, //ID
oplId: "", //ID
},
});
break;
case "吊装":
this.$router.push({
name: "hoisting",
query: {
operationid: this.$route.query.id, //ID
oplcateId: id, //ID
oplId: "", //ID
},
});
break;
case "预热器清堵":
this.$router.push({
name: "preheat",
query: {
operationid: this.$route.query.id, //ID
oplcateId: id, //ID
oplId: "", //ID
},
});
break;
case "篦冷机清大块":
this.$router.push({
name: "cooler",
query: {
operationid: this.$route.query.id, //ID
oplcateId: id, //ID
oplId: "", //ID
},
});
break;
case "动土":
this.$router.push({
name: "soil",
query: {
operationid: this.$route.query.id, //ID
oplcateId: id, //ID
oplId: "", //ID
},
});
break;
case "临时用电":
this.$router.push({
name: "usecl",
query: {
operationid: this.$route.query.id, //ID
oplcateId: id, //ID
oplId: "", //ID
},
});
break;
}
}, },
// //
table_edit(row) { table_edit(row) {
switch (row.cate_name) { this.$router.push({
case "动火": name: row.cate_code,
this.$router.push({ query: {
name: "fire", oplId: row.id, //ID
query: { },
oplId: row.id, //ID });
},
});
break;
case "有限空间":
this.$router.push({
name: "space",
query: {
oplId: row.id, //ID
},
});
break;
case "清库":
this.$router.push({
name: "clear",
query: {
oplId: row.id, //ID
},
});
break;
case "高处":
this.$router.push({
name: "high",
query: {
oplId: row.id, //ID
},
});
break;
case "吊装":
this.$router.push({
name: "hoisting",
query: {
oplId: row.id, //ID
},
});
break;
case "预热器清堵":
this.$router.push({
name: "preheat",
query: {
oplId: row.id, //ID
},
});
break;
case "篦冷机清大块":
this.$router.push({
name: "cooler",
query: {
oplId: row.id, //ID
},
});
break;
case "动土":
this.$router.push({
name: "soil",
query: {
oplId: row.id, //ID
},
});
break;
case "临时用电":
this.$router.push({
name: "usecl",
query: {
oplId: row.id, //ID
},
});
break;
}
}, },
// //
table_show(row) { table_show(row) {
this.showLimited = true; this.showLimited = true;
this.oplId = row.id; this.oplId = row.id;
this.oplCode = row.cate_code;
this.oplName = row.cate_name; this.oplName = row.cate_name;
this.workId = row.workers[0]; this.workId = row.workers[0];
}, },
@ -417,7 +225,7 @@ export default {
loading.close(); loading.close();
this.$message.success("操作成功"); this.$message.success("操作成功");
}) })
.catch(() => {}); .catch(() => { });
}, },
// //
selectionChange(selection) { selectionChange(selection) {
@ -434,7 +242,7 @@ export default {
}, 500); }, 500);
}, },
// //
handleQuery() {}, handleQuery() { },
//ID //ID
filterTree(id) { filterTree(id) {
var target = null; var target = null;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -25,13 +25,13 @@
:model="form" :model="form"
:rules="rules" :rules="rules"
label-width="110px" label-width="110px"
style="margin: 40px 40px 40px 40px" style="margin: 40px 40px 0px 40px"
> >
<el-row> <el-row>
<el-col :md="12" :sm="12" :xs="24"> <el-col :md="12" :sm="12" :xs="24">
<el-form-item label="关联作业"> <el-form-item label="关联作业">
<el-input <el-input
v-model="operationId" v-model="form.name"
type="text" type="text"
:disabled="true" :disabled="true"
></el-input> ></el-input>
@ -47,7 +47,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="12" :xs="24"> <el-col :md="12" :sm="12" :xs="24">
<el-form-item label="作业开始时间"> <el-form-item label="作业开始时间" prop="start_time">
<el-date-picker <el-date-picker
v-model="form.start_time" v-model="form.start_time"
type="datetime" type="datetime"
@ -56,7 +56,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="12" :xs="24"> <el-col :md="12" :sm="12" :xs="24">
<el-form-item label="作业结束时间"> <el-form-item label="作业结束时间" prop="end_time">
<el-date-picker <el-date-picker
v-model="form.end_time" v-model="form.end_time"
type="datetime" type="datetime"
@ -67,7 +67,7 @@
<el-col :md="12" :sm="12" :xs="24"> <el-col :md="12" :sm="12" :xs="24">
<el-form-item label="作业部门"> <el-form-item label="作业部门" prop="dept_do">
<el-cascader <el-cascader
placeholder="选择作业部门" placeholder="选择作业部门"
getCheckedNodes="true" getCheckedNodes="true"
@ -86,7 +86,7 @@
<el-col :md="12" :sm="12" :xs="24"> <el-col :md="12" :sm="12" :xs="24">
<el-form-item label="作业监护人"> <el-form-item label="作业监护人" prop="monitor">
<el-select v-model="form.monitor" placeholder="选择作业监护人"> <el-select v-model="form.monitor" placeholder="选择作业监护人">
<el-option <el-option
v-for="item in useroptions" v-for="item in useroptions"
@ -98,7 +98,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="12" :xs="24"> <el-col :md="12" :sm="12" :xs="24">
<el-form-item label="供电制式"> <el-form-item label="供电制式" >
<el-select v-model="form.level" placeholder="选择供电制式"> <el-select v-model="form.level" placeholder="选择供电制式">
<el-option <el-option
v-for="item in leveloptions" v-for="item in leveloptions"
@ -152,18 +152,6 @@
placeholder="选择开始时间" placeholder="选择开始时间"
/> />
</el-form-item> </el-form-item>
</el-col>
<el-col :md="12" :sm="12" :xs="24">
<el-form-item label="验收人签名">
<el-select v-model="form.charger" placeholder="选择验收人签名">
<el-option
v-for="item in useroptions"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="12" :xs="24"> <el-col :md="12" :sm="12" :xs="24">
<el-form-item label="用电功率"> <el-form-item label="用电功率">
@ -272,16 +260,12 @@
</el-col> </el-col>
!--> !-->
</el-row> </el-row>
<el-row>
<el-col :md="24" :sm="12" :xs="24">
<el-form-item>
<el-button style="margin-top: 12px" @click="handleNextStep"
>下一步</el-button
>
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
<div style="margin-bottom: 20px; text-align:center">
<el-button type="primary" plain @click="handleNextStep"
>下一步
</el-button>
</div>
</el-main> </el-main>
<!--作业人员!--> <!--作业人员!-->
@ -340,7 +324,7 @@
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
<sc-dialog v-model="workerdialog" draggable title="选择作业人员"> <el-dialog v-model="workerdialog" draggable title="选择作业人员">
<el-form <el-form
ref="workerForm" ref="workerForm"
:model="formworker" :model="formworker"
@ -407,11 +391,21 @@
<el-button @click="dialogcart = false"> </el-button> <el-button @click="dialogcart = false"> </el-button>
<el-button type="primary" @click="submitWorker"> </el-button> <el-button type="primary" @click="submitWorker"> </el-button>
</template> </template>
</sc-dialog> </el-dialog>
<el-button style="margin-top: 12px" @click="handleLastStep" <div style="margin-top:20px;text-align:center">
>上一步</el-button <el-button @click="handleLastStep" style="margin-right:4px">上一步</el-button>
> <el-button
<el-button style="margin-top: 12px" @click="submitOut">退出</el-button> :loading="tLoading"
v-for=" item in initForm.transitions"
:key="item.id"
type="primary"
@click="submitTicketCreate(item.id)"
style="margin-right:4px"
>{{item.name}}
</el-button>
<el-button @click="submitOut" type="warning">退出</el-button>
</div>
</el-main> </el-main>
@ -441,7 +435,7 @@ import { genTree } from "@/utils/verificate";
const defaultformworker = { const defaultformworker = {
id: "", id: "",
worker: null, worker: null,
duty: null, duty: "作业人员",
certificates: [], certificates: [],
opl: "", opl: "",
}; };
@ -473,7 +467,7 @@ export default {
cate: "", cate: "",
risks_checked: [], risks_checked: [],
}, },
initForm: {},
operationId: "", operationId: "",
oplcateId: "", oplcateId: "",
oplId: "", oplId: "",
@ -507,6 +501,32 @@ export default {
true: "正常", true: "正常",
false: "不正常", false: "不正常",
}, },
rules: {
start_time: [
{required: true, message: '请选择'}
],
end_time: [
{required: true, message: '请选择'}
],
level: [
{required: true, message: '请选择'}
],
dept_do: [
{required: true, message: '请选择'}
],
charger: [
{required: true, message: '请选择'}
],
monitor: [
{required: true, message: '请选择'}
],
risks_checked: [
{required: true, message: '请选择'}
],
measures_checked: [
{required: true, message: '请选择'}
],
}
}; };
}, },
mounted() { mounted() {
@ -514,9 +534,8 @@ export default {
this.oplcateId = this.$route.query.oplcateId; //ID this.oplcateId = this.$route.query.oplcateId; //ID
this.oplId = this.$route.query.oplId; //ID this.oplId = this.$route.query.oplId; //ID
this.getoplData(); this.getoplData();
this.getInit();
this.getDept(); this.getDept();
this.getUser();
}, },
methods: { methods: {
@ -546,7 +565,7 @@ export default {
this.$API.opm.operation.read.req(this.operationId).then((res) => { this.$API.opm.operation.read.req(this.operationId).then((res) => {
this.form.start_time = res.start_time; // this.form.start_time = res.start_time; //
this.form.end_time = res.end_time; // this.form.end_time = res.end_time; //
this.form.name = res.name;
console.log(res); console.log(res);
}); });
}, },
@ -685,7 +704,27 @@ export default {
}); });
}, },
//
getInit() {
this.$API.wf.workflow.initkey.req('opl_usecl').then((res) => {
this.initForm = res;
});
},
//,
submitTicketCreate(id) {
let ticket = {};
ticket.workflow = this.initForm.workflow;
ticket.ticket_data = {opl: this.oplId};
ticket.transition = id;
ticket.title = this.form.name + '-申请';
this.tLoading = true
this.$API.wf.ticket.create.req(ticket).then((res) => {
this.tLoading = false
this.$message.success("提交成功");
this.submitOut()
}).catch(e=>{this.tLoading=false});
},
//退 //退
submitOut(){ submitOut(){
this.$router.push({ this.$router.push({

View File

@ -16,8 +16,15 @@
<div class="right-panel"> <div class="right-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input <el-input
v-model="query.id" v-model="query.status_code"
placeholder="logId" placeholder="200"
clearable
@keyup.enter="handleQuery"
></el-input>
<el-input
v-model="query.search"
placeholder="地址/View"
clearable
@keyup.enter="handleQuery" @keyup.enter="handleQuery"
></el-input> ></el-input>
<el-button <el-button

View File

@ -13,7 +13,7 @@
</div> </div>
<div class="left-panel"> <div class="left-panel">
<div class="right-panel-search"> <div class="right-panel-search">
<el-input v-model="query.id" placeholder="logId" clearable></el-input> <el-input v-model="query.search" placeholder="logId" clearable></el-input>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"

View File

@ -23,48 +23,41 @@
</div> </div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<scTable <scTable ref="table" :apiObj="apiObj" row-key="id" stripe>
ref="table"
:apiObj="apiObj"
row-key="id"
stripe
>
<el-table-column label="#" type="index" width="50"></el-table-column> <el-table-column label="#" type="index" width="50"></el-table-column>
<el-table-column label="单位" prop="rparty_name" ></el-table-column> <el-table-column label="单位" prop="rparty_name"></el-table-column>
<el-table-column label="姓名" prop="name" ></el-table-column> <el-table-column label="姓名" prop="name"></el-table-column>
<el-table-column label="手机号" prop="phone" ></el-table-column> <el-table-column label="手机号" prop="phone"></el-table-column>
<el-table-column label="身份证号" prop="id_number" ></el-table-column> <el-table-column label="身份证号" prop="id_number"></el-table-column>
<el-table-column label="证件照" prop="photo" > <el-table-column label="证件照" prop="photo">
<template #default="scope"> <template #default="scope">
<el-avatar :size="50" :src="scope.row.photo" shape="square"/> <el-avatar :size="50" :src="scope.row.photo" shape="square" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="left" width="170"> <el-table-column label="操作" fixed="right" align="left" width="170">
<template #default="scope"> <template #default="scope">
<el-button <el-button
link link
type="primary" type="primary"
size="small" size="small"
@click="table_show(scope.row, scope.$index)" @click="table_show(scope.row, scope.$index)"
>查看</el-button >查看</el-button
> >
<el-button <el-button
link link
type="warning" type="warning"
size="small" size="small"
@click="table_edit(scope.row, scope.$index)" @click="table_edit(scope.row, scope.$index)"
>编辑</el-button >编辑</el-button
> >
<el-popconfirm <el-popconfirm
title="确定删除吗?" title="确定删除吗?"
@confirm="table_del(scope.row, scope.$index)" @confirm="table_del(scope.row, scope.$index)"
> >
<template #reference> <template #reference>
<el-button link type="danger" size="small">删除</el-button> <el-button link type="danger" size="small">删除</el-button>
</template> </template>
</el-popconfirm> </el-popconfirm>
</template> </template>
</el-table-column> </el-table-column>
</scTable> </scTable>
@ -91,8 +84,8 @@ export default {
save: false, save: false,
permission: false, permission: false,
}, },
adminform:{ adminform: {
username:"", username: "",
}, },
apiObj: this.$API.rpm.remployee.list, apiObj: this.$API.rpm.remployee.list,
query: {}, query: {},
@ -100,8 +93,6 @@ export default {
search: { search: {
keyword: null, keyword: null,
}, },
}; };
}, },
methods: { methods: {
@ -136,12 +127,11 @@ export default {
}, },
// //
async table_del(row) { async table_del(row) {
this.$API.rpm.remployee.delete this.$API.rpm.remployee.delete
.req(row.id) .req(row.id)
.then((res) => { .then((res) => {
this.$message.success("删除成功"); this.$message.success("删除成功");
this.$refs.table.refresh();
return res; return res;
}) })
.catch((err) => { .catch((err) => {
@ -158,7 +148,7 @@ export default {
} }
}, },
handleQuery() { handleQuery() {
this.$refs.table.queryData(this.query) this.$refs.table.queryData(this.query);
}, },
resetQuery() { resetQuery() {
this.query = {}; this.query = {};

View File

@ -271,6 +271,7 @@ export default {
30: "待入厂", 30: "待入厂",
40: "进行中", 40: "进行中",
50: "已完成", 50: "已完成",
60: "已关闭"
}, },
act_states: { act_states: {
0: "草稿中", 0: "草稿中",
@ -334,7 +335,7 @@ export default {
.req(row.id) .req(row.id)
.then((res) => { .then((res) => {
this.$message.success("删除成功"); this.$message.success("删除成功");
this.$refs.table.refresh();
return res; return res;
}) })
.catch((err) => { .catch((err) => {

View File

@ -59,7 +59,6 @@
stripe stripe
hideDo hideDo
hidePagination hidePagination
style="height:200px"
> >
<el-table-column label="#" fixed="left" type="index" width="50"></el-table-column> <el-table-column label="#" fixed="left" type="index" width="50"></el-table-column>
<el-table-column label="姓名" prop="remployee_.name"> <el-table-column label="姓名" prop="remployee_.name">