This commit is contained in:
曹前明 2022-07-18 14:46:49 +08:00
commit a5dac1fff9
7 changed files with 873 additions and 894 deletions

View File

@ -31,7 +31,7 @@
<el-col :md="12" :sm="12" :xs="24">
<el-form-item label="关联作业">
<el-input
v-model="operationId"
v-model="form.name"
type="text"
:disabled="true"
></el-input>
@ -118,59 +118,6 @@
</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">
@ -178,7 +125,8 @@
v-for="(item, index) in risklist"
:key="index"
:label="item.id"
>{{ item.name }}</el-checkbox
>{{ item.name }}
</el-checkbox
>
</el-checkbox-group>
</el-form-item>
@ -192,14 +140,6 @@
></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">
@ -207,12 +147,12 @@
v-for="(item, index) in measurelist"
:key="index"
:label="item.id"
>{{ item.name }}</el-checkbox
>{{ 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">
@ -234,21 +174,13 @@
></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-button style="margin-top: 12px" type="primary" plain @click="handleNextStep"
>下一步
</el-button>
</el-form-item>
</el-col>
</el-row>
@ -270,6 +202,8 @@
row-key="id"
hidePagination
stripe
hideDo
style="height: calc(100% - 60px);"
>
<el-table-column
label="#"
@ -285,11 +219,12 @@
<el-table-column label="工作职责" prop="duty" width="150">
</el-table-column>
<el-table-column label="证书" prop="certificates" width="150">
<template #default="scope" >
<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>
:value="item.number">{{item.name}}
</el-tag>
</template>
</el-table-column>
<el-table-column
@ -380,12 +315,11 @@
</template>
</sc-dialog>
<el-button style="margin-top: 12px" @click="handleLastStep"
>上一步</el-button
>
<el-button style="margin-top: 12px" @click="handleNextStep"
>下一步</el-button
>
>上一步
</el-button>
<el-button style="margin-top: 12px" type="primary" plain @click="handleNextStep"
>下一步
</el-button>
</el-main>
<!--气体检测记录!-->
<el-main class="nopadding" v-show="active === 2">
@ -430,16 +364,20 @@
label="检验结论"
prop="is_ok"
width="150"
> <template #default="scope">
>
<template #default="scope">
{{ is_ok_[scope.row.is_ok] }}
</template></el-table-column>
</template>
</el-table-column>
<el-table-column
label="检测人"
prop="checker"
width="150"
> <template #default="scope">
>
<template #default="scope">
{{ scope.row.checker_.name }}
</template></el-table-column>
</template>
</el-table-column>
<el-table-column
label="创建时间"
prop="create_time"
@ -458,8 +396,6 @@
</el-popconfirm>
</template>
</el-table-column>
</scTable>
<sc-dialog v-model="gasdialog" draggable title="气体检测记录">
<el-form
@ -517,8 +453,8 @@
<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 l :label="true">正常</el-radio>
<el-radio :label="false">不正常</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
@ -544,51 +480,59 @@
<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-button @click="handleLastStep">上一步</el-button>
<el-button
v-for=" item in initForm.transitions"
:key="item.id"
type="primary"
@click="submitTicketCreate(item.id)"
>{{item.name}}
</el-button>
<el-button @click="submitOut">退出</el-button>
</el-main>
</el-container>
</template>
<style scoped>
.clearfix {
.clearfix {
font-size: 20px;
}
}
.box-card p {
.box-card p {
line-height: 20px;
}
.content {
}
.content {
margin-top: 10px;
}
.stepSuc:hover {
}
.stepSuc:hover {
cursor: pointer;
}
.stepErr:hover {
}
.stepErr:hover {
cursor: not-allowed;
}
}
</style>
<script>
import { genTree } from "@/utils/verificate";
const defaultformworker = {
<script>
import {genTree} from "@/utils/verificate";
const defaultformworker = {
id: "",
worker: null,
duty: null,
certificates: [],
opl: "",
};
const defaultformgas = {
};
const defaultformgas = {
id: "",
check_time: null,
opl:""
};
export default {
opl: ""
};
export default {
name: "fire",
components: {},
data() {
return {
active: 0,
stepSuc: [0],
stepTitle: ["基本信息", "作业人员", "气体检测记录"],
@ -606,27 +550,27 @@ export default {
cate: "",
risks_checked: [],
},
initForm: {},
operationId: "",
oplcateId: "",
oplcateCode: "",
oplId: "",
leveloptions: [
{ id: 10, name: "特殊动火" },
{ id: 20, name: "一级动火" },
{ id: 30, name: "二级动火" },
{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: "电工" },
{value: 10, label: "作业人员"},
{value: 20, label: "起重司机"},
{value: 30, label: "司索人员"},
{value: 40, label: "起重指挥"},
{value: 40, label: "电工"},
],
certificatesOptions: [],
formworker: defaultformworker,
@ -646,13 +590,11 @@ export default {
this.oplcateId = this.$route.query.oplcateId; //ID
this.oplId = this.$route.query.oplId; //ID
this.getoplData();
this.getInit();
this.getDept();
this.getUser();
},
methods: {
getoplData() {
if (this.oplId == "") {
this.getOperation();
@ -678,30 +620,32 @@ export default {
this.$API.opm.operation.read.req(this.operationId).then((res) => {
this.form.start_time = res.start_time; //
this.form.end_time = res.end_time; //
this.form.name = res.name; //
console.log(res);
});
},
//
getDept() {
this.$API.system.dept.list.req({ page: 0 }).then((res) => {
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.$API.system.user.list.req({page: 0}).then((res) => {
this.useroptions = res;
});
},
//
//ID
//ID===>
getOplcates() {
this.$API.opm.oplcate.read.req(this.oplcateId).then((res) => {
console.log(res); //
this.pagtitle = res.name;
this.oplcateCode = res.code;
this.risklist = res.risk_options_; //
this.measurelist = res.measure_options_; //
});
@ -768,7 +712,7 @@ export default {
//
selectWorker() {
this.$API.hrm.certificate.list
.req({ employee__user: this.formworker.worker, page: 0 })
.req({employee__user: this.formworker.worker, page: 0})
.then((res) => {
this.certificatesOptions = res;
console.log(res);
@ -777,7 +721,7 @@ export default {
//
getworkerList(id) {
this.$API.opm.worker.list.req({ opl: id, page: 0 }).then((res) => {
this.$API.opm.worker.list.req({opl: id, page: 0}).then((res) => {
this.apiworkerObj = res;
console.log(res);
});
@ -813,22 +757,21 @@ export default {
this.$message.success("创建作业人员成功");
this.$refs.workerTable.refresh();
this.workerdialog = false;
})
.catch((err) => {
return err;
});
});
},
//
//
getgasList(id) {
this.$API.opm.gas.list.req({ opl: id, page: 0 }).then((res) => {
this.$API.opm.gas.list.req({opl: id, page: 0}).then((res) => {
this.apigasObj = res;
console.log(res);
});
},
//Form
addgas() {
this.gasdialog = true;
@ -854,6 +797,7 @@ export default {
});
},
//
delgas(row) {
this.$API.opm.gas.delete
@ -867,8 +811,32 @@ export default {
return err;
});
},
//
getInit() {
this.$API.wf.workflow.initkey.req('Fire').then((res) => {
this.initForm = res;
});
},
//,
submitTicketCreate(id) {
let ticket = {};
ticket.workflow = this.initForm.workflow;
ticket.ticket_data = {opl: this.oplId};
ticket.transition = id;
ticket.title = this.form.name + this.pagtitle + '申请';
this.$API.wf.ticket.create.req(ticket).then((res) => {
this.$message.success("提交成功");
this.$router.push({
name: "opl",
query: {},
});
});
},
//退
submitOut(){
submitOut() {
this.$router.push({
name: "opl",
query: {
@ -878,5 +846,5 @@ export default {
});
}
},
};
};
</script>

View File

@ -134,7 +134,7 @@ export default {
//
getWorkflow() {
this.$API.system.dept.list.req({ page: 0 }).then((res) => {
this.$API.wf.workflow.list.req({ page: 0 }).then((res) => {
this.workflowoptions = res;
});
},

View File

@ -83,19 +83,21 @@
},
handleShow(row) {
let workflowKey = row.workflow_.key;
let catetype = '';
let cateType = '',projectId='';
if(workflowKey==='visit'){
catetype = row.workflow_.key
cateType = row.workflow_.key;
projectId = row.ticket_data.visit;
}else if(workflowKey==='rparty'){
catetype = row.workflow_.key
cateType = row.workflow_.key;
projectId = row.ticket_data.rpj;
}else{}
this.$router.push({
name: "visitdetail",
query: {
id: row.id,
type: 'show',
projectId: row.ticket_data.visit,
catetype:catetype
projectId: projectId,
catetype:cateType
},
});
},

View File

@ -16,18 +16,13 @@
</el-table-column>
<el-table-column label="进行状态" min-width="100">
<template #default="scope">
<span v-if="scope.row.state_.type == 0"
>{{ scope.row.state_.name }}</span
>
<span v-else>{{ scope.row.state_.name }}</span>
<span>{{ scope.row.state_.name }}</span>
</template>
</el-table-column>
<el-table-column label="操作人" min-width="100">
<template #default="scope">
<el-span v-if="scope.row.participant_">{{
scope.row.participant_.name
}}
</el-span>
<el-span v-if="scope.row.participant_">{{scope.row.participant_.name }}</el-span>
<el-span v-if="scope.row.participant_str">{{scope.row.participant_str }}</el-span>
</template>
</el-table-column>
<el-table-column

View File

@ -9,7 +9,7 @@
></el-button>
</div>
</el-header>
<el-main class="nopadding">
<el-main class="nopadding" style="height: 100%;">
<scTable
ref="table"
:data="list"
@ -18,6 +18,7 @@
highlightCurrentRow
hidePagination
>
<el-table-column label="#" type="index"></el-table-column>
<el-table-column label="ID" prop="id"></el-table-column>
<el-table-column label="名称" prop="name"></el-table-column>
<el-table-column label="是否隐藏">

View File

@ -44,37 +44,39 @@
</el-descriptions>
</el-card>
<el-card style="margin-left: 10px; margin-bottom: 10px" v-if="cateType==='rparty'">
<el-descriptions title="来访信息" :column="3">
<el-descriptions title="入厂项目" :column="3">
<el-descriptions-item label="工单流水号:">
{{ticketDetail.sn }}
</el-descriptions-item>
<el-descriptions-item label="相关方:">
{{rpjDetail.name }}
{{rpjDetail.rparty_name}}
</el-descriptions-item>
<el-descriptions-item label="入厂项目:">
<!--{{rpjDetail.company }}-->
{{rpjDetail.name }}
</el-descriptions-item>
<el-descriptions-item label="项目类型:">
<!--<el-tag size="small">{{ rpjDetail.count_people }}</el-tag>-->
<el-tag size="small">{{rpjType_[rpjDetail.type]}}</el-tag>
</el-descriptions-item>
<el-descriptions-item label="合同编号:">
<!--<el-tag v-for="item in rpjDetail.visitors_" :key='item.id' size="small">
&lt;!&ndash;{{ item.visitor_.name }}&ndash;&gt;
</el-tag>-->
{{rpjDetail.contract_number }}
</el-descriptions-item>
<el-descriptions-item label="状态:">
<!--{{state_[rpjDetail.state] }}-->
{{state_[rpjDetail.state] }}
</el-descriptions-item>
<el-descriptions-item label="进厂时间:">
<!--{{rpjDetail.visit_time }}-->
{{rpjDetail.come_time }}
</el-descriptions-item>
<el-descriptions-item label="离厂时间:">
<!--{{rpjDetail.leave_time }}-->
{{rpjDetail.leave_time }}
</el-descriptions-item>
<el-descriptions-item label="所属部门:">
<!--{{purpose_[rpjDetail.purpose] }}-->
{{rpjDetail.belong_dept_name }}
</el-descriptions-item>
</el-descriptions>
<div style="text-align: center">
<el-link type="primary" @click="showMore"> 更多信息 </el-link>
</div>
<show-dialog v-if="rpjShow" ref="showDialog"></show-dialog>
</el-card>
<el-card style="margin-left: 10px; margin-bottom: 10px" v-if="type!=='show'">
<scTitle title="处理"></scTitle>
@ -137,13 +139,15 @@
<script>
import workDetails from "./details.vue";
import workStep from "./steps.vue";
import showDialog from "./../rpm/rpj_show.vue";
import selectUser from '@/layout/components/userselect'
export default {
components: {
workDetails,
workStep,
selectUser
selectUser,
showDialog
},
name: "visitdetail",
data() {
@ -167,6 +171,7 @@
suggestion:'',
target_user:'',
},
rpjShow:false,
limitedAdd:false,
limitedDeliver:false,
limitedUserSelect:false,
@ -176,6 +181,12 @@
30: "面试",
40: "开会"
},
rpjType_: {
10: "建筑施工",
20: "设备设施检维修",
30: "保安保洁服务",
40: "其他",
},
state_: {
10: "创建中",
20: "审批中",
@ -186,27 +197,28 @@
};
},
created(){
this.ticketId = this.$route.query.id;
this.type = this.$route.query.type;
this.cateType = this.$route.query.catetype;
},
mounted() {
this.ticketId = this.$route.query.id;
this.type = this.$route.query.type;
this.projectId = this.$route.query.projectId;
this.cateType = this.$route.query.catetype;
},
mounted() {
if(this.cateType==='visit'){
this.getVisit();
}else if(this.cateType==='rparty'){
this.getVisit();
this.getRpj();
}
this.getticketItem();
this.getBtns();
this.getRpj();
},
methods: {
showMore(){
this.rpjShow = true;
this.$nextTick(()=>{
this.$refs.showDialog.open().setData({id:this.projectId});
})
},
//
getticketItem() {
this.$API.wf.ticket.ticketItem.req(this.ticketId).then((res) => {
@ -229,7 +241,8 @@
//
getRpj(){
this.$API.rpmrpj.item.req(this.projectId).then((res) => {
this.$API.rpm.rpj.item.req(this.projectId).then((res) => {
debugger;
this.rpjDetail = res;
});
},

View File

@ -28,13 +28,13 @@
<el-table-column label="创建时间" prop="create_time" min-width="150"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="220">
<template #default="scope">
<el-button link size="small" @click="workflowShow(scope.row)">配置</el-button>
<el-button link size="small" type="primary" @click="workflowShow(scope.row)">配置</el-button>
<el-divider direction="vertical"></el-divider>
<el-button link size="small" @click="workflowEdit(scope.row)">编辑</el-button>
<el-button link size="small" type="primary" @click="workflowEdit(scope.row)">编辑</el-button>
<el-divider direction="vertical"></el-divider>
<el-popconfirm title="确定删除吗?" @confirm="workflowDel(scope.row)">
<template #reference>
<el-button link size="small">删除</el-button>
<el-button link size="small" type="danger">删除</el-button>
</template>
</el-popconfirm>
</template>