@@ -144,6 +142,14 @@ export default {
methods: {
getDetail(){
schemeDetail(this.$route.query.id).then(response => {
+ response.data.historicActivityList.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.schemeOption = response.data;
});
},
@@ -167,11 +173,55 @@ export default {
}).then((response) => {
if (response.code == 200 && response.msg == "操作成功") {
this.$notify({ type: 'success' , message: "操作成功" });
+ setTimeout(function () {
+ history.back(-1);
+ },1000)
} else {
this.$notify({ type: 'danger' , message: "操作失败" });
}
});
},
+
+ 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 + '秒';
+ },
},
};
@@ -181,6 +231,10 @@ export default {
font-family: SourceHanSansCNBold;
src: url("../../../assets/fonts/SourceHanSansCN-Bold.otf");
}
+.van-row{
+ display: flex;
+ flex-wrap: wrap;
+}
.app-container {
padding: 0;
padding-bottom: 1%;
@@ -435,18 +489,22 @@ export default {
right: -8PX;
}
.van-col{
- height: 76PX;
position: relative;
}
+ .van-col--20{
+ padding: 12PX 0;
+ }
.van-row:nth-child(2n){
background: rgba(29,111,233,0.1);
}
- /deep/ .van-cell{
+ /deep/ .van-row .van-cell{
background: transparent;
+ padding: 0 10Px;
}
.bq{
display: inline-block;
- padding: 4PX 10PX;
+ padding: 0PX 10PX;
+ line-height: 0.64rem;
border-radius: 5PX;
}
.index{
@@ -465,11 +523,19 @@ export default {
.indexCenter{
top: 0!important;
}
+ .van-row:nth-child(2){
+ .van-col:first-child{
+ .indexBorder {
+ top: calc(50% - 5px);
+ }
+ }
+ }
.indexBorder{
width: 10PX;
position: absolute;
right: 0;
- top: calc(50% - 5PX);
+ top: 0;
+ height: 100%;
.yq{
height: 10PX;
width: 10PX;
@@ -477,14 +543,14 @@ export default {
border-radius: 50%;
}
.ss{
- height: 33PX;
+ height: calc(50% - 5PX);
width: 2PX;
background: #C9C9C9;
position: relative;
left: 4PX;
}
.ssT{
- height: 33PX;
+ height: calc(50% - 5PX);
width: 2PX;
background: #C9C9C9;
position: relative;
diff --git a/src/views/lawEnforcement/user/index.vue b/src/views/lawEnforcement/user/index.vue
index fb0eee83..0c7c33af 100644
--- a/src/views/lawEnforcement/user/index.vue
+++ b/src/views/lawEnforcement/user/index.vue
@@ -2,17 +2,23 @@
-
-
- {{user.nickName}}{{roleGroup}}
+
+
+ {{user.nickName}}{{roleGroup}}
- {{user.dept.deptName}}
- {{postGroup}}
+ {{user.dept.deptName}}
+ {{postGroup}}
+
+
+
+ 请登录
+
+ 登录后可查看更多信息
-
-
+
+
待办事项
@@ -40,13 +46,13 @@
-
+
方案管理
-
+
投诉回复
@@ -54,26 +60,26 @@
-
+
密码修改
-
+
帮助反馈
-
+
产品协议
- 退出登录
+ 退出登录
@@ -82,6 +88,7 @@ import request from "@/utils/request";
import { getUserProfile } from "@/api/lawEnforcement/index";
import { logout ,getInfo } from "@/api/login/index";
import law from "@/components/common/law_footer";
+import Cookies from "js-cookie";
export default {
name: "user",
components: {
@@ -92,6 +99,8 @@ export default {
user: {
dept:{}
},
+ loginType:false,
+ loginButton:false,
// 查询参数
queryParamsTask: {
pageNum: 1,
@@ -112,20 +121,30 @@ export default {
this.getDicts("activity_business_type").then((response) => {
this.activityBusinessTypeOptions = response.data;
});
+ console.log(Cookies.get("User-Token"))
+ if(!Cookies.get("User-Token")){
+ this.loginType = false ;
+ this.loginButton = true ;
+ return
+ }
this.getUser();
- this.getTaskList();
},
activated: function () {
this.getDicts("activity_business_type").then((response) => {
this.activityBusinessTypeOptions = response.data;
});
+ if(!Cookies.get("User-Token")){
+ this.loginType = false ;
+ this.loginButton = true ;
+ return
+ }
this.getUser();
- this.getTaskList();//数据加载的方法
},
methods: {
loginOut(){
logout().then(response => {
console.log(response);
+ Cookies.remove("User-Token");
this.$router.push({
path: '/lawEnforcement'
})
@@ -133,9 +152,11 @@ export default {
},
getUser() {
getUserProfile().then(response => {
- this.user = response.data;
- this.roleGroup = response.roleGroup;
- this.postGroup = response.postGroup;
+ this.loginType = true ;
+ this.user = response.data;
+ this.roleGroup = response.roleGroup;
+ this.postGroup = response.postGroup;
+ this.getTaskList();
});
},
getTaskList() {
diff --git a/src/views/lawEnforcement/user/waitingProcessing.vue b/src/views/lawEnforcement/user/waitingProcessing.vue
index cd21a1ec..810310ef 100644
--- a/src/views/lawEnforcement/user/waitingProcessing.vue
+++ b/src/views/lawEnforcement/user/waitingProcessing.vue
@@ -8,25 +8,25 @@
@click-left="onClickLeft"
/>
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+ {{selectDictLabel(activityBusinessTypeOptions,item.formData.activityBusinessType).substr(2,2)}}
+ {{item.projectName}}
+
+
+
+
+
+
+
+
+
+
+
+
-
- {{selectDictLabel(activityBusinessTypeOptions,item.formData.activityBusinessType).substr(2,2)}}
- {{item.projectName}}
-
-
+
+
+
+
+ {{selectDictLabel(activityBusinessTypeOptions,item.formData.activityBusinessType).substr(2,2)}}
+ {{item.projectName}}
+
+
+
+
+
+
+
+
-
-