From afc5cb269e3cc4eaa1238cb191c656fda9df23f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=9E=E4=B8=9C=E6=97=AD?= <850374051@qq.com> Date: Thu, 14 Sep 2023 15:42:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E6=9D=83=E4=BA=A4=E6=98=93=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E8=BF=9B=E5=BA=A6=E3=80=81=E9=A1=B9=E7=9B=AE=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E5=AD=97=E6=AE=B5=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/project/projectDetail.vue | 5 +- src/views/user/index.vue | 109 +++++++++++++++++++++++++++- 2 files changed, 111 insertions(+), 3 deletions(-) diff --git a/src/views/project/projectDetail.vue b/src/views/project/projectDetail.vue index 57db1e2e..703829b1 100644 --- a/src/views/project/projectDetail.vue +++ b/src/views/project/projectDetail.vue @@ -133,7 +133,10 @@ 授权情况{{ detail.authorization }} - 拟流转用途{{ detail.contractPurpose }} + {{detail.projectNumber == '小微工程' ? '工程内容':'拟流转土地用途'}}{{ detail.contractPurpose }} + + + {{detail.projectNumber == '小微工程' ? '承包范围':'其它需要披露的事项'}}{{ detail.cracksEvents }} 受让方条件{{ detail.condition }} diff --git a/src/views/user/index.vue b/src/views/user/index.vue index bf0852ee..3422ef5d 100644 --- a/src/views/user/index.vue +++ b/src/views/user/index.vue @@ -7,7 +7,16 @@ -

{{phone}}

+

+ {{phone}} + + {{ + activitiStatus == '1' ? '待审': + activitiStatus == '2' ? '驳回': + activitiStatus == '3' ? '通过':'' + }} + +

账户设置

@@ -21,6 +30,20 @@ 退出登录 + +
+ + + + + + + + + + +
+
@@ -28,6 +51,7 @@ import { getMember , supplyList , deleteSupply} from "@/api/user/index"; import { logout ,getInfo } from "@/api/login/index"; import Cookies from "js-cookie"; +import request from "@/utils/request"; export default { name: "user", @@ -35,12 +59,40 @@ export default { return { phone:'', user:'', + activitiStatus:'', + instanceId:'', + historyList:[], + openView:false }; }, created() { this.getInfo(); }, methods: { + getHistoryList: function () { + this.loading = true; + var queryParams = { + processInstanceId: this.instanceId + }; + return request({ + url: "/activiti/process/listHistory", + method: "post", + data: queryParams, + }) + .then((response) => { + this.historyList = response.rows; + this.historyList.forEach((row) => { + row.startTime = this.format(row.startTime, "yyyy-MM-dd HH:mm:ss"); + row.endTime = this.format(row.endTime, "yyyy-MM-dd HH:mm:ss"); + row.durationInMillis = this.formatTotalDateSub( + row.durationInMillis / 1000 + ); + }); + this.total = response.total; + this.loading = false; + }) + .then(() => {}); + }, loginOut(){ logout().then(response => { var keys = document.cookie.match(/[^ =;]+(?=\=)/g); @@ -59,9 +111,52 @@ export default { console.log(response) Cookies.set('memberId',response.data.id) this.phone = response.data.phone; + this.activitiStatus = response.data.activitiStatus; + this.instanceId = response.data.instanceId; + this.getHistoryList() }); }); }, + format(time, format) { + var t = new Date(time); + var tf = function (i) { return (i < 10 ? '0' : '') + i }; + return format.replace(/yyyy|MM|dd|HH|mm|ss/g, function (a) { + switch (a) { + case 'yyyy': + return tf(t.getFullYear()); + break; + case 'MM': + return tf(t.getMonth() + 1); + break; + case 'mm': + return tf(t.getMinutes()); + break; + case 'dd': + return tf(t.getDate()); + break; + case 'HH': + return tf(t.getHours()); + break; + case 'ss': + return tf(t.getSeconds()); + break; + } + }) + }, + /** + * 计算出相差天数 + * @param secondSub + */ + formatTotalDateSub (secondSub) { + var days = Math.floor(secondSub / (24 * 3600)); // 计算出小时数 + var leave1 = secondSub % (24*3600) ; // 计算天数后剩余的毫秒数 + var hours = Math.floor(leave1 / 3600); // 计算相差分钟数 + var leave2 = leave1 % (3600); // 计算小时数后剩余的毫秒数 + var minutes = Math.floor(leave2 / 60); // 计算相差秒数 + var leave3 = leave2 % 60; // 计算分钟数后剩余的毫秒数 + var seconds = Math.round(leave3); + return days + "天" + hours + "时" + minutes + "分" + seconds + '秒'; + }, }, }; @@ -69,6 +164,16 @@ export default {