静态页面

lijinlong
吕天方 1 year ago
parent 1598198f4b
commit af75fde173

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before

Width:  |  Height:  |  Size: 481 B

After

Width:  |  Height:  |  Size: 481 B

Before

Width:  |  Height:  |  Size: 441 B

After

Width:  |  Height:  |  Size: 441 B

Before

Width:  |  Height:  |  Size: 805 B

After

Width:  |  Height:  |  Size: 805 B

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Before

Width:  |  Height:  |  Size: 839 B

After

Width:  |  Height:  |  Size: 839 B

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

@ -0,0 +1,4 @@
@font-face {
font-family: 'Alibaba PuHuiTi';
src: url('./fonts/Alibaba-PuHuiTi-Regular.ttf');
}

@ -5,6 +5,7 @@
@import "./sidebar.scss";
@import "./btn.scss";
@import "./diythem.scss";
@import "./fonts.scss";
body {
height: 100%;

@ -101,30 +101,30 @@ h6 {
padding: 10px 20px 0;
}
.el-table {
// min-height: 480px !important;
// overflow-y: auto;
.el-table__header-wrapper,
.el-table__fixed-header-wrapper {
th {
word-break: break-word;
background-color: #f8f8f9;
color: #515a6e;
height: 40px;
font-size: 13px;
}
}
.el-table__body-wrapper {
height: 430px !important;
overflow-y: auto;
.el-button [class*="el-icon-"]+span {
margin-left: 1px;
}
}
}
// .el-table {
// // min-height: 480px !important;
// // overflow-y: auto;
// .el-table__header-wrapper,
// .el-table__fixed-header-wrapper {
// th {
// word-break: break-word;
// background-color: #f8f8f9;
// color: #515a6e;
// height: 40px;
// font-size: 13px;
// }
// }
// .el-table__body-wrapper {
// height: 430px !important;
// overflow-y: auto;
// .el-button [class*="el-icon-"]+span {
// margin-left: 1px;
// }
// }
// }
/** 表单布局 **/
.form-header {

@ -1,11 +1,3 @@
/*
* @Descripttion:
* @version:
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527
* @LastEditTime: 2023-09-04 10:30:46
*/
module.exports = {
/**
* 侧边栏主题 深色主题theme-dark浅色主题theme-light

@ -0,0 +1,575 @@
<template>
<el-dialog
:visible.sync="dialogVisible"
:show-close="false"
:destroy-on-close="true"
:close-on-click-modal="false"
append-to-body
custom-class="dialog-boxed"
width="70%"
>
<div class="dialog-slot">
<div class="closeClick">
<div class="newplan">
<div class="line"></div>
<div class="span">新增计划</div>
</div>
<img src="@/assets/images/close.png" alt="" @click="Close">
</div>
<div class="content">
<div class="module">
<div class="select" :class="!nextStep ? 'nextStepSelect':''">
<span class="span-one"></span>
<span>选择企业</span>
</div>
<div class="issue" :class="nextStep ? 'nextStepIssue':''">
<span class="span-one"></span>
<span>发布计划</span>
</div>
</div>
<div v-if="!nextStep">
<div class="filtrate">
<div class="select-input">
<div class="select-span">行政区划:</div>
<el-select v-model="form.compartment" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<div class="select-input">
<div class="select-span">企业类型:</div>
<el-select v-model="form.frimType" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<div class="select-input">
<div class="select-span">经济类型:</div>
<el-select v-model="form.economicsType" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<div class="select-input">
<div class="select-span">行业类型:</div>
<el-select v-model="form.industryType" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<div class="select-input">
<div class="select-span">重大危险源等级:</div>
<el-select v-model="form.riskGrade" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<div class="select-input">
<div class="select-span">企业分色:</div>
<el-select v-model="form.frimColor" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<div class="input-input">
<el-input v-model="form.frimName" placeholder="请输入企业名称/统一信用代码"></el-input>
</div>
<div class="select-btn">搜索</div>
</div>
<div class="tables">
<el-table
:data="tableData"
style="width: 100%"
:border="false"
@selection-change="handleSelectionChange"
:row-class-name="tableRowClassName"
>
<el-table-column
type="selection"
width="55"
header-align="center"
>
</el-table-column>
<el-table-column
prop="date"
label="企业名称"
width="180"
header-align="center"
>
</el-table-column>
<el-table-column
prop="name"
label="行政区划"
width="180"
header-align="center"
>
</el-table-column>
<el-table-column
prop="address"
label="企业类型"
header-align="center"
>
</el-table-column>
<el-table-column
prop="address"
label="统一社会信用代码"
header-align="center"
>
</el-table-column>
</el-table>
</div>
<div class="pagination">
<my-pagination :total="28" @pagesChange="pagesChange"></my-pagination>
</div>
</div>
<div v-else="nextStep" class="release-planning">
<div class="inputs centered">
<div class="inputs-span">计划年份:</div>
<el-select v-model="form2.year" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<div class="inputs centered">
<div class="inputs-span">计划标题:</div>
<div class="input">
<el-input v-model="form2.title" :maxlength="50" placeholder="请输入计划标题"></el-input>
</div>
</div>
<div class="inputs">
<div class="inputs-span">计划内容:</div>
<div class="input">
<el-input v-model="form2.content" type="textarea" resize="none" placeholder="请输入计划内容"></el-input>
</div>
</div>
<div class="inputs">
<div class="inputs-span">备注:</div>
<div class="input">
<el-input v-model="form2.remark" type="textarea" resize="none" placeholder="请输入备注"></el-input>
</div>
</div>
</div>
<div class="next">
<div class="selected">已选择<span>{{ selected }}</span>家企业</div>
<div class="btn" @click="next" ref="next">{{ nextText }}</div>
</div>
</div>
</div>
</el-dialog>
</template>
<script>
import myPagination from "@/views/components/myPagination/index.vue"
export default {
components:{myPagination},
data() {
return {
dialogVisible:false,
tableData: [{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-08',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-06',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-07',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-08',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-06',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-07',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}],
options:[],
multipleSelection: [],
selected:0,
nextStep:false,
nextText:'下一步',
form:{
compartment:'',
frimType:'',
economicsType:'',
industryType:'',
riskGrade:'',
frimColor:'',
frimName:'',
},
form2:{
year:'',
title:'',
content:'',
remark:'',
}
}
},
methods:{
open(){
this.dialogVisible = true;
},
Close(){
this.dialogVisible = false;
this.nextStep = false;
this.nextText = '下一步';
},
//
pagesChange(pages){
console.log(pages)
},
//
handleSelectionChange(val) {
this.multipleSelection = val;
this.selected = this.multipleSelection.length;
},
//
next(){
if(this.$refs.next.innerText == '下一步') {
this.nextStep = true;
this.nextText = '发布计划'
} else {
console.log(form2)
// console.log('')
}
},
tableRowClassName({row, rowIndex}) {
if (rowIndex % 2 !== 0) {
return 'success-row';
}
return '';
}
},
}
</script>
<style lang="scss" scoped>
.dialog-slot {
.closeClick {
position: absolute;
top: 0;
right: 0;
padding: 10px 20px;
width: 100%;
z-index: 1000;
display: flex;
justify-content: space-between;
align-items: center;
text-align: center;
background: #f8f9fa;
box-shadow: 0px 1px 0px 0px #dbe0e8;
background-color: #E0EAF8;
img {
width: 18px;
height: 18px;
cursor: pointer;
}
.newplan {
display: flex;
align-items: center;
.line {
margin-right: 10px;
width: 5px;
height: 16px;
background-color: #1E70DE;
}
.span {
font-size: 16px;
font-family: 'Alibaba PuHuiTi';
font-weight: bold;
color: #1E70DE;
}
}
}
.content {
// padding: 15px 10px;
.module {
padding-bottom: 15px;
display: flex;
border-bottom: 1px solid #E8ECF0;
.select,.issue {
width: 150px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
span {
font-size: 15px;
font-family: 'Alibaba PuHuiTi';
font-weight: 400;
}
.span-one {
margin-right: 10px;
}
}
.select {
background-image: url('../../../assets/images/select1.png');
background-size: 100% 100%;
margin-right: 10px;
}
.nextStepSelect {
// background-image: url('../../../assets/images/select2.png');
span {
color: #2378EC;
}
}
.nextStepIssue {
// background-image: url('../../../assets/images/issue1.png');
span {
color: #2378EC;
}
}
.issue {
background-image: url('../../../assets/images/issue2.png');
background-size: 100% 100%;
}
}
.filtrate {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
padding-bottom: 10px;
.select-input {
// margin-right: 10px;
margin-top: 20px;
display: flex;
align-items: center;
.select-span {
font-size: 13px;
font-family: 'Alibaba PuHuiTi';
font-weight: 400;
color: #525966;
line-height: 40px;
margin-right: 10px;
}
::v-deep .el-select {
background-color: transparent;
width: 180px;
.el-input__inner {
height: 33px;
}
// border-radius: 2px;
.el-input .el-input__suffix .el-input__suffix-inner .el-icon-arrow-up::before {
content: "";
background: url(../../../assets/images/down2.png) center center no-repeat;
background-size: cover;
position: absolute;
width: 14px;
height: 10px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.el-input__suffix .el-input__suffix-inner .el-select__caret {
width: 22px;
}
.el-input__suffix {
margin-right: 5px;
}
}
}
.input-input {
margin: 20px 40px 0 0;
width: 250px;
::v-deep .el-input {
.el-input__inner {
height: 33px;
}
}
}
.select-btn {
margin: 20px 0 0 0;
width: 140px;
height: 33px;
background: #2378EC;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
font-size: 15px;
font-family: Alibaba PuHuiTi;
font-weight: 500;
color: #FFFFFF;
cursor: pointer;
}
}
.tables {
background-color: #EAF2FD;
::v-deep .el-table {
.success-row {
background-color: rgba(234, 242, 253, 0.25);
}
td {
height: 30px;
text-align: center;
font-size: 15px;
font-family: 'Alibaba PuHuiTi';
font-weight: 400;
color: #525966;
}
th {
height: 30px;
background-color: #EAF2FD;
font-size: 16px;
font-family: 'Alibaba PuHuiTi';
font-weight: bold;
color: #525966;
.el-checkbox {
display: none;
}
}
.el-table__body-wrapper {
height: 448px !important;
overflow-y: auto;
}
}
::v-deep .el-table::before {
height: 0;
}
}
.pagination {
margin-top: 10px;
}
.release-planning {
padding: 0 10px 0 0;
.inputs {
display: flex;
margin-top: 20px;
.inputs-span {
width: 80px;
text-align: right;
margin-right: 10px;
font-size: 15px;
font-family: 'Alibaba PuHuiTi';
font-weight: 400;
color: #525966;
}
::v-deep .el-select {
background-color: transparent;
width: 190px;
.el-input__inner {
height: 33px;
}
// border-radius: 2px;
.el-input .el-input__suffix .el-input__suffix-inner .el-icon-arrow-up::before {
content: "";
background: url(../../../assets/images/down2.png) center center no-repeat;
background-size: cover;
position: absolute;
width: 14px;
height: 10px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.el-input__suffix .el-input__suffix-inner .el-select__caret {
width: 22px;
}
.el-input__suffix {
margin-right: 5px;
}
}
.input {
flex: 1;
::v-deep .el-textarea {
height: 180px;
.el-textarea__inner {
height: 100%;
}
}
}
}
.centered {
align-items: center;
}
}
.next {
display: flex;
justify-content: center;
align-items: center;
margin-top: 10px;
.selected {
display: flex;
align-items: center;
font-size: 15px;
font-family: 'Alibaba PuHuiTi';
font-weight: 400;
color: #525966;
margin-right: 15px;
span {
color: #2378EC;
}
}
.btn {
width: 150px;
height: 30px;
border: 1px solid #2378EC;
border-radius: 2px;
background-color: #EFF6FF;
display: flex;
align-items: center;
justify-content: center;
font-size: 15px;
font-family: 'Alibaba PuHuiTi';
font-weight: 400;
color: #2378EC;
cursor: pointer;
}
}
}
}
::v-deep .el-dialog__body {
padding: 30px 15px;
}
</style>

@ -0,0 +1,108 @@
<!--
* @Descripttion:
* @version:
* @Author: JC9527
* @Date: 2023-09-04 13:11:33
* @LastEditors: JC9527
* @LastEditTime: 2023-09-04 15:41:07
-->
<template>
<div class="pagination">
<span class="custom"
>{{ total }}显示{{
total == 0
? "0"
: current == 1
? "1"
: size * (current - 1) + 1
}}-{{ numberMap() }}</span
>
<el-pagination
background
:small="true"
:page-sizes="[10, 15]"
:total="total"
layout=" prev, pager, next, sizes, jumper"
@current-change="currentChange"
@size-change="sizeChange"
:current-page.sync="current"
:page-size.sync="size"
>
</el-pagination>
</div>
</template>
<script>
export default {
data() {
return {
current:1,
size:10,
}
},
props:{
total:{
type:Number,
required:true
},
},
methods:{
currentChange(e) {
this.current = e;
this.$emit('pagesChange',{size:this.size,current:e})
},
//
sizeChange(e) {
this.size = e;
this.current = 1;
this.$emit('pagesChange',{size:e,current:this.current})
},
//
numberMap() {
// if (this.total == this.tableData.length) {
// return this.total;
// } else
if (
this.total >
this.current * this.size
) {
return this.current * this.size;
} else if (
this.total < this.current * this.size ||
this.total == this.current * this.size
) {
return this.total;
}
},
},
mounted() {
document.getElementsByClassName(
"el-pagination__jump"
)[0].childNodes[0].nodeValue = "跳至";
},
}
</script>
<style lang="scss" scoped>
.pagination {
// margin-top: vh(20);
display: flex;
align-items: center;
justify-content: flex-end;
// padding-bottom: vh(20);
::v-deep .el-pagination__jump {
margin: 0;
}
::v-deep .el-input--mini .el-input__inner {
height: 23px;
line-height: 23px;
}
::v-deep .el-input--mini .el-input__icon {
line-height: 23px;
}
.custom {
font-size: 12px;
font-family: Alibaba PuHuiTi;
font-weight: 400;
color: #525966;
}
}
</style>

File diff suppressed because it is too large Load Diff

@ -1,601 +0,0 @@
<template>
<div class="container-main" ref="main">
<div class="search-hearder" ref="topSearch">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="auto"
>
<el-form-item label="区域" prop="area">
<el-input
v-model="queryParams.area"
placeholder="请输入区域"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="年月" prop="datetime">
<el-input
v-model="queryParams.datetime"
placeholder="请输入年月"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
</div>
<div class="layui-table-tool" ref="tableTool">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" size="mini" @click="handleAdd"
>新增</el-button
>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除</el-button
>
</el-col> -->
<el-col :span="1.5">
<el-button type="success" size="mini" @click="importHcheck()">
导入
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
size="mini"
:loading="exportLoading"
@click="handleExport"
>导出</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
</div>
<el-table
v-loading="loading"
:data="hcheckList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="编号" align="center" prop="id" />
<el-table-column label="区域" align="center" prop="area" />
<el-table-column label="合计" align="center" prop="total" />
<el-table-column label="待完成" align="center" prop="processing" />
<el-table-column label="已完成" align="center" prop="completed" />
<el-table-column label="超时未完成" align="center" prop="timedOut" />
<el-table-column label="完成率" align="center" prop="completionRate" />
<el-table-column label="年月" align="center" prop="datetime" />
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200"
>
<template slot-scope="scope">
<el-button
size="mini"
icon="el-icon-view"
@click="handleInfo(scope.row)"
>
查看
</el-button>
<el-button
size="mini"
icon="el-icon-edit"
type="primary"
@click="handleUpdate(scope.row)"
>修改</el-button
>
<el-button
size="mini"
icon="el-icon-delete"
type="danger"
@click="handleDelete(scope.row)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改巡查工单对话框 -->
<el-dialog
:visible.sync="open"
width="1200px"
append-to-body
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">
{{ title }}
</div>
<el-form ref="form" :model="form" :rules="rules" label-width="auto">
<el-row>
<el-col :span="12"
><el-form-item label="区域" prop="area">
<el-input v-model="form.area" placeholder="请输入区域" />
</el-form-item>
</el-col>
<el-col :span="12"
><el-form-item label="合计" prop="total">
<el-input v-model="form.total" placeholder="请输入合计" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="待完成" prop="processing">
<el-input v-model="form.processing" placeholder="请输入待完成" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="已完成" prop="completed">
<el-input v-model="form.completed" placeholder="请输入已完成" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="超时未完成" prop="timedOut">
<el-input
v-model="form.timedOut"
placeholder="请输入超时未完成"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="完成率" prop="completionRate">
<el-input
v-model="form.completionRate"
placeholder="请输入完成率"
/>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="年月" prop="datetime">
<el-input v-model="form.datetime" placeholder="请输入年月" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!--查看巡查工单详情页-->
<el-dialog
:visible.sync="infoOpen"
width="1200px"
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">{{ infoTitle }}</div>
<div class="info_box">
<el-descriptions :column="2" border>
<el-descriptions-item label="区域">{{
form.area
}}</el-descriptions-item>
<el-descriptions-item label="合计">{{
form.total
}}</el-descriptions-item>
<el-descriptions-item label="待完成">{{
form.processing
}}</el-descriptions-item>
<el-descriptions-item label="已完成">{{
form.completed
}}</el-descriptions-item>
<el-descriptions-item label="超时未完成">{{
form.timedOut
}}</el-descriptions-item>
<el-descriptions-item label="完成率">{{
form.completionRate
}}</el-descriptions-item>
<el-descriptions-item label="年月">{{
form.datetime
}}</el-descriptions-item>
</el-descriptions>
</div>
</el-dialog>
<!-- 导入弹窗 -->
<el-dialog
:visible.sync="fileOpen"
width="500px"
append-to-body
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">导入文件</div>
<el-form
ref="formFiles"
:model="fileQuery"
:rules="filesRules"
label-width="70px"
class="dialog-from"
>
<el-form-item label="日期:" prop="date">
<el-date-picker
v-model="fileQuery.date"
type="month"
placeholder="选择日期"
value-format="yyyy-MM"
>
</el-date-picker>
</el-form-item>
<el-form-item label="文件:" prop="file">
<el-upload
:multiple="false"
:show-file-list="true"
class="upload-demo"
ref="upload"
action="a"
:http-request="httpRequest"
:limit="1"
:file-list="fileList"
>
<el-button type="primary">选择文件</el-button>
</el-upload>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitImport"> </el-button>
<el-button @click="cancelImport"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
listHcheck,
getHcheck,
delHcheck,
addHcheck,
updateHcheck,
exportHcheck,
importHcheckTable,
} from "@/api/mudu/hcheck";
export default {
name: "Hcheck",
//
data() {
return {
//
infoOpen: false,
//
infoTitle: "",
//
loading: true,
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
hcheckList: [],
//
title: "",
//
open: false,
fileOpen: false,
fileQuery: {
date: null,
file: null,
},
filesRules: {
date: { required: true, message: "请选择日期", trigger: "change" },
file: { required: true, message: "请选择文件", trigger: "change" },
},
fileList: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
area: null,
datetime: null,
},
//
form: {},
//
//
rules: {
area: [{ required: true, message: "区域不能为空", trigger: "change" }],
total: [
{ required: true, message: "合计不能为空", trigger: "change" },
{
type: "number",
message: "请输入正确的合计",
trigger: "change",
},
],
processing: [
{ required: true, message: "待完成不能为空", trigger: "change" },
{
type: "number",
message: "请输入正确的待完成",
trigger: "change",
},
],
completed: [
{ required: true, message: "已完成不能为空", trigger: "change" },
{
type: "number",
message: "请输入正确的已完成",
trigger: "change",
},
],
timedOut: [
{ required: true, message: "超时未完成不能为空", trigger: "change" },
{
type: "number",
message: "请输入正确的超时未完成",
trigger: "change",
},
],
completionRate: [
{ required: true, message: "完成率不能为空", trigger: "change" },
],
datetime: [
{ required: true, message: "年月不能为空", trigger: "change" },
],
},
};
},
created() {
this.getList();
},
methods: {
httpRequest(require) {
this.fileQuery.file = require.file;
},
importHcheck() {
this.fileOpen = true;
this.resetFile();
},
cancelImport() {
this.resetFile();
this.fileOpen = false;
},
resetFile() {
this.fileQuery = {
date: null,
file: null,
};
this.fileList = [];
},
submitImport() {
this.$refs.formFiles.validate((valid) => {
if (valid) {
var form1 = new FormData();
form1.append("date", this.fileQuery.date);
form1.append("file", this.fileQuery.file);
importHcheckTable(form1)
.then((response) => {
if (response.code == 200) {
this.$model.msgSuccess(response.msg);
this.getList();
}
this.fileOpen = false;
})
.catch((res) => {
this.$model.msgError("导入失败,请检查文件");
});
}
});
},
/** 查询巡查工单列表 */
getList() {
this.loading = true;
listHcheck(this.queryParams).then((response) => {
this.hcheckList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
area: null,
total: null,
processing: null,
completed: null,
timedOut: null,
completionRate: null,
datetime: null,
createId: null,
createBy: null,
createTime: null,
updateId: null,
updateBy: null,
updateTime: null,
remark: null,
userId: null,
deptId: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/**查看按钮操作 */
handleInfo(row) {
this.reset();
const id = row.id || this.ids;
getHcheck(id).then((response) => {
this.form = response.data;
this.infoOpen = true;
this.infoTitle = "查看巡查工单详情";
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加巡查工单";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getHcheck(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改巡查工单";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateHcheck(this.form).then((response) => {
this.$model.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addHcheck(this.form).then((response) => {
this.$model.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm(
'是否确认删除巡查工单编号为"' + ids + '"的数据项?',
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(function () {
return delHcheck(ids);
})
.then(() => {
this.getList();
this.$model.msgSuccess("删除成功");
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有巡查工单数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.download(
"/mudu/hcheck/export",
{
...this.queryParams,
},
"巡查工单_" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false;
})
.catch(() => {});
},
},
};
</script>

@ -1,116 +1,374 @@
<template>
<div class="container-main" ref="main">
<div class="tabClassHeader">
<div
class="tabItems"
:class="changeNum == index ? 'color1' : 'color2'"
v-for="(item, index) in options"
:key="item.id"
@click="handoff(item)"
>
{{ item.name }}
<div class="filtrate">
<div class="one-line">
<div class="select-input">
<div class="select-span">行政区划:</div>
<el-select v-model="form.compartment" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<div class="select-input">
<div class="select-span">企业类型:</div>
<el-select v-model="form.frimType" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<div class="select-input">
<div class="select-span">经济类型:</div>
<el-select v-model="form.economicsType" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<div class="select-input">
<div class="select-span">行业类型:</div>
<el-select v-model="form.industryType" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
</div>
<div class="two-line">
<div class="two-line-left">
<div class="select-input">
<div class="select-span">重大危险源等级:</div>
<el-select v-model="form.riskGrade" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<div class="select-input">
<div class="select-span">企业分色:</div>
<el-select v-model="form.frimColor" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</div>
<div class="input-input">
<div class="select-span">企业名称/统一社会信用代码:</div>
<el-input v-model="form.frimName" placeholder="请输入企业名称/统一社会信用代码"></el-input>
</div>
</div>
<div class="select-btn">搜索</div>
</div>
</div>
<div v-if="changeNum == 0">
<xuncha></xuncha>
<div class="tables">
<el-table
:data="tableData"
style="width: 100%"
:border="false"
:row-class-name="tableRowClassName"
>
<el-table-column
prop="date"
label="企业名称"
width="180"
header-align="center"
>
</el-table-column>
<el-table-column
prop="name"
label="行政区划"
width="180"
header-align="center"
>
</el-table-column>
<el-table-column
prop="address"
label="企业类型"
header-align="center"
>
</el-table-column>
<el-table-column
prop="address"
label="统一社会信用代码"
header-align="center"
>
</el-table-column>
<el-table-column
label="操作"
header-align="center"
>
<template slot-scope="scope">
<div class="tabs-btns">
<div class="look" @click="look(scope.row)">
<img src="@/assets/images/lookInfo.png" alt="">
<span>查看详情</span>
</div>
</div>
</template>
</el-table-column>
</el-table>
</div>
<div v-if="changeNum == 1">
<yinhuan></yinhuan>
<div class="pagination">
<my-pagination :total="28" @pagesChange="pagesChange"></my-pagination>
</div>
</div>
</template>
<script>
import yinhuan from "../trouble/index";
import xuncha from "../hcheck/index.vue";
import myPagination from "@/views/components/myPagination/index.vue"
export default {
components:{myPagination},
name: "Order",
//
data() {
return {
options: [
{
id: 0,
name: "巡查工单",
},
{
id: 1,
name: "隐患工单",
},
],
changeNum: 0,
tableData: [{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-08',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-06',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-07',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-08',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-06',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-07',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}],
form:{
compartment:'',
frimType:'',
economicsType:'',
industryType:'',
riskGrade:'',
frimColor:'',
frimName:'',
},
options:[],
};
},
created() {},
components: {
yinhuan,
xuncha,
},
methods: {
handoff(item) {
this.changeNum = item.id;
tableRowClassName({row, rowIndex}) {
if (rowIndex % 2 !== 0) {
return 'success-row';
}
return '';
},
//
pagesChange(pages){
console.log(pages)
},
},
};
</script>
<style lang="scss" scoped>
.container-main {
height: calc(100vh - 84px);
// height: calc(100vh - 84px);
// height: 100%;
overflow: hidden;
padding: 0 10px;
}
::v-deep .el-descriptions-row th {
background: #f5f5f5;
color: #333;
font-weight: bold !important;
width: 16% !important;
}
::v-deep .el-descriptions-row td {
width: 34% !important;
}
.layui-table-tool {
display: flex;
}
::v-deep .upload-demo {
margin: 0 8px;
}
::v-deep .el-date-editor.el-input {
width: 50%;
}
::v-deep .el-select {
width: 50%;
}
::v-deep .upload-demo {
margin: 0;
}
.tabClassHeader {
border-bottom: 1px solid #dce3ec;
margin: 10px 0;
display: flex;
.tabItems {
width: 100px;
height: 25px;
border-radius: 10px 10px 0px 0px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
margin-right: 10px;
font-size: 13px;
cursor: pointer;
.filtrate {
// display: flex;
// align-items: center;
// justify-content: space-between;
// flex-wrap: wrap;
padding-bottom: 10px;
.one-line,.two-line {
display: flex;
align-items: center;
justify-content: space-between;
.two-line-left {
display: flex;
align-items: center;
justify-content: space-between;
padding-right: 50px;
width: 88%;
.input-input {
margin: 10px 0 0 0;
width: 455px;
display: flex;
align-items: center;
.select-span {
font-size: 14px;
font-family: 'Alibaba PuHuiTi';
font-weight: 400;
color: #525966;
line-height: 40px;
margin-right: 10px;
}
::v-deep .el-input {
flex: 1;
.el-input__inner {
height: 33px;
}
}
}
}
.select-btn {
margin: 10px 0 0 0;
width: 140px;
height: 33px;
background: #2378EC;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
font-size: 15px;
font-family: Alibaba PuHuiTi;
font-weight: 500;
color: #FFFFFF;
cursor: pointer;
}
}
// .two-line {
// display: flex;
// align-items: center;
// justify-content: space-between;
// }
.select-input {
// margin-right: 10px;
margin-top: 10px;
display: flex;
align-items: center;
.select-span {
font-size: 14px;
font-family: 'Alibaba PuHuiTi';
font-weight: 400;
color: #525966;
line-height: 40px;
margin-right: 10px;
}
::v-deep .el-select {
background-color: transparent;
width: 210px;
.el-input__inner {
height: 33px;
}
// border-radius: 2px;
.el-input .el-input__suffix .el-input__suffix-inner .el-icon-arrow-up::before {
content: "";
background: url(../../../assets/images/down2.png) center center no-repeat;
background-size: cover;
position: absolute;
width: 14px;
height: 10px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.el-input__suffix .el-input__suffix-inner .el-select__caret {
width: 22px;
}
.el-input__suffix {
margin-right: 5px;
}
}
}
}
.color1 {
background: linear-gradient(180deg, #3976f1 0%, #79a5fe 100%);
.tables {
background-color: #EAF2FD;
.tabs-btns {
display: flex;
align-items: center;
justify-content: center;
.look {
display: flex;
align-items: center;
cursor: pointer;
img {
width: 20px;
margin-right: 5px;
}
span {
font-size: 15px;
font-family: Alibaba PuHuiTi;
font-weight: 400;
color: #045FFD;
}
}
}
::v-deep .el-table {
.success-row {
background-color: rgba(234, 242, 253, 0.25);
}
td {
height: 45px;
text-align: center;
font-size: 14px;
font-family: 'Alibaba PuHuiTi';
font-weight: 400;
color: #525966;
}
th {
height: 42px;
background-color: #EAF2FD;
font-size: 15px;
font-family: 'Alibaba PuHuiTi';
font-weight: bold;
color: #525966;
.el-checkbox {
display: none;
}
}
.el-table__body-wrapper {
height: 450px !important;
overflow-y: auto;
}
}
::v-deep .el-table::before {
height: 0;
}
}
.color2 {
background: #f8f9f9;
border: 1px solid #dce3ec;
border-bottom: none;
color: #313332;
.pagination {
margin-top: 10px;
}
}
::v-deep .el-table .el-table__body-wrapper {
height: 350px !important;
}
</style>

File diff suppressed because it is too large Load Diff

@ -1,578 +0,0 @@
<template>
<div class="container-main" ref="main">
<div class="search-hearder" ref="topSearch">
<el-form
:model="queryParams"
ref="queryForm"
:inline="true"
v-show="showSearch"
label-width="auto"
>
<el-form-item label="区域" prop="area">
<el-input
v-model="queryParams.area"
placeholder="请输入区域"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="年月" prop="datetime">
<el-input
v-model="queryParams.datetime"
placeholder="请输入年月"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
</div>
<div class="layui-table-tool" ref="tableTool">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" size="mini" @click="handleAdd"
>新增</el-button
>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
>修改</el-button
>
</el-col> -->
<!-- <el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除</el-button
>
</el-col> -->
<el-col :span="1.5">
<el-button type="success" size="mini" @click="importTrouble()">
导入
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
size="mini"
:loading="exportLoading"
@click="handleExport"
>导出</el-button
>
</el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
</div>
<el-table
v-loading="loading"
:data="troubleList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="编号" align="center" prop="id" />
<el-table-column label="区域" align="center" prop="area" />
<el-table-column label="工单总数" align="center" prop="total" />
<el-table-column label="处理中" align="center" prop="processing" />
<el-table-column label="已完成" align="center" prop="completed" />
<el-table-column label="完成率" align="center" prop="completionRate" />
<el-table-column label="年月" align="center" prop="datetime" />
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200"
>
<template slot-scope="scope">
<el-button
size="mini"
icon="el-icon-view"
@click="handleInfo(scope.row)"
>
查看
</el-button>
<el-button
size="mini"
type="primary"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button
>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改隐患工单对话框 -->
<el-dialog
:visible.sync="open"
width="1200px"
append-to-body
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">
{{ title }}
</div>
<el-form ref="form" :model="form" :rules="rules" label-width="auto">
<el-row>
<el-col :span="12">
<el-form-item label="区域" prop="area">
<el-input v-model="form.area" placeholder="请输入区域" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="工单总数" prop="total">
<el-input v-model="form.total" placeholder="请输入工单总数" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="处理中" prop="processing">
<el-input v-model="form.processing" placeholder="请输入处理中" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="已完成" prop="completed">
<el-input v-model="form.completed" placeholder="请输入已完成" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="完成率" prop="completionRate">
<el-input
v-model="form.completionRate"
placeholder="请输入完成率"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="年月" prop="datetime">
<el-input v-model="form.datetime" placeholder="请输入年月" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!--查看隐患工单详情页-->
<el-dialog
:visible.sync="infoOpen"
width="1200px"
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">{{ infoTitle }}</div>
<div class="info_box">
<el-descriptions :column="2" border>
<el-descriptions-item label="区域">
{{ form.area }}
</el-descriptions-item>
<el-descriptions-item label="工单总数">
{{ form.total }}
</el-descriptions-item>
<el-descriptions-item label="处理中">
{{ form.processing }}
</el-descriptions-item>
<el-descriptions-item label="已完成">
{{ form.completed }}
</el-descriptions-item>
<el-descriptions-item label="完成率">
{{ form.completionRate }}
</el-descriptions-item>
<el-descriptions-item label="年月">
{{ form.datetime }}
</el-descriptions-item>
</el-descriptions>
</div>
</el-dialog>
<!-- 导入弹窗 -->
<el-dialog
:visible.sync="fileOpen"
width="500px"
append-to-body
custom-class="dialog-box"
>
<div slot="title" class="dialog-title">导入文件</div>
<el-form
ref="formFiles"
:model="fileQuery"
:rules="filesRules"
label-width="70px"
class="dialog-from"
>
<el-form-item label="日期:" prop="date">
<el-date-picker
v-model="fileQuery.date"
type="month"
placeholder="选择日期"
value-format="yyyy-MM"
>
</el-date-picker>
</el-form-item>
<el-form-item label="文件:" prop="file">
<el-upload
:multiple="false"
:show-file-list="true"
class="upload-demo"
ref="upload"
action="a"
:http-request="httpRequest"
:limit="1"
:file-list="fileList"
>
<el-button type="primary">选择文件</el-button>
</el-upload>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitImport"> </el-button>
<el-button @click="cancelImport"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
listTrouble,
getTrouble,
delTrouble,
addTrouble,
updateTrouble,
exportTrouble,
importTroubleTable,
} from "@/api/mudu/trouble";
export default {
name: "Trouble",
//
data() {
return {
//
infoOpen: false,
//
infoTitle: "",
//
loading: true,
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
troubleList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
area: null,
datetime: null,
},
fileOpen: false,
fileQuery: {
date: null,
file: null,
},
filesRules: {
date: { required: true, message: "请选择日期", trigger: "change" },
file: { required: true, message: "请选择文件", trigger: "change" },
},
fileList: [],
//
form: {},
//
rules: {
area: [{ required: true, message: "区域不能为空", trigger: "change" }],
total: [
{ required: true, message: "工单总数不能为空", trigger: "change" },
{
type: "number",
message: "请输入正确的工单总数",
trigger: "change",
},
],
processing: [
{ required: true, message: "处理中不能为空", trigger: "change" },
{
type: "number",
message: "请输入正确的处理中",
trigger: "change",
},
],
completed: [
{ required: true, message: "已完成不能为空", trigger: "change" },
{
type: "number",
message: "请输入正确的已完成",
trigger: "change",
},
],
completionRate: [
{ required: true, message: "完成率不能为空", trigger: "change" },
],
datetime: [
{ required: true, message: "年月不能为空", trigger: "change" },
],
},
};
},
created() {
this.getList();
},
methods: {
httpRequest(require) {
this.fileQuery.file = require.file;
},
importTrouble() {
this.fileOpen = true;
this.resetFile();
},
cancelImport() {
this.resetFile();
this.fileOpen = false;
},
resetFile() {
this.fileQuery = {
date: null,
file: null,
};
this.fileList = [];
},
submitImport() {
this.$refs.formFiles.validate((valid) => {
if (valid) {
var form1 = new FormData();
form1.append("date", this.fileQuery.date);
form1.append("file", this.fileQuery.file);
importTroubleTable(form1)
.then((response) => {
if (response.code == 200) {
this.$model.msgSuccess(response.msg);
this.getList();
}
this.fileOpen = false;
})
.catch((res) => {
this.$model.msgError("导入失败,请检查文件");
});
}
});
},
/** 查询隐患工单列表 */
getList() {
this.loading = true;
listTrouble(this.queryParams).then((response) => {
this.troubleList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
area: null,
total: null,
processing: null,
completed: null,
completionRate: null,
datetime: null,
createId: null,
createBy: null,
createTime: null,
updateId: null,
updateBy: null,
updateTime: null,
remark: null,
userId: null,
deptId: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/**查看按钮操作 */
handleInfo(row) {
this.reset();
const id = row.id || this.ids;
getTrouble(id).then((response) => {
this.form = response.data;
this.infoOpen = true;
this.infoTitle = "查看隐患工单详情";
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加隐患工单";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getTrouble(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改隐患工单";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateTrouble(this.form).then((response) => {
this.$model.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addTrouble(this.form).then((response) => {
this.$model.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$confirm(
'是否确认删除隐患工单编号为"' + ids + '"的数据项?',
"警告",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}
)
.then(function () {
return delTrouble(ids);
})
.then(() => {
this.getList();
this.$model.msgSuccess("删除成功");
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有隐患工单数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.download(
"/mudu/trouble/export",
{
...this.queryParams,
},
"隐患工单_" + new Date().getTime() + ".xlsx"
);
this.exportLoading = false;
})
.catch(() => {});
},
},
};
</script>

@ -7,7 +7,7 @@ function resolve(dir) {
const CompressionPlugin = require("compression-webpack-plugin");
const name = process.env.VUE_APP_TITLE || "木渎二期管理系统"; // 网页标题
const name = process.env.VUE_APP_TITLE || "苏州应急执法计划管理系统"; // 网页标题
const port = process.env.port || process.env.npm_config_port || 80; // 端口

Loading…
Cancel
Save