jsk 问题修改
This commit is contained in:
parent
883eb118d9
commit
0e01d81952
|
|
@ -3964,9 +3964,10 @@ export function delContractTemplate (data) {
|
|||
data
|
||||
})
|
||||
}
|
||||
export function geturld (url) {
|
||||
export function dolContractTemplate (data) {
|
||||
return request({
|
||||
url: url,
|
||||
method: 'post'
|
||||
url: '/greenH5/greenWebmodul/rest/house/dolContractTemplate',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,65 +1,145 @@
|
|||
<template>
|
||||
<el-container class="container">
|
||||
<el-header class="filter-container">
|
||||
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="formInline"
|
||||
class="demo-form-inline"
|
||||
>
|
||||
<!-- <el-row> -->
|
||||
<div>
|
||||
<el-form-item label="申请人" class="form-flex">
|
||||
<el-form-item
|
||||
label="申请人"
|
||||
class="form-flex"
|
||||
>
|
||||
<el-input
|
||||
@input="e => formInline.userName = validForbid(e)"
|
||||
:value="formInline.userName"
|
||||
maxlength="20"
|
||||
placeholder="请输入申请人姓名"
|
||||
></el-input>
|
||||
@input="e => formInline.userName = validForbid(e)"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="人员类别" class="form-flex">
|
||||
<el-select v-model="formInline.userType" placeholder="请选择类别" >
|
||||
<el-option :label="item.NAME" :value="item.VALUE" v-for="item in userType" :key="item.VALUE"></el-option>
|
||||
<el-form-item
|
||||
label="人员类别"
|
||||
class="form-flex"
|
||||
>
|
||||
<el-select
|
||||
v-model="formInline.userType"
|
||||
placeholder="请选择类别"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in userType"
|
||||
:key="item.VALUE"
|
||||
:label="item.NAME"
|
||||
:value="item.VALUE"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="房产类别" class="form-flex">
|
||||
<el-select v-model="formInline.houseType" placeholder="请选择类别" >
|
||||
<el-option :label="item.NAME" :value="item.VALUE" v-for="item in houseType" :key="item.VALUE"></el-option>
|
||||
<el-form-item
|
||||
label="房产类别"
|
||||
class="form-flex"
|
||||
>
|
||||
<el-select
|
||||
v-model="formInline.houseType"
|
||||
placeholder="请选择类别"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in houseType"
|
||||
:key="item.VALUE"
|
||||
:label="item.NAME"
|
||||
:value="item.VALUE"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请状态" class="form-flex">
|
||||
<el-select v-model="formInline.examineState" placeholder="请选择类别" >
|
||||
<el-option label="全部" value="" ></el-option>
|
||||
<el-option label="待审核" value="0" ></el-option>
|
||||
<el-option label="审核中" value="8" ></el-option>
|
||||
<el-option label="已拒绝" value="2" ></el-option>
|
||||
<el-form-item
|
||||
label="申请状态"
|
||||
class="form-flex"
|
||||
>
|
||||
<el-select
|
||||
v-model="formInline.examineState"
|
||||
placeholder="请选择类别"
|
||||
>
|
||||
<el-option
|
||||
label="全部"
|
||||
value=""
|
||||
/>
|
||||
<el-option
|
||||
label="待审核"
|
||||
value="0"
|
||||
/>
|
||||
<el-option
|
||||
label="审核中"
|
||||
value="8"
|
||||
/>
|
||||
<el-option
|
||||
label="已拒绝"
|
||||
value="2"
|
||||
/>
|
||||
<!-- <el-option label="已选房" value="3" ></el-option> -->
|
||||
<el-option label="退租待审核" value="4" ></el-option>
|
||||
<el-option label="已结束" value="5" ></el-option>
|
||||
<el-option
|
||||
label="退租待审核"
|
||||
value="4"
|
||||
/>
|
||||
<el-option
|
||||
label="已结束"
|
||||
value="5"
|
||||
/>
|
||||
<!-- <el-option label="退租已拒绝" value="6" ></el-option> -->
|
||||
<el-option label="已入住" value="7" ></el-option>
|
||||
<el-option
|
||||
label="已入住"
|
||||
value="7"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<br>
|
||||
<el-form-item label="小区名称" class="form-flex">
|
||||
<el-form-item
|
||||
label="小区名称"
|
||||
class="form-flex"
|
||||
>
|
||||
<el-input
|
||||
@input="e => formInline.houseName = validForbid(e)"
|
||||
:value="formInline.houseName"
|
||||
maxlength="20"
|
||||
placeholder="请输入小区名称"
|
||||
></el-input>
|
||||
@input="e => formInline.houseName = validForbid(e)"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出租年份" class="form-flex">
|
||||
<el-date-picker
|
||||
v-model="formInline.year" :clearable="false"
|
||||
type="year" value-format="yyyy" :editable="false"
|
||||
placeholder="选择出租年份">
|
||||
</el-date-picker>
|
||||
<el-form-item
|
||||
label="出租年份"
|
||||
class="form-flex"
|
||||
>
|
||||
<el-date-picker
|
||||
v-model="formInline.year"
|
||||
:clearable="false"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
:editable="false"
|
||||
placeholder="选择出租年份"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<!-- </el-row> -->
|
||||
<!-- <el-row> -->
|
||||
<div>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit()">查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="onSubmit()"
|
||||
>
|
||||
查询
|
||||
</el-button>
|
||||
<!-- <el-button type="primary" @click="addHouse()">添加</el-button> -->
|
||||
<el-button type="primary" @click="onOut">导出</el-button>
|
||||
<el-button type="primary" @click="onOutContract">合同导出</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="onOut"
|
||||
>
|
||||
导出
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="onOutContract"
|
||||
>
|
||||
合同导出
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<!-- </el-row> -->
|
||||
|
|
@ -68,19 +148,31 @@
|
|||
<!-- max-height="500" -->
|
||||
<div class="table">
|
||||
<el-table
|
||||
:element-loading-text="loadingMsg"
|
||||
v-loading="loading"
|
||||
:element-loading-text="loadingMsg"
|
||||
:data="tableData"
|
||||
stripe
|
||||
border
|
||||
style="width:100%"
|
||||
>
|
||||
<el-table-column fixed prop="num" label="序号" min-width="50" width="50">
|
||||
<el-table-column
|
||||
fixed
|
||||
prop="num"
|
||||
label="序号"
|
||||
min-width="50"
|
||||
width="50"
|
||||
>
|
||||
<template
|
||||
slot-scope="scope"
|
||||
>{{ page.sizePage*((page.limit==0?1:page.limit)-1)+(scope.$index+1) }}</template>
|
||||
>
|
||||
{{ page.sizePage*((page.limit==0?1:page.limit)-1)+(scope.$index+1) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="USER_NAME" label="申请人" min-width="150">
|
||||
<el-table-column
|
||||
prop="USER_NAME"
|
||||
label="申请人"
|
||||
min-width="150"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
|
|
@ -89,13 +181,22 @@
|
|||
trigger="hover"
|
||||
:content="scope.row.USER_NAME"
|
||||
>
|
||||
<div class="maxsize" slot="reference">{{scope.row.USER_NAME}}</div>
|
||||
<div
|
||||
slot="reference"
|
||||
class="maxsize"
|
||||
>
|
||||
{{ scope.row.USER_NAME }}
|
||||
</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column prop="ORG_NAME" label="所属部门" min-width="150">
|
||||
|
||||
|
||||
<el-table-column
|
||||
prop="ORG_NAME"
|
||||
label="所属部门"
|
||||
min-width="150"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
|
|
@ -104,13 +205,22 @@
|
|||
trigger="hover"
|
||||
:content="scope.row.ORG_NAME"
|
||||
>
|
||||
<div class="maxsize" slot="reference">{{scope.row.ORG_NAME}}</div>
|
||||
<div
|
||||
slot="reference"
|
||||
class="maxsize"
|
||||
>
|
||||
{{ scope.row.ORG_NAME }}
|
||||
</div>
|
||||
</el-popover>
|
||||
<!-- <a @click.prevent="view(scope.row)"
|
||||
class="buttonText">{{scope.row.title}}</a> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="PHONE" label="联系方式" min-width="150">
|
||||
<el-table-column
|
||||
prop="PHONE"
|
||||
label="联系方式"
|
||||
min-width="150"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
|
|
@ -119,17 +229,34 @@
|
|||
trigger="hover"
|
||||
:content="scope.row.PHONE"
|
||||
>
|
||||
<div class="maxsize" slot="reference">{{scope.row.PHONE}}</div>
|
||||
<div
|
||||
slot="reference"
|
||||
class="maxsize"
|
||||
>
|
||||
{{ scope.row.PHONE }}
|
||||
</div>
|
||||
</el-popover>
|
||||
<!-- <a @click.prevent="view(scope.row)"
|
||||
class="buttonText">{{scope.row.title}}</a> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="USER_TYPE" label="申请人员类型" min-width="100" :formatter="formatUser">
|
||||
</el-table-column>
|
||||
<el-table-column prop="HOUSE_TYPE" label="申请房屋类型" min-width="100" :formatter="formatType">
|
||||
</el-table-column>
|
||||
<el-table-column prop="houseName" label="申请房屋名称" min-width="100">
|
||||
<el-table-column
|
||||
prop="USER_TYPE"
|
||||
label="申请人员类型"
|
||||
min-width="100"
|
||||
:formatter="formatUser"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="HOUSE_TYPE"
|
||||
label="申请房屋类型"
|
||||
min-width="100"
|
||||
:formatter="formatType"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="houseName"
|
||||
label="申请房屋名称"
|
||||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
|
|
@ -138,16 +265,34 @@
|
|||
trigger="hover"
|
||||
:content="scope.row.houseName"
|
||||
>
|
||||
<div class="maxsize" slot="reference">{{scope.row.houseName}}</div>
|
||||
<div
|
||||
slot="reference"
|
||||
class="maxsize"
|
||||
>
|
||||
{{ scope.row.houseName }}
|
||||
</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="contractStartTime" label="合同期限" min-width="200">
|
||||
<el-table-column
|
||||
prop="contractStartTime"
|
||||
label="合同期限"
|
||||
min-width="200"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div class="maxsize" slot="reference">{{scope.row.contractStartTime ? scope.row.contractStartTime+'~'+scope.row.contractEndTime : '/'}}</div>
|
||||
<div
|
||||
slot="reference"
|
||||
class="maxsize"
|
||||
>
|
||||
{{ scope.row.contractStartTime ? scope.row.contractStartTime+'~'+scope.row.contractEndTime : '/' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间" min-width="150">
|
||||
<el-table-column
|
||||
prop="applyTime"
|
||||
label="申请时间"
|
||||
min-width="150"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
|
|
@ -156,14 +301,26 @@
|
|||
trigger="hover"
|
||||
:content="scope.row.applyTime"
|
||||
>
|
||||
<div class="maxsize" slot="reference">{{scope.row.applyTime}}</div>
|
||||
<div
|
||||
slot="reference"
|
||||
class="maxsize"
|
||||
>
|
||||
{{ scope.row.applyTime }}
|
||||
</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="EXAMINE_STATE" label="审批状态" min-width="100" :formatter="formatStatus">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column prop="state" label="合同状态" min-width="100">
|
||||
<el-table-column
|
||||
prop="EXAMINE_STATE"
|
||||
label="审批状态"
|
||||
min-width="100"
|
||||
:formatter="formatStatus"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="state"
|
||||
label="合同状态"
|
||||
min-width="100"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
|
|
@ -172,20 +329,35 @@
|
|||
trigger="hover"
|
||||
:content="scope.row.state"
|
||||
>
|
||||
<div class="maxsize" slot="reference">{{scope.row.state}}</div>
|
||||
<div
|
||||
slot="reference"
|
||||
class="maxsize"
|
||||
>
|
||||
{{ scope.row.state }}
|
||||
</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" min-width="190">
|
||||
|
||||
<el-table-column
|
||||
label="操作"
|
||||
min-width="190"
|
||||
>
|
||||
<template slot-scope="{row}">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handleUpdate(row)"
|
||||
>查看</el-button>
|
||||
<el-button type="primary" size="mini" @click="onOutFile(row)"
|
||||
>合同导出</el-button>
|
||||
>
|
||||
查看
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="onOutFile(row)"
|
||||
>
|
||||
合同导出
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
v-if="row.EXAMINE_STATE==3"
|
||||
size="mini"
|
||||
|
|
@ -195,7 +367,7 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
|
||||
<Popup
|
||||
v-if="validation"
|
||||
:contents="nav"
|
||||
|
|
@ -207,13 +379,12 @@
|
|||
<!-- 分页 -->
|
||||
<div class="foot-total">
|
||||
<Paging
|
||||
@currentChanges="currentChanges"
|
||||
:pageNum="parseInt(page.limit)"
|
||||
:page-num="parseInt(page.limit)"
|
||||
:size="parseInt(page.sizePage)"
|
||||
:total="parseInt(page.total)"
|
||||
@currentChanges="currentChanges"
|
||||
/>
|
||||
</div>
|
||||
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
|
|
@ -227,7 +398,7 @@ export default {
|
|||
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
loading: false,
|
||||
loadingMsg: "",
|
||||
row: {},
|
||||
fileList: [],
|
||||
|
|
@ -236,8 +407,8 @@ export default {
|
|||
nav: "是否删除?",
|
||||
|
||||
formInline: {
|
||||
// houseName:"",//小区名称
|
||||
// year:"",//出租年份
|
||||
houseName:"",//小区名称
|
||||
year:"",//出租年份
|
||||
userName: "",
|
||||
houseType:"",
|
||||
userType:"",
|
||||
|
|
@ -268,7 +439,7 @@ export default {
|
|||
};
|
||||
},
|
||||
created(){
|
||||
window.addEventListener('keydown',this.handleKeyDown,true)
|
||||
window.addEventListener('keydown',this.handleKeyDown,true);
|
||||
},
|
||||
mounted() {
|
||||
this.createLoad();
|
||||
|
|
@ -315,14 +486,14 @@ export default {
|
|||
formatStatus(row,column){
|
||||
let status = row.EXAMINE_STATE;
|
||||
let batch = row.EXAMINE_BATCH;
|
||||
if(status==0&&batch==1){return '待审核'}
|
||||
if(status==0&&batch>1){return '审核中'}
|
||||
if(status==1){return '审核中'}
|
||||
if(status==2){return '已拒绝'}
|
||||
if(status==4){return '退租待审核'}
|
||||
if(status==5){return '已结束'}
|
||||
if(status==0&&batch==1){return '待审核';}
|
||||
if(status==0&&batch>1){return '审核中';}
|
||||
if(status==1){return '审核中';}
|
||||
if(status==2){return '已拒绝';}
|
||||
if(status==4){return '退租待审核';}
|
||||
if(status==5){return '已结束';}
|
||||
// if(status==6){return '退租未通过'}
|
||||
if(status==7){return '已入住'}
|
||||
if(status==7){return '已入住';}
|
||||
// for(let obj of this.examineStatus){
|
||||
// if(status == obj.id){
|
||||
// return obj.name;
|
||||
|
|
@ -347,9 +518,9 @@ export default {
|
|||
this.model = res.returnData.data;
|
||||
}else if(e=='userType'){
|
||||
this.userType = res.returnData.data;
|
||||
console.log(this.userType)
|
||||
console.log(this.userType);
|
||||
}
|
||||
|
||||
|
||||
//this.parentdata = res.returnData.data;
|
||||
}
|
||||
})
|
||||
|
|
@ -399,7 +570,7 @@ export default {
|
|||
if (res.returnCode == "1") {
|
||||
this.clearLoad();
|
||||
this.tableData = res.returnData.data;
|
||||
console.log(this.tableData)
|
||||
console.log(this.tableData);
|
||||
this.page.total = res.returnData.total;
|
||||
this.page.limit = res.returnData.currentPage;
|
||||
this.tableData.id = res.returnData.data.id;
|
||||
|
|
@ -411,7 +582,7 @@ export default {
|
|||
setTimeout(() => {
|
||||
this.clearLoad();
|
||||
}, 300);
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
|
|
@ -454,7 +625,7 @@ export default {
|
|||
let Content = {
|
||||
id: this.row.id
|
||||
};
|
||||
|
||||
|
||||
deleteSeekMedicalInfo(Content)
|
||||
.then(res => {
|
||||
if (res.returnCode == "1") {
|
||||
|
|
@ -507,7 +678,7 @@ export default {
|
|||
"&examineState=" +
|
||||
this.formInline.examineState;
|
||||
|
||||
let url =process.env.VUE_APP_BASE_API +
|
||||
let url =process.env.VUE_APP_BASE_API +
|
||||
"/greenH5/greenWebmodul/rest/house/exportByExcel?" + str;
|
||||
window.location.href = url;
|
||||
}
|
||||
|
|
@ -530,18 +701,18 @@ export default {
|
|||
"&examineState=" +
|
||||
this.formInline.examineState;
|
||||
|
||||
let url =process.env.VUE_APP_BASE_API +
|
||||
let url =process.env.VUE_APP_BASE_API +
|
||||
"/greenH5/greenWebmodul/rest/house/exportByExcel?" + str;
|
||||
window.location.href = url;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
onOutFile(row) {
|
||||
Own().then(res => {
|
||||
if (res.returnCode === "1") {
|
||||
var str =
|
||||
"id=" + row.ID
|
||||
let url =process.env.VUE_APP_BASE_API +
|
||||
var str =
|
||||
"id=" + row.ID;
|
||||
let url =process.env.VUE_APP_BASE_API +
|
||||
"/greenH5/greenWebmodul/rest/house/downloadContract?" + str;
|
||||
window.location.href = url;
|
||||
}
|
||||
|
|
@ -554,8 +725,8 @@ export default {
|
|||
const id = 1;
|
||||
this.$router.push({
|
||||
path: `/addHouse`,
|
||||
query: {
|
||||
til: "添加",
|
||||
query: {
|
||||
til: "添加",
|
||||
id: id,
|
||||
houseType:JSON.stringify(this.houseType),
|
||||
status: JSON.stringify(this.status),
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@
|
|||
<script>
|
||||
import Paging from "@/views/Public/paging.vue";
|
||||
import {
|
||||
getContractTemplate,delContractTemplate,geturld
|
||||
getContractTemplate,delContractTemplate
|
||||
} from "@/api/getdata";
|
||||
import Popup from "@/views/estate/examine/dialog/popup.vue";
|
||||
export default {
|
||||
|
|
@ -317,68 +317,43 @@ export default {
|
|||
},
|
||||
//预览
|
||||
handleView(row, index) {
|
||||
this.iframeUrl=row.FILEPATH;
|
||||
this.iframeUrl="data:application/pdf;base64,"+row.FILEBASE;
|
||||
this.$refs.myDialog.showModal();
|
||||
},
|
||||
findThirdOccurrence(str, char) {
|
||||
let count = 0; // 计数器,用于记录相同字符出现的次数
|
||||
let index = -1; // 初始化索引为-1,表示未找到
|
||||
// 遍历字符串
|
||||
for (let i = 0; i < str.length; i++) {
|
||||
if (str[i] === char) {
|
||||
count++; // 每当找到一个相同字符,计数器加1
|
||||
if (count === 3) { // 如果已经找到第三个相同字符
|
||||
index = i; // 记录当前索引
|
||||
break; // 退出循环
|
||||
}
|
||||
}
|
||||
// base64转换blob
|
||||
base64ToArrayBuffer(base64) {
|
||||
var bloBString = window.atob(base64);
|
||||
var bloBLen = bloBString .length;
|
||||
var bytes = new Uint8Array(bloBLen);
|
||||
for (var i = 0; i < bloBLen; i++) {
|
||||
var ascii = bloBString .charCodeAt(i);
|
||||
bytes[i] = ascii;
|
||||
}
|
||||
return index; // 返回索引值,如果未找到则为-1
|
||||
},
|
||||
return bytes;
|
||||
},
|
||||
//下载
|
||||
handleDownLoad(row, index) {
|
||||
// var urld=row.FILEPATH;
|
||||
// console.log("findThirdOccurrence(urld,/)",this.findThirdOccurrence(urld,"/"));
|
||||
// console.log(urld.substring(this.findThirdOccurrence(urld,"/")));
|
||||
// let fileUrl = urld.substring(this.findThirdOccurrence(urld,"/"));
|
||||
// geturld(fileUrl).then(res => {
|
||||
// console.log(res,"res");
|
||||
// })
|
||||
// .catch(err => {
|
||||
// console.log(err);
|
||||
// setTimeout(() => {
|
||||
// this.clearLoad();
|
||||
// }, 300);
|
||||
// });
|
||||
// axios.post('http://192.168.222.232:8989/greenH5/greenWebmodul/rest/greenAccessManager/getScoreDetail',Content).then((res)=>{
|
||||
// console.log(res,111)
|
||||
// })
|
||||
// var urld=row.FILEPATH;
|
||||
// console.log("findThirdOccurrence(urld,/)",this.findThirdOccurrence(urld,"/"));
|
||||
// console.log(urld.substring(this.findThirdOccurrence(urld,"/")));
|
||||
// let fileUrl = urld.substring(this.findThirdOccurrence(urld,"/")); //所下载文件的网络地址
|
||||
// let fileName =row.TEMPNAME+".pdf"; //下载成功后保存的文件名
|
||||
// const link = document.createElement('a');
|
||||
// link.target = '_blank'; //如果该值为‘_self'该行可忽略
|
||||
// link.style.display = 'none';
|
||||
// fetch(fileUrl).then(res => res.blob()).then((blob) => {
|
||||
// link.href = URL.createObjectURL(blob);
|
||||
// link.download = fileName + '.pdf';
|
||||
// document.body.appendChild(link);
|
||||
// link.click();
|
||||
// link.remove();
|
||||
// });
|
||||
var urld=row.FILEPATH;
|
||||
let fileUrl = process.env.VUE_APP_BASE_API+urld.substring(this.findThirdOccurrence(urld,"/")); //所下载文件的网络地址
|
||||
console.log(fileUrl);
|
||||
const link = document.createElement('a');
|
||||
link.target = '_blank';
|
||||
link.href =fileUrl;
|
||||
let fileName = row.TEMPNAME+".pdf"; //保存到本地的文件名称
|
||||
link.setAttribute('download', fileName);
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
link.remove();
|
||||
// 创建a标签
|
||||
const link = document.createElement("a");
|
||||
// 获取数据量
|
||||
const blob = new Blob([this.base64ToArrayBuffer(row.FILEBASE)]);
|
||||
// 下载文件
|
||||
const objectUrl = URL.createObjectURL(blob);
|
||||
link.href = objectUrl;
|
||||
link.setAttribute("download", row.TEMPNAME+".pdf");
|
||||
link.click();
|
||||
URL.revokeObjectURL(objectUrl);
|
||||
// var urld=row.FILEPATH;
|
||||
// let fileUrl = process.env.VUE_APP_BASE_API+urld.substring(this.findThirdOccurrence(urld,"/")); //所下载文件的网络地址
|
||||
// console.log(fileUrl);
|
||||
// const link = document.createElement('a');
|
||||
// link.target = '_blank';
|
||||
// link.href =fileUrl;
|
||||
// let fileName = row.TEMPNAME+".pdf"; //保存到本地的文件名称
|
||||
// link.setAttribute('download', fileName);
|
||||
// document.body.appendChild(link);
|
||||
// link.click();
|
||||
// link.remove();
|
||||
},
|
||||
//删除
|
||||
closeDialogDel(val) {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<el-input
|
||||
v-model="ruleForm.tempName"
|
||||
maxlength="20"
|
||||
placeholder="请输入房屋名称"
|
||||
placeholder="请输入合同模板名称"
|
||||
size="medium"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -98,7 +98,6 @@
|
|||
til: "添加",
|
||||
id: "",
|
||||
ruleForm: {
|
||||
//房屋信息
|
||||
tempName: "",
|
||||
userPosition:"",
|
||||
file: this.file
|
||||
|
|
@ -111,10 +110,10 @@
|
|||
|
||||
rules: {
|
||||
tempName: [
|
||||
{ required: true, message: "请输入房屋名称", trigger: "blur" }
|
||||
{ required: true, message: "请输入合同模板名称", trigger: "blur" }
|
||||
],
|
||||
userPosition: [
|
||||
{ required: true, message: "请上传采购清单附件", trigger: "blur" },
|
||||
{ required: true, message: "请上传合同模板附件", trigger: "blur" },
|
||||
{ validator: userPositionAll, trigger: "blur" }
|
||||
]
|
||||
},
|
||||
|
|
@ -168,7 +167,6 @@
|
|||
this.$refs["ruleForm"].resetFields();
|
||||
});
|
||||
} else {
|
||||
this.clearLoad();
|
||||
this.$message({
|
||||
message: res.returnMsg,
|
||||
type: "warning"
|
||||
|
|
@ -222,7 +220,7 @@
|
|||
this.file = "";
|
||||
this.ruleForm.userPosition = "";
|
||||
this.$message({
|
||||
message: "请选择 doc|docx 格式",
|
||||
message: "请选择 pdf 格式",
|
||||
type: "warning"
|
||||
});
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue