密码强度设置

This commit is contained in:
shijing 2023-08-24 08:58:27 +08:00
parent fda89dde11
commit e1cadf9a74
19 changed files with 1404 additions and 375 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 12 KiB

BIN
public/favicon0.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>enm.ico">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= VUE_APP_TITLE %></title>
<!-- <script src="./jsmap/jsmap.js"> </script> -->
<link type="text/css" href="./jsmap/jsmap.css" rel="stylesheet"/>

View File

@ -87,24 +87,75 @@ export default {
);
}
},
//值班停机关系
stsflog: {
sflogexp: {
list: {
name: "值班停机关系",
name: "值班记录列表",
req: async function(data){
return await http.get(
`${config.API_URL}/wpm/stsflog/`,
`${config.API_URL}/wpm/sflogexp/`,
data
);
}
},
item: {
name: "获取详情",
req: async function(id){
return await http.get(
`${config.API_URL}/wpm/sflogexp/${id}/`
);
}
},
update: {
name: "值班停机关系更新",
name: "更新",
req: async function(id, data){
return await http.put(
`${config.API_URL}/wpm/stsflog/${id}/`,
`${config.API_URL}/wpm/sflogexp/${id}/`,
data);
}
},
create: {
name: "创建",
req: async function(data){
return await http.post(
`${config.API_URL}/wpm/sflogexp/`,
data);
}
},
delete: {
name: "删除",
req: async function(id){
return await http.delete(
`${config.API_URL}/wpm/sflogexp/${id}/`);
}
},
cquery: {
name: "复杂查询",
req: async function(data){
return await http.post(
`${config.API_URL}/wpm/sflogexp/cquery/`,
data);
}
},
},
// //值班停机关系
// stsflog: {
// list: {
// name: "值班停机关系",
// req: async function(data){
// return await http.get(
// `${config.API_URL}/wpm/stsflog/`,
// data
// );
// }
// },
// update: {
// name: "值班停机关系更新",
// req: async function(id, data){
// return await http.put(
// `${config.API_URL}/wpm/stsflog/${id}/`,
// data);
// }
// },
// },
}

View File

@ -238,6 +238,17 @@ const routes = [
},
"component": "enm_rm/handoverLog"
},
{
"name": "logDetail",
"path": "/enm_rm/logDetail",
"meta": {
"title": "日志详情",
"icon": "el-icon-document-copy",
"perms": ["enm"],
"hidden":true
},
"component": "enm_rm/logDetail"
},
]
},
//回转窑
@ -571,11 +582,20 @@ const routes = [
"name": "reportAll",
"path": "/ungrouped/report",
"meta": {
"title": "生产报表",
"title": "生产报表",
"icon": "el-icon-grid",
"perms": ["enm"]
},
"component": "ungrouped/report"
},{
"name": "reportMonthAll",
"path": "/ungrouped/reportMonth",
"meta": {
"title": "生产月报表",
"icon": "el-icon-grid",
"perms": ["enm"]
},
"component": "ungrouped/report_month"
}
// ,{
// "name": "echart",

View File

@ -86,8 +86,9 @@
<el-table-column label="操作" fixed="right" align="center" width="140">
<template #default="scope">
<el-button link size="small" @click="sflog_edit(scope.row)" type="primary">编辑</el-button>
<el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button>
<el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button>
<!-- <el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button> -->
<!-- <el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button> -->
<el-divider direction="vertical"></el-divider>
<el-button link size="small" @click="sflog_export(scope.row)" type="success">报表</el-button>
</template>
</el-table-column>
@ -241,10 +242,20 @@
},
//
sflog_edit(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("edit").setData(row);
let jsonStr = JSON.stringify(row);
this.$TOOL.data.remove("sflogItem")
this.$TOOL.data.set('sflogItem',jsonStr)
this.$router.push({
name: "logDetail",
query: {
mgroupId: row.mgroup,
deptId:this.deptId
},
});
// this.dialog.save = true;
// this.$nextTick(() => {
// this.$refs.saveDialog.open("edit").setData(row);
// });
},
//
sflog_check(row){

View File

@ -74,10 +74,9 @@
<span>{{ scope.row.end_time.slice(0,16)}}</span>
</template>
</el-table-column>
<el-table-column label="班组名称" prop="team_name" width="80"></el-table-column>
<el-table-column label="当前班次" prop="shift_name" width="80"></el-table-column>
<el-table-column label="班长" prop="leader_name" width="80"></el-table-column>
<el-table-column label="班组名称" prop="team_name"></el-table-column>
<el-table-column label="当前班次" prop="shift_name"></el-table-column>
<el-table-column label="班长" prop="leader_name"></el-table-column>
<el-table-column label="检验时间">
<template #default="scope">
<span v-if="scope.row.last_test_time">{{ scope.row.last_test_time.slice(0,16)}}</span>
@ -85,9 +84,10 @@
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="140">
<template #default="scope">
<el-button link size="small" @click="sflog_edit(scope.row)" type="primary">编辑</el-button>
<el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button>
<el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button>
<el-button link size="small" @click="sflog_edit(scope.row)" type="primary">操作</el-button>
<!-- <el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button> -->
<!-- <el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button> -->
<el-divider direction="vertical"></el-divider>
<el-button link size="small" @click="sflog_export(scope.row)" type="success">报表</el-button>
</template>
</el-table-column>
@ -261,10 +261,20 @@ import otherDialog from "./../enm_rm/other_form.vue";
},
//
sflog_edit(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("edit").setData(row);
let jsonStr = JSON.stringify(row);
this.$TOOL.data.remove("sflogItem")
this.$TOOL.data.set('sflogItem',jsonStr)
this.$router.push({
name: "logDetail",
query: {
mgroupId: row.mgroup,
deptId:this.deptId
},
});
// this.dialog.save = true;
// this.$nextTick(() => {
// this.$refs.saveDialog.open("edit").setData(row);
// });
},
//
sflog_check(row){

View File

@ -74,9 +74,9 @@
<span>{{ scope.row.end_time.slice(0,16)}}</span>
</template>
</el-table-column>
<el-table-column label="班组名称" prop="team_name" width="80"></el-table-column>
<el-table-column label="当前班次" prop="shift_name" width="80"></el-table-column>
<el-table-column label="班长" prop="leader_name" width="80"></el-table-column>
<el-table-column label="班组名称" prop="team_name"></el-table-column>
<el-table-column label="当前班次" prop="shift_name"></el-table-column>
<el-table-column label="班长" prop="leader_name"></el-table-column>
<el-table-column label="检验时间">
<template #default="scope">
@ -86,8 +86,9 @@
<el-table-column label="操作" fixed="right" align="center" width="140">
<template #default="scope">
<el-button link size="small" @click="sflog_edit(scope.row)" type="primary">编辑</el-button>
<el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button>
<el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button>
<!-- <el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button> -->
<!-- <el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button> -->
<el-divider direction="vertical"></el-divider>
<el-button link size="small" @click="sflog_export(scope.row)" type="success">报表</el-button>
</template>
</el-table-column>
@ -241,10 +242,20 @@
},
//
sflog_edit(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("edit").setData(row);
let jsonStr = JSON.stringify(row);
this.$TOOL.data.remove("sflogItem")
this.$TOOL.data.set('sflogItem',jsonStr)
this.$router.push({
name: "logDetail",
query: {
mgroupId: row.mgroup,
deptId:this.deptId
},
});
// this.dialog.save = true;
// this.$nextTick(() => {
// this.$refs.saveDialog.open("edit").setData(row);
// });
},
//
sflog_check(row){

View File

@ -83,11 +83,12 @@
<span v-if="scope.row.last_test_time">{{ scope.row.last_test_time.slice(0,16)}}</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="100">
<el-table-column label="操作" fixed="right" align="center" width="140">
<template #default="scope">
<el-button link size="small" @click="sflog_edit(scope.row)" type="primary">编辑</el-button>
<!-- <el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button> -->
<!-- <el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button> -->
<el-divider direction="vertical"></el-divider>
<el-button link size="small" @click="sflog_export(scope.row)" type="success">报表</el-button>
</template>
</el-table-column>
@ -210,10 +211,20 @@ import saveDialog from "./../enm_rm/handover_form.vue";
},
//
sflog_edit(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("edit").setData(row);
let jsonStr = JSON.stringify(row);
this.$TOOL.data.remove("sflogItem")
this.$TOOL.data.set('sflogItem',jsonStr)
this.$router.push({
name: "logDetail",
query: {
mgroupId: row.mgroup,
deptId:this.deptId
},
});
// this.dialog.save = true;
// this.$nextTick(() => {
// this.$refs.saveDialog.open("edit").setData(row);
// });
},
//

View File

