You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
suzhouyingjiPC/src/views/components/dialog/index.vue

664 lines
18 KiB

2 years ago
<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%"
>
2 years ago
<div class="dialog-slot">
<div class="closeClick">
<div class="newplan">
<div class="line"></div>
<div class="span">新增计划</div>
2 years ago
</div>
2 years ago
<img src="@/assets/images/close.png" alt="" @click="Close" />
2 years ago
</div>
2 years ago
<div class="content">
<div class="module">
<div class="select" :class="nextStep ? '' : 'nextStepSelect'">
<span class="span-one"></span>
<span>选择企业</span>
2 years ago
</div>
2 years ago
<div class="issue" :class="nextStep ? 'nextStepIssue' : ''">
<span class="span-one"></span>
<span>发布计划</span>
2 years ago
</div>
2 years ago
</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 class="select-btn select-btn1">导入</div>
2 years ago
</div>
2 years ago
<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="企业名称"
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 prop="is" label="是否重点" header-align="center">
<template slot-scope="scope">
<div
style="font-family: 'Alibaba PuHuiTi'"
@click="checkBox(scope.row)"
:class="scope.row.is == 1 ? 'isStyle' : ''"
>
<span v-if="scope.row.is == 1"></span>
<span v-if="scope.row.is == 2"></span>
</div>
</template>
</el-table-column>
<el-table-column prop="is" label="选择" header-align="center">
<template slot-scope="scope">
<div class="look" @click="chec(scope.row)">
<el-checkbox v-model="scope.row.is"></el-checkbox>
</div>
</template>
</el-table-column>
</el-table>
2 years ago
</div>
2 years ago
<div class="pagination">
<my-pagination
:total="28"
@pagesChange="pagesChange"
></my-pagination>
2 years ago
</div>
2 years ago
</div>
<div v-else class="release-planning">
<div class="inputs centered">
<div class="inputs-span">计划年份:</div>
<el-select v-model="form2.year" placeholder="请选择">
2 years ago
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
2 years ago
:value="item.value"
>
2 years ago
</el-option>
</el-select>
</div>
2 years ago
<div class="inputs centered">
<div class="inputs-span">计划标题:</div>
<div class="input">
<el-input
v-model="form2.title"
:maxlength="50"
placeholder="请输入计划标题"
></el-input>
</div>
2 years ago
</div>
2 years ago
<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>
2 years ago
</div>
2 years ago
<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>
2 years ago
</div>
</div>
2 years ago
<div class="next">
<div class="selected">
已选择<span>{{ selected }}</span
>家企业
</div>
<div
class="btn"
:class="nextStep ? 'selectBtn' : ''"
@click="next"
ref="next"
>
{{ nextText }}
2 years ago
</div>
</div>
</div>
</div>
</el-dialog>
</template>
<script>
2 years ago
import myPagination from "@/views/components/myPagination/index.vue";
2 years ago
export default {
2 years ago
components: { myPagination },
2 years ago
data() {
return {
2 years ago
dialogVisible: false,
tableData: [
{
date: "2016-05-03",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
is: 1,
},
{
date: "2016-05-02",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
is: 1,
},
{
date: "2016-05-04",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
is: 1,
},
{
date: "2016-05-01",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
is: 1,
},
{
date: "2016-05-08",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
is: 2,
},
{
date: "2016-05-06",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
is: 2,
},
{
date: "2016-05-07",
name: "王小虎",
is: 2,
address: "上海市普陀区金沙江路 1518 弄",
},
{
date: "2016-05-08",
name: "王小虎",
is: 2,
address: "上海市普陀区金沙江路 1518 弄",
},
{
date: "2016-05-06",
name: "王小虎",
is: 2,
address: "上海市普陀区金沙江路 1518 弄",
},
{
date: "2016-05-07",
name: "王小虎",
is: 2,
address: "上海市普陀区金沙江路 1518 弄",
},
],
options: [],
2 years ago
multipleSelection: [],
2 years ago
selected: 0,
nextStep: false,
nextText: "下一步",
form: {
compartment: "",
frimType: "",
economicsType: "",
industryType: "",
riskGrade: "",
frimColor: "",
frimName: "",
2 years ago
},
2 years ago
form2: {
year: "",
title: "",
content: "",
remark: "",
},
};
2 years ago
},
2 years ago
methods: {
checkBox(e){
},
open() {
2 years ago
this.dialogVisible = true;
},
2 years ago
Close() {
2 years ago
this.dialogVisible = false;
this.nextStep = false;
2 years ago
this.nextText = "下一步";
2 years ago
},
// 页码,当前页切换事件
2 years ago
pagesChange(pages) {
console.log(pages);
2 years ago
},
// 选中的数据
handleSelectionChange(val) {
this.multipleSelection = val;
this.selected = this.multipleSelection.length;
},
// 下一步
2 years ago
next() {
if (this.$refs.next.innerText == "下一步") {
2 years ago
this.nextStep = true;
2 years ago
this.nextText = "发布计划";
2 years ago
} else {
2 years ago
console.log(form2);
2 years ago
// console.log('该发布计划了')
}
},
2 years ago
tableRowClassName({ row, rowIndex }) {
2 years ago
if (rowIndex % 2 !== 0) {
2 years ago
return "success-row";
2 years ago
}
2 years ago
return "";
},
2 years ago
},
2 years ago
};
2 years ago
</script>
<style lang="scss" scoped>
2 years ago
.isStyle {
color: #f71052;
}
2 years ago
.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;
2 years ago
background-color: #e0eaf8;
2 years ago
img {
width: 18px;
height: 18px;
cursor: pointer;
}
.newplan {
display: flex;
align-items: center;
.line {
margin-right: 10px;
width: 5px;
height: 16px;
2 years ago
background-color: #1e70de;
2 years ago
}
.span {
font-size: 16px;
2 years ago
font-family: "Alibaba PuHuiTi";
2 years ago
font-weight: bold;
2 years ago
color: #1e70de;
2 years ago
}
}
}
.content {
// padding: 15px 10px;
.module {
padding-bottom: 15px;
display: flex;
2 years ago
border-bottom: 1px solid #e8ecf0;
.select,
.issue {
2 years ago
width: 150px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
color: #525966;
2 years ago
span {
font-size: 15px;
2 years ago
font-family: "Alibaba PuHuiTi";
2 years ago
font-weight: 400;
}
.span-one {
margin-right: 10px;
}
}
.select {
2 years ago
background-image: url("../../../assets/images/select2.png");
2 years ago
background-size: 100% 100%;
margin-right: 10px;
}
.issue {
2 years ago
background-image: url("../../../assets/images/issue2.png");
background-size: 100% 100%;
}
2 years ago
.nextStepSelect {
2 years ago
background-image: url("../../../assets/images/select1.png");
2 years ago
span {
2 years ago
color: #2378ec;
2 years ago
}
}
.nextStepIssue {
2 years ago
background-image: url("../../../assets/images/issue1.png");
2 years ago
span {
2 years ago
color: #2378ec;
2 years ago
}
}
}
.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;
2 years ago
font-family: "Alibaba PuHuiTi";
2 years ago
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;
2 years ago
.el-input
.el-input__suffix
.el-input__suffix-inner
.el-icon-arrow-up::before {
2 years ago
content: "";
2 years ago
background: url(../../../assets/images/down2.png) center center
no-repeat;
2 years ago
background-size: cover;
position: absolute;
width: 10px;
height: 7px;
2 years ago
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
}
.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;
2 years ago
width: 80px;
2 years ago
height: 33px;
2 years ago
background: #2378ec;
2 years ago
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
font-size: 15px;
font-family: Alibaba PuHuiTi;
font-weight: 500;
2 years ago
color: #ffffff;
2 years ago
cursor: pointer;
}
2 years ago
.select-btn1 {
background: #28b384;
}
2 years ago
}
.tables {
2 years ago
background-color: #eaf2fd;
2 years ago
::v-deep .el-table {
.success-row {
background-color: rgba(234, 242, 253, 0.25);
}
td {
height: 30px;
text-align: center;
font-size: 15px;
2 years ago
font-family: "Alibaba PuHuiTi";
2 years ago
font-weight: 400;
color: #525966;
}
th {
height: 30px;
2 years ago
background-color: #eaf2fd;
2 years ago
font-size: 16px;
2 years ago
font-family: "Alibaba PuHuiTi";
2 years ago
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;
2 years ago
font-family: "Alibaba PuHuiTi";
2 years ago
font-weight: 400;
color: #525966;
}
::v-deep .el-select {
background-color: transparent;
width: 190px;
.el-input__inner {
height: 33px;
}
// border-radius: 2px;
2 years ago
.el-input
.el-input__suffix
.el-input__suffix-inner
.el-icon-arrow-up::before {
2 years ago
content: "";
2 years ago
background: url(../../../assets/images/down2.png) center center
no-repeat;
2 years ago
background-size: cover;
position: absolute;
width: 10px;
height: 7px;
2 years ago
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
.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;
2 years ago
font-family: "Alibaba PuHuiTi";
2 years ago
font-weight: 400;
color: #525966;
margin-right: 15px;
span {
2 years ago
color: #2378ec;
2 years ago
}
}
.btn {
width: 150px;
height: 30px;
2 years ago
border: 1px solid #2378ec;
2 years ago
border-radius: 2px;
2 years ago
background-color: #eff6ff;
2 years ago
display: flex;
align-items: center;
justify-content: center;
font-size: 15px;
2 years ago
font-family: "Alibaba PuHuiTi";
2 years ago
font-weight: 400;
2 years ago
color: #2378ec;
2 years ago
cursor: pointer;
}
.selectBtn {
2 years ago
background-color: #2378ec;
color: #ffffff;
}
2 years ago
}
}
}
::v-deep .el-dialog__body {
padding: 30px 15px;
}
</style>