Merge branch 'CCM' of https://e.coding.net/ctcdevteam/hberp/hberp into CCM
This commit is contained in:
commit
e337c41e40
|
@ -12,11 +12,11 @@
|
|||
</el-badge>
|
||||
<!-- 提醒 -->
|
||||
<el-badge value="···" class="item right-menu-item navbarBadge" @click.native="showTheWarning">
|
||||
<el-icon class="el-icon-chat-dot-round elIconStyle" style="color: #ffcc40;"></el-icon>
|
||||
<el-icon class="el-icon-warning elIconStyle" style="color: #ffb23f;"></el-icon>
|
||||
</el-badge>
|
||||
<div @click="closeWarning" class="warningWrap" v-if="warningShow">
|
||||
<div @click.stop="handleClidk" class="warningContainer">
|
||||
<div class="titleWrap">警告列表
|
||||
<div class="titleWrap">提醒
|
||||
<el-select
|
||||
v-model="activeName"
|
||||
placeholder="提醒类别"
|
||||
|
@ -45,11 +45,11 @@
|
|||
|
||||
<span class="warningType" v-if="activeName=='库存警告'">低于安全库存</span>
|
||||
<span class="warningType" v-else-if="activeName=='临近交货'">临近交货日期</span>
|
||||
<span class="warningType" v-else-if="activeName=='过期提醒'">已过期</span>
|
||||
<span class="warningType hotWarning" v-else-if="activeName=='过期提醒'">已过期</span>
|
||||
<span class="warningType" v-if="item.warningType==1&&activeName=='设备检测'">接近校准日期</span>
|
||||
<span class="warningType" v-if="item.warningType==2&&activeName=='设备检测'">已过校准日期</span>
|
||||
<span class="warningType hotWarning" v-if="item.warningType==2&&activeName=='设备检测'">已过校准日期</span>
|
||||
<span class="warningType" v-if="item.warningType==1&&activeName=='任务到期'">接近截止日期</span>
|
||||
<span class="warningType" v-if="item.warningType==2&&activeName=='任务到期'">已过截止日期</span>
|
||||
<span class="warningType hotWarning" v-if="item.warningType==2&&activeName=='任务到期'">已过截止日期</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -380,12 +380,12 @@ export default {
|
|||
padding: 20px 2px 20px 0;
|
||||
}
|
||||
.listItemWrap{
|
||||
|
||||
font-size: 14px;
|
||||
padding: 0 20px
|
||||
}
|
||||
.listItem{
|
||||
display:flex;
|
||||
color: #666666;
|
||||
justify-content:space-between;
|
||||
border-bottom: 1px dashed #b3b3b3;
|
||||
}
|
||||
|
|
|
@ -294,6 +294,45 @@ export const asyncRoutes = [
|
|||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: '/safeEnviro',
|
||||
// component: Layout,
|
||||
// redirect: '/safeEnviro/hiddenDanger',
|
||||
// name: 'safeEnviro',
|
||||
// meta: { title: '安环管理', icon: 'equipment', perms: ['employee_manage'] },
|
||||
// children: [
|
||||
// {
|
||||
// path: 'hiddenDanger',
|
||||
// name: 'hiddenDanger',
|
||||
// component: () => import('@/views/safeEnviro/hiddenDanger'),
|
||||
// meta: { title: '隐患排查', icon: 'equipment', perms: ['employee_manage'] }
|
||||
// },
|
||||
// {
|
||||
// path: 'riskControl',
|
||||
// name: 'riskControl',
|
||||
// component: () => import('@/views/safeEnviro/riskControl'),
|
||||
// meta: { title: '风险管控', icon: 'equipment', perms: ['employee_manage'] }
|
||||
// },
|
||||
// {
|
||||
// path: 'Education',
|
||||
// name: 'Education',
|
||||
// component: () => import('@/views/safeEnviro/Education'),
|
||||
// meta: { title: '教育培训', icon: 'equipment', perms: ['employee_manage'] }
|
||||
// } ,
|
||||
// {
|
||||
// path: 'environmetManage',
|
||||
// name: 'environmetManage',
|
||||
// component: () => import('@/views/safeEnviro/environmetManage'),
|
||||
// meta: { title: '环境管理', icon: 'equipment', perms: ['employee_manage'] }
|
||||
// } ,
|
||||
// {
|
||||
// path: 'intelligentAlarm',
|
||||
// name: 'intelligentAlarm',
|
||||
// component: () => import('@/views/safeEnviro/intelligentAlarm'),
|
||||
// meta: { title: '智能报警', icon: 'equipment', perms: ['employee_manage'] }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
path: '/sam',
|
||||
component: Layout,
|
||||
|
|
|
@ -62,7 +62,7 @@ div:focus {
|
|||
|
||||
// main-container global css
|
||||
.app-container {
|
||||
padding: 20px 30px;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.el-table--medium td, .el-table--medium th {
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
<el-icon class="el-icon-s-order svgIcon"></el-icon>
|
||||
</div>
|
||||
<div class="totalCountWrap">
|
||||
|
||||
<div class="totalCountNum">
|
||||
<span class="totalCount">{{contractTotalCurrent}}</span>
|
||||
<span>个</span>
|
||||
|
@ -179,7 +178,6 @@
|
|||
</el-date-picker>
|
||||
</div>
|
||||
<div id="chartColumn" style="width:100%;" :style="{height:cardTabelHeight+'px'}"></div>
|
||||
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
@ -243,7 +241,6 @@
|
|||
:height="pieHeight"
|
||||
></Echart>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -1096,7 +1093,7 @@
|
|||
margin-bottom: 20px;
|
||||
background: #ffffff;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||
// box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
|
||||
}
|
||||
.dashboardTopCard{
|
||||
background: none;
|
||||
|
|
|
@ -0,0 +1,512 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div>
|
||||
<el-button
|
||||
v-if="checkPermission(['material_create'])"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 2px">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
height="100"
|
||||
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="编号">
|
||||
<template slot-scope="scope">{{ scope.row.num }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型">
|
||||
<template slot-scope="scope">{{ typeOptions[scope.row.type] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="考试名">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="试卷名">
|
||||
<template slot-scope="scope">{{ scope.row.exampaper__name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="答卷时长">
|
||||
<template slot-scope="scope">{{ scope.row.duration }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开启时间">
|
||||
<template slot-scope="scope">{{ scope.row.starttime }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发布人">
|
||||
<template slot-scope="scope">{{ scope.row.createuser__name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态">
|
||||
<template slot-scope="scope">{{ statusOptions[scope.row.state] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="操作"
|
||||
width="220px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
v-if="checkPermission(['material_delete'])"
|
||||
type="danger"
|
||||
@click="handleDelete(scope)"
|
||||
>
|
||||
删除
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="materialList.count > 0"
|
||||
:total="materialList.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
:close-on-click-modal="false"
|
||||
title="新增风险"
|
||||
>
|
||||
<el-form
|
||||
ref="Form"
|
||||
:model="material"
|
||||
label-width="100px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
>
|
||||
<el-form-item label="分线区域">
|
||||
<el-input v-model="material.number" placeholder="分线区域"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型">
|
||||
<el-select style="width: 100%" v-model="material.type" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in typeoptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="管控层级">
|
||||
<el-select style="width: 100%" v-model="material.unit" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称">
|
||||
<el-input v-model="material.name" placeholder="规格型号"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="具体位置">
|
||||
<el-input v-model="material.specification" placeholder="规格型号"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirm('Form')">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getMaterialList,
|
||||
createMaterial,
|
||||
updateMaterial,
|
||||
deleteMaterial
|
||||
} from "@/api/mtm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import Pagination from "@/components/Pagination";
|
||||
|
||||
const defaultmaterial = {
|
||||
name: null,
|
||||
number: null,
|
||||
specification: null,
|
||||
unit: null,
|
||||
type: '',
|
||||
piece_count: null,
|
||||
sort_str: null,
|
||||
count_safe: 0,
|
||||
processes: [],
|
||||
};
|
||||
export default {
|
||||
name: "productList",
|
||||
components: {Pagination},
|
||||
data() {
|
||||
return {
|
||||
material: defaultmaterial,
|
||||
materialList: {
|
||||
count: 0,
|
||||
},
|
||||
typeOptions:{
|
||||
1:"正式考试"
|
||||
},
|
||||
statusOptions:{
|
||||
0:"已结束",
|
||||
|
||||
},
|
||||
options:[
|
||||
'公司级',
|
||||
'部门级',
|
||||
'班组级',
|
||||
'岗位级',
|
||||
]
|
||||
,
|
||||
options_: {
|
||||
|
||||
"1": '成品',
|
||||
"2": '半成品',
|
||||
"3": '主要原料',
|
||||
"4": '辅助材料',
|
||||
"5": '加工工具',
|
||||
"6": '辅助工装',
|
||||
|
||||
},
|
||||
typeoptions: [
|
||||
{
|
||||
value: '设备设施',
|
||||
label: '设备设施'
|
||||
}, {
|
||||
value: '作业活动',
|
||||
label: '作业活动'
|
||||
}
|
||||
],
|
||||
listQuery: {
|
||||
type: 1,
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
activeName: "",
|
||||
listLoading: true,
|
||||
dialogVisible: false,
|
||||
dialogType: "new",
|
||||
rule1: {
|
||||
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
number: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
|
||||
},
|
||||
tableData:[
|
||||
{
|
||||
num: "KS20220225114918",
|
||||
name: "铲装作业安全培训考试",
|
||||
state: 0,
|
||||
type: 1,
|
||||
exampaper__name: "铲装作业安全培训考试",
|
||||
starttime: "2022-02-25 11:44",
|
||||
duration: 60,
|
||||
createuser__name: "超级管理员",
|
||||
},
|
||||
{
|
||||
num: "KS20220224151511",
|
||||
name: "锡源爆破新入场人员考试",
|
||||
state: 0,
|
||||
type: 1,
|
||||
exampaper__name: "锡源爆破新入场人员培训",
|
||||
starttime: "2022-02-24 15:14",
|
||||
duration: 30,
|
||||
createuser__name: "超级管理员",
|
||||
},
|
||||
{
|
||||
num: "KS20220223151229",
|
||||
name: "IT工程师入场安全培训考试",
|
||||
state: 0,
|
||||
type: 1,
|
||||
exampaper__name: "新员工入场考试",
|
||||
starttime: "2022-02-23 15:12",
|
||||
duration: 50,
|
||||
createuser__name: "童军"
|
||||
},
|
||||
{
|
||||
num: "KS20220214103205",
|
||||
name: "五华驾驶员考试",
|
||||
state: 0,
|
||||
type: 1,
|
||||
exampaper__name: "五华驾驶员考试",
|
||||
starttime: "2022-02-14 10:30",
|
||||
duration: 30,
|
||||
createuser__name: "超级管理员",
|
||||
},
|
||||
{
|
||||
num: "KS20211229171024",
|
||||
name: "《安全生产法》学习竞答题",
|
||||
state: 0,
|
||||
type: 1,
|
||||
exampaper__name: "《安全生产法》学习竞答题C",
|
||||
starttime: "2021-12-29 18:00",
|
||||
duration: 60,
|
||||
createuser__name: "范智"
|
||||
},
|
||||
{
|
||||
num: "KS20211223114852",
|
||||
name: "钢成新员工入场培训",
|
||||
state: 0,
|
||||
type: 1,
|
||||
exampaper__name: "新员工入场考试",
|
||||
starttime: "2021-12-23 12:00",
|
||||
duration: 60,
|
||||
createuser__name: "超级管理员",
|
||||
},
|
||||
{
|
||||
num: "KS20211216154552",
|
||||
name: "入场安全培训考试",
|
||||
state: 0,
|
||||
type: 1,
|
||||
exampaper__name: "新员工入场考试",
|
||||
starttime: "2021-12-16 15:45",
|
||||
duration: 60,
|
||||
createuser__name: "超级管理员"
|
||||
},
|
||||
{
|
||||
num: "KS20211216153338",
|
||||
name: "入场安全培训考试",
|
||||
state: 0,
|
||||
type: 1,
|
||||
exampaper__name: "新员工入场考试",
|
||||
starttime: "2021-12-16 15:32",
|
||||
duration: 60,
|
||||
createuser__name: "超级管理员"
|
||||
},
|
||||
{
|
||||
num: "KS20211208121425",
|
||||
name: "洒水车操作规程",
|
||||
state: 0,
|
||||
type: 1,
|
||||
exampaper__name: "洒水车操作规程",
|
||||
starttime: "2021-12-08 12:14",
|
||||
duration: 60,
|
||||
createuser__name: "范文",
|
||||
},
|
||||
{
|
||||
num: "KS20211208120444",
|
||||
name: "装载机操作规程考卷",
|
||||
state: 0,
|
||||
type: 1,
|
||||
exampaper__name: "装载机操作规程考卷",
|
||||
starttime: "2021-12-08 12:04",
|
||||
duration: 60,
|
||||
createuser__name: "范文"
|
||||
},
|
||||
{
|
||||
num: "KS20211207111932",
|
||||
name: "钢成安全知识考试",
|
||||
state: 0,
|
||||
type: 1,
|
||||
exampaper__name: "钢成安全知识考试",
|
||||
starttime: "2021-12-07 11:18",
|
||||
duration: 30,
|
||||
createuser__name: "陈成"
|
||||
},
|
||||
{
|
||||
num: "KS20211203150258",
|
||||
name: "入场安全培训考试",
|
||||
state: 0,
|
||||
type: 1,
|
||||
exampaper__name: "绿化入场考试",
|
||||
starttime: "2021-12-03 15:01",
|
||||
duration: 60,
|
||||
createuser__name: "超级管理员"
|
||||
},
|
||||
{
|
||||
num: "KS20211115140053",
|
||||
name: "碎石部新员工入职考试",
|
||||
state: 0,
|
||||
type: 1,
|
||||
exampaper__name: "新员工入场考试",
|
||||
starttime: "2021-11-15 15:00",
|
||||
duration: 120,
|
||||
createuser__name: "超级管理员"
|
||||
},
|
||||
{
|
||||
num: "KS20211026092955",
|
||||
name: "《安全生产法》学习",
|
||||
state: 0,
|
||||
type: 1,
|
||||
exampaper__name: "《安全生产法》学习竞答题A",
|
||||
starttime: "2021-10-26 09:27",
|
||||
duration: 360,
|
||||
createuser__name: "卓扬"
|
||||
},
|
||||
{
|
||||
num: "KS20211025150948",
|
||||
name: "《安全生产法》学习竞答题B",
|
||||
state: 0,
|
||||
type: 1,
|
||||
exampaper__name: "《安全生产法》学习竞答题B",
|
||||
starttime: "2021-10-25 18:00",
|
||||
duration: 180,
|
||||
createuser__name: "汉宁"
|
||||
},
|
||||
{
|
||||
num: "KS20211025145727",
|
||||
name: "学习《安全生产法》(2)",
|
||||
state: 0,
|
||||
type: 1,
|
||||
exampaper__id: 9211,
|
||||
exampaper__name: "自动抽题试卷",
|
||||
starttime: "2021-10-25 18:00",
|
||||
endtime: "2021-10-25 20:00",
|
||||
duration: 120,
|
||||
createuser__name: "邱宁"
|
||||
},
|
||||
{
|
||||
num: "KS20211025090028",
|
||||
name: "新安全生产法",
|
||||
state: 0,
|
||||
type: 1,
|
||||
exampaper__id: 8627,
|
||||
exampaper__name: "《安全生产法》学习竞答题A",
|
||||
starttime: "2021-10-25 08:59",
|
||||
endtime: "2021-10-31 09:00",
|
||||
duration: 60,
|
||||
createuser__name: "范文文",
|
||||
},
|
||||
{
|
||||
num: "KS20211015153153",
|
||||
name: "新安全生产法学习考试",
|
||||
state: 0,
|
||||
type: 1,
|
||||
exampaper__id: 8627,
|
||||
exampaper__name: "《安全生产法》学习竞答题A",
|
||||
starttime: "2021-10-15 15:30",
|
||||
endtime: "2021-10-16 15:30",
|
||||
duration: 60,
|
||||
createuser__name: "超级管理员",
|
||||
},
|
||||
{
|
||||
num: "KS20211014160037",
|
||||
name: "学习新安全生产法考试",
|
||||
state: 0,
|
||||
type: 1,
|
||||
exampaper__id: 8627,
|
||||
exampaper__name: "《安全生产法》学习竞答题A",
|
||||
starttime: "2021-10-14 16:00",
|
||||
endtime: "2021-10-15 16:00",
|
||||
duration: 60,
|
||||
createuser__name: "超级管理员",
|
||||
},
|
||||
{
|
||||
num: "KS20211014155904",
|
||||
name: "学习新安全生产法考试",
|
||||
state: 0,
|
||||
type: 1,
|
||||
exampaper__id: 8627,
|
||||
exampaper__name: "《安全生产法》学习竞答题A",
|
||||
starttime: "2021-10-14 15:58",
|
||||
endtime: "2021-10-15 15:59",
|
||||
duration: 60,
|
||||
createuser__name: "姜军"
|
||||
},
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.getList();
|
||||
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
//成品详情
|
||||
handledetail(scope) {
|
||||
this.$router.push({name: "MaterialDetail", params: {id: scope.row.id, type: scope.row.type},})
|
||||
},
|
||||
getList() {
|
||||
let that = this;
|
||||
that.listLoading = true;
|
||||
getMaterialList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
that.materialList = response.data;
|
||||
}
|
||||
that.listLoading = false;
|
||||
});
|
||||
},
|
||||
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
resetFilter() {
|
||||
this.activeName = "";
|
||||
this.listQuery = {
|
||||
type: 1,
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
handleCreate() {
|
||||
this.material = Object.assign({}, defaultmaterial);
|
||||
this.dialogType = "new";
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
handleDelete(scope) {
|
||||
let that = this;
|
||||
this.$confirm("确认删除?", "警告", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "error",
|
||||
})
|
||||
.then(async () => {
|
||||
await deleteMaterial(scope.row.id);
|
||||
that.getList();
|
||||
that.$message.success("成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
that.$message.error(err);
|
||||
});
|
||||
},
|
||||
async confirm(form) {
|
||||
let that = this;
|
||||
that.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const isEdit = this.dialogType === "edit";
|
||||
if (isEdit) {
|
||||
updateMaterial(this.material.id, this.material).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
that.getList();
|
||||
that.dialogVisible = false;
|
||||
that.$message.success("成功");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
createMaterial(this.material).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
that.getList();
|
||||
that.dialogVisible = false;
|
||||
that.$message.success("成功");
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
|
@ -0,0 +1,280 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div>
|
||||
<el-button
|
||||
v-if="checkPermission(['material_create'])"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 2px">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="materialList.results"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
height="100"
|
||||
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="排放口">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.number }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检测时间">
|
||||
<template> 成品</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出:干烟含量">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出:氧含量">
|
||||
<template slot-scope="scope">{{ scope.row.specification }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出:二氧化硫">
|
||||
<template slot-scope="scope">{{ scope.row.piece_count }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出:二氧化硫折标">
|
||||
<template slot-scope="scope">{{ scope.row.unit }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出:颗粒物">
|
||||
<template slot-scope="scope">{{ scope.row.unit }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出:颗粒物折标">
|
||||
<template slot-scope="scope">{{ scope.row.unit }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出:氮氧化物">
|
||||
<template slot-scope="scope">{{ scope.row.unit }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出:氮氧化物折标">
|
||||
<template slot-scope="scope">{{ scope.row.unit }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="操作"
|
||||
width="220px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
type="danger"
|
||||
@click="handleDelete(scope)"
|
||||
>
|
||||
删除
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="materialList.count > 0"
|
||||
:total="materialList.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
|
||||
/>
|
||||
<!-- @pagination="getList" -->
|
||||
</el-card>
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
:close-on-click-modal="false"
|
||||
title="新增风险"
|
||||
>
|
||||
<el-form
|
||||
ref="Form"
|
||||
:model="material"
|
||||
label-width="140px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
>
|
||||
<el-form-item label="排放口">
|
||||
<el-select style="width: 100%" v-model="material.type" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="监测时间">
|
||||
<el-date-picker
|
||||
v-model="material.time"
|
||||
type="datetime"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="出:干烟含量">
|
||||
<el-input v-model="material.value" type="number" placeholder="出:干烟含量"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出:氧含量">
|
||||
<el-input v-model="material.value2" placeholder="出:氧含量"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出:二氧化硫">
|
||||
<el-input v-model="material.value3" placeholder="出:二氧化硫"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出:二氧化硫折标">
|
||||
<el-input v-model="material.value4" placeholder="出:二氧化硫折标"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出:颗粒物">
|
||||
<el-input v-model="material.value5" placeholder="出:颗粒物"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出:颗粒物折标">
|
||||
<el-input v-model="material.value6" placeholder="出:颗粒物折标"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出:氮氧化物">
|
||||
<el-input v-model="material.value7" placeholder="出:氮氧化物"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出:氮氧化物折标">
|
||||
<el-input v-model="material.value8" placeholder="出:氮氧化物折标"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirm('Form')">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getMaterialList,
|
||||
createMaterial,
|
||||
updateMaterial,
|
||||
deleteMaterial
|
||||
} from "@/api/mtm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import Pagination from "@/components/Pagination";
|
||||
|
||||
const defaultmaterial = {
|
||||
name: null,
|
||||
number: null,
|
||||
specification: null,
|
||||
unit: null,
|
||||
type: '',
|
||||
piece_count: null,
|
||||
sort_str: null,
|
||||
count_safe: 0,
|
||||
processes: [],
|
||||
};
|
||||
export default {
|
||||
name: "productList",
|
||||
components: {Pagination},
|
||||
data() {
|
||||
return {
|
||||
material: defaultmaterial,
|
||||
materialList: {
|
||||
count: 0,
|
||||
results:[]
|
||||
},
|
||||
options:[
|
||||
'预热器排口',
|
||||
'煤粉制备排口',
|
||||
],
|
||||
listQuery: {
|
||||
type: 1,
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
activeName: "",
|
||||
listLoading: false,
|
||||
dialogVisible: false,
|
||||
dialogType: "new",
|
||||
rule1: {
|
||||
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
number: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
//成品详情
|
||||
handledetail(scope) {
|
||||
this.$router.push({name: "MaterialDetail", params: {id: scope.row.id, type: scope.row.type},})
|
||||
},
|
||||
|
||||
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
|
||||
},
|
||||
resetFilter() {
|
||||
this.activeName = "";
|
||||
this.listQuery = {
|
||||
type: 1,
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
};
|
||||
|
||||
},
|
||||
handleCreate() {
|
||||
this.material = Object.assign({}, defaultmaterial);
|
||||
this.dialogType = "new";
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
handleDelete(scope) {
|
||||
let that = this;
|
||||
this.$confirm("确认删除?", "警告", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "error",
|
||||
})
|
||||
.then(async () => {
|
||||
await deleteMaterial(scope.row.id);
|
||||
|
||||
that.$message.success("成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
that.$message.error(err);
|
||||
});
|
||||
},
|
||||
async confirm(form) {
|
||||
let that = this;
|
||||
that.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const isEdit = this.dialogType === "edit";
|
||||
if (isEdit) {
|
||||
updateMaterial(this.material.id, this.material).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
|
||||
that.dialogVisible = false;
|
||||
that.$message.success("成功");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
createMaterial(this.material).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
|
||||
that.dialogVisible = false;
|
||||
that.$message.success("成功");
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
|
@ -0,0 +1,548 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div>
|
||||
<el-button
|
||||
v-if="checkPermission(['material_create'])"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 2px">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
height="100"
|
||||
v-el-height-adaptive-table="{bottomOffset: 50}"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="编号">
|
||||
<template slot-scope="scope">{{ scope.row.yhnum }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="流程状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.yhzt==6" type="success" effect="plain">{{ yhztOption[scope.row.yhzt] }}</el-tag >
|
||||
<el-tag v-else type="warning" effect="plain">{{ yhztOption[scope.row.yhzt] }}</el-tag >
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="下一步处理人">
|
||||
<template slot-scope="scope">{{ scope.row.todouser__name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="隐患等级">
|
||||
<template slot-scope="scope">{{ scope.row.yhdj__dickeyname }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="隐患类别">
|
||||
<template slot-scope="scope">{{ scope.row.yhlb__dickeyname }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="隐患评估">
|
||||
<template slot-scope="scope">{{ scope.row.yhpg__dickeyname }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发现人">
|
||||
<template slot-scope="scope">{{ scope.row.fxr__name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="隐患描述">
|
||||
<template slot-scope="scope">{{ scope.row.yhms }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="隐患状态">
|
||||
<template slot-scope="scope">{{ scope.row.unit }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="提交时间">
|
||||
<template slot-scope="scope">{{ scope.row.tbsj }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="操作"
|
||||
width="220px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
v-if="checkPermission(['material_delete'])"
|
||||
type="danger"
|
||||
@click="handleDelete(scope)"
|
||||
>
|
||||
删除
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="materialList.count > 0"
|
||||
:total="materialList.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
:close-on-click-modal="false"
|
||||
title="新增隐患"
|
||||
>
|
||||
<el-form
|
||||
ref="Form"
|
||||
:model="material"
|
||||
label-width="100px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
>
|
||||
<el-form-item label="隐患等级">
|
||||
<el-select style="width: 100%" v-model="material.level" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="检查类型">
|
||||
<el-select style="width: 100%" v-model="material.type" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in typeoptions"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发现时间">
|
||||
<el-date-picker
|
||||
v-model="material.time"
|
||||
type="datetime"
|
||||
placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="发现地点" >
|
||||
<el-input v-model="material.number" placeholder="成品编号"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="隐患描述">
|
||||
<el-input v-model="material.specification" placeholder="规格型号"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirm('Form')">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getMaterialList,
|
||||
createMaterial,
|
||||
updateMaterial,
|
||||
deleteMaterial
|
||||
} from "@/api/mtm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import Pagination from "@/components/Pagination";
|
||||
|
||||
const defaultmaterial = {
|
||||
name: null,
|
||||
number: null,
|
||||
specification: null,
|
||||
unit: null,
|
||||
type: 1,
|
||||
piece_count: null,
|
||||
sort_str: null,
|
||||
count_safe: 0,
|
||||
processes: [],
|
||||
};
|
||||
export default {
|
||||
name: "productList",
|
||||
components: {Pagination},
|
||||
data() {
|
||||
return {
|
||||
material: defaultmaterial,
|
||||
materialList: {
|
||||
count: 0,
|
||||
},
|
||||
yhztOption:{1:"待评估",5:'待复查',6:'已归档'},
|
||||
options: [
|
||||
'无隐患',
|
||||
'一般隐患',
|
||||
'重大隐患',
|
||||
'检查记录',
|
||||
],
|
||||
typeoptions: [
|
||||
'日常检查',
|
||||
'专项检查',
|
||||
'节假日检查',
|
||||
'季节性检查',
|
||||
'综合检查',
|
||||
'巡回检查',
|
||||
'供配电、动力系统电气专项检查',
|
||||
'消防专项检查',
|
||||
'边坡稳定性专项检查',
|
||||
'排土场检查',
|
||||
'防排水系统检查',
|
||||
'爆破器材中转点检查',
|
||||
'运输系统检查',
|
||||
'应急装备与通信系统检查',
|
||||
'作业场所职业危害检查',
|
||||
'其他 重要设备设施检查',
|
||||
'汛期检查',
|
||||
],
|
||||
listQuery: {
|
||||
type: 1,
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
activeName: "",
|
||||
listLoading: true,
|
||||
dialogVisible: false,
|
||||
dialogType: "new",
|
||||
rule1: {
|
||||
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
number: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
|
||||
},
|
||||
|
||||
tableData:[
|
||||
{
|
||||
fxr__name: "李燕",
|
||||
yhms: "运输车辆重压,造成道路出现缺口。",
|
||||
yhzt: 5,
|
||||
fxsj: "2023-02-14 15:30",
|
||||
tbsj: "2023-02-14 15:38",
|
||||
yhlb__dickeyname: "隐患排查治理",
|
||||
todouser__name: "李想",
|
||||
todouser__userid: 36268,
|
||||
yhpg__dickeyname: "无伤害",
|
||||
yhnum: "YH20230214153849",
|
||||
yhdj__dickeyname: "一般隐患",
|
||||
|
||||
},
|
||||
{
|
||||
fxr__name: "李辉",
|
||||
yhms: "东侧围网给钩鱼者破坏。",
|
||||
yhzt: 6,
|
||||
fxsj: "2023-01-11 16:21",
|
||||
tbsj: "2023-01-11 16:27",
|
||||
yhlb__dickeyname: "隐患排查治理",
|
||||
todouser__name: "李想",
|
||||
todouser__userid: null,
|
||||
yhpg__dickeyname: "无伤害",
|
||||
yhnum: "YH20230111162721",
|
||||
yhdj__dickeyname: "一般隐患",
|
||||
},
|
||||
{
|
||||
fxr__name: "李燕",
|
||||
yhms: "漏水,水漏进仓库会弄坏物资。",
|
||||
yhzt: 6,
|
||||
fxsj: "2023-01-11 10:33",
|
||||
tbsj: "2023-01-11 10:38",
|
||||
yhlb__dickeyname: "隐患排查治理",
|
||||
todouser__name: null,
|
||||
todouser__userid: null,
|
||||
yhpg__dickeyname: "无伤害",
|
||||
yhnum: "YH20230111103837",
|
||||
yhdj__dickeyname: "一般隐患",
|
||||
},
|
||||
{
|
||||
fxr__name: "姜苗",
|
||||
yhms: "出入口无围栏,春节假期期间存在再来,人员车辆进出风险",
|
||||
yhzt: 6,
|
||||
fxsj: "2023-01-10 15:40",
|
||||
tbsj: "2023-01-30 15:44",
|
||||
yhlb__dickeyname: "作业场所",
|
||||
todouser__name: "吴迪",
|
||||
todouser__userid: null,
|
||||
yhpg__dickeyname: "无伤害",
|
||||
yhnum: "YH20230130154423",
|
||||
yhdj__dickeyname: "一般隐患"
|
||||
},
|
||||
{
|
||||
fxr__name: "姜苗",
|
||||
yhms: "环境在线检测系统故障",
|
||||
yhzt: 6,
|
||||
fxsj: "2022-12-15 12:47",
|
||||
tbsj: "2022-12-30 12:50",
|
||||
yhlb__dickeyname: "设备设施",
|
||||
todouser__name: null,
|
||||
todouser__userid: null,
|
||||
yhpg__dickeyname: "无伤害",
|
||||
yhnum: "YH20221230125016",
|
||||
yhdj__dickeyname: "一般隐患"
|
||||
},
|
||||
{
|
||||
fxr__name: "李燕",
|
||||
yhms: "嘉华6分料堆盖网给风吹开,未符合政府有关部门要求。",
|
||||
yhzt: 6,
|
||||
fxsj: "2022-12-09 11:08",
|
||||
tbsj: "2022-12-09 11:14",
|
||||
yhlb__dickeyname: "原辅物料、产品",
|
||||
todouser__name: "吴迪",
|
||||
todouser__userid: null,
|
||||
yhpg__dickeyname: "无伤害",
|
||||
yhnum: "YH20221209111447",
|
||||
yhdj__dickeyname: "一般隐患"
|
||||
},
|
||||
{
|
||||
fxr__name: "李辉",
|
||||
yhms: "树木生长已超过路面,如果有运输车辆路过会碰坏档风玻璃。",
|
||||
yhzt: 6,
|
||||
fxsj: "2022-12-06 16:46",
|
||||
tbsj: "2022-12-06 16:56",
|
||||
yhlb__dickeyname: "隐患排查治理",
|
||||
todouser__name: null,
|
||||
todouser__userid: null,
|
||||
yhpg__dickeyname: "无伤害",
|
||||
yhnum: "YH20221206165607",
|
||||
yhdj__dickeyname: "一般隐患"
|
||||
},
|
||||
{
|
||||
fxr__name: "李辉",
|
||||
yhms: "树木生长过快档住海关监控。",
|
||||
yhzt: 6,
|
||||
fxsj: "2022-12-02 11:16",
|
||||
tbsj: "2022-12-02 11:20",
|
||||
yhlb__dickeyname: "隐患排查治理",
|
||||
todouser__name: "王丽",
|
||||
todouser__userid: null,
|
||||
yhpg__dickeyname: "无伤害",
|
||||
yhnum: "YH20221202112020",
|
||||
yhdj__dickeyname: "一般隐患",
|
||||
},
|
||||
{
|
||||
fxr__name: "江喵喵",
|
||||
yhms: "无疏散逃生指示图",
|
||||
yhzt: 6,
|
||||
fxsj: "2022-12-01 08:40",
|
||||
tbsj: "2022-12-30 12:45",
|
||||
yhlb__dickeyname: "作业场所",
|
||||
todouser__name: null,
|
||||
todouser__userid: null,
|
||||
yhpg__dickeyname: "无伤害",
|
||||
yhnum: "YH20221230124512",
|
||||
yhdj__dickeyname: "一般隐患"
|
||||
},
|
||||
{
|
||||
fxr__name: "江学苗",
|
||||
yhms: "原来雾化主机设备已经完全锈蚀",
|
||||
yhzt: 6,
|
||||
fxsj: "2022-11-29 15:36",
|
||||
tbsj: "2022-11-30 09:39",
|
||||
yhlb__dickeyname: "设备设施",
|
||||
todouser__name: null,
|
||||
todouser__userid: null,
|
||||
yhpg__dickeyname: "无伤害",
|
||||
yhnum: "YH20221130093947",
|
||||
yhdj__dickeyname: "一般隐患"
|
||||
},
|
||||
{
|
||||
fxr__name: "张城",
|
||||
yhms: "观看",
|
||||
yhzt: 1,
|
||||
fxsj: "2022-11-22 13:25",
|
||||
tbsj: "2022-11-22 13:26",
|
||||
yhlb__dickeyname: null,
|
||||
todouser__name: "王清现",
|
||||
todouser__userid: 1736,
|
||||
yhpg__dickeyname: null,
|
||||
yhnum: "YH20221122132633",
|
||||
yhdj__dickeyname: "一般隐患"
|
||||
},
|
||||
{
|
||||
fxr__name: "李辉",
|
||||
yhms: "船泊靠泊时拉断废旧览绳挂在轮胎铁链上,如果有船靠泊时,栓到螺施桨可能会造成事故隐患。",
|
||||
yhzt: 6,
|
||||
fxsj: "2022-11-14 16:42",
|
||||
tbsj: "2022-11-14 16:51",
|
||||
yhlb__dickeyname: "隐患排查治理",
|
||||
todouser__name: null,
|
||||
todouser__userid: null,
|
||||
yhpg__dickeyname: "无伤害",
|
||||
yhnum: "YH20221114165104",
|
||||
yhdj__dickeyname: "一般隐患",
|
||||
},
|
||||
{
|
||||
fxr__name: "建德",
|
||||
yhms: "码头前沿西侧围网已给海水腐蚀损坏,外来人员会利用围网损坏进入码头西侧前沿浅谈进行赶海",
|
||||
yhzt: 6,
|
||||
fxsj: "2022-11-13 17:06",
|
||||
tbsj: "2022-11-13 17:09",
|
||||
yhlb__dickeyname: "安全投入不足",
|
||||
todouser__name: null,
|
||||
todouser__userid: null,
|
||||
yhpg__dickeyname: "无伤害",
|
||||
yhnum: "YH20221113170913",
|
||||
yhdj__dickeyname: "一般隐患"
|
||||
},
|
||||
{
|
||||
fxr__name: "李辉",
|
||||
yhms: "空地树木生长过快,已超过杂物房楼面,造成很多落叶掉在上面,使排水堵塞。",
|
||||
yhzt: 6,
|
||||
fxsj: "2022-11-07 10:30",
|
||||
tbsj: "2022-11-07 10:37",
|
||||
yhlb__dickeyname: "隐患排查治理",
|
||||
todouser__name: null,
|
||||
todouser__userid: null,
|
||||
yhpg__dickeyname: "无伤害",
|
||||
yhnum: "YH20221107103711",
|
||||
yhdj__dickeyname: "一般隐患"
|
||||
},
|
||||
{
|
||||
fxr__name: "张雄",
|
||||
yhms: "防疫围网腐锈破损,被风吹烂",
|
||||
yhzt: 6,
|
||||
fxsj: "2022-11-01 09:14",
|
||||
tbsj: "2022-11-01 09:24",
|
||||
yhlb__dickeyname: "职业健康",
|
||||
todouser__name: null,
|
||||
todouser__userid: null,
|
||||
yhpg__dickeyname: "无伤害",
|
||||
yhnum: "YH20221101092400",
|
||||
yhdj__dickeyname: "一般隐患"
|
||||
},
|
||||
{
|
||||
fxr__name: "江苗",
|
||||
yhms: "厨房排插插孔被油污覆盖,存在短路风险",
|
||||
yhzt: 6,
|
||||
fxsj: "2022-10-28 10:49",
|
||||
tbsj: "2022-10-28 10:52",
|
||||
yhlb__dickeyname: "设备设施",
|
||||
todouser__name: null,
|
||||
todouser__userid: null,
|
||||
yhpg__dickeyname: "无伤害",
|
||||
yhnum: "YH20221028105254",
|
||||
yhdj__dickeyname: "一般隐患",
|
||||
},
|
||||
{
|
||||
fxr__name: "江苗",
|
||||
yhms: "氧气乙炔气体存放在物质仓库",
|
||||
yhzt: 6,
|
||||
fxsj: "2022-10-25 15:52",
|
||||
tbsj: "2022-10-28 10:59",
|
||||
yhlb__dickeyname: "设备设施",
|
||||
todouser__name: null,
|
||||
todouser__userid: null,
|
||||
yhpg__dickeyname: "无伤害",
|
||||
yhnum: "YH20221028105904",
|
||||
yhdj__dickeyname: "一般隐患"
|
||||
}
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.getList();
|
||||
// this.getProcessList();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
//成品详情
|
||||
handledetail(scope) {
|
||||
this.$router.push({name: "MaterialDetail", params: {id: scope.row.id, type: scope.row.type},})
|
||||
},
|
||||
getList() {
|
||||
let that = this;
|
||||
that.listLoading = true;
|
||||
getMaterialList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
that.materialList = response.data;
|
||||
}
|
||||
that.listLoading = false;
|
||||
});
|
||||
},
|
||||
// //检查表
|
||||
// handlebind(scope) {
|
||||
// let materialItem = sessionStorage.getItem('materialItem');
|
||||
// let materialType = sessionStorage.getItem('materialType');
|
||||
// if(materialItem){
|
||||
// sessionStorage.removeItem('materialItem');
|
||||
// sessionStorage.setItem('materialItem',JSON.stringify(scope.row));
|
||||
// }else{
|
||||
// sessionStorage.setItem('materialItem',JSON.stringify(scope.row));
|
||||
// }
|
||||
// if(materialType){
|
||||
// sessionStorage.removeItem('materialType');
|
||||
// sessionStorage.setItem('materialType','20,40');
|
||||
// }else{
|
||||
// sessionStorage.setItem('materialType','20,40');
|
||||
// }
|
||||
// this.$router.push({name: "MaterialDO", params: {id: scope.row.id}})
|
||||
// },
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
resetFilter() {
|
||||
this.activeName = "";
|
||||
this.listQuery = {
|
||||
type: 1,
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
handleCreate() {
|
||||
this.material = Object.assign({}, defaultmaterial);
|
||||
this.dialogType = "new";
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
handleDelete(scope) {
|
||||
let that = this;
|
||||
this.$confirm("确认删除?", "警告", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "error",
|
||||
})
|
||||
.then(async () => {
|
||||
await deleteMaterial(scope.row.id);
|
||||
that.getList();
|
||||
that.$message.success("成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
that.$message.error(err);
|
||||
});
|
||||
},
|
||||
async confirm(form) {
|
||||
let that = this;
|
||||
that.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const isEdit = this.dialogType === "edit";
|
||||
if (isEdit) {
|
||||
updateMaterial(this.material.id, this.material).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
that.getList();
|
||||
that.dialogVisible = false;
|
||||
that.$message.success("成功");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
createMaterial(this.material).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
that.getList();
|
||||
that.dialogVisible = false;
|
||||
that.$message.success("成功");
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
|
@ -0,0 +1,293 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div>
|
||||
<el-button
|
||||
v-if="checkPermission(['material_create'])"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 2px">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
height="100"
|
||||
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="事件种类" width="240" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<el-tag
|
||||
v-for="item in scope.row.cates_"
|
||||
:key="item"
|
||||
type="warning"
|
||||
effect="plain"
|
||||
>{{ item}}</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发生区域" >
|
||||
<template slot-scope="scope">{{ scope.row.areaName }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="事件类型">
|
||||
<template slot-scope="scope">{{ scope.row.obj_cate }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="事件对象">
|
||||
<template slot-scope="scope">{{ scope.row.obj_obj }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发生时间">
|
||||
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="处理人">
|
||||
<template slot-scope="scope">{{ scope.row.handle_user_name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="事件标记">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.mark == 20" type="warning" effect="plain">误报</el-tag>
|
||||
<el-tag v-else type="success" effect="plain">正确</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="处理超时">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.is_timeout" type="warning">是</el-tag>
|
||||
<el-tag v-else type="success" effect="plain">否</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="操作"
|
||||
width="220px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
v-if="checkPermission(['material_delete'])"
|
||||
type="danger"
|
||||
@click="handleDelete(scope)"
|
||||
>
|
||||
删除
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="materialList.count > 0"
|
||||
:total="materialList.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
|
||||
/>
|
||||
<!-- @pagination="getList" -->
|
||||
</el-card>
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
:close-on-click-modal="false"
|
||||
title="新增风险"
|
||||
>
|
||||
<el-form
|
||||
ref="Form"
|
||||
:model="material"
|
||||
label-width="100px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
>
|
||||
<el-form-item label="分线区域">
|
||||
<el-input v-model="material.number" placeholder="分线区域"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型">
|
||||
<el-select style="width: 100%" v-model="material.type" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in typeoptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="管控层级">
|
||||
<el-select style="width: 100%" v-model="material.unit" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称">
|
||||
<el-input v-model="material.name" placeholder="规格型号"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="具体位置">
|
||||
<el-input v-model="material.specification" placeholder="规格型号"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirm('Form')">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
createMaterial,
|
||||
updateMaterial,
|
||||
deleteMaterial
|
||||
} from "@/api/mtm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import Pagination from "@/components/Pagination";
|
||||
|
||||
const defaultmaterial = {
|
||||
name: null,
|
||||
number: null,
|
||||
specification: null,
|
||||
unit: null,
|
||||
type: '',
|
||||
piece_count: null,
|
||||
sort_str: null,
|
||||
count_safe: 0,
|
||||
processes: [],
|
||||
};
|
||||
export default {
|
||||
name: "productList",
|
||||
components: {Pagination},
|
||||
data() {
|
||||
return {
|
||||
material: defaultmaterial,
|
||||
materialList: {
|
||||
count: 5,
|
||||
},
|
||||
tableData:[
|
||||
{"areaName":"二道门广场区","cates_":["未带安全帽"],"obj_cate":"人员","obj_obj":"员工:李华","create_time":"2022-12-02 10:32","handle_user_name":"张辉黁","mark":10,"is_timeout":true},
|
||||
{"areaName":"二道门广场区","cates_":["紧急呼救"],"obj_cate":"人员","obj_obj":"相关方:王大伟","create_time":"2022-12-02 10:32","handle_user_name":"张辉黁","mark":10,"is_timeout":true},
|
||||
{"areaName":"二道门广场区","cates_":["未带定位卡"],"obj_cate":"人员","obj_obj":"员工:张思迎","create_time":"2022-12-02 10:32","handle_user_name":"张辉黁","mark":10,"is_timeout":true},
|
||||
{"areaName":"二道门广场区","cates_":["区域入侵","超时停留"],"obj_cate":"其他","obj_obj":"访客:李叶","create_time":"2022-12-02 10:32","handle_user_name":"张辉黁","mark":10,"is_timeout":true},
|
||||
{"areaName":"二道门广场区","cates_":["未带安全帽"],"obj_cate":"人员","obj_obj":"司机:魏来","create_time":"2022-12-02 10:32","handle_user_name":"张辉黁","mark":10,"is_timeout":true},
|
||||
],
|
||||
options:[
|
||||
'公司级',
|
||||
'部门级',
|
||||
'班组级',
|
||||
'岗位级',
|
||||
],
|
||||
typeoptions: [
|
||||
{
|
||||
value: '设备设施',
|
||||
label: '设备设施'
|
||||
}, {
|
||||
value: '作业活动',
|
||||
label: '作业活动'
|
||||
}
|
||||
],
|
||||
listQuery: {
|
||||
type: 1,
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
activeName: "",
|
||||
listLoading: false,
|
||||
dialogVisible: false,
|
||||
dialogType: "new",
|
||||
rule1: {
|
||||
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
number: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
// this.getList();
|
||||
// this.getProcessList();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
//成品详情
|
||||
handledetail(scope) {
|
||||
this.$router.push({name: "MaterialDetail", params: {id: scope.row.id, type: scope.row.type},})
|
||||
},
|
||||
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
// this.getList();
|
||||
},
|
||||
resetFilter() {
|
||||
this.activeName = "";
|
||||
this.listQuery = {
|
||||
type: 1,
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
};
|
||||
// this.getList();
|
||||
},
|
||||
handleCreate() {
|
||||
this.material = Object.assign({}, defaultmaterial);
|
||||
this.dialogType = "new";
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
handleDelete(scope) {
|
||||
let that = this;
|
||||
this.$confirm("确认删除?", "警告", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "error",
|
||||
})
|
||||
.then(async () => {
|
||||
await deleteMaterial(scope.row.id);
|
||||
// that.getList();
|
||||
that.$message.success("成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
that.$message.error(err);
|
||||
});
|
||||
},
|
||||
async confirm(form) {
|
||||
let that = this;
|
||||
that.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const isEdit = this.dialogType === "edit";
|
||||
if (isEdit) {
|
||||
updateMaterial(this.material.id, this.material).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
// that.getList();
|
||||
that.dialogVisible = false;
|
||||
that.$message.success("成功");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
createMaterial(this.material).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
// that.getList();
|
||||
that.dialogVisible = false;
|
||||
that.$message.success("成功");
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
|
@ -0,0 +1,338 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div>
|
||||
<el-button
|
||||
v-if="checkPermission(['material_create'])"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
>
|
||||
新增
|
||||
</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 2px">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
highlight-current-row
|
||||
height="100"
|
||||
v-el-height-adaptive-table="{bottomOffset: 42}"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="区域">
|
||||
<template slot-scope="scope">{{ scope.row.area__name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型">
|
||||
<template slot-scope="scope">{{ scope.row.type__dickeyname }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="级别">
|
||||
<template slot-scope="scope">{{ scope.row.level }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="层级">
|
||||
<template slot-scope="scope">{{ scope.row.gkcj }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="责任部门">
|
||||
<template slot-scope="scope">{{ scope.row.zrbm__partname }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="责任人">
|
||||
<template slot-scope="scope">{{ scope.row.zrr__name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="岗位">
|
||||
<template slot-scope="scope">{{ scope.row.group__groupname }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="操作"
|
||||
width="220px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
v-if="checkPermission(['material_delete'])"
|
||||
type="danger"
|
||||
@click="handleDelete(scope)"
|
||||
>
|
||||
删除
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="materialList.count > 0"
|
||||
:total="materialList.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
:close-on-click-modal="false"
|
||||
title="新增风险"
|
||||
>
|
||||
<el-form
|
||||
ref="Form"
|
||||
:model="material"
|
||||
label-width="100px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
>
|
||||
<el-form-item label="分线区域">
|
||||
<el-input v-model="material.number" placeholder="分线区域"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型">
|
||||
<el-select style="width: 100%" v-model="material.type" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in typeoptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称">
|
||||
<el-input v-model="material.name" placeholder="规格型号"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="级别">
|
||||
<el-select style="width: 100%" v-model="material.level" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in leveloptions"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="管控层级">
|
||||
<el-select style="width: 100%" v-model="material.unit" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="具体位置">
|
||||
<el-input v-model="material.specification" placeholder="规格型号"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirm('Form')">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getMaterialList,
|
||||
createMaterial,
|
||||
updateMaterial,
|
||||
deleteMaterial
|
||||
} from "@/api/mtm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import Pagination from "@/components/Pagination";
|
||||
|
||||
const defaultmaterial = {
|
||||
name: null,
|
||||
number: null,
|
||||
specification: null,
|
||||
unit: null,
|
||||
type: '',
|
||||
piece_count: null,
|
||||
sort_str: null,
|
||||
count_safe: 0,
|
||||
processes: [],
|
||||
};
|
||||
export default {
|
||||
name: "productList",
|
||||
components: {Pagination},
|
||||
data() {
|
||||
return {
|
||||
material: defaultmaterial,
|
||||
materialList: {
|
||||
count: 0,
|
||||
},
|
||||
options:[
|
||||
'公司级',
|
||||
'部门级',
|
||||
'班组级',
|
||||
'岗位级',
|
||||
],
|
||||
leveloptions:[
|
||||
'低风险',
|
||||
'中风险',
|
||||
'高风险',
|
||||
'重大风险',
|
||||
],
|
||||
typeoptions: [
|
||||
{
|
||||
value: '设备设施',
|
||||
label: '设备设施'
|
||||
}, {
|
||||
value: '作业活动',
|
||||
label: '作业活动'
|
||||
}
|
||||
],
|
||||
listQuery: {
|
||||
type: 1,
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
activeName: "",
|
||||
listLoading: true,
|
||||
dialogVisible: false,
|
||||
dialogType: "new",
|
||||
rule1: {
|
||||
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
number: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
|
||||
},
|
||||
tableData:[
|
||||
{
|
||||
"area__name": "排土场",
|
||||
"type__dickeyname": "设备设施类",
|
||||
"name": "挖掘机",
|
||||
"level": "低风险",
|
||||
"group__groupname": "员工",
|
||||
"zrbm__partname": "安健环部",
|
||||
"zrr__name": "张城",
|
||||
"gkcj": "公司级",
|
||||
},
|
||||
{
|
||||
"area__name": "排土场",
|
||||
"type__dickeyname": "作业活动类",
|
||||
"name": "挖掘机装载",
|
||||
"level": "低风险",
|
||||
"group__groupname": "员工",
|
||||
"zrbm__partname": "安健环部",
|
||||
"zrr__name": "张城",
|
||||
"gkcj": "公司级",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.getList();
|
||||
// this.getProcessList();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
//成品详情
|
||||
handledetail(scope) {
|
||||
this.$router.push({name: "MaterialDetail", params: {id: scope.row.id, type: scope.row.type},})
|
||||
},
|
||||
getList() {
|
||||
let that = this;
|
||||
that.listLoading = true;
|
||||
getMaterialList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
that.materialList = response.data;
|
||||
}
|
||||
that.listLoading = false;
|
||||
});
|
||||
},
|
||||
// //检查表
|
||||
// handlebind(scope) {
|
||||
// let materialItem = sessionStorage.getItem('materialItem');
|
||||
// let materialType = sessionStorage.getItem('materialType');
|
||||
// if(materialItem){
|
||||
// sessionStorage.removeItem('materialItem');
|
||||
// sessionStorage.setItem('materialItem',JSON.stringify(scope.row));
|
||||
// }else{
|
||||
// sessionStorage.setItem('materialItem',JSON.stringify(scope.row));
|
||||
// }
|
||||
// if(materialType){
|
||||
// sessionStorage.removeItem('materialType');
|
||||
// sessionStorage.setItem('materialType','20,40');
|
||||
// }else{
|
||||
// sessionStorage.setItem('materialType','20,40');
|
||||
// }
|
||||
// this.$router.push({name: "MaterialDO", params: {id: scope.row.id}})
|
||||
// },
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
resetFilter() {
|
||||
this.activeName = "";
|
||||
this.listQuery = {
|
||||
type: 1,
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
handleCreate() {
|
||||
this.material = Object.assign({}, defaultmaterial);
|
||||
this.dialogType = "new";
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
handleDelete(scope) {
|
||||
let that = this;
|
||||
this.$confirm("确认删除?", "警告", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "error",
|
||||
})
|
||||
.then(async () => {
|
||||
await deleteMaterial(scope.row.id);
|
||||
that.getList();
|
||||
that.$message.success("成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
that.$message.error(err);
|
||||
});
|
||||
},
|
||||
async confirm(form) {
|
||||
let that = this;
|
||||
that.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
const isEdit = this.dialogType === "edit";
|
||||
if (isEdit) {
|
||||
updateMaterial(this.material.id, this.material).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
that.getList();
|
||||
that.dialogVisible = false;
|
||||
that.$message.success("成功");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
createMaterial(this.material).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
that.getList();
|
||||
that.dialogVisible = false;
|
||||
that.$message.success("成功");
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue