Commit e571a063 authored by 罗新东's avatar 罗新东

修改了搜索切换tab不带参数的bug

parent 8867390d
Pipeline #7511 passed with stage
in 17 seconds
...@@ -3,7 +3,11 @@ ...@@ -3,7 +3,11 @@
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<!-- 视屏 --> <!-- 视屏 -->
<div v-if="videoUrl"> <div v-if="videoUrl">
<custom-player :videoUrl="videoUrl" :videoImg="videoImg" @close="videoUrl=''"/> <custom-player
:videoUrl="videoUrl"
:videoImg="videoImg"
@close="videoUrl = ''"
/>
</div> </div>
<van-form <van-form
@submit="onSubmit" @submit="onSubmit"
...@@ -86,7 +90,11 @@ ...@@ -86,7 +90,11 @@
:rules="[{ required: true, message: '隐患类型不能为空' }]" :rules="[{ required: true, message: '隐患类型不能为空' }]"
:class="{ gray: isShowreturnCause }" :class="{ gray: isShowreturnCause }"
/> />
<van-popup v-model="showType" position="bottom" v-if="!isShowreturnCause"> <van-popup
v-model="showType"
position="bottom"
v-if="!isShowreturnCause"
>
<van-picker <van-picker
show-toolbar show-toolbar
value-key="hdType" value-key="hdType"
...@@ -187,28 +195,6 @@ ...@@ -187,28 +195,6 @@
@cancel="showSource = false" @cancel="showSource = false"
/> />
</van-popup> </van-popup>
<!-- <van-field
readonly
clickable
name="dangerSource"
:value="source1"
label=" "
@click="showSource1 = true"
placeholder="请选择"
:rules="[{ required: true, message: '风险源不能为空' }]"
/>
<van-popup v-model="showSource1" position="bottom">
<van-picker
show-toolbar
value-key="riskSource"
:columns="columnsSource1"
@confirm="onConSource1"
@cancel="showSource1 = false"
/>
</van-popup> -->
<van-field <van-field
v-model="source1" v-model="source1"
readonly readonly
...@@ -244,7 +230,7 @@ ...@@ -244,7 +230,7 @@
<van-field name="hdPicture1" label="隐患照片"> <van-field name="hdPicture1" label="隐患照片">
<template #input> <template #input>
<van-uploader <van-uploader
@delete="deleteFile(...arguments,'uploaderImg')" @delete="deleteFile(...arguments, 'uploaderImg')"
multiple multiple
:max-count="5" :max-count="5"
upload-text="最多上传五个" upload-text="最多上传五个"
...@@ -268,7 +254,9 @@ ...@@ -268,7 +254,9 @@
alt="" alt=""
style="width: 0.64rem; height: 0.64rem" style="width: 0.64rem; height: 0.64rem"
/> />
<span class="van-uploader__upload-text">最多上传五个</span> <span class="van-uploader__upload-text"
>最多上传五个</span
>
</div> </div>
</template> </template>
</van-uploader> </van-uploader>
...@@ -279,7 +267,7 @@ ...@@ -279,7 +267,7 @@
<template #input> <template #input>
<van-uploader <van-uploader
multiple multiple
@delete="deleteFile(...arguments,'uploaderVideo')" @delete="deleteFile(...arguments, 'uploaderVideo')"
:max-count="5" :max-count="5"
upload-text="最多上传五个" upload-text="最多上传五个"
v-model="uploaderVideo" v-model="uploaderVideo"
...@@ -304,7 +292,9 @@ ...@@ -304,7 +292,9 @@
alt="" alt=""
style="width: 0.64rem; height: 0.64rem" style="width: 0.64rem; height: 0.64rem"
/> />
<span class="van-uploader__upload-text">最多上传五个</span> <span class="van-uploader__upload-text"
>最多上传五个</span
>
</div> </div>
</template> </template>
</van-uploader> </van-uploader>
...@@ -367,7 +357,7 @@ ...@@ -367,7 +357,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 customPlayer from "@/components/video";
import { import {
getFormList, getFormList,
postHdTyp, postHdTyp,
...@@ -382,11 +372,12 @@ export default { ...@@ -382,11 +372,12 @@ export default {
name: "add-danger", name: "add-danger",
components: { components: {
LHeader, LHeader,
customPlayer customPlayer,
}, },
activated() { activated() {
this.taskId = this.taskId =
this.$route.params.taskId || localStorage.getItem("dangerAddTaskId"); this.$route.params.taskId ||
localStorage.getItem("dangerAddTaskId");
console.log(this.taskId); console.log(this.taskId);
if (this.taskId) { if (this.taskId) {
this.isShowreturnCause = true; this.isShowreturnCause = true;
...@@ -452,7 +443,7 @@ export default { ...@@ -452,7 +443,7 @@ export default {
data() { data() {
return { return {
// 视频预览地址 // 视频预览地址
videoUrl:'', videoUrl: "",
id: 0, id: 0,
text: "新增隐患", text: "新增隐患",
...@@ -497,29 +488,29 @@ export default { ...@@ -497,29 +488,29 @@ export default {
methods: { methods: {
// 点击预览图 // 点击预览图
clickPre(e){ clickPre(e) {
console.log(e) console.log(e);
if(e.filePath){ if (e.filePath) {
this.videoUrl=e.filePath; this.videoUrl = e.filePath;
}else{ } else {
this.videoUrl=e.content; 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) {
let formdata= new FormData(); let formdata = new FormData();
formdata.append('key',val['fileId']) formdata.append("key", val["fileId"]);
let res = await postFun('/mobile/remove',formdata); let res = await postFun("/mobile/remove", formdata);
if(res){ if (res) {
console.log(res); console.log(res);
this.$toast({ this.$toast({
title:'提示', title: "提示",
message:'删除成功!' message: "删除成功!",
}) });
} else { } else {
console.log('删除失败'); console.log("删除失败");
this[key].splice(detail.index,0,val) this[key].splice(detail.index, 0, val);
} }
} }
}, },
...@@ -568,8 +559,11 @@ export default { ...@@ -568,8 +559,11 @@ export default {
formdata.append("dangerSource", values.dangerSource); formdata.append("dangerSource", values.dangerSource);
formdata.append("hdPosition", values.hdPosition); formdata.append("hdPosition", values.hdPosition);
formdata.append("hdDescribe", values.hdDescribe); formdata.append("hdDescribe", values.hdDescribe);
formdata.append("hdExpirationTime", values.hdExpirationTime||''); formdata.append("hdExpirationTime", values.hdExpirationTime || "");
formdata.append("rectificationUser", values.rectificationUser||''); formdata.append(
"rectificationUser",
values.rectificationUser || ""
);
console.log(values.hdPicture1, "这是要上传的文件"); console.log(values.hdPicture1, "这是要上传的文件");
// 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式 // 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式
values.hdPicture1.forEach((item) => { values.hdPicture1.forEach((item) => {
...@@ -655,30 +649,38 @@ export default { ...@@ -655,30 +649,38 @@ export default {
this.dangerName = msg.hdProjectName; this.dangerName = msg.hdProjectName;
this.dangerNum = msg.hdProjectId; this.dangerNum = msg.hdProjectId;
this.dangerLevel = this.dangerType(msg.hdLev); this.dangerLevel = this.dangerType(msg.hdLev);
this.source1 = this.source1 ? this.source1 : msg.dangerSource; this.source1 = this.source1
? this.source1
: msg.dangerSource;
this.findTime = msg.hdDiscoveryTime; this.findTime = msg.hdDiscoveryTime;
this.source = msg.dangerId; this.source = msg.dangerId;
this.location = msg.hdPosition; this.location = msg.hdPosition;
this.describe = msg.hdDescribe; this.describe = msg.hdDescribe;
this.expireTime = msg.hdExpirationTime; this.expireTime = msg.hdExpirationTime;
this.recPeople = msg.rectificationUser; this.recPeople = msg.rectificationUser;
this.uploaderImg = (res.data.imgsysFiles || []).map((item) => { this.uploaderImg = (res.data.imgsysFiles || []).map(
(item) => {
return { return {
...item, ...item,
url: item.filePath, url: item.filePath,
}; };
}); }
);
console.log(this.uploaderImg); console.log(this.uploaderImg);
this.uploaderVideo = (res.data.videosysFiles || []).map((item) => { this.uploaderVideo = (res.data.videosysFiles || []).map(
(item) => {
return { return {
...item, ...item,
url: item.filePath, url: item.filePath,
}; };
}); }
);
postHdShowPeople(`/hdreport/showPeople/${msg.proId}`).then((res) => { postHdShowPeople(`/hdreport/showPeople/${msg.proId}`).then(
(res) => {
this.columnsRecPeople = res.data; this.columnsRecPeople = res.data;
}); }
);
}) })
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);
...@@ -697,9 +699,11 @@ export default { ...@@ -697,9 +699,11 @@ export default {
this.projectName = value.projectName; this.projectName = value.projectName;
this.showProjectName = false; this.showProjectName = false;
// 这里请求隐患整改人接口 // 这里请求隐患整改人接口
postHdShowPeople(`/hdreport/showPeople/${this.projectId}`).then((res) => { postHdShowPeople(`/hdreport/showPeople/${this.projectId}`).then(
(res) => {
this.columnsRecPeople = res.data; this.columnsRecPeople = res.data;
}); }
);
}, },
// 适用范围 // 适用范围
onConRange(value) { onConRange(value) {
...@@ -773,11 +777,6 @@ export default { ...@@ -773,11 +777,6 @@ export default {
this.columnsSource1 = res.data; this.columnsSource1 = res.data;
}); });
}, },
// 风险源第二个字段
// onConSource1(value) {
// this.source1 = value.riskSource;
// this.showSource1 = false;
// },
goSelectTwo() { goSelectTwo() {
if (this.source) { if (this.source) {
// 跳转到多选页面 // 跳转到多选页面
......
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
<van-tabs <van-tabs
v-model="active" v-model="active"
@change=" @change="
postList(); postList(searchValue);
showIndex = null; showIndex = null;
" "
color="#2980f7" color="#2980f7"
animated animated
:sticky="true" :sticky="true"
offset-top="3rem" offset-top="2.93rem"
> >
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title"> <van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<!-- 内容列表 --> <!-- 内容列表 -->
......
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
<van-tabs <van-tabs
v-model="active" v-model="active"
@change=" @change="
postList(); postList(searchValue);
showIndex = null; showIndex = null;
" "
color="#2980f7" color="#2980f7"
animated animated
:sticky="true" :sticky="true"
offset-top="3rem" offset-top="2.93rem"
> >
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title"> <van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<!-- 内容列表 --> <!-- 内容列表 -->
...@@ -36,7 +36,9 @@ ...@@ -36,7 +36,9 @@
> >
<van-row gutter=""> <van-row gutter="">
<van-col span="7">隐患单编号:</van-col> <van-col span="7">隐患单编号:</van-col>
<van-col span="17">{{ item.businessId||item.id }}</van-col> <van-col span="17">{{
item.businessId || item.id
}}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7">所属项目:</van-col> <van-col span="7">所属项目:</van-col>
...@@ -75,7 +77,7 @@ ...@@ -75,7 +77,7 @@
> >
<van-button <van-button
round round
v-if="active==0" v-if="active == 0"
type="info" type="info"
@click="goConfirm(item)" @click="goConfirm(item)"
>确认</van-button >确认</van-button
...@@ -149,10 +151,10 @@ export default { ...@@ -149,10 +151,10 @@ export default {
}); });
let formdata = new FormData(); let formdata = new FormData();
formdata.append("select", select); formdata.append("select", select);
postFun(this.tabs[this.active]['api'], formdata) postFun(this.tabs[this.active]["api"], formdata)
.then((res) => { .then((res) => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.data||res.rows; this.messageList = res.data || res.rows;
// 判断有无数据返回 // 判断有无数据返回
if (this.messageList.length == 0) { if (this.messageList.length == 0) {
this.isHaveNews = true; this.isHaveNews = true;
...@@ -176,7 +178,7 @@ export default { ...@@ -176,7 +178,7 @@ export default {
this.$router.push({ this.$router.push({
name: "normal-detail", name: "normal-detail",
params: { params: {
id: data.taskId||data.id, id: data.taskId || data.id,
}, },
}); });
this.showIndex = null; this.showIndex = null;
...@@ -229,7 +231,7 @@ export default { ...@@ -229,7 +231,7 @@ export default {
} }
} }
} }
/deep/.van-tab__pane{ /deep/.van-tab__pane {
min-height: 8rem; min-height: 8rem;
} }
</style> </style>
...@@ -20,13 +20,13 @@ ...@@ -20,13 +20,13 @@
<van-tabs <van-tabs
v-model="active" v-model="active"
@change=" @change="
getList(); getList(searchValue);
showIndex = null; showIndex = null;
" "
color="#2980f7" color="#2980f7"
animated animated
:sticky="true" :sticky="true"
offset-top="3rem" offset-top="2.93rem"
> >
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title"> <van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<div <div
......
...@@ -20,13 +20,13 @@ ...@@ -20,13 +20,13 @@
<van-tabs <van-tabs
v-model="active" v-model="active"
@change=" @change="
getList(); getList(searchValue);
showIndex = null; showIndex = null;
" "
color="#2980f7" color="#2980f7"
animated animated
:sticky="true" :sticky="true"
offset-top="3rem" offset-top="2.93rem"
> >
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title"> <van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list" @touchmove="showIndex = null">
......
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
<van-tabs <van-tabs
v-model="active" v-model="active"
@change=" @change="
postList(); postList(searchValue);
showIndex = null; showIndex = null;
" "
color="#2980f7" color="#2980f7"
animated animated
:sticky="true" :sticky="true"
offset-top="3rem" offset-top="2.93rem"
> >
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title"> <van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list" @touchmove="showIndex = null">
......
...@@ -18,14 +18,14 @@ ...@@ -18,14 +18,14 @@
<!-- tab标签 --> <!-- tab标签 -->
<van-tabs <van-tabs
v-model="active" v-model="active"
@change="postList" @change="postList(searchValue);showIndex=null"
color="#2980f7" color="#2980f7"
animated animated
:sticky="true" :sticky="true"
offset-top="3rem" offset-top="2.93rem"
> >
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title" :sticky="true" <van-tab v-for="(item, key) in tabs" :key="key" :title="item.title" :sticky="true"
offset-top="3rem"> offset-top="2.93rem">
<div v-show="key == active"> <div v-show="key == active">
<div class="con-list" @touchmove="showIndex = null"> <div class="con-list" @touchmove="showIndex = null">
<van-cell-group <van-cell-group
......
...@@ -29,14 +29,6 @@ ...@@ -29,14 +29,6 @@
> >
<van-col span="18">{{ hdReport.proId }}</van-col> <van-col span="18">{{ hdReport.proId }}</van-col>
</van-row> </van-row>
<van-row gutter="">
<van-col span="6"
><span class="field-title"
>隐患级别:</span
></van-col
>
<van-col span="18">{{ hdReport.hdLev }}</van-col>
</van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="6" <van-col span="6"
><span class="field-title" ><span class="field-title"
...@@ -53,7 +45,7 @@ ...@@ -53,7 +45,7 @@
> >
<van-col span="18">{{ hdReport.hdType }}</van-col> <van-col span="18">{{ hdReport.hdType }}</van-col>
</van-row> </van-row>
<!-- hdProjectId -->
<van-row gutter=""> <van-row gutter="">
<van-col span="6" <van-col span="6"
><span class="field-title" ><span class="field-title"
...@@ -62,8 +54,14 @@ ...@@ -62,8 +54,14 @@
> >
<van-col span="18">{{ hdReport.hdProjectId }}</van-col> <van-col span="18">{{ hdReport.hdProjectId }}</van-col>
</van-row> </van-row>
<!-- 隐藏的字段 --> <van-row gutter="">
<div v-show="reportOpen"> <van-col span="6"
><span class="field-title"
>隐患级别:</span
></van-col
>
<van-col span="18">{{ hdReport.hdLev }}</van-col>
</van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="6" <van-col span="6"
><span class="field-title" ><span class="field-title"
...@@ -74,6 +72,11 @@ ...@@ -74,6 +72,11 @@
hdReport.hdProjectName hdReport.hdProjectName
}}</van-col> }}</van-col>
</van-row> </van-row>
<!-- hdProjectId -->
<!-- 隐藏的字段 -->
<div v-show="reportOpen">
<van-row gutter=""> <van-row gutter="">
<van-col span="6" <van-col span="6"
><span class="field-title" ><span class="field-title"
...@@ -84,7 +87,6 @@ ...@@ -84,7 +87,6 @@
hdReport.hdDiscoveryTime hdReport.hdDiscoveryTime
}}</van-col> }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="6" <van-col span="6"
><span class="field-title" ><span class="field-title"
...@@ -103,6 +105,7 @@ ...@@ -103,6 +105,7 @@
> >
<van-col span="18">{{ hdReport.dangerId }}</van-col> <van-col span="18">{{ hdReport.dangerId }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="6" <van-col span="6"
><span class="field-title" ><span class="field-title"
...@@ -123,6 +126,7 @@ ...@@ -123,6 +126,7 @@
hdReport.hdDescribe hdReport.hdDescribe
}}</van-col> }}</van-col>
</van-row> </van-row>
<van-row gutter="" v-if="hdReport.hdPictureList"> <van-row gutter="" v-if="hdReport.hdPictureList">
<van-col span="6" <van-col span="6"
><span class="field-title" ><span class="field-title"
...@@ -138,6 +142,7 @@ ...@@ -138,6 +142,7 @@
:key="index" :key="index"
> >
<van-image <van-image
radius="6px"
width="100" width="100"
height="100" height="100"
:src="item.filePath" :src="item.filePath"
...@@ -146,6 +151,7 @@ ...@@ -146,6 +151,7 @@
</div> </div>
</van-col> </van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="6" <van-col span="6"
><span class="field-title" ><span class="field-title"
...@@ -164,8 +170,9 @@ ...@@ -164,8 +170,9 @@
<van-icon <van-icon
name="play" name="play"
size="1rem" size="1rem"
color="#fff"
style=" style="
border: solid 3px black; border: solid 3px #fff;
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
...@@ -215,7 +222,6 @@ ...@@ -215,7 +222,6 @@
v-for="(item, index) in hdConfirm" v-for="(item, index) in hdConfirm"
:key="index" :key="index"
> >
<div class="step-wrap"> <div class="step-wrap">
<van-row> <van-row>
<van-col span="24" <van-col span="24"
...@@ -412,6 +418,7 @@ ...@@ -412,6 +418,7 @@
:key="index" :key="index"
> >
<van-image <van-image
radius="0.16rem"
width="100" width="100"
height="100" height="100"
:src="itemTwo.filePath" :src="itemTwo.filePath"
...@@ -431,7 +438,20 @@ ...@@ -431,7 +438,20 @@
class="detail_video" class="detail_video"
v-for="(itemTwo, index) in item.hdVideoList" v-for="(itemTwo, index) in item.hdVideoList"
:key="index" :key="index"
style="position: relative"
> >
<van-icon
name="play"
size="1rem"
color="#fff"
style="
border: solid 3px #fff;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
"
/>
<video <video
:src="itemTwo.filePath" :src="itemTwo.filePath"
@click="videoUrl = itemTwo.filePath" @click="videoUrl = itemTwo.filePath"
...@@ -490,6 +510,7 @@ ...@@ -490,6 +510,7 @@
:key="index" :key="index"
> >
<van-image <van-image
radius="0.16rem"
width="100" width="100"
height="100" height="100"
:src="itemTwo.filePath" :src="itemTwo.filePath"
...@@ -876,19 +897,22 @@ export default { ...@@ -876,19 +897,22 @@ export default {
z-index: 99; z-index: 99;
} }
.detail_pic { .detail_pic {
margin-right: 0.266667rem; margin: 0 0.266667rem 0.266667rem 0;
float: left; float: left;
border-radius: 6px;
overflow: hidden;
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
} }
.detail_video { .detail_video {
width: 2.666667rem; width: 2.666667rem;
height: 2.666667rem; height: 2.666667rem;
margin-right: 0.266667rem; margin:0 0.266667rem 0.266667rem 0;
float: left; float: left;
overflow: hidden; overflow: hidden;
// video { box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
// width: 2.666667rem; border-radius: 6px;
// height: 2.666667rem; overflow: hidden;
// }
} }
} }
......
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
<van-tabs <van-tabs
v-model="active" v-model="active"
@change=" @change="
getList(); getList(searchValue);
showIndex = null; showIndex = null;
" "
color="#2980f7" color="#2980f7"
animated animated
:sticky="true" :sticky="true"
offset-top="3rem" offset-top="2.93rem"
> >
<van-tab <van-tab
v-for="(item, key) in tabs" v-for="(item, key) in tabs"
......
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
<van-tabs <van-tabs
v-model="active" v-model="active"
@change=" @change="
postList(); postList(searchValue);
showIndex = null; showIndex = null;
" "
color="#2980f7" color="#2980f7"
animated animated
:sticky="true" :sticky="true"
offset-top="3rem" offset-top="2.93rem"
> >
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title"> <van-tab v-for="(item, key) in tabs" :key="key" :title="item.title">
<!-- 内容列表 --> <!-- 内容列表 -->
......
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