opl页面调整

This commit is contained in:
caoqianming 2022-10-11 18:02:33 +08:00
parent dc7b9e2f91
commit 553e29de5c
11 changed files with 5550 additions and 5025 deletions

View File

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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