|
|
@ -0,0 +1,335 @@
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<div :title="massage_title" class="note_text">
|
|
|
|
|
|
|
|
{{ this.note.titleNote }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="input_text">
|
|
|
|
|
|
|
|
{{ this.input_text }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="input_body">
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="person_input"
|
|
|
|
|
|
|
|
placeholder="请输入数量 (人)"
|
|
|
|
|
|
|
|
></el-input>
|
|
|
|
|
|
|
|
<el-button>提交</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="table_body">
|
|
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
|
|
:data="detail_table_data"
|
|
|
|
|
|
|
|
class="company_table"
|
|
|
|
|
|
|
|
:header-cell-style="table_header"
|
|
|
|
|
|
|
|
:cell-style="{ background: 'revert', 'text-align': 'center' }"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
v-for="item in table_list"
|
|
|
|
|
|
|
|
:key="item.prop"
|
|
|
|
|
|
|
|
:label="item.label"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column prop="operation" label="操作">
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<el-button size="small" class="operation" @click="open(scope.row)"
|
|
|
|
|
|
|
|
>编辑
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
<el-button size="small" class="operation" @click="open(scope.row)"
|
|
|
|
|
|
|
|
>删除
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
<div class="table_pagination">
|
|
|
|
|
|
|
|
<el-pagination
|
|
|
|
|
|
|
|
:background="true"
|
|
|
|
|
|
|
|
@size-change="handleSizeChange"
|
|
|
|
|
|
|
|
@current-change="handleCurrentChange"
|
|
|
|
|
|
|
|
:page-sizes="[4]"
|
|
|
|
|
|
|
|
:page-size="pageSize"
|
|
|
|
|
|
|
|
:current-page="pageNum"
|
|
|
|
|
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
|
|
|
|
:total="total"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</el-pagination>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
import bus from "@/assets/js/eventBus.js";
|
|
|
|
|
|
|
|
import { getIndexTable } from "@/api/systemManagement/safeIndex";
|
|
|
|
|
|
|
|
import { getSafeCompanyDetail } from "@/api/systemManagement/companyScore";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
|
|
name: "DetailsTable",
|
|
|
|
|
|
|
|
props: {
|
|
|
|
|
|
|
|
company_id: {
|
|
|
|
|
|
|
|
type: String,
|
|
|
|
|
|
|
|
default: "",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
note: {}, // 三级指标点击展示字段
|
|
|
|
|
|
|
|
note_arr: [], // 树形总数据,以用于按照id查询三级数据
|
|
|
|
|
|
|
|
three_level_id: "",
|
|
|
|
|
|
|
|
two_level_arr: [], // 遍历出来的二级数据
|
|
|
|
|
|
|
|
three_level_arr: [], // 遍历出来的三级数据
|
|
|
|
|
|
|
|
massage_title: "", // 标题文字过多鼠标悬浮展示
|
|
|
|
|
|
|
|
input_text: "", // 添加人数input框标题
|
|
|
|
|
|
|
|
person_input: "",
|
|
|
|
|
|
|
|
table_list: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
prop: "time",
|
|
|
|
|
|
|
|
label: "填报时间",
|
|
|
|
|
|
|
|
width: "200",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
prop: "person_num",
|
|
|
|
|
|
|
|
label: "填报数量(人)",
|
|
|
|
|
|
|
|
width: "200",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
prop: "warning",
|
|
|
|
|
|
|
|
label: "预警情况",
|
|
|
|
|
|
|
|
width: "200",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
prop: "person",
|
|
|
|
|
|
|
|
label: "填报人",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
detail_table_data:[],
|
|
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
|
|
total: 0,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
created() {
|
|
|
|
|
|
|
|
this.get_data();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
|
|
|
|
bus.$on("send_three", (data) => {
|
|
|
|
|
|
|
|
console.log("dataaaa", data);
|
|
|
|
|
|
|
|
this.three_level_id = data.safeRuleId; // 根据传来的id找对应的三级数据
|
|
|
|
|
|
|
|
const new_arr = this.three_level_arr.filter(
|
|
|
|
|
|
|
|
(item) => item.id == this.three_level_id
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
this.note = JSON.parse(new_arr[0].note);
|
|
|
|
|
|
|
|
this.input_text = new_arr[0].levelIndexThree;
|
|
|
|
|
|
|
|
this.massage_title = this.note.titleNote;
|
|
|
|
|
|
|
|
this.get_detail_data()
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
get_data() {
|
|
|
|
|
|
|
|
// 先获取到整体的数据,然后再逐层遍历,最终获得全部的三级数据的集合
|
|
|
|
|
|
|
|
getIndexTable().then((res) => {
|
|
|
|
|
|
|
|
console.log("res", res.data);
|
|
|
|
|
|
|
|
this.note_arr = res.data;
|
|
|
|
|
|
|
|
for (let i = 0; i < this.note_arr.length; i++) {
|
|
|
|
|
|
|
|
// 拿到所有的二级指标数据数组
|
|
|
|
|
|
|
|
this.two_level_arr = this.two_level_arr.concat(
|
|
|
|
|
|
|
|
this.note_arr[i].tbSafeRuleTwoVoList
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for (let i = 0; i < this.two_level_arr.length; i++) {
|
|
|
|
|
|
|
|
// 拿到所有的三级指标数据数组
|
|
|
|
|
|
|
|
this.three_level_arr = this.three_level_arr.concat(
|
|
|
|
|
|
|
|
this.two_level_arr[i].tbSafeRuleThreeVoList
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log("this.three_level_arr", this.three_level_arr);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
get_detail_data() {
|
|
|
|
|
|
|
|
let param = {
|
|
|
|
|
|
|
|
companyId: this.company_id,
|
|
|
|
|
|
|
|
safeRuleId: this.three_level_id,
|
|
|
|
|
|
|
|
pageSize : this.pageSize,
|
|
|
|
|
|
|
|
pageNum : this.pageNum,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
getSafeCompanyDetail(param).then(res=>{
|
|
|
|
|
|
|
|
this.detail_table_data = res.rows
|
|
|
|
|
|
|
|
this.total = res.total
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 表头样式
|
|
|
|
|
|
|
|
table_header({ row, rowIndex }) {
|
|
|
|
|
|
|
|
console.log(row);
|
|
|
|
|
|
|
|
console.log(rowIndex);
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
"text-align": "center", // 表头文字居中
|
|
|
|
|
|
|
|
color: "#fff",
|
|
|
|
|
|
|
|
border: "0.1px solid #425969",
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleSizeChange(val) {
|
|
|
|
|
|
|
|
console.log(`每页 ${val} 条`);
|
|
|
|
|
|
|
|
this.pageNum = 1;
|
|
|
|
|
|
|
|
this.pageSize = val;
|
|
|
|
|
|
|
|
this.get_detail_data();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleCurrentChange(val) {
|
|
|
|
|
|
|
|
console.log(`当前页: ${val}`);
|
|
|
|
|
|
|
|
this.pageNum = val;
|
|
|
|
|
|
|
|
this.get_detail_data();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
|
|
|
.note_text {
|
|
|
|
|
|
|
|
margin-top: 1vh;
|
|
|
|
|
|
|
|
margin-left: 0.4vw;
|
|
|
|
|
|
|
|
width: 51vw;
|
|
|
|
|
|
|
|
height: 4.5vh;
|
|
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
border-bottom: 0.1px solid #4d8f89;
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
|
|
|
line-height: 4.5vh;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.input_text {
|
|
|
|
|
|
|
|
margin-top: 1vh;
|
|
|
|
|
|
|
|
margin-left: 0.4vw;
|
|
|
|
|
|
|
|
width: 51vw;
|
|
|
|
|
|
|
|
height: 3vh;
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
|
|
line-height: 3vh;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.input_body {
|
|
|
|
|
|
|
|
margin-top: 1vh;
|
|
|
|
|
|
|
|
margin-left: 0.4vw;
|
|
|
|
|
|
|
|
width: 51vw;
|
|
|
|
|
|
|
|
height: 4.5vh;
|
|
|
|
|
|
|
|
// border: 0.1px solid #4d8f89;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
.el-input {
|
|
|
|
|
|
|
|
width: 18vw;
|
|
|
|
|
|
|
|
height: 4.5vh;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/deep/.el-input__inner {
|
|
|
|
|
|
|
|
width: 15vw;
|
|
|
|
|
|
|
|
height: 4.5vh;
|
|
|
|
|
|
|
|
border-radius: 0px;
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
border: 0.1px solid #374956;
|
|
|
|
|
|
|
|
background: #212d2f;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.el-button {
|
|
|
|
|
|
|
|
width: 5vw;
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
border: 0.1px solid #374956;
|
|
|
|
|
|
|
|
border-radius: 0px !important;
|
|
|
|
|
|
|
|
background: url("~@/assets/companyFile/btn05.png") no-repeat !important;
|
|
|
|
|
|
|
|
background-size: 100% 100% !important;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.el-button:focus,
|
|
|
|
|
|
|
|
.el-button:hover {
|
|
|
|
|
|
|
|
text-shadow: 0 0 9px #34e1b3;
|
|
|
|
|
|
|
|
filter: brightness(150%);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.table_body {
|
|
|
|
|
|
|
|
margin-top: 1vh;
|
|
|
|
|
|
|
|
margin-left: 0.4vw;
|
|
|
|
|
|
|
|
width: 51vw;
|
|
|
|
|
|
|
|
height: 34vh;
|
|
|
|
|
|
|
|
// border: 0.1px solid #374956;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/deep/.el-button.operation {
|
|
|
|
|
|
|
|
background-color: #182527;
|
|
|
|
|
|
|
|
border: 0px;
|
|
|
|
|
|
|
|
color: #2fabdc;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/deep/.el-button.operation:hover,
|
|
|
|
|
|
|
|
.el-button.operation:focus {
|
|
|
|
|
|
|
|
background-color: #182527;
|
|
|
|
|
|
|
|
border: 0px;
|
|
|
|
|
|
|
|
color: #2fabdc;
|
|
|
|
|
|
|
|
text-shadow: 0 0 9px rgba(21, 255, 198, 0.64);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/deep/.el-table {
|
|
|
|
|
|
|
|
// width: 85.2vw;
|
|
|
|
|
|
|
|
height: 29vh;
|
|
|
|
|
|
|
|
background: rgba(0, 0, 0, 0);
|
|
|
|
|
|
|
|
border: 0.1px solid #3f5564;
|
|
|
|
|
|
|
|
thead {
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
|
|
border: 0.1px solid #3f5564;
|
|
|
|
|
|
|
|
background: linear-gradient(
|
|
|
|
|
|
|
|
to right,
|
|
|
|
|
|
|
|
#284f49,
|
|
|
|
|
|
|
|
#2f6363 5%,
|
|
|
|
|
|
|
|
#233b38 80%
|
|
|
|
|
|
|
|
) !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
& th {
|
|
|
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
& tr {
|
|
|
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
tr {
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
background: rgba(0, 0, 0, 0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.table_pagination {
|
|
|
|
|
|
|
|
width: 51vw;
|
|
|
|
|
|
|
|
height: 5vh;
|
|
|
|
|
|
|
|
/deep/.el-input--suffix .el-input__inner {
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
border: 0.1px solid #34a6a6;
|
|
|
|
|
|
|
|
border-radius: 0px;
|
|
|
|
|
|
|
|
background: rgba(0, 0, 0, 0);
|
|
|
|
|
|
|
|
width: 5vw;
|
|
|
|
|
|
|
|
height: 2.6vh;
|
|
|
|
|
|
|
|
line-height: 2.6vh;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/deep/.el-input__icon {
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
line-height: 2.6vh;
|
|
|
|
|
|
|
|
height: 2.6vh;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/deep/.el-pagination {
|
|
|
|
|
|
|
|
margin-left: 50%;
|
|
|
|
|
|
|
|
margin-top: 1vh;
|
|
|
|
|
|
|
|
.el-pagination__total {
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.el-input__inner {
|
|
|
|
|
|
|
|
border-radius: 0px;
|
|
|
|
|
|
|
|
background: #3c4b4a;
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.btn-prev {
|
|
|
|
|
|
|
|
border-radius: 0px;
|
|
|
|
|
|
|
|
background: #3c4b4a;
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
ul {
|
|
|
|
|
|
|
|
li {
|
|
|
|
|
|
|
|
background: #3c4b4a;
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.btn-next {
|
|
|
|
|
|
|
|
border-radius: 0px;
|
|
|
|
|
|
|
|
background: #3c4b4a;
|
|
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.el-pager {
|
|
|
|
|
|
|
|
li {
|
|
|
|
|
|
|
|
background: #3c4b4a !important;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|