Commit f8e206b5 by liangzhen

修复页面

1 parent 3c773bac
<template> <template>
<div> <div class="main">
<iframe src="http://192.168.91.1:18000/static/#/assessResult/release/notice" frameborder="0" style="width:100vw;height:100vh;" id="iframe" ></iframe> <el-form
:model="ruleForm"
ref="formName"
label-width="100px"
class="demo-ruleForm"
>
<el-form-item label="稽核名称:" prop="auditName" class="fromItem">
<el-input
v-model="ruleForm.auditName"
placeholder="请输入"
clearable
></el-input>
</el-form-item>
<el-form-item
label="稽核开始时间:"
prop="auditStartTime"
class="fromItem"
>
<el-date-picker
v-model="ruleForm.auditStartTime"
type="date"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
<el-form-item label="稽核结束时间:" prop="auditEndTime" class="fromItem">
<el-date-picker
v-model="ruleForm.auditEndTime"
type="date"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
<el-form-item label="稽核频率:" prop="auditFrequency" class="fromItem">
<el-select
v-model="ruleForm.auditFrequency"
placeholder="请选择"
clearable
>
<el-option label="仅一次" value="0"></el-option>
<el-option label="每周" value="1"></el-option>
<el-option label="每月" value="2"></el-option>
<el-option label="每季度" value="3"></el-option>
<el-option label="每年" value="4"></el-option>
</el-select>
</el-form-item>
<el-form-item label="稽核状态:" prop="confirmStatus" class="fromItem">
<el-select
v-model="ruleForm.confirmStatus"
placeholder="请选择"
clearable
>
<el-option label="未确认" value="0"></el-option>
<el-option label="未下发" value="1"></el-option>
<el-option label="已下发" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item class="button">
<el-button @click="submitForm()">
<img class="buttonIcon" src="../../assets/cx.png" />查询</el-button
>
<el-button @click="resetForm()">
<img class="buttonIcon" src="../../assets/cz.png" />重置</el-button
>
<el-button @click="detailsForm()">
<img class="buttonIcon" src="../../assets/ck.png" />详情</el-button
>
</el-form-item>
</el-form>
<div class="setscrollOut">
<el-table
@selection-change="handleSelectionChange"
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
header-cell-class-name="custom-th-background"
class="eltable"
:row-class-name="tableRowClassName"
border
>
<el-table-column label="序号" width="55" type="index">
</el-table-column>
<el-table-column type="selection"> </el-table-column>
<el-table-column label="稽核名称" prop="auditName"> </el-table-column>
<el-table-column prop="auditStartTime" label="稽核开始时间">
</el-table-column>
<el-table-column
prop="auditEndTime"
label="稽核结束时间"
show-overflow-tooltip
>
</el-table-column>
<!-- <el-table-column prop="confirmStatus" label="稽核状态">
</el-table-column> -->
<el-table-column prop="auditFrequencyText" label="稽核频率">
</el-table-column>
<el-table-column prop="abnormalResults" label="检查异常结果">
</el-table-column>
<el-table-column prop="auditEndTime" label="稽核时间">
</el-table-column>
</el-table>
</div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[10, 15, 20, 50]"
:page-size="100"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
class="elpagination"
>
</el-pagination>
<!-- 详情弹窗 -->
<el-dialog
title="稽核结果详情"
:visible.sync="dialog"
width="90%"
:modal-append-to-body="false"
:append-to-body="false"
>
<div class="dialog">
<el-form
:model="ruleFormdialogXQ"
label-width="100px"
class="demo-ruleForm"
>
<el-form-item label="稽核名称:" prop="auditName" class="fromItem">
<el-input v-model="ruleFormdialogXQ.auditName" disabled></el-input>
</el-form-item>
<el-form-item label="稽核时间:" class="fromItem" prop="dates">
<el-date-picker
@change="timeChange"
v-model="ruleFormdialogXQ.dates"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
disabled
></el-date-picker>
</el-form-item>
<el-form-item
label="稽核频率:"
prop="auditFrequency"
class="fromItem"
>
<el-select
v-model="ruleFormdialogXQ.auditFrequency"
placeholder="请选择"
disabled
>
<el-option label="仅一次" value="0"></el-option>
<el-option label="每周" value="1"></el-option>
<el-option label="每月" value="2"></el-option>
<el-option label="每季度" value="3"></el-option>
<el-option label="每年" value="4"></el-option>
</el-select>
</el-form-item>
</el-form>
<p class="zjBtn">稽核规则配置</p>
<div class="setscroll">
<el-table
:data="XQtableData"
tooltip-effect="dark"
style="width: 100%"
header-cell-class-name="custom-th-background"
class="eltable"
:row-class-name="tableRowClassName"
border
>
<el-table-column label="序号" width="55" type="index">
</el-table-column>
<el-table-column label="规则名称" width="auto" prop="ruleName">
</el-table-column>
<el-table-column prop="ruleType" label="规则类型" width="auto">
</el-table-column>
<el-table-column
prop="projectName"
label="稽核异常项目清单"
width="auto"
show-overflow-tooltip
>
</el-table-column>
</el-table>
</div>
<!-- <el-pagination
@size-change="handleSizeChangeXQ"
@current-change="handleCurrentChangeXQ"
:current-page="currentPageXQ"
:page-sizes="[5, 10, 15, 20]"
:page-size="100"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
class="elpagination"
>
</el-pagination> -->
<p class="midBtn">
<span @click="cancelXQ()">取消</span
><span @click="saveXZ()" v-show="false">保存</span>
</p>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { auditTasksResults, xqauditTasksResults } from "@/api/index";
export default { export default {
data(){ data() {
return{ return {
} listData: {},
showButton: true,
ruleForm: {
},
ruleFormdialogXQ: {},
currentPageXQ:'',
pageSizeXQ:'',
tableData: [],
checkedList: [],
currentPage: 1,
pageSize: 10,
total: 0,
dialog: false,
XQtableData: [],
};
},
mounted() {
this.submitForm();
},
methods: {
timeChange(time) {
if (time) {
//给后端的参数
this.ruleFormdialogAdd.auditStartTime = time[0];
this.ruleFormdialogAdd.auditEndTime = time[1];
}
},
async submitForm() {
let params = {
current: this.currentPage,
pageSize: this.pageSize,
};
Object.assign(params, this.ruleForm);
console.log(params);
let res = await auditTasksResults(params);
if (res.code == "200") {
this.tableData = res.data.records;
this.tableData.forEach((item) => {
if (item.auditFrequency == 0) {
this.$set(item, "auditFrequencyText", "仅一次");
} else if (item.auditFrequency == 1) {
this.$set(item, "auditFrequencyText", "每周");
} else if (item.auditFrequency == 2) {
this.$set(item, "auditFrequencyText", "每月");
} else if (item.auditFrequency == 3) {
this.$set(item, "auditFrequencyText", "每季度");
} else if (item.auditFrequency == 4) {
this.$set(item, "auditFrequencyText", "每年");
}
});
this.total = res.data.total * 1;
}
},
resetForm() {
this.$refs.formName.resetFields();
this.currentPage = 1;
this.pageSize = 10;
this.submitForm();
},
//详情
async detailsForm() {
if (this.checkedList.length != 1) {
this.$message("请选择");
return;
}
let params = {
current: this.currentPageXQ,
pageSize: this.pageSizeXQ,
auditId: this.checkedList[0].auditId,
};
let res = await xqauditTasksResults(params);
if (res.code == 200) {
this.ruleFormdialogXQ = this.checkedList[0];
this.ruleFormdialogXQ.dates = [
this.checkedList[0].auditStartTime,
this.checkedList[0].auditEndTime,
];
this.XQtableData = res.data.records;
console.log(this.XQtableData,'XQtableDataXQtableData')
this.dialog = true;
}
},
//表格颜色
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) {
return "warning-row";
}
return "";
},
//主列表选中行信息
handleSelectionChange(selection) {
if (Array.isArray(selection) && selection.length > 1) {
this.$refs.multipleTable.toggleRowSelection(selection[0], false);
this.$refs.multipleTable.toggleRowSelection(selection[1], true);
}
this.checkedList = this.$refs.multipleTable.selection;
this.ruleFormdialog = this.checkedList[0];
console.log(this.checkedList, "2222");
},
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
this.pageSize = val;
this.submitForm();
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.currentPage = val;
this.submitForm();
},
handleSizeChangeXQ(val) {
console.log(`每页 ${val} 条`);
this.pageSizeXQ = val;
this.detailsForm();
},
handleCurrentChangeXQ(val) {
console.log(`当前页: ${val}`);
this.currentPageXQ = val;
this.detailsForm();
},
cancelXQ() {
this.dialog = false;
},
}, },
mounted(){ };
</script>
<style scoped lang="scss">
.main {
font-size: 14px;
position: relative;
height: 100%;
width: 100%;
box-sizing: border-box;
overflow-x: hidden;
}
.el-form {
display: flex;
width: 100%;
flex-wrap: wrap;
border-top: 2px solid #23c6c8;
border-left: 1px solid #dee5e7;
border-right: 1px solid #dee5e7;
border-bottom: 1px solid #dee5e7;
padding: 20px 10px;
margin-bottom: 20px;
.fromItem {
min-width: 24%;
margin: 0 0.5%;
margin-bottom: 20px;
.el-input {
width: 226px;
}
.el-select {
width: 226px;
}
}
/deep/ .el-form-item__content {
text-align: left;
display: inline-block;
margin-left: 10px !important;
}
/deep/ .el-form-item__label {
font-weight: bold;
color: #000;
width: 160px !important;
}
.button {
display: inline-block;
width: 100%;
text-align: left;
/deep/ .el-form-item__content {
margin-left: 20px !important;
text-align: left;
img {
width: 14px;
height: 14px;
margin-right: 15px;
vertical-align: middle;
}
}
.el-button {
background-color: #23c6c8;
border-color: #23c6c8;
color: #fff;
}
}
}
.eltable {
width: 100%;
box-sizing: border-box;
}
/deep/ .el-table .warning-row {
background: #f0ffff;
// color: #2785e6;
}
.elpagination {
text-align: right;
margin-right: 100px;
}
/deep/ .el-dialog {
border-radius: 10px;
margin-top: 3vh !important;
margin-left: 3vw !important;
// height: 500px;
// box-sizing: border-box;
// overflow-y: auto;
}
/deep/ .el-dialog__wrapper {
position: absolute;
}
/deep/ .v-modal {
position: absolute;
}
/deep/ .el-dialog__header {
background-color: #0d867f;
// padding-bottom: 20px;
text-align: left;
border-radius: 10px 10px 0 0;
.el-dialog__title {
color: #fff;
}
}
/deep/ .el-table__header th {
background-color: #eeeeee;
font-weight: bold;
.cell {
color: #333;
} }
} }
</script>
<style lang="scss" scoped> /deep/.el-table {
#iframeId{
width: 100%; width: 100%;
height: 100vh; .el-table__header-wrapper table,
.el-table__body-wrapper table {
width: 100% !important;
}
.el-table__body,
.el-table__footer,
.el-table__header {
table-layout: auto;
}
} }
.dialog {
.title {
text-align: left;
font-size: 18px;
font-family: "PingFangSC-Regular", "PingFang SC", sans-serif;
font-weight: 400;
font-style: normal;
font-size: 16px;
color: #1ec695;
text-align: left;
height: 20px;
margin-top: 0;
span {
border-radius: 2px;
display: inline-block;
width: 5px;
height: 18px;
background-color: #1ec695;
margin-right: 14px;
vertical-align: middle;
}
}
.content {
width: 100%;
display: flex;
flex-wrap: wrap;
p {
width: 24%;
text-align: left;
display: flex;
label {
display: inline-block;
width: 150px;
flex-shrink: 0;
text-align: right;
font-weight: bold;
margin-right: 20px;
vertical-align: middle;
}
span {
display: inline-block;
text-align: left;
}
}
}
.table {
width: 100%;
display: flex;
p {
width: 150px;
text-align: right;
font-weight: bold;
}
.tablepg {
margin-top: 20px;
margin-left: 5px;
}
}
}
.textarea {
width: 100%;
.el-textarea {
width: 60%;
}
}
.Btn {
width: 200px;
margin: 0 auto;
span {
display: inline-block;
width: 80px;
height: 25px;
line-height: 25px;
text-align: center;
border-radius: 4px;
margin-right: 12px;
}
span:first-of-type {
border: 1px solid #000;
}
span:last-of-type {
background-color: #0d867f;
border: 1px solid #0d867f;
color: #fff;
}
}
/deep/ .el-dialog__headerbtn .el-dialog__close {
color: #fff;
}
/deep/.el-table th.el-table__cell.is-leaf,
.el-table td.el-table__cell {
text-align: center;
}
/deep/ .el-table__cell {
text-align: center;
}
h3 {
text-align: left;
}
/deep/.el-dialog__body {
padding: 0 10px;
h3 {
margin: 10px 0;
}
}
/deep/ .el-descriptions-item__container .el-descriptions-item__label {
font-weight: bold;
width: 100px;
text-align: right;
}
/deep/.el-tabs__content {
overflow: auto;
height: 500px;
padding-bottom: 20px;
}
.close {
width: 100%;
height: 40px;
line-height: 20px;
span {
display: inline-block;
width: 80px;
height: 30px;
line-height: 30px;
border: 1px solid grey;
border-radius: 5px;
}
}
.setscrollOut {
width: 100%;
height: 585px;
position: relative;
overflow: auto;
}
.setscrolldialog {
width: 100%;
height: 300px;
overflow: auto;
box-sizing: border-box;
/deep/ .el-table {
width: 96% !important;
height: 300px;
overflow: auto;
}
}
.dialog {
.el-form {
border: none !important;
border-top: none;
border-left: none;
border-right: none;
border-bottom: none;
}
}
.zjBtn {
width: 400px;
text-align: left;
vertical-align: middle;
span {
display: inline-block;
width: 140px;
height: 25px;
line-height: 25px;
text-align: center;
border-radius: 5px;
vertical-align: middle;
}
}
.midBtn {
margin: 0 auto;
height: 50px;
line-height: 50px;
span {
display: inline-block;
width: 80px;
height: 25px;
line-height: 25px;
text-align: center;
margin-right: 10px;
border-radius: 5px;
}
span:first-of-type {
border: 1px solid grey;
}
span:last-of-type {
background-color: #4ca6a7;
color: #fff;
}
}
.setscroll {
width: 100%;
height: 400px;
position: relative;
overflow: auto;
}
</style> </style>
\ No newline at end of file
<!-- 结果公示 --><template> <template>
<div> <div>
<pdf v-for="i in pageCount" <iframe src="http://192.168.91.1:18000/static/#/assessResult/release/notice" frameborder="0" style="width:100vw;height:100vh;" id="iframe" ></iframe>
:src="pdfSrc" </div>
</template>
:key="i + 'pdf'"
:page="i"
class="pdf-item"></pdf>
</div>
</template>
<script>
import pdf from 'vue-pdf'
export default {
data(){
return{
pageCount: 1,
// 缩放
scale: 100,
timer: null,
showPreviewFile: false,
pdfSrc:"http://arch-file.oss-cn-beijing.aliyuncs.com/arch-file/665994f479f6157c744951bd.pdf?Expires=1718011134&OSSAccessKeyId=LTAI5tGjidtvVSCvwGxTp8FH&Signature=blOuzxUwnotgqo7mxM9rShOEJ1I%3D"
}
},
components:{ pdf},
mounted(){
this.previewFile()
},
watch: {
pdfUrl: {
handler(newVal, oldVal) {
if (newVal) {
this.previewFile()
}
},
immediate: false
}
},
methods: {
/** pdf加载 */
async previewFile() {
try {
let loadingTask = pdf.createLoadingTask({
url: this.pdfUrl,
CMapReaderFactory
});
loadingTask.promise.then(pdf => {
this.pdfUrl = loadingTask
this.showPreviewFile = true;
this.pageCount = pdf.numPages;
}).catch((e) => {
console.log("pdf初始化错误", e);
Notify("文件初始化失败,请返回下载该文件查看")
})
} catch (e) {
this.$router.go(-1)
console.log("pdf加载出错了", e);
}
},
}
<script>
export default {
data(){
return{
} }
</script>
},
<style lang="scss" scoped> mounted(){
.process-fileView-pdf-container {
width: 100%;
height: 100%;
.pdf-item{
height: 100vh;
display: block !important;
}
.pdf-button-group {
position: fixed;
top: 10px;
right: 20px;
.btn-item {
width: 50px;
height: 50px;
border-radius: 100%;
}
.div-item {
margin-bottom: 8px;
}
::v-deep .van-button__text{
line-height: 20px;
}
}
} }
</style>
}
</script>
<style lang="scss" scoped>
#iframeId{
width: 100%;
height: 100vh;
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!