@ -63,7 +63,6 @@
@row-click="rowClick"
>
<el-table-column type="index" width="50"/>
<!-- <el-table-column label="关联工段" prop="mgroup_name"></el-table-column> -->
<el-table-column label="开始时间" prop="start_time">
<template #default="scope">
<span>{{ scope.row.start_time.slice(0,16)}}</span>
@ -74,10 +73,9 @@
<span>{{ scope.row.end_time.slice(0,16)}}</span>
</template>
</el-table-column>
<el-table-column label="班组名称" prop="team_name" width="80"></el-table-column>
<el-table-column label="当前班次" prop="shift_name" width="80"></el-table-column>
<el-table-column label="班长" prop="leader_name" width="80"></el-table-column>
<el-table-column label="班组名称" prop="team_name"></el-table-column>
<el-table-column label="当前班次" prop="shift_name"></el-table-column>
<el-table-column label="班长" prop="leader_name"></el-table-column>
<el-table-column label="检验时间">
<template #default="scope">
<span v-if="scope.row.last_test_time">{{ scope.row.last_test_time.slice(0,16)}}</span>
@ -86,8 +84,9 @@
<el-table-column label="操作" fixed="right" align="center" width="140">
<template #default="scope">
<el-button link size="small" @click="sflog_edit(scope.row)" type="primary">编辑</el-button>
<el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button>
<el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button>
<!-- <el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button> -->
<!-- <el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button> -->
<el-divider direction="vertical"></el-divider>
<el-button link size="small" @click="sflog_export(scope.row)" type="success">报表</el-button>
</template>
</el-table-column>
@ -226,7 +225,7 @@ import otherDialog from "./other_form.vue";
};
},
mounted(){
this.getTeam();
// this.getTeam();
this.getShfit();
},
methods: {
@ -256,19 +255,20 @@ import otherDialog from "./other_form.vue";
},
//
sflog_edit(row) {
// let jsonStr = JSON.stringify(row);
// this.$TOOL.data.remove("sflogItem")
// this.$TOOL.data.set('sflogItem',jsonStr)
// this.$router.push({
// name: "logDetail",
// query: {
// mgroupId: row.mgroup
// },
// });
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("edit").setData(row);
let jsonStr = JSON.stringify(row);
this.$TOOL.data.remove("sflogItem")
this.$TOOL.data.set('sflogItem',jsonStr)
this.$router.push({
name: "logDetail",
query: {
mgroupId: row.mgroup,
deptId:this.deptId
},
});
// this.dialog.save = true;
// this.$nextTick(() => {
// this.$refs.saveDialog.open("edit").setData(row);
// });
},
//

View File

@ -1,78 +1,243 @@
<template>
<el-container>
<el-main class="nopadding">
<el-card style="margin: 6px;position:relative">
<el-descriptions title="日志信息" :column="3">
<el-descriptions-item label="所属工段:">
<span>{{sflogItem.mgroup_name}}</span>
</el-descriptions-item>
<el-descriptions-item label="工作班次:" :span="3">
{{ sflogItem.shift_name }}
</el-descriptions-item>
<el-container>
<el-main class="nopadding">
<el-card style="margin: 6px;position:relative">
<el-descriptions title="日志信息" :column="3">
<el-descriptions-item label="所属工段:">
<span>{{form.mgroup_name}}</span>
</el-descriptions-item>
<el-descriptions-item label="工作班次:" :span="3">
{{ form.shift_name }}
</el-descriptions-item>
<el-descriptions-item label="开始时间:">
<span>{{sflogItem.start_time}}</span>
</el-descriptions-item>
<el-descriptions-item label="结束时间:" :span="3">
{{ sflogItem.end_time }}
</el-descriptions-item>
</el-descriptions>
<span>{{form.start_time}}</span>
</el-descriptions-item>
<el-descriptions-item label="结束时间:" :span="3">
{{ form.end_time }}
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card style="margin: 6px;position:relative">
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane label="班组" name="first">
<el-form
ref="dialogForm"
:model="form"
label-width="100px"
label-position="right"
:rules="rule1"
style="width: 600px;"
<el-card style="margin: 6px;position:relative">
<el-button type="primary" icon="el-icon-plus" @click.stop="addExp" v-if="activeName=='fourth'" style="position: absolute;top:6px;right: 10px;z-index: 100;"></el-button>
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" height="600px">
<el-tab-pane label="班组" name="first">
<el-form
ref="teamForm"
:model="form"
label-width="100px"
label-position="right"
>
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="当班班组" prop="team">
<el-select
v-model="form.team"
placeholder="当班班组"
clearable
style="width: 100%;"
@change="teamChange"
>
<el-option
v-for="item in teamOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="班组班长" prop="leader_name">
<el-input v-model="form.leader_name" placeholder="班组班长" disabled/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24" v-if="form.shift_name=='白班'&&mgroupId=='3347217246321065984'">
<el-form-item label="煤粉热值">
<el-input-number v-model="form.pcoal_heat" controls-position="right" placeholder="煤粉热值" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-footer style="text-align: center;">
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
</el-footer>
</el-tab-pane>
<el-tab-pane label="检验" name="second">
<el-form
ref="dialogForm"
:model="form"
label-width="85px"
label-position="right"
>
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="当前班组">
{{ form.team_name }}
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="班组组长">
{{ form.leader_name }}
</el-form-item>
</el-col>
<el-divider />
</el-row>
</el-form>
<sc-form-table
v-model="checkList"
:hideAdd="hideAdd"
:hideDelete="hideDelete"
placeholder="暂无数据"
>
<el-table-column prop="material" label="关联产物" min-width="150">
<template #default="scope">
<span v-if="scope.row.id">{{ scope.row.material_name }}</span>
</template>
</el-table-column>
<el-table-column prop="testitem" label="质检项目" min-width="150">
<template #default="scope">
<span v-if="scope.row.id">{{ scope.row.testitem_name }}</span>
</template>
</el-table-column>
<el-table-column prop="val_avg" label="平均值" min-width="150">
<template #default="scope">
<el-input
v-model="scope.row.val_avg"
placeholder="请输入内容"
></el-input>
</template>
</el-table-column>
<el-table-column prop="num_test" label="检验次数" min-width="150">
<template #default="scope">
<el-input
v-model="scope.row.num_test"
placeholder="请输入内容"
></el-input>
</template>
</el-table-column>
<el-table-column prop="num_ok" label="合格次数" min-width="150">
<template #default="scope">
<el-input
v-model="scope.row.num_ok"
placeholder="请输入内容"
></el-input>
</template>
</el-table-column>
</sc-form-table>
<el-footer style="text-align: center;">
<el-button type="primary" :loading="isSaveing" @click="submit2">保存</el-button>
</el-footer>
</el-tab-pane>
<el-tab-pane label="能源" name="third">
其他能源输入
</el-tab-pane>
<el-tab-pane label="异常" name="fourth">
<scTable
ref="expTable"
:apiObj="apiObj"
row-key="id"
stripe
highlightCurrentRow
hideDo
hidePagination
>
<el-table-column type="index" width="50"/>
<el-table-column label="发生时间" prop="happen_time"></el-table-column>
<el-table-column label="原因类别" prop="cate"></el-table-column>
<el-table-column label="异常名称" prop="title"></el-table-column>
<el-table-column label="事件原因" prop="reason"></el-table-column>
<el-table-column label="处置措施" prop="measure"></el-table-column>
<el-table-column label="停机时长" prop="duration"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="120">
<template #default="scope">
<el-button link size="small" @click="sflogexp_edit(scope.row)" type="primary">编辑</el-button>
<el-divider direction="vertical"></el-divider>
<el-button link size="small" @click="sflogexp_delete(scope.row)" type="danger">删除</el-button>
</template>
</el-table-column>
</scTable>
<el-dialog :title="expTitle" v-model="visible">
<el-form
ref="expForms"
:rules="rules"
label-width="100px"
:model="expForm"
>
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="异常名称" prop="title">
<el-input v-model="expForm.title" placeholder="异常名称" />
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="发生时间" prop="happen_time">
<el-date-picker
v-model="expForm.happen_time"
type="datetime"
placeholder="发生时间"
value-format="YYYY-MM-DD HH:mm:ss"
style="width:100%"
>
<el-row>
<el-col :md="12" :sm="24">
<el-form-item label="当班班组" prop="team">
<el-select
v-model="form.team"
placeholder="当班班组"
clearable
style="width: 100%;"
@change="teamChange"
>
<el-option
v-for="item in teamOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="班组班长" prop="leader_name">
<el-input v-model="form.leader_name" placeholder="班组班长" disabled/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24" v-if="sflogItem.shift_name=='夜班'">
<el-form-item label="煤粉热值">
<el-input-number v-model="form.pcoal_heat" controls-position="right" placeholder="煤粉热值" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-footer style="width: 600px;text-align: center;">
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
<el-button @click="visible = false">取消</el-button>
</el-footer>
</el-tab-pane>
<el-tab-pane label="检验" name="second">Config</el-tab-pane>
<el-tab-pane label="能源" name="third">Role</el-tab-pane>
<el-tab-pane label="异常" name="fourth">Task</el-tab-pane>
</el-tabs>
</el-card>
</el-main>
</el-container>
</template>
<script>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="原因类别" prop="cate">
<el-select style="width: 100%" v-model="expForm.cate" placeholder="原因类别">
<el-option
v-for="item in options"
:key="item"
:label="item"
:value="item">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="停机时长">
<el-input-number
v-model="expForm.duration"
:precision="2" :min="0"
controls-position="right"
placeholder="停机时长"
style="width: 100%;"/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="处置措施">
<el-input
type="textarea"
:rows="2"
v-model="expForm.measure"
placeholder="处置措施"
/>
</el-form-item>
</el-col>
<el-col :md="12" :sm="24">
<el-form-item label="停机原因">
<el-input
type="textarea"
:rows="2"
v-model="expForm.reason"
placeholder="停机原因"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-footer>
<el-button type="primary" :loading="isSaveing" @click="submit4">保存</el-button>
<el-button @click="visible = false">取消</el-button>
</el-footer>
</el-dialog>
</el-tab-pane>
</el-tabs>
</el-card>
</el-main>
</el-container>
</template>
<script>
import saveDialog from "./handover_form.vue";
import quastatDialog from "./quastat_form.vue";
import otherDialog from "./other_form.vue";
@ -83,56 +248,68 @@ import otherDialog from "./other_form.vue";
otherDialog,
quastatDialog
},
props: {
mgroupId: {
type: [String],
default: "",
},
item: {
type: [String],
default: "",
},
},
data() {
return {
activeName:'',
deptId:'',
mgroupId:'',
hideAdd:true,
visible:false,
hideDelete:true,
isSaveing:false,
activeName:'fourth',
expTitle:'新增异常',
sflogItem:{},
form:{
}
},
expForm:{
happen_time:'',
cate:'',
title:'',
reason:'',
measure:'',
duration:'',
sflog:'',
},
query:{
page:0,
},
rules: {
happen_time: [{ required: true, message: "请选择发生时间" }],
title: [{ required: true, message: "请填写异常名称" }],
cate: [{ required: true, message: "请选择原因类别" }],
},
options:['工艺','电器','机械','其他'],
checkList:[],
teamOptions:[],
sflogexpList:[],
apiObj:this.$API.wpm.sflogexp.list
};
},
created(){
let form = this.$TOOL.data.get("sflogItem")
this.form = JSON.parse(form);
query.stlog = this.form.id;
},
mounted(){
let sflogItem = this.$TOOL.data.get("sflogItem")
this.sflogItem = JSON.parse(sflogItem);
debugger;
console.log(sflogItem)
this.getLogDetail();
this.deptId = this.$route.query.deptId;
this.mgroupId = this.$route.query.mgroupId;
let form = this.$TOOL.data.get("sflogItem")
this.form = JSON.parse(form);
this.getTeam();
},
methods: {
handleClick(){
},
getLogDetail(){
},
sflog_export(){
this.limitedExport = true;
},
rowClick(row) {
this.sflogId = row.id;
this.sflogItem = row;
// this.$refs.table2.queryData({post: row.id});
},
//
sflog_edit(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("edit").setData(row);
});
handleClick(e){
this.activeName = e.paneName;
if(e.paneName=='second'){
this.getsflogItem();
}
},
//******first ******* */
getTeam(){
let that = this;
let form ={};
form.page = 0;
form.belong_dept = this.deptId;
@ -140,6 +317,51 @@ import otherDialog from "./other_form.vue";
this.teamOptions = res;
})
},
teamChange(data){
let that = this;
that.teamOptions.forEach(item=>{
if(item.id==data){
that.form.leader_name = item.leader_name;
that.form.leader= item.leader;
}
})
},
//
submit() {
let that = this;
that.$refs.teamForm.validate(async (valid) => {
if (valid) {
that.isSaveing = true;
let obj={};
obj.team = that.form.team;
obj.shift = that.form.shift;
obj.leader = that.form.leader;
obj.pcoal_heat = that.form.pcoal_heat;
that.$API.wpm.sflog.update.req(that.form.id,obj).then(res=>{
that.isSaveing = false;
that.$message.success("操作成功");
}).catch(res=>{
that.isSaveing = false;
})
}
});
},
//****** seconed ******* */
//
getsflogItem(){
this.$API.wpm.sflog.init_test.req(this.form.id).then(res=>{
this.checkList = res;
})
},
submit2() {
this.isSaveing = true;
this.$API.qm.updateQuastat.req('bulk',this.checkList).then(res=>{
this.isSaveing = false;
this.$message.success("操作成功");
}).catch(res=>{
this.isSaveing = false;
})
},
//
sflog_check(row){
this.dialog.check = true;
@ -147,63 +369,80 @@ import otherDialog from "./other_form.vue";
this.$refs.checkDialog.open("edit").setData(row);
});
},
//
sflog_other(row){
this.dialog.other = true;
this.$nextTick(() => {
this.$refs.otherDialog.open("edit").setData(row);
});
//***** fourth ****** */
//
getSflogexp(){
let obj = {};
obj.page = 0;
obj.stlog = this.form.id;
this.$API.wpm.sflogexp.list.req(obj).then(res=>{
this.sflogexpList = res;
})
},
// //
// table_show(row) {
// this.dialog.save = true;
// this.$nextTick(() => {
// this.$refs.checkDialog.open("edit").setData(row);
// });
// },
//
async table_del(row) {
this.$API.wpm.sflog.delete.req(row.id)
.then((res) => {
this.$message.success("删除成功");
return res;
})
.catch((err) => {
return err;
});
//
addExp(){
this.expForm = {};
this.expForm.happen_time='';
this.expForm.cate='';
this.expForm.title='';
this.expForm.reason='';
this.expForm.measure='';
this.expForm.duration='';
this.expForm.sflog=this.form.id;
this.expTitle='新增异常';
this.visible = true;
},
//
handleSaveSuccess(data, mode) {
this.$refs.table.refresh()
this.dialog.save = false;
//
sflogexp_edit(row) {
Object.assign(this.expForm, row);
this.expTitle='编辑异常';
this.expForm.handler = this.$TOOL.data.get("USER_INFO").id;
this.visible = true;
},
handleOtherSuccess(){
this.dialog.other = false;
},
handleCheckSuccess(){
this.dialog.check = false;
},
closed() {
this.dialog.save = false;
this.$refs.table2.refresh();
},
handleDel(row) {
//
async sflogexp_delete(row) {
this.$confirm(`确定删除选中的记录吗?`, "提示", {
type: "warning",
}).then(() => {
this.$API.wpm.shift.delete.req(row.id).then((res) => {
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
// const loading = this.$loading();
// this.$refs.table2.refresh();
// loading.close();
// this.$message.success("");
}
});
this.$API.wpm.sflogexp.delete.req(row.id)
.then((res) => {
this.$message.success("删除成功");
this.$refs.expTable.refresh();
})
.catch(() => {});
.catch((err) => {
this.$message.success(err);
});
})
},
submit4(){
let that = this;
that.$refs.expForms.validate(async (valid) => {
if (valid) {
that.isSaveing = true;
if (that.expTitle=='新增异常') {
that.$API.wpm.sflogexp.create.req(that.expForm).then(res=>{
that.isSaveing = false;
that.visible = false;
that.$message.success("操作成功");
this.$refs.expTable.refresh();
}).catch(res=>{
that.isSaveing = false;
})
} else {
that.$API.wpm.sflogexp.update.req(that.expForm.id,that.expForm).then(res=>{
that.isSaveing = false;
that.visible = false;
that.$message.success("操作成功");
this.$refs.expTable.refresh();
}).catch(res=>{
that.isSaveing = false;
})
}
}
})
},
handlePrint() {
this.$PRINT('#myReport');
},

View File

@ -87,7 +87,8 @@
<template #default="scope">
<el-button link size="small" @click="sflog_edit(scope.row)" type="primary">编辑</el-button>
<!-- <el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button> -->
<el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button>
<!-- <el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button> -->
<el-divider direction="vertical"></el-divider>
<el-button link size="small" @click="sflog_export(scope.row)" type="success">报表</el-button>
</template>
</el-table-column>
@ -212,10 +213,20 @@
},
//
sflog_edit(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("edit").setData(row);
let jsonStr = JSON.stringify(row);
this.$TOOL.data.remove("sflogItem")
this.$TOOL.data.set('sflogItem',jsonStr)
this.$router.push({
name: "logDetail",
query: {
mgroupId: row.mgroup,
deptId:this.deptId
},
});
// this.dialog.save = true;
// this.$nextTick(() => {
// this.$refs.saveDialog.open("edit").setData(row);
// });
},
//
sflog_other(row){

View File

@ -21,13 +21,12 @@
<table border="1" width="1035" cellspacing="0" :key="timeStamp" class="myTable" id="myTable">
<thead class="myTableHead">
<tr>
<th colspan="6">电石渣工段主要设备100KW以上单位产品电耗数据表</th>
<th colspan="5">电石渣工段主要设备100KW以上单位产品电耗数据表</th>
</tr>
<tr>
<th>设备名称</th>
<th>设备编号</th>
<th>单位</th>
<th>上个小时</th>
<th>昨日</th>
<th>本月</th>
</tr>
@ -36,9 +35,8 @@
<tr v-for="item in tableDatas" :key="item">
<template v-for="(item1,ind) in item" :key="item1">
<td v-if="ind==0||ind==1||ind==2" class="numCell">{{item1}}</td>
<td v-if="ind==3" class="numCell hoursItem" @click="itemClick('hours',item1)">{{item1}}</td>
<td v-if="ind==4" class="numCell monthItem" @click="itemClick('month',item1)">{{item1}}</td>
<td v-if="ind==5" class="numCell yearItem" @click="itemClick1('year',item1)">{{item1}}</td>
<td v-if="ind==3" class="numCell monthItem" @click="itemClick('month',item1)">{{item1}}</td>
<td v-if="ind==4" class="numCell yearItem" @click="itemClick1('year',item1)">{{item1}}</td>
</template>
</tr>
</tbody>
@ -262,13 +260,6 @@
month_d = lastDate.getMonth()+1;
days_d = lastDate.getDate();
}
//
let hourTime = timeDate - 3600000;
let hourDate = new Date(hourTime);
let year_h = hourDate.getFullYear();
let month_h = hourDate.getMonth()+1;
let days_h = hourDate.getDate();
let hours_h = hourDate.getHours();
//
let params2 = {};
params2.page = 0;
@ -288,7 +279,7 @@
that.tableDatas[i][1]=data2[i].ep_monitored_number;
that.tableDatas[i][2]='KW·h/t';
let val = allValMonth==0?'/':(data2[i].val/allValMonth).toFixed(2);
that.tableDatas[i][5]=val;
that.tableDatas[i][4]=val;
}
})
}
@ -309,35 +300,11 @@
let data3 = res3;
for (let j = 0; j < data3.length; j++) {
let val = allValDays==0?'/':(data3[j].val/allValDays).toFixed(2);
that.tableDatas[j][4]=val;
that.tableDatas[j][3]=val;
}
})
}
})
//
let params4 = {};
params4.page = 0;
params4.year = year_h;
params4.month = month_h;
params4.day = days_h;
params4.hour = hours_h;
params4.type = 'hour_s';
params4.mgroup = this.query.mgroup;
this.$API.enm.enstat.req(params4).then((res4) => {
if(res4.length>0){
let hourProduct = res4[0].total_production;
params4.mpoint__ep_monitored__power_kw__gte = 100;
this.$API.enm.mpoint.stat.req(params4).then((res) => {
let data4 = res4;
for (let k = 0; k < data4.length; k++) {
let val = hourProduct==0?'/':(data4[k].val/hourProduct).toFixed(2);
that.tableDatas[k][3]=val;
}
})
}
})
})
that.getDayData();
that.getMonthData();

View File

@ -33,9 +33,9 @@
<el-input
v-model="form.password"
show-password
placeholder="请输入新密码"
placeholder="包含英文、数字、特殊符号( @#$%^&.+=! 的8位以上密码"
></el-input>
<div class="el-form-item-msg">请输入包含英文数字的8位以上密码</div>
<!-- <div class="el-form-item-msg">包含英文数字特殊符号 @#$%^&.+=! 的8位以上密码</div> -->
</el-form-item>
<el-form-item label="确认新密码" prop="password2">
<el-input
@ -85,7 +85,16 @@ export default {
// ],
phone: [{ required: true, message: "请输入手机号" }],
code: [{ required: true, message: "请输入短信验证码" }],
password: [{ required: true, message: "请输入新的密码" }],
password: [{ required: true, message: '请输入新密码'},
{validator: (rule, value, callback) => {
let reg1 = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[@#$%^&.+=!])(?!.*\s).{8,}$/;
if (reg1.test(value)) {
callback();
}else{
callback(new Error('请输入包含英文、数字、特殊符号( @#$%^&.+=! 的8位以上密码'));
}
}}
],
password2: [
{ required: true, message: "请再次输入新的密码" },
{

View File

@ -51,8 +51,8 @@
<td class="numCell">{{item[2]}}</td>
<td class="numCell">{{item[3]}}</td>
<td class="numCell">{{item[4]}}</td>
<td class="numCell" v-if="item[5]">{{item[5]}}</td>
<td class="numCell" v-if="item[6]">{{item[6]}}</td>
<td class="numCell" v-if="item[5]!==null&&item[5]!==undefined">{{item[5]}}</td>
<td class="numCell" v-if="item[6]!==null&&item[6]!==undefined">{{item[6]}}</td>
</tr>
</table>
</div>
@ -69,59 +69,59 @@
days:'',
},
tableDatas:[
['原料车间','电石渣','烘干破主电机',1,2,3,4 ],//0
['原料车间','电石渣合计',1,2,3,4 ],
['原料车间','原料磨','反击式破碎机',1,2,3,4],
['原料车间','立磨主电机',1,2,3,4],
['原料车间','循环风机',1,2,3,4],
['原料车间','废气风机' ,1,2,3,4],//5
['原料车间','尾排风机',1,2,3,4],
['原料车间','原料磨合计' ,1,2,3,4],
['原料车间','原料车间合计',1,2,3,4],//8
['原料车间','电石渣','烘干破主电机',0,0,0,0 ],//0
['原料车间','电石渣合计',0,0,0,0 ],
['原料车间','原料磨','反击式破碎机',0,0,0,0],//2
['原料车间','立磨主电机',0,0,0,0],
['原料车间','循环风机',0,0,0,0],
['原料车间','废气风机' ,0,0,0,0],//5
['原料车间','尾排风机',0,0,0,0],
['原料车间','原料磨合计' ,0,0,0,0],
['原料车间','原料车间合计',0,0,0,0],//8
['烧成车间','回转窑','高温风机',1,2,3,4],//9
['烧成车间','窑主电机',1,2,3,4],//10
['烧成车间','篦冷机一室风机电机',1,2,3,4],
['烧成车间','篦冷机三室风机电机',1,2,3,4],
['烧成车间','篦冷机二室风机电机',1,2,3,4],
['烧成车间','篦冷机一室充气梁风机(左)',1,2,3,4],
['烧成车间','篦冷机一室充气梁风机(右)',1,2,3,4],//15
['烧成车间','窑头排风机主电机',1,2,3,4],
['烧成车间','头煤粉罗茨电机(东、备用)',1,2,3,4],
['烧成车间','尾煤粉罗茨电机(西)',1,2,3,4],
['烧成车间','空压机3301',1,2,3,4],
['烧成车间','空压机3308',1,2,3,4],//20
['烧成车间','空压机3318',1,2,3,4],//21
['烧成车间','回转窑合计',1,2,3,4],
['烧成车间','煤磨','煤磨主电机',1,2,3,4],
['烧成车间','煤磨排风机主电机',1,2,3,4],
['烧成车间','煤磨合计',1,2,3,4],//25
['烧成车间','烧成车间合计',1,2,3,4],//26
['烧成车间','回转窑','高温风机',0,0,0,0],//9
['烧成车间','窑主电机',0,0,0,0],//10
['烧成车间','篦冷机一室风机电机',0,0,0,0],
['烧成车间','篦冷机三室风机电机',0,0,0,0],
['烧成车间','篦冷机二室风机电机',0,0,0,0],
['烧成车间','篦冷机一室充气梁风机(左)',0,0,0,0],
['烧成车间','篦冷机一室充气梁风机(右)',0,0,0,0],//15
['烧成车间','窑头排风机主电机',0,0,0,0],
['烧成车间','头煤粉罗茨电机(东、备用)',0,0,0,0],
['烧成车间','尾煤粉罗茨电机(西)',0,0,0,0],
['烧成车间','空压机3301',0,0,0,0],
['烧成车间','空压机3308',0,0,0,0],//20
['烧成车间','空压机3318',0,0,0,0],//21
['烧成车间','回转窑合计',0,0,0,0],
['烧成车间','煤磨','煤磨主电机',0,0,0,0],
['烧成车间','煤磨排风机主电机',0,0,0,0],
['烧成车间','煤磨合计',0,0,0,0],//25
['烧成车间','烧成车间合计',0,0,0,0],//26
['水泥车间','水泥磨','循环风机1906',1,2,3,4],//27
['水泥车间','系统风机',1,2,3,4],
['水泥车间','水平涡流选粉机1915',1,2,3,4],
['水泥车间','水泥磨主电机',1,2,3,4],//30
['水泥车间','辊压机动辊电机',1,2,3,4],
['水泥车间','辊压机定辊电机',1,2,3,4],
['水泥车间','新增磨尾风机',1,2,3,4],
['水泥车间','水泥1#空压机',1,2,3,4],
['水泥车间','水泥2#空压机',1,2,3,4],//35
['水泥车间','水泥磨合计计',1,2,3,4],
['水泥车间','水泥包装合计',1,2,3,4],//37
['水泥车间','水泥车间合计',1,2,3,4],//38
['水泥车间','水泥磨','循环风机1906',0,0,0,0],//27
['水泥车间','系统风机',0,0,0,0],
['水泥车间','水平涡流选粉机1915',0,0,0,0],
['水泥车间','水泥磨主电机',0,0,0,0],//30
['水泥车间','辊压机动辊电机',0,0,0,0],
['水泥车间','辊压机定辊电机',0,0,0,0],
['水泥车间','新增磨尾风机',0,0,0,0],
['水泥车间','水泥1#空压机',0,0,0,0],
['水泥车间','水泥2#空压机',0,0,0,0],//35
['水泥车间','水泥磨合计计',0,0,0,0],
['水泥车间','水泥包装合计',0,0,0,0],//37
['水泥车间','水泥车间合计',0,0,0,0],//38
['生活区','食堂',1,2,3,4],//39
['生活区','单元楼',1,2,3,4],//40
['生活区','单身宿舍',1,2,3,4],
['生活区','办公楼',1,2,3,4],
['生活区','余热锅炉',1,2,3,4],
['生活区','污水站',1,2,3,4],
['生活区','南门办公区',1,2,3,4],//45
['生活区','东门办公区',1,2,3,4],
['生活区','地磅',1,2,3,4],
['生活区','生活区合计',1,2,3,4],
['全厂电量',1,2,3,4],
['生活区','食堂',0,0,0,0],//39
['生活区','单元楼',0,0,0,0],//40
['生活区','单身宿舍',0,0,0,0],
['生活区','办公楼',0,0,0,0],
['生活区','余热锅炉',0,0,0,0],
['生活区','污水站',0,0,0,0],
['生活区','南门办公区',0,0,0,0],//45
['生活区','东门办公区',0,0,0,0],
['生活区','地磅',0,0,0,0],
['生活区','生活区合计',0,0,0,0],
['全厂电量',0,0,0,0]
],
sourceData:{}
};
@ -243,6 +243,27 @@
}
return index;
}
function sumNum(a,b,c,d){
let sum = 0;
if(a&&Number(a)){sum=sum+a;}
if(b&&Number(b)){sum=sum+b;}
if(c&&Number(c)){sum=sum+c;}
if(d&&Number(d)){sum=sum+d;}
// if(a!==''){
// if(b!==''){
// sum = a + b;
// }else{
// sum = a;
// }
// }else{
// if(b!==''){
// sum = b;
// }else{
// sum = '';
// }
// }
return sum;
}
let obj = {};
obj.type='hour_s';
obj.year = that.year;
@ -255,14 +276,30 @@
//
res.forEach(item=>{
let i = dataPush(item.mpoint_name);
let k = 3;
let k = 0;
if(i==0||i==2||i==9||i==23||i==27){
k = 3;
}else{
k = 2;
}
that.tableDatas[i][k] = item.val;
})
if(that.tableDatas[1][2]!==''){
if(that.tableDatas[7][2]!==''){
that.tableDatas[8][2] = that.tableDatas[1][2]+ that.tableDatas[7][2];
}else{
that.tableDatas[8][2] = that.tableDatas[1][2];
}
}
that.tableDatas[8][2] = that.tableDatas[1][2]+that.tableDatas[7][2];
that.tableDatas[26][2] = that.tableDatas[22][2]+ that.tableDatas[25][2];
that.tableDatas[38][2] = that.tableDatas[36][2]+ that.tableDatas[37][2];
that.tableDatas[49][1] = that.tableDatas[8][2]+ that.tableDatas[26][2]+ that.tableDatas[38][2]+ that.tableDatas[48][2];
}).then(()=>{
//
let obj1 = {};
obj1.type='day_s';
let dayTime = 24 * 60 * 60 * 1000;
let year_d = that.year,month_d = that.month,days_d = that.day;
if(that.hour<21){//21点前查找昨日数据为前一天数据
let newDate = that.timeDate- dayTime;
@ -277,9 +314,20 @@
obj1.page = 0;
obj1.mpoint__ep_monitored__power_kw__gte=100;
this.$API.enm.mpoint.stat.req(obj1).then((res1) => {
debugger;
console.log(res1);
res1.forEach(item1=>{
let i = dataPush(item1.mpoint_name);
let k = 0;
if(i==0||i==2||i==9||i==23||i==27){
k = 4;
}else{
k = 3;
}
that.tableDatas[i][k] = item1.val;
})
that.tableDatas[8][3] = that.tableDatas[1][3]+ that.tableDatas[7][3];
that.tableDatas[26][3] = that.tableDatas[22][3]+ that.tableDatas[25][3];
that.tableDatas[38][3] = that.tableDatas[36][3]+ that.tableDatas[37][3];
that.tableDatas[49][2] = that.tableDatas[8][3]+ that.tableDatas[26][3]+ that.tableDatas[38][3]+ that.tableDatas[48][3];
})
//
let obj2 = {};
@ -289,8 +337,22 @@
obj2.page = 0;
obj2.mpoint__ep_monitored__power_kw__gte=100;
this.$API.enm.mpoint.stat.req(obj2).then((res2) => {
debugger;
console.log(res2)
// debugger;
// console.log(res2)
res2.forEach(item2=>{
let i = dataPush(item2.mpoint_name);
let k = 0;
if(i==0||i==2||i==9||i==23||i==27){
k = 5;
}else{
k = 4;
}
that.tableDatas[i][k] = item2.val;
})
that.tableDatas[8][4] = that.tableDatas[1][4]+ that.tableDatas[7][4];
that.tableDatas[26][4] = that.tableDatas[22][4]+ that.tableDatas[25][4];
that.tableDatas[38][4] = that.tableDatas[36][4]+ that.tableDatas[37][4];
that.tableDatas[49][3] = that.tableDatas[8][4]+ that.tableDatas[26][4]+ that.tableDatas[38][4]+ that.tableDatas[48][4];
})
//
let obj3 = {};
@ -299,15 +361,25 @@
obj3.page = 0;
obj3.mpoint__ep_monitored__power_kw__gte=100;
this.$API.enm.mpoint.stat.req(obj3).then((res3) => {
debugger;
console.log(res3)
// debugger;
// console.log(res3)
res3.forEach(item3=>{
let i = dataPush(item3.mpoint_name);
let k = 0;
if(i==0||i==2||i==9||i==23||i==27){
k = 6;
}else{
k = 5;
}
that.tableDatas[i][k] = item3.val;
})
that.tableDatas[8][5] = that.tableDatas[1][5]+ that.tableDatas[7][5];
that.tableDatas[26][5] = that.tableDatas[22][5]+ that.tableDatas[25][5];
that.tableDatas[38][5] = that.tableDatas[36][5]+ that.tableDatas[37][5];
that.tableDatas[49][4] = that.tableDatas[8][5]+ that.tableDatas[26][5]+ that.tableDatas[38][5]+ that.tableDatas[48][5];
})
})
},
exportExcel() {
this.exportLoading = true;
this.$XLSX('#myTable', this.tableName)

View File

@ -3,7 +3,7 @@
<div class="app-container">
<el-header>
<div class="left-panel">
<el-select
<!-- <el-select
v-model="type"
placeholder="查询类型"
clearable
@ -16,7 +16,16 @@
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-select> -->
<el-date-picker
v-model="search_day"
type="date"
value-format="YYYY-MM-DD"
format="YYYY-MM-DD"
placeholder="天"
style="margin-right: 6px;"
@change="dayChange"
/>
<el-button
type="primary"
icon="el-icon-search"
@ -46,7 +55,7 @@
<tr>
<th>序号</th>
<th colspan="2">项目</th>
<th colspan="3"></th>
<th colspan="3">日数据</th>
</tr>
</thead>
<tr v-for="(item,index) in tableDatas" :key="index">
@ -57,7 +66,7 @@
<td class="numCell" v-else-if="index==28" rowspan="5">{{item[1]}}</td>
<td class="numCell" v-else-if="index==33" rowspan="6">{{item[1]}}</td>
<td class="numCell" v-else-if="index>38">{{item[1]}}</td>
<td class="numCell" style="width:150px">{{item[2]}}</td>
<td class="numCell" style="width: 180px !important;">{{item[2]}}</td>
<td class="numCell" v-if="index<39" colspan="3">{{item[3]}}</td>
<td class="numCell" v-else>{{item[3]}}</td>
<td class="numCell" v-if="index>38">{{item[4]}}</td>
@ -80,6 +89,7 @@
name:'生产月报',
id:'month'
}],
search_day:'',
tableDatas:[
[1,'主机设备台产','立磨台产t/h',''],
[2,'主机设备台产','烘干破台产t/h'],
@ -137,28 +147,157 @@
['生产异常动态','煤磨'],
['生产异常动态','水泥磨'],
],
sourceData:{}
year:'',
month:'',
day:'',
hours:'',
timeDate:'',
dataList:{},
};
},
mounted() {
// this.test(0)
// this.getData();
let that = this;
var myDate = new Date();
that.timeDate = myDate.getTime();
let hours = myDate.getHours();
let year = myDate.getFullYear();
let month = myDate.getMonth()+1;
let day = myDate.getDate();
if(hours<21){//21点前查找昨日数据为前一天数据
let dayTime = 24 * 60 * 60 * 1000;
let newDate = that.timeDate- dayTime;
let lastDate = new Date(newDate);
year = lastDate.getFullYear();
month = lastDate.getMonth()+1;
day = lastDate.getDate();
}
that.year = year;
that.month = month;
that.day = day;
let month0 = that.month>9?that.month :'0'+that.month ;
that.search_day = that.year+'-'+month0+'-'+day;
this.getData();
},
methods: {
test(index){
if(index!==8&&index==!22&&index==!26&&index==!37&&index==!38&&index!==48&&index!==49){
console.log(index)
}
// test(index){
// if(index!==8&&index==!22&&index==!26&&index==!37&&index==!38&&index!==48&&index!==49){
// console.log(index)
// }
// },
dayChange(e){
let that = this;
let arr = e.split('-')
that.year = Number(arr[0]);
that.month = Number(arr[1]);
that.day = Number(arr[2]);
},
getData(){
this.$API.bi.dataset.exec.req('3349203178834325504',).then((res) => {
let data0 = this.sourceData = res.data2.ds0;
// debugger;
console.log(this.sourceData)
let that = this;
let params = {};
params.page = 0;
params.year_s = that.year;
params.month_s = that.month;
params.day_s = that.day;
params.type = 'day_s';
this.$API.enm.enstat.req(params).then((res) => {
let dataList = {};
res.forEach(item => {
let label = item.mgroup_name;
dataList[label] = item;
});
//
that.tableDatas[0][3] = dataList.原料磨.production_hour;
that.tableDatas[1][3] = dataList.电石渣.production_hour;
that.tableDatas[2][3] = dataList.煤磨.production_hour;
that.tableDatas[3][3] = dataList.回转窑.production_hour;
that.tableDatas[4][3] = dataList.水泥磨.production_hour;
//kw.h/t
that.tableDatas[5][3] = dataList.回转窑.celec_consume_unit;
that.tableDatas[6][3] = dataList.回转窑.coal_consume_unit;
that.tableDatas[7][3] = dataList.回转窑.cen_consume_unit;
that.tableDatas[8][3] = dataList.水泥磨.cen_consume_unit;
that.tableDatas[9][3] = dataList.电石渣.elec_consume_unit;
that.tableDatas[10][3] = dataList.原料磨.elec_consume_unit;
that.tableDatas[11][3] = dataList.回转窑.elec_consume_unit;
that.tableDatas[12][3] = dataList.水泥磨.elec_consume_unit;
that.tableDatas[13][3] = dataList.水泥包装.elec_consume_unit;
//(t)
that.tableDatas[14][3] = dataList.电石渣.production_hour;
that.tableDatas[16][3] = dataList.原料磨.production_hour;
that.tableDatas[18][3] = dataList.回转窑.production_hour;
that.tableDatas[20][3] = dataList.水泥磨.production_hour;
//(/)
that.tableDatas[28][3] = dataList.电石渣.production_cost_unit;
that.tableDatas[29][3] = dataList.原料磨.production_cost_unit;
that.tableDatas[30][3] = dataList.回转窑.production_cost_unit;
that.tableDatas[31][3] = dataList.水泥磨.production_cost_unit;
that.tableDatas[32][3] = dataList.水泥包装.production_cost_unit;
//kw.h
that.tableDatas[33][3] = dataList.电石渣.elec_consume;
that.tableDatas[34][3] = dataList.原料磨.elec_consume;
that.tableDatas[35][3] = dataList.回转窑.elec_consume;
that.tableDatas[36][3] = dataList.煤磨.elec_consume;
that.tableDatas[37][3] = dataList.水泥磨.elec_consume;
that.tableDatas[38][3] = dataList.水泥包装.elec_consume;
// that.tableDatas[39][3] = dataList..elec_consume;
}).then(res=>{
//
let params1 = {};
params1.page = 0;
params1.goal_cate__code = 'total_production';
params1.year = that.year;
this.$API.mtm.goal.list.req(params1).then((res1) => {
let dataList1 = {};//
res1.forEach(item1 => {
let label = item1.mgroup_name;
dataList1[label] = item1;
});
let ind = 'goal_val';
if(this.type=='day'){
ind = 'goal_val_'+that.month;
}
that.tableDatas[15][3] = dataList1.电石渣&&dataList1.电石渣[ind]!==0&&dataList1.电石渣[ind]!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[14][3] /dataList1.电石渣[ind])*100:'/';
that.tableDatas[17][3] = dataList1.原料磨&&dataList1.原料磨[ind]!==0&&dataList1.原料磨[ind]!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[16][3] /dataList1.原料磨[ind])*100:'/';
that.tableDatas[19][3] = dataList1.回转窑&&dataList1.回转窑[ind]!==0&&dataList1.回转窑[ind]!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[18][3] /dataList1.回转窑[ind])*100:'/';
that.tableDatas[21][3] = dataList1.水泥磨&&dataList1.水泥磨[ind]!==0&&dataList1.水泥磨[ind]!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[20][3] /dataList1.水泥磨[ind])*100:'/';
})
}).then(res=>{
let obj1 = {};
obj1.page = 0;
obj1.type = 'day_s';
obj1.year_s = this.year;
obj1.month_s = this.month;
obj1.day_s = this.day;
that.$API.enm.enstat2.req(obj1).then((res1) => {
if(res1.length>0){
that.tableDatas[22][3]=res1[0].clinker_val;
that.tableDatas[24][3] = res1[0].bulk_cement_val;
that.tableDatas[26][3] = res1[0].bag_cement_val;
}
})
let obj2 = {};
obj2.year_s = this.year;
obj2.month_s = this.month;
obj2.type = 'month_s';
obj2.page = 0;
that.$API.enm.enstat2.req(obj2).then((res2) => {
if(res2.length>0){
that.tableDatas[23][3] = res2[0].clinker_val;
that.tableDatas[25][3] = res2[0].bulk_cement_val;
that.tableDatas[27][3] = res2[0].bag_cement_val;
}
})
});
},
getTableData(){},
getTableData(){
for(let i=0;i<39;i++){
this.tableDatas[i][3] = '';
}
this.getData();
},
handlePrint() {
this.$PRINT('#myReport');
},
@ -166,29 +305,4 @@
};
</script>
<style>
#numTable{
margin-left: 37px;
}
#numTable td{
height: 32px;
padding-left: 5px;
}
.numCell{
width: 80px;
}
.numCell.numCell_last{
width: 100px;
}
.searchHead{
display:flex
}
.middleText{
height: 32px;
line-height: 32px;
margin: 0 5px;
display: inline-block;
}
.searchBtn{
margin-left: 5px;
}
</style>

View File

@ -0,0 +1,469 @@
<!-- 全厂电量统计 -->
<template>
<div class="app-container">
<el-header>
<div class="left-panel">
<el-date-picker
v-model="search_month"
type="month"
value-format="YYYY-MM"
format="YYYY-MM"
placeholder="月份"
style="margin-right: 6px;"
@change="monthChange"
/>
<el-button
type="primary"
icon="el-icon-search"
@click="getTableData"
></el-button>
<el-button
type="primary"
@click="exportExcel()"
:loading = "exportLoading"
>导出xlsx
</el-button>
<el-button
type="primary"
@click="handlePrint"
>打印
</el-button>
</div>
</el-header>
<el-card style="margin-top:5px">
<div ref="print" id="myReport" class="printContainer">
<table border="1" cellspacing="0" :key="timeStamp" id="numTable" class="myTable">
<thead class="myTableHead">
<tr>
<th colspan="7">生产月报</th>
</tr>
<tr>
<th>序号</th>
<th colspan="2">项目</th>
<th colspan="2">环比增长</th>
<th colspan="2">同比增长</th>
</tr>
</thead>
<tr v-for="(item,index) in tableDatas" :key="index">
<td class="numCell">{{item[0]}}</td>
<td class="numCell" v-if="index==0" rowspan="5">{{item[1]}}</td>
<td class="numCell" v-else-if="index==5" rowspan="9">{{item[1]}}</td>
<td class="numCell" v-else-if="index==14" rowspan="14">{{item[1]}}</td>
<td class="numCell" v-else-if="index==28" rowspan="5">{{item[1]}}</td>
<td class="numCell" v-else-if="index==33" rowspan="6">{{item[1]}}</td>
<td class="numCell" v-else-if="index>38">{{item[1]}}</td>
<td class="numCell" style="width: 180px !important;">{{item[2]}}</td>
<td class="numCell" v-if="index<39" colspan="2">{{item[3]}}</td>
<td class="numCell" v-else>{{item[3]}}</td>
<td class="numCell">{{item[4]}}</td>
<td class="numCell" v-if="index>38">{{item[5]}}</td>
</tr>
</table>
</div>
</el-card>
</div>
</template>
<script>
export default {
data() {
return {
search_month:'',
tableDatas:[
[1,'主机设备台产','立磨台产t/h',''],
[2,'主机设备台产','烘干破台产t/h'],
[3,'主机设备台产','煤磨台产t/h'],
[4,'主机设备台产','回转窑台产t/h'],
[5,'主机设备台产','水泥磨台产t/h'],
[6,'能耗','熟料日综合电耗kw.h/t'],
[7,'能耗','熟料日单位标煤耗(kgce/t)'],
[8,'能耗','熟料日综合能耗(kgce/t)'],
[9,'能耗','水泥日综合能耗(kgce/t)'],
[10,'能耗','日电石渣分布电耗kw.h/t'],
[11,'能耗','日生料分布电耗kw.h/t'],
[12,'能耗','日熟料分布电耗kw.h/t'],
[13,'能耗','日水泥粉磨分布电耗kw.h/t'],
[14,'能耗','日水泥包装分布电耗kw.h/t'],
[15,'产量','日电石渣产量(t)'],
[16,'产量','月电石渣产量完成率(%)'],
[17,'产量','日生料产量(t)'],
[18,'产量','月生料产量完成率(%)'],
[19,'产量','日熟料产量(t)'],
[20,'产量','月熟料产量完成率(%)'],
[21,'产量','日水泥产量(t)'],
[22,'产量','月水泥产量完成率(%)'],
[23,'产量','日熟料出厂量(t)'],
[24,'产量','月熟料累计出厂量(t)'],
[25,'产量','日散装水泥出厂量(t)'],
[26,'产量','月散装水泥出厂量(t)'],
[27,'产量','日袋装水泥出厂量(t)'],
[28,'产量','月袋装水泥出厂量(t)'],
[29,'成本','日电石渣成本(元/吨)'],
[30,'成本','日生料成本(元/吨)'],
[31,'成本','日熟料成本(元/吨)'],
[32,'成本','日水泥粉磨成本(元/吨)'],
[33,'成本','日水泥包装成本(元/吨)'],
[34,'耗电量','日电石渣耗电量kw.h'],
[35,'耗电量','日生料耗电量kw.h'],
[36,'耗电量','日熟料耗电量kw.h'],
[37,'耗电量','日水泥粉磨耗电量kw.h'],
[38,'耗电量','日水泥包装耗电量kw.h'],
[39,'耗电量','日生活区耗电量kw.h'],
['生产异常动态','工段','类别','原因','处置措施','处置人'],
['生产异常动态','电石渣'],
['生产异常动态','原料磨'],
['生产异常动态','回转窑'],
['生产异常动态','煤磨'],
['生产异常动态','水泥磨'],
],
year:'',
month:'',
year_h:'',
month_h:'',
year_t:'',
month_t:'',
dataList:{},
nowData:[],
};
},
mounted() {
let that = this;
var myDate = new Date();
let year = myDate.getFullYear();
let month = myDate.getMonth()+1;
that.year = year;
that.month = month;
that.year_t = year-1;
that.month_t = month;
if(that.year==12){
that.year_h = year-1;
that.month_h = 1;
}else{
that.year_h = year
that.month_h = month-1;
}
let month0 = that.month>9?that.month :'0'+that.month ;
that.search_month = that.year+'-'+month0;
this.getNowData();
},
methods: {
monthChange(e){
let that = this;
let arr = e.split('-')
that.year = Number(arr[0]);
that.month = Number(arr[1]);
},
getNowData(){
let that = this;
let params = {};
params.page = 0;
params.year_s = that.year;
params.month_s = that.month;
params.type = 'month_s';
this.$API.enm.enstat.req(params).then((res) => {
let dataList = {};
res.forEach(item => {
let label = item.mgroup_name;
dataList[label] = item;
});
//
that.nowData[0] = dataList.原料磨.production_hour;
that.nowData[1] = dataList.电石渣.production_hour;
that.nowData[2] = dataList.煤磨.production_hour;
that.nowData[3] = dataList.回转窑.production_hour;
that.nowData[4] = dataList.水泥磨.production_hour;
//kw.h/t
that.nowData[5] = dataList.回转窑.celec_consume_unit;
that.nowData[6] = dataList.回转窑.coal_consume_unit;
that.nowData[7] = dataList.回转窑.cen_consume_unit;
that.nowData[8] = dataList.水泥磨.cen_consume_unit;
that.nowData[9] = dataList.电石渣.elec_consume_unit;
that.nowData[10] = dataList.原料磨.elec_consume_unit;
that.nowData[11] = dataList.回转窑.elec_consume_unit;
that.nowData[12] = dataList.水泥磨.elec_consume_unit;
that.nowData[13] = dataList.水泥包装.elec_consume_unit;
//(t)
that.nowData[14] = dataList.电石渣.production_hour;
that.nowData[16] = dataList.原料磨.production_hour;
that.nowData[18] = dataList.回转窑.production_hour;
that.nowData[20] = dataList.水泥磨.production_hour;
//(/)
that.nowData[28] = dataList.电石渣.production_cost_unit;
that.nowData[29] = dataList.原料磨.production_cost_unit;
that.nowData[30] = dataList.回转窑.production_cost_unit;
that.nowData[31] = dataList.水泥磨.production_cost_unit;
that.nowData[32] = dataList.水泥包装.production_cost_unit;
//kw.h
that.nowData[33] = dataList.电石渣.elec_consume;
that.nowData[34] = dataList.原料磨.elec_consume;
that.nowData[35] = dataList.回转窑.elec_consume;
that.nowData[36] = dataList.煤磨.elec_consume;
that.nowData[37] = dataList.水泥磨.elec_consume;
that.nowData[38] = dataList.水泥包装.elec_consume;
// that.nowData[39] = dataList..elec_consume;
}).then(res=>{
//
let params1 = {};
params1.page = 0;
params1.goal_cate__code = 'total_production';
params1.year = that.year;
this.$API.mtm.goal.list.req(params1).then((res1) => {
let dataList1 = {};//
res1.forEach(item1 => {
let label = item1.mgroup_name;
dataList1[label] = item1;
});
that.nowData[15] = dataList1.电石渣&&dataList1.电石渣.goal_val!==0&&dataList1.电石渣.goal_val!==''&&that.nowData[14]!==''?(that.nowData[14] /dataList1.电石渣.goal_val)*100:'/';
that.nowData[17] = dataList1.原料磨&&dataList1.原料磨.goal_val!==0&&dataList1.原料磨.goal_val!==''&&that.nowData[14]!==''?(that.nowData[16] /dataList1.原料磨.goal_val)*100:'/';
that.nowData[19] = dataList1.回转窑&&dataList1.回转窑.goal_val!==0&&dataList1.回转窑.goal_val!==''&&that.nowData[14]!==''?(that.nowData[18] /dataList1.回转窑.goal_val)*100:'/';
that.nowData[21] = dataList1.水泥磨&&dataList1.水泥磨.goal_val!==0&&dataList1.水泥磨.goal_val!==''&&that.nowData[14]!==''?(that.nowData[20] /dataList1.水泥磨.goal_val)*100:'/';
})
}).then(res=>{
let obj1 = {};
obj1.page = 0;
obj1.year_s = this.year;
obj1.month_s = this.month;
obj1.type = 'month_s';
that.$API.enm.enstat2.req(obj1).then((res1) => {
if(res1.length>0){
that.nowData[22]=res1[0].clinker_val;
that.nowData[24] = res1[0].bulk_cement_val;
that.nowData[26] = res1[0].bag_cement_val;
}
})
let obj2 = {};
obj2.page = 0;
obj2.type = 'year_s';
obj2.year_s = this.year;
that.$API.enm.enstat2.req(obj2).then((res2) => {
if(res2.length>0){
that.nowData[23] = res2[0].clinker_val;
that.nowData[25] = res2[0].bulk_cement_val;
that.nowData[27] = res2[0].bag_cement_val;
}
})
}).then(res=>{
this.getHuanbiData();
});
},
getHuanbiData(){
let that = this;
let params = {};
params.page = 0;
params.year_s = that.year_h;
params.month_s = that.month_h;
params.type = 'month_s';
this.$API.enm.enstat.req(params).then((res) => {
let dataList = {};
res.forEach(item => {
let label = item.mgroup_name;
dataList[label] = item;
});
function canCompute(a,b){
debugger;
if(b!=0&&b!=='/'&&b!==''&&b!==null){
if(a!=='/'&&a!==''&&a!==null){
a= Number(a)
b= Number(b)
let num =(a-b)/b*100
return num
}
}else{
return 0
}
}
//
that.tableDatas[0][3] = canCompute(that.nowData[0],dataList.原料磨.production_hour);
that.tableDatas[1][3] = canCompute(that.nowData[1],dataList.电石渣.production_hour);
that.tableDatas[2][3] = canCompute(that.nowData[2],dataList.煤磨.production_hour);
that.tableDatas[3][3] = canCompute(that.nowData[3],dataList.回转窑.production_hour);
that.tableDatas[4][3] = canCompute(that.nowData[4],dataList.水泥磨.production_hour);
//kw.h/t
that.tableDatas[5][3] = canCompute(that.nowData[5],dataList.回转窑.celec_consume_unit);
that.tableDatas[6][3] = canCompute(that.nowData[6],dataList.回转窑.coal_consume_unit);
that.tableDatas[7][3] = canCompute(that.nowData[7],dataList.回转窑.cen_consume_unit);
that.tableDatas[8][3] = canCompute(that.nowData[8],dataList.水泥磨.cen_consume_unit);
that.tableDatas[9][3] = canCompute(that.nowData[9],dataList.电石渣.elec_consume_unit);
that.tableDatas[10][3] = canCompute(that.nowData[10],dataList.原料磨.elec_consume_unit);
that.tableDatas[11][3] = canCompute(that.nowData[11],dataList.回转窑.elec_consume_unit);
that.tableDatas[12][3] = canCompute(that.nowData[12],dataList.水泥磨.elec_consume_unit);
that.tableDatas[13][3] = canCompute(that.nowData[13], dataList.水泥包装.elec_consume_unit);
//(t)
that.tableDatas[14][3] = canCompute(that.nowData[14],dataList.电石渣.production_hour);
that.tableDatas[16][3] = canCompute(that.nowData[16],dataList.原料磨.production_hour);
that.tableDatas[18][3] = canCompute(that.nowData[18],dataList.回转窑.production_hour);
that.tableDatas[20][3] = canCompute(that.nowData[20],dataList.水泥磨.production_hour);
//(/)
that.tableDatas[28][3] = canCompute(that.nowData[28],dataList.电石渣.production_cost_unit);
that.tableDatas[29][3] = canCompute(that.nowData[29],dataList.原料磨.production_cost_unit);
that.tableDatas[30][3] = canCompute(that.nowData[30],dataList.回转窑.production_cost_unit);
that.tableDatas[31][3] = canCompute(that.nowData[31],dataList.水泥磨.production_cost_unit);
that.tableDatas[32][3] = canCompute(that.nowData[32],dataList.水泥包装.production_cost_unit);
//kw.h
that.tableDatas[33][3] = canCompute(that.nowData[33],dataList.电石渣.elec_consume);
that.tableDatas[34][3] = canCompute(that.nowData[34],dataList.原料磨.elec_consume);
that.tableDatas[35][3] = canCompute(that.nowData[35],dataList.回转窑.elec_consume);
that.tableDatas[36][3] = canCompute(that.nowData[36],dataList.煤磨.elec_consume);
that.tableDatas[37][3] = canCompute(that.nowData[37],dataList.水泥磨.elec_consume);
that.tableDatas[38][3] = canCompute(that.nowData[38],dataList.水泥包装.elec_consume);
// that.tableDatas[39][3] = dataList..elec_consume;
}).then(res=>{
//
let params1 = {};
params1.page = 0;
params1.goal_cate__code = 'total_production';
params1.year = that.year_h;
this.$API.mtm.goal.list.req(params1).then((res1) => {
let dataList1 = {};//
res1.forEach(item1 => {
let label = item1.mgroup_name;
dataList1[label] = item1;
});
that.tableDatas[15][3] = dataList1.电石渣&&dataList1.电石渣.goal_val!==0&&dataList1.电石渣.goal_val!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[14][3] /dataList1.电石渣.goal_val)*100:'/';
that.tableDatas[17][3] = dataList1.原料磨&&dataList1.原料磨.goal_val!==0&&dataList1.原料磨.goal_val!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[16][3] /dataList1.原料磨.goal_val)*100:'/';
that.tableDatas[19][3] = dataList1.回转窑&&dataList1.回转窑.goal_val!==0&&dataList1.回转窑.goal_val!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[18][3] /dataList1.回转窑.goal_val)*100:'/';
that.tableDatas[21][3] = dataList1.水泥磨&&dataList1.水泥磨.goal_val!==0&&dataList1.水泥磨.goal_val!==''&&that.tableDatas[14][3]!==''?(that.tableDatas[20][3] /dataList1.水泥磨.goal_val)*100:'/';
})
}).then(res=>{
let obj1 = {};
obj1.page = 0;
obj1.year_s = this.year_h;
obj1.month_s = this.month_h;
obj1.type = 'month_s';
that.$API.enm.enstat2.req(obj1).then((res1) => {
if(res1.length>0){
that.tableDatas[22][3]= canCompute(that.nowData[22],res1[0].clinker_val);
that.tableDatas[24][3] = canCompute(that.nowData[24],res1[0].bulk_cement_val);
that.tableDatas[26][3] = canCompute(that.nowData[26],res1[0].bag_cement_val);
}
})
let obj2 = {};
obj2.page = 0;
obj2.type = 'year_s';
obj2.year_s = this.year;
that.$API.enm.enstat2.req(obj2).then((res2) => {
if(res2.length>0){
that.tableDatas[23][3] = canCompute(that.nowData[23],res2[0].clinker_val);
that.tableDatas[25][3] = canCompute(that.nowData[25],res2[0].bulk_cement_val);
that.tableDatas[27][3] = canCompute(that.nowData[27],res2[0].bag_cement_val);
}
})
}).then(res=>{
this.getTongbiData();
});
},
getTongbiData(){
let that = this;
let params = {};
params.page = 0;
params.year_s = that.year_t;
params.month_s = that.month_t;
params.type = 'month_s';
this.$API.enm.enstat.req(params).then((res) => {
let dataList = {};
res.forEach(item => {
let label = item.mgroup_name;
dataList[label] = item;
});
//
that.tableDatas[0][4] = canCompute(that.nowData[0],dataList.原料磨.production_hour);
that.tableDatas[1][4] = canCompute(that.nowData[1],dataList.电石渣.production_hour);
that.tableDatas[2][4] = canCompute(that.nowData[2],dataList.煤磨.production_hour);
that.tableDatas[3][4] = canCompute(that.nowData[3],dataList.回转窑.production_hour);
that.tableDatas[4][4] = canCompute(that.nowData[4],dataList.水泥磨.production_hour);
//kw.h/t
that.tableDatas[5][4] = canCompute(that.nowData[5],dataList.回转窑.celec_consume_unit);
that.tableDatas[6][4] = canCompute(that.nowData[6],dataList.回转窑.coal_consume_unit);
that.tableDatas[7][4] = canCompute(that.nowData[7],dataList.回转窑.cen_consume_unit);
that.tableDatas[8][4] = canCompute(that.nowData[8],dataList.水泥磨.cen_consume_unit);
that.tableDatas[9][4] = canCompute(that.nowData[9],dataList.电石渣.elec_consume_unit);
that.tableDatas[10][4] = canCompute(that.nowData[10],dataList.原料磨.elec_consume_unit);
that.tableDatas[11][4] = canCompute(that.nowData[11],dataList.回转窑.elec_consume_unit);
that.tableDatas[12][4] = canCompute(that.nowData[12],dataList.水泥磨.elec_consume_unit);
that.tableDatas[13][4] = canCompute(that.nowData[13], dataList.水泥包装.elec_consume_unit);
//(t)
that.tableDatas[14][4] = canCompute(that.nowData[14],dataList.电石渣.production_hour);
that.tableDatas[16][4] = canCompute(that.nowData[16],dataList.原料磨.production_hour);
that.tableDatas[18][4] = canCompute(that.nowData[18],dataList.回转窑.production_hour);
that.tableDatas[20][4] = canCompute(that.nowData[20],dataList.水泥磨.production_hour);
//(/)
that.tableDatas[28][4] = canCompute(that.nowData[28],dataList.电石渣.production_cost_unit);
that.tableDatas[29][4] = canCompute(that.nowData[29],dataList.原料磨.production_cost_unit);
that.tableDatas[30][4] = canCompute(that.nowData[30],dataList.回转窑.production_cost_unit);
that.tableDatas[31][4] = canCompute(that.nowData[31],dataList.水泥磨.production_cost_unit);
that.tableDatas[32][4] = canCompute(that.nowData[32],dataList.水泥包装.production_cost_unit);
//kw.h
that.tableDatas[33][4] = canCompute(that.nowData[33],dataList.电石渣.elec_consume);
that.tableDatas[34][4] = canCompute(that.nowData[34],dataList.原料磨.elec_consume);
that.tableDatas[35][4] = canCompute(that.nowData[35],dataList.回转窑.elec_consume);
that.tableDatas[36][4] = canCompute(that.nowData[36],dataList.煤磨.elec_consume);
that.tableDatas[37][4] = canCompute(that.nowData[37],dataList.水泥磨.elec_consume);
that.tableDatas[38][4] = canCompute(that.nowData[38],dataList.水泥包装.elec_consume);
// that.tableDatas[39][4] = dataList..elec_consume;
}).then(res=>{
//
let params1 = {};
params1.page = 0;
params1.goal_cate__code = 'total_production';
params1.year = that.year_h;
this.$API.mtm.goal.list.req(params1).then((res1) => {
let dataList1 = {};//
res1.forEach(item1 => {
let label = item1.mgroup_name;
dataList1[label] = item1;
});
that.tableDatas[15][4] = dataList1.电石渣&&dataList1.电石渣.goal_val!==0&&dataList1.电石渣.goal_val!==''&&that.tableDatas[14][4]!==''?(that.tableDatas[14][4] /dataList1.电石渣.goal_val)*100:'/';
that.tableDatas[17][4] = dataList1.原料磨&&dataList1.原料磨.goal_val!==0&&dataList1.原料磨.goal_val!==''&&that.tableDatas[14][4]!==''?(that.tableDatas[16][4] /dataList1.原料磨.goal_val)*100:'/';
that.tableDatas[19][4] = dataList1.回转窑&&dataList1.回转窑.goal_val!==0&&dataList1.回转窑.goal_val!==''&&that.tableDatas[14][4]!==''?(that.tableDatas[18][4] /dataList1.回转窑.goal_val)*100:'/';
that.tableDatas[21][4] = dataList1.水泥磨&&dataList1.水泥磨.goal_val!==0&&dataList1.水泥磨.goal_val!==''&&that.tableDatas[14][4]!==''?(that.tableDatas[20][4] /dataList1.水泥磨.goal_val)*100:'/';
})
}).then(res=>{
let obj1 = {};
obj1.page = 0;
obj1.year_s = this.year_h;
obj1.month_s = this.month_h;
obj1.type = 'month_s';
that.$API.enm.enstat2.req(obj1).then((res1) => {
if(res1.length>0){
that.tableDatas[22][4]= canCompute(that.nowData[22],res1[0].clinker_val);
that.tableDatas[24][4] = canCompute(that.nowData[24],res1[0].bulk_cement_val);
that.tableDatas[26][4] = canCompute(that.nowData[26],res1[0].bag_cement_val);
}
})
let obj2 = {};
obj2.page = 0;
obj2.type = 'year_s';
obj2.year_s = this.year;
that.$API.enm.enstat2.req(obj2).then((res2) => {
if(res2.length>0){
that.tableDatas[23][4] = canCompute(that.nowData[23],res2[0].clinker_val);
that.tableDatas[25][4] = canCompute(that.nowData[25],res2[0].bulk_cement_val);
that.tableDatas[27][4] = canCompute(that.nowData[27],res2[0].bag_cement_val);
}
})
})
},
getTableData(){
for(let i=0;i<39;i++){
this.tableDatas[i][3] = '';
this.tableDatas[i][4] = '';
}
this.getData();
},
handlePrint() {
this.$PRINT('#myReport');
},
}
};
</script>
<style>
</style>

View File

@ -10,9 +10,10 @@
<el-form-item label="旧密码" prop="old_password">
<el-input v-model="formData.old_password" placeholder="请输入旧密码" clearable show-password
:style="{width: '100%'}"></el-input>
<div class="el-form-item-msg">必须提供当前登录用户密码才能进行更改</div>
</el-form-item>
<el-form-item label="新密码" prop="new_password1">
<el-input v-model="formData.new_password1" placeholder="请输入密码" clearable show-password
<el-input v-model="formData.new_password1" placeholder="请输入包含英文、数字、特殊符号( @#$%^&.+=! 的8位以上密码" clearable show-password
:style="{width: '100%'}"></el-input>
</el-form-item>
<el-form-item label="确认新密码" prop="new_password2">
@ -28,7 +29,11 @@
</template>
<script>
import scPasswordStrength from '@/components/scPasswordStrength'
export default {
components: {
scPasswordStrength
},
data() {
return {
formData: {
@ -45,21 +50,50 @@ export default {
},
],
new_password1: [
{
required: true,
message: "请输入新密码",
trigger: "blur",
},
],
{ required: true, message: '请输入新密码'},
{validator: (rule, value, callback) => {
let reg1 = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[@#$%^&.+=!])(?!.*\s).{8,}$/;
if (reg1.test(value)) {
callback();
}else{
callback(new Error('请输入包含英文、数字、特殊符号( @#$%^&.+=! 的8位以上密码'));
}
}}
],
// new_password1: [
// {
// required: true,
// message: "",
// trigger: "blur",
// },
// ],
new_password2: [
{
required: true,
message: "请再次输入新密码",
trigger: "blur",
},
],
{ required: true, message: '请再次输入新密码'},
{validator: (rule, value, callback) => {
if (value !== this.formData.new_password1) {
callback(new Error('两次输入密码不一致'));
}else{
callback();
}
}}
],
// new_password2: [
// {
// required: true,
// message: "",
// trigger: "blur",
// },
// ],
},
};
},
mounted(){
// debugger;
// let reg0 = /^(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[~!@#$%^&)(_+}{|:?>.<])(?!.*\s).{8,}$/;
let reg1 = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[@#$%^&.+=!])(?!.*\s).{8,}$/;
let str = 'a1aa.....'
// console.log('reg0',reg0.test(str))
// console.log('reg1',reg1.test(str))
},
methods: {
submitForm() {