Commit 6476a59a authored by 罗新东's avatar 罗新东

工单状态

parent 1196c373
...@@ -607,15 +607,32 @@ const routes = [{ ...@@ -607,15 +607,32 @@ const routes = [{
component:()=>import('@/views/danger/insertDanger/list') component:()=>import('@/views/danger/insertDanger/list')
}, },
{ {
path:'/video', path:'/insert-risk',
name:'video-play', name:'insert-risk',
meta:{ meta:{
title:'视屏播放', title:'我的风险上报',
index:1 index:1
}, },
component:()=>import('@/components/video') component:()=>import('@/views/risk/my-insert/index')
},
{
path:'/my-role',
name:'my-role',
meta:{
title:'我的权限',
index:1
},
component:()=>import('@/views/my/role')
},
{
path:'/my-reset-pas',
name:'my-reset-pas',
meta:{
title:'重置密码',
index:1
},
component:()=>import('@/views/my/resetPas')
}, },
] ]
......
<template> <template>
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<!-- 视屏 -->
<div v-if="videoUrl">
<custom-player :videoUrl="videoUrl" :videoImg="videoImg" @close="videoUrl=''"/>
</div>
<van-form <van-form
@submit="onSubmit" @submit="onSubmit"
:scroll-to-error="true" :scroll-to-error="true"
...@@ -280,6 +284,7 @@ ...@@ -280,6 +284,7 @@
upload-text="最多上传五个" upload-text="最多上传五个"
v-model="uploaderVideo" v-model="uploaderVideo"
accept="video/*" accept="video/*"
@click-preview="clickPre"
> >
<template slot="default"> <template slot="default">
<!-- 11111111111 --> <!-- 11111111111 -->
...@@ -362,6 +367,7 @@ ...@@ -362,6 +367,7 @@
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js"; import { getFun, postFun } from "@/service/table.js";
import { timestampToTime } from "@/utils/format"; import { timestampToTime } from "@/utils/format";
import customPlayer from "@/components/video"
import { import {
getFormList, getFormList,
postHdTyp, postHdTyp,
...@@ -376,6 +382,7 @@ export default { ...@@ -376,6 +382,7 @@ export default {
name: "add-danger", name: "add-danger",
components: { components: {
LHeader, LHeader,
customPlayer
}, },
activated() { activated() {
this.taskId = this.taskId =
...@@ -444,6 +451,9 @@ export default { ...@@ -444,6 +451,9 @@ export default {
data() { data() {
return { return {
// 视频预览地址
videoUrl:'',
id: 0, id: 0,
text: "新增隐患", text: "新增隐患",
taskId: "", taskId: "",
...@@ -486,6 +496,15 @@ export default { ...@@ -486,6 +496,15 @@ export default {
}, },
methods: { methods: {
// 点击预览图
clickPre(e){
console.log(e)
if(e.filePath){
this.videoUrl=e.filePath;
}else{
this.videoUrl=e.content;
}
},
async deleteFile(val,detail,key){ async deleteFile(val,detail,key){
// console.log(val,detail) // console.log(val,detail)
if(val.fileId){ if(val.fileId){
......
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
<van-col span="6">超期标识:</van-col> <van-col span="6">超期标识:</van-col>
<van-col span="18">{{ item.dueDate | formatTime }}</van-col> <van-col span="18">{{ item.dueDate | formatTime }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col> <van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col> <van-col span="18">{{ item.taskName }}</van-col>
</van-row> </van-row> -->
<!-- 详情 --> <!-- 详情 -->
<div class="detail">详情</div> <div class="detail">详情</div>
</van-cell-group> </van-cell-group>
......
...@@ -60,10 +60,10 @@ ...@@ -60,10 +60,10 @@
<van-col span="6">超期标识:</van-col> <van-col span="6">超期标识:</van-col>
<van-col span="18">{{ item.dueDate | formatTime }}</van-col> <van-col span="18">{{ item.dueDate | formatTime }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col> <van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col> <van-col span="18">{{ item.taskName }}</van-col>
</van-row> </van-row> -->
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
...@@ -136,10 +136,10 @@ ...@@ -136,10 +136,10 @@
<van-col span="6">超期标识:</van-col> <van-col span="6">超期标识:</van-col>
<van-col span="18">{{ item.dueDate | formatTime }}</van-col> <van-col span="18">{{ item.dueDate | formatTime }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col> <van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col> <van-col span="18">{{ item.taskName }}</van-col>
</van-row> </van-row> -->
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
......
...@@ -27,10 +27,10 @@ ...@@ -27,10 +27,10 @@
<van-col span="6">隐患类型:</van-col> <van-col span="6">隐患类型:</van-col>
<van-col span="18">{{ item.hdType }}</van-col> <van-col span="18">{{ item.hdType }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col> <van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col> <van-col span="18">{{ item.taskName }}</van-col>
</van-row> </van-row> -->
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="6">发现时间:</van-col> <van-col span="6">发现时间:</van-col>
<van-col span="18">{{ item.hdDiscoveryTime }}</van-col> <van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
......
...@@ -45,10 +45,10 @@ ...@@ -45,10 +45,10 @@
<van-col span="6">隐患类型:</van-col> <van-col span="6">隐患类型:</van-col>
<van-col span="18">{{ item.hdType }}</van-col> <van-col span="18">{{ item.hdType }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col> <van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col> <van-col span="18">{{ item.taskName }}</van-col>
</van-row> </van-row> -->
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop="showIndex = null"> <div class="wrapper" @click.stop="showIndex = null">
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
position: fixed; position: fixed;
top: 30%; top: 30%;
" "
v-if="isHaveNews" v-if="messageList['length']==0"
> >
暂无数据 暂无数据
</div> </div>
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<van-col span="18">{{ item.hdDiscoveryTime }}</van-col> <van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
</van-row> --> </van-row> -->
<!-- <van-row gutter=""> <!-- <van-row gutter="">
<van-col span="6">状态:</van-col> <van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col> <van-col span="18">{{ item.taskName }}</van-col>
</van-row> --> </van-row> -->
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
:key="index" :key="index"
@click="goDetail(item.taskId)" @click="goDetail(item.taskId)"
> >
<!-- {{item}} -->
<van-row gutter=""> <van-row gutter="">
<van-col span="7">隐患编号:</van-col> <van-col span="7">隐患编号:</van-col>
<van-col span="17">{{ item.businessId }}</van-col> <van-col span="17">{{ item.businessId }}</van-col>
...@@ -28,9 +28,10 @@ ...@@ -28,9 +28,10 @@
<!-- 详情 --> <!-- 详情 -->
<div class="detail">详情</div> <div class="detail">详情</div>
</van-cell-group> </van-cell-group>
<!-- {{messageList[0]}} -->
<van-form <van-form
@submit="onSubmit" @submit="onSubmit"
:show-error='false' :show-error="false"
:scroll-to-error="true" :scroll-to-error="true"
validate-trigger="onSubmit" validate-trigger="onSubmit"
> >
...@@ -41,36 +42,29 @@ ...@@ -41,36 +42,29 @@
direction="horizontal" direction="horizontal"
@change="selectResult" @change="selectResult"
> >
<van-radio name="1">同意</van-radio> <!-- <van-radio name="1">同意</van-radio>
<van-radio name="0">退回</van-radio> <van-radio name="0">退回</van-radio> -->
<van-radio name="1" style="margin-bottom:0.3rem">{{name=='项目经理二次认定'?'退回到发起人':'同意'}}</van-radio>
<van-radio name="0" style="margin-bottom:0.3rem">{{name=='项目经理二次认定'?'重新发起重大隐患审批':'退回'}}</van-radio>
</van-radio-group> </van-radio-group>
</template> </template>
</van-field> </van-field>
<!-- 同意时的选项 -->
<!-- <div class="agree" v-if="radio == 1">
<van-field
v-model="agreeOpinion"
label="审批意见"
name="details"
rows="3"
type="textarea"
placeholder="请输入"
/>
</div> -->
<!-- 退回是的选项 -->
<div class="disagree"> <div class="disagree">
<van-field <van-field
readonly readonly
v-if="radio==0" v-if="radio == 1"
clickable clickable
required
name="thinkHdLev" name="thinkHdLev"
:value="thinkLevel" :value="thinkLevel"
label="认定的隐患级别" label="认定的隐患级别"
placeholder="请选择认定隐患级别" placeholder="请选择认定隐患级别"
@click="showThinkLevel = true" @click="showThinkLevel = true"
:rules="[{ required: true, message: '认定隐患级别不能为空' }]" :rules="[
{ required: true, message: '认定隐患级别不能为空' },
]"
/> />
<van-popup v-model="showThinkLevel" position="bottom"> <van-popup v-model="showThinkLevel" position="bottom">
<van-picker <van-picker
...@@ -90,17 +84,18 @@ ...@@ -90,17 +84,18 @@
rows="3" rows="3"
type="textarea" type="textarea"
placeholder="请输入" placeholder="请输入"
:rules="[{ required: true, message: '退回原因不能为空' }]" required
:rules="[{ required: true, message: '审批意见不能为空' }]"
/> />
</div> </div>
<div style="margin: 16px;"> <div style="margin: 16px">
<van-button round block type="info" native-type="submit" <van-button round block type="info" native-type="submit"
>保存</van-button >保存</van-button
> >
</div> </div>
</van-form> </van-form>
<div style="margin:10px 16px 0px;padding-bottom:16px"> <div style="margin: 10px 16px 0px; padding-bottom: 16px">
<van-button round block type="warning" @click.native="cancel" <van-button round block type="warning" @click.native="cancel"
>取消</van-button >取消</van-button
> >
...@@ -110,30 +105,34 @@ ...@@ -110,30 +105,34 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import {getFun,postFun} from "@/service/table.js"; import { getFun, postFun } from "@/service/table.js";
import { majorAdd } from "@/service/danger"; import { majorAdd } from "@/service/danger";
export default { export default {
name:"major-survey", name: "major-survey",
components: { components: {
LHeader LHeader,
}, },
data() { data() {
return { return {
name:'',
taskId: "", taskId: "",
messageList: [], messageList: [],
radio: "1", radio: "1",
text: "重大隐患审批", text: "重大隐患审批",
agreeOpinion: "", agreeOpinion: "",
disagreeOpinion: "", disagreeOpinion: "",
thinkLevel:'', //因为隐患级别 thinkLevel: "", //因为隐患级别
thinkHdLev:'', thinkHdLev: "",
showThinkLevel: false, showThinkLevel: false,
columnsThinkLevel:["建议为严重隐患","建议为较大隐患","建议为危险隐患",] columnsThinkLevel: [
"建议为严重隐患",
"建议为较大隐患",
"建议为危险隐患",
],
}; };
}, },
beforeRouteEnter(to, from, next) { beforeRouteEnter(to, from, next) {
next(vm => { next((vm) => {
if (from.name === "major-danger") { if (from.name === "major-danger") {
vm.messageList = []; vm.messageList = [];
let paramsData = to.params.data; let paramsData = to.params.data;
...@@ -142,34 +141,53 @@ export default { ...@@ -142,34 +141,53 @@ export default {
vm.radio = "1"; vm.radio = "1";
vm.agreeOpinion = ""; vm.agreeOpinion = "";
vm.disagreeOpinion = ""; vm.disagreeOpinion = "";
vm.thinkLevel = "" vm.thinkLevel = "";
} }
}); });
}, },
created() {}, mounted() {
this.getName()
console.log(1)
},
methods: { methods: {
selectResult(val) { selectResult(val) {
this.radio = val; this.radio = val;
}, },
getName(){
let id=this.$route.params.data.taskId
let fd = new FormData()
fd.append('taskId',id);
getFun('/majorapprove/add',{
taskId:id
}).then(data=>{
this.name=data.msg;
}).catch(err=>{
this.$toast.fail("提交失败,请稍后再试");
})
},
onSubmit(values) { onSubmit(values) {
this.$toast.loading({ this.$toast.loading({
message: "提交中...", message: "提交中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0,
}); });
let formdata = new FormData() let formdata = new FormData();
formdata.append('isResult', values.isResult) formdata.append("isResult", values.isResult);
formdata.append('details', values.details) formdata.append("details", values.details);
formdata.append('thinkHdLev',values.isResult==1?'':values.thinkHdLev) formdata.append(
formdata.append('taskId', this.taskId) "thinkHdLev",
majorAdd(`/majorapprove/add`,formdata) values.isResult == 1 ? "" : values.thinkHdLev
.then(res => { );
formdata.append("taskId", this.taskId);
majorAdd(`/majorapprove/add`, formdata)
.then((res) => {
this.$toast.clear(); this.$toast.clear();
this.$toast.success({ this.$toast.success({
message: "提交成功", message: "提交成功",
duration: 2000 duration: 2000,
}); });
history.go(-1); history.go(-1);
}) })
...@@ -190,16 +208,15 @@ export default { ...@@ -190,16 +208,15 @@ export default {
this.$router.push({ this.$router.push({
name: "normal-detail", name: "normal-detail",
params: { params: {
id: taskId id: taskId,
} },
}); });
}, },
cancel() { cancel() {
this.$router.go(-1); this.$router.go(-1);
} },
} },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -45,10 +45,10 @@ ...@@ -45,10 +45,10 @@
<van-col span="6">隐患类型:</van-col> <van-col span="6">隐患类型:</van-col>
<van-col span="18">{{ item.hdType }}</van-col> <van-col span="18">{{ item.hdType }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col> <van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col> <van-col span="18">{{ item.taskName }}</van-col>
</van-row> </van-row> -->
<!-- {{ item.taskName }} --> <!-- {{ item.taskName }} -->
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
......
...@@ -49,10 +49,10 @@ ...@@ -49,10 +49,10 @@
<van-col span="6">超期标识:</van-col> <van-col span="6">超期标识:</van-col>
<van-col span="18">{{ item | formatTime }}</van-col> <van-col span="18">{{ item | formatTime }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col> <van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col> <van-col span="18">{{ item.taskName }}</van-col>
</van-row> </van-row> -->
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop="showIndex = null"> <div class="wrapper" @click.stop="showIndex = null">
......
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
<van-col span="6">超期标识:</van-col> <van-col span="6">超期标识:</van-col>
<van-col span="18">{{ item | formatTime }}</van-col> <van-col span="18">{{ item | formatTime }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col> <van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col> <van-col span="18">{{ item.taskName }}</van-col>
</van-row> </van-row> -->
<!-- 详情 --> <!-- 详情 -->
<div class="detail">详情</div> <div class="detail">详情</div>
</van-cell-group> </van-cell-group>
......
...@@ -56,10 +56,10 @@ ...@@ -56,10 +56,10 @@
<van-col span="6">超期标识:</van-col> <van-col span="6">超期标识:</van-col>
<van-col span="18">{{ item | formatTime }}</van-col> <van-col span="18">{{ item | formatTime }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <!-- <van-row gutter="">
<van-col span="6">工单状态</van-col> <van-col span="6">工单状态</van-col>
<van-col span="18">{{ item | formatTime }}</van-col> <van-col span="18">{{ item | formatTime }}</van-col>
</van-row> </van-row> -->
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop="showIndex = null"> <div class="wrapper" @click.stop="showIndex = null">
......
This diff is collapsed.
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
<div> <div>
<!-- 头部标签 --> <!-- 头部标签 -->
<van-sticky> <van-sticky>
<header class="header-wrap"> <header class="header-wrap">首开集团安全管理平台</header>
首开集团安全管理平台
</header>
</van-sticky> </van-sticky>
<!-- 内容 --> <!-- 内容 -->
...@@ -38,20 +36,27 @@ ...@@ -38,20 +36,27 @@
<!-- 设置 --> <!-- 设置 -->
<van-cell-group inset class="my-cell-group"> <van-cell-group inset class="my-cell-group">
<div class="set-wrap"> <div
class="set-wrap"
v-for="(item, key) in menus"
:key="key"
@click="$router.push({ name: item['name'] })"
>
<van-image <van-image
width="0.613rem" width="0.613rem"
height="0.613rem" height="0.613rem"
fit="fill" fit="fill"
:src="require('@/assets/myTerritory/set.png')" :src="item['img']"
/> />
<span>设置</span> <span>{{ item["title"] }}</span>
</div> </div>
</van-cell-group> </van-cell-group>
<!-- 退出系统 --> <!-- 退出系统 -->
<footer class="sign-out"> <footer class="sign-out">
<van-button type="info" block @click="logout">退出系统</van-button> <van-button type="info" block @click="logout"
>退出系统</van-button
>
</footer> </footer>
</div> </div>
...@@ -62,18 +67,31 @@ ...@@ -62,18 +67,31 @@
<script> <script>
import tabBar from "@/components/TabBar"; import tabBar from "@/components/TabBar";
import { removeToken } from '@/utils/auth' // get token from cookie import { removeToken } from "@/utils/auth"; // get token from cookie
import { getUserInfo} from '@/utils/userInfo' import { getUserInfo } from "@/utils/userInfo";
export default { export default {
components: { components: {
tabBar tabBar,
}, },
data() { data() {
return { return {
menus: [
// 菜单
{
title: "我的权限",
img:require("@/assets/myTerritory/role.png"),
name: "my-role",
},
{
title: "修改密码",
img: require("@/assets/myTerritory/set.png"),
name: "my-reset-pas",
},
],
userInfo: { userInfo: {
portrait: require("@/assets/myTerritory/touxiang.png"), portrait: require("@/assets/myTerritory/touxiang.png"),
name: getUserInfo()?getUserInfo().userName:"刘华强", name: getUserInfo() ? getUserInfo().userName : "刘华强",
position: getUserInfo()?getUserInfo().deptName:"技术安全部", position: getUserInfo() ? getUserInfo().deptName : "技术安全部",
// name: "刘华强", // name: "刘华强",
// position: "技术安全部" // position: "技术安全部"
// jurisdiction: [ // jurisdiction: [
...@@ -81,7 +99,7 @@ export default { ...@@ -81,7 +99,7 @@ export default {
// '隐患整改人', // '隐患整改人',
// '检查专员' // '检查专员'
// ] // ]
} },
}; };
}, },
mounted() {}, mounted() {},
...@@ -89,10 +107,10 @@ export default { ...@@ -89,10 +107,10 @@ export default {
logout() { logout() {
// localStorage.removeItem('admin_token'); // localStorage.removeItem('admin_token');
this.$router.push("/Login2"); this.$router.push("/Login2");
removeToken() removeToken();
// location.reload(); // location.reload();
} },
} },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
...@@ -133,12 +151,16 @@ export default { ...@@ -133,12 +151,16 @@ export default {
.my-cell-group { .my-cell-group {
padding: 10px 10px !important; padding: 10px 10px !important;
.set-wrap { .set-wrap {
height: 0.8rem; height: 1.1rem;
display: flex; display: flex;
align-items: center; align-items: center;
border-bottom: 1px solid #e8e8e8;
&:last-child {
border-bottom: none;
}
span { span {
margin-left: 0.2666rem; margin-left: 0.2666rem;
font-size: 15px; font-size: 13px;
font-weight: none; font-weight: none;
} }
} }
......
<template>
<div>
<!-- 重置密码页面 -->
<!-- 头部标签 -->
<LHeader :text="$route.meta.title"></LHeader>
<van-form
@submit="onSubmit"
:scroll-to-error="true"
:show-error="false"
validate-trigger="onSubmit"
>
<van-field
v-model="form.oldPassword"
required
type="text"
name="oldPassword"
label="旧密码"
placeholder="请输入旧密码"
:rules="[
{ required: true, message: '请填写密码' }
]"
/>
<van-field
required
v-model="form.newPassword"
type="password"
name="newPassword"
label="新密码"
placeholder="请输入新密码"
:rules="[
{ required: true, message: '请填写密码' },
{
message: '密码必须大于6个字符小于20个字符',
validator: (val) => {
return val['length'] > 6 && val['length'] < 20;
},
},
]"
/>
<van-field
required
v-model="form.confirm"
type="password"
name="confirm"
label="再次输入"
placeholder="再次输入新密码"
:rules="[
{ validator, required: true, message: '二次输入不正确' },
{
message: '密码必须大于6个字符小于20个字符',
validator: (val) => {
return val['length'] > 6 && val['length'] < 20;
},
},
]"
/>
<div style="margin: 16px">
<van-button round block type="info" native-type="submit"
>提交
</van-button>
</div>
</van-form>
</div>
</template>
<script>
import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
import { getUserInfo } from "@/utils/userInfo";
import { removeToken } from "@/utils/auth"; // get token from cookie
export default {
components: {
LHeader,
},
data() {
return {
form: {
oldPassword: "",
newPassword: "",
confirm: "",
}
};
},
mounted(){
console.log(getUserInfo())
},
methods: {
validator(val) {
return this.form.newPassword == val;
},
onSubmit(val) {
this.$toast.loading({
message: "请求中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
postFun(
"/mobile/resetPwd",
this.obj2formdata(val)
)
.then((data) => {
this.$toast.clear();
this.$dialog.alert({
title:'提示',
message:'密码重置成功,请重新登录',
}).then(
res=>{
removeToken();
this.$router.push('/login2')
}
)
})
.catch((err) => {
this.$toast.clear();
this.$toast.fail("操作失败,请稍后再试");
});
},
obj2formdata(data) {
console.log(data,'fasfasdfsd')
let fd = new FormData();
for (let k in data) {
if (data[k]) {
fd.append(k, data[k]);
}
}
return fd;
},
},
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div>
<!-- 我的权限页面 my-role -->
<LHeader :text="$route.meta.title"></LHeader>
<!-- 通知 -->
<van-sticky offset-top="1.5rem">
<van-notice-bar
left-icon="volume-o"
text="提示:系统使用时请核实应用权限如有问题请联系管理员。"
/>
</van-sticky>
<!-- 权限卡片 -->
<div v-for="(item, key) in role_list" :key="key">
<template v-if="item">
<div class="title">{{ key }}</div>
<van-cell-group inset>
<div class="tag-wrap">
<van-tag
:color="getColor()"
v-for="(i, index) in item"
:key="index"
plain
round
>
<template v-if="i">
{{ i }}
</template>
</van-tag>
</div>
</van-cell-group>
</template>
</div>
</div>
</template>
<script>
import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
export default {
components: {
LHeader,
},
data() {
return {
tabColor: ["red", "orange", "skyblue",'yellowgreen'],
role_list: {
"政务大数据项目cs-401": [],
"政务大数据项目cs-801": [],
朝阳区和平街14区简易住宅楼改造项目: [],
"项目工程cs-001": [],
"项目工程cs-002": [],
},
};
},
methods: {
async getRoleList() {
let res = await postFun("/mobile/userRoler");
// console.log(res)
if (res) {
this.role_list = res.data;
}else{
this.$toast.fail("加载失败,请稍后再试");
}
},
// 获得一个随机色
getColor() {
return this.tabColor[
Math.floor(Math.random() * [this.tabColor["length"]])
];
},
},
mounted() {
this.getRoleList();
},
};
</script>
<style scoped lang="less">
/* @import url(); 引入css类 */
.header-wrap {
width: 100%;
height: 50px;
background-color: #2980f7;
font-size: 17px;
line-height: 50px;
color: white;
font-weight: none;
text-align: center;
}
.con {
height: calc(100% - 110px);
padding: 10px 0 50px 0;
background-color: #f0f1f5;
position: relative;
.user-info-wrap {
display: flex;
flex-direction: column;
justify-content: space-between;
.user-name {
font-size: 17px;
font-weight: none;
}
.tag-wrap {
.van-tag {
margin-right: 10px;
margin-top: 3px;
padding: 2px 4px;
}
}
}
.my-cell-group {
padding: 10px 10px !important;
.set-wrap {
height: 1.1rem;
display: flex;
align-items: center;
border-bottom: 1px solid #e8e8e8;
&:last-child {
border-bottom: none;
}
span {
margin-left: 0.2666rem;
font-size: 13px;
font-weight: none;
}
}
}
}
.sign-out {
width: 96%;
position: absolute;
bottom: 1.86667rem;
left: 0px;
right: 0;
margin: auto;
overflow: hidden;
border-radius: 5px;
button {
font-size: 15px;
font-weight: none;
}
}
.van-cell-group--inset {
margin: 0 10px 10px;
padding: 10px 10px 8px;
min-height: 1.5rem;
}
.title {
padding: 0.2rem 0.5rem;
font-size: 0.4rem;
}
.tag-wrap > span {
margin-right: 0.3rem;
margin-bottom: 0.3rem;
}
.van-tag{
padding: 0.03rem 0.2rem;
font-size: 0.25rem;
}
</style>
\ No newline at end of file
...@@ -36,10 +36,10 @@ ...@@ -36,10 +36,10 @@
<van-col span="6">主责人员:</van-col> <van-col span="6">主责人员:</van-col>
<van-col span="18">{{ item.responsibilityMember }}</van-col> <van-col span="18">{{ item.responsibilityMember }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col> <van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col> <van-col span="18">{{ item.taskName }}</van-col>
</van-row> </van-row> -->
<!-- 详情 --> <!-- 详情 -->
<div class="detail">详情</div> <div class="detail">详情</div>
</van-cell-group> </van-cell-group>
......
...@@ -57,10 +57,10 @@ ...@@ -57,10 +57,10 @@
<van-col span="6">主责人员:</van-col> <van-col span="6">主责人员:</van-col>
<van-col span="18">{{ item.responsibilityMember }}</van-col> <van-col span="18">{{ item.responsibilityMember }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col> <van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col> <van-col span="18">{{ item.taskName }}</van-col>
</van-row> </van-row> -->
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment