login
This commit is contained in:
parent
862deb2ee3
commit
b86626de20
|
|
@ -2,7 +2,7 @@
|
|||
NODE_ENV = production
|
||||
|
||||
# 标题
|
||||
VUE_APP_TITLE = SCUI
|
||||
VUE_APP_TITLE = '曲阳金隅安全智能管控平台'
|
||||
|
||||
# 接口地址
|
||||
VUE_APP_API_BASEURL = http://1.203.161.103:2800/api
|
||||
|
|
|
|||
|
|
@ -2,10 +2,11 @@ import config from "@/config"
|
|||
import http from "@/utils/request"
|
||||
|
||||
export default {
|
||||
/*相关方 */
|
||||
rparty: {
|
||||
list: {
|
||||
name: "获取",
|
||||
req: async function(data){
|
||||
req: async function (data) {
|
||||
return await http.get(
|
||||
`${config.API_URL}/rpm/rparty/`,
|
||||
data
|
||||
|
|
@ -14,19 +15,230 @@ export default {
|
|||
},
|
||||
update: {
|
||||
name: "更新",
|
||||
req: async function(id, data){
|
||||
req: async function (id, data) {
|
||||
return await http.put(
|
||||
`${config.API_URL}/rpm/rparty/${id}/`,
|
||||
data);
|
||||
}
|
||||
},
|
||||
create: {
|
||||
create: {
|
||||
name: "创建",
|
||||
req: async function(data){
|
||||
req: async function (data) {
|
||||
return await http.post(
|
||||
`${config.API_URL}/rpm/rparty/`,
|
||||
data);
|
||||
}
|
||||
},
|
||||
delete: {
|
||||
name: "删除",
|
||||
req: async function (id) {
|
||||
return await http.delete(
|
||||
`${config.API_URL}/rpm/rparty/${id}/`);
|
||||
}
|
||||
}
|
||||
,
|
||||
admin: {
|
||||
name: "创建账号",
|
||||
req: async function (id, data) {
|
||||
return await http.post(
|
||||
`${config.API_URL}/rpm/rparty/${id}/assign/`,
|
||||
data);
|
||||
}
|
||||
}
|
||||
,
|
||||
|
||||
},
|
||||
/*相关方人员 */
|
||||
remployee: {
|
||||
list: {
|
||||
name: "获取",
|
||||
req: async function (data) {
|
||||
return await http.get(
|
||||
`${config.API_URL}/rpm/remployee/`,
|
||||
data
|
||||
);
|
||||
}
|
||||
},
|
||||
update: {
|
||||
name: "更新",
|
||||
req: async function (id, data) {
|
||||
return await http.put(
|
||||
`${config.API_URL}/rpm/remployee/${id}/`,
|
||||
data);
|
||||
}
|
||||
},
|
||||
create: {
|
||||
name: "创建",
|
||||
req: async function (data) {
|
||||
return await http.post(
|
||||
`${config.API_URL}/rpm/remployee/`,
|
||||
data);
|
||||
}
|
||||
},
|
||||
delete: {
|
||||
name: "删除",
|
||||
req: async function (id) {
|
||||
return await http.delete(
|
||||
`${config.API_URL}/rpm/remployee/${id}/`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
/*相关方人员证书 */
|
||||
rcertificate: {
|
||||
list: {
|
||||
name: "获取",
|
||||
req: async function (data) {
|
||||
return await http.get(
|
||||
`${config.API_URL}/rpm/rcertificate/`,
|
||||
data
|
||||
);
|
||||
}
|
||||
},
|
||||
update: {
|
||||
name: "更新",
|
||||
req: async function (id, data) {
|
||||
return await http.put(
|
||||
`${config.API_URL}/rpm/rcertificate/${id}/`,
|
||||
data);
|
||||
}
|
||||
},
|
||||
create: {
|
||||
name: "创建",
|
||||
req: async function (data) {
|
||||
return await http.post(
|
||||
`${config.API_URL}/rpm/rcertificate/`,
|
||||
data);
|
||||
}
|
||||
},
|
||||
delete: {
|
||||
name: "删除",
|
||||
req: async function (id) {
|
||||
return await http.delete(
|
||||
`${config.API_URL}/rpm/rcertificate/${id}/`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
/*相关方入场项目 */
|
||||
rpj: {
|
||||
list: {
|
||||
name: "获取",
|
||||
req: async function (data) {
|
||||
return await http.get(
|
||||
`${config.API_URL}/rpm/rpj/`,
|
||||
data
|
||||
);
|
||||
}
|
||||
},
|
||||
read:{
|
||||
name: "详情",
|
||||
req: async function (id) {
|
||||
return await http.get(
|
||||
`${config.API_URL}/rpm/rpj/${id}/`);
|
||||
}
|
||||
},
|
||||
update: {
|
||||
name: "更新",
|
||||
req: async function (id, data) {
|
||||
return await http.put(
|
||||
`${config.API_URL}/rpm/rpj/${id}/`,
|
||||
data);
|
||||
}
|
||||
},
|
||||
create: {
|
||||
name: "创建",
|
||||
req: async function (data) {
|
||||
return await http.post(
|
||||
`${config.API_URL}/rpm/rpj/`,
|
||||
data);
|
||||
}
|
||||
},
|
||||
delete: {
|
||||
name: "删除",
|
||||
req: async function (id) {
|
||||
return await http.delete(
|
||||
`${config.API_URL}/rpm/rpj/${id}/`);
|
||||
}
|
||||
}
|
||||
},
|
||||
/*相关方入场项目文件 */
|
||||
rpjfile: {
|
||||
list: {
|
||||
name: "获取",
|
||||
req: async function (data) {
|
||||
return await http.get(
|
||||
`${config.API_URL}/rpm/rpj_file/`,
|
||||
data
|
||||
);
|
||||
}
|
||||
},
|
||||
read:{
|
||||
name: "详情",
|
||||
req: async function (id) {
|
||||
return await http.get(
|
||||
`${config.API_URL}/rpm/rpj_file/${id}/`);
|
||||
}
|
||||
},
|
||||
update: {
|
||||
name: "更新",
|
||||
req: async function (id, data) {
|
||||
return await http.put(
|
||||
`${config.API_URL}/rpm/rpj_file/${id}/`,
|
||||
data);
|
||||
}
|
||||
},
|
||||
delete: {
|
||||
name: "删除",
|
||||
req: async function (id) {
|
||||
return await http.delete(
|
||||
`${config.API_URL}/rpm/rpj_file/${id}/`);
|
||||
}
|
||||
}
|
||||
},
|
||||
/*相关方入场人员 */
|
||||
member: {
|
||||
list: {
|
||||
name: "获取",
|
||||
req: async function (data) {
|
||||
return await http.get(
|
||||
`${config.API_URL}/rpm/rpj_member/`,
|
||||
data
|
||||
);
|
||||
}
|
||||
},
|
||||
read:{
|
||||
name: "详情",
|
||||
req: async function (id) {
|
||||
return await http.get(
|
||||
`${config.API_URL}/rpm/rpj_member/${id}/`);
|
||||
}
|
||||
},
|
||||
create: {
|
||||
name: "创建",
|
||||
req: async function (data) {
|
||||
return await http.post(
|
||||
`${config.API_URL}/rpm/rpj_member/`,
|
||||
data);
|
||||
}
|
||||
},
|
||||
update: {
|
||||
name: "更新",
|
||||
req: async function (id, data) {
|
||||
return await http.put(
|
||||
`${config.API_URL}/rpm/rpj_member/${id}/`,
|
||||
data);
|
||||
}
|
||||
},
|
||||
delete: {
|
||||
name: "删除",
|
||||
req: async function (id) {
|
||||
return await http.delete(
|
||||
`${config.API_URL}/rpm/rpj_member/${id}/`);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
import config from "@/config"
|
||||
import http from "@/utils/request"
|
||||
|
||||
export default {
|
||||
/*访客 */
|
||||
visitor: {
|
||||
|
||||
create: {
|
||||
name: "注册",
|
||||
req: async function (data) {
|
||||
return await http.post(
|
||||
`${config.API_URL}/vm/visitor/register/`,
|
||||
data);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
const DEFAULT_CONFIG = {
|
||||
//标题
|
||||
APP_NAME: process.env.VUE_APP_TITLE,
|
||||
|
||||
APP_NAMES: "国检集团",
|
||||
//首页地址
|
||||
DASHBOARD_URL: "/dashboard",
|
||||
|
||||
//版本号
|
||||
APP_VER: "1.6.3",
|
||||
APP_VER: "1.0",
|
||||
|
||||
//内核版本号
|
||||
CORE_VER: "1.6.3",
|
||||
|
|
|
|||
|
|
@ -195,6 +195,78 @@ const routes = [
|
|||
},
|
||||
"component": "opm/space"
|
||||
},
|
||||
,
|
||||
{
|
||||
"name": "clear",
|
||||
"path": "/opm/clear",
|
||||
"meta": {
|
||||
"title": "清库作业许可证",
|
||||
"icon": "el-icon-menu",
|
||||
"hidden": true
|
||||
},
|
||||
"component": "opm/clear"
|
||||
} ,
|
||||
{
|
||||
"name": "high",
|
||||
"path": "/opm/high",
|
||||
"meta": {
|
||||
"title": "高处作业许可证",
|
||||
"icon": "el-icon-menu",
|
||||
"hidden": true
|
||||
},
|
||||
"component": "opm/high"
|
||||
},
|
||||
{
|
||||
"name": "hoisting",
|
||||
"path": "/opm/hoisting",
|
||||
"meta": {
|
||||
"title": "吊装作业许可证",
|
||||
"icon": "el-icon-menu",
|
||||
"hidden": true
|
||||
},
|
||||
"component": "opm/hoisting"
|
||||
},
|
||||
{
|
||||
"name": "preheat",
|
||||
"path": "/opm/preheat",
|
||||
"meta": {
|
||||
"title": "预热器清堵作业许可证",
|
||||
"icon": "el-icon-menu",
|
||||
"hidden": true
|
||||
},
|
||||
"component": "opm/preheat"
|
||||
},
|
||||
{
|
||||
"name": "cooler",
|
||||
"path": "/opm/cooler",
|
||||
"meta": {
|
||||
"title": "篦冷机清大块作业许可证",
|
||||
"icon": "el-icon-menu",
|
||||
"hidden": true
|
||||
},
|
||||
"component": "opm/cooler"
|
||||
},
|
||||
,
|
||||
{
|
||||
"name": "soil",
|
||||
"path": "/opm/soil",
|
||||
"meta": {
|
||||
"title": "动土作业许可证",
|
||||
"icon": "el-icon-menu",
|
||||
"hidden": true
|
||||
},
|
||||
"component": "opm/soil"
|
||||
},
|
||||
{
|
||||
"name": "usecl",
|
||||
"path": "/opm/usecl",
|
||||
"meta": {
|
||||
"title": "临时用电作业许可证",
|
||||
"icon": "el-icon-menu",
|
||||
"hidden": true
|
||||
},
|
||||
"component": "opm/usecl"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -224,6 +296,15 @@ const routes = [
|
|||
},
|
||||
"component": "rpm/remployee"
|
||||
},
|
||||
{
|
||||
"name": "rcertificate",
|
||||
"path": "/rpm/rcertificate",
|
||||
"meta": {
|
||||
"title": "人员证书",
|
||||
"icon": "el-icon-menu",
|
||||
},
|
||||
"component": "rpm/rcertificate"
|
||||
},
|
||||
{
|
||||
"name": "rfile",
|
||||
"path": "/rpm/rfile",
|
||||
|
|
@ -242,6 +323,17 @@ const routes = [
|
|||
},
|
||||
"component": "rpm/rpj"
|
||||
},
|
||||
{
|
||||
"name": "rpjadd",
|
||||
"path": "/rpm/rpjadd",
|
||||
"meta": {
|
||||
"title": "入厂项目相关信息",
|
||||
"icon": "el-icon-menu",
|
||||
"hidden": true
|
||||
},
|
||||
"component": "rpm/rpjadd"
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -262,6 +354,15 @@ const routes = [
|
|||
},
|
||||
"component": "vm/visit"
|
||||
},
|
||||
{
|
||||
"name": "visitor",
|
||||
"path": "/vm/visitor",
|
||||
"meta": {
|
||||
"title": "来访人员",
|
||||
"icon": "el-icon-menu",
|
||||
},
|
||||
"component": "vm/visitor"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ export default {
|
|||
smsSent: '已发送短信至手机号码',
|
||||
noAccount: '还没有账号?',
|
||||
createAccount: '创建新账号',
|
||||
fangke:'访客注册',
|
||||
wechatLoginTitle: '二维码登录',
|
||||
wechatLoginMsg: '请使用微信扫一扫登录 | 模拟3秒后自动扫描',
|
||||
wechatLoginResult: '已扫描 | 请在设备中点击授权登录'
|
||||
|
|
|
|||
|
|
@ -17,12 +17,12 @@
|
|||
v-model="search.keyword"
|
||||
placeholder="姓名/手机号"
|
||||
clearable
|
||||
@click="upsearch"
|
||||
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="upsearch"
|
||||
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -30,13 +30,13 @@
|
|||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
:data="apiObj"
|
||||
row-key="id"
|
||||
@selection-change="selectionChange"
|
||||
|
||||
stripe
|
||||
@resetQuery="resetQuery"
|
||||
|
||||
>
|
||||
<el-table-column type="selection" width="50"></el-table-column>
|
||||
|
||||
<el-table-column label="#" fixed="left" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="证书名称" fixed="left" prop="name" width="150"></el-table-column>
|
||||
<el-table-column label="证书编号" prop="number" width="200"> </el-table-column>
|
||||
|
|
@ -179,13 +179,18 @@ export default {
|
|||
30: "安全管理人员证书",
|
||||
},
|
||||
dialogcart: false,
|
||||
apiObj: this.$API.hrm.certificate.list,
|
||||
apiObj:[],
|
||||
query: {},
|
||||
selection: [],
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
|
||||
this.getcertificatelist();
|
||||
},
|
||||
methods: {
|
||||
handleForm(type, row) {
|
||||
|
|
@ -200,6 +205,14 @@ export default {
|
|||
|
||||
}
|
||||
},
|
||||
//证书列表
|
||||
getcertificatelist() {
|
||||
this.$API.hrm.certificate.list
|
||||
.req({ employee:this.$route.query.id, page: 0 })
|
||||
.then((res) => {
|
||||
this.apiObj = res;
|
||||
});
|
||||
},
|
||||
//人员证书创建
|
||||
submitcert() {
|
||||
this.form.employee = this.$route.query.id;
|
||||
|
|
|
|||
|
|
@ -31,11 +31,8 @@
|
|||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-bottom: 10px">
|
||||
<el-col :span="12">
|
||||
<el-checkbox
|
||||
:label="$t('login.rememberMe')"
|
||||
v-model="form.autologin"
|
||||
></el-checkbox>
|
||||
<el-col :span="12" class="login-reg">
|
||||
<el-link @click="visitors">{{$t('login.fangke')}}</el-link>
|
||||
</el-col>
|
||||
<el-col :span="12" class="login-forgot">
|
||||
<router-link to="/reset_password"
|
||||
|
|
@ -53,13 +50,48 @@
|
|||
>{{ $t("login.signIn") }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<div class="login-reg">
|
||||
|
||||
<!-- <div class="login-reg">
|
||||
{{ $t("login.noAccount") }}
|
||||
<router-link to="/user_register">{{
|
||||
$t("login.createAccount")
|
||||
}}</router-link>
|
||||
</div>
|
||||
</div>-->
|
||||
</el-form>
|
||||
<sc-dialog v-model="visitorsdialog" draggable title="创建访客账号">
|
||||
<el-form
|
||||
ref="dialogForms"
|
||||
:model="visitorform"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="24" :sm="24">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input
|
||||
v-model="visitorform.name"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :md="24" :sm="24">
|
||||
<el-form-item label="用户名" prop="username">
|
||||
<el-input
|
||||
v-model="visitorform.username"
|
||||
placeholder="请输入用户名"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="visitorsdialog = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitvisitor">确 定</el-button>
|
||||
</template>
|
||||
</sc-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
@ -67,6 +99,8 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
userType: "admin",
|
||||
visitorsdialog:false,
|
||||
visitorform:{},
|
||||
form: {
|
||||
user: "admin",
|
||||
password: "admin",
|
||||
|
|
@ -185,6 +219,21 @@ export default {
|
|||
// this.$message.success("Login Success 登录成功")
|
||||
// this.islogin = false
|
||||
},
|
||||
visitors(){
|
||||
this.visitorsdialog=true;
|
||||
},
|
||||
submitvisitor(){
|
||||
this.$API.vm.visitor.create
|
||||
.req(this.visitorform)
|
||||
.then((res) => {
|
||||
this.$message.success("创建成功!");
|
||||
this.visitorsdialog = false;
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -2,39 +2,18 @@
|
|||
<div class="login_bg">
|
||||
<div class="login_adv" style="background-image: url(img/auth_banner.jpg);">
|
||||
<div class="login_adv__title">
|
||||
<h2>SCUI</h2>
|
||||
<h4>{{ $t('login.slogan') }}</h4>
|
||||
<p>{{ $t('login.describe') }}</p>
|
||||
<div>
|
||||
<span>
|
||||
<el-icon><sc-icon-vue /></el-icon>
|
||||
</span>
|
||||
<span>
|
||||
<el-icon class="add"><el-icon-plus /></el-icon>
|
||||
</span>
|
||||
<span>
|
||||
<el-icon><el-icon-eleme-filled /></el-icon>
|
||||
</span>
|
||||
</div>
|
||||
<h2>曲阳金隅安全智能管控平台</h2>
|
||||
|
||||
</div>
|
||||
<div class="login_adv__mask"></div>
|
||||
<div class="login_adv__bottom">
|
||||
© {{$CONFIG.APP_NAME}} {{$CONFIG.APP_VER}}
|
||||
© {{$CONFIG.APP_NAMES}} {{$CONFIG.APP_VER}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="login_main">
|
||||
<div class="login_config">
|
||||
<el-button :icon="config.dark?'el-icon-sunny':'el-icon-moon'" circle type="info" @click="configDark"></el-button>
|
||||
<el-dropdown trigger="click" placement="bottom-end" @command="configLang">
|
||||
<el-button circle>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 512 512"><path d="M478.33 433.6l-90-218a22 22 0 0 0-40.67 0l-90 218a22 22 0 1 0 40.67 16.79L316.66 406h102.67l18.33 44.39A22 22 0 0 0 458 464a22 22 0 0 0 20.32-30.4zM334.83 362L368 281.65L401.17 362z" fill="currentColor"></path><path d="M267.84 342.92a22 22 0 0 0-4.89-30.7c-.2-.15-15-11.13-36.49-34.73c39.65-53.68 62.11-114.75 71.27-143.49H330a22 22 0 0 0 0-44H214V70a22 22 0 0 0-44 0v20H54a22 22 0 0 0 0 44h197.25c-9.52 26.95-27.05 69.5-53.79 108.36c-31.41-41.68-43.08-68.65-43.17-68.87a22 22 0 0 0-40.58 17c.58 1.38 14.55 34.23 52.86 83.93c.92 1.19 1.83 2.35 2.74 3.51c-39.24 44.35-77.74 71.86-93.85 80.74a22 22 0 1 0 21.07 38.63c2.16-1.18 48.6-26.89 101.63-85.59c22.52 24.08 38 35.44 38.93 36.1a22 22 0 0 0 30.75-4.9z" fill="currentColor"></path></svg>
|
||||
</el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item v-for="item in lang" :key="item.value" :command="item" :class="{'selected':config.lang==item.value}">{{item.name}}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
|
||||
</div>
|
||||
<div class="login-form">
|
||||
<div class="login-header">
|
||||
|
|
@ -47,14 +26,18 @@
|
|||
<el-tab-pane :label="$t('login.accountLogin')" lazy>
|
||||
<password-form></password-form>
|
||||
</el-tab-pane>
|
||||
<!-- 手机号登陆
|
||||
<el-tab-pane :label="$t('login.mobileLogin')" lazy>
|
||||
<phone-form></phone-form>
|
||||
</el-tab-pane>
|
||||
-->
|
||||
</el-tabs>
|
||||
<!-- 微信登陆
|
||||
<el-divider>{{ $t('login.signInOther') }}</el-divider>
|
||||
<div class="login-oauth">
|
||||
<el-button type="success" icon="sc-icon-wechat" circle @click="wechatLogin"></el-button>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -148,7 +131,7 @@
|
|||
.login_bg {width: 100%;height: 100%;background: #fff;display: flex;}
|
||||
.login_adv {width: 33.33333%;background-color: #555;background-size: cover;background-position: center center;background-repeat: no-repeat;position: relative;}
|
||||
.login_adv__title {color: #fff;padding: 40px;position: absolute;top:0px;left:0px;right: 0px;z-index: 2;}
|
||||
.login_adv__title h2 {font-size: 40px;}
|
||||
.login_adv__title h2 {font-size: 30px;}
|
||||
.login_adv__title h4 {font-size: 18px;margin-top: 10px;font-weight: normal;}
|
||||
.login_adv__title p {font-size: 14px;margin-top:10px;line-height: 1.8;color: rgba(255,255,255,0.6);}
|
||||
.login_adv__title div {margin-top: 10px;display: flex;align-items: center;}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,876 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-steps
|
||||
:active="active"
|
||||
style="width: 100%"
|
||||
:align-center="true"
|
||||
finish-status="success"
|
||||
>
|
||||
<el-step
|
||||
v-for="(item, index) of stepTitle"
|
||||
:key="index"
|
||||
:title="item"
|
||||
style="50%"
|
||||
@click="handleStep(index)"
|
||||
>
|
||||
</el-step>
|
||||
</el-steps>
|
||||
</el-header>
|
||||
<!--基本信息!-->
|
||||
<el-main class="nopadding" v-show="active === 0">
|
||||
<el-form
|
||||
v-show="active === 0"
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="110px"
|
||||
style="margin: 40px 40px 40px 40px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="关联作业">
|
||||
<el-input
|
||||
v-model="operationId"
|
||||
type="text"
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业许可种类">
|
||||
<el-input
|
||||
v-model="pagtitle"
|
||||
type="text"
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业开始时间">
|
||||
<el-date-picker
|
||||
v-model="form.start_time"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业结束时间">
|
||||
<el-date-picker
|
||||
v-model="form.end_time"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!--
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业级别">
|
||||
<el-select v-model="form.level" placeholder="选择作业级别">
|
||||
<el-option
|
||||
v-for="item in leveloptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
-->
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业部门">
|
||||
<el-cascader
|
||||
placeholder="选择作业部门"
|
||||
getCheckedNodes="true"
|
||||
v-model="form.dept_do"
|
||||
:options="deptoptions"
|
||||
:props="{
|
||||
expandTrigger: 'hover', // 次级菜单的展开方式
|
||||
label: 'label', //
|
||||
value: 'value', //
|
||||
emitPath: false, // 在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组,若设置 false,则只返回该节点的值
|
||||
}"
|
||||
clearable
|
||||
/>
|
||||
</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 :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业监护人">
|
||||
<el-select v-model="form.monitor" 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 :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="安装/拆除">
|
||||
<el-input v-model="work_type" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="安装/拆除时间">
|
||||
<el-input v-model="work_time" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="验收时间">
|
||||
<el-input v-model="accept_time" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="用电地点">
|
||||
<el-input v-model="power_to" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="电源接入点">
|
||||
<el-input v-model="power_from" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="用电开始">
|
||||
<el-input
|
||||
v-model="power_start_time"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="用电截至">
|
||||
<el-input
|
||||
v-model="power_end_time"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="计划用电天数">
|
||||
<el-input v-model="power_days" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col> !-->
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="风险选择">
|
||||
<el-checkbox-group v-model="form.risks_checked">
|
||||
<el-checkbox
|
||||
v-for="(item, index) in risklist"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
>{{ item.name }}</el-checkbox
|
||||
>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="其他风险">
|
||||
<el-input
|
||||
v-model="form.other_risk"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!--
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="逃生路径">
|
||||
<el-input v-model="escape_route" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col> !-->
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="措施选择">
|
||||
<el-checkbox-group v-model="form.measures_checked">
|
||||
<el-checkbox
|
||||
v-for="(item, index) in measurelist"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
>{{ item.name }}</el-checkbox
|
||||
>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-card class="box-card">
|
||||
<div class="clearfix">
|
||||
<span>应急处置:</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>1、施救人员必须穿戴防护用品(防毒面具、正压式空气呼吸器、长管式呼吸器)和安全绳方可进入库、仓内进行救援。</p>
|
||||
<p>2、将受伤人员托起或使用三角架、绞盘和全身式安全带将伤者救出。</p>
|
||||
<p>3、如伤者发生骨折,不应随意移动伤者,立即拨打120。</p>
|
||||
<p>4、发生人员窒息、中毒,将其转移到空气新鲜流通的场所,插入氧气袋或进行心肺复苏术,情况严重拨打120。</p>
|
||||
<p>5、逃生通道</p>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-form-item label="其他应急处置">
|
||||
<el-input
|
||||
v-model="form.other_emr"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!--
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业审批照片">
|
||||
<el-input v-model="create_imgs" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
!-->
|
||||
</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-main>
|
||||
|
||||
<!--作业人员!-->
|
||||
<el-main class="nopadding" v-show="active === 1">
|
||||
<div class="left-panel" style="margin: 10px">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="addworker"
|
||||
></el-button>
|
||||
</div>
|
||||
<scTable
|
||||
ref="workerTable"
|
||||
:data="apiworkerObj"
|
||||
row-key="id"
|
||||
hidePagination
|
||||
stripe
|
||||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
fixed="left"
|
||||
type="index"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column label="姓名" prop="name" width="150">
|
||||
<template #default="scope">
|
||||
{{ scope.row.worker_.name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作职责" prop="duty" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column label="证书" prop="certificates" width="150">
|
||||
<template #default="scope" >
|
||||
<el-tag v-for="item in scope.row.certificates_"
|
||||
:key="item.number"
|
||||
:label="item.name"
|
||||
:value="item.number">{{item.name}}</el-tag>
|
||||
</template>
|
||||
|
||||
|
||||
</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">
|
||||
<template #default="scope">
|
||||
|
||||
<el-popconfirm
|
||||
title="确定删除该作业人员吗?"
|
||||
@confirm="delWorker(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
<sc-dialog v-model="workerdialog" draggable title="选择作业人员">
|
||||
<el-form
|
||||
ref="workerForm"
|
||||
:model="formworker"
|
||||
:rules="rules"
|
||||
:disabled="mode == 'show'"
|
||||
label-width="80px"
|
||||
width="70%"
|
||||
style="margin: 40px 40px 40px 40px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="作业人员">
|
||||
<el-select
|
||||
v-model="formworker.worker"
|
||||
@change="selectWorker"
|
||||
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 :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="工作职责">
|
||||
<el-select
|
||||
v-model="formworker.duty"
|
||||
filterable
|
||||
allow-create
|
||||
default-first-option
|
||||
:reserve-keyword="false"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dutyOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="证书">
|
||||
<el-select
|
||||
v-model="formworker.certificates"
|
||||
multiple
|
||||
placeholder="选择证书"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in certificatesOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="dialogcart = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitWorker">确 定</el-button>
|
||||
</template>
|
||||
</sc-dialog>
|
||||
<el-button style="margin-top: 12px" @click="handleLastStep"
|
||||
>上一步</el-button
|
||||
>
|
||||
<el-button style="margin-top: 12px" @click="handleNextStep"
|
||||
>下一步</el-button
|
||||
>
|
||||
|
||||
</el-main>
|
||||
<!--气体浓度检测记录!-->
|
||||
<el-main class="nopadding" v-show="active === 2">
|
||||
<div class="left-panel" style="margin: 10px">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="addgas"
|
||||
></el-button>
|
||||
</div>
|
||||
<scTable
|
||||
ref="gasTable"
|
||||
:data="apigasObj"
|
||||
row-key="id"
|
||||
hidePagination
|
||||
stripe
|
||||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
fixed="left"
|
||||
type="index"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="检测时间"
|
||||
prop="check_time"
|
||||
width="150"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="检测部位"
|
||||
prop="check_place"
|
||||
width="150"
|
||||
></el-table-column>
|
||||
<el-table-column label="O2(%)" prop="o2" width="150"></el-table-column>
|
||||
<el-table-column label="CO" prop="co" width="150"></el-table-column>
|
||||
<el-table-column
|
||||
label="H2S"
|
||||
prop="h2s"
|
||||
width="150"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="检验结论"
|
||||
prop="is_ok"
|
||||
width="150"
|
||||
> <template #default="scope">
|
||||
{{ is_ok_[scope.row.is_ok] }}
|
||||
</template></el-table-column>
|
||||
<el-table-column
|
||||
label="检测人"
|
||||
prop="checker"
|
||||
width="150"
|
||||
> <template #default="scope">
|
||||
{{ scope.row.checker_.name }}
|
||||
</template></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">
|
||||
<template #default="scope">
|
||||
|
||||
<el-popconfirm
|
||||
title="确定删除该气体浓度检测记录吗?"
|
||||
@confirm="delgas(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</scTable>
|
||||
<sc-dialog v-model="gasdialog" draggable title="气体检测记录">
|
||||
<el-form
|
||||
ref="gasForm"
|
||||
:model="formgas"
|
||||
:rules="rules"
|
||||
:disabled="mode == 'show'"
|
||||
label-width="80px"
|
||||
width="70%"
|
||||
style="margin: 40px 40px 40px 40px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="检测时间">
|
||||
<el-date-picker
|
||||
v-model="formgas.check_time"
|
||||
type="datetime"
|
||||
placeholder="选择检测时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="检测部位">
|
||||
<el-input
|
||||
v-model="formgas.check_place"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="O2(%)">
|
||||
<el-input v-model.number="formgas.o2" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="CO">
|
||||
<el-input
|
||||
v-model.number="formgas.co"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="H2S(10ppm)">
|
||||
<el-input
|
||||
v-model.number="formgas.h2s"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="检验结论">
|
||||
|
||||
<el-radio-group v-model="formgas.is_ok">
|
||||
<el-radio l :label="true" >正常</el-radio>
|
||||
<el-radio :label="false" >不正常</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="检测人">
|
||||
<el-select
|
||||
v-model="formgas.checker"
|
||||
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-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="dialoggase = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitgas">确 定</el-button>
|
||||
</template>
|
||||
</sc-dialog>
|
||||
<el-button style="margin-top: 12px" @click="handleLastStep"
|
||||
>上一步</el-button
|
||||
>
|
||||
<el-button style="margin-top: 12px" @click="submitOut">退出</el-button>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<style scoped>
|
||||
.clearfix {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.box-card p {
|
||||
line-height: 20px;
|
||||
}
|
||||
.content {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.stepSuc:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
.stepErr:hover {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import { genTree } from "@/utils/verificate";
|
||||
const defaultformworker = {
|
||||
id: "",
|
||||
worker: null,
|
||||
duty: null,
|
||||
certificates: [],
|
||||
opl: "",
|
||||
};
|
||||
const defaultformgas = {
|
||||
id: "",
|
||||
check_time: null,
|
||||
opl:""
|
||||
};
|
||||
export default {
|
||||
name: "clear",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
stepSuc: [0],
|
||||
stepTitle: ["基本信息", "作业人员", "气体浓度检测记录"],
|
||||
query: {},
|
||||
selection: [],
|
||||
issave: false, //控制基本信息提交
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
form: {
|
||||
id: "",
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
operation: "",
|
||||
cate: "",
|
||||
risks_checked: [],
|
||||
},
|
||||
|
||||
operationId: "",
|
||||
oplcateId: "",
|
||||
oplId: "",
|
||||
leveloptions: [
|
||||
{ id: 10, name: "特级" },
|
||||
{ id: 20, name: "一级" },
|
||||
{ id: 30, name: "二级" },
|
||||
],
|
||||
deptoptions: [],
|
||||
useroptions: [],
|
||||
risklist: [],
|
||||
measurelist: [],
|
||||
pagtitle: "",
|
||||
|
||||
dutyOptions: [
|
||||
{ value: 10, label: "作业人员" },
|
||||
{ value: 20, label: "起重司机" },
|
||||
{ value: 30, label: "司索人员" },
|
||||
{ value: 40, label: "起重指挥" },
|
||||
{ value: 40, label: "电工" },
|
||||
],
|
||||
certificatesOptions: [],
|
||||
formworker: defaultformworker,
|
||||
apiworkerObj: [],
|
||||
workerdialog: false,
|
||||
gasdialog: false,
|
||||
formgas: defaultformgas,
|
||||
apigasObj: [],
|
||||
is_ok_: {
|
||||
true: "正常",
|
||||
false: "不正常",
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.operationId = this.$route.query.operationid; //作业ID
|
||||
this.oplcateId = this.$route.query.oplcateId; //作业许可证种类ID
|
||||
this.oplId = this.$route.query.oplId; //许可证ID
|
||||
this.getoplData();
|
||||
|
||||
this.getDept();
|
||||
this.getUser();
|
||||
},
|
||||
methods: {
|
||||
getoplData() {
|
||||
if (this.oplId == "") {
|
||||
this.getOperation();
|
||||
this.getOplcates();
|
||||
} else {
|
||||
this.getData();
|
||||
}
|
||||
},
|
||||
//根据oplId,查许可证
|
||||
getData() {
|
||||
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
||||
this.form = res;
|
||||
|
||||
this.oplcateId = res.cate;
|
||||
this.operationId = res.operation;
|
||||
this.getOperation();
|
||||
this.getOplcates();
|
||||
});
|
||||
},
|
||||
//根据operationId,查作业信息
|
||||
|
||||
getOperation() {
|
||||
this.$API.opm.operation.read.req(this.operationId).then((res) => {
|
||||
this.form.start_time = res.start_time; //作业开始时间
|
||||
this.form.end_time = res.end_time; //作业结束时间
|
||||
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//作业部门
|
||||
getDept() {
|
||||
this.$API.system.dept.list.req({ page: 0 }).then((res) => {
|
||||
this.deptoptions = genTree(res);
|
||||
});
|
||||
},
|
||||
|
||||
//作业负责人、作业监护人
|
||||
getUser() {
|
||||
this.$API.system.user.list.req({ page: 0 }).then((res) => {
|
||||
this.useroptions = res;
|
||||
});
|
||||
},
|
||||
//作业
|
||||
|
||||
//根据作业许可证ID获取,风险、措施
|
||||
getOplcates() {
|
||||
this.$API.opm.oplcate.read.req(this.oplcateId).then((res) => {
|
||||
console.log(res); //
|
||||
this.pagtitle = res.name;
|
||||
this.risklist = res.risk_options_; //风险缝隙
|
||||
this.measurelist = res.measure_options_; //控制措施
|
||||
});
|
||||
},
|
||||
handleStep(val) {
|
||||
//点击步骤条
|
||||
if (this.stepSuc.includes(val) === true) {
|
||||
this.active = val;
|
||||
}
|
||||
},
|
||||
//组件点击上一步
|
||||
handleLastStep() {
|
||||
if (--this.active === 0) {
|
||||
this.active = 0;
|
||||
}
|
||||
},
|
||||
//组件点击下一步
|
||||
handleNextStep() {
|
||||
if (this.active == 0) {
|
||||
console.log(this.oplId);
|
||||
//如果是创建许可证书
|
||||
if (this.oplId == "" && this.issave == false) {
|
||||
//基本信息提交
|
||||
debugger;
|
||||
this.form.cate = this.oplcateId;
|
||||
this.form.operation = this.operationId;
|
||||
console.log(this.form);
|
||||
this.$API.opm.opl.create
|
||||
.req(this.form)
|
||||
.then((res) => {
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.$message.success("创建成功");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
this.oplId = res.id;
|
||||
this.getworkerList(res.id);
|
||||
this.getgasList(res.id);
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
} else if (this.oplId != "") {
|
||||
this.$API.opm.opl.update.req(this.form.id, this.form).then(() => {
|
||||
this.$message.success("基本修改成功!");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
this.getworkerList(this.form.id);
|
||||
this.getgasList(this.form.id);
|
||||
});
|
||||
} else {
|
||||
this.active = 1;
|
||||
}
|
||||
} else {
|
||||
this.active = 2;
|
||||
|
||||
}
|
||||
// this.stepSuc.push(++this.active)
|
||||
},
|
||||
|
||||
//选择人员后,调出该人员的所有证书
|
||||
selectWorker() {
|
||||
this.$API.hrm.certificate.list
|
||||
.req({ employee__user: this.formworker.worker, page: 0 })
|
||||
.then((res) => {
|
||||
this.certificatesOptions = res;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//作业人员列表
|
||||
|
||||
getworkerList(id) {
|
||||
this.$API.opm.worker.list.req({ opl: id, page: 0 }).then((res) => {
|
||||
this.apiworkerObj = res;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//创建作业人员,显示Form
|
||||
addworker() {
|
||||
this.workerdialog = true;
|
||||
|
||||
this.formworker = Object.assign({}, defaultformworker);
|
||||
},
|
||||
|
||||
//删除作业人员
|
||||
delWorker(row) {
|
||||
this.$API.opm.worker.delete
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("作业人员删除成功");
|
||||
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
//提交作业人员信息
|
||||
submitWorker() {
|
||||
this.formworker.opl = this.oplId;
|
||||
this.$refs.workerForm.validate(async (valid) => {
|
||||
|
||||
this.$API.opm.worker.create
|
||||
.req(this.formworker)
|
||||
.then((res) => {
|
||||
this.$message.success("创建作业人员成功");
|
||||
this.workerdialog = false;
|
||||
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
//气体检测记录列表
|
||||
|
||||
getgasList(id) {
|
||||
this.$API.opm.gas.list.req({ opl: id, page: 0 }).then((res) => {
|
||||
this.apigasObj = res;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//创建气体检测记录,显示Form
|
||||
addgas() {
|
||||
this.gasdialog = true;
|
||||
this.formgas = Object.assign({}, defaultformgas);
|
||||
},
|
||||
|
||||
//提交气体检测记录
|
||||
submitgas() {
|
||||
this.formgas.opl = this.oplId;
|
||||
this.$refs.gasForm.validate(async (valid) => {
|
||||
|
||||
this.$API.opm.gas.create
|
||||
.req(this.formgas)
|
||||
.then((res) => {
|
||||
this.$message.success("创建气体浓度检测记录成功");
|
||||
this.gasdialog = false;
|
||||
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
//删除气体检测记录
|
||||
delgas(row) {
|
||||
this.$API.opm.gas.delete
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("气体浓度检测记录删除成功");
|
||||
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
//退出界面
|
||||
submitOut(){
|
||||
this.$router.push({
|
||||
name: "opl",
|
||||
query: {
|
||||
operationid: this.$route.query.id,//作业ID
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -0,0 +1,579 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-steps
|
||||
:active="active"
|
||||
style="width: 100%"
|
||||
:align-center="true"
|
||||
finish-status="success"
|
||||
>
|
||||
<el-step
|
||||
v-for="(item, index) of stepTitle"
|
||||
:key="index"
|
||||
:title="item"
|
||||
style="50%"
|
||||
@click="handleStep(index)"
|
||||
>
|
||||
</el-step>
|
||||
</el-steps>
|
||||
</el-header>
|
||||
<!--基本信息!-->
|
||||
<el-main class="nopadding" v-show="active === 0">
|
||||
<el-form
|
||||
v-show="active === 0"
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="110px"
|
||||
style="margin: 40px 40px 40px 40px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="关联作业">
|
||||
<el-input
|
||||
v-model="operationId"
|
||||
type="text"
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业许可种类">
|
||||
<el-input
|
||||
v-model="pagtitle"
|
||||
type="text"
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业开始时间">
|
||||
<el-date-picker
|
||||
v-model="form.start_time"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业结束时间">
|
||||
<el-date-picker
|
||||
v-model="form.end_time"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
</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 :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业监护人">
|
||||
<el-select v-model="form.monitor" 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 :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="风险选择">
|
||||
<el-checkbox-group v-model="form.risks_checked">
|
||||
<el-checkbox
|
||||
v-for="(item, index) in risklist"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
>{{ item.name }}</el-checkbox
|
||||
>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="其他风险">
|
||||
<el-input
|
||||
v-model="form.other_risk"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="措施选择">
|
||||
<el-checkbox-group v-model="form.measures_checked">
|
||||
<el-checkbox
|
||||
v-for="(item, index) in measurelist"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
>{{ item.name }}</el-checkbox
|
||||
>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-card class="box-card">
|
||||
<div class="clearfix">
|
||||
<span>应急处置:</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>1、施救人员必须穿戴好耐高温防护用品方可进入篦冷机内进行救援。</p>
|
||||
<p>2、将受伤人员托起或使用担架将伤者抬出篦冷机。</p>
|
||||
<p>3、发生人员窒息、中毒,将其转移到空气新鲜流通的场所,插入氧气袋或进行心肺复苏术,情况严重拨打120。 </p>
|
||||
<p>4、发生人员烫伤时用冷清水对烫伤部位进行冲洗或用浸泡,用干净的纱布或衣物盖住被烫伤部位,伤势严重时立即拨打120送医。若贴身衣服与伤口粘在一起时,可用剪刀剪开,然后缓慢剥离衣物。 </p>
|
||||
<p>5、逃生通道。 </p>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-form-item label="其他应急处置">
|
||||
<el-input
|
||||
v-model="form.other_emr"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</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-main>
|
||||
|
||||
<!--作业人员!-->
|
||||
<el-main class="nopadding" v-show="active === 1">
|
||||
<div class="left-panel" style="margin: 10px">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="addworker"
|
||||
></el-button>
|
||||
</div>
|
||||
<scTable
|
||||
ref="workerTable"
|
||||
:data="apiworkerObj"
|
||||
row-key="id"
|
||||
hidePagination
|
||||
stripe
|
||||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
fixed="left"
|
||||
type="index"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column label="姓名" prop="name" width="150">
|
||||
<template #default="scope">
|
||||
{{ scope.row.worker_.name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作职责" prop="duty" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column label="证书" prop="certificates" width="150">
|
||||
<template #default="scope" >
|
||||
<el-tag v-for="item in scope.row.certificates_"
|
||||
:key="item.number"
|
||||
:label="item.name"
|
||||
:value="item.number">{{item.name}}</el-tag>
|
||||
</template>
|
||||
</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">
|
||||
<template #default="scope">
|
||||
|
||||
<el-popconfirm
|
||||
title="确定删除该作业人员吗?"
|
||||
@confirm="delWorker(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
<sc-dialog v-model="workerdialog" draggable title="选择作业人员">
|
||||
<el-form
|
||||
ref="workerForm"
|
||||
:model="formworker"
|
||||
:rules="rules"
|
||||
:disabled="mode == 'show'"
|
||||
label-width="80px"
|
||||
width="70%"
|
||||
style="margin: 40px 40px 40px 40px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="作业人员">
|
||||
<el-select
|
||||
v-model="formworker.worker"
|
||||
@change="selectWorker"
|
||||
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 :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="工作职责">
|
||||
<el-select
|
||||
v-model="formworker.duty"
|
||||
filterable
|
||||
allow-create
|
||||
default-first-option
|
||||
:reserve-keyword="false"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dutyOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="证书">
|
||||
<el-select
|
||||
v-model="formworker.certificates"
|
||||
multiple
|
||||
placeholder="选择证书"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in certificatesOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="dialogcart = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitWorker">确 定</el-button>
|
||||
</template>
|
||||
</sc-dialog>
|
||||
<el-button style="margin-top: 12px" @click="handleLastStep"
|
||||
>上一步</el-button
|
||||
>
|
||||
<el-button style="margin-top: 12px" @click="submitOut">退出</el-button>
|
||||
|
||||
</el-main>
|
||||
|
||||
</el-container>
|
||||
</template>
|
||||
<style scoped>
|
||||
.clearfix {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.box-card p {
|
||||
line-height: 20px;
|
||||
}
|
||||
.content {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.stepSuc:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
.stepErr:hover {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import { genTree } from "@/utils/verificate";
|
||||
const defaultformworker = {
|
||||
id: "",
|
||||
worker: null,
|
||||
duty: null,
|
||||
certificates: [],
|
||||
opl: "",
|
||||
};
|
||||
const defaultformgas = {
|
||||
id: "",
|
||||
check_time: null,
|
||||
opl:""
|
||||
};
|
||||
export default {
|
||||
name: "cooler",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
|
||||
active: 0,
|
||||
stepSuc: [0],
|
||||
stepTitle: ["基本信息", "作业人员"],
|
||||
query: {},
|
||||
selection: [],
|
||||
issave: false, //控制基本信息提交
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
form: {
|
||||
id: "",
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
operation: "",
|
||||
cate: "",
|
||||
risks_checked: [],
|
||||
},
|
||||
|
||||
operationId: "",
|
||||
oplcateId: "",
|
||||
oplId: "",
|
||||
leveloptions: [
|
||||
{ id: 10, name: "特殊动火" },
|
||||
{ id: 20, name: "一级动火" },
|
||||
{ id: 30, name: "二级动火" },
|
||||
],
|
||||
deptoptions: [],
|
||||
useroptions: [],
|
||||
risklist: [],
|
||||
measurelist: [],
|
||||
pagtitle: "",
|
||||
|
||||
dutyOptions: [
|
||||
{ value: 10, label: "作业人员" },
|
||||
{ value: 20, label: "起重司机" },
|
||||
{ value: 30, label: "司索人员" },
|
||||
{ value: 40, label: "起重指挥" },
|
||||
{ value: 40, label: "电工" },
|
||||
],
|
||||
certificatesOptions: [],
|
||||
formworker: defaultformworker,
|
||||
apiworkerObj: [],
|
||||
workerdialog: false,
|
||||
gasdialog: false,
|
||||
formgas: defaultformgas,
|
||||
apigasObj: [],
|
||||
is_ok_: {
|
||||
true: "正常",
|
||||
false: "不正常",
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.operationId = this.$route.query.operationid; //作业ID
|
||||
this.oplcateId = this.$route.query.oplcateId; //作业许可证种类ID
|
||||
this.oplId = this.$route.query.oplId; //许可证ID
|
||||
this.getoplData();
|
||||
|
||||
this.getDept();
|
||||
this.getUser();
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
getoplData() {
|
||||
if (this.oplId == "") {
|
||||
this.getOperation();
|
||||
this.getOplcates();
|
||||
} else {
|
||||
this.getData();
|
||||
}
|
||||
},
|
||||
//根据oplId,查许可证
|
||||
getData() {
|
||||
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
||||
this.form = res;
|
||||
|
||||
this.oplcateId = res.cate;
|
||||
this.operationId = res.operation;
|
||||
this.getOperation();
|
||||
this.getOplcates();
|
||||
});
|
||||
},
|
||||
//根据operationId,查作业信息
|
||||
|
||||
getOperation() {
|
||||
this.$API.opm.operation.read.req(this.operationId).then((res) => {
|
||||
this.form.start_time = res.start_time; //作业开始时间
|
||||
this.form.end_time = res.end_time; //作业结束时间
|
||||
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//作业部门
|
||||
getDept() {
|
||||
this.$API.system.dept.list.req({ page: 0 }).then((res) => {
|
||||
this.deptoptions = genTree(res);
|
||||
});
|
||||
},
|
||||
|
||||
//作业负责人、作业监护人
|
||||
getUser() {
|
||||
this.$API.system.user.list.req({ page: 0 }).then((res) => {
|
||||
this.useroptions = res;
|
||||
});
|
||||
},
|
||||
//作业
|
||||
|
||||
//根据作业许可证ID获取,风险、措施
|
||||
getOplcates() {
|
||||
this.$API.opm.oplcate.read.req(this.oplcateId).then((res) => {
|
||||
console.log(res); //
|
||||
this.pagtitle = res.name;
|
||||
this.risklist = res.risk_options_; //风险缝隙
|
||||
this.measurelist = res.measure_options_; //控制措施
|
||||
});
|
||||
},
|
||||
handleStep(val) {
|
||||
//点击步骤条
|
||||
if (this.stepSuc.includes(val) === true) {
|
||||
this.active = val;
|
||||
}
|
||||
},
|
||||
//组件点击上一步
|
||||
handleLastStep() {
|
||||
if (--this.active === 0) {
|
||||
this.active = 0;
|
||||
}
|
||||
},
|
||||
//组件点击下一步
|
||||
handleNextStep() {
|
||||
if (this.active == 0) {
|
||||
// console.log(this.oplId);
|
||||
//如果是创建许可证书
|
||||
if (this.oplId == "") {
|
||||
//基本信息提交
|
||||
debugger;
|
||||
this.form.cate = this.oplcateId;
|
||||
this.form.operation = this.operationId;
|
||||
console.log(this.form);
|
||||
this.$API.opm.opl.create
|
||||
.req(this.form)
|
||||
.then((res) => {
|
||||
this.$emit("success", this.form);
|
||||
this.$message.success("创建成功");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
|
||||
this.oplId = res.id;
|
||||
this.getworkerList(res.id);
|
||||
this.getgasList(res.id);
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
} else if (this.oplId != "") {
|
||||
|
||||
this.$API.opm.opl.update.req(this.oplId, this.form).then(() => {
|
||||
this.$message.success("基本修改成功!");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
this.getgasList(this.oplId);
|
||||
this.getworkerList(this.oplId);
|
||||
|
||||
});
|
||||
} else {
|
||||
this.active = 1;
|
||||
}
|
||||
}
|
||||
// this.stepSuc.push(++this.active)
|
||||
},
|
||||
|
||||
//选择人员后,调出该人员的所有证书
|
||||
selectWorker() {
|
||||
this.$API.hrm.certificate.list
|
||||
.req({ employee__user: this.formworker.worker, page: 0 })
|
||||
.then((res) => {
|
||||
this.certificatesOptions = res;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//作业人员列表
|
||||
|
||||
getworkerList(id) {
|
||||
this.$API.opm.worker.list.req({ opl: id, page: 0 }).then((res) => {
|
||||
this.apiworkerObj = res;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//创建作业人员,显示Form
|
||||
addworker() {
|
||||
this.workerdialog = true;
|
||||
|
||||
this.formworker = Object.assign({}, defaultformworker);
|
||||
},
|
||||
|
||||
//删除作业人员
|
||||
delWorker(row) {
|
||||
this.$API.opm.worker.delete
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("作业人员删除成功");
|
||||
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
//提交作业人员信息
|
||||
submitWorker() {
|
||||
this.formworker.opl = this.oplId;
|
||||
this.$refs.workerForm.validate(async (valid) => {
|
||||
|
||||
this.$API.opm.worker.create
|
||||
.req(this.formworker)
|
||||
.then((res) => {
|
||||
this.$message.success("创建作业人员成功");
|
||||
this.workerdialog = false;
|
||||
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
//退出界面
|
||||
submitOut(){
|
||||
this.$router.push({
|
||||
name: "opl",
|
||||
query: {
|
||||
operationid: this.$route.query.id,//作业ID
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -0,0 +1,669 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-steps
|
||||
:active="active"
|
||||
style="width: 100%"
|
||||
:align-center="true"
|
||||
finish-status="success"
|
||||
>
|
||||
<el-step
|
||||
v-for="(item, index) of stepTitle"
|
||||
:key="index"
|
||||
:title="item"
|
||||
style="50%"
|
||||
@click="handleStep(index)"
|
||||
>
|
||||
</el-step>
|
||||
</el-steps>
|
||||
</el-header>
|
||||
<!--基本信息!-->
|
||||
<el-main class="nopadding" v-show="active === 0">
|
||||
<el-form
|
||||
v-show="active === 0"
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="110px"
|
||||
style="margin: 40px 40px 40px 40px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="关联作业">
|
||||
<el-input
|
||||
v-model="operationId"
|
||||
type="text"
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业许可种类">
|
||||
<el-input
|
||||
v-model="pagtitle"
|
||||
type="text"
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业开始时间">
|
||||
<el-date-picker
|
||||
v-model="form.start_time"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业结束时间">
|
||||
<el-date-picker
|
||||
v-model="form.end_time"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业级别">
|
||||
<el-select v-model="form.level" placeholder="选择作业级别">
|
||||
<el-option
|
||||
v-for="item in leveloptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业部门">
|
||||
<el-cascader
|
||||
placeholder="选择作业部门"
|
||||
getCheckedNodes="true"
|
||||
v-model="form.dept_do"
|
||||
:options="deptoptions"
|
||||
:props="{
|
||||
expandTrigger: 'hover', // 次级菜单的展开方式
|
||||
label: 'label', //
|
||||
value: 'value', //
|
||||
emitPath: false, // 在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组,若设置 false,则只返回该节点的值
|
||||
}"
|
||||
clearable
|
||||
/>
|
||||
</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 :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业监护人">
|
||||
<el-select v-model="form.monitor" 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 :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="安装/拆除">
|
||||
<el-input v-model="work_type" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="安装/拆除时间">
|
||||
<el-input v-model="work_time" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="验收时间">
|
||||
<el-input v-model="accept_time" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="用电地点">
|
||||
<el-input v-model="power_to" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="电源接入点">
|
||||
<el-input v-model="power_from" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="用电开始">
|
||||
<el-input
|
||||
v-model="power_start_time"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="用电截至">
|
||||
<el-input
|
||||
v-model="power_end_time"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="计划用电天数">
|
||||
<el-input v-model="power_days" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col> !-->
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="风险选择">
|
||||
<el-checkbox-group v-model="form.risks_checked">
|
||||
<el-checkbox
|
||||
v-for="(item, index) in risklist"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
>{{ item.name }}</el-checkbox
|
||||
>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="其他风险">
|
||||
<el-input
|
||||
v-model="form.other_risk"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!--
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="逃生路径">
|
||||
<el-input v-model="escape_route" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col> !-->
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="措施选择">
|
||||
<el-checkbox-group v-model="form.measures_checked">
|
||||
<el-checkbox
|
||||
v-for="(item, index) in measurelist"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
>{{ item.name }}</el-checkbox
|
||||
>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-card class="box-card">
|
||||
<div class="clearfix">
|
||||
<span>应急处置:</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>1、如伤者发生骨折,采用夹板、木棍等将骨折部位上下关节固定后送医,当伤者昏迷、意识不清时则不应随意移动伤者,立即拨打120求救。</p>
|
||||
<p>2、如果伤者出血,采用止血带或包扎伤口的方法止血,然后送医或拨打120。</p>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
<el-form-item label="其他应急处置">
|
||||
<el-input
|
||||
v-model="form.other_emr"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!--
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业审批照片">
|
||||
<el-input v-model="create_imgs" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
!-->
|
||||
</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-main>
|
||||
|
||||
<!--作业人员!-->
|
||||
<el-main class="nopadding" v-show="active === 1">
|
||||
<div class="left-panel" style="margin: 10px">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="addworker"
|
||||
></el-button>
|
||||
</div>
|
||||
<scTable
|
||||
ref="workerTable"
|
||||
:data="apiworkerObj"
|
||||
row-key="id"
|
||||
hidePagination
|
||||
stripe
|
||||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
fixed="left"
|
||||
type="index"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column label="姓名" prop="name" width="150">
|
||||
<template #default="scope">
|
||||
{{ scope.row.worker_.name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作职责" prop="duty" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column label="证书" prop="certificates" width="150">
|
||||
<template #default="scope" >
|
||||
<el-tag v-for="item in scope.row.certificates_"
|
||||
:key="item.number"
|
||||
:label="item.name"
|
||||
:value="item.number">{{item.name}}</el-tag>
|
||||
</template>
|
||||
</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">
|
||||
<template #default="scope">
|
||||
|
||||
<el-popconfirm
|
||||
title="确定删除该作业人员吗?"
|
||||
@confirm="delWorker(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
<sc-dialog v-model="workerdialog" draggable title="选择作业人员">
|
||||
<el-form
|
||||
ref="workerForm"
|
||||
:model="formworker"
|
||||
:rules="rules"
|
||||
:disabled="mode == 'show'"
|
||||
label-width="80px"
|
||||
width="70%"
|
||||
style="margin: 40px 40px 40px 40px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="作业人员">
|
||||
<el-select
|
||||
v-model="formworker.worker"
|
||||
@change="selectWorker"
|
||||
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 :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="工作职责">
|
||||
<el-select
|
||||
v-model="formworker.duty"
|
||||
filterable
|
||||
allow-create
|
||||
default-first-option
|
||||
:reserve-keyword="false"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dutyOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="证书">
|
||||
<el-select
|
||||
v-model="formworker.certificates"
|
||||
multiple
|
||||
placeholder="选择证书"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in certificatesOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="dialogcart = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitWorker">确 定</el-button>
|
||||
</template>
|
||||
</sc-dialog>
|
||||
<el-button style="margin-top: 12px" @click="handleLastStep"
|
||||
>上一步</el-button
|
||||
>
|
||||
<el-button style="margin-top: 12px" @click="submitOut">退出</el-button>
|
||||
|
||||
</el-main>
|
||||
|
||||
</el-container>
|
||||
</template>
|
||||
<style scoped>
|
||||
.clearfix {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.box-card p {
|
||||
line-height: 20px;
|
||||
}
|
||||
.content {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.stepSuc:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
.stepErr:hover {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import { genTree } from "@/utils/verificate";
|
||||
const defaultformworker = {
|
||||
id: "",
|
||||
worker: null,
|
||||
duty: null,
|
||||
certificates: [],
|
||||
opl: "",
|
||||
};
|
||||
const defaultformgas = {
|
||||
id: "",
|
||||
check_time: null,
|
||||
opl:""
|
||||
};
|
||||
export default {
|
||||
name: "high",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
|
||||
active: 0,
|
||||
stepSuc: [0],
|
||||
stepTitle: ["基本信息", "作业人员"],
|
||||
query: {},
|
||||
selection: [],
|
||||
issave: false, //控制基本信息提交
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
form: {
|
||||
id: "",
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
operation: "",
|
||||
cate: "",
|
||||
risks_checked: [],
|
||||
},
|
||||
|
||||
operationId: "",
|
||||
oplcateId: "",
|
||||
oplId: "",
|
||||
leveloptions: [
|
||||
{ id: "特级", name: "特级:>30米" },
|
||||
{ id: "三级", name: "三级:15-30米" },
|
||||
{ id: "二级", name: "二级:>5-15米" },
|
||||
{ id: "一级", name: "一级:1.8-5米" },
|
||||
],
|
||||
deptoptions: [],
|
||||
useroptions: [],
|
||||
risklist: [],
|
||||
measurelist: [],
|
||||
pagtitle: "",
|
||||
|
||||
dutyOptions: [
|
||||
{ value: 10, label: "作业人员" },
|
||||
{ value: 20, label: "起重司机" },
|
||||
{ value: 30, label: "司索人员" },
|
||||
{ value: 40, label: "起重指挥" },
|
||||
{ value: 40, label: "电工" },
|
||||
],
|
||||
certificatesOptions: [],
|
||||
formworker: defaultformworker,
|
||||
apiworkerObj: [],
|
||||
workerdialog: false,
|
||||
gasdialog: false,
|
||||
formgas: defaultformgas,
|
||||
apigasObj: [],
|
||||
is_ok_: {
|
||||
true: "正常",
|
||||
false: "不正常",
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.operationId = this.$route.query.operationid; //作业ID
|
||||
this.oplcateId = this.$route.query.oplcateId; //作业许可证种类ID
|
||||
this.oplId = this.$route.query.oplId; //许可证ID
|
||||
this.getoplData();
|
||||
|
||||
this.getDept();
|
||||
this.getUser();
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
getoplData() {
|
||||
if (this.oplId == "") {
|
||||
this.getOperation();
|
||||
this.getOplcates();
|
||||
} else {
|
||||
this.getData();
|
||||
}
|
||||
},
|
||||
//根据oplId,查许可证
|
||||
getData() {
|
||||
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
||||
this.form = res;
|
||||
|
||||
this.oplcateId = res.cate;
|
||||
this.operationId = res.operation;
|
||||
this.getOperation();
|
||||
this.getOplcates();
|
||||
});
|
||||
},
|
||||
//根据operationId,查作业信息
|
||||
|
||||
getOperation() {
|
||||
this.$API.opm.operation.read.req(this.operationId).then((res) => {
|
||||
this.form.start_time = res.start_time; //作业开始时间
|
||||
this.form.end_time = res.end_time; //作业结束时间
|
||||
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//作业部门
|
||||
getDept() {
|
||||
this.$API.system.dept.list.req({ page: 0 }).then((res) => {
|
||||
this.deptoptions = genTree(res);
|
||||
});
|
||||
},
|
||||
|
||||
//作业负责人、作业监护人
|
||||
getUser() {
|
||||
this.$API.system.user.list.req({ page: 0 }).then((res) => {
|
||||
this.useroptions = res;
|
||||
});
|
||||
},
|
||||
//作业
|
||||
|
||||
//根据作业许可证ID获取,风险、措施
|
||||
getOplcates() {
|
||||
this.$API.opm.oplcate.read.req(this.oplcateId).then((res) => {
|
||||
console.log(res); //
|
||||
this.pagtitle = res.name;
|
||||
this.risklist = res.risk_options_; //风险缝隙
|
||||
this.measurelist = res.measure_options_; //控制措施
|
||||
});
|
||||
},
|
||||
handleStep(val) {
|
||||
//点击步骤条
|
||||
if (this.stepSuc.includes(val) === true) {
|
||||
this.active = val;
|
||||
}
|
||||
},
|
||||
//组件点击上一步
|
||||
handleLastStep() {
|
||||
if (--this.active === 0) {
|
||||
this.active = 0;
|
||||
}
|
||||
},
|
||||
//组件点击下一步
|
||||
handleNextStep() {
|
||||
if (this.active == 0) {
|
||||
// console.log(this.oplId);
|
||||
//如果是创建许可证书
|
||||
if (this.oplId == "") {
|
||||
//基本信息提交
|
||||
debugger;
|
||||
this.form.cate = this.oplcateId;
|
||||
this.form.operation = this.operationId;
|
||||
console.log(this.form);
|
||||
this.$API.opm.opl.create
|
||||
.req(this.form)
|
||||
.then((res) => {
|
||||
this.$emit("success", this.form);
|
||||
this.$message.success("创建成功");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
|
||||
this.oplId = res.id;
|
||||
this.getworkerList(res.id);
|
||||
this.getgasList(res.id);
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
} else if (this.oplId != "") {
|
||||
|
||||
this.$API.opm.opl.update.req(this.oplId, this.form).then(() => {
|
||||
this.$message.success("基本修改成功!");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
this.getgasList(this.oplId);
|
||||
this.getworkerList(this.oplId);
|
||||
|
||||
});
|
||||
} else {
|
||||
this.active = 1;
|
||||
}
|
||||
}
|
||||
// this.stepSuc.push(++this.active)
|
||||
},
|
||||
|
||||
//选择人员后,调出该人员的所有证书
|
||||
selectWorker() {
|
||||
this.$API.hrm.certificate.list
|
||||
.req({ employee__user: this.formworker.worker, page: 0 })
|
||||
.then((res) => {
|
||||
this.certificatesOptions = res;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//作业人员列表
|
||||
|
||||
getworkerList(id) {
|
||||
this.$API.opm.worker.list.req({ opl: id, page: 0 }).then((res) => {
|
||||
this.apiworkerObj = res;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//创建作业人员,显示Form
|
||||
addworker() {
|
||||
this.workerdialog = true;
|
||||
|
||||
this.formworker = Object.assign({}, defaultformworker);
|
||||
},
|
||||
|
||||
//删除作业人员
|
||||
delWorker(row) {
|
||||
this.$API.opm.worker.delete
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("作业人员删除成功");
|
||||
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
//提交作业人员信息
|
||||
submitWorker() {
|
||||
this.formworker.opl = this.oplId;
|
||||
this.$refs.workerForm.validate(async (valid) => {
|
||||
|
||||
this.$API.opm.worker.create
|
||||
.req(this.formworker)
|
||||
.then((res) => {
|
||||
this.$message.success("创建作业人员成功");
|
||||
this.workerdialog = false;
|
||||
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
//退出界面
|
||||
submitOut(){
|
||||
this.$router.push({
|
||||
name: "opl",
|
||||
query: {
|
||||
operationid: this.$route.query.id,//作业ID
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -0,0 +1,669 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-steps
|
||||
:active="active"
|
||||
style="width: 100%"
|
||||
:align-center="true"
|
||||
finish-status="success"
|
||||
>
|
||||
<el-step
|
||||
v-for="(item, index) of stepTitle"
|
||||
:key="index"
|
||||
:title="item"
|
||||
style="50%"
|
||||
@click="handleStep(index)"
|
||||
>
|
||||
</el-step>
|
||||
</el-steps>
|
||||
</el-header>
|
||||
<!--基本信息!-->
|
||||
<el-main class="nopadding" v-show="active === 0">
|
||||
<el-form
|
||||
v-show="active === 0"
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="110px"
|
||||
style="margin: 40px 40px 40px 40px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="关联作业">
|
||||
<el-input
|
||||
v-model="operationId"
|
||||
type="text"
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业许可种类">
|
||||
<el-input
|
||||
v-model="pagtitle"
|
||||
type="text"
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业开始时间">
|
||||
<el-date-picker
|
||||
v-model="form.start_time"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业结束时间">
|
||||
<el-date-picker
|
||||
v-model="form.end_time"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业级别">
|
||||
<el-select v-model="form.level" placeholder="选择作业级别">
|
||||
<el-option
|
||||
v-for="item in leveloptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业部门">
|
||||
<el-cascader
|
||||
placeholder="选择作业部门"
|
||||
getCheckedNodes="true"
|
||||
v-model="form.dept_do"
|
||||
:options="deptoptions"
|
||||
:props="{
|
||||
expandTrigger: 'hover', // 次级菜单的展开方式
|
||||
label: 'label', //
|
||||
value: 'value', //
|
||||
emitPath: false, // 在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组,若设置 false,则只返回该节点的值
|
||||
}"
|
||||
clearable
|
||||
/>
|
||||
</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 :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业监护人">
|
||||
<el-select v-model="form.monitor" 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 :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="安装/拆除">
|
||||
<el-input v-model="work_type" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="安装/拆除时间">
|
||||
<el-input v-model="work_time" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="验收时间">
|
||||
<el-input v-model="accept_time" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="用电地点">
|
||||
<el-input v-model="power_to" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="电源接入点">
|
||||
<el-input v-model="power_from" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="用电开始">
|
||||
<el-input
|
||||
v-model="power_start_time"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="用电截至">
|
||||
<el-input
|
||||
v-model="power_end_time"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="计划用电天数">
|
||||
<el-input v-model="power_days" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col> !-->
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="风险选择">
|
||||
<el-checkbox-group v-model="form.risks_checked">
|
||||
<el-checkbox
|
||||
v-for="(item, index) in risklist"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
>{{ item.name }}</el-checkbox
|
||||
>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="其他风险">
|
||||
<el-input
|
||||
v-model="form.other_risk"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="措施选择">
|
||||
<el-checkbox-group v-model="form.measures_checked">
|
||||
<el-checkbox
|
||||
v-for="(item, index) in measurelist"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
>{{ item.name }}</el-checkbox
|
||||
>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-card class="box-card">
|
||||
<div class="clearfix">
|
||||
<span>应急处置:</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>1、如伤者发生骨折,采用夹板、木棍等将骨折部位上下关节固定后送医,当伤者昏迷、意识不清时则不应随意移动伤者,立即拨打120求救。</p>
|
||||
<p>2、如发现伤者出血,用止血带或包扎伤的方法止血,然后送医或拨打120。</p>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-form-item label="逃生路径">
|
||||
<el-input v-model="escape_route" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="其他应急处置">
|
||||
<el-input
|
||||
v-model="form.other_emr"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!--
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业审批照片">
|
||||
<el-input v-model="create_imgs" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
!-->
|
||||
</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-main>
|
||||
|
||||
<!--作业人员!-->
|
||||
<el-main class="nopadding" v-show="active === 1">
|
||||
<div class="left-panel" style="margin: 10px">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="addworker"
|
||||
></el-button>
|
||||
</div>
|
||||
<scTable
|
||||
ref="workerTable"
|
||||
:data="apiworkerObj"
|
||||
row-key="id"
|
||||
hidePagination
|
||||
stripe
|
||||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
fixed="left"
|
||||
type="index"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column label="姓名" prop="name" width="150">
|
||||
<template #default="scope">
|
||||
{{ scope.row.worker_.name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作职责" prop="duty" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column label="证书" prop="certificates" width="150">
|
||||
<template #default="scope" >
|
||||
<el-tag v-for="item in scope.row.certificates_"
|
||||
:key="item.number"
|
||||
:label="item.name"
|
||||
:value="item.number">{{item.name}}</el-tag>
|
||||
</template>
|
||||
</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">
|
||||
<template #default="scope">
|
||||
|
||||
<el-popconfirm
|
||||
title="确定删除该作业人员吗?"
|
||||
@confirm="delWorker(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
<sc-dialog v-model="workerdialog" draggable title="选择作业人员">
|
||||
<el-form
|
||||
ref="workerForm"
|
||||
:model="formworker"
|
||||
:rules="rules"
|
||||
:disabled="mode == 'show'"
|
||||
label-width="80px"
|
||||
width="70%"
|
||||
style="margin: 40px 40px 40px 40px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="作业人员">
|
||||
<el-select
|
||||
v-model="formworker.worker"
|
||||
@change="selectWorker"
|
||||
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 :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="工作职责">
|
||||
<el-select
|
||||
v-model="formworker.duty"
|
||||
filterable
|
||||
allow-create
|
||||
default-first-option
|
||||
:reserve-keyword="false"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dutyOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="证书">
|
||||
<el-select
|
||||
v-model="formworker.certificates"
|
||||
multiple
|
||||
placeholder="选择证书"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in certificatesOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="dialogcart = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitWorker">确 定</el-button>
|
||||
</template>
|
||||
</sc-dialog>
|
||||
<el-button style="margin-top: 12px" @click="handleLastStep"
|
||||
>上一步</el-button
|
||||
>
|
||||
<el-button style="margin-top: 12px" @click="submitOut">退出</el-button>
|
||||
|
||||
</el-main>
|
||||
|
||||
</el-container>
|
||||
</template>
|
||||
<style scoped>
|
||||
.clearfix {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.box-card p {
|
||||
line-height: 20px;
|
||||
}
|
||||
.content {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.stepSuc:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
.stepErr:hover {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import { genTree } from "@/utils/verificate";
|
||||
const defaultformworker = {
|
||||
id: "",
|
||||
worker: null,
|
||||
duty: null,
|
||||
certificates: [],
|
||||
opl: "",
|
||||
};
|
||||
const defaultformgas = {
|
||||
id: "",
|
||||
check_time: null,
|
||||
opl:""
|
||||
};
|
||||
export default {
|
||||
name: "hoisting",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
|
||||
active: 0,
|
||||
stepSuc: [0],
|
||||
stepTitle: ["基本信息", "作业人员"],
|
||||
query: {},
|
||||
selection: [],
|
||||
issave: false, //控制基本信息提交
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
form: {
|
||||
id: "",
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
operation: "",
|
||||
cate: "",
|
||||
risks_checked: [],
|
||||
},
|
||||
|
||||
operationId: "",
|
||||
oplcateId: "",
|
||||
oplId: "",
|
||||
leveloptions: [
|
||||
{ id: "一级吊装", name: "特级:>30米" },
|
||||
{ id: "二级吊装", name: "二级吊装" },
|
||||
{ id: "三级吊装", name: "三级吊装" },
|
||||
],
|
||||
deptoptions: [],
|
||||
useroptions: [],
|
||||
risklist: [],
|
||||
measurelist: [],
|
||||
pagtitle: "",
|
||||
|
||||
dutyOptions: [
|
||||
{ value: 10, label: "作业人员" },
|
||||
{ value: 20, label: "起重司机" },
|
||||
{ value: 30, label: "司索人员" },
|
||||
{ value: 40, label: "起重指挥" },
|
||||
{ value: 40, label: "电工" },
|
||||
],
|
||||
certificatesOptions: [],
|
||||
formworker: defaultformworker,
|
||||
apiworkerObj: [],
|
||||
workerdialog: false,
|
||||
gasdialog: false,
|
||||
formgas: defaultformgas,
|
||||
apigasObj: [],
|
||||
is_ok_: {
|
||||
true: "正常",
|
||||
false: "不正常",
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.operationId = this.$route.query.operationid; //作业ID
|
||||
this.oplcateId = this.$route.query.oplcateId; //作业许可证种类ID
|
||||
this.oplId = this.$route.query.oplId; //许可证ID
|
||||
this.getoplData();
|
||||
|
||||
this.getDept();
|
||||
this.getUser();
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
getoplData() {
|
||||
if (this.oplId == "") {
|
||||
this.getOperation();
|
||||
this.getOplcates();
|
||||
} else {
|
||||
this.getData();
|
||||
}
|
||||
},
|
||||
//根据oplId,查许可证
|
||||
getData() {
|
||||
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
||||
this.form = res;
|
||||
|
||||
this.oplcateId = res.cate;
|
||||
this.operationId = res.operation;
|
||||
this.getOperation();
|
||||
this.getOplcates();
|
||||
});
|
||||
},
|
||||
//根据operationId,查作业信息
|
||||
|
||||
getOperation() {
|
||||
this.$API.opm.operation.read.req(this.operationId).then((res) => {
|
||||
this.form.start_time = res.start_time; //作业开始时间
|
||||
this.form.end_time = res.end_time; //作业结束时间
|
||||
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//作业部门
|
||||
getDept() {
|
||||
this.$API.system.dept.list.req({ page: 0 }).then((res) => {
|
||||
this.deptoptions = genTree(res);
|
||||
});
|
||||
},
|
||||
|
||||
//作业负责人、作业监护人
|
||||
getUser() {
|
||||
this.$API.system.user.list.req({ page: 0 }).then((res) => {
|
||||
this.useroptions = res;
|
||||
});
|
||||
},
|
||||
//作业
|
||||
|
||||
//根据作业许可证ID获取,风险、措施
|
||||
getOplcates() {
|
||||
this.$API.opm.oplcate.read.req(this.oplcateId).then((res) => {
|
||||
console.log(res); //
|
||||
this.pagtitle = res.name;
|
||||
this.risklist = res.risk_options_; //风险缝隙
|
||||
this.measurelist = res.measure_options_; //控制措施
|
||||
});
|
||||
},
|
||||
handleStep(val) {
|
||||
//点击步骤条
|
||||
if (this.stepSuc.includes(val) === true) {
|
||||
this.active = val;
|
||||
}
|
||||
},
|
||||
//组件点击上一步
|
||||
handleLastStep() {
|
||||
if (--this.active === 0) {
|
||||
this.active = 0;
|
||||
}
|
||||
},
|
||||
//组件点击下一步
|
||||
handleNextStep() {
|
||||
if (this.active == 0) {
|
||||
// console.log(this.oplId);
|
||||
//如果是创建许可证书
|
||||
if (this.oplId == "") {
|
||||
//基本信息提交
|
||||
debugger;
|
||||
this.form.cate = this.oplcateId;
|
||||
this.form.operation = this.operationId;
|
||||
console.log(this.form);
|
||||
this.$API.opm.opl.create
|
||||
.req(this.form)
|
||||
.then((res) => {
|
||||
this.$emit("success", this.form);
|
||||
this.$message.success("创建成功");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
|
||||
this.oplId = res.id;
|
||||
this.getworkerList(res.id);
|
||||
this.getgasList(res.id);
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
} else if (this.oplId != "") {
|
||||
|
||||
this.$API.opm.opl.update.req(this.oplId, this.form).then(() => {
|
||||
this.$message.success("基本修改成功!");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
this.getgasList(this.oplId);
|
||||
this.getworkerList(this.oplId);
|
||||
|
||||
});
|
||||
} else {
|
||||
this.active = 1;
|
||||
}
|
||||
}
|
||||
// this.stepSuc.push(++this.active)
|
||||
},
|
||||
|
||||
//选择人员后,调出该人员的所有证书
|
||||
selectWorker() {
|
||||
this.$API.hrm.certificate.list
|
||||
.req({ employee__user: this.formworker.worker, page: 0 })
|
||||
.then((res) => {
|
||||
this.certificatesOptions = res;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//作业人员列表
|
||||
|
||||
getworkerList(id) {
|
||||
this.$API.opm.worker.list.req({ opl: id, page: 0 }).then((res) => {
|
||||
this.apiworkerObj = res;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//创建作业人员,显示Form
|
||||
addworker() {
|
||||
this.workerdialog = true;
|
||||
|
||||
this.formworker = Object.assign({}, defaultformworker);
|
||||
},
|
||||
|
||||
//删除作业人员
|
||||
delWorker(row) {
|
||||
this.$API.opm.worker.delete
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("作业人员删除成功");
|
||||
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
//提交作业人员信息
|
||||
submitWorker() {
|
||||
this.formworker.opl = this.oplId;
|
||||
this.$refs.workerForm.validate(async (valid) => {
|
||||
|
||||
this.$API.opm.worker.create
|
||||
.req(this.formworker)
|
||||
.then((res) => {
|
||||
this.$message.success("创建作业人员成功");
|
||||
this.workerdialog = false;
|
||||
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
//退出界面
|
||||
submitOut(){
|
||||
this.$router.push({
|
||||
name: "opl",
|
||||
query: {
|
||||
operationid: this.$route.query.id,//作业ID
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -168,6 +168,76 @@ export default {
|
|||
},
|
||||
});
|
||||
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;
|
||||
}
|
||||
},
|
||||
//编辑
|
||||
|
|
@ -189,6 +259,62 @@ export default {
|
|||
},
|
||||
});
|
||||
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;
|
||||
}
|
||||
},
|
||||
//查看
|
||||
|
|
|
|||
|
|
@ -0,0 +1,589 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-steps
|
||||
:active="active"
|
||||
style="width: 100%"
|
||||
:align-center="true"
|
||||
finish-status="success"
|
||||
>
|
||||
<el-step
|
||||
v-for="(item, index) of stepTitle"
|
||||
:key="index"
|
||||
:title="item"
|
||||
style="50%"
|
||||
@click="handleStep(index)"
|
||||
>
|
||||
</el-step>
|
||||
</el-steps>
|
||||
</el-header>
|
||||
<!--基本信息!-->
|
||||
<el-main class="nopadding" v-show="active === 0">
|
||||
<el-form
|
||||
v-show="active === 0"
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="110px"
|
||||
style="margin: 40px 40px 40px 40px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="关联作业">
|
||||
<el-input
|
||||
v-model="operationId"
|
||||
type="text"
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业许可种类">
|
||||
<el-input
|
||||
v-model="pagtitle"
|
||||
type="text"
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业开始时间">
|
||||
<el-date-picker
|
||||
v-model="form.start_time"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业结束时间">
|
||||
<el-date-picker
|
||||
v-model="form.end_time"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
</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 :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业监护人">
|
||||
<el-select v-model="form.monitor" 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 :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="风险选择">
|
||||
<el-checkbox-group v-model="form.risks_checked">
|
||||
<el-checkbox
|
||||
v-for="(item, index) in risklist"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
>{{ item.name }}</el-checkbox
|
||||
>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="其他风险">
|
||||
<el-input
|
||||
v-model="form.other_risk"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!--
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="逃生路径">
|
||||
<el-input v-model="escape_route" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col> !-->
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="措施选择">
|
||||
<el-checkbox-group v-model="form.measures_checked">
|
||||
<el-checkbox
|
||||
v-for="(item, index) in measurelist"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
>{{ item.name }}</el-checkbox
|
||||
>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-card class="box-card">
|
||||
<div class="clearfix">
|
||||
<span>应急处置:</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>1、发生火灾时立即使用消防器材进行灭火</p>
|
||||
<p>2、高温物料冲入眼睛时用洗眼器进行持续冲洗,严重时拨打120送医。</p>
|
||||
<p>3、发生人员烫伤时用喷淋装置对烫伤部位进行冲洗或用清水浸泡,用干净的纱布或衣物盖住被烫伤部位,伤势严重时立即拨打120送医。若贴身衣服与伤口粘在一起时,可用剪刀剪开,然后缓慢剥离衣物。</p>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-form-item label="其他应急处置">
|
||||
<el-input
|
||||
v-model="form.other_emr"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!--
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业审批照片">
|
||||
<el-input v-model="create_imgs" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
!-->
|
||||
</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-main>
|
||||
|
||||
<!--作业人员!-->
|
||||
<el-main class="nopadding" v-show="active === 1">
|
||||
<div class="left-panel" style="margin: 10px">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="addworker"
|
||||
></el-button>
|
||||
</div>
|
||||
<scTable
|
||||
ref="workerTable"
|
||||
:data="apiworkerObj"
|
||||
row-key="id"
|
||||
hidePagination
|
||||
stripe
|
||||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
fixed="left"
|
||||
type="index"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column label="姓名" prop="name" width="150">
|
||||
<template #default="scope">
|
||||
{{ scope.row.worker_.name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作职责" prop="duty" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column label="证书" prop="certificates" width="150">
|
||||
<template #default="scope" >
|
||||
<el-tag v-for="item in scope.row.certificates_"
|
||||
:key="item.number"
|
||||
:label="item.name"
|
||||
:value="item.number">{{item.name}}</el-tag>
|
||||
</template>
|
||||
</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">
|
||||
<template #default="scope">
|
||||
|
||||
<el-popconfirm
|
||||
title="确定删除该作业人员吗?"
|
||||
@confirm="delWorker(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
<sc-dialog v-model="workerdialog" draggable title="选择作业人员">
|
||||
<el-form
|
||||
ref="workerForm"
|
||||
:model="formworker"
|
||||
:rules="rules"
|
||||
:disabled="mode == 'show'"
|
||||
label-width="80px"
|
||||
width="70%"
|
||||
style="margin: 40px 40px 40px 40px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="作业人员">
|
||||
<el-select
|
||||
v-model="formworker.worker"
|
||||
@change="selectWorker"
|
||||
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 :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="工作职责">
|
||||
<el-select
|
||||
v-model="formworker.duty"
|
||||
filterable
|
||||
allow-create
|
||||
default-first-option
|
||||
:reserve-keyword="false"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dutyOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="证书">
|
||||
<el-select
|
||||
v-model="formworker.certificates"
|
||||
multiple
|
||||
placeholder="选择证书"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in certificatesOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="dialogcart = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitWorker">确 定</el-button>
|
||||
</template>
|
||||
</sc-dialog>
|
||||
<el-button style="margin-top: 12px" @click="handleLastStep"
|
||||
>上一步</el-button
|
||||
>
|
||||
<el-button style="margin-top: 12px" @click="submitOut">退出</el-button>
|
||||
|
||||
</el-main>
|
||||
|
||||
</el-container>
|
||||
</template>
|
||||
<style scoped>
|
||||
.clearfix {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.box-card p {
|
||||
line-height: 20px;
|
||||
}
|
||||
.content {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.stepSuc:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
.stepErr:hover {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import { genTree } from "@/utils/verificate";
|
||||
const defaultformworker = {
|
||||
id: "",
|
||||
worker: null,
|
||||
duty: null,
|
||||
certificates: [],
|
||||
opl: "",
|
||||
};
|
||||
const defaultformgas = {
|
||||
id: "",
|
||||
check_time: null,
|
||||
opl:""
|
||||
};
|
||||
export default {
|
||||
name: "preheat",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
|
||||
active: 0,
|
||||
stepSuc: [0],
|
||||
stepTitle: ["基本信息", "作业人员"],
|
||||
query: {},
|
||||
selection: [],
|
||||
issave: false, //控制基本信息提交
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
form: {
|
||||
id: "",
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
operation: "",
|
||||
cate: "",
|
||||
risks_checked: [],
|
||||
},
|
||||
|
||||
operationId: "",
|
||||
oplcateId: "",
|
||||
oplId: "",
|
||||
leveloptions: [
|
||||
{ id: "一级吊装", name: "特级:>30米" },
|
||||
{ id: "二级吊装", name: "二级吊装" },
|
||||
{ id: "三级吊装", name: "三级吊装" },
|
||||
],
|
||||
deptoptions: [],
|
||||
useroptions: [],
|
||||
risklist: [],
|
||||
measurelist: [],
|
||||
pagtitle: "",
|
||||
|
||||
dutyOptions: [
|
||||
{ value: 10, label: "作业人员" },
|
||||
{ value: 20, label: "起重司机" },
|
||||
{ value: 30, label: "司索人员" },
|
||||
{ value: 40, label: "起重指挥" },
|
||||
{ value: 40, label: "电工" },
|
||||
],
|
||||
certificatesOptions: [],
|
||||
formworker: defaultformworker,
|
||||
apiworkerObj: [],
|
||||
workerdialog: false,
|
||||
gasdialog: false,
|
||||
formgas: defaultformgas,
|
||||
apigasObj: [],
|
||||
is_ok_: {
|
||||
true: "正常",
|
||||
false: "不正常",
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.operationId = this.$route.query.operationid; //作业ID
|
||||
this.oplcateId = this.$route.query.oplcateId; //作业许可证种类ID
|
||||
this.oplId = this.$route.query.oplId; //许可证ID
|
||||
this.getoplData();
|
||||
|
||||
this.getDept();
|
||||
this.getUser();
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
getoplData() {
|
||||
if (this.oplId == "") {
|
||||
this.getOperation();
|
||||
this.getOplcates();
|
||||
} else {
|
||||
this.getData();
|
||||
}
|
||||
},
|
||||
//根据oplId,查许可证
|
||||
getData() {
|
||||
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
||||
this.form = res;
|
||||
|
||||
this.oplcateId = res.cate;
|
||||
this.operationId = res.operation;
|
||||
this.getOperation();
|
||||
this.getOplcates();
|
||||
});
|
||||
},
|
||||
//根据operationId,查作业信息
|
||||
|
||||
getOperation() {
|
||||
this.$API.opm.operation.read.req(this.operationId).then((res) => {
|
||||
this.form.start_time = res.start_time; //作业开始时间
|
||||
this.form.end_time = res.end_time; //作业结束时间
|
||||
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//作业部门
|
||||
getDept() {
|
||||
this.$API.system.dept.list.req({ page: 0 }).then((res) => {
|
||||
this.deptoptions = genTree(res);
|
||||
});
|
||||
},
|
||||
|
||||
//作业负责人、作业监护人
|
||||
getUser() {
|
||||
this.$API.system.user.list.req({ page: 0 }).then((res) => {
|
||||
this.useroptions = res;
|
||||
});
|
||||
},
|
||||
//作业
|
||||
|
||||
//根据作业许可证ID获取,风险、措施
|
||||
getOplcates() {
|
||||
this.$API.opm.oplcate.read.req(this.oplcateId).then((res) => {
|
||||
console.log(res); //
|
||||
this.pagtitle = res.name;
|
||||
this.risklist = res.risk_options_; //风险缝隙
|
||||
this.measurelist = res.measure_options_; //控制措施
|
||||
});
|
||||
},
|
||||
handleStep(val) {
|
||||
//点击步骤条
|
||||
if (this.stepSuc.includes(val) === true) {
|
||||
this.active = val;
|
||||
}
|
||||
},
|
||||
//组件点击上一步
|
||||
handleLastStep() {
|
||||
if (--this.active === 0) {
|
||||
this.active = 0;
|
||||
}
|
||||
},
|
||||
//组件点击下一步
|
||||
handleNextStep() {
|
||||
if (this.active == 0) {
|
||||
// console.log(this.oplId);
|
||||
//如果是创建许可证书
|
||||
if (this.oplId == "") {
|
||||
//基本信息提交
|
||||
debugger;
|
||||
this.form.cate = this.oplcateId;
|
||||
this.form.operation = this.operationId;
|
||||
console.log(this.form);
|
||||
this.$API.opm.opl.create
|
||||
.req(this.form)
|
||||
.then((res) => {
|
||||
this.$emit("success", this.form);
|
||||
this.$message.success("创建成功");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
|
||||
this.oplId = res.id;
|
||||
this.getworkerList(res.id);
|
||||
this.getgasList(res.id);
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
} else if (this.oplId != "") {
|
||||
|
||||
this.$API.opm.opl.update.req(this.oplId, this.form).then(() => {
|
||||
this.$message.success("基本修改成功!");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
this.getgasList(this.oplId);
|
||||
this.getworkerList(this.oplId);
|
||||
|
||||
});
|
||||
} else {
|
||||
this.active = 1;
|
||||
}
|
||||
}
|
||||
// this.stepSuc.push(++this.active)
|
||||
},
|
||||
|
||||
//选择人员后,调出该人员的所有证书
|
||||
selectWorker() {
|
||||
this.$API.hrm.certificate.list
|
||||
.req({ employee__user: this.formworker.worker, page: 0 })
|
||||
.then((res) => {
|
||||
this.certificatesOptions = res;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//作业人员列表
|
||||
|
||||
getworkerList(id) {
|
||||
this.$API.opm.worker.list.req({ opl: id, page: 0 }).then((res) => {
|
||||
this.apiworkerObj = res;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//创建作业人员,显示Form
|
||||
addworker() {
|
||||
this.workerdialog = true;
|
||||
|
||||
this.formworker = Object.assign({}, defaultformworker);
|
||||
},
|
||||
|
||||
//删除作业人员
|
||||
delWorker(row) {
|
||||
this.$API.opm.worker.delete
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("作业人员删除成功");
|
||||
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
//提交作业人员信息
|
||||
submitWorker() {
|
||||
this.formworker.opl = this.oplId;
|
||||
this.$refs.workerForm.validate(async (valid) => {
|
||||
|
||||
this.$API.opm.worker.create
|
||||
.req(this.formworker)
|
||||
.then((res) => {
|
||||
this.$message.success("创建作业人员成功");
|
||||
this.workerdialog = false;
|
||||
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
//退出界面
|
||||
submitOut(){
|
||||
this.$router.push({
|
||||
name: "opl",
|
||||
query: {
|
||||
operationid: this.$route.query.id,//作业ID
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -0,0 +1,616 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-steps
|
||||
:active="active"
|
||||
style="width: 100%"
|
||||
:align-center="true"
|
||||
finish-status="success"
|
||||
>
|
||||
<el-step
|
||||
v-for="(item, index) of stepTitle"
|
||||
:key="index"
|
||||
:title="item"
|
||||
style="50%"
|
||||
@click="handleStep(index)"
|
||||
>
|
||||
</el-step>
|
||||
</el-steps>
|
||||
</el-header>
|
||||
<!--基本信息!-->
|
||||
<el-main class="nopadding" v-show="active === 0">
|
||||
<el-form
|
||||
v-show="active === 0"
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="110px"
|
||||
style="margin: 40px 40px 40px 40px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="关联作业">
|
||||
<el-input
|
||||
v-model="operationId"
|
||||
type="text"
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业许可种类">
|
||||
<el-input
|
||||
v-model="pagtitle"
|
||||
type="text"
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业开始时间">
|
||||
<el-date-picker
|
||||
v-model="form.start_time"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业结束时间">
|
||||
<el-date-picker
|
||||
v-model="form.end_time"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业级别">
|
||||
<el-select v-model="form.level" placeholder="选择作业级别">
|
||||
<el-option
|
||||
v-for="item in leveloptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业部门">
|
||||
<el-cascader
|
||||
placeholder="选择作业部门"
|
||||
getCheckedNodes="true"
|
||||
v-model="form.dept_do"
|
||||
:options="deptoptions"
|
||||
:props="{
|
||||
expandTrigger: 'hover', // 次级菜单的展开方式
|
||||
label: 'label', //
|
||||
value: 'value', //
|
||||
emitPath: false, // 在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组,若设置 false,则只返回该节点的值
|
||||
}"
|
||||
clearable
|
||||
/>
|
||||
</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 :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业监护人">
|
||||
<el-select v-model="form.monitor" 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 :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="风险选择">
|
||||
<el-checkbox-group v-model="form.risks_checked">
|
||||
<el-checkbox
|
||||
v-for="(item, index) in risklist"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
>{{ item.name }}</el-checkbox
|
||||
>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="其他风险">
|
||||
<el-input
|
||||
v-model="form.other_risk"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!--
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="逃生路径">
|
||||
<el-input v-model="escape_route" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col> !-->
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="措施选择">
|
||||
<el-checkbox-group v-model="form.measures_checked">
|
||||
<el-checkbox
|
||||
v-for="(item, index) in measurelist"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
>{{ item.name }}</el-checkbox
|
||||
>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-card class="box-card">
|
||||
<div class="clearfix">
|
||||
<span>应急处置:</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>1、管线被破坏时,应立即停止作业并报告相关部门,现场设置紧急隔离线,保护现场等待抢修。</p>
|
||||
<p>2、发生人员受伤时应立即组织救援,救援过程中应避免二次伤害,根据伤情送医或拨打120。</p>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
<el-form-item label="其他应急处置">
|
||||
<el-input
|
||||
v-model="form.other_emr"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!--
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业审批照片">
|
||||
<el-input v-model="create_imgs" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
!-->
|
||||
</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-main>
|
||||
|
||||
<!--作业人员!-->
|
||||
<el-main class="nopadding" v-show="active === 1">
|
||||
<div class="left-panel" style="margin: 10px">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="addworker"
|
||||
></el-button>
|
||||
</div>
|
||||
<scTable
|
||||
ref="workerTable"
|
||||
:data="apiworkerObj"
|
||||
row-key="id"
|
||||
hidePagination
|
||||
stripe
|
||||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
fixed="left"
|
||||
type="index"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column label="姓名" prop="name" width="150">
|
||||
<template #default="scope">
|
||||
{{ scope.row.worker_.name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作职责" prop="duty" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column label="证书" prop="certificates" width="150">
|
||||
<template #default="scope" >
|
||||
<el-tag v-for="item in scope.row.certificates_"
|
||||
:key="item.number"
|
||||
:label="item.name"
|
||||
:value="item.number">{{item.name}}</el-tag>
|
||||
</template>
|
||||
</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">
|
||||
<template #default="scope">
|
||||
|
||||
<el-popconfirm
|
||||
title="确定删除该作业人员吗?"
|
||||
@confirm="delWorker(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
<sc-dialog v-model="workerdialog" draggable title="选择作业人员">
|
||||
<el-form
|
||||
ref="workerForm"
|
||||
:model="formworker"
|
||||
:rules="rules"
|
||||
:disabled="mode == 'show'"
|
||||
label-width="80px"
|
||||
width="70%"
|
||||
style="margin: 40px 40px 40px 40px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="作业人员">
|
||||
<el-select
|
||||
v-model="formworker.worker"
|
||||
@change="selectWorker"
|
||||
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 :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="工作职责">
|
||||
<el-select
|
||||
v-model="formworker.duty"
|
||||
filterable
|
||||
allow-create
|
||||
default-first-option
|
||||
:reserve-keyword="false"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dutyOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="证书">
|
||||
<el-select
|
||||
v-model="formworker.certificates"
|
||||
multiple
|
||||
placeholder="选择证书"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in certificatesOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="dialogcart = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitWorker">确 定</el-button>
|
||||
</template>
|
||||
</sc-dialog>
|
||||
<el-button style="margin-top: 12px" @click="handleLastStep"
|
||||
>上一步</el-button
|
||||
>
|
||||
<el-button style="margin-top: 12px" @click="submitOut">退出</el-button>
|
||||
|
||||
</el-main>
|
||||
|
||||
</el-container>
|
||||
</template>
|
||||
<style scoped>
|
||||
.clearfix {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.box-card p {
|
||||
line-height: 20px;
|
||||
}
|
||||
.content {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.stepSuc:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
.stepErr:hover {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import { genTree } from "@/utils/verificate";
|
||||
const defaultformworker = {
|
||||
id: "",
|
||||
worker: null,
|
||||
duty: null,
|
||||
certificates: [],
|
||||
opl: "",
|
||||
};
|
||||
const defaultformgas = {
|
||||
id: "",
|
||||
check_time: null,
|
||||
opl:""
|
||||
};
|
||||
export default {
|
||||
name: "soil",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
|
||||
active: 0,
|
||||
stepSuc: [0],
|
||||
stepTitle: ["基本信息", "作业人员"],
|
||||
query: {},
|
||||
selection: [],
|
||||
issave: false, //控制基本信息提交
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
form: {
|
||||
id: "",
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
operation: "",
|
||||
cate: "",
|
||||
risks_checked: [],
|
||||
},
|
||||
|
||||
operationId: "",
|
||||
oplcateId: "",
|
||||
oplId: "",
|
||||
leveloptions: [
|
||||
{ id: "主干道", name: "主干道" },
|
||||
{ id: "次干渠", name: "次干渠" }
|
||||
],
|
||||
deptoptions: [],
|
||||
useroptions: [],
|
||||
risklist: [],
|
||||
measurelist: [],
|
||||
pagtitle: "",
|
||||
|
||||
dutyOptions: [
|
||||
{ value: 10, label: "作业人员" },
|
||||
{ value: 20, label: "起重司机" },
|
||||
{ value: 30, label: "司索人员" },
|
||||
{ value: 40, label: "起重指挥" },
|
||||
{ value: 40, label: "电工" },
|
||||
],
|
||||
certificatesOptions: [],
|
||||
formworker: defaultformworker,
|
||||
apiworkerObj: [],
|
||||
workerdialog: false,
|
||||
gasdialog: false,
|
||||
formgas: defaultformgas,
|
||||
apigasObj: [],
|
||||
is_ok_: {
|
||||
true: "正常",
|
||||
false: "不正常",
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.operationId = this.$route.query.operationid; //作业ID
|
||||
this.oplcateId = this.$route.query.oplcateId; //作业许可证种类ID
|
||||
this.oplId = this.$route.query.oplId; //许可证ID
|
||||
this.getoplData();
|
||||
|
||||
this.getDept();
|
||||
this.getUser();
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
getoplData() {
|
||||
if (this.oplId == "") {
|
||||
this.getOperation();
|
||||
this.getOplcates();
|
||||
} else {
|
||||
this.getData();
|
||||
}
|
||||
},
|
||||
//根据oplId,查许可证
|
||||
getData() {
|
||||
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
||||
this.form = res;
|
||||
|
||||
this.oplcateId = res.cate;
|
||||
this.operationId = res.operation;
|
||||
this.getOperation();
|
||||
this.getOplcates();
|
||||
});
|
||||
},
|
||||
//根据operationId,查作业信息
|
||||
|
||||
getOperation() {
|
||||
this.$API.opm.operation.read.req(this.operationId).then((res) => {
|
||||
this.form.start_time = res.start_time; //作业开始时间
|
||||
this.form.end_time = res.end_time; //作业结束时间
|
||||
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//作业部门
|
||||
getDept() {
|
||||
this.$API.system.dept.list.req({ page: 0 }).then((res) => {
|
||||
this.deptoptions = genTree(res);
|
||||
});
|
||||
},
|
||||
|
||||
//作业负责人、作业监护人
|
||||
getUser() {
|
||||
this.$API.system.user.list.req({ page: 0 }).then((res) => {
|
||||
this.useroptions = res;
|
||||
});
|
||||
},
|
||||
//作业
|
||||
|
||||
//根据作业许可证ID获取,风险、措施
|
||||
getOplcates() {
|
||||
this.$API.opm.oplcate.read.req(this.oplcateId).then((res) => {
|
||||
console.log(res); //
|
||||
this.pagtitle = res.name;
|
||||
this.risklist = res.risk_options_; //风险缝隙
|
||||
this.measurelist = res.measure_options_; //控制措施
|
||||
});
|
||||
},
|
||||
handleStep(val) {
|
||||
//点击步骤条
|
||||
if (this.stepSuc.includes(val) === true) {
|
||||
this.active = val;
|
||||
}
|
||||
},
|
||||
//组件点击上一步
|
||||
handleLastStep() {
|
||||
if (--this.active === 0) {
|
||||
this.active = 0;
|
||||
}
|
||||
},
|
||||
//组件点击下一步
|
||||
handleNextStep() {
|
||||
if (this.active == 0) {
|
||||
// console.log(this.oplId);
|
||||
//如果是创建许可证书
|
||||
if (this.oplId == "") {
|
||||
//基本信息提交
|
||||
debugger;
|
||||
this.form.cate = this.oplcateId;
|
||||
this.form.operation = this.operationId;
|
||||
console.log(this.form);
|
||||
this.$API.opm.opl.create
|
||||
.req(this.form)
|
||||
.then((res) => {
|
||||
this.$emit("success", this.form);
|
||||
this.$message.success("创建成功");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
|
||||
this.oplId = res.id;
|
||||
this.getworkerList(res.id);
|
||||
this.getgasList(res.id);
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
} else if (this.oplId != "") {
|
||||
|
||||
this.$API.opm.opl.update.req(this.oplId, this.form).then(() => {
|
||||
this.$message.success("基本修改成功!");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
this.getgasList(this.oplId);
|
||||
this.getworkerList(this.oplId);
|
||||
|
||||
});
|
||||
} else {
|
||||
this.active = 1;
|
||||
}
|
||||
}
|
||||
// this.stepSuc.push(++this.active)
|
||||
},
|
||||
|
||||
//选择人员后,调出该人员的所有证书
|
||||
selectWorker() {
|
||||
this.$API.hrm.certificate.list
|
||||
.req({ employee__user: this.formworker.worker, page: 0 })
|
||||
.then((res) => {
|
||||
this.certificatesOptions = res;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//作业人员列表
|
||||
|
||||
getworkerList(id) {
|
||||
this.$API.opm.worker.list.req({ opl: id, page: 0 }).then((res) => {
|
||||
this.apiworkerObj = res;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//创建作业人员,显示Form
|
||||
addworker() {
|
||||
this.workerdialog = true;
|
||||
|
||||
this.formworker = Object.assign({}, defaultformworker);
|
||||
},
|
||||
|
||||
//删除作业人员
|
||||
delWorker(row) {
|
||||
this.$API.opm.worker.delete
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("作业人员删除成功");
|
||||
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
//提交作业人员信息
|
||||
submitWorker() {
|
||||
this.formworker.opl = this.oplId;
|
||||
this.$refs.workerForm.validate(async (valid) => {
|
||||
|
||||
this.$API.opm.worker.create
|
||||
.req(this.formworker)
|
||||
.then((res) => {
|
||||
this.$message.success("创建作业人员成功");
|
||||
this.workerdialog = false;
|
||||
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
//退出界面
|
||||
submitOut(){
|
||||
this.$router.push({
|
||||
name: "opl",
|
||||
query: {
|
||||
operationid: this.$route.query.id,//作业ID
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -219,11 +219,11 @@
|
|||
<span>应急处置:</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>1、发生火灾时立即使用消防器材边灭火边报告</p>
|
||||
<p>2、预判火势无法控制时,应立即疏散人群并拨打110或119求救。</p>
|
||||
<p>
|
||||
3、发生人员烫伤时用清水对烫伤部位进行冲洗或浸泡,用干净的纱布或衣物盖住被烫伤部位,伤势严重时立即拨打120送医。若贴身衣服与伤口粘在一起时,可用剪刀剪开,然后缓慢剥离衣物。
|
||||
</p>
|
||||
<p>1、施救人员必须穿戴防护用品(防毒面具、正压式空气呼吸器、长管式呼吸器)和安全绳方可进入有限空间进行救援。</p>
|
||||
<p>2、将受伤人员托起或使用三角架、绞盘和全身式安全带将伤者拉出有限空间。</p>
|
||||
<p>3、如伤者发生骨折,采用夹板、木棍等对骨折部位上下关节进行固定,当伤者昏迷或意识不清楚则不应随意移动伤者,立即拨打120。</p>
|
||||
<p>4、发生人员窒息、中毒,将其转移到空气新鲜流通的场所,插入氧气袋或进行心肺复苏术,边抢救边拨打120求救。</p>
|
||||
<p>5、逃生出口</p>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-form-item label="其他应急处置">
|
||||
|
|
@ -424,8 +424,8 @@
|
|||
<el-table-column label="O2(%)" prop="o2" width="150"></el-table-column>
|
||||
<el-table-column label="CO" prop="co" width="150"></el-table-column>
|
||||
<el-table-column
|
||||
label="可燃气体(V%LEL)"
|
||||
prop="lel"
|
||||
label="H2S"
|
||||
prop="h2s"
|
||||
width="150"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
|
|
@ -585,7 +585,7 @@ const defaultformgas = {
|
|||
opl:""
|
||||
};
|
||||
export default {
|
||||
name: "fire",
|
||||
name: "space",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,701 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-steps
|
||||
:active="active"
|
||||
style="width: 100%"
|
||||
:align-center="true"
|
||||
finish-status="success"
|
||||
>
|
||||
<el-step
|
||||
v-for="(item, index) of stepTitle"
|
||||
:key="index"
|
||||
:title="item"
|
||||
style="50%"
|
||||
@click="handleStep(index)"
|
||||
>
|
||||
</el-step>
|
||||
</el-steps>
|
||||
</el-header>
|
||||
<!--基本信息!-->
|
||||
<el-main class="nopadding" v-show="active === 0">
|
||||
<el-form
|
||||
v-show="active === 0"
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="110px"
|
||||
style="margin: 40px 40px 40px 40px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="关联作业">
|
||||
<el-input
|
||||
v-model="operationId"
|
||||
type="text"
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业许可种类">
|
||||
<el-input
|
||||
v-model="pagtitle"
|
||||
type="text"
|
||||
:disabled="true"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业开始时间">
|
||||
<el-date-picker
|
||||
v-model="form.start_time"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业结束时间">
|
||||
<el-date-picker
|
||||
v-model="form.end_time"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业部门">
|
||||
<el-cascader
|
||||
placeholder="选择作业部门"
|
||||
getCheckedNodes="true"
|
||||
v-model="form.dept_do"
|
||||
:options="deptoptions"
|
||||
:props="{
|
||||
expandTrigger: 'hover', // 次级菜单的展开方式
|
||||
label: 'label', //
|
||||
value: 'value', //
|
||||
emitPath: false, // 在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组,若设置 false,则只返回该节点的值
|
||||
}"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业监护人">
|
||||
<el-select v-model="form.monitor" 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 :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="供电制式">
|
||||
<el-select v-model="form.level" placeholder="选择供电制式">
|
||||
<el-option
|
||||
v-for="item in leveloptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="计划用电天数">
|
||||
<el-input-number v-model="form.power_days" type="text" clearable></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!--
|
||||
临时用电 !-->
|
||||
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
|
||||
|
||||
<el-form-item label="工作类型">
|
||||
<el-select v-model="form.work_type" placeholder="选择工作类型">
|
||||
<el-option
|
||||
v-for="item in worktypeoptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="工作时间">
|
||||
<el-date-picker
|
||||
v-model="form.work_time"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="验收时间">
|
||||
|
||||
<el-date-picker
|
||||
v-model="form.accept_time"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
</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 :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="用电功率">
|
||||
<el-input v-model="form.power" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="用电地点">
|
||||
<el-input v-model="form.power_to" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="用电开始">
|
||||
<el-date-picker
|
||||
v-model="form.power_start_time"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="用电截至">
|
||||
<el-date-picker
|
||||
v-model="form.power_end_time"
|
||||
type="datetime"
|
||||
placeholder="选择开始时间"
|
||||
/>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="电源接入点">
|
||||
<el-input v-model="form.power_from" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="风险选择">
|
||||
<el-checkbox-group v-model="form.risks_checked">
|
||||
<el-checkbox
|
||||
v-for="(item, index) in risklist"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
>{{ item.name }}</el-checkbox
|
||||
>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="其他风险">
|
||||
<el-input
|
||||
v-model="form.other_risk"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!--
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="逃生路径">
|
||||
<el-input v-model="escape_route" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col> !-->
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="措施选择">
|
||||
<el-checkbox-group v-model="form.measures_checked">
|
||||
<el-checkbox
|
||||
v-for="(item, index) in measurelist"
|
||||
:key="index"
|
||||
:label="item.id"
|
||||
>{{ item.name }}</el-checkbox
|
||||
>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-card class="box-card">
|
||||
<div class="clearfix">
|
||||
<span>应急处置:</span>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>发生人员触电事故,应迅速切断电源或采用绝缘工器具使触电者脱离电源,判断触电者无意识或心跳、呼吸已停止时,应立即报告,并由经过专业训练或具备相应能力的人员对触电者进行心肺复苏术,直至专业医务人员赶到现场为止。
|
||||
其他应急处置
|
||||
</p>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-form-item label="其他应急处置">
|
||||
<el-input
|
||||
v-model="form.other_emr"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!--
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="作业审批照片">
|
||||
<el-input v-model="create_imgs" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
!-->
|
||||
</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-main>
|
||||
|
||||
<!--作业人员!-->
|
||||
<el-main class="nopadding" v-show="active === 1">
|
||||
<div class="left-panel" style="margin: 10px">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="addworker"
|
||||
></el-button>
|
||||
</div>
|
||||
<scTable
|
||||
ref="workerTable"
|
||||
:data="apiworkerObj"
|
||||
row-key="id"
|
||||
hidePagination
|
||||
stripe
|
||||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
fixed="left"
|
||||
type="index"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column label="姓名" prop="name" width="150">
|
||||
<template #default="scope">
|
||||
{{ scope.row.worker_.name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作职责" prop="duty" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column label="证书" prop="certificates" width="150">
|
||||
<template #default="scope" >
|
||||
<el-tag v-for="item in scope.row.certificates_"
|
||||
:key="item.number"
|
||||
:label="item.name"
|
||||
:value="item.number">{{item.name}}</el-tag>
|
||||
</template>
|
||||
</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">
|
||||
<template #default="scope">
|
||||
|
||||
<el-popconfirm
|
||||
title="确定删除该作业人员吗?"
|
||||
@confirm="delWorker(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
<sc-dialog v-model="workerdialog" draggable title="选择作业人员">
|
||||
<el-form
|
||||
ref="workerForm"
|
||||
:model="formworker"
|
||||
:rules="rules"
|
||||
:disabled="mode == 'show'"
|
||||
label-width="80px"
|
||||
width="70%"
|
||||
style="margin: 40px 40px 40px 40px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="作业人员">
|
||||
<el-select
|
||||
v-model="formworker.worker"
|
||||
@change="selectWorker"
|
||||
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 :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="工作职责">
|
||||
<el-select
|
||||
v-model="formworker.duty"
|
||||
filterable
|
||||
allow-create
|
||||
default-first-option
|
||||
:reserve-keyword="false"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dutyOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="证书">
|
||||
<el-select
|
||||
v-model="formworker.certificates"
|
||||
multiple
|
||||
placeholder="选择证书"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in certificatesOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="dialogcart = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitWorker">确 定</el-button>
|
||||
</template>
|
||||
</sc-dialog>
|
||||
<el-button style="margin-top: 12px" @click="handleLastStep"
|
||||
>上一步</el-button
|
||||
>
|
||||
<el-button style="margin-top: 12px" @click="submitOut">退出</el-button>
|
||||
|
||||
|
||||
</el-main>
|
||||
|
||||
</el-container>
|
||||
</template>
|
||||
<style scoped>
|
||||
.clearfix {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.box-card p {
|
||||
line-height: 20px;
|
||||
}
|
||||
.content {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.stepSuc:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
.stepErr:hover {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import { genTree } from "@/utils/verificate";
|
||||
const defaultformworker = {
|
||||
id: "",
|
||||
worker: null,
|
||||
duty: null,
|
||||
certificates: [],
|
||||
opl: "",
|
||||
};
|
||||
const defaultformgas = {
|
||||
id: "",
|
||||
check_time: null,
|
||||
opl:""
|
||||
};
|
||||
export default {
|
||||
name: "usecl",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
|
||||
active: 0,
|
||||
stepSuc: [0],
|
||||
stepTitle: ["基本信息", "作业人员"],
|
||||
query: {},
|
||||
selection: [],
|
||||
issave: false, //控制基本信息提交
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
form: {
|
||||
id: "",
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
operation: "",
|
||||
cate: "",
|
||||
risks_checked: [],
|
||||
},
|
||||
|
||||
operationId: "",
|
||||
oplcateId: "",
|
||||
oplId: "",
|
||||
leveloptions: [
|
||||
{ id: 10, name: "单项" },
|
||||
{ id: 20, name: "三相四线" },
|
||||
{ id: 30, name: "三相五线" },
|
||||
],
|
||||
worktypeoptions: [
|
||||
{ id: "安装", name: "安装" },
|
||||
{ id: "拆除", name: "拆除" },
|
||||
],
|
||||
deptoptions: [],
|
||||
useroptions: [],
|
||||
risklist: [],
|
||||
measurelist: [],
|
||||
pagtitle: "",
|
||||
|
||||
dutyOptions: [
|
||||
|
||||
{ value: 40, label: "电工" },
|
||||
],
|
||||
certificatesOptions: [],
|
||||
formworker: defaultformworker,
|
||||
apiworkerObj: [],
|
||||
workerdialog: false,
|
||||
gasdialog: false,
|
||||
formgas: defaultformgas,
|
||||
apigasObj: [],
|
||||
is_ok_: {
|
||||
true: "正常",
|
||||
false: "不正常",
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.operationId = this.$route.query.operationid; //作业ID
|
||||
this.oplcateId = this.$route.query.oplcateId; //作业许可证种类ID
|
||||
this.oplId = this.$route.query.oplId; //许可证ID
|
||||
this.getoplData();
|
||||
|
||||
this.getDept();
|
||||
this.getUser();
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
getoplData() {
|
||||
if (this.oplId == "") {
|
||||
this.getOperation();
|
||||
this.getOplcates();
|
||||
} else {
|
||||
this.getData();
|
||||
}
|
||||
},
|
||||
//根据oplId,查许可证
|
||||
getData() {
|
||||
this.$API.opm.opl.read.req(this.oplId).then((res) => {
|
||||
this.form = res;
|
||||
|
||||
this.oplcateId = res.cate;
|
||||
this.operationId = res.operation;
|
||||
this.getOperation();
|
||||
this.getOplcates();
|
||||
});
|
||||
},
|
||||
//根据operationId,查作业信息
|
||||
|
||||
getOperation() {
|
||||
this.$API.opm.operation.read.req(this.operationId).then((res) => {
|
||||
this.form.start_time = res.start_time; //作业开始时间
|
||||
this.form.end_time = res.end_time; //作业结束时间
|
||||
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//作业部门
|
||||
getDept() {
|
||||
this.$API.system.dept.list.req({ page: 0 }).then((res) => {
|
||||
this.deptoptions = genTree(res);
|
||||
});
|
||||
},
|
||||
|
||||
//作业负责人、作业监护人
|
||||
getUser() {
|
||||
this.$API.system.user.list.req({ page: 0 }).then((res) => {
|
||||
this.useroptions = res;
|
||||
});
|
||||
},
|
||||
//作业
|
||||
|
||||
//根据作业许可证ID获取,风险、措施
|
||||
getOplcates() {
|
||||
this.$API.opm.oplcate.read.req(this.oplcateId).then((res) => {
|
||||
console.log(res); //
|
||||
this.pagtitle = res.name;
|
||||
this.risklist = res.risk_options_; //风险缝隙
|
||||
this.measurelist = res.measure_options_; //控制措施
|
||||
});
|
||||
},
|
||||
handleStep(val) {
|
||||
//点击步骤条
|
||||
if (this.stepSuc.includes(val) === true) {
|
||||
this.active = val;
|
||||
}
|
||||
},
|
||||
//组件点击上一步
|
||||
handleLastStep() {
|
||||
if (--this.active === 0) {
|
||||
this.active = 0;
|
||||
}
|
||||
},
|
||||
//组件点击下一步
|
||||
handleNextStep() {
|
||||
if (this.active == 0) {
|
||||
// console.log(this.oplId);
|
||||
//如果是创建许可证书
|
||||
if (this.oplId == "") {
|
||||
//基本信息提交
|
||||
debugger;
|
||||
this.form.cate = this.oplcateId;
|
||||
this.form.operation = this.operationId;
|
||||
console.log(this.form);
|
||||
this.$API.opm.opl.create
|
||||
.req(this.form)
|
||||
.then((res) => {
|
||||
this.$emit("success", this.form);
|
||||
this.$message.success("创建成功");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
|
||||
this.oplId = res.id;
|
||||
this.getworkerList(res.id);
|
||||
this.getgasList(res.id);
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
} else if (this.oplId != "") {
|
||||
|
||||
this.$API.opm.opl.update.req(this.oplId, this.form).then(() => {
|
||||
this.$message.success("基本修改成功!");
|
||||
this.issave = true;
|
||||
this.active = 1;
|
||||
this.getgasList(this.oplId);
|
||||
this.getworkerList(this.oplId);
|
||||
|
||||
});
|
||||
} else {
|
||||
this.active = 1;
|
||||
}
|
||||
}
|
||||
// this.stepSuc.push(++this.active)
|
||||
},
|
||||
|
||||
//选择人员后,调出该人员的所有证书
|
||||
selectWorker() {
|
||||
this.$API.hrm.certificate.list
|
||||
.req({ employee__user: this.formworker.worker, page: 0 })
|
||||
.then((res) => {
|
||||
this.certificatesOptions = res;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//作业人员列表
|
||||
|
||||
getworkerList(id) {
|
||||
this.$API.opm.worker.list.req({ opl: id, page: 0 }).then((res) => {
|
||||
this.apiworkerObj = res;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//创建作业人员,显示Form
|
||||
addworker() {
|
||||
this.workerdialog = true;
|
||||
|
||||
this.formworker = Object.assign({}, defaultformworker);
|
||||
},
|
||||
|
||||
//删除作业人员
|
||||
delWorker(row) {
|
||||
this.$API.opm.worker.delete
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("作业人员删除成功");
|
||||
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
//提交作业人员信息
|
||||
submitWorker() {
|
||||
this.formworker.opl = this.oplId;
|
||||
this.$refs.workerForm.validate(async (valid) => {
|
||||
|
||||
this.$API.opm.worker.create
|
||||
.req(this.formworker)
|
||||
.then((res) => {
|
||||
this.$message.success("创建作业人员成功");
|
||||
this.workerdialog = false;
|
||||
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
//退出界面
|
||||
submitOut(){
|
||||
this.$router.push({
|
||||
name: "opl",
|
||||
query: {
|
||||
operationid: this.$route.query.id,//作业ID
|
||||
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -0,0 +1,286 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleForm('add')"
|
||||
></el-button>
|
||||
<!--
|
||||
<el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
||||
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button> -->
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
placeholder="姓名/手机号"
|
||||
clearable
|
||||
@click="upsearch"
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="upsearch"
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
@selection-change="selectionChange"
|
||||
stripe
|
||||
@resetQuery="resetQuery"
|
||||
>
|
||||
|
||||
<el-table-column label="#" fixed="left" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="证书名称" fixed="left" prop="name" width="150"></el-table-column>
|
||||
<el-table-column label="证书编号" prop="number" width="200"> </el-table-column>
|
||||
<el-table-column label="相关人员" prop="remployee_name" width="200"> </el-table-column>
|
||||
<el-table-column label="证书类型" prop="type" width="200"><template #default="scope">{{type_[scope.row.type]}} </template></el-table-column>
|
||||
<el-table-column label="发证日期" prop="issue_date" width="180"></el-table-column>
|
||||
<el-table-column label="有效期" prop="expiration_date" width="200"> </el-table-column>
|
||||
<el-table-column label="下一次复审日期" prop="review_date" width="180"></el-table-column>
|
||||
<el-table-column label="证书文件" prop="file" width="180"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="left" width="170">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
text
|
||||
type="warning"
|
||||
size="small"
|
||||
@click="handleForm('edit', scope.row)"
|
||||
>编辑</el-button
|
||||
>
|
||||
|
||||
<el-popconfirm
|
||||
title="确定删除吗?"
|
||||
@confirm="table_del(scope.row, scope.$index)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
<sc-dialog v-model="dialogcart" draggable title="创建人员证书">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
:disabled="mode === 'show'"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="证书名称" prop="name">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
placeholder="请输入证书名称"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="证书编号" prop="number">
|
||||
<el-input
|
||||
v-model="form.number"
|
||||
placeholder="请输入证书编号"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="证书类型" prop="type">
|
||||
<el-select v-model="form.type" placeholder="选择证书类型">
|
||||
<el-option
|
||||
v-for="item in typeoptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="发证日期">
|
||||
<el-date-picker
|
||||
v-model="form.issue_date"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择发证日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="有效期">
|
||||
<el-date-picker
|
||||
v-model="form.expiration_date"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择有效期"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="下一次复审日期">
|
||||
<el-date-picker
|
||||
v-model="form.review_date"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
placeholder="选择下一次复审日期"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24">
|
||||
<el-form-item label="选择相关方人员">
|
||||
<el-select
|
||||
v-model="form.remployee"
|
||||
placeholder="选择相关方人员"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in remployeeoptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="上传证书文件">
|
||||
<sc-upload-file
|
||||
v-model="form.file"
|
||||
:limit="5"
|
||||
:data="{ otherData: 'demo' }"
|
||||
tip="最多上传3个文件,单个文件不要超过10M,请上传xlsx/docx格式文件"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-upload"
|
||||
>上传附件</el-button
|
||||
>
|
||||
</sc-upload-file>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="dialogcart = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitcert">确 定</el-button>
|
||||
</template>
|
||||
</sc-dialog>
|
||||
</template>
|
||||
<script>
|
||||
const defaultform=
|
||||
{ id: "",
|
||||
name: "",
|
||||
number: "",
|
||||
employee: ""
|
||||
};
|
||||
export default {
|
||||
name: "certificate",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
form:defaultform,
|
||||
typeoptions: [
|
||||
{ id: 10, name: "特种作业证书" },
|
||||
{ id: 20, name: "特种设备操作证书" },
|
||||
{ id: 30, name: "安全管理人员证书" },
|
||||
],
|
||||
type_: {
|
||||
10: "特种作业证书",
|
||||
20: "特种设备操作证书",
|
||||
30: "安全管理人员证书",
|
||||
},
|
||||
dialogcart: false,
|
||||
apiObj: this.$API.rpm.rcertificate.list,
|
||||
query: {},
|
||||
selection: [],
|
||||
remployeeoptions:"",
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getUser()
|
||||
},
|
||||
methods: {
|
||||
handleForm(type, row) {
|
||||
if (type === "add") {
|
||||
this.dialogcart = true;
|
||||
this.form = Object.assign({}, defaultform);
|
||||
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
this.dialogcart = true;
|
||||
this.form = row;
|
||||
|
||||
}
|
||||
},
|
||||
async table_del(row) {
|
||||
|
||||
this.$API.rpm.rcertificate.delete
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
//相关方人员选择
|
||||
getUser() {
|
||||
this.$API.rpm.remployee.list.req({ page: 0 }).then((res) => {
|
||||
|
||||
this.remployeeoptions = res;
|
||||
});
|
||||
},
|
||||
//人员证书创建
|
||||
submitcert() {
|
||||
this.form.employee = this.$route.query.id;
|
||||
this.$refs.dialogForm.validate((valid) => {
|
||||
if (this.form.id == "") {
|
||||
this.$API.rpm.rcertificate.create
|
||||
.req(this.form)
|
||||
.then((res) => {
|
||||
this.$message.success("创建成功");
|
||||
this.dialogcart = false;
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
} else {
|
||||
this.$API.rpm.rcertificate.update
|
||||
.req(this.form.id, this.form)
|
||||
.then((res) => {
|
||||
this.$message.success("修改成功");
|
||||
this.dialogcart = false;
|
||||
return res;
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
|
||||
<!-- <el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
||||
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button> -->
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
placeholder="名称"
|
||||
clearable
|
||||
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
|
||||
stripe
|
||||
|
||||
>
|
||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="姓名" prop="name" width="180"></el-table-column>
|
||||
<el-table-column label="手机号" prop="phone" width="180"></el-table-column>
|
||||
<el-table-column label="身份证号" prop="id_number" width="180"></el-table-column>
|
||||
<el-table-column label="证件照" prop="photo" width="180" ></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="left" width="170">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
text
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="table_show(scope.row, scope.$index)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
text
|
||||
type="warning"
|
||||
size="small"
|
||||
@click="table_edit(scope.row, scope.$index)"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-popconfirm
|
||||
title="确定删除吗?"
|
||||
@confirm="table_del(scope.row, scope.$index)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
></save-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import saveDialog from "./remployee_form.vue";
|
||||
export default {
|
||||
name: "remployee",
|
||||
components: {
|
||||
saveDialog,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialog: {
|
||||
save: false,
|
||||
permission: false,
|
||||
},
|
||||
adminform:{
|
||||
username:"",
|
||||
},
|
||||
apiObj: this.$API.rpm.remployee.list,
|
||||
query: {},
|
||||
selection: [],
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//添加
|
||||
add() {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("add");
|
||||
});
|
||||
},
|
||||
//编辑
|
||||
table_edit(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
//查看
|
||||
table_show(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("show").setData(row);
|
||||
});
|
||||
},
|
||||
|
||||
//权限设置
|
||||
permission() {
|
||||
this.dialog.permission = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.permissionDialog.open();
|
||||
});
|
||||
},
|
||||
//删除
|
||||
async table_del(row) {
|
||||
|
||||
this.$API.rpm.remployee.delete
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
|
||||
//本地更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
if (mode == "add") {
|
||||
this.$refs.table.refresh();
|
||||
} else if (mode == "edit") {
|
||||
this.$refs.table.refresh();
|
||||
}
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -0,0 +1,169 @@
|
|||
<template>
|
||||
<el-drawer
|
||||
:title="titleMap[mode]"
|
||||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
:disabled="mode == 'show'"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="姓名">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
type="text"
|
||||
clearable
|
||||
:disabled="mode != 'add'"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="手机号">
|
||||
<el-input
|
||||
v-model="form.phone"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="身份证号">
|
||||
<el-input v-model="form.id_number" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="相关方">
|
||||
<el-select v-model="form.rparty" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in rpartyOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="证件照">
|
||||
|
||||
<sc-upload v-model="form.photo" :modelValue="form.photo" title="证件照"></sc-upload>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit"
|
||||
>保存</el-button
|
||||
>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {genTree} from "@/utils/verificate";
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
add: "新增",
|
||||
edit: "编辑",
|
||||
show: "查看",
|
||||
},
|
||||
form: {},
|
||||
rules: {},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
rpartyOptions: []
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getRpartyOptions();
|
||||
},
|
||||
methods: {
|
||||
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
//相关方
|
||||
getRpartyOptions() {
|
||||
this.$API.rpm.rparty.list.req({page:0}).then(res=>{
|
||||
this.rpartyOptions = res;
|
||||
})
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
try {
|
||||
var res;
|
||||
if (this.mode == "add") {
|
||||
res = await this.$API.rpm.remployee.create.req(this.form);
|
||||
} else if (this.mode == "edit") {
|
||||
res = await this.$API.rpm.remployee.update.req(
|
||||
this.form.id,
|
||||
this.form
|
||||
);
|
||||
}
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
return res;
|
||||
} catch (err) {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
// this.loading = true
|
||||
// const params = {
|
||||
// id: data.id
|
||||
// }
|
||||
// setTimeout(async ()=>{
|
||||
// var res = await this.$API.system.table.info.get(params)
|
||||
// this.loading = false
|
||||
// this.form = res.data
|
||||
// },400)
|
||||
Object.assign(this.form, data);
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
|
@ -1,166 +1,227 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
|
||||
<!-- <el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
|
||||
<!-- <el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
||||
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button> -->
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input v-model="search.keyword" placeholder="名称" clearable @click="upsearch"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="upsearch"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" stripe @resetQuery="resetQuery" >
|
||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="名称" prop="name" width="200"></el-table-column>
|
||||
<el-table-column label="信用代码" prop="photo" width="180">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="联系人" prop="contacter" width="100"></el-table-column>
|
||||
<el-table-column label="联系电话" prop="phone" width="120"></el-table-column>
|
||||
<el-table-column label="企业地址" prop="address" width="180"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="right" width="170">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button text type="primary" size="small" @click="table_show(scope.row, scope.$index)">查看</el-button>
|
||||
<el-button text type="warning" size="small" @click="table_edit(scope.row, scope.$index)">编辑</el-button>
|
||||
<!-- <el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm> -->
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" @closed="dialog.save=false"></save-dialog>
|
||||
</template>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
placeholder="名称"
|
||||
clearable
|
||||
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
|
||||
stripe
|
||||
|
||||
>
|
||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="名称" prop="name" width="180"></el-table-column>
|
||||
<el-table-column label="信用代码" prop="number" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="联系人"
|
||||
prop="contacter"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="联系电话"
|
||||
prop="phone"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="企业地址"
|
||||
prop="address"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="账号"
|
||||
prop="admin_username"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column label="操作" fixed="right" align="left" width="170">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
v-if="scope.row.admin!=null"
|
||||
text
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="table_admin(scope.row)"
|
||||
>分配账号</el-button>
|
||||
<el-button
|
||||
text
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="table_show(scope.row, scope.$index)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
text
|
||||
type="warning"
|
||||
size="small"
|
||||
@click="table_edit(scope.row, scope.$index)"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-popconfirm
|
||||
title="确定删除吗?"
|
||||
@confirm="table_del(scope.row, scope.$index)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<sc-dialog v-model="adminvisible" title="分配相关方账号" @closed="$emit('closed')">
|
||||
<el-form ref="ruleForm" :model="adminform" :rules="rules" label-width="100px">
|
||||
<el-form-item label="账户名称" prop="username">
|
||||
<el-input v-model="adminform.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="adminvisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitAdmin">确 定</el-button>
|
||||
</template>
|
||||
</sc-dialog>
|
||||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
></save-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import saveDialog from './rparty_form.vue'
|
||||
export default {
|
||||
name: 'rparty',
|
||||
components: {
|
||||
saveDialog
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialog: {
|
||||
save: false,
|
||||
permission: false
|
||||
import saveDialog from "./rparty_form.vue";
|
||||
export default {
|
||||
name: "rparty",
|
||||
components: {
|
||||
saveDialog,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialog: {
|
||||
save: false,
|
||||
permission: false,
|
||||
},
|
||||
adminform:{
|
||||
username:"",
|
||||
},
|
||||
apiObj: this.$API.rpm.rparty.list,
|
||||
query: {},
|
||||
selection: [],
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
rpartyID:"",
|
||||
adminvisible:false,
|
||||
|
||||
//验证规则
|
||||
rules: {
|
||||
phone: [
|
||||
{required: true, message: '请输入账户名称'}
|
||||
],
|
||||
|
||||
},
|
||||
apiObj: this.$API.rpm.rparty.list,
|
||||
query: {},
|
||||
selection: [],
|
||||
search: {
|
||||
keyword: null
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//添加
|
||||
add(){
|
||||
this.dialog.save = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open('add')
|
||||
})
|
||||
},
|
||||
//编辑
|
||||
table_edit(row){
|
||||
this.dialog.save = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open('edit').setData(row)
|
||||
})
|
||||
},
|
||||
//查看
|
||||
table_show(row){
|
||||
this.dialog.save = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open('show').setData(row)
|
||||
})
|
||||
},
|
||||
//权限设置
|
||||
permission(){
|
||||
this.dialog.permission = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.permissionDialog.open()
|
||||
})
|
||||
},
|
||||
//删除
|
||||
async table_del(row){
|
||||
var reqData = {id: row.id}
|
||||
var res = await this.$API.demo.post.post(reqData);
|
||||
if(res.code == 200){
|
||||
this.$refs.table.refresh()
|
||||
this.$message.success("删除成功")
|
||||
}else{
|
||||
this.$alert(res.message, "提示", {type: 'error'})
|
||||
}
|
||||
},
|
||||
//批量删除
|
||||
async batch_del(){
|
||||
this.$confirm(`确定删除选中的 ${this.selection.length} 项吗?如果删除项中含有子集将会被一并删除`, '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const loading = this.$loading();
|
||||
this.$refs.table.refresh()
|
||||
loading.close();
|
||||
this.$message.success("操作成功")
|
||||
}).catch(() => {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//添加
|
||||
add() {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("add");
|
||||
});
|
||||
},
|
||||
//编辑
|
||||
table_edit(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
//查看
|
||||
table_show(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("show").setData(row);
|
||||
});
|
||||
},
|
||||
//分配账号
|
||||
table_admin(row)
|
||||
{
|
||||
this.adminvisible=true;
|
||||
this.rpartyID=row.id;
|
||||
|
||||
})
|
||||
},
|
||||
//表格选择后回调事件
|
||||
selectionChange(selection){
|
||||
this.selection = selection;
|
||||
},
|
||||
//表格内开关
|
||||
changeSwitch(val, row){
|
||||
row.status = row.status == '1'?'0':'1'
|
||||
row.$switch_status = true;
|
||||
setTimeout(()=>{
|
||||
delete row.$switch_status;
|
||||
row.status = val;
|
||||
this.$message.success("操作成功")
|
||||
}, 500)
|
||||
},
|
||||
//搜索
|
||||
upsearch(){
|
||||
},
|
||||
//提交分配账号FROM
|
||||
submitAdmin(){
|
||||
this.$API.rpm.rparty.admin.req(
|
||||
this.rpartyID,
|
||||
this.adminform
|
||||
).then((res) => {
|
||||
this.$message.success("账号分配成功");
|
||||
this.adminvisible = false;
|
||||
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});;
|
||||
},
|
||||
//权限设置
|
||||
permission() {
|
||||
this.dialog.permission = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.permissionDialog.open();
|
||||
});
|
||||
},
|
||||
//删除
|
||||
async table_del(row) {
|
||||
|
||||
this.$API.rpm.rparty.delete
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
|
||||
},
|
||||
//根据ID获取树结构
|
||||
filterTree(id){
|
||||
var target = null;
|
||||
function filter(tree){
|
||||
tree.forEach(item => {
|
||||
if(item.id == id){
|
||||
target = item
|
||||
}
|
||||
if(item.children){
|
||||
filter(item.children)
|
||||
}
|
||||
})
|
||||
}
|
||||
filter(this.$refs.table.tableData)
|
||||
return target
|
||||
},
|
||||
//本地更新数据
|
||||
handleSaveSuccess(data, mode){
|
||||
if(mode=='add'){
|
||||
this.$refs.table.refresh()
|
||||
}else if(mode=='edit'){
|
||||
this.$refs.table.refresh()
|
||||
}
|
||||
},
|
||||
resetQuery(){
|
||||
this.query = {}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
|
||||
//本地更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
if (mode == "add") {
|
||||
this.$refs.table.refresh();
|
||||
} else if (mode == "edit") {
|
||||
this.$refs.table.refresh();
|
||||
}
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -61,14 +61,19 @@
|
|||
</el-col>
|
||||
<el-col :md="24" :sm="24" :xs="24">
|
||||
<el-form-item label="归属部门">
|
||||
<el-select v-model="form.belong_dept">
|
||||
<el-option
|
||||
v-for="item in belong_dept_options"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-cascader
|
||||
v-model="form.belong_dept"
|
||||
:options="belong_dept_options"
|
||||
:props="{
|
||||
expandTrigger: 'hover', // 次级菜单的展开方式
|
||||
label: 'label', //
|
||||
value: 'value', //
|
||||
emitPath: false, // 在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组,若设置 false,则只返回该节点的值
|
||||
}"
|
||||
clearable
|
||||
style="width: 100%;">
|
||||
</el-cascader>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="24" :xs="24">
|
||||
|
|
@ -99,6 +104,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {genTree} from "@/utils/verificate";
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
|
|
@ -125,7 +131,7 @@ export default {
|
|||
methods: {
|
||||
getDeptOptions() {
|
||||
this.$API.system.dept.list.req({page:0}).then(res=>{
|
||||
this.belong_dept_options = res
|
||||
this.belong_dept_options = genTree(res);
|
||||
})
|
||||
},
|
||||
//显示
|
||||
|
|
|
|||
|
|
@ -0,0 +1,228 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
|
||||
<!-- <el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
||||
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button> -->
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
placeholder="名称"
|
||||
clearable
|
||||
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
|
||||
stripe
|
||||
@resetQuery="resetQuery"
|
||||
>
|
||||
<el-table-column label="#" type="index" fixed="left" width="50"></el-table-column>
|
||||
<el-table-column label="名称" prop="name" fixed="left" width="180"></el-table-column>
|
||||
<el-table-column label="项目类型" prop="type" width="180"
|
||||
><template #default="scope"
|
||||
>{{ type_[scope.row.type] }}
|
||||
</template></el-table-column
|
||||
>
|
||||
<el-table-column
|
||||
label="合同编号"
|
||||
prop="contract_number"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="进场时间"
|
||||
prop="come_time"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="离场时间"
|
||||
prop="leave_time"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column label="状态" prop="state" width="180"
|
||||
><template #default="scope"
|
||||
>{{ state_[scope.row.state] }}
|
||||
</template></el-table-column
|
||||
>
|
||||
<el-table-column
|
||||
label="所属部门"
|
||||
prop="belong_dept_name"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="相关方"
|
||||
prop="rparty_name"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="创建人"
|
||||
prop="create_by"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="create_time"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="left" width="170">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
text
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="next_add(scope.row, scope.$index)"
|
||||
>继续编辑</el-button>
|
||||
|
||||
<el-button
|
||||
text
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="table_show(scope.row, scope.$index)"
|
||||
>查看</el-button>
|
||||
<el-button
|
||||
text
|
||||
type="warning"
|
||||
size="small"
|
||||
@click="table_edit(scope.row, scope.$index)"
|
||||
>编辑</el-button>
|
||||
<el-popconfirm
|
||||
title="确定删除吗?"
|
||||
@confirm="table_del(scope.row, scope.$index)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
></save-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import saveDialog from "./rpj_form.vue";
|
||||
export default {
|
||||
name: "remployee",
|
||||
components: {
|
||||
saveDialog,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialog: {
|
||||
save: false,
|
||||
permission: false,
|
||||
},
|
||||
adminform: {
|
||||
username: "",
|
||||
},
|
||||
apiObj: this.$API.rpm.rpj.list,
|
||||
query: {},
|
||||
selection: [],
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
type_: {
|
||||
10: "建筑施工",
|
||||
20: "设备设施检维修",
|
||||
30: "保安保洁服务",
|
||||
40: "其他",
|
||||
},
|
||||
state_: {
|
||||
10: "创建中",
|
||||
20: "审批中",
|
||||
30: "待入厂",
|
||||
40: "进行中",
|
||||
40: "已完成",
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
//添加
|
||||
add() {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("add");
|
||||
});
|
||||
},
|
||||
//编辑
|
||||
table_edit(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
//查看
|
||||
table_show(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("show").setData(row);
|
||||
});
|
||||
},
|
||||
|
||||
//权限设置
|
||||
permission() {
|
||||
this.dialog.permission = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.permissionDialog.open();
|
||||
});
|
||||
},
|
||||
//删除
|
||||
async table_del(row) {
|
||||
this.$API.rpm.rpj.delete
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
next_add(row)
|
||||
{
|
||||
this.$router.push({
|
||||
name: "rpjadd",
|
||||
query: {
|
||||
rpjid: row.id, //入场项目id
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
//本地更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
if (mode == "add") {
|
||||
this.$refs.table.refresh();
|
||||
} else if (mode == "edit") {
|
||||
this.$refs.table.refresh();
|
||||
}
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -0,0 +1,216 @@
|
|||
<template>
|
||||
<el-drawer
|
||||
:title="titleMap[mode]"
|
||||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
:disabled="mode == 'show'"
|
||||
label-width="80px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="名称">
|
||||
<el-input
|
||||
v-model="form.name"
|
||||
type="text"
|
||||
clearable
|
||||
:disabled="mode != 'add'"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="项目类型">
|
||||
<el-select v-model="form.type" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in typeOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="合同编号">
|
||||
<el-input
|
||||
v-model="form.contract_number"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="进场时间">
|
||||
|
||||
<el-date-picker
|
||||
v-model="form.come_time"
|
||||
type="datetime"
|
||||
placeholder="选择结束时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="离场时间">
|
||||
|
||||
<el-date-picker
|
||||
v-model="form.leave_time"
|
||||
type="datetime"
|
||||
placeholder="选择结束时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="所属部门">
|
||||
|
||||
<el-cascader
|
||||
v-model="form.belong_dept"
|
||||
:options="deptoptions"
|
||||
:props="{
|
||||
expandTrigger: 'hover', // 次级菜单的展开方式
|
||||
label: 'label', //
|
||||
value: 'value', //
|
||||
emitPath: false, // 在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组,若设置 false,则只返回该节点的值
|
||||
}"
|
||||
clearable
|
||||
style="width: 100%;">
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="相关方">
|
||||
<el-select v-model="form.rparty" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in rpartyOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit"
|
||||
>保存</el-button
|
||||
>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { genTree } from "@/utils/verificate";
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
add: "新增",
|
||||
edit: "编辑",
|
||||
show: "查看",
|
||||
},
|
||||
form: {},
|
||||
rules: {},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
rpartyOptions: [],
|
||||
deptoptions:[],
|
||||
typeOptions: [
|
||||
{ id: 10, name: "建筑施工" },
|
||||
{ id: 20, name: "设备设施检维修" },
|
||||
{ id: 30, name: "保安保洁服务" },
|
||||
{ id: 40, name: "其他" },
|
||||
],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getRpartyOptions();
|
||||
this.getDept();
|
||||
},
|
||||
methods: {
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
//所属部门
|
||||
getDept() {
|
||||
this.$API.system.dept.list.req({ page: 0 }).then((res) => {
|
||||
this.deptoptions = genTree(res);
|
||||
});
|
||||
},
|
||||
|
||||
//相关方
|
||||
getRpartyOptions() {
|
||||
this.$API.rpm.rparty.list.req({ page: 0 }).then((res) => {
|
||||
this.rpartyOptions = res;
|
||||
});
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
try {
|
||||
var res;
|
||||
if (this.mode == "add") {
|
||||
res = await this.$API.rpm.rpj.create.req(this.form);
|
||||
} else if (this.mode == "edit") {
|
||||
res = await this.$API.rpm.rpj.update.req(this.form.id, this.form);
|
||||
}
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
return res;
|
||||
} catch (err) {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
// this.loading = true
|
||||
// const params = {
|
||||
// id: data.id
|
||||
// }
|
||||
// setTimeout(async ()=>{
|
||||
// var res = await this.$API.system.table.info.get(params)
|
||||
// this.loading = false
|
||||
// this.form = res.data
|
||||
// },400)
|
||||
Object.assign(this.form, data);
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
|
@ -0,0 +1,570 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-steps
|
||||
:active="active"
|
||||
style="width: 100%"
|
||||
:align-center="true"
|
||||
finish-status="success"
|
||||
>
|
||||
<el-step
|
||||
v-for="(item, index) of stepTitle"
|
||||
:key="index"
|
||||
:title="item"
|
||||
style="50%"
|
||||
@click="handleStep(index)"
|
||||
>
|
||||
</el-step>
|
||||
</el-steps>
|
||||
</el-header>
|
||||
<!--基本信息!-->
|
||||
<el-main class="nopadding" v-show="active === 0">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="rpjform"
|
||||
label-width="110px"
|
||||
style="margin: 40px 40px 40px 40px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="名称">
|
||||
<el-input v-model="rpjform.name" type="text" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="项目类型">
|
||||
<el-select v-model="rpjform.type" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in typeOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="合同编号">
|
||||
<el-input
|
||||
v-model="rpjform.contract_number"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="进场时间">
|
||||
<el-date-picker
|
||||
v-model="rpjform.come_time"
|
||||
type="datetime"
|
||||
placeholder="选择结束时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="离场时间">
|
||||
<el-date-picker
|
||||
v-model="rpjform.leave_time"
|
||||
type="datetime"
|
||||
placeholder="选择结束时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="所属部门">
|
||||
<el-cascader
|
||||
v-model="rpjform.belong_dept"
|
||||
:options="deptoptions"
|
||||
:props="{
|
||||
expandTrigger: 'hover', // 次级菜单的展开方式
|
||||
label: 'label', //
|
||||
value: 'value', //
|
||||
emitPath: false, // 在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组,若设置 false,则只返回该节点的值
|
||||
}"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="相关方">
|
||||
<el-select v-model="rpjform.rparty" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in rpartyOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</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-main>
|
||||
|
||||
<!--安全审核项目!-->
|
||||
<el-main class="nopadding" v-show="active === 1">
|
||||
<scTable
|
||||
ref="fileTable"
|
||||
:data="rpjfileList"
|
||||
row-key="id"
|
||||
hidePagination
|
||||
stripe
|
||||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
fixed="left"
|
||||
type="index"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column label="资质内容" prop="name">
|
||||
<template #default="scope">
|
||||
{{ scope.row.file_cate_.name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="文件资料" prop="name">
|
||||
<template #default="scope">
|
||||
<div v-for="(item, index) in scope.row.files_" :key="index">
|
||||
<el-link :href="item.file">
|
||||
{{ item.name }}
|
||||
</el-link>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" fixed="right" align="center" width="200">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
text
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="upload(scope.row, scope.$index)"
|
||||
>上传</el-button
|
||||
>
|
||||
<el-popconfirm
|
||||
title="确定删除吗?"
|
||||
@confirm="del_rpjfile(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
<el-button style="margin-top: 12px" @click="handleLastStep"
|
||||
>上一步</el-button
|
||||
>
|
||||
<el-button style="margin-top: 12px" @click="handleNextStep"
|
||||
>下一步</el-button
|
||||
>
|
||||
<sc-dialog v-model="dialogupload" draggable title="上传文件">
|
||||
<el-form ref="dialogfileForm" :model="fileform" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="上传文件">
|
||||
<sc-upload-file
|
||||
v-model="fileform.files"
|
||||
:on-success="success"
|
||||
:multiple="true"
|
||||
:limit="10"
|
||||
tip="最多上传10个文件,单个文件不要超过10M,请上传xlsx/docx格式文件"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-upload"
|
||||
>上传附件</el-button
|
||||
>
|
||||
</sc-upload-file>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="dialogupload = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitFile">确 定</el-button>
|
||||
</template>
|
||||
</sc-dialog>
|
||||
</el-main>
|
||||
<!--选择人员!-->
|
||||
<el-main class="nopadding" v-show="active === 2">
|
||||
<div class="left-panel" style="margin: 10px">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="addworker"
|
||||
></el-button>
|
||||
</div>
|
||||
<scTable
|
||||
ref="workerTable"
|
||||
:data="apiworkerObj"
|
||||
row-key="id"
|
||||
hidePagination
|
||||
stripe
|
||||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
fixed="left"
|
||||
type="index"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column label="姓名" prop="name" width="150">
|
||||
<template #default="scope">
|
||||
{{ scope.row.remployee_.name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作职责" prop="duty" width="150">
|
||||
</el-table-column>
|
||||
<el-table-column label="证书" prop="rcertificates" width="150">
|
||||
<template #default="scope">
|
||||
<el-tag
|
||||
v-for="item in scope.row.rcertificates_"
|
||||
:key="item.number"
|
||||
:label="item.name"
|
||||
:value="item.number"
|
||||
>{{ item.name }}</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否项目负责人" prop="is_manager" width="150">
|
||||
</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">
|
||||
<template #default="scope">
|
||||
<el-popconfirm
|
||||
title="确定删除该人员吗?"
|
||||
@confirm="delWorker(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button text type="danger" size="small">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
<sc-dialog v-model="workerdialog" draggable title="选择项目人员">
|
||||
<el-form
|
||||
ref="workerForm"
|
||||
:model="formworker"
|
||||
label-width="80px"
|
||||
width="70%"
|
||||
style="margin: 40px 40px 40px 40px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="项目人员">
|
||||
<el-select
|
||||
v-model="formworker.remployee"
|
||||
@change="selectWorker"
|
||||
placeholder="选择项目人员"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in remployeeoptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="是否项目负责人">
|
||||
<el-radio-group v-model="formworker.is_manager">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="工作职责">
|
||||
<el-input
|
||||
v-model="formworker.duty"
|
||||
type="text"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="24" :sm="12" :xs="24">
|
||||
<el-form-item label="证书">
|
||||
<el-select
|
||||
v-model="formworker.rcertificates"
|
||||
multiple
|
||||
placeholder="选择证书"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in certificatesOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="workerdialog = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitWorker">确 定</el-button>
|
||||
</template>
|
||||
</sc-dialog>
|
||||
<el-button style="margin-top: 12px" @click="handleLastStep"
|
||||
>上一步</el-button
|
||||
>
|
||||
<el-button style="margin-top: 12px" @click="submitOut">退出</el-button>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<style scoped>
|
||||
.clearfix {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.box-card p {
|
||||
line-height: 20px;
|
||||
}
|
||||
.content {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.stepSuc:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
.stepErr:hover {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import { genTree } from "@/utils/verificate";
|
||||
|
||||
const defaultformworker = {
|
||||
|
||||
duty: "",
|
||||
rcertificates: [],
|
||||
rpj: "",
|
||||
};
|
||||
export default {
|
||||
name: "rpjadd",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
stepSuc: [0],
|
||||
stepTitle: ["基本信息", "安全审核项目", "选择人员"],
|
||||
query: {},
|
||||
selection: [],
|
||||
issave: false, //控制基本信息提交
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
|
||||
rpjId: "",
|
||||
rpjform: {},
|
||||
rpartyOptions: [],
|
||||
deptoptions: [],
|
||||
typeOptions: [
|
||||
{ id: 10, name: "建筑施工" },
|
||||
{ id: 20, name: "设备设施检维修" },
|
||||
{ id: 30, name: "保安保洁服务" },
|
||||
{ id: 40, name: "其他" },
|
||||
],
|
||||
rpjfileList: [],
|
||||
dialogupload: false,
|
||||
fileform: {
|
||||
id: "",
|
||||
files: [],
|
||||
},
|
||||
filelist: [],
|
||||
|
||||
remployeeoptions: [],
|
||||
certificatesOptions: [],
|
||||
formworker: defaultformworker,
|
||||
apiworkerObj: [],
|
||||
workerdialog: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.rpjId = this.$route.query.rpjid; //作业ID
|
||||
this.getRpj();
|
||||
this.getRpartyOptions();
|
||||
this.getDept();
|
||||
},
|
||||
methods: {
|
||||
//入场项目基本信息
|
||||
getRpj() {
|
||||
console.log(this.$route.query.rpjid);
|
||||
this.$API.rpm.rpj.read.req(this.rpjId).then((res) => {
|
||||
this.rpjform = res;
|
||||
});
|
||||
},
|
||||
//所属部门
|
||||
getDept() {
|
||||
this.$API.system.dept.list.req({ page: 0 }).then((res) => {
|
||||
this.deptoptions = genTree(res);
|
||||
});
|
||||
},
|
||||
//文件列表加载
|
||||
getRpjfileList(id) {
|
||||
this.$API.rpm.rpjfile.list.req({ page: 0, rpj: id }).then((res) => {
|
||||
this.rpjfileList = res;
|
||||
});
|
||||
},
|
||||
//相关方
|
||||
getRpartyOptions() {
|
||||
this.$API.rpm.rparty.list.req({ page: 0 }).then((res) => {
|
||||
this.rpartyOptions = res;
|
||||
});
|
||||
},
|
||||
handleStep(val) {
|
||||
//点击步骤条
|
||||
if (this.stepSuc.includes(val) === true) {
|
||||
this.active = val;
|
||||
}
|
||||
},
|
||||
//组件点击上一步
|
||||
handleLastStep() {
|
||||
if (--this.active === 0) {
|
||||
this.active = 0;
|
||||
}
|
||||
},
|
||||
//组件点击下一步
|
||||
handleNextStep() {
|
||||
if (this.active == 0) {
|
||||
this.$API.rpm.rpj.update
|
||||
.req(this.rpjId, this.rpjform)
|
||||
.then((res) => {
|
||||
this.$message.success("基本信息更新成功!");
|
||||
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
this.getRpjfileList(this.rpjId);
|
||||
this.getmemberList(this.rpjId);
|
||||
this.getremployee();
|
||||
this.active = 1;
|
||||
} else if (this.active == 1) {
|
||||
this.active = 2;
|
||||
} else {
|
||||
this.active = 2;
|
||||
}
|
||||
// this.stepSuc.push(++this.active)
|
||||
},
|
||||
//退出界面
|
||||
submitOut() {
|
||||
this.$router.push({
|
||||
name: "rpj",
|
||||
query: {},
|
||||
});
|
||||
},
|
||||
//删除文件项
|
||||
del_rpjfile(row) {
|
||||
this.$API.rpm.rpjfile.delete
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("删除成功!");
|
||||
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
//上传文件
|
||||
upload(row) {
|
||||
this.dialogupload = true;
|
||||
this.fileform.id = row.id;
|
||||
},
|
||||
|
||||
success(res) {
|
||||
this.filelist.push(res.id);
|
||||
},
|
||||
|
||||
//提交上传
|
||||
submitFile() {
|
||||
this.fileform.files = this.filelist;
|
||||
this.$API.rpm.rpjfile.update
|
||||
.req(this.fileform.id, this.fileform)
|
||||
.then((res) => {
|
||||
this.$message.success("提交成功!");
|
||||
this.dialogupload = false;
|
||||
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
//调出项目人员列表
|
||||
getremployee() {
|
||||
this.$API.rpm.remployee.list.req({ page: 0 }).then((res) => {
|
||||
this.remployeeoptions = res;
|
||||
});
|
||||
},
|
||||
|
||||
//选择人员后,调出该人员的所有证书
|
||||
selectWorker() {
|
||||
this.$API.rpm.rcertificate.list
|
||||
.req({ remployee: this.formworker.remployee, page: 0 })
|
||||
.then((res) => {
|
||||
this.certificatesOptions = res;
|
||||
});
|
||||
},
|
||||
//作业人员列表
|
||||
|
||||
getmemberList(id) {
|
||||
this.$API.rpm.member.list.req({ rpj: id, page: 0 }).then((res) => {
|
||||
this.apiworkerObj = res;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
//创建作业人员,显示Form
|
||||
addworker() {
|
||||
this.workerdialog = true;
|
||||
|
||||
this.formworker = Object.assign({}, defaultformworker);
|
||||
},
|
||||
|
||||
//删除作业人员
|
||||
delWorker(row) {
|
||||
this.$API.opm.worker.delete
|
||||
.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("作业人员删除成功");
|
||||
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
//提交作业人员信息
|
||||
submitWorker() {
|
||||
this.formworker.rpj = this.rpjId;
|
||||
this.$refs.workerForm.validate(async (valid) => {
|
||||
this.$API.rpm.member.create.req(this.formworker).then((res) => {
|
||||
this.$message.success("创建项目人员成功");
|
||||
this.workerdialog = false;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Loading…
Reference in New Issue