lsun 协议管理-树结构修改

This commit is contained in:
lSun 2024-11-19 11:12:52 +08:00
parent 8c5cf9aac4
commit 19f85a82a5
1 changed files with 328 additions and 183 deletions

View File

@ -1,7 +1,7 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item prop="keyWord">
<el-form-item prop="keyWord">
<el-input
v-model="queryParams.keyWord"
placeholder="请输入关键词"
@ -37,7 +37,8 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button
>新增
</el-button
>
</el-col>
<el-col :span="1.5">
@ -80,7 +81,6 @@
</el-table-column>
<el-table-column label="附件图片" align="center" width="180">
<template slot-scope="scope">
<el-button
@ -133,25 +133,41 @@
/>
<!-- 新增或修改弹窗 -->
<el-dialog :title="title" :visible.sync="showHouse" width="1000px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px" >
<el-dialog :title="title" :visible.sync="showHouse" width="1000px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="12">
<el-form-item label="租赁单位" prop="unitId">
<el-select
v-model="form.unitId"
<!-- <el-form-item label="租赁单位" prop="unitId">-->
<!-- <el-select-->
<!-- v-model="form.unitId"-->
<!-- filterable-->
<!-- placeholder="请选择租赁单位"-->
<!-- style="width: 100%"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in unitList"-->
<!-- :key="item.unitId"-->
<!-- :label="item.unitName"-->
<!-- :value="item.unitId"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="租赁单位" prop="unitId" >
<el-cascader
v-model="unitId"
:show-all-levels="false"
:options="uniteList"
:props="selectTreeProps"
filterable
clearable
collapse-tags
@change="uniteChange"
placeholder="请选择租赁单位"
style="width: 100%"
>
<el-option
v-for="item in unitList"
:key="item.unitId"
:label="item.unitName"
:value="item.unitId"
></el-option>
</el-select>
style="width: 100%;"
></el-cascader>
</el-form-item>
</el-col>
<el-col :span="12">
@ -167,21 +183,35 @@
<el-row>
<el-col :span="12">
<el-form-item label="租赁工程" prop="proId">
<el-select
v-model="form.proId"
<el-form-item label="租赁工程" prop="projectId">
<el-cascader
v-model="projectId"
:show-all-levels="false"
:options="projectList"
:props="selectTreeProps"
filterable
clearable
collapse-tags
@change="projectChange"
placeholder="请选择租赁工程"
style="width: 100%"
>
<el-option
v-for="item in projectList"
:key="item.proId"
:label="item.proName"
:value="item.proId"
></el-option>
</el-select>
style="width: 100%;"
></el-cascader>
</el-form-item>
<!-- <el-form-item label="租赁工程" prop="proId">
<el-select
v-model="form.proId"
filterable
placeholder="请选择租赁工程"
style="width: 100%"
>
<el-option
v-for="item in projectList"
:key="item.proId"
:label="item.proName"
:value="item.proId"
></el-option>
</el-select>
</el-form-item>-->
</el-col>
@ -250,7 +280,7 @@
<el-row>
<el-col :span="12">
<el-form-item label="租赁单位类型">
<el-select v-model="form.protocol" placeholder="请选择租赁单位类型" clearable>
<el-select style="width: 100%;" v-model="form.protocol" placeholder="请选择租赁单位类型" clearable>
<el-option label="内部单位" value="1"></el-option>
<el-option label="外部单位" value="2"></el-option>
</el-select>
@ -260,7 +290,7 @@
<el-form-item label="营业执照">
<el-upload
class = "upload-demo"
class="upload-demo"
action="#"
:file-list="businessLicenseListTemp"
:show-file-list="true"
@ -276,25 +306,25 @@
<!-- 文件格式下载图片格式预览 -->
<div slot="file" slot-scope="{file}">
<img v-if="isImage(file)" class="el-upload-list__item-thumbnail" :src="file.url" alt="">
<div v-else class="picture-card-container" >
<img v-if="isImage(file)" class="el-upload-list__item-thumbnail" :src="file.url" alt="">
<div v-else class="picture-card-container">
<img class="picture-card" :src="urlTemp" alt="">
<p class="file-name">{{ file.name }}</p>
</div>
<span class="el-upload-list__item-actions">
<span v-if="updataIf(file)" class="el-upload-list__item-delete" @click="handleDownload(file)">
<i class="el-icon-download" />
<i class="el-icon-download"/>
</span>
<span v-else class="el-upload-list__item-preview" @click="picturePreview(file)">
<i class="el-icon-zoom-in" />
<i class="el-icon-zoom-in"/>
</span>
<span class="el-upload-list__item-delete" @click="handleRemoveElectricianImgList(file)">
<i class="el-icon-delete" />
<i class="el-icon-delete"/>
</span>
</span>
</div>
<i class="el-icon-plus avatar-uploader-icon" ></i>
<i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
@ -306,11 +336,11 @@
</el-dialog>
<!-- 查看全部图片的弹窗 -->
<el-dialog :title="title" :visible.sync="showAllImg" width="600px" append-to-body>
<el-form ref="form" label-width="120px" >
<el-dialog :title="title" :visible.sync="showAllImg" width="600px" append-to-body>
<el-form ref="form" label-width="120px">
<el-form-item label="营业执照">
<el-upload
class = "upload-demo"
class="upload-demo"
action="#"
:file-list="businessLicenseListTemp"
:show-file-list="true"
@ -326,22 +356,22 @@
<!-- 文件格式下载图片格式预览 -->
<div slot="file" slot-scope="{file}">
<img v-if="isImage(file)" class="el-upload-list__item-thumbnail" :src="file.url" alt="">
<div v-else class="picture-card-container" >
<img v-if="isImage(file)" class="el-upload-list__item-thumbnail" :src="file.url" alt="">
<div v-else class="picture-card-container">
<img class="picture-card" :src="urlTemp" alt="">
<p class="file-name">{{ file.name }}</p>
</div>
<span class="el-upload-list__item-actions">
<span v-if="updataIf(file)" class="el-upload-list__item-delete" @click="handleDownload(file)">
<i class="el-icon-download" />
<i class="el-icon-download"/>
</span>
<span v-else class="el-upload-list__item-preview" @click="picturePreview(file)">
<i class="el-icon-zoom-in" />
<i class="el-icon-zoom-in"/>
</span>
</span>
</div>
<i class="el-icon-plus avatar-uploader-icon" ></i>
<i class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
@ -354,20 +384,31 @@
<!-- 图片查看弹窗 -->
<el-dialog :visible.sync="dialogVisible" width="600px" height="600px" >
<img width="100%" height="500px" :src="dialogImageUrl" />
<el-dialog :visible.sync="dialogVisible" width="600px" height="600px">
<img width="100%" height="500px" :src="dialogImageUrl"/>
</el-dialog>
</div>
</template>
<script>
import { getListAgreement,getAgreementDetail,editAgreement,addAgreement,delAgreement,deleteFile, getUnitList, getProjectList, } from "@/api/lease/protocol";
import { imgUpLoadThree, fileUpLoad } from '@/api/system/upload'
import { downloadFile,downloadFileData } from '@/utils/download'
import { getToken } from '@/utils/auth'
import {
getListAgreement,
getAgreementDetail,
editAgreement,
addAgreement,
delAgreement,
deleteFile,
getUnitList,
getProjectList,
} from "@/api/lease/protocol";
import {imgUpLoadThree, fileUpLoad} from '@/api/system/upload'
import {downloadFile, downloadFileData} from '@/utils/download'
import {getToken} from '@/utils/auth'
import {Base64} from 'js-base64'
import { forEach } from 'jszip';
import {forEach} from 'jszip';
import {listUser} from "@/api/system/user";
import {getListProject, getListUnite} from "@/api/lease/apply";
export default {
name: "supplier",
data() {
@ -402,15 +443,31 @@ export default {
//
total: 0,
totalTwo : 0,
totalTwo: 0,
//
unitList: [],
//
uniteList: [],
selectTreeProps: {
children: "children",
label: "name",
// multiple: false,
value: "id",
// multiple: true,
},
unitId: null,
projectId: null,
maForm: {
unitId: undefined,
projectId: undefined
},
//
projectList: [],
//
houseList: [],
maxLength:100,//
keeperDataRange:[],
maxLength: 100,//
keeperDataRange: [],
//
teamList: [],
teamTempList: [],
@ -418,20 +475,20 @@ export default {
title: "",
//
open: false,
showConfirmButton:true,
showConfirmButton: true,
//
queryParams: {
pageNum: 1,
pageSize: 10,
keyWord:undefined,
status:undefined,
keyWord: undefined,
status: undefined,
time: null, //
},
fileList:[],
businessLicenseFileList:[],
businessLicenseListTemp:[],
delBusinessFileIdList:[],
base64Data:undefined,
fileList: [],
businessLicenseFileList: [],
businessLicenseListTemp: [],
delBusinessFileIdList: [],
base64Data: undefined,
//
dialogImageUrl: '',
dialogVisible: false,
@ -442,15 +499,15 @@ export default {
unitId: [
{
required: true,
message: '租赁单位不能为空',
trigger: 'blur',
message: "请选择租赁单位",
trigger: "blur",
},
],
proId: [
projectId: [
{
required: true,
message: '租赁工程不能为空',
trigger: 'blur',
message: "请选择租赁工程",
trigger: "blur",
},
],
@ -462,9 +519,9 @@ export default {
},
],
phone: [
{ required: true, message: "联系电话不能为空", trigger: "blur" },
{required: true, message: "联系电话不能为空", trigger: "blur"},
{
required:false,
required: false,
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
message: "请输入正确的联系电话",
trigger: "blur"
@ -475,7 +532,7 @@ export default {
//
upload: {
//
headers: { Authorization: 'Bearer ' + getToken() },
headers: {Authorization: 'Bearer ' + getToken()},
//
url: process.env.VUE_APP_BASE_API + '/file/upload'
},
@ -495,7 +552,6 @@ export default {
},
methods: {
//fileList raw
async getFileData() {
const fileTwo = []
@ -504,17 +560,17 @@ export default {
fileTwo.push(item.raw)
}
})
return { fileTwo }
return {fileTwo}
},
//
async imgUpLoadTwoAll(param) {
async imgUpLoadTwoAll(param) {
param.type = 'ma'
imgUpLoadThree(param)
.then((res) => {
if (res.code == 200) {
let obj = {'name':res.data.name,'url':res.data.url}
console.log('obj',obj)
let obj = {'name': res.data.name, 'url': res.data.url}
console.log('obj', obj)
this.businessLicenseFileList.push(obj);
} else {
// this.$msgError(res.msg)
@ -533,10 +589,10 @@ export default {
this.dialogImageUrl = file.url;
const parts = file.name.split('.');
const extension = parts.pop();
if(extension === 'pdf'){
if (extension === 'pdf') {
const windowName = file.name;
window.open(file.url,windowName)
}else{
window.open(file.url, windowName)
} else {
this.dialogVisible = true
}
@ -550,17 +606,17 @@ export default {
}
})
this.businessLicenseListTemp.splice(sum, 1)
if(file.status=='success'){
if (file.status == 'success') {
this.delBusinessFileIdList.push(file.url);
}
console.log('delBusinessFileIdList',this.delBusinessFileIdList)
console.log('delBusinessFileIdList', this.delBusinessFileIdList)
},
isImage(file){
isImage(file) {
this.urlTemp = require('@/assets/file.png');
if(this.updataIf(file)){
if (this.updataIf(file)) {
return false
}else{
} else {
return true
}
},
@ -587,11 +643,11 @@ export default {
handleDownload(file) {
console.log(file)
if(file.status === 'ready'){
downloadFile({ fileName: file.name, fileData: file.raw, fileType: 'application/vnd.ms-excel;charset=utf-8' })
}else if(file.status === 'success'){
if (file.status === 'ready') {
downloadFile({fileName: file.name, fileData: file.raw, fileType: 'application/vnd.ms-excel;charset=utf-8'})
} else if (file.status === 'success') {
downloadFileData( { fileName: file.name, fileUrl: file.url } )
downloadFileData({fileName: file.name, fileUrl: file.url})
// downloadFileData({ fileName: file.name,fileUrl:file.url })
}
},
@ -602,34 +658,34 @@ export default {
});
const parts = file.name.split('.');
const extension = parts.pop();
if(fileList.length > 3){
if (fileList.length > 3) {
this.$message.warning('最多上传3张营业执照')
fileList = fileList.filter(item => {
return item.uid != file.uid
})
}else if(!(extension === 'pdf' || extension === 'png' || extension === 'jpg' || extension === 'jpeg')){
} else if (!(extension === 'pdf' || extension === 'png' || extension === 'jpg' || extension === 'jpeg')) {
this.$message.warning('文件格式不正确')
fileList = fileList.filter(item => {
return item.uid != file.uid
})
}else if(file.size > 1024 * 1024 * 10){
} else if (file.size > 1024 * 1024 * 10) {
this.$message.warning('文件大小不能超过10Mb')
fileList = fileList.filter(item => {
return item.uid != file.uid
})
}else if(file.name.length > 40){
} else if (file.name.length > 40) {
this.$message.warning('文件名长度不能超过40个字符')
fileList = fileList.filter(item => {
return item.uid != file.uid
})
}else if(fileListTemp.some(item =>item.name === file.name)){
} else if (fileListTemp.some(item => item.name === file.name)) {
this.$message.warning('文件名重复')
fileList = fileList.filter(item => {
return item.uid != file.uid
})
}
fileList.forEach(file=>{
if(extension === 'pdf'){
fileList.forEach(file => {
if (extension === 'pdf') {
this.urlTemp = require('../../../../assets/file.png');
}
@ -656,51 +712,88 @@ export default {
// ,getUnitList, getProjectList
async getUnitList() {
getUnitList({}).then((response) => {
this.unitList = response.data
})
// getUnitList({}).then((response) => {
// this.unitList = response.data
// })
getListUnite({projectId: null}).then((response) => {
this.uniteList = response.data;
});
},
async getProjectList() {
getProjectList({}).then((response) => {
this.projectList = response.data
})
// getProjectList({}).then((response) => {
// this.projectList = response.data
// })
getListProject({unitId: null}).then((response) => {
this.projectList = response.data;
});
},
uniteChange(val) {
// this.projectList = [];
if (val && val.length > 0) {
this.maForm.unitId = this.unitId[this.unitId.length - 1];
} else if (val && val.length == 0) {
this.maForm.unitId = "";
}
},
projectChange(val) {
if (val && val.length > 0) {
this.maForm.projectId = this.projectId[this.projectId.length - 1];
} else if (val && val.length == 0) {
this.maForm.projectId = "";
}
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.uploadKey = Date.now();
this.delBusinessFileIdList=[];
this.businessLicenseListTemp=[];
this.businessLicenseFileList=[];
this.delBusinessFileIdList = [];
this.businessLicenseListTemp = [];
this.businessLicenseFileList = [];
this.showHouse = true
this.showConfirmButton = true
this.title = '新增'
},
handleUpdate(row){
handleUpdate(row) {
this.reset()
this.uploadKey = Date.now();
this.delBusinessFileIdList=[];
this.businessLicenseListTemp=[];
this.businessLicenseFileList=[];
this.delBusinessFileIdList = [];
this.businessLicenseListTemp = [];
this.businessLicenseFileList = [];
var id = row.agreementId;
getAgreementDetail(id).then((response) => {
this.form = response.data;
this.form.proId = response.data.projectId;
if(response.data.bmFileInfos!=null){
this.maForm.unitId = response.data.unitId;
this.maForm.projectId = response.data.projectId;
this.unitId = this.treeParentsById(this.uniteList, this.maForm.unitId);
this.projectId = this.treeParentsById(
this.projectList,
this.maForm.projectId
);
console.log(this.maForm)
if (response.data.bmFileInfos != null) {
this.businessLicenseListTemp = response.data.bmFileInfos;
this.businessLicenseListTemp.forEach(item=>{
if(item.name.includes('/')){
this.businessLicenseListTemp.forEach(item => {
if (item.name.includes('/')) {
const fileNameWithTimestamp = item.name.split('/').pop();
const parts = fileNameWithTimestamp.split('_');
const fileType = item.name.split('.').pop();
const mainFileName = parts.slice(0, parts.length - 1).join('_');
item.name = mainFileName + '.' +fileType;
item.name = mainFileName + '.' + fileType;
}
})
}else{
} else {
this.businessLicenseListTemp = [];
}
this.showHouse = true
@ -709,27 +802,27 @@ export default {
})
},
handleAllImg(row){
handleAllImg(row) {
this.reset()
this.uploadKey = Date.now();
this.delBusinessFileIdList=[];
this.businessLicenseListTemp=[];
this.businessLicenseFileList=[];
this.delBusinessFileIdList = [];
this.businessLicenseListTemp = [];
this.businessLicenseFileList = [];
var id = row.agreementId;
getAgreementDetail(id).then((response) => {
if(response.data.bmFileInfos!=null){
if (response.data.bmFileInfos != null) {
this.businessLicenseListTemp = response.data.bmFileInfos;
this.businessLicenseListTemp.forEach(item=>{
if(item.name.includes('/')){
this.businessLicenseListTemp.forEach(item => {
if (item.name.includes('/')) {
const fileNameWithTimestamp = item.name.split('/').pop();
const parts = fileNameWithTimestamp.split('_');
const fileType = item.name.split('.').pop();
const mainFileName = parts.slice(0, parts.length - 1).join('_');
item.name = mainFileName + '.' +fileType;
item.name = mainFileName + '.' + fileType;
}
})
}else{
} else {
this.businessLicenseListTemp = [];
}
this.showHouse = false
@ -739,29 +832,36 @@ export default {
})
},
handleView(row){
handleView(row) {
this.reset()
this.uploadKey = Date.now();
this.delBusinessFileIdList=[];
this.businessLicenseListTemp=[];
this.businessLicenseFileList=[];
this.delBusinessFileIdList = [];
this.businessLicenseListTemp = [];
this.businessLicenseFileList = [];
var id = row.agreementId;
getAgreementDetail(id).then((response) => {
this.form = response.data;
this.form.proId = response.data.projectId;
if(response.data.bmFileInfos!=null){
this.maForm.unitId = response.data.unitId;
this.maForm.projectId = response.data.projectId;
this.unitId = this.treeParentsById(this.uniteList, this.maForm.unitId);
this.projectId = this.treeParentsById(
this.projectList,
this.maForm.projectId
);
if (response.data.bmFileInfos != null) {
this.businessLicenseListTemp = response.data.bmFileInfos;
this.businessLicenseListTemp.forEach(item=>{
if(item.name.includes('/')){
this.businessLicenseListTemp.forEach(item => {
if (item.name.includes('/')) {
const fileNameWithTimestamp = item.name.split('/').pop();
const parts = fileNameWithTimestamp.split('_');
const fileType = item.name.split('.').pop();
const mainFileName = parts.slice(0, parts.length - 1).join('_');
item.name = mainFileName + '.' +fileType;
item.name = mainFileName + '.' + fileType;
}
})
}else{
} else {
this.businessLicenseListTemp = [];
}
this.showHouse = true
@ -774,13 +874,19 @@ export default {
//
reset() {
this.form = {};
this.unitId = null;
this.projectId = null;
this.maForm = {
unitId: undefined,
projectId: undefined
};
this.resetForm("form");
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.keyWord=null;
this.queryParams.status=null;
this.queryParams.keyWord = null;
this.queryParams.status = null;
this.queryParams.time = [];
this.resetForm("queryForm");
this.handleQuery();
@ -788,27 +894,35 @@ export default {
//** */
submitForm() {
this.form.unitId = this.maForm.unitId;
this.form.projectId = this.maForm.projectId;
this.$refs["form"].validate(async valid => {
this.form.projectId = this.form.proId;
console.log("this.maForm", this.maForm)
console.log("this.form", this.form)
// this.form.projectId = this.form.proId;
if (valid) {
if (this.form.agreementId != undefined) {
this.form.projectName =null;
this.form.unitName =null;
// this.form.fileName =null;
const reqData = new FormData();
if(this.businessLicenseListTemp.length!=0){
await this.getImaUploadEdit(),
if (this.businessLicenseListTemp.length != 0) {
await this.getImaUploadEdit(),
await this.editAgreementTemp(this.form);
await this.deleteFile();
}else{
} else {
await this.editAgreementTemp(this.form);
await this.deleteFile();
}
} else {
console.log(1)
if(this.businessLicenseListTemp.length!=0){
if (this.businessLicenseListTemp.length != 0) {
console.log(2)
await this.getImaUpload(),
await this.getImaUpload(),
await this.addAgreementTemp(this.form);
}else{
} else {
console.log(3)
await this.addAgreementTemp(this.form);
}
@ -819,15 +933,15 @@ export default {
this.uploadKey = Date.now();
},
async getImaUpload(){
async getImaUpload() {
this.businessLicenseFileList = []
const reqData = new FormData()
const {fileTwo} = await this.getFileData()
let res = await imgUpLoadThree(fileTwo);
console.log('res',res)
console.log('res', res)
if (res.code === 200) {
res.data.forEach(item=>{
let objTwo = { 'name': item.name, 'url': item.url, 'taskType':10};
res.data.forEach(item => {
let objTwo = {'name': item.name, 'url': item.url, 'taskType': 10};
this.businessLicenseFileList.push(objTwo);
})
} else {
@ -835,21 +949,21 @@ export default {
}
},
async getImaUploadEdit(){
async getImaUploadEdit() {
this.businessLicenseFileList = []
const {fileTwo} = await this.getFileData()
console.log('fileTwo',fileTwo)
this.businessLicenseListTemp.forEach(item=>{
if(item.status=='success'){
let objThree = { 'name': item.name, 'url': item.url, 'taskType':10};
console.log('fileTwo', fileTwo)
this.businessLicenseListTemp.forEach(item => {
if (item.status == 'success') {
let objThree = {'name': item.name, 'url': item.url, 'taskType': 10};
this.businessLicenseFileList.push(objThree);
}
})
if(fileTwo.length!=0){
if (fileTwo.length != 0) {
let res = await imgUpLoadThree(fileTwo);
if (res.code === 200) {
res.data.forEach(item=>{
let objTwo = { 'name': item.name, 'url': item.url, 'taskType':10};
res.data.forEach(item => {
let objTwo = {'name': item.name, 'url': item.url, 'taskType': 10};
this.businessLicenseFileList.push(objTwo);
})
} else {
@ -858,34 +972,34 @@ export default {
}
},
async addAgreementTemp(form){
this.form.bmFileInfos=this.businessLicenseFileList
async addAgreementTemp(form) {
this.form.bmFileInfos = this.businessLicenseFileList
addAgreement(form).then(response => {
this.$modal.msgSuccess("新增成功");
this.showHouse = false;
this.getList();
this.delBusinessFileIdList=[];
this.businessLicenseListTemp=[];
this.businessLicenseFileList=[];
this.delBusinessFileIdList = [];
this.businessLicenseListTemp = [];
this.businessLicenseFileList = [];
});
},
async editAgreementTemp(form){
this.form.bmFileInfos=this.businessLicenseFileList
async editAgreementTemp(form) {
this.form.bmFileInfos = this.businessLicenseFileList
editAgreement(form).then(response => {
this.$modal.msgSuccess("修改成功");
this.showHouse = false;
this.getList();
this.delBusinessFileIdList=[];
this.businessLicenseListTemp=[];
this.businessLicenseFileList=[];
this.delBusinessFileIdList = [];
this.businessLicenseListTemp = [];
this.businessLicenseFileList = [];
});
},
async deleteFile(){
if(this.delBusinessFileIdList.length>0){
this.delBusinessFileIdList.forEach(async item=>{
async deleteFile() {
if (this.delBusinessFileIdList.length > 0) {
this.delBusinessFileIdList.forEach(async item => {
const urlcode = Base64.encode(item)
const urlen = encodeURIComponent(urlcode)
await deleteFile(urlen);
@ -919,9 +1033,9 @@ export default {
cancel() {
this.showHouse = false;
this.showAllImg = false;
this.delBusinessFileIdList=[];
this.businessLicenseListTemp=[]
this.businessLicenseFileList=[];
this.delBusinessFileIdList = [];
this.businessLicenseListTemp = []
this.businessLicenseFileList = [];
this.uploadKey = Date.now();
this.reset();
},
@ -938,7 +1052,8 @@ export default {
this.$modal.msgSuccess('删除成功')
this.getList()
})
.catch(() => {})
.catch(() => {
})
},
handleExport() {
@ -953,6 +1068,24 @@ export default {
this.getList();
},
//
treeParentsById(list, id) {
for (let i in list) {
if (list[i].id == id) {
//value
return [list[i].id];
}
if (list[i].children) {
let node = this.treeParentsById(list[i].children, id);
if (node !== undefined) {
//
node.unshift(list[i].id);
return node;
}
}
}
},
}
};
</script>
@ -963,38 +1096,47 @@ export default {
align-items: center;
justify-content: center;
}
.deviceCode {
margin-top: 10px;
padding-bottom: 20px;
font-size: 18px;
}
::v-deep.el-table .fixed-width .el-button--mini {
width: 60px !important;
margin-bottom: 10px;
}
//css
::v-deep.disabled {
.el-upload--picture-card {
display: none;
}
}
::v-deep .el-upload-list--picture-card{
::v-deep .el-upload-list--picture-card {
display: flex;
}
::v-deep .el-upload-list__item {
margin-bottom: 20px;
overflow: revert;
}
::v-deep .el-upload-list__item-actions{
overflow:hidden;
::v-deep .el-upload-list__item-actions {
overflow: hidden;
}
.upload-demo{
.upload-demo {
display: flex;
}
.el-upload-list__item-thumbnail{
height: 145px!important;
.el-upload-list__item-thumbnail {
height: 145px !important;
}
.picture-card-container{
.picture-card-container {
width: 100%;
height: 100%;
display: flex;
@ -1002,15 +1144,17 @@ export default {
align-items: center;
position: relative;
}
.picture-card{
.picture-card {
width: 100%;
height: 100%;
object-fit:cover;
object-fit: cover;
justify-content: center;
// border: 1px solid #ddd;
// border-radius: 4px;
}
.file-name{
.file-name {
width: 90%;
white-space: nowrap;
overflow: hidden;
@ -1020,10 +1164,11 @@ export default {
margin-top: 8px;
text-align: center;
font-size: 12px;
color:#333;
color: #333;
z-index: 999999;
}
.file-overlay{
.file-overlay {
position: absolute;
top: 0;
left: 0;