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

工单状态

parent 1196c373
......@@ -607,15 +607,32 @@ const routes = [{
component:()=>import('@/views/danger/insertDanger/list')
},
{
path:'/video',
name:'video-play',
path:'/insert-risk',
name:'insert-risk',
meta:{
title:'视屏播放',
title:'我的风险上报',
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>
<div>
<LHeader :text="text"></LHeader>
<!-- 视屏 -->
<div v-if="videoUrl">
<custom-player :videoUrl="videoUrl" :videoImg="videoImg" @close="videoUrl=''"/>
</div>
<van-form
@submit="onSubmit"
:scroll-to-error="true"
......@@ -280,6 +284,7 @@
upload-text="最多上传五个"
v-model="uploaderVideo"
accept="video/*"
@click-preview="clickPre"
>
<template slot="default">
<!-- 11111111111 -->
......@@ -362,6 +367,7 @@
import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js";
import { timestampToTime } from "@/utils/format";
import customPlayer from "@/components/video"
import {
getFormList,
postHdTyp,
......@@ -376,6 +382,7 @@ export default {
name: "add-danger",
components: {
LHeader,
customPlayer
},
activated() {
this.taskId =
......@@ -444,6 +451,9 @@ export default {
data() {
return {
// 视频预览地址
videoUrl:'',
id: 0,
text: "新增隐患",
taskId: "",
......@@ -486,6 +496,15 @@ export default {
},
methods: {
// 点击预览图
clickPre(e){
console.log(e)
if(e.filePath){
this.videoUrl=e.filePath;
}else{
this.videoUrl=e.content;
}
},
async deleteFile(val,detail,key){
// console.log(val,detail)
if(val.fileId){
......
......@@ -31,10 +31,10 @@
<van-col span="6">超期标识:</van-col>
<van-col span="18">{{ item.dueDate | formatTime }}</van-col>
</van-row>
<van-row gutter="">
<!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col>
</van-row>
</van-row> -->
<!-- 详情 -->
<div class="detail">详情</div>
</van-cell-group>
......
......@@ -60,10 +60,10 @@
<van-col span="6">超期标识:</van-col>
<van-col span="18">{{ item.dueDate | formatTime }}</van-col>
</van-row>
<van-row gutter="">
<!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col>
</van-row>
</van-row> -->
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
......@@ -136,10 +136,10 @@
<van-col span="6">超期标识:</van-col>
<van-col span="18">{{ item.dueDate | formatTime }}</van-col>
</van-row>
<van-row gutter="">
<!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col>
</van-row>
</van-row> -->
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
......
......@@ -27,10 +27,10 @@
<van-col span="6">隐患类型:</van-col>
<van-col span="18">{{ item.hdType }}</van-col>
</van-row>
<van-row gutter="">
<!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col>
</van-row>
</van-row> -->
<!-- <van-row gutter="">
<van-col span="6">发现时间:</van-col>
<van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
......
......@@ -45,10 +45,10 @@
<van-col span="6">隐患类型:</van-col>
<van-col span="18">{{ item.hdType }}</van-col>
</van-row>
<van-row gutter="">
<!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col>
</van-row>
</van-row> -->
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop="showIndex = null">
......@@ -72,7 +72,7 @@
position: fixed;
top: 30%;
"
v-if="isHaveNews"
v-if="messageList['length']==0"
>
暂无数据
</div>
......
......@@ -51,7 +51,7 @@
<van-col span="18">{{ item.hdDiscoveryTime }}</van-col>
</van-row> -->
<!-- <van-row gutter="">
<van-col span="6">状态:</van-col>
<van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col>
</van-row> -->
......
......@@ -45,10 +45,10 @@
<van-col span="6">隐患类型:</van-col>
<van-col span="18">{{ item.hdType }}</van-col>
</van-row>
<van-row gutter="">
<!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col>
</van-row>
</van-row> -->
<!-- {{ item.taskName }} -->
<!-- 长按显示遮罩层 -->
......
......@@ -49,10 +49,10 @@
<van-col span="6">超期标识:</van-col>
<van-col span="18">{{ item | formatTime }}</van-col>
</van-row>
<van-row gutter="">
<!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col>
</van-row>
</van-row> -->
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop="showIndex = null">
......
......@@ -31,10 +31,10 @@
<van-col span="6">超期标识:</van-col>
<van-col span="18">{{ item | formatTime }}</van-col>
</van-row>
<van-row gutter="">
<!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col>
</van-row>
</van-row> -->
<!-- 详情 -->
<div class="detail">详情</div>
</van-cell-group>
......
......@@ -56,10 +56,10 @@
<van-col span="6">超期标识:</van-col>
<van-col span="18">{{ item | formatTime }}</van-col>
</van-row>
<van-row gutter="">
<!-- <van-row gutter="">
<van-col span="6">工单状态</van-col>
<van-col span="18">{{ item | formatTime }}</van-col>
</van-row>
</van-row> -->
<!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index">
<div class="wrapper" @click.stop="showIndex = null">
......
This diff is collapsed.
<template>
<div>
<!-- 头部标签 -->
<van-sticky>
<header class="header-wrap">
首开集团安全管理平台
</header>
</van-sticky>
<div>
<!-- 头部标签 -->
<van-sticky>
<header class="header-wrap">首开集团安全管理平台</header>
</van-sticky>
<!-- 内容 -->
<div class="con">
<!-- 个人信息 -->
<van-cell-group inset>
<van-row gutter="20">
<van-col span="6">
<div>
<van-image
width="2rem"
height="2rem"
fit="fill"
:src="userInfo.portrait"
/>
</div>
</van-col>
<van-col span="18">
<div class="user-info-wrap">
<div class="user-name">{{ userInfo.name }}</div>
<p>{{ userInfo.position }}</p>
<div class="tag-wrap">
<van-tag color="#cbcdfb">隐患上报人</van-tag>
<van-tag color="#b5e2f1">隐患整改人</van-tag>
<van-tag color="#bed9fd">检查专员</van-tag>
</div>
</div>
</van-col>
</van-row>
</van-cell-group>
<!-- 内容 -->
<div class="con">
<!-- 个人信息 -->
<van-cell-group inset>
<van-row gutter="20">
<van-col span="6">
<div>
<van-image
width="2rem"
height="2rem"
fit="fill"
:src="userInfo.portrait"
/>
</div>
</van-col>
<van-col span="18">
<div class="user-info-wrap">
<div class="user-name">{{ userInfo.name }}</div>
<p>{{ userInfo.position }}</p>
<div class="tag-wrap">
<van-tag color="#cbcdfb">隐患上报人</van-tag>
<van-tag color="#b5e2f1">隐患整改人</van-tag>
<van-tag color="#bed9fd">检查专员</van-tag>
</div>
</div>
</van-col>
</van-row>
</van-cell-group>
<!-- 设置 -->
<van-cell-group inset class="my-cell-group">
<div class="set-wrap">
<van-image
width="0.613rem"
height="0.613rem"
fit="fill"
:src="require('@/assets/myTerritory/set.png')"
/>
<span>设置</span>
<!-- 设置 -->
<van-cell-group inset class="my-cell-group">
<div
class="set-wrap"
v-for="(item, key) in menus"
:key="key"
@click="$router.push({ name: item['name'] })"
>
<van-image
width="0.613rem"
height="0.613rem"
fit="fill"
:src="item['img']"
/>
<span>{{ item["title"] }}</span>
</div>
</van-cell-group>
<!-- 退出系统 -->
<footer class="sign-out">
<van-button type="info" block @click="logout"
>退出系统</van-button
>
</footer>
</div>
</van-cell-group>
<!-- 退出系统 -->
<footer class="sign-out">
<van-button type="info" block @click="logout">退出系统</van-button>
</footer>
<!-- tanBar -->
<tab-bar :index="2"></tab-bar>
</div>
<!-- tanBar -->
<tab-bar :index="2"></tab-bar>
</div>
</template>
<script>
import tabBar from "@/components/TabBar";
import { removeToken } from '@/utils/auth' // get token from cookie
import { getUserInfo} from '@/utils/userInfo'
import { removeToken } from "@/utils/auth"; // get token from cookie
import { getUserInfo } from "@/utils/userInfo";
export default {
components: {
tabBar
},
data() {
return {
userInfo: {
portrait: require("@/assets/myTerritory/touxiang.png"),
name: getUserInfo()?getUserInfo().userName:"刘华强",
position: getUserInfo()?getUserInfo().deptName:"技术安全部",
// name: "刘华强",
// position: "技术安全部"
// jurisdiction: [
// '隐患上报人',
// '隐患整改人',
// '检查专员'
// ]
}
};
},
mounted() {},
methods: {
logout() {
// localStorage.removeItem('admin_token');
this.$router.push("/Login2");
removeToken()
// location.reload();
}
}
components: {
tabBar,
},
data() {
return {
menus: [
// 菜单
{
title: "我的权限",
img:require("@/assets/myTerritory/role.png"),
name: "my-role",
},
{
title: "修改密码",
img: require("@/assets/myTerritory/set.png"),
name: "my-reset-pas",
},
],
userInfo: {
portrait: require("@/assets/myTerritory/touxiang.png"),
name: getUserInfo() ? getUserInfo().userName : "刘华强",
position: getUserInfo() ? getUserInfo().deptName : "技术安全部",
// name: "刘华强",
// position: "技术安全部"
// jurisdiction: [
// '隐患上报人',
// '隐患整改人',
// '检查专员'
// ]
},
};
},
mounted() {},
methods: {
logout() {
// localStorage.removeItem('admin_token');
this.$router.push("/Login2");
removeToken();
// location.reload();
},
},
};
</script>
<style lang="less" scoped>
/* @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;
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;
}
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;
}
.tag-wrap {
.van-tag {
margin-right: 10px;
margin-top: 3px;
padding: 2px 4px;
}
}
}
}
.my-cell-group {
padding: 10px 10px !important;
.set-wrap {
height: 0.8rem;
display: flex;
align-items: center;
span {
margin-left: 0.2666rem;
font-size: 15px;
font-weight: none;
}
.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;
}
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 15px;
margin: 0 10px 10px;
padding: 10px 10px 15px;
}
</style>
<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 @@
<van-col span="6">主责人员:</van-col>
<van-col span="18">{{ item.responsibilityMember }}</van-col>
</van-row>
<van-row gutter="">
<!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col>
</van-row>
</van-row> -->
<!-- 详情 -->
<div class="detail">详情</div>
</van-cell-group>
......
......@@ -57,10 +57,10 @@
<van-col span="6">主责人员:</van-col>
<van-col span="18">{{ item.responsibilityMember }}</van-col>
</van-row>
<van-row gutter="">
<!-- <van-row gutter="">
<van-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col>
</van-row>
</van-row> -->
<!-- 长按显示遮罩层 -->
<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