tijiao
This commit is contained in:
commit
0d114bf349
|
|
@ -15,15 +15,17 @@
|
|||
"core-js": "3.22.8",
|
||||
"cropperjs": "1.5.12",
|
||||
"crypto-js": "4.1.1",
|
||||
"d3": "^7.6.1",
|
||||
"dagre-d3": "^0.6.4",
|
||||
"echarts": "5.3.2",
|
||||
"element-plus": "2.2.3",
|
||||
"json-editor-vue3": "^1.0.6",
|
||||
"nprogress": "0.2.0",
|
||||
"qrcodejs2": "0.0.2",
|
||||
"sortablejs": "1.15.0",
|
||||
"tinymce": "6.0.3",
|
||||
"vue": "3.2.36",
|
||||
"vue-i18n": "9.1.10",
|
||||
"vue-json-editor": "^1.4.3",
|
||||
"vue-router": "4.0.15",
|
||||
"vuedraggable": "4.0.3",
|
||||
"vuex": "4.0.2",
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ export default {
|
|||
oplcate: {
|
||||
list: {
|
||||
name: "获取",
|
||||
req: async function(data){
|
||||
req: async function (data) {
|
||||
return await http.get(
|
||||
`${config.API_URL}/opm/opl_cate/`,
|
||||
data
|
||||
|
|
@ -15,22 +15,22 @@ export default {
|
|||
},
|
||||
update: {
|
||||
name: "更新",
|
||||
req: async function(id, data){
|
||||
req: async function (id, data) {
|
||||
return await http.put(
|
||||
`${config.API_URL}/opm/opl_cate/${id}/`,
|
||||
data);
|
||||
}
|
||||
},
|
||||
read:{
|
||||
read: {
|
||||
name: "查询",
|
||||
req: async function(id){
|
||||
req: async function (id) {
|
||||
return await http.get(
|
||||
`${config.API_URL}/opm/opl_cate/${id}/`);
|
||||
}
|
||||
},
|
||||
create: {
|
||||
create: {
|
||||
name: "创建",
|
||||
req: async function(data){
|
||||
req: async function (data) {
|
||||
return await http.post(
|
||||
`${config.API_URL}/opm/opl_cate/`,
|
||||
data);
|
||||
|
|
@ -38,79 +38,75 @@ export default {
|
|||
},
|
||||
delete: {
|
||||
name: "删除",
|
||||
req: async function(id){
|
||||
req: async function (id) {
|
||||
return await http.delete(
|
||||
`${config.API_URL}/opm/opl_cate/${id}/`);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
/*作业*/
|
||||
operation: {
|
||||
list: {
|
||||
name: "获取",
|
||||
req: async function(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}/`);
|
||||
}
|
||||
/*作业*/
|
||||
operation: {
|
||||
list: {
|
||||
name: "获取",
|
||||
req: async function (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}/`);
|
||||
}
|
||||
}
|
||||
},
|
||||
/*作业许可证*/
|
||||
opl: {
|
||||
list: {
|
||||
name: "获取",
|
||||
req: async function(data){
|
||||
req: async function (data) {
|
||||
return await http.get(
|
||||
`${config.API_URL}/opm/opl/`,
|
||||
data
|
||||
);
|
||||
}
|
||||
},
|
||||
read:{
|
||||
read: {
|
||||
name: "查询",
|
||||
req: async function(id){
|
||||
req: async function (id) {
|
||||
return await http.get(
|
||||
`${config.API_URL}/opm/opl/${id}/`);
|
||||
}
|
||||
},
|
||||
update: {
|
||||
name: "更新",
|
||||
req: async function(id, data){
|
||||
req: async function (id, data) {
|
||||
return await http.put(
|
||||
`${config.API_URL}/opm/opl/${id}/`,
|
||||
data);
|
||||
|
|
@ -118,7 +114,7 @@ export default {
|
|||
},
|
||||
create: {
|
||||
name: "创建",
|
||||
req: async function(data){
|
||||
req: async function (data) {
|
||||
return await http.post(
|
||||
`${config.API_URL}/opm/opl/`,
|
||||
data);
|
||||
|
|
@ -126,94 +122,94 @@ export default {
|
|||
},
|
||||
delete: {
|
||||
name: "删除",
|
||||
req: async function(id){
|
||||
req: async function (id) {
|
||||
return await http.delete(
|
||||
`${config.API_URL}/opm/opl/${id}/`);
|
||||
}
|
||||
}
|
||||
},
|
||||
/*作业人员*/
|
||||
worker: {
|
||||
list: {
|
||||
name: "获取",
|
||||
req: async function(data){
|
||||
return await http.get(
|
||||
`${config.API_URL}/opm/opl_worker/`,
|
||||
data
|
||||
);
|
||||
/*作业人员*/
|
||||
worker: {
|
||||
list: {
|
||||
name: "获取",
|
||||
req: async function (data) {
|
||||
return await http.get(
|
||||
`${config.API_URL}/opm/opl_worker/`,
|
||||
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: {
|
||||
list: {
|
||||
name: "获取",
|
||||
req: async function(data){
|
||||
return await http.get(
|
||||
`${config.API_URL}/opm/gas_check/`,
|
||||
data
|
||||
);
|
||||
gas: {
|
||||
list: {
|
||||
name: "获取",
|
||||
req: async function (data) {
|
||||
return await http.get(
|
||||
`${config.API_URL}/opm/gas_check/`,
|
||||
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>
|
||||
|
|
@ -196,19 +196,17 @@ const routes = [
|
|||
"meta": {
|
||||
"title": "我创建的",
|
||||
"icon": "el-icon-folder-add",
|
||||
"perms": ["ownerwork"]
|
||||
},
|
||||
"component": "wf/ownerwork"
|
||||
}
|
||||
,
|
||||
|
||||
{
|
||||
"name": "duyt",
|
||||
"name": "duty",
|
||||
"path": "/wf/dutywork",
|
||||
"meta": {
|
||||
"title": "待办工单",
|
||||
"icon": "el-icon-folder-opened",
|
||||
"perms": ["duyt"]
|
||||
},
|
||||
"component": "wf/dutywork"
|
||||
},
|
||||
|
|
@ -218,7 +216,6 @@ const routes = [
|
|||
"meta": {
|
||||
"title": "我处理的",
|
||||
"icon": "el-icon-expand",
|
||||
"perms": ["worked"]
|
||||
},
|
||||
"component": "wf/worked"
|
||||
},
|
||||
|
|
@ -228,7 +225,6 @@ const routes = [
|
|||
"meta": {
|
||||
"title": "抄送我的",
|
||||
"icon": "el-icon-edit-pen",
|
||||
"perms": ["ccwork"]
|
||||
},
|
||||
"component": "wf/ccwork"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import scQrCode from './components/scQrCode'
|
|||
|
||||
import scStatusIndicator from './components/scMini/scStatusIndicator'
|
||||
import scTrend from './components/scMini/scTrend'
|
||||
import scFire from './components/scOpl/scFire'
|
||||
|
||||
import auth from './directives/auth'
|
||||
import role from './directives/role'
|
||||
|
|
@ -62,6 +63,7 @@ export default {
|
|||
app.component('scStatusIndicator', scStatusIndicator);
|
||||
app.component('scUserSelect', scUserSelect);
|
||||
app.component('scTrend', scTrend);
|
||||
app.component('scFire', scFire);
|
||||
|
||||
//注册全局指令
|
||||
app.directive('auth', auth);
|
||||
|
|
|
|||
|
|
@ -279,6 +279,10 @@ body .tox-tinymce-aux {
|
|||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.el-col .el-card {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.el-card,
|
||||
.el-message {
|
||||
border-radius: 0px;
|
||||
|
|
|
|||
|
|
@ -39,40 +39,33 @@
|
|||
prop="name"
|
||||
min-width="150"
|
||||
></el-table-column>
|
||||
<el-table-column label="音量" prop="extra" min-width="100">
|
||||
<el-table-column label="音量" prop="extra" min-width="40">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.extra && scope.row.extra.player">{{
|
||||
scope.row.extra.player.EnvVolume
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="设备sn"
|
||||
prop="sn"
|
||||
min-width="150"
|
||||
></el-table-column>
|
||||
<el-table-column label="ip" prop="extra" min-width="90">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.extra">{{ scope.row.extra.ip }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="在线状态" prop="extra" min-width="90">
|
||||
<el-table-column label="在线状态" prop="extra" min-width="40">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.extra">{{ scope.row.extra.online }}</span>
|
||||
<span v-if="scope.row.extra">
|
||||
<el-tag v-if="scope.row.extra.online">在线</el-tag>
|
||||
<el-tag v-else type="danger">离线</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="位置" prop="count_people" min-width="90"></el-table-column>-->
|
||||
<el-table-column
|
||||
label="所在区域"
|
||||
prop="create_time"
|
||||
min-width="180"
|
||||
prop="my_info.area_name"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="覆盖区域"
|
||||
prop="create_time"
|
||||
width="160"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="160">
|
||||
<el-table-column label="操作" fixed="right" align="center" width="180">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
<span v-if="scope.row.employee">{{scope.row.employee_.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="160">
|
||||
<el-table-column label="操作" fixed="right" align="center" width="180">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
|
|
|
|||
|
|
@ -71,12 +71,17 @@
|
|||
<span v-else><el-tag type="success">在线</el-tag></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="所在区域"
|
||||
prop="my_info.area_name"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="createTime"
|
||||
min-width="160"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="260">
|
||||
<el-table-column label="操作" fixed="right" align="center" width="180">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
|
|
|
|||
|
|
@ -1,124 +1,117 @@
|
|||
<template>
|
||||
<el-row>
|
||||
<el-col :md="4" :sm="24" style="padding-left: 7.5px;padding-right: 7.5px">
|
||||
<el-card shadow="hover" style="height:438px;" header="工单待办">
|
||||
<div class="welcome" v-for="item in dutyAgg" :key="item.workflow">
|
||||
<div style="width:33%;float:left">
|
||||
<div style="margin: 0px 20px 12px 40px;">
|
||||
<el-badge :value="item.count" class="item">
|
||||
<el-button
|
||||
icon="el-icon-document-copy"
|
||||
type="primary"
|
||||
size="small"
|
||||
></el-button>
|
||||
|
||||
</el-badge>
|
||||
<el-row :gutter="6">
|
||||
<el-col :md="4" :sm="24">
|
||||
<el-card shadow="hover">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>工单待办</span>
|
||||
</div>
|
||||
<div style="margin: 0px 20px 12px 40px">
|
||||
<span>{{item.workflow__name}}</span>
|
||||
</template>
|
||||
<div class="card-body">
|
||||
<div v-for="item in dutyAgg" :key="item.workflow">
|
||||
<el-badge :value="item.count" class="item">
|
||||
<el-button
|
||||
icon="el-icon-document-copy"
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="toTicket"
|
||||
></el-button>
|
||||
</el-badge>
|
||||
<div style="font-size:12px">{{ item.workflow__name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :md="10" :sm="24" style="padding-left: 7.5px;padding-right: 7.5px;
|
||||
">
|
||||
<el-card shadow="hover" header="今日事件">
|
||||
<el-button style="float: right; padding: 3px;margin-top: -44px;" link @click="moreEvent">更多</el-button>
|
||||
<div class="welcome">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
:params="params"
|
||||
row-key="id"
|
||||
fit
|
||||
stripe
|
||||
hideDo
|
||||
|
||||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
type="index"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column label="事件种类">
|
||||
<template #default="scope">
|
||||
<el-span
|
||||
v-for="item in scope.row.cates_"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>{{ item.name }}</el-span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="发生区域"
|
||||
prop="area_.name"
|
||||
></el-table-column>
|
||||
<el-table-column label="当事人" prop="employee_.name">
|
||||
<template #default="scope">
|
||||
<span
|
||||
v-if="scope.row.employee && scope.row.obj_cate == 'people'"
|
||||
>{{ scope.row.employee_.name }}</span
|
||||
>
|
||||
<span v-else>未知人员</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-card shadow="hover">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>今日事件</span>
|
||||
<el-button @click="moreEvent" type="primary" text>更多</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<div style="height:340px">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
:params="params"
|
||||
row-key="id"
|
||||
fit
|
||||
stripe
|
||||
hideDo
|
||||
>
|
||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="事件种类">
|
||||
<template #default="scope">
|
||||
<el-span
|
||||
v-for="item in scope.row.cates_"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>{{ item.name }}</el-span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发生区域" prop="area_.name"></el-table-column>
|
||||
<el-table-column label="当事人" prop="employee_.name">
|
||||
<template #default="scope">
|
||||
<span
|
||||
v-if="scope.row.employee && scope.row.obj_cate == 'people'"
|
||||
>{{ scope.row.employee_.name }}</span
|
||||
>
|
||||
<span v-else>未知人员</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="人员类型" prop="employee_.type">
|
||||
<template #default="scope">
|
||||
<el-table-column label="人员类型" prop="employee_.type">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.employee && scope.row.obj_cate == 'people'">
|
||||
<span
|
||||
v-if="scope.row.employee && scope.row.obj_cate == 'people'"
|
||||
v-if="
|
||||
scope.row.employee_.type != '' &&
|
||||
scope.row.employee_.type == 'employee'
|
||||
"
|
||||
>企业员工</span
|
||||
>
|
||||
<span
|
||||
v-if="
|
||||
scope.row.employee_.type != '' &&
|
||||
scope.row.employee_.type == 'employee'
|
||||
"
|
||||
>企业员工</span
|
||||
>
|
||||
<span
|
||||
v-if="
|
||||
scope.row.employee_.type != '' &&
|
||||
scope.row.employee_.type == 'remployee'
|
||||
"
|
||||
>相关方</span
|
||||
>
|
||||
<span
|
||||
v-if="
|
||||
scope.row.employee_.type != '' &&
|
||||
scope.row.employee_.type == 'visitor'
|
||||
"
|
||||
>访客</span
|
||||
>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="发生时间"
|
||||
prop="create_time"
|
||||
></el-table-column>
|
||||
<span
|
||||
v-if="
|
||||
scope.row.employee_.type != '' &&
|
||||
scope.row.employee_.type == 'remployee'
|
||||
"
|
||||
>相关方</span
|
||||
>
|
||||
<span
|
||||
v-if="
|
||||
scope.row.employee_.type != '' &&
|
||||
scope.row.employee_.type == 'visitor'
|
||||
"
|
||||
>访客</span
|
||||
>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="发生时间"
|
||||
prop="create_time"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
label="处理人"
|
||||
prop="handle_user_name"
|
||||
></el-table-column>
|
||||
|
||||
|
||||
</scTable>
|
||||
></el-table-column> -->
|
||||
</scTable>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :md="10" :sm="24" style="
|
||||
padding-left: 7.5px;">
|
||||
<el-card header="今日事件统计">
|
||||
<scEcharts
|
||||
height="360px"
|
||||
:option="option3"
|
||||
|
||||
></scEcharts>
|
||||
<el-col :md="8" :sm="24">
|
||||
<el-card shadow="hover">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>今日事件统计</span>
|
||||
</div>
|
||||
</template>
|
||||
<scEcharts height="340px" :option="option3"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -136,33 +129,34 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
dutyAgg:[],
|
||||
dutyAgg: [],
|
||||
params: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
start_create: ""
|
||||
start_create: "",
|
||||
},
|
||||
apiObj: null,
|
||||
postOptions: [],
|
||||
option3:null,
|
||||
operationnumber: null,
|
||||
rpjnumber:null,
|
||||
visitnumber:null
|
||||
option3: null,
|
||||
operationnumber: null,
|
||||
rpjnumber: null,
|
||||
visitnumber: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
var craeteTime=this.$TOOL.dateFormat(
|
||||
var craeteTime = this.$TOOL.dateFormat(
|
||||
new Date().toLocaleDateString(),
|
||||
"yyyy-MM-dd"
|
||||
);
|
||||
|
||||
|
||||
this.postOptions = [];
|
||||
this.$API.ecm.event.cateAgg.req({ completed: false,start_create:craeteTime }).then((res) => {
|
||||
res.details.forEach((itemI, indexI) => {
|
||||
this.postOptions.push({ value: itemI.count, name: itemI.cate__name });
|
||||
this.$API.ecm.event.cateAgg
|
||||
.req({ completed: false, start_create: craeteTime })
|
||||
.then((res) => {
|
||||
res.details.forEach((itemI, indexI) => {
|
||||
this.postOptions.push({ value: itemI.count, name: itemI.cate__name });
|
||||
});
|
||||
});
|
||||
});
|
||||
this.option3 = {
|
||||
title: {},
|
||||
tooltip: {
|
||||
|
|
@ -182,24 +176,27 @@ export default {
|
|||
|
||||
this.params.start_create = craeteTime;
|
||||
this.apiObj = this.$API.ecm.event.list;
|
||||
this.getdutyAgg();
|
||||
this.getdutyAgg();
|
||||
},
|
||||
|
||||
methods: {
|
||||
moreEvent(){
|
||||
this.$router.push({
|
||||
name: "event",
|
||||
query: {
|
||||
|
||||
},
|
||||
});
|
||||
moreEvent() {
|
||||
this.$router.push({
|
||||
name: "event",
|
||||
query: {},
|
||||
});
|
||||
},
|
||||
toTicket() {
|
||||
this.$router.push({
|
||||
name: "duty",
|
||||
query: {},
|
||||
});
|
||||
},
|
||||
//工单待办
|
||||
async getdutyAgg() {
|
||||
let res = await this.$API.wf.ticket.dutyAgg.req({ page: 0 });
|
||||
this.dutyAgg = res.details;
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -258,4 +255,16 @@ export default {
|
|||
text-align: center;
|
||||
margin: 40px 0 20px 0;
|
||||
}
|
||||
.card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height:24px;
|
||||
}
|
||||
.card-body {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
height:340px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,73 +1,61 @@
|
|||
<template>
|
||||
<el-row>
|
||||
|
||||
<el-col :md="12" :sm="24" style="padding-right: 7.5px; padding-left: 7.5px">
|
||||
<el-card header="进行项目">
|
||||
<div style="width:33%;float:left">
|
||||
<div style="margin: 0px 20px 12px 40px;">
|
||||
<el-badge :value="operationnumber" class="item">
|
||||
<el-button
|
||||
icon="el-icon-document-copy"
|
||||
type="primary"
|
||||
size="small"
|
||||
></el-button>
|
||||
</el-badge>
|
||||
<el-row :gutter="6">
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-card shadow="hover">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>进行项目</span>
|
||||
</div>
|
||||
<div style="margin: 0px 20px 12px 40px">
|
||||
<span>作业</span>
|
||||
</template>
|
||||
<div class="card-body">
|
||||
<div>
|
||||
<el-badge :value="operationnumber" class="item">
|
||||
<el-button
|
||||
icon="el-icon-document-copy"
|
||||
type="primary"
|
||||
size="small"
|
||||
></el-button>
|
||||
</el-badge>
|
||||
<div style="font-size:16px">危险作业</div>
|
||||
</div>
|
||||
<div>
|
||||
<el-badge :value="rpjnumber" class="item">
|
||||
<el-button
|
||||
icon="el-icon-document-copy"
|
||||
type="warning"
|
||||
size="small"
|
||||
></el-button>
|
||||
</el-badge>
|
||||
<div style="font-size:16px">相关方项目</div>
|
||||
</div>
|
||||
<div>
|
||||
<el-badge :value="visitnumber" class="item">
|
||||
<el-button
|
||||
icon="el-icon-document-copy"
|
||||
type="success"
|
||||
size="small"
|
||||
></el-button>
|
||||
</el-badge>
|
||||
<div style="font-size:16px">来访项目</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width:33%;float:left">
|
||||
<div style="margin: 0px 20px 12px 40px;">
|
||||
<el-badge :value="rpjnumber" class="item">
|
||||
<el-button
|
||||
icon="el-icon-document-copy"
|
||||
type="warning"
|
||||
size="small"
|
||||
></el-button>
|
||||
</el-badge>
|
||||
</div>
|
||||
<div style="margin: 0px 20px 12px 40px">
|
||||
<span>相关方项目</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width:33%;float:left">
|
||||
<div style="margin: 0px 20px 12px 40px;">
|
||||
<el-badge :value="visitnumber" class="item">
|
||||
<el-button
|
||||
icon="el-icon-document-copy"
|
||||
type="success"
|
||||
size="small"
|
||||
></el-button>
|
||||
</el-badge>
|
||||
</div>
|
||||
<div style="margin: 0px 20px 12px 40px">
|
||||
<span>访客项目</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" style="padding-left: 7.5px">
|
||||
<el-card>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-card shadow="hover">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<span>人员统计</span>
|
||||
<el-switch
|
||||
v-model="ep_count_type"
|
||||
active-text="在厂"
|
||||
inactive-text="有卡"
|
||||
@change="countTypeChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
<div class="screen-cockpits">
|
||||
<div class="cockpit-count">
|
||||
<div class="divider"></div>
|
||||
<div class="simple-title">
|
||||
<span>人员统计</span>
|
||||
<div class="countTypeWrap">
|
||||
<span
|
||||
:class="{ activeCount: countIndex === '1' }"
|
||||
@click="countINdexChange('1')"
|
||||
>有卡</span
|
||||
>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<span
|
||||
:class="{ activeCount: countIndex === '2' }"
|
||||
@click="countINdexChange('2')"
|
||||
>在厂</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="count-list">
|
||||
<div class="count-list-item">
|
||||
<div class="item-img item-img2"></div>
|
||||
|
|
@ -113,6 +101,7 @@ export default {
|
|||
return {
|
||||
dutyAgg: [],
|
||||
//数据统计
|
||||
ep_count_type: true,
|
||||
userCount: {
|
||||
total: 0,
|
||||
count_employee: 0, //内部员工
|
||||
|
|
@ -120,8 +109,8 @@ export default {
|
|||
count_visitor: 0, //相关方
|
||||
},
|
||||
operationnumber: null,
|
||||
rpjnumber:null,
|
||||
visitnumber:null
|
||||
rpjnumber: null,
|
||||
visitnumber: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -170,7 +159,7 @@ export default {
|
|||
this.operationnumber = res.count;
|
||||
});
|
||||
},
|
||||
//相关方入场项目
|
||||
//相关方入场项目
|
||||
getRpj() {
|
||||
this.$API.rpm.rpj.list
|
||||
.req({ page: 1, page_size: 1, state: 40 })
|
||||
|
|
@ -178,7 +167,7 @@ export default {
|
|||
this.rpjnumber = res.count;
|
||||
});
|
||||
},
|
||||
//访客
|
||||
//访客
|
||||
getVisit() {
|
||||
this.$API.vm.visit.list
|
||||
.req({ page: 1, page_size: 1, state: 40 })
|
||||
|
|
@ -271,12 +260,14 @@ export default {
|
|||
margin: 40px 0 20px 0;
|
||||
}
|
||||
.screen-cockpits {
|
||||
margin-top: -15px;
|
||||
// margin-top: -15px;
|
||||
.cockpit-count {
|
||||
.count-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-left: 30px;
|
||||
// flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
height: 80px;
|
||||
.count-list-item {
|
||||
width: 33.3333%;
|
||||
height: 50%;
|
||||
|
|
@ -481,4 +472,16 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
.card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height:24px;
|
||||
}
|
||||
.card-body {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
height:80px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<div v-if="nowCompsList.length<=0" class="no-widgets">
|
||||
<el-empty image="img/no-widgets.svg" description="没有部件啦" :image-size="280"></el-empty>
|
||||
</div>
|
||||
<el-row :gutter="15">
|
||||
<el-row :gutter="6">
|
||||
<el-col v-for="(item, index) in grid.layout" v-bind:key="index" :md="item" :xs="24">
|
||||
<draggable v-model="grid.copmsList[index]" animation="200" handle=".customize-overlay" group="people" item-key="com" dragClass="aaaaa" force-fallback fallbackOnBody class="draggable-box">
|
||||
<template #item="{ element }">
|
||||
|
|
@ -193,7 +193,7 @@
|
|||
|
||||
<style scoped lang="scss">
|
||||
.widgets-home {display: flex;flex-direction: row;flex: 1;height: 100%;}
|
||||
.widgets-content {flex: 1;overflow: auto;overflow-x:hidden;padding:15px;}
|
||||
.widgets-content {flex: 1;overflow: auto;overflow-x:hidden;padding:8px;}
|
||||
.widgets-aside {width: 360px;background: #fff;box-shadow: 0 0 10px rgba(0,0,0,.1);position: relative;overflow: auto;}
|
||||
.widgets-aside-title {font-size: 14px;display: flex;align-items: center;justify-content: center;}
|
||||
.widgets-aside-title i {margin-right: 10px;font-size: 18px;}
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@
|
|||
clearable
|
||||
:placeholder="$t('login.userPlaceholder')"
|
||||
>
|
||||
<template #append>
|
||||
<!-- <template #append>
|
||||
<el-select v-model="userType" style="width: 130px">
|
||||
<el-option :label="$t('login.admin')" value="admin"></el-option>
|
||||
<el-option :label="$t('login.user')" value="user"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</template> -->
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
|
|
|
|||
|
|
@ -1,281 +1,283 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="add" v-auth="'operation.create'"></el-button>
|
||||
<!-- <el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
||||
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button> -->
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
placeholder="名称"
|
||||
clearable
|
||||
@click="upsearch"
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="upsearch"
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="tableoperation"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
@selection-change="selectionChange"
|
||||
stripe
|
||||
@resetQuery="resetQuery"
|
||||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
fixed="left"
|
||||
type="index"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="作业简介"
|
||||
prop="name"
|
||||
width="200"
|
||||
fixed="left"
|
||||
></el-table-column>
|
||||
<el-table-column label="作业状态" prop="state" width="180" fixed="left">
|
||||
<template #default="scope">{{
|
||||
stateoptions[scope.row.state]
|
||||
}}</template></el-table-column
|
||||
>
|
||||
<el-table-column
|
||||
label="生产状态"
|
||||
prop="state_work"
|
||||
width="180"
|
||||
fixed="left"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="具体地点"
|
||||
prop="place"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="作业开始时间"
|
||||
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="area"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="属地部门"
|
||||
prop="dept_ter"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="业务部门"
|
||||
prop="dept_bus"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="业务部门协调员"
|
||||
prop="coordinator"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="创建人"
|
||||
prop="create_by"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="create_time"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="left" width="170">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
text
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="creatopl(scope.row)"
|
||||
v-auth="'operation.create'"
|
||||
>关联许可证</el-button
|
||||
>
|
||||
<el-button
|
||||
text
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="table_show(scope.row, scope.$index)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
text
|
||||
type="warning"
|
||||
size="small"
|
||||
@click="table_edit(scope.row, scope.$index)"
|
||||
v-auth="'operation.update'"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
text
|
||||
type="primary"
|
||||
size="small"
|
||||
v-if="scope.row.state == 10"
|
||||
@click="table_del(scope.row)"
|
||||
v-auth="'operation.delete'"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
></save-dialog>
|
||||
</el-container>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="add" v-auth="'operation.create'"></el-button>
|
||||
<!-- <el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
||||
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button> -->
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
placeholder="名称"
|
||||
clearable
|
||||
@click="upsearch"
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="upsearch"
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="tableoperation"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
@selection-change="selectionChange"
|
||||
stripe
|
||||
@resetQuery="resetQuery"
|
||||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
fixed="left"
|
||||
type="index"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="作业简介"
|
||||
prop="name"
|
||||
width="200"
|
||||
fixed="left"
|
||||
></el-table-column>
|
||||
<el-table-column label="作业状态" prop="state" width="180" fixed="left">
|
||||
<template #default="scope">{{stateoptions[scope.row.state]}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="生产状态"
|
||||
prop="state_work"
|
||||
width="180"
|
||||
fixed="left"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="具体地点"
|
||||
prop="place"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="作业开始时间"
|
||||
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="area"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="属地部门"
|
||||
prop="dept_ter"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="业务部门"
|
||||
prop="dept_bus"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="业务部门协调员"
|
||||
prop="coordinator"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="创建人"
|
||||
prop="create_by"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="create_time"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="left" width="170">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
text
|
||||
type="primary"
|
||||
size="small"
|
||||
v-auth="'operation.update'"
|
||||
@click="creatopl(scope.row)"
|
||||
>许可证
|
||||
</el-button>
|
||||
<el-button
|
||||
text
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="table_show(scope.row, scope.$index)"
|
||||
>查看
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.state === 10"
|
||||
text
|
||||
type="warning"
|
||||
size="small"
|
||||
v-auth="'operation.update'"
|
||||
@click="table_edit(scope.row, scope.$index)"
|
||||
>编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
text
|
||||
type="danger"
|
||||
size="small"
|
||||
v-if="scope.row.state === 10"
|
||||
v-auth="'operation.delete'"
|
||||
@click="table_del(scope.row)"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
></save-dialog>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
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");
|
||||
});
|
||||
},
|
||||
<script>
|
||||
import saveDialog from "./operation_form.vue";
|
||||
|
||||
//编辑
|
||||
table_edit(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
//查看
|
||||
table_show(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("show").setData(row);
|
||||
});
|
||||
},
|
||||
//创建作业许可证
|
||||
creatopl(row) {
|
||||
this.$router.push({
|
||||
name: "opl",
|
||||
query: {
|
||||
id: row.id,
|
||||
},
|
||||
});
|
||||
},
|
||||
//权限设置
|
||||
permission() {
|
||||
this.dialog.permission = true;
|
||||
this.$nextTick(() => {
|
||||
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;
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
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: {
|
||||
|
||||
//表格选择后回调事件
|
||||
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>
|
||||
//添加
|
||||
add() {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("add");
|
||||
});
|
||||
},
|
||||
|
||||
//编辑
|
||||
table_edit(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
//查看
|
||||
table_show(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("show").setData(row);
|
||||
});
|
||||
},
|
||||
//创建作业许可证
|
||||
creatopl(row) {
|
||||
this.$router.push({
|
||||
name: "opl",
|
||||
query: {
|
||||
id: row.id,
|
||||
},
|
||||
});
|
||||
},
|
||||
//权限设置
|
||||
permission() {
|
||||
this.dialog.permission = true;
|
||||
this.$nextTick(() => {
|
||||
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) {
|
||||
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,417 +1,468 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
icon="el-icon-plus"
|
||||
style="margin: 3px 0px 0px 10px"
|
||||
v-for="(item, index) in oplcateList"
|
||||
:key="index"
|
||||
:title="item.name"
|
||||
type="primary"
|
||||
@click="addFire(item.id, item.name)"
|
||||
v-auth="'opl.create'"
|
||||
>
|
||||
{{ item.name }}
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
placeholder="名称"
|
||||
clearable
|
||||
@click="upsearch"
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="upsearch"
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:data="apiObj"
|
||||
row-key="id"
|
||||
@selection-change="selectionChange"
|
||||
stripe
|
||||
@resetQuery="resetQuery"
|
||||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
type="index"
|
||||
width="50"
|
||||
fixed="left"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="作业许可编号"
|
||||
prop="number"
|
||||
width="120"
|
||||
fixed="left"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="作业级别"
|
||||
prop="level"
|
||||
width="120"
|
||||
fixed="left"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="许可证种类"
|
||||
prop="cate_name"
|
||||
width="120"
|
||||
fixed="left"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="作业开始时间"
|
||||
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-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
icon="el-icon-plus"
|
||||
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 }}
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input
|
||||
v-model="search.keyword"
|
||||
placeholder="名称"
|
||||
clearable
|
||||
@click="upsearch"
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="upsearch"
|
||||
></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card>
|
||||
<el-descriptions title="作业详情" :column="3">
|
||||
<el-descriptions-item label="作业名称:">
|
||||
{{operationObj.name}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="具体地点:">
|
||||
{{operationObj.place }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="生产状态:">
|
||||
{{operationObj.state_work }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="状态:">
|
||||
{{state_[operationObj.state] }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="开始时间:">
|
||||
{{operationObj.start_time }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="结束时间:">
|
||||
{{operationObj.end_time }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:data="apiObj"
|
||||
row-key="id"
|
||||
@selection-change="selectionChange"
|
||||
stripe
|
||||
@resetQuery="resetQuery"
|
||||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
type="index"
|
||||
width="50"
|
||||
fixed="left"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="作业许可编号"
|
||||
prop="number"
|
||||
width="120"
|
||||
fixed="left"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="作业级别"
|
||||
prop="level"
|
||||
width="120"
|
||||
fixed="left"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="许可证种类"
|
||||
prop="cate_name"
|
||||
width="120"
|
||||
fixed="left"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="作业开始时间"
|
||||
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">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
text
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="table_show(scope.row, scope.$index)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
text
|
||||
type="warning"
|
||||
size="small"
|
||||
@click="table_edit(scope.row, scope.$index)"
|
||||
v-auth="'opl.update'"
|
||||
>编辑</el-button
|
||||
>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<el-table-column label="操作" fixed="right" align="right" width="170">
|
||||
<template #default="scope">
|
||||
<el-button-group>
|
||||
<el-button
|
||||
text
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="table_show(scope.row, scope.$index)"
|
||||
>查看
|
||||
</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="operationObj.state===10"
|
||||
text
|
||||
type="warning"
|
||||
size="small"
|
||||
v-auth="'opl.update'"
|
||||
@click="table_edit(scope.row, scope.$index)"
|
||||
>编辑
|
||||
</el-button
|
||||
>
|
||||
</el-button-group>
|
||||
</template>
|
||||
</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>
|
||||
<script>
|
||||
export default {
|
||||
name: "opl",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
dialog: {
|
||||
save: false,
|
||||
permission: false,
|
||||
},
|
||||
apiObj: [],
|
||||
query: {},
|
||||
selection: [],
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
oplcateList: {},
|
||||
};
|
||||
},
|
||||
<script>
|
||||
import ScFire from "../../components/scOpl/scFire";
|
||||
|
||||
mounted() {
|
||||
this.getoplcate();
|
||||
this.getopllist();
|
||||
},
|
||||
methods: {
|
||||
//作业许可证列表
|
||||
getopllist() {
|
||||
this.$API.opm.opl.list.req({ operation:this.$route.query.id, page: 0 }).then((res) => {
|
||||
this.apiObj = res;
|
||||
});
|
||||
},
|
||||
export default {
|
||||
name: "opl",
|
||||
components: {ScFire},
|
||||
data() {
|
||||
return {
|
||||
dialog: {
|
||||
save: false,
|
||||
permission: false,
|
||||
},
|
||||
apiObj: [],
|
||||
query: {},
|
||||
selection: [],
|
||||
search: {
|
||||
keyword: null,
|
||||
},
|
||||
oplcateList: {},
|
||||
operationObj: {},
|
||||
showLimited: false,
|
||||
oplId: '',
|
||||
state_: {
|
||||
10: "创建中",
|
||||
20: "审批中",
|
||||
30: "待入厂",
|
||||
40: "进行中",
|
||||
50: "已完成",
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
//作业许可证类型列表
|
||||
getoplcate() {
|
||||
this.$API.opm.oplcate.list.req({ page: 0 }).then((res) => {
|
||||
this.oplcateList = res;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
mounted() {
|
||||
this.getoplcate();
|
||||
this.getopllist();
|
||||
this.getOperation();
|
||||
},
|
||||
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) {
|
||||
switch (name) {
|
||||
case "动火":
|
||||
this.$router.push({
|
||||
name: "fire",
|
||||
query: {
|
||||
operationid: this.$route.query.id, //作业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) {
|
||||
switch (row.cate_name) {
|
||||
case "动火":
|
||||
this.$router.push({
|
||||
name: "fire",
|
||||
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) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("show").setData(row);
|
||||
});
|
||||
},
|
||||
//权限设置
|
||||
permission() {
|
||||
this.dialog.permission = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.permissionDialog.open();
|
||||
});
|
||||
},
|
||||
//删除
|
||||
async table_del(row) {
|
||||
var reqData = { id: row.id };
|
||||
var res = await this.$API.demo.post.post(reqData);
|
||||
if (res.code == 200) {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功");
|
||||
} else {
|
||||
this.$alert(res.message, "提示", { type: "error" });
|
||||
}
|
||||
},
|
||||
//批量删除
|
||||
async batch_del() {
|
||||
this.$confirm(
|
||||
`确定删除选中的 ${this.selection.length} 项吗?如果删除项中含有子集将会被一并删除`,
|
||||
"提示",
|
||||
{
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
const loading = this.$loading();
|
||||
this.$refs.table.refresh();
|
||||
loading.close();
|
||||
this.$message.success("操作成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
//表格选择后回调事件
|
||||
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.table.tableData);
|
||||
return target;
|
||||
},
|
||||
//本地更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
if (mode == "add") {
|
||||
this.$refs.table.refresh();
|
||||
} else if (mode == "edit") {
|
||||
this.$refs.table.refresh();
|
||||
}
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
//作业许可证类型列表
|
||||
getoplcate() {
|
||||
this.$API.opm.oplcate.list.req({page: 0}).then((res) => {
|
||||
this.oplcateList = res;
|
||||
console.log(res);
|
||||
});
|
||||
},
|
||||
|
||||
//点击作业类型,创建作业许可证添加
|
||||
addFire(id, name) {
|
||||
switch (name) {
|
||||
case "动火":
|
||||
this.$router.push({
|
||||
name: "fire",
|
||||
query: {
|
||||
operationid: this.$route.query.id, //作业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) {
|
||||
switch (row.cate_name) {
|
||||
case "动火":
|
||||
this.$router.push({
|
||||
name: "fire",
|
||||
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) {
|
||||
this.showLimited = true;
|
||||
this.oplId = row.id;
|
||||
this.oplName = row.cate_name;
|
||||
this.workId = row.workers[0];
|
||||
},
|
||||
//权限设置
|
||||
permission() {
|
||||
this.dialog.permission = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.permissionDialog.open();
|
||||
});
|
||||
},
|
||||
//删除
|
||||
async table_del(row) {
|
||||
var reqData = {id: row.id};
|
||||
var res = await this.$API.demo.post.post(reqData);
|
||||
if (res.code == 200) {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功");
|
||||
} else {
|
||||
this.$alert(res.message, "提示", {type: "error"});
|
||||
}
|
||||
},
|
||||
//批量删除
|
||||
async batch_del() {
|
||||
this.$confirm(
|
||||
`确定删除选中的 ${this.selection.length} 项吗?如果删除项中含有子集将会被一并删除`,
|
||||
"提示",
|
||||
{
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
const loading = this.$loading();
|
||||
this.$refs.table.refresh();
|
||||
loading.close();
|
||||
this.$message.success("操作成功");
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
//表格选择后回调事件
|
||||
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.table.tableData);
|
||||
return target;
|
||||
},
|
||||
//本地更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
if (mode == "add") {
|
||||
this.$refs.table.refresh();
|
||||
} else if (mode == "edit") {
|
||||
this.$refs.table.refresh();
|
||||
}
|
||||
},
|
||||
resetQuery() {
|
||||
this.query = {};
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ export default {
|
|||
//编辑
|
||||
editMenu(row) {
|
||||
this.type = "edit";
|
||||
this.addForm = row;
|
||||
this.addForm = Object.assign({}, row);
|
||||
this.limitedVisible = true;
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -37,9 +37,7 @@
|
|||
<template #default="scope">
|
||||
<el-button type="text" size="small" @click="handleShow(scope.row)">查看详情</el-button>
|
||||
<!--多人且主动接单-->
|
||||
<el-button v-if="scope.row.state_.distribute_type===1&&scope.row.participant_type===2"
|
||||
type="text" size="small" @click="handleAccept(scope.row)">接单
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
|
|
@ -82,15 +80,15 @@
|
|||
this.list = res;
|
||||
},
|
||||
handleShow(row) {
|
||||
let workflowKey = row.workflow_.key;
|
||||
let cateType = '',projectId='';
|
||||
if(workflowKey==='visit'){
|
||||
cateType = row.workflow_.key;
|
||||
let cateType = row.workflow_.key;
|
||||
let projectId='';
|
||||
if(cateType==='visit'){
|
||||
projectId = row.ticket_data.visit;
|
||||
}else if(workflowKey==='rparty'){
|
||||
cateType = row.workflow_.key;
|
||||
}else if(cateType==='rparty'){
|
||||
projectId = row.ticket_data.rpj;
|
||||
}else{}
|
||||
}else{
|
||||
projectId = row.ticket_data.opl;
|
||||
}
|
||||
this.$router.push({
|
||||
name: "visitdetail",
|
||||
query: {
|
||||
|
|
@ -101,14 +99,6 @@
|
|||
},
|
||||
});
|
||||
},
|
||||
handleAccept(row) {
|
||||
this.$API.wf.ticket.ticketAccept.req(row.id, {}).then(res => {
|
||||
if (res.err_msg) {
|
||||
} else {
|
||||
this.getList();
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-tabs style="width: 100%; height:100%" type="border-card" v-model="activeName" @tab-click="handleClick">
|
||||
<el-tabs style="width: 100%; height:100%" type="border-card" v-model="activeName" id="workflowElTabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="自定义字段" name="customField">
|
||||
<field v-if="activeName==='customField'"></field>
|
||||
</el-tab-pane>
|
||||
|
|
@ -45,5 +45,14 @@
|
|||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
#workflowElTabs > .el-tabs__content{
|
||||
height:calc(100% - 40px);
|
||||
}
|
||||
#workflowElTabs .el-tab-pane{
|
||||
height: calc(100% - 20px);
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -36,12 +36,24 @@
|
|||
<el-table-column label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-link
|
||||
v-if="(scope.row.act_state===1||scope.row.act_state===3)&&scope.row.participant_type!==2&&scope.row.state_.type===0"
|
||||
v-if="(scope.row.act_state===1||scope.row.act_state===3)&&scope.row.state_.type===0"
|
||||
type="primary"
|
||||
@click="handleDetail(scope.row)"
|
||||
>
|
||||
处理
|
||||
</el-link>
|
||||
<!--多人处理,直接接单-->
|
||||
<!--<el-link
|
||||
v-if="scope.row.state_.distribute_type===1&&scope.row.participant_type===2"
|
||||
type="primary"
|
||||
@click="handleDetail(scope.row)"
|
||||
>
|
||||
接单
|
||||
</el-link>-->
|
||||
<el-button v-if="scope.row.state_.distribute_type===1&&scope.row.participant_type===2"
|
||||
type="text" size="small" @click="handleAccept(scope.row)">
|
||||
接单
|
||||
</el-button>
|
||||
<el-link
|
||||
type="success"
|
||||
@click="handleLogs(scope.row)"
|
||||
|
|
@ -126,11 +138,20 @@
|
|||
},
|
||||
//处理
|
||||
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({
|
||||
name: "visitdetail",
|
||||
query: {
|
||||
id: row.id,
|
||||
projectId:row.ticket_data.visit,
|
||||
projectId:projectId,
|
||||
catetype:row.workflow_.key
|
||||
},
|
||||
});
|
||||
|
|
@ -149,6 +170,14 @@
|
|||
}
|
||||
})
|
||||
},
|
||||
handleAccept(row) {
|
||||
this.$API.wf.ticket.ticketAccept.req(row.id, {}).then(res => {
|
||||
if (res.err_msg) {
|
||||
} else {
|
||||
this.getList();
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -42,21 +42,18 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="参与人类型">
|
||||
<template #default="scope">{{
|
||||
options_[scope.row.participant_type]
|
||||
}}</template>
|
||||
<template #default="scope">
|
||||
{{options_[scope.row.participant_type]}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分配方式">
|
||||
<template #default="scope">{{
|
||||
options2_[scope.row.distribute_type]
|
||||
}}</template>
|
||||
<template #default="scope">
|
||||
{{options2_[scope.row.distribute_type]}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="create_time"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="right" width="120">
|
||||
<template #default="scope">
|
||||
<el-button link size="small" @click="handleEdit(scope.row)"
|
||||
>编辑</el-button
|
||||
>
|
||||
>编辑</el-button>
|
||||
<el-popconfirm title="确定删除吗?">
|
||||
<template #reference>
|
||||
<el-button link size="small">删除</el-button>
|
||||
|
|
@ -167,7 +164,7 @@
|
|||
prop="participant"
|
||||
v-if="addForm.participant_type == 7"
|
||||
>
|
||||
<el-select
|
||||
<!-- <el-select
|
||||
style="width: 100%"
|
||||
v-model="addForm.participant"
|
||||
placeholder="请选择字段"
|
||||
|
|
@ -179,7 +176,8 @@
|
|||
:value="item.field_key"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
<el-input v-model="addForm.participant" placeholder="工单字段" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="参与者"
|
||||
|
|
@ -246,25 +244,11 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="过滤策略"
|
||||
prop="participant"
|
||||
v-if="
|
||||
addForm.participant_type == 4 || addForm.participant_type == 0|| addForm.participant_type == 10
|
||||
"
|
||||
label="部门过滤"
|
||||
prop="filter_dept"
|
||||
v-if="addForm.participant_type == 4 || addForm.participant_type == 0|| addForm.participant_type == 10"
|
||||
>
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="addForm.filter_policy"
|
||||
placeholder="请选择过滤策略"
|
||||
>
|
||||
<el-option label="无" value="0"></el-option>
|
||||
<el-option label="和工单同属以及上级部门" value="1"></el-option>
|
||||
<el-option label="和创建人同属以及上级部门" value="2"></el-option>
|
||||
<el-option
|
||||
label="和上步处理人同属以及上级部门"
|
||||
value="3"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-input v-model="addForm.filter_dept" placeholder="部门字段" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="代码选择" prop="participant" v-if="addForm.participant_type==9">
|
||||
<el-select style="width: 100%" v-model="participants" placeholder="请选择代码">
|
||||
|
|
@ -391,7 +375,6 @@ export default {
|
|||
participant_cc: [],
|
||||
enable_retreat: false,
|
||||
participant_type: 0,
|
||||
filter_policy: '0',
|
||||
distribute_type: 2, //分发类型
|
||||
state_fields: {}, //字段状态是否可写
|
||||
},
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
:data="list" ref="table"
|
||||
row-key="id" stripe highlightCurrentRow hidePagination
|
||||
>
|
||||
<el-table-column label="#" type="index"></el-table-column>
|
||||
<el-table-column label="ID" prop="id"></el-table-column>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
<el-table-column label="定时器(单位秒)" prop="timer"></el-table-column>
|
||||
|
|
@ -82,14 +83,15 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="条件表达式" prop="condition_expression">
|
||||
<vue-json-editor
|
||||
<!--<vue-json-editor
|
||||
style="width:100%"
|
||||
v-model="addForm.condition_expression"
|
||||
:showBtns="false"
|
||||
:mode="'code'"
|
||||
lang="zh"
|
||||
@json-change="onJsonChange"
|
||||
/>
|
||||
/>-->
|
||||
<JsonEditorVue class="editorJson" v-model="addForm.condition_expression"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="属性类型" prop="attribute_type">
|
||||
<el-select style="width: 100%" v-model="addForm.attribute_type" placeholder="请选择">
|
||||
|
|
@ -119,10 +121,11 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import vueJsonEditor from 'vue-json-editor'
|
||||
// import vueJsonEditor from 'vue-json-editor'
|
||||
import JsonEditorVue from 'json-editor-vue3'
|
||||
export default {
|
||||
name: "transform",
|
||||
components: { vueJsonEditor },
|
||||
components: { JsonEditorVue },
|
||||
data() {
|
||||
return {
|
||||
id: sessionStorage.getItem('jinYuWorkflowId'),
|
||||
|
|
@ -223,5 +226,7 @@
|
|||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.editorJson{
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -78,6 +78,34 @@
|
|||
</div>
|
||||
<show-dialog v-if="rpjShow" ref="showDialog"></show-dialog>
|
||||
</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'">
|
||||
<scTitle title="处理"></scTitle>
|
||||
<el-form :model="form" ref="addForm" label-width="100px" label-position="left">
|
||||
|
|
@ -156,6 +184,7 @@
|
|||
projectId: "",//对应项目的id
|
||||
userName: "",
|
||||
rpjDetail: {},
|
||||
oplDetail: {},
|
||||
ticketDetail: [],
|
||||
visitDetail: [],
|
||||
employeeLists: [],
|
||||
|
|
@ -204,10 +233,14 @@
|
|||
|
||||
},
|
||||
mounted() {
|
||||
debugger;
|
||||
if(this.cateType==='visit'){
|
||||
this.getVisit();
|
||||
}else if(this.cateType==='rparty'){
|
||||
this.getRpj();
|
||||
}else{
|
||||
debugger;
|
||||
this.getOpl();
|
||||
}
|
||||
this.getticketItem();
|
||||
this.getBtns();
|
||||
|
|
@ -246,6 +279,13 @@
|
|||
this.rpjDetail = res;
|
||||
});
|
||||
},
|
||||
//作业详情
|
||||
getOpl(){
|
||||
this.$API.opm.opl.read.req(this.projectId).then((res) => {
|
||||
debugger;
|
||||
this.oplDetail = res;
|
||||
});
|
||||
},
|
||||
//加签处理-start
|
||||
addNode(){
|
||||
this.limitedAdd = true;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<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="工作流名称" prop="name" 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-button link size="small" type="primary" @click="workflowEdit(scope.row)" v-auth="'workflow.update'">编辑</el-button>
|
||||
<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)">
|
||||
<template #reference>
|
||||
<el-button link size="small" type="danger" v-auth="'workflow.delete'">删除</el-button>
|
||||
|
|
@ -42,6 +50,15 @@
|
|||
</scTable>
|
||||
</el-main>
|
||||
</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-form :model="addForm" :rules="rules" ref="addForm" label-width="100px" label-position="left">
|
||||
<el-form-item label="名称" prop="name">
|
||||
|
|
@ -86,7 +103,10 @@
|
|||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dagreD3 from 'dagre-d3'
|
||||
import * as d3 from 'd3'
|
||||
export default {
|
||||
name: 'index',
|
||||
data() {
|
||||
|
|
@ -101,6 +121,7 @@
|
|||
editId: null,
|
||||
isSaving: false,
|
||||
limitedVisible: false,
|
||||
limitedWatch: false,
|
||||
type: "add",
|
||||
titleMap: {
|
||||
add: '新增',
|
||||
|
|
@ -234,7 +255,104 @@
|
|||
} else if (type == 'edit') {
|
||||
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>
|
||||
|
|
@ -245,5 +363,75 @@
|
|||
border: 1px solid #dcdfe6;
|
||||
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>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue