From 8487e764bc98a5d1d30955363e363af572125aa5 Mon Sep 17 00:00:00 2001
From: shj <1790240199@qq.com>
Date: 星期三, 18 五月 2022 09:32:27 +0800
Subject: [PATCH] Merge branch 'shf' of https://sinanoaq.cn:8888/r/ztqt into shf
---
src/permission.js | 2
src/views/safetyHazardAccount/hazardSource.vue | 25 +++
src/views/safetyHazardAccount/inferOtherThings.vue | 108 +++++++++++++++
src/router/index.js | 14 ++
src/views/safetyHazardAccount/supervision.vue | 108 +++++++++++++++
src/views/oneFromanother/exist.vue | 138 ++++++++++++-------
6 files changed, 338 insertions(+), 57 deletions(-)
diff --git a/src/permission.js b/src/permission.js
index 3f3a393..409e367 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -16,7 +16,7 @@
if (!permissionRoles) return true
return roles.some(role => permissionRoles.indexOf(role) >= 0)
}
-const whiteList = ['/login', '/auth-redirect','/agreement','/register','/productionEquipment','/instrumentData','/oneFromanother','/hiddenDangerTroubleshootingList','/preview','/inspectionNotExist','/send','/Issuedbysuperiors','/oneFromanotherN','/summaryPotentialSafetyHzards','/safetyHazardAccount','/superiorsSend','/accountSend','/existN','/exist','/hazardSource','/safetyedit','/Dualbase']// no redirect whitelist
+const whiteList = ['/login', '/auth-redirect','/agreement','/register','/productionEquipment','/instrumentData','/oneFromanother','/hiddenDangerTroubleshootingList','/preview','/inspectionNotExist','/send','/Issuedbysuperiors','/oneFromanotherN','/summaryPotentialSafetyHzards','/safetyHazardAccount','/superiorsSend','/accountSend','/existN','/exist','/hazardSource','/safetyedit','/Dualbase','/supervision','/inferOtherThings']// no redirect whitelist
router.beforeEach((to, from, next) => {
NProgress.start() // start progress bar
diff --git a/src/router/index.js b/src/router/index.js
index 7fc2049..1befa24 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -443,6 +443,20 @@
// meta: { title: '安全隐患台账-编辑', icon: '' }
hidden: true
},
+ {
+ path: '/supervision',
+ // name: '安全隐患台账-督查督办',
+ component: () => import('@/views/safetyHazardAccount/supervision'),
+ // meta: { title: '安全隐患台账-督查督办', icon: '' }
+ hidden: true
+ },
+ {
+ path: '/inferOtherThings',
+ // name: '安全隐患台账-举一反三',
+ component: () => import('@/views/safetyHazardAccount/inferOtherThings'),
+ // meta: { title: '安全隐患台账-举一反三', icon: '' }
+ hidden: true
+ },
]
}
]
diff --git a/src/views/oneFromanother/exist.vue b/src/views/oneFromanother/exist.vue
index ab40f32..170a81d 100644
--- a/src/views/oneFromanother/exist.vue
+++ b/src/views/oneFromanother/exist.vue
@@ -96,7 +96,7 @@
<el-table-column type="index" width="55" align="center" label="序号"></el-table-column>
<el-table-column prop="ht_branch" align="center" label="隐患部门"></el-table-column>
<el-table-column prop="address" align="center" label="地点"></el-table-column>
- <el-table-column prop="ht_content" align="center" label="隐患内容"></el-table-column>
+ <el-table-column prop="ht_content" show-overflow-tooltip align="center" label="隐患内容"></el-table-column>
<el-table-column prop="measure" align="center" label="整改措施"></el-table-column>
<el-table-column prop="ht_typesub" align="center" label="隐患类别"></el-table-column>
<el-table-column prop="dangerousSource" align="center" label="关联危险源"></el-table-column>
@@ -300,13 +300,24 @@
</template>
<script>
-import Titlename from "../../components/Titlename/index.vue";
+ import Titlename from "../../components/Titlename/index.vue";
-import {initJCBM ,initYHLX, initBC ,initJCLB ,initYHBM ,initYHJB,initLlr,initReformStatus,initYwks,initWxy} from "@/api/sgyhpczl/initSelect";
-import {saveDanger,initDangerRebound,getDangerInfo,editDanger} from '@/api/sgyhpczl/hiddenDangerRegistration'
-import {deepClone} from '@/utils'
+ import {
+ initBC,
+ initJCBM,
+ initJCLB,
+ initLlr,
+ initReformStatus,
+ initWxy,
+ initYHBM,
+ initYHJB,
+ initYHLX,
+ initYwks
+ } from "@/api/sgyhpczl/initSelect";
+ import {initDangerRebound} from '@/api/sgyhpczl/hiddenDangerRegistration'
+ import {deepClone} from '@/utils'
-export default {
+ export default {
components: { Titlename },
name: "hiddenDangerList",
data() {
@@ -341,8 +352,8 @@
statusList:[],
YWKSList:[],
reboundList:[],
- ruleForm: {},
- rules: {
+ ruleForm: {},
+ rules: {
check_date: [{ required: true, message: '不能为空', trigger: 'blur' },],
check_class: [{ required: true, message: '不能为空', trigger: 'blur' },],
check_main_branch: [{ required: true, message: '不能为空', trigger: 'blur' },],
@@ -350,9 +361,11 @@
check_man: [{ required: true, message: '不能为空', trigger: 'blur' },],
checktype: [{ required: true, message: '不能为空', trigger: 'blur' },],
},
- tableData: [],
+ tableData: [],
+ paramsData: {},//上个页面参数
};
},
+
mounted(){
this.initBC()
this.initJCLB()
@@ -365,22 +378,28 @@
this.initWXY()
this.initDangerRebound()
this.id = this.$route.query.id;
- if( this.id!=null && this.id!=''){
- this.initInfo();
- this.addShow=false
- }
+ this.initInfo(this.$route.query.data);
},
methods: {
- async initInfo(){
- var res=await getDangerInfo(this.id)
- if (res.data.ok==1){
- this.ruleForm=res.data.data
- this.changeJCDW(res.data.data.check_main_branch)
- var obj=deepClone(res.data.data)
- this.tableData.push(obj)
-
- }
+ initInfo(data){
+ this.paramsData = this.$route.query.data;
+ this.ruleForm.jyfsId = data.id;
+ this.tableData[0] = {
+ address: data.address,
+ ht_content: data.ht_content,
+ ht_level: data.ht_level,
+ };
},
+
+ // async initInfo(){
+ // var res=await getDangerInfo(this.id)
+ // if (res.data.ok==1){
+ // this.ruleForm=res.data.data
+ // this.changeJCDW(res.data.data.check_main_branch)
+ // var obj=deepClone(res.data.data)
+ // this.tableData.push(obj)
+ // }
+ // },
initDangerRebound(){
initDangerRebound().then(res=>{
if (res.data.ok==1){
@@ -552,54 +571,65 @@
returnIndex(){
this.$router.push({
- path:"/hiddenDangerRegistration"
+ path:"/oneFromanother"
})
+ },
+ judge(obj){
+ console.log(obj)
+ if (obj != null || ('ht_branch' in obj) || ('address' in obj) || ('ht_typesub' in obj) || ('dangerousSource' in obj)
+ || ('alter_time' in obj) || ('duty_officer' in obj) || ('alter_status' in obj) || ('Review' in obj) || ('DTRisk_bankId' in obj)){
+ return true;
+ }else {
+ return false;
+ }
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
+
if (valid) {
- if(this.tableData==null || this.tableData.length==0){
- this.$message({type:'error', message:"请添加隐患", duration:2000})
- }
this.ruleForm.items=this.tableData
+ if(this.judge(this.tableData[0])){
+ this.$message({type:'error', message:"请完整录入隐患", duration:2000})
+ }
if(this.addShow){
+ console.log(this.ruleForm)
saveDanger(this.ruleForm).then(res=>{
if (res.data.ok==1){
- this.$message({type:'success', message:"新增成功", duration:3000})
+ this.$message({type:'success', message:"保存成功", duration:3000})
this.$router.push({
- path:"/hiddenDangerRegistration"
+ path:"/oneFromanother"
})
}else {
this.$message({type:'error', message:res.data.msg, duration:3000})
}
})
}else {
- var param=deepClone(this.ruleForm)
- var obj=deepClone(this.tableData[0])
- param.ht_branch=obj.ht_branch
- param.address=obj.address
- param.ht_content=obj.ht_content
- param.measure=obj.measure
- param.ht_typesub=obj.ht_typesub
- param.DTRisk_bankId=obj.DTRisk_bankId
- param.DTRisk_level=obj.mriskLevel
- param.dangerousSource=obj.mriskPoint
- param.ht_level=obj.ht_level
- param.alter_time=obj.alter_time
- param.duty_officer=obj.duty_officer
- param.alter_status=obj.alter_status
- param.Review=obj.Review
- param.repeatId=obj.repeatId
- editDanger(param).then(res=>{
- if (res.data.ok==1){
- this.$message({type:'success', message:"编辑成功", duration:3000})
- this.$router.push({
- path:"/hiddenDangerRegistration"
- })
- }else {
- this.$message({type:'error', message:res.data.msg, duration:3000})
- }
- })
+ // var param=deepClone(this.ruleForm)
+ // var obj=deepClone(this.tableData[0])
+ // param.ht_branch=obj.ht_branch
+ // param.address=obj.address
+ // param.ht_content=obj.ht_content
+ // param.measure=obj.measure
+ // param.ht_typesub=obj.ht_typesub
+ // param.DTRisk_bankId=obj.DTRisk_bankId
+ // param.DTRisk_level=obj.mriskLevel
+ // param.dangerousSource=obj.mriskPoint
+ // param.ht_level=obj.ht_level
+ // param.alter_time=obj.alter_time
+ // param.duty_officer=obj.duty_officer
+ // param.alter_status=obj.alter_status
+ // param.Review=obj.Review
+ // param.repeatId=obj.repeatId
+ // editDanger(param).then(res=>{
+ // if (res.data.ok==1){
+ // this.$message({type:'success', message:"编辑成功", duration:3000})
+ // this.$router.push({
+ // path:"/hiddenDangerRegistration"
+ // })
+ // }else {
+ // this.$message({type:'error', message:res.data.msg, duration:3000})
+ // }
+ // })
}
diff --git a/src/views/safetyHazardAccount/hazardSource.vue b/src/views/safetyHazardAccount/hazardSource.vue
index 938d364..ede87f1 100644
--- a/src/views/safetyHazardAccount/hazardSource.vue
+++ b/src/views/safetyHazardAccount/hazardSource.vue
@@ -11,7 +11,6 @@
@node-drag-over="handleDragOver"
@node-drag-end="handleDragEnd"
@node-drop="handleDrop"
- draggable
:allow-drop="allowDrop"
:allow-drag="allowDrag">
<span slot-scope="{ node, data }" class="slot-t-node">
@@ -97,6 +96,17 @@
label="责任人">
</el-table-column>
</el-table>
+ <div style="text-align:right">
+ <el-pagination
+ @size-change="handleSizeChange"
+ @current-change="handleCurrentChange"
+ :current-page="currentPage4"
+ :page-sizes="[100, 200, 300, 400]"
+ :page-size="100"
+ layout="total, sizes, prev, pager, next, jumper"
+ :total="400">
+ </el-pagination>
+ </div>
</div>
</div>
</template>
@@ -153,7 +163,8 @@
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄'
}],
- multipleSelection: []
+ multipleSelection: [],
+ currentPage4: 4
};
},
mounted(){
@@ -200,6 +211,13 @@
},
handleSelectionChange(val) {
this.multipleSelection = val;
+ },
+ // 页码
+ handleSizeChange(val) {
+ console.log(`每页 ${val} 条`);
+ },
+ handleCurrentChange(val) {
+ console.log(`当前页: ${val}`);
}
}
}
@@ -240,6 +258,9 @@
flex-direction: row;
align-items: center;
justify-content: start;
+ background: #FFFFFF;
+ padding: 15px 10px 0px 10px;
+ margin-bottom: 20px;
}
.btn{
background: url(../../assets/btn.gif) no-repeat;
diff --git a/src/views/safetyHazardAccount/inferOtherThings.vue b/src/views/safetyHazardAccount/inferOtherThings.vue
new file mode 100644
index 0000000..1fa2401
--- /dev/null
+++ b/src/views/safetyHazardAccount/inferOtherThings.vue
@@ -0,0 +1,108 @@
+<template>
+ <div>
+ <el-button type="text" @click="dialogVisible = true">点击打开 Dialog</el-button>
+ <el-dialog
+ title="责任单位"
+ :visible.sync="dialogVisible"
+ width="37%"
+ :before-close="handleClose">
+ <el-checkbox-group v-model="checkList">
+ <el-checkbox label="安全环保部"></el-checkbox>
+ <el-checkbox label="生产技术部 "></el-checkbox>
+ <el-checkbox label="机电部"></el-checkbox>
+ <el-checkbox label="企管部"></el-checkbox>
+ <el-checkbox label="消防保卫部"></el-checkbox>
+
+ <el-checkbox label="质检中心"></el-checkbox>
+ <el-checkbox label="市场开发部"></el-checkbox>
+ <el-checkbox label="综合办公室"></el-checkbox>
+ <el-checkbox label="工程部 "></el-checkbox>
+ <el-checkbox label="财务部"></el-checkbox>
+
+ <el-checkbox label="党群工作部"></el-checkbox>
+ <el-checkbox label="纪检监察部"></el-checkbox>
+ <el-checkbox label="化产一车间"></el-checkbox>
+ <el-checkbox label="炼焦一车间"></el-checkbox>
+ <el-checkbox label="原料一车间"></el-checkbox>
+
+ <el-checkbox label="选煤厂"></el-checkbox>
+ <el-checkbox label="电仪车间"></el-checkbox>
+ <el-checkbox label="众和机电"></el-checkbox>
+ <el-checkbox label="原料二车间"></el-checkbox>
+ <el-checkbox label="化产二车间"></el-checkbox>
+
+ <el-checkbox label="炼焦二车间"></el-checkbox>
+ <el-checkbox label="甲醇厂"></el-checkbox>
+ <el-checkbox label="干熄焦"></el-checkbox>
+ </el-checkbox-group>
+ <span slot="footer" class="dialog-footer">
+ <el-button class="btn" type="primary" @click="dialogVisible = false">确 定</el-button>
+ </span>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+export default {
+ name: "inferOtherThings",
+ data() {
+ return {
+ dialogVisible: false,
+ checkList: []
+ };
+ },
+ methods: {
+ handleClose(done) {
+ this.$confirm('确认关闭?')
+ .then(_ => {
+ done();
+ })
+ .catch(_ => {});
+ }
+ }
+}
+</script>
+
+<style scoped>
+/deep/ .el-dialog__header{
+ text-align: center;
+ padding: 50px 50px 20px 50px;
+}
+/deep/ .el-dialog__header .el-dialog__title {
+ font-size: 12px;
+ font-weight: bold;
+}
+/deep/ .el-dialog__body{
+ text-align: center;
+ padding: 30px 50px 30px 50px;
+}
+/deep/ .el-checkbox-group{
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ align-items: center;
+}
+/deep/ .el-checkbox{
+ width: 120px;
+ text-align: left;
+ line-height: 25px;
+}
+/deep/ .el-dialog__footer{
+ text-align: center;
+}
+.btn{
+ background: url(../../assets/btn.gif) no-repeat;
+ width: 76px;
+ height: 26px;
+ line-height: 26px;
+ font-size: 14px;
+ border: none;
+ color: #fff;
+ cursor: pointer;
+ overflow: visible;
+ padding: 0;
+}
+/deep/ .el-checkbox__inner{
+ border: 1px solid #000000;
+}
+</style>
diff --git a/src/views/safetyHazardAccount/supervision.vue b/src/views/safetyHazardAccount/supervision.vue
new file mode 100644
index 0000000..1e1d86f
--- /dev/null
+++ b/src/views/safetyHazardAccount/supervision.vue
@@ -0,0 +1,108 @@
+<template>
+ <div>
+ <el-button type="text" @click="dialogVisible = true">点击打开 Dialog</el-button>
+ <el-dialog
+ title="督查督办"
+ :visible.sync="dialogVisible"
+ width="37%"
+ :before-close="handleClose">
+ <el-checkbox-group v-model="checkList">
+ <el-checkbox label="安全环保部"></el-checkbox>
+ <el-checkbox label="生产技术部 "></el-checkbox>
+ <el-checkbox label="机电部"></el-checkbox>
+ <el-checkbox label="企管部"></el-checkbox>
+ <el-checkbox label="消防保卫部"></el-checkbox>
+
+ <el-checkbox label="质检中心"></el-checkbox>
+ <el-checkbox label="市场开发部"></el-checkbox>
+ <el-checkbox label="综合办公室"></el-checkbox>
+ <el-checkbox label="工程部 "></el-checkbox>
+ <el-checkbox label="财务部"></el-checkbox>
+
+ <el-checkbox label="党群工作部"></el-checkbox>
+ <el-checkbox label="纪检监察部"></el-checkbox>
+ <el-checkbox label="化产一车间"></el-checkbox>
+ <el-checkbox label="炼焦一车间"></el-checkbox>
+ <el-checkbox label="原料一车间"></el-checkbox>
+
+ <el-checkbox label="选煤厂"></el-checkbox>
+ <el-checkbox label="电仪车间"></el-checkbox>
+ <el-checkbox label="众和机电"></el-checkbox>
+ <el-checkbox label="原料二车间"></el-checkbox>
+ <el-checkbox label="化产二车间"></el-checkbox>
+
+ <el-checkbox label="炼焦二车间"></el-checkbox>
+ <el-checkbox label="甲醇厂"></el-checkbox>
+ <el-checkbox label="干熄焦"></el-checkbox>
+ </el-checkbox-group>
+ <span slot="footer" class="dialog-footer">
+ <el-button class="btn" type="primary" @click="dialogVisible = false">确 定</el-button>
+ </span>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+export default {
+ name: "supervision",
+ data() {
+ return {
+ dialogVisible: false,
+ checkList: []
+ };
+ },
+ methods: {
+ handleClose(done) {
+ this.$confirm('确认关闭?')
+ .then(_ => {
+ done();
+ })
+ .catch(_ => {});
+ }
+ }
+}
+</script>
+
+<style scoped>
+/deep/ .el-dialog__header{
+ text-align: center;
+ padding: 50px 50px 20px 50px;
+}
+/deep/ .el-dialog__header .el-dialog__title {
+ font-size: 12px;
+ font-weight: bold;
+}
+/deep/ .el-dialog__body{
+ text-align: center;
+ padding: 30px 50px 30px 50px;
+}
+/deep/ .el-checkbox-group{
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ align-items: center;
+}
+/deep/ .el-checkbox{
+ width: 120px;
+ text-align: left;
+ line-height: 25px;
+}
+/deep/ .el-dialog__footer{
+ text-align: center;
+}
+.btn{
+ background: url(../../assets/btn.gif) no-repeat;
+ width: 76px;
+ height: 26px;
+ line-height: 26px;
+ font-size: 14px;
+ border: none;
+ color: #fff;
+ cursor: pointer;
+ overflow: visible;
+ padding: 0;
+}
+/deep/ .el-checkbox__inner{
+ border: 1px solid #000000;
+}
+</style>
--
Gitblit v1.9.2