2024-05-14 18:16:17 +08:00

1312 lines
41 KiB
Vue

<template>
<div class="plan-form" :class="{ dark: styleType == 2 }">
<div style="height: 100%">
<vue-scroll>
<div class="wrap">
<div class="left">
<div class="info">
<div class="box-title">
基本信息
</div>
<el-form class="form-box" :model="addForm">
<el-form-item
label="危大工程名称:"
required
:label-width="formLabelWidth"
>
<el-input
v-model="addForm.engineeringName"
placeholder="请输入危大工程名称"
autocomplete="off"
></el-input>
</el-form-item>
<el-form-item
label="危大工程类别:"
required
:label-width="formLabelWidth"
>
<el-select
v-model="addForm.engineeringTypeId"
@change="changeType"
placeholder="请选择危大工程类别"
>
<el-option
v-for="item in typeOptions"
:key="item.id"
:label="item.typeName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="危大工程概况:"
:label-width="formLabelWidth"
>
<el-input
v-model="addForm.engineeringSurvey"
:disabled="isDisabled"
placeholder="请输入危大工程概况"
autocomplete="off"
></el-input>
</el-form-item>
<el-form-item
label="类别描述:"
required
:label-width="formLabelWidth"
>
<!-- <el-select v-model="addForm.typeDescribeId" @change="changeDescribe" placeholder="请选择类别描述">
<el-option v-for="item in describeOptions"
:key="item.id"
:label="item.describeName"
:value="item.id">
</el-option>
</el-select> -->
<el-cascader
:disabled="isDisabled"
v-model="addForm.typeDescribeId"
@change="changeDescribe"
placeholder="请选择类别描述"
:options="describeOptions"
:props="props2"
clearable
>
</el-cascader>
</el-form-item>
<el-form-item
label="施工部位:"
:label-width="formLabelWidth"
required
>
<el-input
v-model="addForm.constructionLocation"
:disabled="isDisabled"
placeholder="请输入施工部位"
autocomplete="off"
></el-input>
</el-form-item>
<!-- <el-form-item
label="施工时间:"
required
:label-width="formLabelWidth"
>
<el-date-picker
:disabled="isDisabled"
v-model="addForm.buildTime"
type="daterange"
range-separator="至"
:picker-options="pickerOptions"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item> -->
<!-- <el-form-item label="施工计划" :label-width="formLabelWidth">
<el-input v-model="addForm.people" :disabled="isDisabled" placeholder="请输入施工计划" autocomplete="off"></el-input>
</el-form-item> -->
<el-form-item label="计划时间:" :label-width="formLabelWidth">
<el-date-picker
:disabled="isDisabled"
v-model="addForm.planTime"
type="daterange"
:picker-options="pickerOptions"
range-separator="至"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item
label="责任分包单位:"
required
:label-width="formLabelWidth"
>
<!-- <el-cascader
:disabled="isDisabled"
v-model="addForm.responsibilityCompany"
placeholder="请选择责任分包单位"
:options="options"
:props="props"
clearable>
</el-cascader> -->
<el-select
v-model="addForm.responsibilityCompanyId"
placeholder="请选择责任分包单位"
@change="unitChange"
disabled
>
<el-option
:label="item.enterpriseName"
:value="item.id"
v-for="(item, index) in responsibilityList"
:key="index"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="责任人:"
required
:label-width="formLabelWidth"
>
<!-- <el-input v-model="addForm.personLiable" :disabled="isDisabled" placeholder="请输入责任人" autocomplete="off"></el-input> -->
<el-select
v-model="addForm.personLiableId"
placeholder="请选择责任人"
disabled
>
<el-option
:label="item.realName"
:value="item.userId"
v-for="(item, index) in personList"
:key="index"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<div class="control-point" v-if="company != 'longguang'">
<div class="box-title">
管控要点
</div>
<div style="height: calc(100% - 50px);">
<!-- <vue-scroll> -->
<!-- <el-checkbox-group class="checkbox-list" v-model="checkList">
<div class="checkbox-item" v-for="(item,index) in contentList" :key="index">
<el-checkbox :label="item.id"><a>{{item.controlTypeName}}</a></el-checkbox>
<div class="checkbox-children" v-for="(itm,idx) in item.children" :key="idx">
<el-checkbox :label="itm.id">{{itm.controlContent}}</el-checkbox>
</div>
</div>
</el-checkbox-group> -->
<div class="checkbox-list">
<div
class="checkbox-item"
v-for="(item, index) in contentList"
:key="index"
>
<el-checkbox
v-model="item.allCheck"
@change="allChildrenCheck(item)"
><a>{{ item.controlTypeName }}</a></el-checkbox
>
<el-checkbox-group v-model="checkList">
<div
class="checkbox-children"
v-for="(itm, idx) in item.children"
:key="idx"
>
<el-checkbox
:label="itm.id"
@change="checkChidren(item)"
>{{ itm.controlContent }}</el-checkbox
>
</div>
</el-checkbox-group>
</div>
</div>
<!-- </vue-scroll> -->
</div>
</div>
</div>
<div
v-if="company != 'longguang'"
:class="{ line: styleType == 2 }"
></div>
<div v-if="company != 'longguang'" class="right">
<div class="box-title">
工程资料
</div>
<div class="file-form">
<!-- <vue-scroll> -->
<div class="form-item">
<div class="switch-lable">安全技术交底</div>
<div class="form-right">
<div class="switch-box">
<el-switch
v-model="addForm.technicalDisclosureType"
active-color="#13ce66"
inactive-color="#efefef"
>
</el-switch>
<div>
{{
addForm.technicalDisclosureType ? "已完成" : "未完成"
}}
</div>
</div>
<el-upload
class="avatar-uploader"
:action="$store.state.UPLOADURL"
:show-file-list="false"
:on-success="handleUploadSuccess"
name="files"
>
<div class="upload-btn">点击上传</div>
</el-upload>
<div class="file-list" v-if="fileList && fileList.length > 0">
<div class="list-head">资料列表</div>
<div class="item-box">
<vue-scroll>
<div
class="list-item"
v-for="(item, index) in fileList"
:key="index"
>
<div class="file-icon">
<img
v-if="item.iconType == 'word'"
src="@/assets/images/icon-word.png"
/>
<img
v-if="item.iconType == 'image'"
src="@/assets/images/icon-image.png"
/>
<img
v-if="item.iconType == 'excel'"
src="@/assets/images/icon-excel.png"
/>
<img
v-if="item.iconType == 'ppt'"
src="@/assets/images/icon-ppt.png"
/>
<img
v-if="item.iconType == 'pdf'"
src="@/assets/images/icon-pdf.png"
/>
</div>
<div class="file-name">
{{ item.name }}
<span @click="downLoadFile(item.url)">下载</span>
</div>
<i
class="el-icon-close"
@click="removeFile(index, 1)"
></i>
</div>
</vue-scroll>
</div>
</div>
</div>
</div>
<div class="form-item">
<div class="switch-lable">专项施工方案交底</div>
<div class="form-right">
<div class="switch-box">
<el-switch
v-model="addForm.specialConstructionSchemeType"
active-color="#13ce66"
inactive-color="#efefef"
>
</el-switch>
<div>
{{
addForm.specialConstructionSchemeType
? "已完成"
: "未完成"
}}
</div>
</div>
<el-upload
class="avatar-uploader"
:action="$store.state.UPLOADURL"
:show-file-list="false"
:on-success="handleUploadSuccess2"
name="files"
>
<div class="upload-btn">点击上传</div>
</el-upload>
<div
class="file-list"
v-if="fileList2 && fileList2.length > 0"
>
<div class="list-head">资料列表</div>
<div class="item-box">
<vue-scroll>
<div
class="list-item"
v-for="(item, index) in fileList2"
:key="index"
>
<div class="file-icon">
<img
v-if="item.iconType == 'word'"
src="@/assets/images/icon-word.png"
/>
<img
v-if="item.iconType == 'image'"
src="@/assets/images/icon-image.png"
/>
<img
v-if="item.iconType == 'excel'"
src="@/assets/images/icon-excel.png"
/>
<img
v-if="item.iconType == 'ppt'"
src="@/assets/images/icon-ppt.png"
/>
<img
v-if="item.iconType == 'pdf'"
src="@/assets/images/icon-pdf.png"
/>
</div>
<div class="file-name">
{{ item.name }}
<span @click="downLoadFile(item.url)">下载</span>
</div>
<i
class="el-icon-close"
@click="removeFile(index, 2)"
></i>
</div>
</vue-scroll>
</div>
</div>
</div>
</div>
<div class="form-item">
<div class="switch-lable">安全专项施工方案及附件</div>
<div class="form-right">
<div class="switch-box">
<el-switch
v-model="addForm.securityConstructionSchemeType"
active-color="#13ce66"
inactive-color="#efefef"
>
</el-switch>
<div>
{{
addForm.securityConstructionSchemeType
? "已完成"
: "未完成"
}}
</div>
</div>
<el-upload
class="avatar-uploader"
:action="$store.state.UPLOADURL"
:show-file-list="false"
:on-success="handleUploadSuccess3"
name="files"
>
<div class="upload-btn">点击上传</div>
</el-upload>
<div
class="file-list"
v-if="fileList3 && fileList3.length > 0"
>
<div class="list-head">资料列表</div>
<div class="item-box">
<vue-scroll>
<div
class="list-item"
v-for="(item, index) in fileList3"
:key="index"
>
<div class="file-icon">
<img
v-if="item.iconType == 'word'"
src="@/assets/images/icon-word.png"
/>
<img
v-if="item.iconType == 'image'"
src="@/assets/images/icon-image.png"
/>
<img
v-if="item.iconType == 'excel'"
src="@/assets/images/icon-excel.png"
/>
<img
v-if="item.iconType == 'ppt'"
src="@/assets/images/icon-ppt.png"
/>
<img
v-if="item.iconType == 'pdf'"
src="@/assets/images/icon-pdf.png"
/>
</div>
<div class="file-name">
{{ item.name }}
<span @click="downLoadFile(item.url)">下载</span>
</div>
<i
class="el-icon-close"
@click="removeFile(index, 3)"
></i>
</div>
</vue-scroll>
</div>
</div>
</div>
</div>
<!-- </vue-scroll> -->
</div>
</div>
</div>
<div
class="button-box"
:class="{ 'button-box2': company == 'longguang' }"
>
<el-button
class="cancle-btn"
icon="el-icon-circle-close"
size="small"
@click="cancle"
>取消</el-button
>
<el-button
type="primary"
icon="el-icon-circle-check"
size="small"
@click="submit"
>保存</el-button
>
</div>
</vue-scroll>
</div>
</div>
</template>
<script>
import {
selectDangerousEngineeringRecordApi,
addDangerousEngineeringRecordApi,
deleteDangerousEngineeringRecordApi,
selectDangerousEngineeringTypeApi,
selectdangerousEngineeringTypeDescribeApi,
selectControlContentListApi,
editDangerousEngineeringRecordApi,
queryDangerousEngineeringRecordByIdApi,
} from "@/assets/js/api/dangerousBigProject";
import { getCooperatorListApi } from "@/assets/js/api/cooperationUnit";
import {
getEnterpriseInfoList,
getWorkerInfoList,
} from "@/assets/js/api/laborPerson";
import { getProjectChilderSystemUserListApi } from "@/assets/js/api/configManage";
export default {
props: ["operateTitle", "editId"],
data() {
return {
responsibilityList: [],
styleType: 1,
addForm: {
engineeringName: "",
engineeringSurvey: "",
engineeringTypeId: "",
engineeringTypeName: "",
personLiable: "",
personLiableId: "",
typeDescribeId: [],
planTime: "",
buildTime: "",
constructionLocation: "",
responsibilityCompanyId: "",
securityConstructionSchemeType: false,
specialConstructionSchemeType: false,
technicalDisclosureType: false,
typeDescribeList: [],
},
pickerOptions: {
disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7;
},
},
options2: [],
checkList: [],
formLabelWidth: "136px",
isDisabled: false,
value: false,
headquartersSn: "",
typeOptions: [],
contentList: [],
describeOptions: [],
enterpriseTypeId: 1,
pageSize: 1000,
pageNo: 1,
projectSn: "",
options: [],
props: {
multiple: true,
},
props2: {
multiple: true,
value: "id",
label: "describeName",
},
cooperatorList: [],
fileList: [],
fileList2: [],
fileList3: [],
fileUrl: "",
company: "",
personList: [],
};
},
created() {
this.company = COMPANY;
this.headquartersSn = this.$store.state.userInfo.headquartersSn;
this.projectSn = this.$store.state.projectSn;
this.styleType = this.$store.state.userInfo.styleType;
this.fileUrl = this.$store.state.FILEURL;
this.queryTypeList();
this.getCooperatorList();
this.getProjectList();
if (this.editId) {
this.queryDetail();
}
},
methods: {
unitChange() {
// 分包单位切换
this.getProjectPersonList();
},
// 获取责任人
getProjectPersonList() {
let requestData = {
projectSn: this.projectSn,
enterpriseId: this.addForm.responsibilityCompanyId,
};
getProjectChilderSystemUserListApi(requestData).then((res) => {
this.personList = res.result;
});
},
//获取企业 || 劳务公司 列表
getProjectList() {
let data = {
projectSn: this.projectSn,
// enterpriseTypeId: this.enterpriseTypeId,
};
getEnterpriseInfoList(data).then((res) => {
this.responsibilityList = res.result;
});
},
// 查询详情
queryDetail() {
let data = {
id: this.editId,
};
queryDangerousEngineeringRecordByIdApi(data).then((res) => {
console.log(res.result, "----详情");
if (res.code == 200 && res.result) {
this.addForm = {...res.result};
if (this.addForm.planStartTime && this.addForm.planEndTime) {
this.addForm.planTime = [
this.addForm.planStartTime,
this.addForm.planEndTime,
];
}
if (this.addForm.buildStartTime && this.addForm.buildEndTime) {
this.addForm.buildTime = [
this.addForm.buildStartTime,
this.addForm.buildEndTime,
];
}
if (this.addForm.responsibilityCompanyId) {
this.getProjectPersonList();
}
this.queryDescribe(res.result.engineeringTypeId);
this.fileList = JSON.parse(this.addForm.technicalDisclosureFile);
this.addForm.technicalDisclosureType =
this.addForm.technicalDisclosureType == 2 ? true : false;
this.fileList2 = JSON.parse(
this.addForm.specialConstructionSchemeFile
);
this.addForm.specialConstructionSchemeType =
this.addForm.specialConstructionSchemeType == 2 ? true : false;
this.fileList3 = JSON.parse(
this.addForm.securityConstructionSchemeFile
);
this.addForm.securityConstructionSchemeType =
this.addForm.securityConstructionSchemeType == 2 ? true : false;
}
this.checkList = this.addForm.controlItemList?this.addForm.controlItemList:[];
});
},
queryTypeList() {
selectDangerousEngineeringTypeApi({ sn: this.headquartersSn }).then(
(res) => {
console.log(res);
if (res.code == 200 && res.result) {
this.typeOptions = res.result;
}
}
);
},
queryDescribe(typeId) {
selectdangerousEngineeringTypeDescribeApi({ typeId }).then((res) => {
console.log(res, 5201314);
if (res.code == 200 && res.result) {
this.describeOptions = res.result;
// 由于有数据回显需要用到该接口的数据,所以放在这赋值
let arr = [];
if (this.addForm.chooseTypeDescribeList) {
this.addForm.chooseTypeDescribeList.map((item) => {
arr.push([item.describeId]);
});
this.addForm.typeDescribeId = arr;
} else {
this.addForm.typeDescribeId = [];
}
console.log(this.addForm, 6677788);
this.changeDescribe(this.addForm.typeDescribeId);
}
});
},
changeType(val) {
console.log(val,777888);
this.typeOptions.forEach((item) => {
if (item.id == val) {
this.addForm.engineeringTypeName = item.typeName;
}
});
this.addForm.typeDescribeId = [];
this.contentList = [];
this.typeOptions.forEach((item) => {
if (item.id == val) {
// this.describeOptions = item.describeList
this.queryDescribe(val);
}
});
},
changeDescribe(val) {
console.log(val, 18867);
console.log(this.describeOptions, 17788);
if (val) {
this.addForm.typeDescribeList = [];
val
.join(",")
.split(",")
.forEach((item) => {
let id = item;
this.describeOptions.forEach((itm) => {
if (itm.id == id) {
let obj = {
describeId: itm.id,
describeName: itm.describeName,
};
this.addForm.typeDescribeList.push(obj);
}
});
});
console.log(this.addForm.typeDescribeList, 16677);
selectControlContentListApi({ describeId: val.join(",") }).then(
(res) => {
console.log(res.result, 666777);
if (res.code == 200 && res.result) {
this.contentList = res.result;
this.contentList.map((item) => {
item.children.map((item2) => {
this.checkList.map((item3) => {
if (item3 == item2.id) {
item.allCheck = true;
return;
}
});
});
});
}
}
);
}
// this.describeOptions.forEach(item=>{
// if(item.id == val){
// this.contentList = item.contentList
// }
// })
},
allChildrenCheck(val) {
console.log(val);
if (val.allCheck) {
val.children.forEach((item) => {
this.checkList.push(item.id);
});
this.checkList = Array.from(new Set(this.checkList));
} else {
val.children.forEach((item) => {
let id = item.id;
this.checkList.forEach((itm, idx) => {
if (itm == id) {
this.checkList.splice(idx, 1);
}
});
});
}
console.log(this.checkList);
},
checkChidren(val) {
console.log(val,789654)
console.log(this.checkList,789654)
let arr = [],
arr2 = [],
allCheck = true;
val.children.forEach((item) => {
arr.push(item.id);
});
arr.forEach((item) => {
let id = item;
let flag = this.checkList.findIndex((itm, idx) => {
return itm == id;
});
if (flag != -1) {
arr2.push(true);
} else {
arr2.push(false);
}
});
arr2.forEach((item) => {
if (!item) {
allCheck = false;
return;
}
});
val.allCheck = allCheck;
console.log(val, arr, arr2, allCheck);
},
//获取责任分包单位
getCooperatorList() {
let data = {
projectSn: this.projectSn,
pageNo: this.pageNo,
pageSize: this.pageSize,
enterpriseTypeId: this.enterpriseTypeId,
enterpriseName: "",
};
getCooperatorListApi(data).then((res) => {
if (res.code == 200) {
if (res.result.records.length > 0) {
this.cooperatorList = JSON.parse(
JSON.stringify(res.result.records)
);
this.cooperatorList.forEach((item) => {
item.value = item.enterpriseName;
item.label = item.enterpriseName;
});
this.options = this.cooperatorList;
console.log(res.result.records);
}
}
});
},
handleUploadSuccess(res, file) {
console.log(res, file);
this.fileList.push({
name: file.name,
url: file.response.data[0].imageUrl,
iconType: this.getFileType(file.name),
});
// this.addProjectForm.layoutImage = this.$store.state.FILEURL + res.data[0].imageUrl;
},
handleUploadSuccess2(res, file) {
console.log(res, file);
this.fileList2.push({
name: file.name,
url: file.response.data[0].imageUrl,
iconType: this.getFileType(file.name),
});
},
handleUploadSuccess3(res, file) {
console.log(res, file);
this.fileList3.push({
name: file.name,
url: file.response.data[0].imageUrl,
iconType: this.getFileType(file.name),
});
},
downLoadFile(url) {
window.open(this.fileUrl + url);
},
removeFile(index, type) {
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
if (type == 1) {
this.fileList.splice(index, 1);
} else if (type == 2) {
this.fileList2.splice(index, 1);
} else if (type == 3) {
this.fileList3.splice(index, 1);
}
this.$message({
type: "success",
message: "删除成功!",
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
// 判断文件类型
getFileType(fileName) {
// 后缀获取
let suffix = "";
// 获取类型结果
let result = "";
try {
const flieArr = fileName.split(".");
suffix = flieArr[flieArr.length - 1];
} catch (err) {
suffix = "";
}
// fileName无后缀返回 false
if (!suffix) {
return false;
}
suffix = suffix.toLocaleLowerCase();
// 图片格式
const imglist = ["png", "jpg", "jpeg", "bmp", "gif"];
// 进行图片匹配
result = imglist.find((item) => item === suffix);
if (result) {
return "image";
}
// 匹配txt
const txtlist = ["txt"];
result = txtlist.find((item) => item === suffix);
if (result) {
return "txt";
}
// 匹配 excel
const excelist = ["xls", "xlsx"];
result = excelist.find((item) => item === suffix);
if (result) {
return "excel";
}
// 匹配 word
const wordlist = ["doc", "docx"];
result = wordlist.find((item) => item === suffix);
if (result) {
return "word";
}
// 匹配 pdf
const pdflist = ["pdf"];
result = pdflist.find((item) => item === suffix);
if (result) {
return "pdf";
}
// 匹配 ppt
const pptlist = ["ppt", "pptx"];
result = pptlist.find((item) => item === suffix);
if (result) {
return "ppt";
}
// 匹配 视频
const videolist = [
"mp4",
"m2v",
"mkv",
"rmvb",
"wmv",
"avi",
"flv",
"mov",
"m4v",
];
result = videolist.find((item) => item === suffix);
if (result) {
return "video";
}
// 匹配 音频
const radiolist = ["mp3", "wav", "wmv"];
result = radiolist.find((item) => item === suffix);
if (result) {
return "radio";
}
// 其他 文件类型
return "other";
},
cancle() {
this.$emit("cancleSave");
},
submit() {
console.log(this.addForm, 123456);
if (this.addForm.engineeringName == "") {
this.$message.error("请输入危大工程名称!");
return;
}
if (this.addForm.engineeringTypeId == "") {
this.$message.error("请选择危大工程类别!");
return;
}
if (this.addForm.typeDescribeId.length == 0) {
this.$message.error("请选择类别描述!");
return;
}
if (this.addForm.constructionLocation == "") {
this.$message.error("请输入施工部位!");
return;
}
// if (!this.addForm.buildTime) {
// this.$message.error("请选择施工时间!");
// return;
// }
if (!this.addForm.responsibilityCompanyId) {
this.$message.error("请选择责任分包单位!");
return;
}
if (!this.addForm.personLiableId) {
this.$message.error("请选择责任人!");
return;
}
console.log(this.addForm);
let {
constructionLocation,
typeDescribeList,
engineeringTypeName,
engineeringName,
engineeringSurvey,
personLiableId,
engineeringTypeId,
} = this.addForm,
data = {
constructionLocation,
engineeringName,
engineeringSurvey,
personLiableId,
engineeringTypeId,
engineeringTypeName,
// buildStartTime: this.addForm.buildTime[0],
// buildEndTime: this.addForm.buildTime[1],
planStartTime: this.addForm.planTime[0]
? this.addForm.planTime[0]
: "",
planEndTime: this.addForm.planTime[1] ? this.addForm.planTime[1] : "",
// typeDescribeId: this.addForm.typeDescribeId.join(','),
responsibilityCompanyId: this.addForm.responsibilityCompanyId,
securityConstructionSchemeType: this.addForm
.securityConstructionSchemeType
? 2
: 1,
specialConstructionSchemeType: this.addForm
.specialConstructionSchemeType
? 2
: 1,
technicalDisclosureType: this.addForm.technicalDisclosureType
? 2
: 1,
typeDescribeList,
controlItemList: this.checkList?this.checkList:null,
technicalDisclosureFile: JSON.stringify(this.fileList),
securityConstructionSchemeFile: JSON.stringify(this.fileList3),
specialConstructionSchemeFile: JSON.stringify(this.fileList2),
id: this.addForm.id,
};
data.projectSn = this.projectSn;
if(data.responsibilityCompanyId){
let find = this.responsibilityList.find(item => {
return item.id == data.responsibilityCompanyId
})
data.responsibilityCompany = find.enterpriseName;
}
if(data.personLiableId){
let find = this.personList.find(item => {
return item.userId == data.personLiableId
})
data.personLiable = find.realName;
}
editDangerousEngineeringRecordApi(data).then((res) => {
console.log(res);
if (res.code == 200) {
this.$message.success("编辑成功!");
this.$emit("cancleSave");
}
});
console.log(data, this.fileList);
},
},
};
</script>
<style lang="less" scoped>
.plan-form {
height: calc(100% - 56px);
width: 100%;
box-sizing: border-box;
.box-title {
height: 30px;
padding-top: 10px;
line-height: 30px;
position: relative;
padding-left: 20px;
box-sizing: border-box;
margin-bottom: 20px;
display: flex;
justify-content: space-between;
}
.box-title::before {
content: "";
background: #4181fe;
height: 30px;
width: 2px;
position: absolute;
left: 0;
top: 10px;
}
.wrap {
display: flex;
width: 100%;
// height: 100%;
}
.left {
height: 100%;
width: 65%;
.info {
padding-bottom: 8px;
.form-box {
width: 100%;
display: flex;
flex-wrap: wrap;
/deep/.el-form-item {
width: 50%;
padding-right: 10px;
box-sizing: border-box;
}
// /deep/.el-col-12{
// padding-left: 20px;
// }
/deep/.el-input__inner {
width: 100%;
}
/deep/.el-select {
width: 100%;
}
/deep/.el-cascader {
width: 100%;
}
}
}
.control-point {
// height: 350px;
min-height: 330px;
overflow: hidden;
.checkbox-list {
display: flex;
flex-wrap: wrap;
/deep/.el-checkbox {
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: flex;
align-items: center;
}
/deep/.el-checkbox__label {
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.checkbox-item {
width: 50%;
padding-left: 24px;
box-sizing: border-box;
.checkbox-children {
padding-left: 24px;
}
}
/deep/.el-checkbox {
margin-bottom: 6px;
}
}
}
}
.line {
border-left: 1px solid #12294f;
}
.right {
width: 35%;
.file-form {
padding-left: 20px;
// height: 658px;
.form-item {
font-size: 14px;
display: flex;
// align-items: center;
// color: rgba(#fff,0.55);
padding-bottom: 30px;
.switch-lable {
width: 40%;
text-align: right;
line-height: 20px;
margin-right: 20px;
// color: rgba(#fff,0.85);
}
.el-switch {
margin-right: 12px;
transform: scale(0.9);
}
.form-right {
flex: 1;
padding-right: 12px;
.switch-box {
display: flex;
align-items: center;
margin-bottom: 25px;
}
}
}
}
.upload-btn {
display: block;
width: 86px;
height: 26px;
border: 1px solid #0080f3;
background: #0080f3;
color: #fff;
border-radius: 3px;
text-align: center;
line-height: 26px;
margin-bottom: 20px;
cursor: pointer;
}
.file-list {
width: 100%;
background: #f5f5f5;
.list-head {
height: 32px;
line-height: 32px;
background: #ccc;
padding-left: 10px;
}
.item-box {
// height: 300px;
.list-item {
display: flex;
width: 100%;
align-items: center;
padding: 8px 0;
padding-left: 20px;
box-sizing: border-box;
margin: 10px 0;
.file-icon {
margin-right: 10px;
img {
width: 32px;
height: 38px;
}
}
.file-name {
flex: 1;
font-size: 12px;
display: flex;
flex-direction: column;
span {
display: inherit;
margin-top: 6px;
color: #0080f3;
cursor: pointer;
}
}
.el-icon-close {
color: #fe6565;
width: 20px;
cursor: pointer;
}
}
.list-item:hover {
background: #ccc;
}
// .active{
// background: #132C55;
// }
}
}
}
.button-box {
display: flex;
justify-content: center;
align-items: center;
// padding-top: 8px;
height: 60px;
padding-right: 20px;
.cancle-btn {
margin-right: 30px;
}
}
.button-box2 {
position: absolute;
bottom: 0;
right: 20px;
}
}
.dark {
border-top: 1px solid #12294f;
.wrap {
border-bottom: 1px solid #12294f;
}
.left {
.info {
border-bottom: 1px solid #12294f;
}
}
.box-title {
color: #88e7f0;
}
.box-title::before {
background: linear-gradient(to bottom, #88e7f0, #15315f);
}
.button-box {
.cancle-btn {
background: transparent;
color: #fff;
}
}
.right {
/deep/.el-switch__core:after {
background: #0d1a34;
}
.upload-btn {
border: 1px solid #0080f3;
background: #0d1a34;
// color: rgba(#fff,0.85);
}
.file-list {
background: #0a1429;
}
.list-head {
background: #1f283b;
}
.item-box {
.list-item:hover {
background: #132c55;
}
.file-name {
span {
color: #7cd3de;
}
}
}
}
}
</style>