应急页面考试详情以及其他一些细小调整

This commit is contained in:
shijing 2023-03-01 13:27:56 +08:00
parent 22f14f9634
commit 705758510d
15 changed files with 825 additions and 474 deletions

View File

@ -336,12 +336,18 @@ export const asyncRoutes = [
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: 'emergencyDrill',
name: 'emergencyDrill',
component: () => import('@/views/safeEnviro/emergencyDrill'),
meta: { title: '应急演练', icon: 'equipment' }
},
{
path: 'emergencyPlan',
name: 'emergencyPlan',
component: () => import('@/views/safeEnviro/emergencyPlan'),
meta: { title: '应急预案', icon: 'equipment' }
}
]
},

View File

@ -71,8 +71,9 @@
fixed="right"
>
<template slot-scope="scope">
<el-link type="primary"> 编辑</el-link>
<el-link type="danger">处理</el-link>
<el-link type="primary" v-if="scope.row.status=='未处理'"> 编辑</el-link>
<el-link type="danger" v-if="scope.row.status=='未处理'">处理</el-link>
<el-link type="primary" v-else>查看</el-link>
</template>
</el-table-column>
</el-table>

View File

@ -109,25 +109,51 @@
<el-card>
<el-row :gutter="5" style="margin-top: 20px;">
<div class="chartsTitle"> 分项明细</div>
<el-col v-if="showType=='全厂'" style="border:1px solid #cccccc;border-radius: 10px;">
<table class="tableData" :style="{height: domHeight}">
<th class="tableTh">
<td class="thtd" v-for="item in thLists">{{ item }}</td>
</th>
<tr class="tableTr" v-for="itemtr in trList">
<td class="trtd" v-for="itemtd in itemtr">{{ itemtd }}</td>
</tr>
</table>
<el-col v-if="showType=='全厂'">
<el-table
:data="tableData"
border
fit
stripe
:style="{height: domHeight}"
>
<el-table-column label="名称" prop="name" min-width="120">
</el-table-column>
<el-table-column label="2022-07" prop="July" min-width="120">
</el-table-column>
<el-table-column label="2022-08" prop="August" min-width="120">
</el-table-column>
<el-table-column label="2022-09" prop="September" min-width="120">
</el-table-column>
<el-table-column label="2022-10" prop="October" min-width="120">
</el-table-column>
<el-table-column label="2022-11" prop="November" min-width="120">
</el-table-column>
<el-table-column label="2022-12" prop="December" min-width="120">
</el-table-column>
<el-table-column label="2023-01" prop="January" min-width="120">
</el-table-column>
</el-table>
</el-col>
<el-col v-else style="border:1px solid #cccccc;border-radius: 10px;">
<table class="tableData" :style="{height: domHeight}">
<th class="tableTh">
<td class="thtd" v-for="item in thLists1">{{ item }}</td>
</th>
<tr class="tableTr" v-for="itemtr in trList1">
<td class="trtd" v-for="itemtd in itemtr">{{ itemtd }}</td>
</tr>
</table>
<el-col v-else>
<el-table
:data="tableData1"
border
fit
stripe
:style="{height: domHeight}"
>
<el-table-column label="名称" prop="name" min-width="120">
</el-table-column>
<el-table-column label="2022-07" prop="number" min-width="120">
</el-table-column>
<el-table-column label="2022-08" prop="unit" min-width="120">
</el-table-column>
<el-table-column label="2022-09" prop="output" min-width="120">
</el-table-column>
<el-table-column label="2022-10" prop="unitNumber" min-width="120">
</el-table-column>
</el-table>
</el-col>
</el-row>
</el-card>
@ -171,24 +197,22 @@
},
startTime:'',
endTime:'',
thLists:['名称','2022-07','2022-08','2022-09','2022-10','2022-11','2022-12','2023-01'],
trList:[
['办公用电','736','235','260','402','401','424','431'],
['照明','387','192','180','340','377','345','270'],
['空调','10362','3430','706','468','589','2920','3031'],
['动力','1573','360','919','189','410','187','741'],
tableData:[
{name:'办公用电',July:'736',August:'235',September:'260',October:'402',November:'401',December:'424',January:'431'},
{name:'照明',July:'387',August:'192',September:'180',October:'340',November:'377',December:'345',January:'270'},
{name:'空调',July:'10362',August:'3430',September:'706',October:'468',November:'589',December:'2920',January:'3031'},
{name:'动力',July:'1573',August:'360',September:'919',October:'189',November:'410',December:'187',January:'741'},
],
thLists1:['工序','电耗','消耗单位','产量','单位消耗'],
trList1:[
['冷加工','589','kwh','260','2.27'],
['热弯','736','kwh','260','2.83'],
['化学钢化','706','kwh','100','7.06'],
['物理钢化','10362','kwh','160','64.76'],
['镀膜','736','kwh','260','2.83'],
['夹层','340','kwh','130','2.62'],
['包边','360','kwh','120','3.00'],
['装框','235','kwh','100','2.35'],
tableData1:[
{name:'冷加工',number:'589',unit:'kwh',output:'260',unitNumber:'2.27'},
{name:'热弯',number:'736',unit:'kwh',output:'260',unitNumber:'2.83'},
{name:'化学钢化',number:'706',unit:'kwh',output:'100',unitNumber:'7.06'},
{name:'物理钢化',number:'10362',unit:'kwh',output:'160',unitNumber:'64.76'},
{name:'镀膜',number:'736',unit:'kwh',output:'260',unitNumber:'2.83'},
{name:'夹层',number:'340',unit:'kwh',output:'130',unitNumber:'2.62'},
{name:'包边',number:'360',unit:'kwh',output:'120',unitNumber:'3.00'},
{name:'装框',number:'255',unit:'kwh',output:'100',unitNumber:'2.35'},
],
cdata: {
xData: ["办公用电", "照明", "空调", "动力"],

View File

@ -36,42 +36,42 @@
v-el-height-adaptive-table="{bottomOffset: 50}"
>
<el-table-column type="index" width="50"/>
<el-table-column label="单号" prop="order">
<el-table-column label="单号" min-width="120" prop="order">
</el-table-column>
<el-table-column label="物品名称" prop="name">
<el-table-column label="物品名称" min-width="120" prop="name">
</el-table-column>
<el-table-column label="数量" prop="number">
<el-table-column label="数量" min-width="80" prop="number">
</el-table-column>
<el-table-column label="注意事项" prop="attention">
<el-table-column label="注意事项" min-width="120" prop="attention">
</el-table-column>
<el-table-column label="下单人" prop="payer">
<el-table-column label="下单人" min-width="120" prop="payer">
</el-table-column>
<el-table-column label="姓名" prop="payName">
<el-table-column label="姓名" min-width="100" prop="payName">
</el-table-column>
<el-table-column label="联系方式" prop="phone">
<el-table-column label="联系方式" min-width="120" prop="phone">
</el-table-column>
<el-table-column label="发货地址" prop="fromPlace">
<el-table-column label="发货地址" min-width="120" prop="fromPlace">
</el-table-column>
<el-table-column label="收货人" prop="receiver">
<el-table-column label="收货人" min-width="100" prop="receiver">
</el-table-column>
<el-table-column label="收货人姓名" prop="receiverName">
<el-table-column label="收货人姓名" min-width="120" prop="receiverName">
</el-table-column>
<el-table-column label="收货人手机" prop="receiverPhone">
<el-table-column label="收货人手机" min-width="120" prop="receiverPhone">
</el-table-column>
<el-table-column label="收货人地址" prop="toPlace">
<el-table-column label="收货人地址" min-width="120" prop="toPlace">
</el-table-column>
<el-table-column label="车牌号" prop="carNumber">
<el-table-column label="车牌号" min-width="120" prop="carNumber">
</el-table-column>
<el-table-column label="货物所在地" prop="address">
<el-table-column label="货物所在地" min-width="120" prop="address">
</el-table-column>
<el-table-column label="是否收货" prop="isTake">
<el-table-column label="是否收货" min-width="100" prop="isTake">
<template slot-scope="scope">
<el-tag type="success" effect="plain"> {{ scope.row.isTake}}</el-tag>
</template>
</el-table-column>
<el-table-column label="添加时间" prop="addTime" width="160px">
<el-table-column label="添加时间" prop="addTime" min-width="160px">
</el-table-column>
<el-table-column align="center" label="操作" width="100px">
<el-table-column align="center" label="操作" fixed="right" width="100px">
<template slot-scope="scope">
<el-link type="primary">编辑</el-link>
<el-link type="danger">删除</el-link>

View File

@ -7,7 +7,7 @@
<el-input
v-model="listQuery1.search"
placeholder="任务编号/订单编号/合同编号/产品名称"
style="width: 300px"
style="width: 300px;margin-bottom: 5px;"
class="filter-item"
@keyup.enter.native="handleFilter"
/>

View File

@ -10,6 +10,7 @@
v-if="checkPermission(['resource_cal'])"
type="primary"
@click="handlecount"
style="margin-bottom:5px"
>
计算物料
</el-button>

View File

@ -56,104 +56,119 @@
width="220px"
>
<template slot-scope="scope">
<el-link type="primary">
详情
</el-link>
<el-link type="danger">
删除
</el-link>
<el-link type="primary" @click="dialogVisible=true">详情</el-link>
<el-link type="danger">删除</el-link>
</template>
</el-table-column>
</el-table>
<pagination
v-show="materialList.count > 0"
:total="materialList.count"
v-show="tableList.count > 0"
:total="tableList.count"
:page.sync="listQuery.page"
:limit.sync="listQuery.page_size"
@pagination="getList"
/>
</el-card>
<el-dialog
id="detailDialog"
:visible.sync="dialogVisible"
:close-on-click-modal="false"
title="新增风险"
height="500px"
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>
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="考试信息" name="1">
<div style="height:400px;overflow-y: scroll;">
<div class="infoTitle">状态信息</div>
<p style="color:red">已关闭</p>
<div class="infoTitle">考试详情</div>
<table class="detailtable">
<tbody>
<tr>
<td colspan="2">考试编号KS20220224151511</td>
</tr>
<tr>
<td style="width:50%">考试名称锡源爆破新入场人员考试</td>
<td style="width:50%">考试类型正式考试</td>
</tr>
<tr>
<td style="width:50%">发布人超级管理员</td>
<td style="width:50%">发布时间2022-02-24 15:15</td>
</tr>
<tr>
<td style="width:50%">开启时间2022-02-24 15:14</td>
<td style="width:50%">关闭时间2022-02-28 15:14</td>
</tr>
<tr>
<td>所用试卷锡源爆破新入场人员培训</td>
<td>限制用时30 分钟</td>
</tr>
<tr>
<td>满分10</td>
<td>通过分9</td>
</tr>
</tbody>
</table>
<div class="infoTitle">考卷统计</div>
<table class="detailtable">
<tbody>
<tr>
<td style="width:50%">应考人数5</td>
<td style="width:50%">已考人数5</td>
</tr>
<tr>
<td style="width:50%">通过人数5</td>
<td style="width:50%">通过率100.00</td>
</tr>
</tbody>
</table>
<div class="infoTitle">参加考试二维码</div>
<img src="https://safeyun.ctcshe.com/media/qr_examtest/12252.png" height="150px" width="150px">
</div>
</el-tab-pane>
<el-tab-pane label="答题详情" name="2">
<el-table
:data="resultsList"
border
fit
stripe
height="400">
<el-table-column label="序号" type="index" width="50"/>
<el-table-column label="姓名" prop="name"></el-table-column>
<el-table-column label="部门" prop="partname"></el-table-column>
<el-table-column label="状态" prop="status">
<template slot-scope="scope">
<span style="color: rgb(0, 128, 0);">已考</span>
</template>
</el-table-column>
<el-table-column label="得分" prop="score"></el-table-column>
<el-table-column label="参考时间" prop="starttime" width="140"></el-table-column>
<el-table-column label="用时" prop="took"></el-table-column>
<el-table-column label="考试次数" prop="testnum"></el-table-column>
<el-table-column align="center" label="答题详情">
<template slot-scope="scope">
<el-link>点击查看</el-link>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="confirm('Form')">确认</el-button>
<el-button type="danger" @click="dialogVisible = false">关闭</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,
tableList: {
count: 20,
},
typeOptions:{
1:"正式考试"
@ -162,39 +177,13 @@
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,
activeName: "1",
listLoading: false,
dialogVisible: false,
dialogType: "new",
rule1: {
@ -202,7 +191,24 @@
number: [{required: true, message: "请输入", trigger: "blur"}],
},
resultsList:[
{name: "李远标",partname: "锡源爆破",took: 307,score: 10,starttime: "2022-02-24 15:27",testnum: 1},
{name: "陈新辉",partname: "锡源爆破",took: 430,score: 10,starttime: "2022-02-24 15:21",testnum: 1},
{name: "余景猛",partname: "锡源爆破",took: 59,score: 9,starttime: "2022-02-24 15:34",testnum: 3},
{name: "钟清荣",partname: "锡源爆破",took: 213,score: 9,starttime: "2022-02-24 15:26",testnum: 1},
{name: "张远雄",partname: "锡源爆破",took: 248,score: 9,starttime: "2022-02-24 15:27",testnum: 1},
],
tableData:[
{
num: "KS20220224151511",
name: "锡源爆破新入场人员考试",
state: 0,
type: 1,
exampaper__name: "锡源爆破新入场人员培训",
starttime: "2022-02-24 15:14",
duration: 30,
createuser__name: "超级管理员",
},
{
num: "KS20220225114918",
name: "铲装作业安全培训考试",
@ -213,16 +219,6 @@
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工程师入场安全培训考试",
@ -416,32 +412,19 @@
]
};
},
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;
});
debugger;
console.log(scope)
this.dialogVisible = true;
},
handleClick(){},
handleFilter() {
this.listQuery.page = 1;
this.getList();
},
resetFilter() {
this.activeName = "";
@ -450,64 +433,37 @@
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>
.infoTitle{
font-size: 18px;
color: blue;
margin: 5px 0;
}
.detailtable {
border-collapse: collapse;
margin: 0 auto;
text-align: left;
width: 100%;
}
.detailtable tr:nth-child(odd) {
background: #fff;
}
.detailtable tr:nth-child(even) {
background: #F5FAFA;
}
.detailtable td, .detailtable th {
border: 1px solid #cad9ea;
color: #666;
height: 30px;
}
.detailDialog>div{
height: 60vh;
}
</style>

View File

@ -0,0 +1,120 @@
<template>
<div class="app-container">
<el-card>
<div>
<el-button
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="编号" prop="drillnum"></el-table-column>
<el-table-column label="状态">
<template slot-scope="scope">
<el-tag type="success" effect="plain">{{ scope.row.state }}</el-tag>
</template>
</el-table-column>
<el-table-column label="演练地点" prop="drillplace"></el-table-column>
<el-table-column label="演练名称" prop="drillname"></el-table-column>
<el-table-column label="开始时间" prop="starttime"></el-table-column>
<el-table-column label="演练类型" prop="drilltype__dickeyname"></el-table-column>
<el-table-column label="总指挥" prop="chief__name"></el-table-column>
<el-table-column label="填报人" prop="submituser__name"></el-table-column>
</el-table>
<pagination
v-show="dataList.count > 0"
:total="dataList.count"
:page.sync="listQuery.page"
:limit.sync="listQuery.page_size"
@pagination="getList"
/>
</el-card>
</div>
</template>
<script>
import {
getMaterialList,
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,
dataList: {
count: 2,
},
listQuery: {
type: 1,
page: 1,
page_size: 20,
},
activeName: "",
listLoading: false,
dialogVisible: false,
dialogType: "new",
tableData:[
{
drillnum: "YL20200622082706",
state: '已评估',
drillplace: "生产部CV26#运输带",
starttime: "2020-06-19 15:00",
drillname: "机械伤害事故专项应急救援演练",
drilltype__dickeyname: "实战演练",
chief__name: "邓枝江",
submituser__name: "超级管理员",
},
{
drillnum: "YL20210729220458",
state: '已评估',
drillplace: "中机控制室",
starttime: "2021-06-07 22:03",
drillname: "消防演练",
drilltype__dickeyname: "实战演练",
chief__name: "邓枝江",
submituser__name: "超级管理员",
},
],
};
},
computed: {},
watch: {},
methods: {
},
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,274 @@
<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">
<el-tag type="warning" effect="plain">{{ scope.row.type }}</el-tag>
</template>
</el-table-column>
<el-table-column label="名称" prop="name"></el-table-column>
<el-table-column label="创建人" prop="creater"></el-table-column>
<el-table-column label="创建时间" prop="createtime"></el-table-column>
</el-table>
<pagination
v-show="dataList.count > 0"
:total="dataList.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,
dataList: {
count: 2,
},
listQuery: {
type: 1,
page: 1,
page_size: 20,
},
activeName: "",
listLoading: false,
dialogVisible: false,
dialogType: "new",
tableData:[
{
createtime: "2020-06-19 15:00",
name: "机械伤害事故专项应急救援演练",
type: "实战演练",
creater: "邓枝江",
},
{
createtime: "2021-06-07 22:03",
name: "消防演练",
type: "实战演练",
creater: "邓枝江",
},
],
};
},
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>

View File

@ -15,7 +15,7 @@
<el-card style="margin-top: 2px">
<el-table
v-loading="listLoading"
:data="materialList.results"
:data="tableData"
border
fit
stripe
@ -23,38 +23,22 @@
height="100"
v-el-height-adaptive-table="{bottomOffset: 20}"
>
<el-table-column type="index" width="50"/>
<el-table-column label="排放口">
<template slot-scope="scope">
{{ scope.row.number }}
</template>
<el-table-column label="序号" type="index" width="50"/>
<el-table-column label="污染源名称" prop="name">
</el-table-column>
<el-table-column label="检测时间">
<template> 成品</template>
<el-table-column label="产生部位" prop="address">
</el-table-column>
<el-table-column label="出:干烟含量">
<template slot-scope="scope">{{ scope.row.name }}</template>
<el-table-column label="主要污染因于" prop="reason">
</el-table-column>
<el-table-column label="出:氧含量">
<template slot-scope="scope">{{ scope.row.specification }}</template>
<el-table-column label="排放浓度" prop="potency">
</el-table-column>
<el-table-column label="出:二氧化硫">
<template slot-scope="scope">{{ scope.row.piece_count }}</template>
<el-table-column label="排放量" prop="num">
</el-table-column>
<el-table-column label="出:二氧化硫折标">
<template slot-scope="scope">{{ scope.row.unit }}</template>
<el-table-column label="排放方式" prop="type">
</el-table-column>
<el-table-column label="出:颗粒物">
<template slot-scope="scope">{{ scope.row.unit }}</template>
<el-table-column label="排放方法" prop="method">
</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 label="备注" prop="memo">
</el-table-column>
<el-table-column
align="center"
@ -80,104 +64,27 @@
/>
<!-- @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,
@ -187,11 +94,68 @@
listLoading: false,
dialogVisible: false,
dialogType: "new",
rule1: {
name: [{required: true, message: "请输入", trigger: "blur"}],
number: [{required: true, message: "请输入", trigger: "blur"}],
},
tableData:[
{
name: "尘废气",
address: "活化",
reason: "载体尘状物",
potency: "50mg/m3",
num: "",
type: "经处理后排放",
method: "大气",
memo: "",
},
{
name: "酸废气",
address: "活化",
reason: "含CL酸气",
potency: "50mg/m3",
num: "",
type: "经处理后排放",
method: "大气",
memo: "",
},
{
name: "氨氮废水",
address: "氯铂酸",
reason: "含氨氮废水",
potency: "",
num: "10t/h",
type: "直排",
method: "污水池",
memo: "",
},
{
name: "氨氮废水",
address: "按交换",
reason: "氯化铵废水",
potency: "",
num: "10t/h",
type: "直排",
method: "污水池",
memo: "",
},
{
name: "氨氮废水",
address: "动浸岗位",
reason: "含氨氮废水",
potency: "",
num: "10t/h",
type: "直排",
method: "污水池",
memo: "",
},
{
name: "氨氮废水",
address: "精浸岗位",
reason: "含氨氮废水",
potency: "",
num: "10t/h",
type: "直排",
method: "污水池",
memo: "",
},
],
};
},
computed: {},

