d3&workflow
This commit is contained in:
parent
cbb1920724
commit
ca5084d20a
|
@ -15,15 +15,17 @@
|
||||||
"core-js": "3.22.8",
|
"core-js": "3.22.8",
|
||||||
"cropperjs": "1.5.12",
|
"cropperjs": "1.5.12",
|
||||||
"crypto-js": "4.1.1",
|
"crypto-js": "4.1.1",
|
||||||
|
"d3": "^7.6.1",
|
||||||
|
"dagre-d3": "^0.6.4",
|
||||||
"echarts": "5.3.2",
|
"echarts": "5.3.2",
|
||||||
"element-plus": "2.2.3",
|
"element-plus": "2.2.3",
|
||||||
|
"json-editor-vue3": "^1.0.6",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
"qrcodejs2": "0.0.2",
|
"qrcodejs2": "0.0.2",
|
||||||
"sortablejs": "1.15.0",
|
"sortablejs": "1.15.0",
|
||||||
"tinymce": "6.0.3",
|
"tinymce": "6.0.3",
|
||||||
"vue": "3.2.36",
|
"vue": "3.2.36",
|
||||||
"vue-i18n": "9.1.10",
|
"vue-i18n": "9.1.10",
|
||||||
"vue-json-editor": "^1.4.3",
|
|
||||||
"vue-router": "4.0.15",
|
"vue-router": "4.0.15",
|
||||||
"vuedraggable": "4.0.3",
|
"vuedraggable": "4.0.3",
|
||||||
"vuex": "4.0.2",
|
"vuex": "4.0.2",
|
||||||
|
|
|
@ -6,7 +6,7 @@ export default {
|
||||||
oplcate: {
|
oplcate: {
|
||||||
list: {
|
list: {
|
||||||
name: "获取",
|
name: "获取",
|
||||||
req: async function(data){
|
req: async function (data) {
|
||||||
return await http.get(
|
return await http.get(
|
||||||
`${config.API_URL}/opm/opl_cate/`,
|
`${config.API_URL}/opm/opl_cate/`,
|
||||||
data
|
data
|
||||||
|
@ -15,22 +15,22 @@ export default {
|
||||||
},
|
},
|
||||||
update: {
|
update: {
|
||||||
name: "更新",
|
name: "更新",
|
||||||
req: async function(id, data){
|
req: async function (id, data) {
|
||||||
return await http.put(
|
return await http.put(
|
||||||
`${config.API_URL}/opm/opl_cate/${id}/`,
|
`${config.API_URL}/opm/opl_cate/${id}/`,
|
||||||
data);
|
data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
read:{
|
read: {
|
||||||
name: "查询",
|
name: "查询",
|
||||||
req: async function(id){
|
req: async function (id) {
|
||||||
return await http.get(
|
return await http.get(
|
||||||
`${config.API_URL}/opm/opl_cate/${id}/`);
|
`${config.API_URL}/opm/opl_cate/${id}/`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
create: {
|
create: {
|
||||||
name: "创建",
|
name: "创建",
|
||||||
req: async function(data){
|
req: async function (data) {
|
||||||
return await http.post(
|
return await http.post(
|
||||||
`${config.API_URL}/opm/opl_cate/`,
|
`${config.API_URL}/opm/opl_cate/`,
|
||||||
data);
|
data);
|
||||||
|
@ -38,79 +38,75 @@ export default {
|
||||||
},
|
},
|
||||||
delete: {
|
delete: {
|
||||||
name: "删除",
|
name: "删除",
|
||||||
req: async function(id){
|
req: async function (id) {
|
||||||
return await http.delete(
|
return await http.delete(
|
||||||
`${config.API_URL}/opm/opl_cate/${id}/`);
|
`${config.API_URL}/opm/opl_cate/${id}/`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/*作业*/
|
||||||
|
operation: {
|
||||||
|
list: {
|
||||||
/*作业*/
|
name: "获取",
|
||||||
operation: {
|
req: async function (data) {
|
||||||
list: {
|
return await http.get(
|
||||||
name: "获取",
|
`${config.API_URL}/opm/operation/`,
|
||||||
req: async function(data){
|
data
|
||||||
return await http.get(
|
);
|
||||||
`${config.API_URL}/opm/operation/`,
|
|
||||||
data
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
read:{
|
|
||||||
name: "查询",
|
|
||||||
req: async function(id){
|
|
||||||
return await http.get(
|
|
||||||
`${config.API_URL}/opm/operation/${id}/`);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
update: {
|
|
||||||
name: "更新",
|
|
||||||
req: async function(id, data){
|
|
||||||
return await http.put(
|
|
||||||
`${config.API_URL}/opm/operation/${id}/`,
|
|
||||||
data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
create: {
|
|
||||||
name: "创建",
|
|
||||||
req: async function(data){
|
|
||||||
return await http.post(
|
|
||||||
`${config.API_URL}/opm/operation/`,
|
|
||||||
data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
delete: {
|
|
||||||
name: "删除",
|
|
||||||
req: async function(id){
|
|
||||||
return await http.delete(
|
|
||||||
`${config.API_URL}/opm/operation/${id}/`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
read: {
|
||||||
|
name: "查询",
|
||||||
|
req: async function (id) {
|
||||||
|
return await http.get(
|
||||||
|
`${config.API_URL}/opm/operation/${id}/`);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
update: {
|
||||||
|
name: "更新",
|
||||||
|
req: async function (id, data) {
|
||||||
|
return await http.put(
|
||||||
|
`${config.API_URL}/opm/operation/${id}/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
create: {
|
||||||
|
name: "创建",
|
||||||
|
req: async function (data) {
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/opm/operation/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
delete: {
|
||||||
|
name: "删除",
|
||||||
|
req: async function (id) {
|
||||||
|
return await http.delete(
|
||||||
|
`${config.API_URL}/opm/operation/${id}/`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
/*作业许可证*/
|
/*作业许可证*/
|
||||||
opl: {
|
opl: {
|
||||||
list: {
|
list: {
|
||||||
name: "获取",
|
name: "获取",
|
||||||
req: async function(data){
|
req: async function (data) {
|
||||||
return await http.get(
|
return await http.get(
|
||||||
`${config.API_URL}/opm/opl/`,
|
`${config.API_URL}/opm/opl/`,
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
read:{
|
read: {
|
||||||
name: "查询",
|
name: "查询",
|
||||||
req: async function(id){
|
req: async function (id) {
|
||||||
return await http.get(
|
return await http.get(
|
||||||
`${config.API_URL}/opm/opl/${id}/`);
|
`${config.API_URL}/opm/opl/${id}/`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
update: {
|
update: {
|
||||||
name: "更新",
|
name: "更新",
|
||||||
req: async function(id, data){
|
req: async function (id, data) {
|
||||||
return await http.put(
|
return await http.put(
|
||||||
`${config.API_URL}/opm/opl/${id}/`,
|
`${config.API_URL}/opm/opl/${id}/`,
|
||||||
data);
|
data);
|
||||||
|
@ -118,7 +114,7 @@ export default {
|
||||||
},
|
},
|
||||||
create: {
|
create: {
|
||||||
name: "创建",
|
name: "创建",
|
||||||
req: async function(data){
|
req: async function (data) {
|
||||||
return await http.post(
|
return await http.post(
|
||||||
`${config.API_URL}/opm/opl/`,
|
`${config.API_URL}/opm/opl/`,
|
||||||
data);
|
data);
|
||||||
|
@ -126,94 +122,94 @@ export default {
|
||||||
},
|
},
|
||||||
delete: {
|
delete: {
|
||||||
name: "删除",
|
name: "删除",
|
||||||
req: async function(id){
|
req: async function (id) {
|
||||||
return await http.delete(
|
return await http.delete(
|
||||||
`${config.API_URL}/opm/opl/${id}/`);
|
`${config.API_URL}/opm/opl/${id}/`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/*作业人员*/
|
/*作业人员*/
|
||||||
worker: {
|
worker: {
|
||||||
list: {
|
list: {
|
||||||
name: "获取",
|
name: "获取",
|
||||||
req: async function(data){
|
req: async function (data) {
|
||||||
return await http.get(
|
return await http.get(
|
||||||
`${config.API_URL}/opm/opl_worker/`,
|
`${config.API_URL}/opm/opl_worker/`,
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
read: {
|
||||||
|
name: "查询",
|
||||||
|
req: async function (id) {
|
||||||
|
return await http.get(
|
||||||
|
`${config.API_URL}/opm/opl_worker/${id}/`);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
update: {
|
||||||
|
name: "更新",
|
||||||
|
req: async function (id, data) {
|
||||||
|
return await http.put(
|
||||||
|
`${config.API_URL}/opm/opl_worker/${id}/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
create: {
|
||||||
|
name: "创建",
|
||||||
|
req: async function (data) {
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/opm/opl_worker/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
delete: {
|
||||||
|
name: "删除",
|
||||||
|
req: async function (id) {
|
||||||
|
return await http.delete(
|
||||||
|
`${config.API_URL}/opm/opl_worker/${id}/`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
read:{
|
|
||||||
name: "查询",
|
|
||||||
req: async function(id){
|
|
||||||
return await http.get(
|
|
||||||
`${config.API_URL}/opm/opl_worker/${id}/`);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
update: {
|
|
||||||
name: "更新",
|
|
||||||
req: async function(id, data){
|
|
||||||
return await http.put(
|
|
||||||
`${config.API_URL}/opm/opl_worker/${id}/`,
|
|
||||||
data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
create: {
|
|
||||||
name: "创建",
|
|
||||||
req: async function(data){
|
|
||||||
return await http.post(
|
|
||||||
`${config.API_URL}/opm/opl_worker/`,
|
|
||||||
data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
delete: {
|
|
||||||
name: "删除",
|
|
||||||
req: async function(id){
|
|
||||||
return await http.delete(
|
|
||||||
`${config.API_URL}/opm/opl_worker/${id}/`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/*气体检测*/
|
/*气体检测*/
|
||||||
gas: {
|
gas: {
|
||||||
list: {
|
list: {
|
||||||
name: "获取",
|
name: "获取",
|
||||||
req: async function(data){
|
req: async function (data) {
|
||||||
return await http.get(
|
return await http.get(
|
||||||
`${config.API_URL}/opm/gas_check/`,
|
`${config.API_URL}/opm/gas_check/`,
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
read: {
|
||||||
|
name: "查询",
|
||||||
|
req: async function (id) {
|
||||||
|
return await http.get(
|
||||||
|
`${config.API_URL}/opm/gas_check/${id}/`);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
update: {
|
||||||
|
name: "更新",
|
||||||
|
req: async function (id, data) {
|
||||||
|
return await http.put(
|
||||||
|
`${config.API_URL}/opm/gas_check/${id}/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
create: {
|
||||||
|
name: "创建",
|
||||||
|
req: async function (data) {
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/opm/gas_check/`,
|
||||||
|
data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
delete: {
|
||||||
|
name: "删除",
|
||||||
|
req: async function (id) {
|
||||||
|
return await http.delete(
|
||||||
|
`${config.API_URL}/opm/gas_check/${id}/`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
read:{
|
}
|
||||||
name: "查询",
|
|
||||||
req: async function(id){
|
|
||||||
return await http.get(
|
|
||||||
`${config.API_URL}/opm/gas_check/${id}/`);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
update: {
|
|
||||||
name: "更新",
|
|
||||||
req: async function(id, data){
|
|
||||||
return await http.put(
|
|
||||||
`${config.API_URL}/opm/gas_check/${id}/`,
|
|
||||||
data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
create: {
|
|
||||||
name: "创建",
|
|
||||||
req: async function(data){
|
|
||||||
return await http.post(
|
|
||||||
`${config.API_URL}/opm/gas_check/`,
|
|
||||||
data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
delete: {
|
|
||||||
name: "删除",
|
|
||||||
req: async function(id){
|
|
||||||
return await http.delete(
|
|
||||||
`${config.API_URL}/opm/gas_check/${id}/`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
|
@ -0,0 +1,387 @@
|
||||||
|
<template>
|
||||||
|
<!--基本信息!-->
|
||||||
|
<el-form
|
||||||
|
ref="dialogForm"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="110px"
|
||||||
|
style="margin: 10px 20px 0 20px"
|
||||||
|
>
|
||||||
|
<el-row>
|
||||||
|
<el-col :md="12" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="关联作业:">
|
||||||
|
<span>{{form.name}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="作业许可种类:">
|
||||||
|
<span>{{pagtitle}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="作业开始时间:">
|
||||||
|
<span>{{form.start_time}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :md="12" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="作业结束时间:">
|
||||||
|
<span>{{form.end_time}}</span>
|
||||||
|
</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="24" :sm="12" :xs="24">
|
||||||
|
<el-form-item label="风险选择:">
|
||||||
|
<el-checkbox-group v-model="form.risks_checked" disabled>
|
||||||
|
<el-checkbox
|
||||||
|
v-show="form.risks_checked.indexOf(item.id)>-1"
|
||||||
|
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="其他风险:">
|
||||||
|
<span>{{form.other_risk}}</span>
|
||||||
|
</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" disabled>
|
||||||
|
<el-checkbox
|
||||||
|
v-show="form.measures_checked.indexOf(item.id)>-1"
|
||||||
|
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、预判火势无法控制时,应立即疏散人群并拨打110或119求救。</p>
|
||||||
|
<p>
|
||||||
|
3、发生人员烫伤时用清水对烫伤部位进行冲洗或浸泡,用干净的纱布或衣物盖住被烫伤部位,伤势严重时立即拨打120送医。若贴身衣服与伤口粘在一起时,可用剪刀剪开,然后缓慢剥离衣物。
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
<el-form-item label="其他应急处置:">
|
||||||
|
<span>{{form.other_emr}}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<el-card>
|
||||||
|
<div>作业人员</div>
|
||||||
|
<!--作业人员!-->
|
||||||
|
<scTable
|
||||||
|
ref="workerTable"
|
||||||
|
:data="apiworkerObj"
|
||||||
|
row-key="id"
|
||||||
|
hidePagination
|
||||||
|
stripe
|
||||||
|
hideDo
|
||||||
|
style="height: calc(100% - 60px);"
|
||||||
|
>
|
||||||
|
<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="100">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button text type="primary" size="small" @click="bltHandle(scope.row,'1')">绑卡</el-button>
|
||||||
|
<!--<el-button text type="primary" size="small" @click="bltHandle(scope.row,'0')">解绑</el-button>-->
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-card>
|
||||||
|
<el-card>
|
||||||
|
<div>气体检测记录</div>
|
||||||
|
<!--气体检测记录!-->
|
||||||
|
<scTable
|
||||||
|
ref="gasTable"
|
||||||
|
:data="apigasObj"
|
||||||
|
row-key="id"
|
||||||
|
hidePagination
|
||||||
|
stripe
|
||||||
|
hideDo
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
label="#"
|
||||||
|
fixed="left"
|
||||||
|
type="index"
|
||||||
|
width="50"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="检测部位"
|
||||||
|
prop="check_place"
|
||||||
|
min-width="150"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column label="O2(%)" prop="o2" min-width="120"></el-table-column>
|
||||||
|
<el-table-column label="CO" prop="co" min-width="120"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="可燃气体(V%LEL)"
|
||||||
|
prop="lel"
|
||||||
|
min-width="150"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="检验结论"
|
||||||
|
prop="is_ok"
|
||||||
|
min-width="150"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
{{ is_ok_[scope.row.is_ok] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="检测人"
|
||||||
|
prop="checker"
|
||||||
|
min-width="150"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.checker_.name }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="检测时间"
|
||||||
|
prop="check_time"
|
||||||
|
min-width="150"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="创建时间"
|
||||||
|
prop="create_time"
|
||||||
|
min-width="150"
|
||||||
|
></el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {genTree} from "@/utils/verificate";
|
||||||
|
export default {
|
||||||
|
name: "scFire",
|
||||||
|
props: {
|
||||||
|
id: { type: String, default: "" },
|
||||||
|
},
|
||||||
|
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: [],
|
||||||
|
},
|
||||||
|
initForm: {},
|
||||||
|
oplcateCode: "",
|
||||||
|
operationId: "",
|
||||||
|
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: [],
|
||||||
|
apiworkerObj: [],
|
||||||
|
workerdialog: false,
|
||||||
|
gasdialog: false,
|
||||||
|
apigasObj: [],
|
||||||
|
is_ok_: {
|
||||||
|
true: "正常",
|
||||||
|
false: "不正常",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
let that = this;
|
||||||
|
that.oplId = that.id; //许可证ID
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
debugger;
|
||||||
|
console.log("this.getData");
|
||||||
|
that.getOplData();
|
||||||
|
that.getDept();
|
||||||
|
that.getUser();
|
||||||
|
that.getworkerList();
|
||||||
|
that.getgasList();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//根据oplId,查许可证
|
||||||
|
getOplData() {
|
||||||
|
debugger;
|
||||||
|
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();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//根据作业许可证类别ID获取,风险、措施===>作业许可证类别详情
|
||||||
|
getOplcates() {
|
||||||
|
debugger;
|
||||||
|
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_; //控制措施
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//根据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; //作业结束时间
|
||||||
|
this.form.name = res.name; //作业结束时间
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//作业部门
|
||||||
|
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;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//作业人员列表
|
||||||
|
getworkerList(id) {
|
||||||
|
this.$API.opm.worker.list.req({opl: id, page: 0}).then((res) => {
|
||||||
|
this.apiworkerObj = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//气体检测记录列表
|
||||||
|
getgasList(id) {
|
||||||
|
this.$API.opm.gas.list.req({opl: id, page: 0}).then((res) => {
|
||||||
|
this.apigasObj = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
bltHandle(item,index){
|
||||||
|
if(index==='1'){
|
||||||
|
//绑卡
|
||||||
|
}else{
|
||||||
|
//解绑
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
|
@ -23,6 +23,7 @@ import scQrCode from './components/scQrCode'
|
||||||
|
|
||||||
import scStatusIndicator from './components/scMini/scStatusIndicator'
|
import scStatusIndicator from './components/scMini/scStatusIndicator'
|
||||||
import scTrend from './components/scMini/scTrend'
|
import scTrend from './components/scMini/scTrend'
|
||||||
|
import scFire from './components/scOpl/scFire'
|
||||||
|
|
||||||
import auth from './directives/auth'
|
import auth from './directives/auth'
|
||||||
import role from './directives/role'
|
import role from './directives/role'
|
||||||
|
@ -62,6 +63,7 @@ export default {
|
||||||
app.component('scStatusIndicator', scStatusIndicator);
|
app.component('scStatusIndicator', scStatusIndicator);
|
||||||
app.component('scUserSelect', scUserSelect);
|
app.component('scUserSelect', scUserSelect);
|
||||||
app.component('scTrend', scTrend);
|
app.component('scTrend', scTrend);
|
||||||
|
app.component('scFire', scFire);
|
||||||
|
|
||||||
//注册全局指令
|
//注册全局指令
|
||||||
app.directive('auth', auth);
|
app.directive('auth', auth);
|
||||||
|
|
|
@ -1,278 +1,280 @@
|
||||||
<template>
|
<template>
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="add"></el-button>
|
<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="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> -->
|
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="search.keyword"
|
v-model="search.keyword"
|
||||||
placeholder="名称"
|
placeholder="名称"
|
||||||
clearable
|
clearable
|
||||||
@click="upsearch"
|
@click="upsearch"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
@click="upsearch"
|
@click="upsearch"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable
|
<scTable
|
||||||
ref="tableoperation"
|
ref="tableoperation"
|
||||||
:apiObj="apiObj"
|
:apiObj="apiObj"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
@selection-change="selectionChange"
|
@selection-change="selectionChange"
|
||||||
stripe
|
stripe
|
||||||
@resetQuery="resetQuery"
|
@resetQuery="resetQuery"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="#"
|
label="#"
|
||||||
fixed="left"
|
fixed="left"
|
||||||
type="index"
|
type="index"
|
||||||
width="50"
|
width="50"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="作业简介"
|
label="作业简介"
|
||||||
prop="name"
|
prop="name"
|
||||||
width="200"
|
width="200"
|
||||||
fixed="left"
|
fixed="left"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column label="作业状态" prop="state" width="180" fixed="left">
|
<el-table-column label="作业状态" prop="state" width="180" fixed="left">
|
||||||
<template #default="scope">{{
|
<template #default="scope">{{stateoptions[scope.row.state]}}</template>
|
||||||
stateoptions[scope.row.state]
|
</el-table-column>
|
||||||
}}</template></el-table-column
|
<el-table-column
|
||||||
>
|
label="生产状态"
|
||||||
<el-table-column
|
prop="state_work"
|
||||||
label="生产状态"
|
width="180"
|
||||||
prop="state_work"
|
fixed="left"
|
||||||
width="180"
|
></el-table-column>
|
||||||
fixed="left"
|
<el-table-column
|
||||||
></el-table-column>
|
label="具体地点"
|
||||||
<el-table-column
|
prop="place"
|
||||||
label="具体地点"
|
width="180"
|
||||||
prop="place"
|
></el-table-column>
|
||||||
width="180"
|
<el-table-column
|
||||||
></el-table-column>
|
label="作业开始时间"
|
||||||
<el-table-column
|
prop="start_time"
|
||||||
label="作业开始时间"
|
width="180"
|
||||||
prop="start_time"
|
></el-table-column>
|
||||||
width="180"
|
<el-table-column
|
||||||
></el-table-column>
|
label="作业结束时间"
|
||||||
<el-table-column
|
prop="end_time"
|
||||||
label="作业结束时间"
|
width="180"
|
||||||
prop="end_time"
|
></el-table-column>
|
||||||
width="180"
|
<el-table-column
|
||||||
></el-table-column>
|
label="作业区域"
|
||||||
|
prop="area"
|
||||||
<el-table-column
|
width="180"
|
||||||
label="作业区域"
|
></el-table-column>
|
||||||
prop="area"
|
<el-table-column
|
||||||
width="180"
|
label="属地部门"
|
||||||
></el-table-column>
|
prop="dept_ter"
|
||||||
<el-table-column
|
width="180"
|
||||||
label="属地部门"
|
></el-table-column>
|
||||||
prop="dept_ter"
|
<el-table-column
|
||||||
width="180"
|
label="业务部门"
|
||||||
></el-table-column>
|
prop="dept_bus"
|
||||||
<el-table-column
|
width="180"
|
||||||
label="业务部门"
|
></el-table-column>
|
||||||
prop="dept_bus"
|
<el-table-column
|
||||||
width="180"
|
label="业务部门协调员"
|
||||||
></el-table-column>
|
prop="coordinator"
|
||||||
<el-table-column
|
width="180"
|
||||||
label="业务部门协调员"
|
></el-table-column>
|
||||||
prop="coordinator"
|
<el-table-column
|
||||||
width="180"
|
label="创建人"
|
||||||
></el-table-column>
|
prop="create_by"
|
||||||
<el-table-column
|
width="180"
|
||||||
label="创建人"
|
></el-table-column>
|
||||||
prop="create_by"
|
<el-table-column
|
||||||
width="180"
|
label="创建时间"
|
||||||
></el-table-column>
|
prop="create_time"
|
||||||
<el-table-column
|
width="180"
|
||||||
label="创建时间"
|
></el-table-column>
|
||||||
prop="create_time"
|
<el-table-column label="操作" fixed="right" align="left" width="170">
|
||||||
width="180"
|
<template #default="scope">
|
||||||
></el-table-column>
|
<el-button-group>
|
||||||
<el-table-column label="操作" fixed="right" align="left" width="170">
|
<el-button
|
||||||
<template #default="scope">
|
text
|
||||||
<el-button-group>
|
type="primary"
|
||||||
<el-button
|
size="small"
|
||||||
text
|
@click="creatopl(scope.row)"
|
||||||
type="primary"
|
>许可证
|
||||||
size="small"
|
</el-button>
|
||||||
@click="creatopl(scope.row)"
|
<el-button
|
||||||
>关联许可证</el-button
|
text
|
||||||
>
|
type="primary"
|
||||||
<el-button
|
size="small"
|
||||||
text
|
@click="table_show(scope.row, scope.$index)"
|
||||||
type="primary"
|
>查看
|
||||||
size="small"
|
</el-button>
|
||||||
@click="table_show(scope.row, scope.$index)"
|
<el-button
|
||||||
>查看</el-button
|
v-if="scope.row.state === 10"
|
||||||
>
|
text
|
||||||
<el-button
|
type="warning"
|
||||||
text
|
size="small"
|
||||||
type="warning"
|
@click="table_edit(scope.row, scope.$index)"
|
||||||
size="small"
|
>编辑
|
||||||
@click="table_edit(scope.row, scope.$index)"
|
</el-button>
|
||||||
>编辑</el-button
|
<el-button
|
||||||
>
|
text
|
||||||
<el-button
|
type="danger"
|
||||||
text
|
size="small"
|
||||||
type="primary"
|
v-if="scope.row.state === 10"
|
||||||
size="small"
|
@click="table_del(scope.row)"
|
||||||
v-if="scope.row.state == 10"
|
>删除
|
||||||
@click="table_del(scope.row)"
|
</el-button>
|
||||||
>删除</el-button
|
</el-button-group>
|
||||||
>
|
</template>
|
||||||
</el-button-group>
|
</el-table-column>
|
||||||
</template>
|
</scTable>
|
||||||
</el-table-column>
|
</el-main>
|
||||||
</scTable>
|
<save-dialog
|
||||||
</el-main>
|
v-if="dialog.save"
|
||||||
<save-dialog
|
ref="saveDialog"
|
||||||
v-if="dialog.save"
|
@success="handleSaveSuccess"
|
||||||
ref="saveDialog"
|
@closed="dialog.save = false"
|
||||||
@success="handleSaveSuccess"
|
></save-dialog>
|
||||||
@closed="dialog.save = false"
|
</el-container>
|
||||||
></save-dialog>
|
|
||||||
</el-container>
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./operation_form.vue";
|
import saveDialog from "./operation_form.vue";
|
||||||
export default {
|
|
||||||
name: "operation",
|
|
||||||
components: {
|
|
||||||
saveDialog,
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialog: {
|
|
||||||
save: false,
|
|
||||||
permission: false,
|
|
||||||
},
|
|
||||||
apiObj: this.$API.opm.operation.list,
|
|
||||||
query: {},
|
|
||||||
selection: [],
|
|
||||||
search: {
|
|
||||||
keyword: null,
|
|
||||||
},
|
|
||||||
stateoptions: {
|
|
||||||
10: "创建中",
|
|
||||||
20: "审批中",
|
|
||||||
30: "待作业",
|
|
||||||
40: "作业中",
|
|
||||||
50: "已关闭",
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
//添加
|
|
||||||
add() {
|
|
||||||
this.dialog.save = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.saveDialog.open("add");
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
//编辑
|
export default {
|
||||||
table_edit(row) {
|
name: "operation",
|
||||||
this.dialog.save = true;
|
components: {
|
||||||
this.$nextTick(() => {
|
saveDialog,
|
||||||
this.$refs.saveDialog.open("edit").setData(row);
|
},
|
||||||
});
|
data() {
|
||||||
},
|
return {
|
||||||
//查看
|
dialog: {
|
||||||
table_show(row) {
|
save: false,
|
||||||
this.dialog.save = true;
|
permission: false,
|
||||||
this.$nextTick(() => {
|
},
|
||||||
this.$refs.saveDialog.open("show").setData(row);
|
apiObj: this.$API.opm.operation.list,
|
||||||
});
|
query: {},
|
||||||
},
|
selection: [],
|
||||||
//创建作业许可证
|
search: {
|
||||||
creatopl(row) {
|
keyword: null,
|
||||||
this.$router.push({
|
},
|
||||||
name: "opl",
|
stateoptions: {
|
||||||
query: {
|
10: "创建中",
|
||||||
id: row.id,
|
20: "审批中",
|
||||||
},
|
30: "待作业",
|
||||||
});
|
40: "作业中",
|
||||||
},
|
50: "已关闭",
|
||||||
//权限设置
|
},
|
||||||
permission() {
|
};
|
||||||
this.dialog.permission = true;
|
},
|
||||||
this.$nextTick(() => {
|
methods: {
|
||||||
this.$refs.permissionDialog.open();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
//删除
|
|
||||||
table_del(row) {
|
|
||||||
this.$API.opm.operation.delete
|
|
||||||
.req(row.id)
|
|
||||||
.then((res) => {
|
|
||||||
this.$message.success("删除成功");
|
|
||||||
this.$refs.tableoperation.refresh();
|
|
||||||
return res;
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
return err;
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
//表格选择后回调事件
|
//添加
|
||||||
selectionChange(selection) {
|
add() {
|
||||||
this.selection = selection;
|
this.dialog.save = true;
|
||||||
},
|
this.$nextTick(() => {
|
||||||
//表格内开关
|
this.$refs.saveDialog.open("add");
|
||||||
changeSwitch(val, row) {
|
});
|
||||||
row.status = row.status == "1" ? "0" : "1";
|
},
|
||||||
row.$switch_status = true;
|
|
||||||
setTimeout(() => {
|
//编辑
|
||||||
delete row.$switch_status;
|
table_edit(row) {
|
||||||
row.status = val;
|
this.dialog.save = true;
|
||||||
this.$message.success("操作成功");
|
this.$nextTick(() => {
|
||||||
}, 500);
|
this.$refs.saveDialog.open("edit").setData(row);
|
||||||
},
|
});
|
||||||
//搜索
|
},
|
||||||
upsearch() {},
|
//查看
|
||||||
//根据ID获取树结构
|
table_show(row) {
|
||||||
filterTree(id) {
|
this.dialog.save = true;
|
||||||
var target = null;
|
this.$nextTick(() => {
|
||||||
function filter(tree) {
|
this.$refs.saveDialog.open("show").setData(row);
|
||||||
tree.forEach((item) => {
|
});
|
||||||
if (item.id == id) {
|
},
|
||||||
target = item;
|
//创建作业许可证
|
||||||
}
|
creatopl(row) {
|
||||||
if (item.children) {
|
this.$router.push({
|
||||||
filter(item.children);
|
name: "opl",
|
||||||
}
|
query: {
|
||||||
});
|
id: row.id,
|
||||||
}
|
},
|
||||||
filter(this.$refs.tableoperation.tableData);
|
});
|
||||||
return target;
|
},
|
||||||
},
|
//权限设置
|
||||||
//本地更新数据
|
permission() {
|
||||||
handleSaveSuccess(data, mode) {
|
this.dialog.permission = true;
|
||||||
if (mode == "add") {
|
this.$nextTick(() => {
|
||||||
this.$refs.tableoperation.refresh();
|
this.$refs.permissionDialog.open();
|
||||||
} else if (mode == "edit") {
|
});
|
||||||
this.$refs.tableoperation.refresh();
|
},
|
||||||
}
|
|
||||||
},
|
//删除
|
||||||
resetQuery() {
|
table_del(row) {
|
||||||
this.query = {};
|
this.$API.opm.operation.delete
|
||||||
},
|
.req(row.id)
|
||||||
},
|
.then((res) => {
|
||||||
};
|
this.$message.success("删除成功");
|
||||||
</script>
|
this.$refs.tableoperation.refresh();
|
||||||
|
return res;
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
return err;
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
//表格选择后回调事件
|
||||||
|
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() {
|
||||||
|
},
|
||||||
|
//根据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.tableoperation.tableData);
|
||||||
|
return target;
|
||||||
|
},
|
||||||
|
//本地更新数据
|
||||||
|
handleSaveSuccess(data, mode) {
|
||||||
|
if (mode == "add") {
|
||||||
|
this.$refs.tableoperation.refresh();
|
||||||
|
} else if (mode == "edit") {
|
||||||
|
this.$refs.tableoperation.refresh();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
resetQuery() {
|
||||||
|
this.query = {};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
|
@ -1,415 +1,466 @@
|
||||||
<template>
|
<template>
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-button
|
<el-button
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
style="margin: 3px 0px 0px 10px"
|
style="margin: 3px 0px 0px 10px"
|
||||||
v-for="(item, index) in oplcateList"
|
v-for="(item, index) in oplcateList"
|
||||||
:key="index"
|
:key="index"
|
||||||
:title="item.name"
|
:title="item.name"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="addFire(item.id, item.name)"
|
@click="addFire(item.id, item.name)"
|
||||||
>
|
>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="search.keyword"
|
v-model="search.keyword"
|
||||||
placeholder="名称"
|
placeholder="名称"
|
||||||
clearable
|
clearable
|
||||||
@click="upsearch"
|
@click="upsearch"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
@click="upsearch"
|
@click="upsearch"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-card>
|
||||||
<scTable
|
<el-descriptions title="作业详情" :column="3">
|
||||||
ref="table"
|
<el-descriptions-item label="作业名称:">
|
||||||
:data="apiObj"
|
{{operationObj.name}}
|
||||||
row-key="id"
|
</el-descriptions-item>
|
||||||
@selection-change="selectionChange"
|
<el-descriptions-item label="具体地点:">
|
||||||
stripe
|
{{operationObj.place }}
|
||||||
@resetQuery="resetQuery"
|
</el-descriptions-item>
|
||||||
>
|
<el-descriptions-item label="生产状态:">
|
||||||
<el-table-column
|
{{operationObj.state_work }}
|
||||||
label="#"
|
</el-descriptions-item>
|
||||||
type="index"
|
<el-descriptions-item label="状态:">
|
||||||
width="50"
|
{{state_[operationObj.state] }}
|
||||||
fixed="left"
|
</el-descriptions-item>
|
||||||
></el-table-column>
|
<el-descriptions-item label="开始时间:">
|
||||||
<el-table-column
|
{{operationObj.start_time }}
|
||||||
label="作业许可编号"
|
</el-descriptions-item>
|
||||||
prop="number"
|
<el-descriptions-item label="结束时间:">
|
||||||
width="120"
|
{{operationObj.end_time }}
|
||||||
fixed="left"
|
</el-descriptions-item>
|
||||||
></el-table-column>
|
</el-descriptions>
|
||||||
<el-table-column
|
</el-card>
|
||||||
label="作业级别"
|
<el-main class="nopadding">
|
||||||
prop="level"
|
<scTable
|
||||||
width="120"
|
ref="table"
|
||||||
fixed="left"
|
:data="apiObj"
|
||||||
></el-table-column>
|
row-key="id"
|
||||||
<el-table-column
|
@selection-change="selectionChange"
|
||||||
label="许可证种类"
|
stripe
|
||||||
prop="cate_name"
|
@resetQuery="resetQuery"
|
||||||
width="120"
|
>
|
||||||
fixed="left"
|
<el-table-column
|
||||||
></el-table-column>
|
label="#"
|
||||||
<el-table-column
|
type="index"
|
||||||
label="作业开始时间"
|
width="50"
|
||||||
prop="start_time"
|
fixed="left"
|
||||||
width="180"
|
></el-table-column>
|
||||||
></el-table-column>
|
<el-table-column
|
||||||
<el-table-column
|
label="作业许可编号"
|
||||||
label="作业结束时间"
|
prop="number"
|
||||||
prop="end_time"
|
width="120"
|
||||||
width="180"
|
fixed="left"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="作业部门"
|
label="作业级别"
|
||||||
prop="dept_do"
|
prop="level"
|
||||||
width="180"
|
width="120"
|
||||||
></el-table-column>
|
fixed="left"
|
||||||
<el-table-column
|
></el-table-column>
|
||||||
label="作业负责人"
|
<el-table-column
|
||||||
prop="charger"
|
label="许可证种类"
|
||||||
width="180"
|
prop="cate_name"
|
||||||
></el-table-column>
|
width="120"
|
||||||
<el-table-column
|
fixed="left"
|
||||||
label="作业监护人"
|
></el-table-column>
|
||||||
prop="monitor"
|
<el-table-column
|
||||||
width="180"
|
label="作业开始时间"
|
||||||
></el-table-column>
|
prop="start_time"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="作业结束时间"
|
||||||
|
prop="end_time"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="作业部门"
|
||||||
|
prop="dept_do"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="作业负责人"
|
||||||
|
prop="charger"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="作业监护人"
|
||||||
|
prop="monitor"
|
||||||
|
width="180"
|
||||||
|
></el-table-column>
|
||||||
|
|
||||||
<el-table-column label="操作" fixed="right" align="right" width="170">
|
<el-table-column label="操作" fixed="right" align="right" width="170">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button
|
<el-button
|
||||||
text
|
text
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
@click="table_show(scope.row, scope.$index)"
|
@click="table_show(scope.row, scope.$index)"
|
||||||
>查看</el-button
|
>查看
|
||||||
>
|
</el-button
|
||||||
<el-button
|
>
|
||||||
text
|
<el-button
|
||||||
type="warning"
|
v-if="operationObj.state===10"
|
||||||
size="small"
|
text
|
||||||
@click="table_edit(scope.row, scope.$index)"
|
type="warning"
|
||||||
>编辑</el-button
|
size="small"
|
||||||
>
|
@click="table_edit(scope.row, scope.$index)"
|
||||||
</el-button-group>
|
>编辑
|
||||||
</template>
|
</el-button
|
||||||
</el-table-column>
|
>
|
||||||
</scTable>
|
</el-button-group>
|
||||||
</el-main>
|
</template>
|
||||||
</el-container>
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
<el-drawer :size="'50%'" v-model="showLimited" :title="oplName+'作业许可证详情'">
|
||||||
|
<sc-fire :id="oplId"></sc-fire>
|
||||||
|
</el-drawer>
|
||||||
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
import ScFire from "../../components/scOpl/scFire";
|
||||||
name: "opl",
|
|
||||||
components: {},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialog: {
|
|
||||||
save: false,
|
|
||||||
permission: false,
|
|
||||||
},
|
|
||||||
apiObj: [],
|
|
||||||
query: {},
|
|
||||||
selection: [],
|
|
||||||
search: {
|
|
||||||
keyword: null,
|
|
||||||
},
|
|
||||||
oplcateList: {},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
mounted() {
|
export default {
|
||||||
this.getoplcate();
|
name: "opl",
|
||||||
this.getopllist();
|
components: {ScFire},
|
||||||
},
|
data() {
|
||||||
methods: {
|
return {
|
||||||
//作业许可证列表
|
dialog: {
|
||||||
getopllist() {
|
save: false,
|
||||||
this.$API.opm.opl.list.req({ operation:this.$route.query.id, page: 0 }).then((res) => {
|
permission: false,
|
||||||
this.apiObj = res;
|
},
|
||||||
});
|
apiObj: [],
|
||||||
},
|
query: {},
|
||||||
|
selection: [],
|
||||||
|
search: {
|
||||||
|
keyword: null,
|
||||||
|
},
|
||||||
|
oplcateList: {},
|
||||||
|
operationObj: {},
|
||||||
|
showLimited: false,
|
||||||
|
oplId: '',
|
||||||
|
state_: {
|
||||||
|
10: "创建中",
|
||||||
|
20: "审批中",
|
||||||
|
30: "待入厂",
|
||||||
|
40: "进行中",
|
||||||
|
50: "已完成",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
//作业许可证类型列表
|
mounted() {
|
||||||
getoplcate() {
|
this.getoplcate();
|
||||||
this.$API.opm.oplcate.list.req({ page: 0 }).then((res) => {
|
this.getopllist();
|
||||||
this.oplcateList = res;
|
this.getOperation();
|
||||||
console.log(res);
|
},
|
||||||
});
|
methods: {
|
||||||
},
|
getOperation(){
|
||||||
|
this.$API.opm.operation.read.req(this.$route.query.id).then((res) => {
|
||||||
|
debugger;
|
||||||
|
this.operationObj = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//作业许可证列表
|
||||||
|
getopllist() {
|
||||||
|
this.$API.opm.opl.list.req({operation: this.$route.query.id, page: 0}).then((res) => {
|
||||||
|
this.apiObj = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
//点击作业类型,创建作业许可证添加
|
//作业许可证类型列表
|
||||||
addFire(id, name) {
|
getoplcate() {
|
||||||
switch (name) {
|
this.$API.opm.oplcate.list.req({page: 0}).then((res) => {
|
||||||
case "动火":
|
this.oplcateList = res;
|
||||||
this.$router.push({
|
console.log(res);
|
||||||
name: "fire",
|
});
|
||||||
query: {
|
},
|
||||||
operationid: this.$route.query.id, //作业ID
|
|
||||||
oplcateId: id, //许可证类型ID
|
//点击作业类型,创建作业许可证添加
|
||||||
oplId: "", //许可证ID
|
addFire(id, name) {
|
||||||
},
|
switch (name) {
|
||||||
});
|
case "动火":
|
||||||
break;
|
this.$router.push({
|
||||||
case "有限空间":
|
name: "fire",
|
||||||
this.$router.push({
|
query: {
|
||||||
name: "space",
|
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 "有限空间":
|
||||||
break;
|
this.$router.push({
|
||||||
case "清库":
|
name: "space",
|
||||||
this.$router.push({
|
query: {
|
||||||
name: "clear",
|
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 "清库":
|
||||||
break;
|
this.$router.push({
|
||||||
case "高处":
|
name: "clear",
|
||||||
this.$router.push({
|
query: {
|
||||||
name: "high",
|
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 "高处":
|
||||||
break;
|
this.$router.push({
|
||||||
case "吊装":
|
name: "high",
|
||||||
this.$router.push({
|
query: {
|
||||||
name: "hoisting",
|
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 "吊装":
|
||||||
break;
|
this.$router.push({
|
||||||
case "预热器清堵":
|
name: "hoisting",
|
||||||
this.$router.push({
|
query: {
|
||||||
name: "preheat",
|
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 "预热器清堵":
|
||||||
break;
|
this.$router.push({
|
||||||
case "篦冷机清大块":
|
name: "preheat",
|
||||||
this.$router.push({
|
query: {
|
||||||
name: "cooler",
|
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 "篦冷机清大块":
|
||||||
break;
|
this.$router.push({
|
||||||
case "动土":
|
name: "cooler",
|
||||||
this.$router.push({
|
query: {
|
||||||
name: "soil",
|
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 "动土":
|
||||||
break;
|
this.$router.push({
|
||||||
case "临时用电":
|
name: "soil",
|
||||||
this.$router.push({
|
query: {
|
||||||
name: "usecl",
|
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 "临时用电":
|
||||||
break;
|
this.$router.push({
|
||||||
}
|
name: "usecl",
|
||||||
},
|
query: {
|
||||||
//编辑
|
operationid: this.$route.query.id, //作业ID
|
||||||
table_edit(row) {
|
oplcateId: id, //许可证类型ID
|
||||||
switch (row.cate_name) {
|
oplId: "", //许可证ID
|
||||||
case "动火":
|
},
|
||||||
this.$router.push({
|
});
|
||||||
name: "fire",
|
break;
|
||||||
query: {
|
}
|
||||||
oplId: row.id, //许可证ID
|
},
|
||||||
},
|
//编辑
|
||||||
});
|
table_edit(row) {
|
||||||
break;
|
switch (row.cate_name) {
|
||||||
case "有限空间":
|
case "动火":
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "space",
|
name: "fire",
|
||||||
query: {
|
query: {
|
||||||
oplId: row.id, //许可证ID
|
oplId: row.id, //许可证ID
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "清库":
|
case "有限空间":
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "clear",
|
name: "space",
|
||||||
query: {
|
query: {
|
||||||
oplId: row.id, //许可证ID
|
oplId: row.id, //许可证ID
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "高处":
|
case "清库":
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "high",
|
name: "clear",
|
||||||
query: {
|
query: {
|
||||||
oplId: row.id, //许可证ID
|
oplId: row.id, //许可证ID
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "吊装":
|
case "高处":
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "hoisting",
|
name: "high",
|
||||||
query: {
|
query: {
|
||||||
oplId: row.id, //许可证ID
|
oplId: row.id, //许可证ID
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "预热器清堵":
|
case "吊装":
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "preheat",
|
name: "hoisting",
|
||||||
query: {
|
query: {
|
||||||
oplId: row.id, //许可证ID
|
oplId: row.id, //许可证ID
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "篦冷机清大块":
|
case "预热器清堵":
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "cooler",
|
name: "preheat",
|
||||||
query: {
|
query: {
|
||||||
oplId: row.id, //许可证ID
|
oplId: row.id, //许可证ID
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "动土":
|
case "篦冷机清大块":
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "soil",
|
name: "cooler",
|
||||||
query: {
|
query: {
|
||||||
oplId: row.id, //许可证ID
|
oplId: row.id, //许可证ID
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "临时用电":
|
case "动土":
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "usecl",
|
name: "soil",
|
||||||
query: {
|
query: {
|
||||||
oplId: row.id, //许可证ID
|
oplId: row.id, //许可证ID
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
case "临时用电":
|
||||||
},
|
this.$router.push({
|
||||||
//查看
|
name: "usecl",
|
||||||
table_show(row) {
|
query: {
|
||||||
this.dialog.save = true;
|
oplId: row.id, //许可证ID
|
||||||
this.$nextTick(() => {
|
},
|
||||||
this.$refs.saveDialog.open("show").setData(row);
|
});
|
||||||
});
|
break;
|
||||||
},
|
}
|
||||||
//权限设置
|
},
|
||||||
permission() {
|
//查看
|
||||||
this.dialog.permission = true;
|
table_show(row) {
|
||||||
this.$nextTick(() => {
|
this.showLimited = true;
|
||||||
this.$refs.permissionDialog.open();
|
this.oplId = row.id;
|
||||||
});
|
this.oplName = row.cate_name;
|
||||||
},
|
this.workId = row.workers[0];
|
||||||
//删除
|
},
|
||||||
async table_del(row) {
|
//权限设置
|
||||||
var reqData = { id: row.id };
|
permission() {
|
||||||
var res = await this.$API.demo.post.post(reqData);
|
this.dialog.permission = true;
|
||||||
if (res.code == 200) {
|
this.$nextTick(() => {
|
||||||
this.$refs.table.refresh();
|
this.$refs.permissionDialog.open();
|
||||||
this.$message.success("删除成功");
|
});
|
||||||
} else {
|
},
|
||||||
this.$alert(res.message, "提示", { type: "error" });
|
//删除
|
||||||
}
|
async table_del(row) {
|
||||||
},
|
var reqData = {id: row.id};
|
||||||
//批量删除
|
var res = await this.$API.demo.post.post(reqData);
|
||||||
async batch_del() {
|
if (res.code == 200) {
|
||||||
this.$confirm(
|
this.$refs.table.refresh();
|
||||||
`确定删除选中的 ${this.selection.length} 项吗?如果删除项中含有子集将会被一并删除`,
|
this.$message.success("删除成功");
|
||||||
"提示",
|
} else {
|
||||||
{
|
this.$alert(res.message, "提示", {type: "error"});
|
||||||
type: "warning",
|
}
|
||||||
}
|
},
|
||||||
)
|
//批量删除
|
||||||
.then(() => {
|
async batch_del() {
|
||||||
const loading = this.$loading();
|
this.$confirm(
|
||||||
this.$refs.table.refresh();
|
`确定删除选中的 ${this.selection.length} 项吗?如果删除项中含有子集将会被一并删除`,
|
||||||
loading.close();
|
"提示",
|
||||||
this.$message.success("操作成功");
|
{
|
||||||
})
|
type: "warning",
|
||||||
.catch(() => {});
|
}
|
||||||
},
|
)
|
||||||
//表格选择后回调事件
|
.then(() => {
|
||||||
selectionChange(selection) {
|
const loading = this.$loading();
|
||||||
this.selection = selection;
|
this.$refs.table.refresh();
|
||||||
},
|
loading.close();
|
||||||
//表格内开关
|
this.$message.success("操作成功");
|
||||||
changeSwitch(val, row) {
|
})
|
||||||
row.status = row.status == "1" ? "0" : "1";
|
.catch(() => {
|
||||||
row.$switch_status = true;
|
});
|
||||||
setTimeout(() => {
|
},
|
||||||
delete row.$switch_status;
|
//表格选择后回调事件
|
||||||
row.status = val;
|
selectionChange(selection) {
|
||||||
this.$message.success("操作成功");
|
this.selection = selection;
|
||||||
}, 500);
|
},
|
||||||
},
|
//表格内开关
|
||||||
//搜索
|
changeSwitch(val, row) {
|
||||||
upsearch() {},
|
row.status = row.status == "1" ? "0" : "1";
|
||||||
//根据ID获取树结构
|
row.$switch_status = true;
|
||||||
filterTree(id) {
|
setTimeout(() => {
|
||||||
var target = null;
|
delete row.$switch_status;
|
||||||
function filter(tree) {
|
row.status = val;
|
||||||
tree.forEach((item) => {
|
this.$message.success("操作成功");
|
||||||
if (item.id == id) {
|
}, 500);
|
||||||
target = item;
|
},
|
||||||
}
|
//搜索
|
||||||
if (item.children) {
|
upsearch() {
|
||||||
filter(item.children);
|
},
|
||||||
}
|
//根据ID获取树结构
|
||||||
});
|
filterTree(id) {
|
||||||
}
|
var target = null;
|
||||||
filter(this.$refs.table.tableData);
|
|
||||||
return target;
|
function filter(tree) {
|
||||||
},
|
tree.forEach((item) => {
|
||||||
//本地更新数据
|
if (item.id == id) {
|
||||||
handleSaveSuccess(data, mode) {
|
target = item;
|
||||||
if (mode == "add") {
|
}
|
||||||
this.$refs.table.refresh();
|
if (item.children) {
|
||||||
} else if (mode == "edit") {
|
filter(item.children);
|
||||||
this.$refs.table.refresh();
|
}
|
||||||
}
|
});
|
||||||
},
|
}
|
||||||
resetQuery() {
|
|
||||||
this.query = {};
|
filter(this.$refs.table.tableData);
|
||||||
},
|
return target;
|
||||||
},
|
},
|
||||||
};
|
//本地更新数据
|
||||||
</script>
|
handleSaveSuccess(data, mode) {
|
||||||
|
if (mode == "add") {
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
} else if (mode == "edit") {
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
resetQuery() {
|
||||||
|
this.query = {};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
|
@ -80,15 +80,15 @@
|
||||||
this.list = res;
|
this.list = res;
|
||||||
},
|
},
|
||||||
handleShow(row) {
|
handleShow(row) {
|
||||||
let workflowKey = row.workflow_.key;
|
let cateType = row.workflow_.key;
|
||||||
let cateType = '',projectId='';
|
let projectId='';
|
||||||
if(workflowKey==='visit'){
|
if(cateType==='visit'){
|
||||||
cateType = row.workflow_.key;
|
|
||||||
projectId = row.ticket_data.visit;
|
projectId = row.ticket_data.visit;
|
||||||
}else if(workflowKey==='rparty'){
|
}else if(cateType==='rparty'){
|
||||||
cateType = row.workflow_.key;
|
|
||||||
projectId = row.ticket_data.rpj;
|
projectId = row.ticket_data.rpj;
|
||||||
}else{}
|
}else{
|
||||||
|
projectId = row.ticket_data.opl;
|
||||||
|
}
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "visitdetail",
|
name: "visitdetail",
|
||||||
query: {
|
query: {
|
||||||
|
|
|
@ -138,11 +138,20 @@
|
||||||
},
|
},
|
||||||
//处理
|
//处理
|
||||||
handleDetail(row){
|
handleDetail(row){
|
||||||
|
debugger;
|
||||||
|
console.log(row)
|
||||||
|
let projectId = '';
|
||||||
|
let catetype = row.workflow_.key;
|
||||||
|
if(catetype==='visit'){
|
||||||
|
projectId=row.ticket_data.visit;
|
||||||
|
}else if(catetype==='Fire'){
|
||||||
|
projectId=row.ticket_data.opl;
|
||||||
|
}
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "visitdetail",
|
name: "visitdetail",
|
||||||
query: {
|
query: {
|
||||||
id: row.id,
|
id: row.id,
|
||||||
projectId:row.ticket_data.visit,
|
projectId:projectId,
|
||||||
catetype:row.workflow_.key
|
catetype:row.workflow_.key
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -83,14 +83,15 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="条件表达式" prop="condition_expression">
|
<el-form-item label="条件表达式" prop="condition_expression">
|
||||||
<vue-json-editor
|
<!--<vue-json-editor
|
||||||
style="width:100%"
|
style="width:100%"
|
||||||
v-model="addForm.condition_expression"
|
v-model="addForm.condition_expression"
|
||||||
:showBtns="false"
|
:showBtns="false"
|
||||||
:mode="'code'"
|
:mode="'code'"
|
||||||
lang="zh"
|
lang="zh"
|
||||||
@json-change="onJsonChange"
|
@json-change="onJsonChange"
|
||||||
/>
|
/>-->
|
||||||
|
<JsonEditorVue class="editorJson" v-model="addForm.condition_expression"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="属性类型" prop="attribute_type">
|
<el-form-item label="属性类型" prop="attribute_type">
|
||||||
<el-select style="width: 100%" v-model="addForm.attribute_type" placeholder="请选择">
|
<el-select style="width: 100%" v-model="addForm.attribute_type" placeholder="请选择">
|
||||||
|
@ -120,10 +121,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import vueJsonEditor from 'vue-json-editor'
|
// import vueJsonEditor from 'vue-json-editor'
|
||||||
|
import JsonEditorVue from 'json-editor-vue3'
|
||||||
export default {
|
export default {
|
||||||
name: "transform",
|
name: "transform",
|
||||||
components: { vueJsonEditor },
|
components: { JsonEditorVue },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
id: sessionStorage.getItem('jinYuWorkflowId'),
|
id: sessionStorage.getItem('jinYuWorkflowId'),
|
||||||
|
@ -224,5 +226,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.editorJson{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -78,6 +78,34 @@
|
||||||
</div>
|
</div>
|
||||||
<show-dialog v-if="rpjShow" ref="showDialog"></show-dialog>
|
<show-dialog v-if="rpjShow" ref="showDialog"></show-dialog>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<el-card style="margin-left: 10px; margin-bottom: 10px" v-else>
|
||||||
|
<el-descriptions title="作业许可证" :column="3">
|
||||||
|
<el-descriptions-item label="工单流水号:">
|
||||||
|
{{ticketDetail.sn }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="许可证编号:">
|
||||||
|
{{oplDetail.number }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="许可证类别:">
|
||||||
|
{{oplDetail.cate_name}}
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="级别:">
|
||||||
|
{{oplDetail.level }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="开始时间:">
|
||||||
|
{{oplDetail.start_time }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="结束时间:">
|
||||||
|
{{oplDetail.end_time }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<div style="text-align: center">
|
||||||
|
<el-link type="primary" @click="showMoreInfo"> 更多信息 </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'">
|
<el-card style="margin-left: 10px; margin-bottom: 10px" v-if="type!=='show'">
|
||||||
<scTitle title="处理"></scTitle>
|
<scTitle title="处理"></scTitle>
|
||||||
<el-form :model="form" ref="addForm" label-width="100px" label-position="left">
|
<el-form :model="form" ref="addForm" label-width="100px" label-position="left">
|
||||||
|
@ -156,6 +184,7 @@
|
||||||
projectId: "",//对应项目的id
|
projectId: "",//对应项目的id
|
||||||
userName: "",
|
userName: "",
|
||||||
rpjDetail: {},
|
rpjDetail: {},
|
||||||
|
oplDetail: {},
|
||||||
ticketDetail: [],
|
ticketDetail: [],
|
||||||
visitDetail: [],
|
visitDetail: [],
|
||||||
employeeLists: [],
|
employeeLists: [],
|
||||||
|
@ -204,10 +233,14 @@
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
debugger;
|
||||||
if(this.cateType==='visit'){
|
if(this.cateType==='visit'){
|
||||||
this.getVisit();
|
this.getVisit();
|
||||||
}else if(this.cateType==='rparty'){
|
}else if(this.cateType==='rparty'){
|
||||||
this.getRpj();
|
this.getRpj();
|
||||||
|
}else{
|
||||||
|
debugger;
|
||||||
|
this.getOpl();
|
||||||
}
|
}
|
||||||
this.getticketItem();
|
this.getticketItem();
|
||||||
this.getBtns();
|
this.getBtns();
|
||||||
|
@ -246,6 +279,13 @@
|
||||||
this.rpjDetail = res;
|
this.rpjDetail = res;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//作业详情
|
||||||
|
getOpl(){
|
||||||
|
this.$API.opm.opl.read.req(this.projectId).then((res) => {
|
||||||
|
debugger;
|
||||||
|
this.oplDetail = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
//加签处理-start
|
//加签处理-start
|
||||||
addNode(){
|
addNode(){
|
||||||
this.limitedAdd = true;
|
this.limitedAdd = true;
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||||
|
<el-table-column label="#" type="index"></el-table-column>
|
||||||
<el-table-column label="ID" prop="id" min-width="120"></el-table-column>
|
<el-table-column label="ID" prop="id" min-width="120"></el-table-column>
|
||||||
<el-table-column label="工作流名称" prop="name" min-width="250"></el-table-column>
|
<el-table-column label="工作流名称" prop="name" min-width="250"></el-table-column>
|
||||||
<el-table-column label="标识" prop="key" min-width="250"></el-table-column>
|
<el-table-column label="标识" prop="key" min-width="250"></el-table-column>
|
||||||
|
@ -32,6 +33,13 @@
|
||||||
<el-divider direction="vertical"></el-divider>
|
<el-divider direction="vertical"></el-divider>
|
||||||
<el-button link size="small" type="primary" @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-divider direction="vertical"></el-divider>
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
@click="handleWatch(scope)"
|
||||||
|
>
|
||||||
|
查看流程图
|
||||||
|
</el-link>
|
||||||
|
<el-divider direction="vertical"></el-divider>
|
||||||
<el-popconfirm title="确定删除吗?" @confirm="workflowDel(scope.row)">
|
<el-popconfirm title="确定删除吗?" @confirm="workflowDel(scope.row)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button link size="small" type="danger">删除</el-button>
|
<el-button link size="small" type="danger">删除</el-button>
|
||||||
|
@ -42,6 +50,15 @@
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
|
<div class="svgMark" v-if="limitedWatch" @click="closeMark">
|
||||||
|
<div class="svgWrapper">
|
||||||
|
<div class="svgItem">工作流流程图<i class="el-dialog__close el-icon el-icon-close" @click="closeMark"></i></div>
|
||||||
|
<div style="width: 90%;margin: auto;">
|
||||||
|
<svg height=1800 id="mySvg" style="width:100%!important;">
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<el-dialog :title="titleMap[type]" v-model="limitedVisible">
|
<el-dialog :title="titleMap[type]" v-model="limitedVisible">
|
||||||
<el-form :model="addForm" :rules="rules" ref="addForm" label-width="100px" label-position="left">
|
<el-form :model="addForm" :rules="rules" ref="addForm" label-width="100px" label-position="left">
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
|
@ -86,7 +103,10 @@
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import dagreD3 from 'dagre-d3'
|
||||||
|
import * as d3 from 'd3'
|
||||||
export default {
|
export default {
|
||||||
name: 'index',
|
name: 'index',
|
||||||
data() {
|
data() {
|
||||||
|
@ -101,6 +121,7 @@
|
||||||
editId: null,
|
editId: null,
|
||||||
isSaving: false,
|
isSaving: false,
|
||||||
limitedVisible: false,
|
limitedVisible: false,
|
||||||
|
limitedWatch: false,
|
||||||
type: "add",
|
type: "add",
|
||||||
titleMap: {
|
titleMap: {
|
||||||
add: '新增',
|
add: '新增',
|
||||||
|
@ -234,7 +255,104 @@
|
||||||
} else if (type == 'edit') {
|
} else if (type == 'edit') {
|
||||||
this.$refs.table.refresh()
|
this.$refs.table.refresh()
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
handleWatch(scope) {
|
||||||
|
debugger;
|
||||||
|
let that = this;
|
||||||
|
let workFlow = scope.row.id;
|
||||||
|
that.limitedWatch = true;
|
||||||
|
that.$nextTick(() => {
|
||||||
|
var g = new dagreD3.graphlib.Graph().setGraph({
|
||||||
|
rankdir: 'DL',
|
||||||
|
nodesep: 100,
|
||||||
|
edgesep: 50,//两条线之间的距离
|
||||||
|
ranksep: 50,//节点之间的距离
|
||||||
|
marginx: 160,
|
||||||
|
marginy: 20,
|
||||||
|
});
|
||||||
|
//获取state得到节点
|
||||||
|
this.$API.wf.workflow.states.req(workFlow).then((response) => {
|
||||||
|
if (!response.err_msg) {
|
||||||
|
let nodes = response;
|
||||||
|
// 添加节点
|
||||||
|
nodes.forEach((item) => {
|
||||||
|
debugger;
|
||||||
|
g.setNode(item.id, {
|
||||||
|
// 节点标签
|
||||||
|
label: item.name,
|
||||||
|
// 节点形状
|
||||||
|
shape: 'rect',
|
||||||
|
toolText: item.name,
|
||||||
|
//节点样式
|
||||||
|
style: "fill:#fff;stroke:#000",
|
||||||
|
labelStyle: "fill:#000;",
|
||||||
|
rx: 5,//矩形节点圆角度
|
||||||
|
ry: 5
|
||||||
|
});
|
||||||
|
});
|
||||||
|
debugger;
|
||||||
|
console.log(g.nodes());
|
||||||
|
g.nodes().forEach(function (v) {
|
||||||
|
debugger;
|
||||||
|
console.log("Node " + v + ": " + JSON.stringify(g.node(v)));
|
||||||
|
});
|
||||||
|
//获取流转得到线 链接关系
|
||||||
|
this.$API.wf.workflow.transitions.req(workFlow).then((res) => {
|
||||||
|
if (!res.err_msg) {
|
||||||
|
let transitionList = res;
|
||||||
|
debugger;
|
||||||
|
transitionList.forEach((transition0) => {
|
||||||
|
if (transition0.condition_expression.length > 0) {
|
||||||
|
debugger;
|
||||||
|
g.setNode(transition0.source_state_.id + 100000, {
|
||||||
|
label: "条件表达式",
|
||||||
|
style: "stroke: #000;fill: #afa",
|
||||||
|
shape: "diamond"
|
||||||
|
});
|
||||||
|
g.setEdge(transition0.source_state_.id, transition0.source_state_.id + 100000, {
|
||||||
|
// 边标签
|
||||||
|
label: transition0.name,
|
||||||
|
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px"
|
||||||
|
});
|
||||||
|
let condition_expression = transition0.condition_expression;
|
||||||
|
condition_expression.forEach(condition_expression0 => {
|
||||||
|
g.setEdge(transition0.source_state_.id + 100000, condition_expression0.target_state, {
|
||||||
|
label: condition_expression0.label,
|
||||||
|
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px"
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
g.setEdge(transition0.source_state_.id, transition0.destination_state_.id, {
|
||||||
|
// 边标签
|
||||||
|
label: transition0.name,
|
||||||
|
// 边样式
|
||||||
|
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px" // 根据后台数据来改变连线的颜色
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
g.nodes().length - 1
|
||||||
|
g.nodes().forEach(function (v) {
|
||||||
|
console.log("Node " + v + ": " + JSON.stringify(g.node(v)));
|
||||||
|
});
|
||||||
|
// 创建渲染器
|
||||||
|
let render = new dagreD3.render();
|
||||||
|
// 选择 svg 并添加一个g元素作为绘图容器.
|
||||||
|
let svg = d3.select('#mySvg');
|
||||||
|
let svgGroup = svg.append('g');
|
||||||
|
// 在绘图容器上运行渲染器生成流程图.
|
||||||
|
render(d3.select("svg g"), g);
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
closeMark() {
|
||||||
|
this.limitedWatch = false;
|
||||||
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -245,5 +363,75 @@
|
||||||
border: 1px solid #dcdfe6;
|
border: 1px solid #dcdfe6;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-track {
|
||||||
|
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .2);
|
||||||
|
background-color: #fefefe;
|
||||||
|
border-radius: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
border-radius: 7px;
|
||||||
|
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .5);
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
}
|
||||||
|
.svgMark {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
overflow: auto;
|
||||||
|
margin: 0;
|
||||||
|
z-index: 2000;
|
||||||
|
background: rgba(0, 0, 0, .3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.svgWrapper {
|
||||||
|
background: #fff;
|
||||||
|
width: 800px;
|
||||||
|
margin:0 auto;
|
||||||
|
height: 100vh;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 2px;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
.svgItem {
|
||||||
|
padding: 20px 40px 0;
|
||||||
|
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
|
||||||
|
font-size: 18px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.node rect {
|
||||||
|
stroke: #606266;
|
||||||
|
fill: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.edgePath path {
|
||||||
|
stroke: #606266;
|
||||||
|
fill: #333;
|
||||||
|
stroke-width: 1.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
g.conditions > rect {
|
||||||
|
fill: #00ffd0;
|
||||||
|
stroke: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-icon-close {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue