租赁意向人群统计
diff --git a/admin-web-master/src/views/shopRental/manage/index.vue b/admin-web-master/src/views/shopRental/manage/index.vue
index b6f895a..a7aa212 100644
--- a/admin-web-master/src/views/shopRental/manage/index.vue
+++ b/admin-web-master/src/views/shopRental/manage/index.vue
@@ -13,8 +13,16 @@
+
+
+
+
+
+
+
+
-
+
查询
@@ -86,6 +94,7 @@
查看
+ OA
合同变更
合同续约
合同终止
@@ -162,15 +171,16 @@
cereContractInformation
} from '@/api/commodityLease.js'
import {
- modifyResourceStatus
+ modifyResourceStatus,general
} from '@/api/newly.js'
+ import axios from 'axios'
export default {
data() {
return {
contractChangeReason: '',
detailsinfo: {},
pagequery: {
- dataStatus:'1',
+ // dataStatus:'1',
pageNumber: 0,
pageSize: 10,
contractName: ''
@@ -190,6 +200,86 @@
this.getAll()
},
methods: {
+ async OA(row){
+ const response = await axios.get(this.$baseURL+row.appendicesContract);
+
+ // 处理二进制数据
+ const blob = response.data;
+ console.log(blob);
+ // return
+ const base64Data = Buffer.from(blob, 'binary').toString('base64');
+ console.log(base64Data);
+ // return
+ const file = new File([blob], 'filename.txt', { type: 'text/plain' });
+ console.log(file);
+ let fd = new FormData();
+ fd.append('fileBytes', file); // 假设 formData 包含文件
+ fd.append('fileName', '"合同.txt"');
+ console.log(fd);
+ let c1 = {
+ "title":"这是一个流程",
+ "files": [
+ {
+ fileName:'合同.txt',
+ fileBytes:base64Data
+ // fileBytes:'Y4EdWbGGg6gsD4eHlUR3aUmr0Xz050KI'
+ }
+ ],
+ "reviewers": ["1768540680428331008"],
+ // "account":"zsfu-test",
+ // "password":"000009",
+ // "accessKey":"HfHJ1cDCX4PuwSC5hox0cvJCdvnNFGOC",
+ // "secretAccessKey":"t05ebUtKp06004E90bfUBv1145R49Zg4",
+ // "sponsor":"1858710592190291968",
+ // // "id":"5c19f869063e57766b127177143e5c5d",
+ // "isonData":"这里是外部系统需要传递数据集合",
+ // "messageId":"外部系统唯一id",
+ // "reviewers":['1768540680428331008','1768539930201563136']
+ }
+ // c1.files.push(fd)
+ console.log(c1);
+ general(c1).then(res => {
+
+ })
+ return
+ // URL.createObjectURL(this.$baseURL+row.appendicesContract)
+ const xhr = new XMLHttpRequest();
+ xhr.open('GET', this.$baseURL+row.appendicesContract, true);
+ xhr.responseType = 'blob'; // 设置响应类型为 blob
+
+ xhr.onload = () => {
+ if (xhr.status === 200) {
+ const blob = xhr.response;
+ console.log(blob);
+ // general({
+ // "title":"这是一个流程",
+ // "files": [{
+ // "fileBytes":blob,
+ // "fileName":"合同.txt"
+ // }]
+ // }).then(res => {
+
+ // })
+ // 如果需要保存文件,可以创建一个 URL 对象并下载
+ const url = window.URL.createObjectURL(blob);
+ const link = document.createElement('a');
+ link.href = url;
+ console.log(link);
+ link.setAttribute('download', 'filename.ext'); // 设置下载的文件名
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ } else {
+ console.error('下载文件时出错:', xhr.status);
+ }
+ };
+
+ xhr.onerror = () => {
+ console.error('下载文件时出错');
+ };
+
+ xhr.send();
+ },
gettime() {
// 获取当前时间
let currentTime = new Date();
@@ -307,7 +397,7 @@
this.pagequery = {
pageNumber: 0,
pageSize: 10,
- dataStatus:'1',
+ dataStatus:'',
contractName: ''
},
this.getAll()