View File

@ -48,19 +48,19 @@
<el-table-column label="发现人">
<template slot-scope="scope">{{ scope.row.fxr__name }}</template>
</el-table-column>
<el-table-column label="隐患描述">
<el-table-column label="隐患描述" min-width="120px">
<template slot-scope="scope">{{ scope.row.yhms }}</template>
</el-table-column>
<el-table-column label="隐患状态">
<!-- <el-table-column label="隐患状态">
<template slot-scope="scope">{{ scope.row.unit }}</template>
</el-table-column>
</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"
width="100px"
>
<template slot-scope="scope">
<el-link type="primary">

View File

@ -4,7 +4,7 @@
<el-col :span="16">
<el-card>
<div class="chartsTitle">全年销售分析</div>
<div class="chartsTitle">全年销售分析</div>
<charts
:id="chartId1"
:options="barOptions"
@ -197,6 +197,14 @@
let hei = document.getElementsByClassName('app-main')[0].clientHeight;
this.domHeight =hei/2+'px';
this.barOptions ={
title: {
subtext: "单位(万元)",
left: 0,
top: 0,
subtextStyle:{
color:"#aaaaaa"
}
},
grid: {
top: '10%',
left: '3%',
@ -216,6 +224,7 @@
return htmlStr;
}
},
xAxis: {
axisTick: {
show: false

View File

@ -1,113 +1,108 @@
<template>
<div class="app-container">
<el-card>
<div class="tabButtonWrap">
<div
v-for="(item,$index) in processOption"
:key="item.id"
class="tabButton"
:class="{activeTab:activeIndex===$index}"
@click="changeIndex(item,$index)"
>
{{item.name}}
</div>
</div>
<el-table
:data="subPlanList"
fit
style="width: 100%"
stripe
border
height="100"
highlight-current-row
v-el-height-adaptive-table="{bottomOffset: 50}"
>
<el-table-column type="index" width="50"/>
<el-table-column label="子计划编号" min-width="70px" show-overflow-tooltip>
<template slot-scope="scope">{{scope.row.number}}</template>
</el-table-column>
<el-table-column label="产品名称" min-width="120px" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.product_.name }}</template>
</el-table-column>
<el-table-column label="产品型号">
<template slot-scope="scope">{{ scope.row.product_.specification }}</template>
</el-table-column>
<el-table-column label="子工序" min-width="120px" show-overflow-tooltip>
<template slot-scope="scope" v-if="scope.row.steps">
<el-tag v-for="item in scope.row.steps"
:key="item.number"
:label="item.name"
:value="item.number">{{item.name}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="生产车间">
<template slot-scope="scope">{{ scope.row.workshop_.name }}</template>
</el-table-column>
<el-table-column label="生产数量" prop="count">
</el-table-column>
<el-table-column label="开工时间" prop="start_date">
</el-table-column>
<el-table-column label="完工时间" prop="end_date">
</el-table-column>
<el-table-column label="首件确认状态">
<template slot-scope="scope">
<span v-if="scope.row.leader_1!==null&&scope.row.leader_2!==null&&scope.row.leader_3!==null">已完成</span>
<span v-else>未完成</span>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
width="120px"
fixed="right"
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['first_test'])&&scope.row.first_test===null"
type="primary"
@click="handleTest(scope)"
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
<el-tab-pane
v-for="item in processOption"
:label="item.name"
:name="item.id+''"
:key="item.id+''">
<el-table
:data="subPlanList"
fit
style="width: 100%"
stripe
border
height="100"
highlight-current-row
v-el-height-adaptive-table="{bottomOffset: 50}"
>
<el-table-column type="index" width="50"/>
<el-table-column label="子计划编号" min-width="70px" show-overflow-tooltip>
<template slot-scope="scope">{{scope.row.number}}</template>
</el-table-column>
<el-table-column label="产品名称" min-width="120px" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.product_.name }}</template>
</el-table-column>
<el-table-column label="产品型号">
<template slot-scope="scope">{{ scope.row.product_.specification }}</template>
</el-table-column>
<el-table-column label="子工序" min-width="120px" show-overflow-tooltip>
<template slot-scope="scope" v-if="scope.row.steps">
<el-tag v-for="item in scope.row.steps"
:key="item.number"
:label="item.name"
:value="item.number">{{item.name}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="生产车间">
<template slot-scope="scope">{{ scope.row.workshop_.name }}</template>
</el-table-column>
<el-table-column label="生产数量" prop="count">
</el-table-column>
<el-table-column label="开工时间" prop="start_date">
</el-table-column>
<el-table-column label="完工时间" prop="end_date">
</el-table-column>
<el-table-column label="首件确认状态">
<template slot-scope="scope">
<span v-if="scope.row.leader_1!==null&&scope.row.leader_2!==null&&scope.row.leader_3!==null">已完成</span>
<span v-else>未完成</span>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
width="120px"
fixed="right"
>
首件检验
</el-link>
<el-link
v-else-if="checkPermission(['first_test'])&&scope.row.first_test!==null&&scope.row.first_test_.is_submited!==true"
type="primary"
@click="handleTestContinue(scope)"
>
检验
</el-link>
<el-link
v-else-if="checkPermission(['first_audit'])&&scope.row.first_test_.is_submited&&(scope.row.leader_1===null||scope.row.leader_2===null||scope.row.leader_3===null)"
type="primary"
@click="handleSelectclick(scope,'0')"
>
首件审批
</el-link>
<el-link
v-else-if="scope.row.leader_1!==null&&scope.row.leader_2!==null&&scope.row.leader_3!==null"
type="primary"
@click="handleSelectclick(scope,'1')"
>
查看
</el-link>
<el-link
v-if="scope.row.leader_1!==null&&scope.row.leader_2!==null&&scope.row.leader_3!==null"
type="primary"
@click="handleExportClick(scope)"
>
导出
</el-link>
</template>
</el-table-column>
</el-table>
<pagination
:total="count"
:page.sync="listQuery.page"
:limit.sync="listQuery.page_size"
@pagination="getsList"
/>
</el-card>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['first_test'])&&scope.row.first_test===null"
type="primary"
@click="handleTest(scope)"
>
首件检验
</el-link>
<el-link
v-else-if="checkPermission(['first_test'])&&scope.row.first_test!==null&&scope.row.first_test_.is_submited!==true"
type="primary"
@click="handleTestContinue(scope)"
>
检验
</el-link>
<el-link
v-else-if="checkPermission(['first_audit'])&&scope.row.first_test_.is_submited&&(scope.row.leader_1===null||scope.row.leader_2===null||scope.row.leader_3===null)"
type="primary"
@click="handleSelectclick(scope,'0')"
>
首件审批
</el-link>
<el-link
v-else-if="scope.row.leader_1!==null&&scope.row.leader_2!==null&&scope.row.leader_3!==null"
type="primary"
@click="handleSelectclick(scope,'1')"
>
查看
</el-link>
<el-link
v-if="scope.row.leader_1!==null&&scope.row.leader_2!==null&&scope.row.leader_3!==null"
type="primary"
@click="handleExportClick(scope)"
>
导出
</el-link>
</template>
</el-table-column>
</el-table>
<pagination
:total="count"
:page.sync="listQuery.page"
:limit.sync="listQuery.page_size"
@pagination="getsList"
/>
</el-tab-pane>
</el-tabs>
<!--物料检查表&&-->
<el-dialog title="首件确认检查表" :close-on-click-modal="false" :visible.sync="listVisible">
<el-select style="width: 100%" v-model="recordForm" placeholder="请选择" @change="recordFormChange">
@ -298,6 +293,7 @@
formName:'首件确认检查表',
update_time:'',
first_sign_time:'',
activeName:'1'
}
},
methods: {
@ -308,6 +304,7 @@
getProcessList({page: 0}).then((response) => {
if (response.data) {
that.processOption = response.data;
that.activeName = response.data[0].id+'';
that.listQuery.process = response.data[0].id;
that.getTableData();
}
@ -315,9 +312,8 @@
},
//工序转换
changeIndex(item,index) {
this.activeIndex = index;
this.listQuery.process = item.id;
handleClick() {
this.listQuery.process = this.activeName ;
this.subPlanList = [];
this.count = 0;
this.getTableData();
@ -326,7 +322,7 @@
//获取table数据
getTableData() {
this.listLoading = true;
this.listQuery.production_plan = this.id;
// this.listQuery.production_plan = this.id;
getsubplanList(this.listQuery).then((response) => {
if (response.data) {
this.subPlanList = response.data.results;

View File

@ -6,7 +6,7 @@
<el-input
v-model="listQuery.search"
placeholder="半成品名称/编号/子计划编号/工序"
style="width: 300px"
style="width: 300px;margin-bottom: 5px;"
class="filter-item"
@keyup.enter.native="handleFilter1"
/>

View File

@ -70,21 +70,21 @@
<el-table-column label="创建时间">
<template slot-scope="scope">{{ scope.row.create_time }}</template>
</el-table-column>
<el-table-column align="center" label="操作" width="100px">
<el-table-column align="center" label="操作" min-width="80px">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['operation_create'])&&scope.row.is_submited"
type="primary"
@click="handleoperation(scope)"
>
前往查看
查看
</el-link>
<el-link
v-if="checkPermission(['operation_create'])&&!scope.row.is_submited"
type="primary"
@click="handleoperation(scope)"
>
前往操作
操作
</el-link>
<el-link
v-if="checkPermission(['operation_delete'])"