Commit ced7199f authored by 张牧越's avatar 张牧越

12.6 详情更改以及预警列表变更

parent b319eaca
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
document.getElementsByTagName("body")[0].style.fontSize = document.getElementsByTagName("body")[0].style.fontSize =
(document.body.offsetWidth / designW) * font_rate + "px"; (document.body.offsetWidth / designW) * font_rate + "px";
//监测窗口大小变化 //监测窗口大小变化
console.log(document.body.offsetWidth);
var that = this; var that = this;
window.addEventListener( window.addEventListener(
"onorientationchange" in window ? "orientationchange" : "resize", "onorientationchange" in window ? "orientationchange" : "resize",
......
...@@ -104,3 +104,80 @@ export async function getImportantQuestion() { ...@@ -104,3 +104,80 @@ export async function getImportantQuestion() {
method: 'get', method: 'get',
}) })
} }
// 获取严重问题列表
export async function getWarningStatusNum() {
return await request({
url: `/site/index/warning_config`,
method: 'get',
})
}
// 获取政府监管选项下拉
export async function getZFJGConfig() {
return await request({
url: `/site/question/table`,
method: 'get',
})
}
// 获取政府监管问题列表
export async function getZFJGQuestionList(params) {
return await request({
url: `/site/question`,
method: 'get',
params,
noloading: true
})
}
// 获取政府监管问题详情
export async function getZFJGQuestionDetail(id) {
return await request({
url: `/site/question/pages/detail/${id}`,
method: 'get',
})
}
// 获取创新创优详情
export async function getExcellenceDetail(id) {
return await request({
url: `/site/excellence?project_id=${id}`,
method: 'get',
})
}
//获取质量评定列表接口
export async function getZLPDList(id) {
return await request({
url: `/site/part/info/${id}?part_type=2`,
method: 'get',
})
}
//获取质量检测列表接口
export async function getZLJCList(id) {
return await request({
url: `/site/quality/check/getcheck?project_id=${id}`,
method: 'get',
})
}
// 获取区域详情接口
export async function getAreaDetail(projectId) {
return await request({
url: `/site/index/whole/${projectId}`,
method: 'get',
})
}
...@@ -31,13 +31,23 @@ ...@@ -31,13 +31,23 @@
} }
.el-table thead.is-group th.el-table__cell {
background-color: #103972;
}
.el-table--border th.el-table__cell,
.el-table__fixed-right-patch {
border-bottom: 1px solid #1f4c89 !important;
}
.el-table thead { .el-table thead {
color: #fff; color: #fff;
} }
.el-table th.el-table__cell { .el-table th.el-table__cell {
background: rgba(35, 221, 255, 0.2); background: #103972;
} }
.el-table .el-table__cell { .el-table .el-table__cell {
...@@ -235,7 +245,7 @@ ...@@ -235,7 +245,7 @@
} }
.dialog-data-table.el-table th.el-table__cell { .dialog-data-table.el-table th.el-table__cell {
background: #16488B; background: #103972;
} }
.dialog-data-table.el-table { .dialog-data-table.el-table {
......
src/assets/images/value_bg.png

891 Bytes | W: | H:

src/assets/images/value_bg.png

885 Bytes | W: | H:

src/assets/images/value_bg.png
src/assets/images/value_bg.png
src/assets/images/value_bg.png
src/assets/images/value_bg.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
<span class="dialog-title-span"> <span class="dialog-title-span">
{{ title }} {{ title }}
</span> </span>
<span class="op-buttons"> <!-- <span class="op-buttons">
<i <i
@click="changeFullScreen" @click="changeFullScreen"
:class="['iconfont', isFullScreen ? 'icon-suoxiao' : 'icon-fangda']" :class="['iconfont', isFullScreen ? 'icon-suoxiao' : 'icon-fangda']"
></i> ></i>
</span> </span> -->
</div> </div>
</template> </template>
<slot /> <slot />
...@@ -58,9 +58,7 @@ export default { ...@@ -58,9 +58,7 @@ export default {
}, },
methods: { methods: {
closeDialog() { closeDialog() {
console.log("???");
this.dialogVisible = false; this.dialogVisible = false;
console.log(this.dialogVisible);
}, },
changeFullScreen() { changeFullScreen() {
this.isFullScreen = !this.isFullScreen; this.isFullScreen = !this.isFullScreen;
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
v-loading="loading" v-loading="loading"
:element-loading-background="loadingBG" :element-loading-background="loadingBG"
height="calc(100% - .5rem)" height="calc(100% - .5rem)"
@row-click="rowClick"
> >
<el-table-column <el-table-column
v-if="hasIndex" v-if="hasIndex"
...@@ -147,6 +148,9 @@ export default { ...@@ -147,6 +148,9 @@ export default {
this.currentPage = currentPage; this.currentPage = currentPage;
this.getData(); this.getData();
}, },
rowClick(row) {
this.$emit("row-click", row);
},
}, },
}; };
</script> </script>
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
class="table-data-columns" class="table-data-columns"
v-for="(row, index) in tableData" v-for="(row, index) in tableData"
:key="index" :key="index"
@click="rowClick(row)"
> >
<div class="table-data-column" v-if="hasIndex" style="width: 0.4rem"> <div class="table-data-column" v-if="hasIndex" style="width: 0.4rem">
{{ index + 1 }} {{ index + 1 }}
...@@ -130,17 +131,18 @@ export default { ...@@ -130,17 +131,18 @@ export default {
clearInterval(this.scrollInterval); clearInterval(this.scrollInterval);
} }
}, },
rowClick(row) {
this.$emit("row-click", row);
},
}, },
data() {
return {};
},
mounted() { mounted() {
this.$refs.scrollContainer.onscroll = () => { // this.$refs.scrollContainer.onscroll = () => {
let list = document.getElementsByClassName("el-tooltip__popper"); // let list = document.getElementsByClassName("el-tooltip__popper");
if (list.length > 0) { // if (list.length > 0) {
list[list.length - 1].style.display = "none"; // list[list.length - 1].style.display = "none";
} // }
}; // };
this.$refs.scrollContainer.onmouseover = () => { this.$refs.scrollContainer.onmouseover = () => {
this.stopScrolling(); this.stopScrolling();
}; };
...@@ -181,6 +183,7 @@ export default { ...@@ -181,6 +183,7 @@ export default {
color: #fff; color: #fff;
font-size: 14px; font-size: 14px;
margin-bottom: 4px; margin-bottom: 4px;
cursor: pointer;
background: url("@/assets/images/index/icon_moren@2x.png"); background: url("@/assets/images/index/icon_moren@2x.png");
background-repeat: no-repeat; background-repeat: no-repeat;
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
class="table-data-columns" class="table-data-columns"
v-for="(row, index) in tableData" v-for="(row, index) in tableData"
:key="index" :key="index"
@click="rowClick(row)"
> >
<div class="table-data-column" v-if="hasIndex" style="width: 0.4rem"> <div class="table-data-column" v-if="hasIndex" style="width: 0.4rem">
{{ index + 1 }} {{ index + 1 }}
...@@ -82,7 +83,7 @@ export default { ...@@ -82,7 +83,7 @@ export default {
}, },
}, },
tableData: { tableData: {
type: Array, type: [Array, Object],
default: () => { default: () => {
return []; return [];
}, },
...@@ -131,17 +132,17 @@ export default { ...@@ -131,17 +132,17 @@ export default {
clearInterval(this.scrollInterval); clearInterval(this.scrollInterval);
} }
}, },
}, rowClick(row) {
data() { this.$emit("row-click", row);
return {}; },
}, },
mounted() { mounted() {
this.$refs.scrollContainer.onscroll = () => { // this.$refs.scrollContainer.onscroll = () => {
let list = document.getElementsByClassName("el-tooltip__popper"); // let list = document.getElementsByClassName("el-tooltip__popper");
if (list.length > 0) { // if (list.length > 0) {
list[list.length - 1].style.display = "none"; // list[list.length - 1].style.display = "none";
} // }
}; // };
this.$refs.scrollContainer.onmouseover = () => { this.$refs.scrollContainer.onmouseover = () => {
this.stopScrolling(); this.stopScrolling();
}; };
...@@ -158,9 +159,8 @@ export default { ...@@ -158,9 +159,8 @@ export default {
} }
.table-headers { .table-headers {
line-height: 32px; line-height: 32px;
border: 1px solid #21436b;
background: #19314d; color: #b2bfcf;
color: #fff;
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;
display: flex; display: flex;
......
This diff is collapsed.
<template>
<Dialog
title="创新创优详情"
:visible="dialogVisible"
width="600"
@change-visible="changeVisible"
:destroy-on-close="true"
>
<div class="project-name">
<div>
<img src="@/assets/images/index/project.png" alt="" />
{{ data.project_name }}
</div>
<div>
创新创优得分:<span class="count">{{ data.excellence_score }}</span>
</div>
</div>
<div class="scores">
<div class="score-title">
<div class="title">创新工法</div>
<div class="got-score">得分:{{ formData.cxgf_score }}/24</div>
</div>
<div class="score-detail">
<div class="w-50">省级以上工法:{{ formData.province_num }}</div>
<div class="w-50">国家级工法:{{ formData.country_num }}</div>
</div>
</div>
<div class="scores">
<div class="score-title">
<div class="title">工程专利</div>
<div class="got-score">得分:{{ formData.patent_score }}/30</div>
</div>
<div class="score-detail">
<div class="w-50">发明专利数:{{ formData.invention_patent_num }}</div>
<div class="w-50">
实用新型专利:{{ formData.practical_patent_num }}
</div>
</div>
</div>
<div class="scores">
<div class="score-title">
<div class="title">优秀质量管理成果</div>
<div class="got-score">得分:{{ formData.result_score }}/28</div>
</div>
<div class="score-detail">
<div class="w-50">国家级:{{ formData.country_result_num }}</div>
<div class="w-50">省部级:{{ formData.province_result_num }}</div>
</div>
</div>
<div class="scores">
<div class="score-title">
<div class="title">工程质量获奖</div>
<div class="got-score">得分:{{ formData.city_project_score }}/18</div>
</div>
<div class="score-detail">
<div class="w-50">工程质量获奖:{{ formData.city_project_num }}</div>
</div>
</div>
</Dialog>
</template>
<script>
import { getExcellenceDetail } from "@/api/dataStatis";
export default {
name: "CXCYDetail",
props: {
data: {
type: Object,
default: () => {
return {};
},
},
visible: {
type: Boolean,
default: false,
},
},
data() {
return {
formData: {},
};
},
computed: {
dialogVisible: {
get() {
return this.visible;
},
set(val) {
this.$emit("change-visible", val);
},
},
},
methods: {
changeVisible(val) {
this.dialogVisible = val;
},
getData() {
getExcellenceDetail(this.data.id).then((res) => {
this.formData = res.data.data[0] ? res.data.data[0] : {};
});
},
},
mounted() {},
watch: {
dialogVisible(val) {
if (val) {
this.$nextTick(() => {
this.getData();
});
}
},
},
};
</script>
<style lang="less" scoped>
.project-name {
line-height: 50px;
padding: 0 10px;
background: #12407f;
display: flex;
justify-content: space-between;
margin-bottom: 10px;
color: #60fff6;
font-size: 14px;
.count {
font-size: 20px;
font-weight: bold;
vertical-align: top;
}
img {
width: 20px;
vertical-align: top;
margin: 15px 10px;
}
}
.scores {
margin-bottom: 10px;
}
.score-title {
background: #16488b;
padding: 0 24px;
line-height: 40px;
display: flex;
justify-content: space-between;
.title {
font-size: 14px;
color: #60fff6;
font-weight: bold;
position: relative;
&::before {
position: absolute;
content: "";
width: 3px;
height: 16px;
background: #60fff6;
left: -12px;
top: 50%;
transform: translateY(-50%);
}
}
.got-score {
color: #d9d9d9;
font-size: 14px;
}
}
.score-detail {
background: #0c3163;
border: 1px solid #1f4c89;
border-top: 0;
padding: 12px 20px;
display: flex;
justify-content: flex-start;
}
.w-50 {
width: 50%;
text-align: left;
color: #d9d9d9;
font-size: 14px;
}
::v-deep .el-dialog .el-dialog__body {
min-height: 400px !important;
height: inherit !important;
}
</style>
\ No newline at end of file
<template>
<Dialog
title="工程质量详情"
:visible="dialogVisible"
width="70%"
@change-visible="changeVisible"
>
<DialogTabs
:tabList="tabList"
:currentTab="currentTabNow"
@change="(val) => changeTab(val)"
></DialogTabs>
<component :is="currentTabNow" :data="data"></component>
</Dialog>
</template>
<script>
import ZLPD from "./ZLJCPD.vue";
import ZLJC from "./ZLJC.vue";
export default {
name: "GCZLIndex",
components: { ZLPD, ZLJC },
props: {
visible: {
type: Boolean,
default: false,
},
data: {
type: Object,
default: () => {
return {};
},
},
},
data() {
return {
tabList: [
{ name: "ZLPD", label: "质量评定" },
{ name: "ZLJC", label: "质量检测" },
],
currentTabNow: "",
};
},
computed: {
dialogVisible: {
get() {
return this.visible;
},
set(val) {
this.$emit("change-visible", val);
},
},
},
methods: {
changeTab(e) {
this.currentTabNow = e;
},
changeVisible(val) {
this.dialogVisible = val;
},
},
mounted() {
this.$eventBus.$on("switchTabGC", (type) => {
this.$nextTick(() => {
this.currentTabNow = type;
});
});
},
watch: {
dialogVisible(val) {
if (val) {
this.currentTabNow = "ZLPD";
} else {
this.currentTabNow = "";
}
},
},
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<template>
<div style="height: 100%; margin-top: 10px">
<div class="project-name">
<div>
<img src="@/assets/images/index/project.png" alt="" />
{{ data.project_name }}
</div>
<div>
质量检测得分:<span class="count">{{ data.quality_check_score }}</span>
</div>
</div>
<el-table
border
class="dialog-data-table"
:data="tableData"
v-loading="loading"
:element-loading-background="loadingBG"
height="calc(100% - .7rem)"
:span-method="handleSpan"
>
<el-table-column
label="指标"
align="center"
prop="check_type_str"
></el-table-column>
<el-table-column label="部位" align="center" prop="is_important">
<template slot-scope="scope">
<span>{{
scope.row.is_important == 1 ? "重要部位" : "一般部位"
}}</span>
</template>
</el-table-column>
<el-table-column
v-for="column in columns"
:key="column.key"
:label="column.label"
align="center"
:prop="column.key"
></el-table-column>
</el-table>
</div>
</template>
<script>
import { getZLJCList } from "@/api/dataStatis";
export default {
name: "ZFJGDetail",
props: {
data: {
type: Object,
default: () => {
return {};
},
},
},
data() {
return {
tableData: [],
loading: false,
loadingBG: "rgba(0, 0, 0, 0.2)",
columns: [],
allData: [],
};
},
methods: {
changeVisible(val) {
this.dialogVisible = val;
},
changeTime(tr) {
this.searchForm.start_time = tr[0] ? tr[0] : "";
this.searchForm.end_time = tr[1] ? tr[1] : "";
},
handleSearch() {
this.$refs.table.getData();
},
handleSpan({ row, column, rowIndex, columnIndex }) {
if (columnIndex == 0) {
// 只对 type 列进行处理
const rowspan = this.getRowspan(row, rowIndex);
if (rowspan >= 1) {
return {
rowspan,
colspan: 1,
};
} else {
return {
rowspan: 0,
colspan: 0,
};
}
}
},
getRowspan(row, rowIndex) {
const currentFactorMainNumber = row.check_type;
let rowspan = 1; // 默认rowspan为1,也就是每个单元格只占一行
// 如果当前行不是第一行,则先查看前一行,如果前一行的值(同列单元格)与当前行(同列单元格)相同,则将当前单元格与前一行合并(当前单元格占0行,rowspan=0)
if (rowIndex > 0) {
const previousRow = this.tableData[rowIndex - 1];
const previousFactorMainNumber = previousRow.check_type;
if (currentFactorMainNumber === previousFactorMainNumber) {
return 0;
}
}
// 然后向查看,如果后面行(同列单元格)的值与当前行(同列单元格)相同,则每找到一行rowspan加1,直到找到与当前行(同列单元格)的值不同的行为止。(也就是说只能合并连续的行)
for (let i = rowIndex + 1; i < this.tableData.length; i++) {
const nextRow = this.tableData[i];
const nextFactorMainNumber = nextRow.check_type;
if (currentFactorMainNumber === nextFactorMainNumber) {
rowspan++;
} else {
break;
}
}
return rowspan;
},
getData() {
getZLJCList(this.data.id).then((res) => {
this.allData = [...res.data.score_data];
let arr = [];
res.data.score_data.forEach((item) => {
item[`unqualified_percent${item.entrust_type}`] =
item.unqualified_percent + "%";
let index = arr.findIndex(
(row) =>
row.check_type == item.check_type &&
row.is_important == item.is_important
);
if (index >= 0) {
arr[index][`unqualified_percent${item.entrust_type}`] =
item.unqualified_percent + "%";
} else {
arr.push(item);
}
});
console.log(arr);
this.getColumns();
this.tableData = arr;
});
},
getColumns() {
let arr = [];
this.allData.forEach((item) => {
let index = arr.findIndex((row) => row.key == item.entrust_type);
if (index == -1) {
arr.push({ key: item.entrust_type, value: item.entrust_type_str });
}
});
arr.forEach((item) => {
this.columns.push({
label: item.value + "不合格率",
key: `unqualified_percent${item.key}`,
});
});
console.log(this.columns);
this.columns = [...this.columns];
console.log(arr, "arr");
},
},
mounted() {
this.getData();
},
};
</script>
<style lang="less" scoped>
.project-name {
line-height: 50px;
padding: 0 10px;
background: #12407f;
display: flex;
justify-content: space-between;
margin-bottom: 10px;
color: #60fff6;
font-size: 14px;
.count {
font-size: 20px;
font-weight: bold;
vertical-align: top;
}
img {
width: 20px;
vertical-align: top;
margin: 15px 10px;
}
}
</style>
\ No newline at end of file
<template>
<div style="height: 100%; margin-top: 10px">
<div class="project-name">
<div>
<img src="@/assets/images/index/project.png" alt="" />
{{ data.project_name }}
</div>
<div>
质量评定得分:<span class="count">{{ data.quality_score }}</span>
</div>
</div>
<el-table
border
class="dialog-data-table"
:data="tableData"
v-loading="loading"
:element-loading-background="loadingBG"
height="calc(100% - .7rem)"
:span-method="handleSpan"
>
<el-table-column
label="单位工程名称"
align="center"
prop="parent_name"
></el-table-column>
<el-table-column
label="是否为主要单位"
align="center"
prop="tis_main_unit_name"
></el-table-column>
<el-table-column
label="外观质量得分"
align="center"
prop="tappearance_quality_score"
></el-table-column>
<el-table-column
label="分部工程名称"
align="center"
prop="part_name"
></el-table-column>
<el-table-column
label="是否为主要分部"
align="center"
prop="is_main_distribution_name"
></el-table-column>
<el-table-column
label="重要隐蔽或关键单元工程个数"
align="center"
prop="concealed_critical_num"
></el-table-column>
<el-table-column
label="重要隐蔽或关键单元工程的优良率"
align="center"
prop="concealed_critical_percentage"
></el-table-column>
<el-table-column
label="一般单元工程个数"
align="center"
prop="general_num"
></el-table-column>
<el-table-column
label="一般单元工程优良率"
align="center"
prop="general_percentage"
></el-table-column>
</el-table>
</div>
</template>
<script>
import { getZLPDList } from "@/api/dataStatis";
export default {
name: "ZFJGDetail",
props: {
data: {
type: Object,
default: () => {
return {};
},
},
},
data() {
return {
tableData: [],
loading: false,
loadingBG: "rgba(0, 0, 0, 0.2)",
};
},
methods: {
changeVisible(val) {
this.dialogVisible = val;
},
changeTime(tr) {
this.searchForm.start_time = tr[0] ? tr[0] : "";
this.searchForm.end_time = tr[1] ? tr[1] : "";
},
handleSearch() {
this.$refs.table.getData();
},
handleSpan({ row, column, rowIndex, columnIndex }) {
if (columnIndex <= 2) {
// 只对 type 列进行处理
const rowspan = this.getRowspan(row, rowIndex);
if (rowspan >= 2) {
return {
rowspan,
colspan: 1,
};
} else {
return {
rowspan: 0,
colspan: 0,
};
}
}
},
getRowspan(row, rowIndex) {
const currentFactorMainNumber = row.tid;
let rowspan = 1; // 默认rowspan为1,也就是每个单元格只占一行
// 如果当前行不是第一行,则先查看前一行,如果前一行的值(同列单元格)与当前行(同列单元格)相同,则将当前单元格与前一行合并(当前单元格占0行,rowspan=0)
if (rowIndex > 0) {
const previousRow = this.tableData[rowIndex - 1];
const previousFactorMainNumber = previousRow.tid;
if (currentFactorMainNumber === previousFactorMainNumber) {
return 0;
}
}
// 然后向查看,如果后面行(同列单元格)的值与当前行(同列单元格)相同,则每找到一行rowspan加1,直到找到与当前行(同列单元格)的值不同的行为止。(也就是说只能合并连续的行)
for (let i = rowIndex + 1; i < this.tableData.length; i++) {
const nextRow = this.tableData[i];
const nextFactorMainNumber = nextRow.tid;
if (currentFactorMainNumber === nextFactorMainNumber) {
rowspan++;
} else {
break;
}
}
return rowspan;
},
getData() {
getZLPDList(this.data.id).then((res) => {
this.tableData = res.data.list;
});
},
},
mounted() {
this.getData();
},
};
</script>
<style lang="less" scoped>
.project-name {
line-height: 50px;
padding: 0 10px;
background: #12407f;
display: flex;
justify-content: space-between;
margin-bottom: 10px;
color: #60fff6;
font-size: 14px;
.count {
font-size: 20px;
font-weight: bold;
vertical-align: top;
}
img {
width: 20px;
vertical-align: top;
margin: 15px 10px;
}
}
</style>
\ No newline at end of file
<template>
<Dialog
title="问题详情"
:visible="dialogVisible"
width="8rem"
@change-visible="changeVisible"
:destroy-on-close="true"
>
<div class="scores">
<div class="score-title">
<div class="title">问题信息</div>
<div
class="got-score"
:style="{ color: data.question_status == 1 ? '#DF3333' : '#30B34F' }"
>
{{ data.question_status_str }}
</div>
</div>
<div class="score-detail">
<div class="w-100">工程名称:{{ data.project_name }}</div>
<div class="w-100">所在地址:{{ data.address }}</div>
<div class="w-100">
负责人:{{ data.person_name }} / {{ data.person_mobile }}
</div>
<div class="w-100">标段名称:{{ data.lot_project_name }}</div>
<div class="w-100">所属机构:{{ data.c_company_name }}</div>
<div class="w-100">所属单位:{{ data.units_company_name }}</div>
<div class="w-100">问题分类:{{ data.category_name }}</div>
<div class="w-100">问题等级:{{ data.question_level_str }}</div>
<div class="w-100">问题种类:{{ data.question_type_str }}</div>
<div class="w-100">处理状态:{{ data.question_status_str }}</div>
<div class="w-100">法规依据:{{ data.legal_basis }}</div>
<div class="w-100">系统问题描述:{{ data.system_question }}</div>
<div class="w-100">用户问题描述:{{ data.user_question }}</div>
</div>
</div>
</Dialog>
</template>
<script>
import { getZFJGQuestionDetail } from "@/api/dataStatis";
export default {
name: "QuestionDetail",
props: {
visible: {
type: Boolean,
default: false,
},
questionId: {
type: [String, Number],
default: "",
},
},
data() {
return {
data: {},
};
},
computed: {
dialogVisible: {
get() {
return this.visible;
},
set(val) {
this.$emit("change-visible", val);
},
},
},
methods: {
changeVisible(val) {
this.dialogVisible = val;
},
getData() {
getZFJGQuestionDetail(this.questionId).then((res) => {
this.data = res.data;
});
},
},
mounted() {},
watch: {
visible(val) {
if (val) {
this.getData();
}
},
},
};
</script>
<style lang="less" scoped>
.project-name {
line-height: 50px;
padding: 0 10px;
background: #12407f;
display: flex;
justify-content: space-between;
margin-bottom: 10px;
color: #60fff6;
font-size: 14px;
.count {
font-size: 20px;
font-weight: bold;
vertical-align: top;
}
img {
width: 20px;
vertical-align: top;
margin: 15px 10px;
}
}
.scores {
margin-bottom: 10px;
}
.score-title {
background: #16488b;
padding: 0 24px;
line-height: 40px;
display: flex;
justify-content: space-between;
.title {
font-size: 14px;
color: #60fff6;
font-weight: bold;
position: relative;
&::before {
position: absolute;
content: "";
width: 3px;
height: 16px;
background: #60fff6;
left: -12px;
top: 50%;
transform: translateY(-50%);
}
}
.got-score {
color: #d9d9d9;
font-size: 14px;
}
}
.score-detail {
background: #0c3163;
border: 1px solid #1f4c89;
border-top: 0;
padding: 12px 20px;
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
}
.w-100 {
width: 100%;
text-align: left;
color: #d9d9d9;
font-size: 14px;
line-height: 28px;
}
::v-deep .el-dialog .el-dialog__body {
min-height: 400px !important;
height: inherit !important;
}
</style>
\ No newline at end of file
<template>
<Dialog
title="政府监管工程详情"
:visible="dialogVisible"
width="80%"
@change-visible="changeVisible"
:destroy-on-close="true"
>
<div class="project-name">
<div>
<img src="@/assets/images/index/project.png" alt="" />
{{ data.project_name }}
</div>
<div>
政府监管得分:<span class="count">{{ data.regulation_score }}</span>
</div>
</div>
<el-form inline :model="searchForm" class="search-form">
<el-form-item label="记录时间:">
<el-date-picker
v-model="dateRange"
type="datetimerange"
start-placeholder="开始时间"
end-placeholder="结束时间"
value-format="yyyy-MM-dd HH:mm:ss"
@change="changeTime"
/>
</el-form-item>
<el-form-item label="问题类型:">
<el-input size="small" v-model="searchForm.category_name"></el-input>
</el-form-item>
<el-form-item label="问题种类:">
<el-select
style="width: 1rem"
v-model="searchForm.question_type"
size="small"
clearable
>
<el-option
v-for="option in question_type"
:label="option.value"
:value="option.key"
:key="option.key"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="问题等级:">
<el-select
style="width: 1rem"
v-model="searchForm.question_level"
size="small"
clearable
>
<el-option
v-for="option in question_level"
:label="option.value"
:value="option.key"
:key="option.key"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="处理状态:">
<el-select
style="width: 1rem"
v-model="searchForm.question_status"
size="small"
clearable
>
<el-option
v-for="option in question_status"
:label="option.value"
:value="option.key"
:key="option.key"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSearch" size="small"
>查询</el-button
>
</el-form-item>
</el-form>
<DialogApiDataTable
:has-index="true"
ref="table"
:columns="columns"
:parameters="searchForm"
:api="api"
:auto-load="false"
@row-click="showQuestionDetail"
>
<template #question_level_str="{ data }">
<span
:style="{
color: data.question_level == 1 ? '#E27F37' : '#DF3333',
}"
>
{{ data.question_level_str }}
</span>
</template>
<template #question_status_str="{ data }">
<span
:style="{
color: data.question_status == 1 ? '#DF3333' : '#30B34F',
}"
>
{{ data.question_status_str }}
</span>
</template>
</DialogApiDataTable>
<QuestionDetail
:question-id="questionId"
:visible="questionVisible"
@change-visible="(val) => (questionVisible = val)"
>
</QuestionDetail>
</Dialog>
</template>
<script>
import { getZFJGConfig, getZFJGQuestionList } from "@/api/dataStatis";
import QuestionDetail from "./QuestionDetail.vue";
export default {
name: "ZFJGDetail",
components: { QuestionDetail },
props: {
data: {
type: Object,
default: () => {
return {};
},
},
visible: {
type: Boolean,
default: false,
},
},
data() {
return {
searchForm: {},
dateRange: [],
api: getZFJGQuestionList,
columns: [
{
label: "标段",
prop: "lot_project_name",
minWidth: "300px",
},
{
label: "机构名称",
prop: "c_company_name",
minWidth: "200px",
},
{
label: "单位名称",
prop: "units_company_name",
minWidth: "200px",
},
{
label: "单位类型",
prop: "utype_str",
minWidth: "100px",
},
{
label: "问题类型",
prop: "name",
minWidth: "120px",
},
{
label: "问题种类",
prop: "question_type_str",
minWidth: "100px",
},
{
label: "用户问题描述",
prop: "user_question",
minWidth: "300px",
},
{
label: "记录时间",
prop: "create_time",
minWidth: "150px",
},
{
label: "问题等级",
prop: "question_level_str",
hasSlot: true,
minWidth: "100px",
},
{
label: "处理状态",
prop: "question_status_str",
minWidth: "100px",
hasSlot: true,
},
],
question_level: [],
question_status: [],
question_type: [],
questionVisible: false,
questionId: "",
};
},
computed: {
dialogVisible: {
get() {
return this.visible;
},
set(val) {
this.$emit("change-visible", val);
},
},
},
methods: {
changeVisible(val) {
this.dialogVisible = val;
},
changeTime(tr) {
this.searchForm.start_time = tr[0] ? tr[0] : "";
this.searchForm.end_time = tr[1] ? tr[1] : "";
},
handleSearch() {
this.$refs.table.getData();
},
showQuestionDetail(row) {
this.questionId = row.id;
this.questionVisible = true;
},
},
mounted() {
getZFJGConfig().then((res) => {
for (let i in res.data.question_level) {
this.question_level.push({
key: i,
value: res.data.question_level[i],
});
}
for (let i in res.data.question_status) {
this.question_status.push({
key: i,
value: res.data.question_status[i],
});
}
for (let i in res.data.question_type) {
this.question_type.push({
key: i,
value: res.data.question_type[i],
});
}
});
},
watch: {
dialogVisible(val) {
if (val) {
this.searchForm = {
project_id: this.data.id,
};
this.dateRange = [];
this.$nextTick(() => {
this.handleSearch();
});
}
},
},
};
</script>
<style lang="less" scoped>
.project-name {
line-height: 50px;
padding: 0 10px;
background: #12407f;
display: flex;
justify-content: space-between;
margin-bottom: 10px;
color: #60fff6;
font-size: 14px;
.count {
font-size: 20px;
font-weight: bold;
vertical-align: top;
}
img {
width: 20px;
vertical-align: top;
margin: 15px 10px;
}
}
</style>
\ No newline at end of file
This diff is collapsed.
...@@ -29,7 +29,11 @@ ...@@ -29,7 +29,11 @@
:api="api" :api="api"
> >
<template #excellence_score="{ data }"> <template #excellence_score="{ data }">
<span :style="{ color: data.excellence_score < 80 ? '#f86262' : '' }"> <span
:style="{
color: data.excellence_score < warningNum[3] ? '#f86262' : '',
}"
>
{{ data.excellence_score }} {{ data.excellence_score }}
</span> </span>
</template> </template>
...@@ -67,6 +71,7 @@ export default { ...@@ -67,6 +71,7 @@ export default {
], ],
api: getProjectList, api: getProjectList,
cities: [], cities: [],
warningNum: window.warningNum,
}; };
}, },
mounted() { mounted() {
......
...@@ -30,19 +30,27 @@ ...@@ -30,19 +30,27 @@
> >
<template #quality_check_score="{ data }"> <template #quality_check_score="{ data }">
<span <span
:style="{ color: data.quality_check_score < 80 ? '#f86262' : '' }" :style="{
color: data.quality_check_score < warningNum[4] ? '#f86262' : '',
}"
> >
{{ data.quality_check_score }} {{ data.quality_check_score }}
</span> </span>
</template> </template>
<template #quality_score="{ data }"> <template #quality_score="{ data }">
<span :style="{ color: data.quality_score < 80 ? '#f86262' : '' }"> <span
:style="{
color: data.quality_score < warningNum[5] ? '#f86262' : '',
}"
>
{{ data.quality_score }} {{ data.quality_score }}
</span> </span>
</template> </template>
<template #quality_total_score="{ data }"> <template #quality_total_score="{ data }">
<span <span
:style="{ color: data.quality_total_score < 80 ? '#f86262' : '' }" :style="{
color: data.quality_total_score < warningNum[7] ? '#f86262' : '',
}"
> >
{{ data.quality_total_score }} {{ data.quality_total_score }}
</span> </span>
...@@ -94,6 +102,7 @@ export default { ...@@ -94,6 +102,7 @@ export default {
dateRange: [], dateRange: [],
api: getProjectList, api: getProjectList,
cities: [], cities: [],
warningNum: window.warningNum,
}; };
}, },
mounted() { mounted() {
......
...@@ -29,29 +29,45 @@ ...@@ -29,29 +29,45 @@
:api="api" :api="api"
> >
<template #regulation_score="{ data }"> <template #regulation_score="{ data }">
<span :style="{ color: data.regulation_score < 80 ? '#f86262' : '' }"> <span
:style="{
color: data.regulation_score < warningNum[2] ? '#f86262' : '',
}"
>
{{ data.regulation_score }} {{ data.regulation_score }}
</span> </span>
</template> </template>
<template #quality_check_score="{ data }"> <template #quality_check_score="{ data }">
<span <span
:style="{ color: data.quality_check_score < 80 ? '#f86262' : '' }" :style="{
color: data.quality_check_score < warningNum[4] ? '#f86262' : '',
}"
> >
{{ data.quality_check_score }} {{ data.quality_check_score }}
</span> </span>
</template> </template>
<template #quality_score="{ data }"> <template #quality_score="{ data }">
<span :style="{ color: data.quality_score < 80 ? '#f86262' : '' }"> <span
:style="{
color: data.quality_score < warningNum[5] ? '#f86262' : '',
}"
>
{{ data.quality_score }} {{ data.quality_score }}
</span> </span>
</template> </template>
<template #excellence_score="{ data }"> <template #excellence_score="{ data }">
<span :style="{ color: data.excellence_score < 80 ? '#f86262' : '' }"> <span
:style="{
color: data.excellence_score < warningNum[3] ? '#f86262' : '',
}"
>
{{ data.excellence_score }} {{ data.excellence_score }}
</span> </span>
</template> </template>
<template #total_score="{ data }"> <template #total_score="{ data }">
<span :style="{ color: data.total_score < 80 ? '#f86262' : '' }"> <span
:style="{ color: data.total_score < warningNum[6] ? '#f86262' : '' }"
>
{{ data.total_score }} {{ data.total_score }}
</span> </span>
</template> </template>
...@@ -114,6 +130,7 @@ export default { ...@@ -114,6 +130,7 @@ export default {
api: getProjectList, api: getProjectList,
cities: [], cities: [],
warningNum: window.warningNum,
}; };
}, },
mounted() { mounted() {
......
...@@ -29,7 +29,11 @@ ...@@ -29,7 +29,11 @@
:api="api" :api="api"
> >
<template #regulation_score="{ data }"> <template #regulation_score="{ data }">
<span :style="{ color: data.regulation_score < 80 ? '#f86262' : '' }"> <span
:style="{
color: data.regulation_score < warningNum[2] ? '#f86262' : '',
}"
>
{{ data.regulation_score }} {{ data.regulation_score }}
</span> </span>
</template> </template>
...@@ -68,6 +72,7 @@ export default { ...@@ -68,6 +72,7 @@ export default {
], ],
api: getProjectList, api: getProjectList,
cities: [], cities: [],
warningNum: window.warningNum,
}; };
}, },
mounted() { mounted() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment