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

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

parent 8867390d
Pipeline #7511 passed with stage
in 17 seconds
<template> <template>
<div> <div>
<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
</div> :videoUrl="videoUrl"
<van-form :videoImg="videoImg"
@submit="onSubmit" @close="videoUrl = ''"
:scroll-to-error="true" />
:show-error="false" </div>
validate-trigger="onSubmit" <van-form
> @submit="onSubmit"
<van-field :scroll-to-error="true"
v-if="isShowreturnCause" :show-error="false"
v-model.lazy="returnCause" validate-trigger="onSubmit"
readonly >
rows="1" <van-field
autosize v-if="isShowreturnCause"
label="退回原因" v-model.lazy="returnCause"
type="textarea" readonly
class="gray" rows="1"
/> autosize
label="退回原因"
<van-field type="textarea"
required class="gray"
readonly />
clickable
name="proId"
:value="projectName"
label="所属项目"
placeholder="请选择"
@click="showProjectName = true"
:rules="[{ required: true, message: '所属项目不能为空' }]"
:class="{ gray: isShowreturnCause }"
/>
<van-popup
v-model="showProjectName"
position="bottom"
v-if="!isShowreturnCause"
>
<van-picker
show-toolbar
value-key="projectName"
:columns="columnsProjectName"
@confirm="onConProjectName"
@cancel="showProjectName = false"
/>
</van-popup>
<van-field <van-field
required required
readonly readonly
clickable clickable
name="hdRange" name="proId"
:value="range" :value="projectName"
label="适用范围" label="所属项目"
placeholder="请选择" placeholder="请选择"
@click="showRange = true" @click="showProjectName = true"
:rules="[{ required: true, message: '适用范围不能为空' }]" :rules="[{ required: true, message: '所属项目不能为空' }]"
:class="{ gray: isShowreturnCause }" :class="{ gray: isShowreturnCause }"
/> />
<van-popup <van-popup
v-model="showRange" v-model="showProjectName"
position="bottom" position="bottom"
v-if="!isShowreturnCause" v-if="!isShowreturnCause"
> >
<van-picker <van-picker
show-toolbar show-toolbar
value-key="hdRange" value-key="projectName"
:columns="columnsRange" :columns="columnsProjectName"
@confirm="onConRange" @confirm="onConProjectName"
@cancel="showRange = false" @cancel="showProjectName = false"
/> />
</van-popup> </van-popup>
<van-field <van-field
required required
readonly readonly
clickable clickable
name="hdType" name="hdRange"
:value="type" :value="range"
label="隐患类型" label="适用范围"
placeholder="请选择" placeholder="请选择"
@click="showType = true" @click="showRange = true"
: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
<van-picker v-model="showRange"
show-toolbar position="bottom"
value-key="hdType" v-if="!isShowreturnCause"
:columns="columnsType" >
@confirm="onConType" <van-picker
@cancel="showType = false" show-toolbar
/> value-key="hdRange"
</van-popup> :columns="columnsRange"
@confirm="onConRange"
@cancel="showRange = false"
/>
</van-popup>
<van-field <van-field
required required
readonly readonly
clickable clickable
name="hdProjectName" name="hdType"
:value="dangerName" :value="type"
label="隐患项目名称" label="隐患类型"
placeholder="请选择" placeholder="请选择"
@click="showDangerName = true" @click="showType = true"
:rules="[{ required: true, message: '隐患项目名称不能为空' }]" :rules="[{ required: true, message: '隐患类型不能为空' }]"
:class="{ gray: isShowreturnCause }" :class="{ gray: isShowreturnCause }"
/> />
<van-popup <van-popup
v-model="showDangerName" v-model="showType"
position="bottom" position="bottom"
v-if="!isShowreturnCause" v-if="!isShowreturnCause"
> >
<van-picker <van-picker
show-toolbar show-toolbar
value-key="hdName" value-key="hdType"
:columns="columnsDangerName" :columns="columnsType"
@confirm="onConDangerName" @confirm="onConType"
@cancel="showDangerName = false" @cancel="showType = false"
/> />
</van-popup> </van-popup>
<van-field <van-field
required required
class="gray" readonly
v-model="dangerNum" clickable
readonly name="hdProjectName"
name="hdProjectId" :value="dangerName"
label="隐患清单编号" label="隐患项目名称"
placeholder="请选择" placeholder="请选择"
:rules="[{ required: true, message: '隐患清单编号不能为空' }]" @click="showDangerName = true"
/> :rules="[{ required: true, message: '隐患项目名称不能为空' }]"
<van-field :class="{ gray: isShowreturnCause }"
required />
class="gray" <van-popup
v-model="dangerLevel" v-model="showDangerName"
readonly position="bottom"
name="hdLev" v-if="!isShowreturnCause"
label="隐患级别" >
placeholder="请选择" <van-picker
:rules="[{ required: true, message: '隐患级别不能为空' }]" show-toolbar
/> value-key="hdName"
:columns="columnsDangerName"
@confirm="onConDangerName"
@cancel="showDangerName = false"
/>
</van-popup>
<van-field <van-field
required required
readonly class="gray"
clickable v-model="dangerNum"
name="hdDiscoveryTime" readonly
:value="findTime" name="hdProjectId"
label="隐患发现时间" label="隐患清单编号"
placeholder="点击选择日期" placeholder="请选择"
@click=" :rules="[{ required: true, message: '隐患清单编号不能为空' }]"
showFindTime = true; />
currentDate = new Date(); <van-field
" required
:rules="[{ required: true, message: '隐患发现时间不能为空' }]" class="gray"
/> v-model="dangerLevel"
<van-popup v-model="showFindTime" position="bottom"> readonly
<van-datetime-picker name="hdLev"
type="datetime" label="隐患级别"
@confirm="onConFindTime" placeholder="请选择"
@cancel="showFindTime = false" :rules="[{ required: true, message: '隐患级别不能为空' }]"
v-model="currentDate" />
/>
</van-popup>
<van-field <van-field
required required
readonly readonly
clickable clickable
name="dangerId" name="hdDiscoveryTime"
:value="source" :value="findTime"
label="风险源" label="隐患发现时间"
placeholder="请选择" placeholder="点击选择日期"
@click="showSource = true" @click="
:rules="[{ required: true, message: '风险源不能为空' }]" showFindTime = true;
/> currentDate = new Date();
"
:rules="[{ required: true, message: '隐患发现时间不能为空' }]"
/>
<van-popup v-model="showFindTime" position="bottom">
<van-datetime-picker
type="datetime"
@confirm="onConFindTime"
@cancel="showFindTime = false"
v-model="currentDate"
/>
</van-popup>
<van-popup v-model="showSource" position="bottom"> <van-field
<van-picker required
show-toolbar readonly
value-key="factor" clickable
:columns="columnsSource" name="dangerId"
@confirm="onConSource" :value="source"
@cancel="showSource = false" label="风险源"
/> placeholder="请选择"
</van-popup> @click="showSource = true"
:rules="[{ required: true, message: '风险源不能为空' }]"
/>
<!-- <van-field <van-popup v-model="showSource" position="bottom">
readonly <van-picker
clickable show-toolbar
name="dangerSource" value-key="factor"
:value="source1" :columns="columnsSource"
label=" " @confirm="onConSource"
@click="showSource1 = true" @cancel="showSource = false"
placeholder="请选择" />
:rules="[{ required: true, message: '风险源不能为空' }]" </van-popup>
/> <van-field
v-model="source1"
<van-popup v-model="showSource1" position="bottom"> readonly
<van-picker rows="3"
show-toolbar autosize
value-key="riskSource" label=" "
:columns="columnsSource1" name="dangerSource"
@confirm="onConSource1" type="textarea"
@cancel="showSource1 = false" @click="goSelectTwo"
/> placeholder="请选择"
</van-popup> --> :rules="[{ required: true, message: '隐患描述不能为空' }]"
/>
<van-field <van-field
v-model="source1" v-model="location"
readonly name="hdPosition"
rows="3" label="检查部位"
autosize placeholder="请输入"
label=" " :rules="[{ required: true, message: '检查部位不能为空' }]"
name="dangerSource" />
type="textarea"
@click="goSelectTwo"
placeholder="请选择"
:rules="[{ required: true, message: '隐患描述不能为空' }]"
/>
<van-field <van-field
v-model="location" required
name="hdPosition" v-model="describe"
label="检查部位" rows="3"
placeholder="请输入" label="隐患描述"
:rules="[{ required: true, message: '检查部位不能为空' }]" name="hdDescribe"
/> type="textarea"
placeholder="请输入"
:rules="[{ required: true, message: '隐患描述不能为空' }]"
/>
<van-field <van-field name="hdPicture1" label="隐患照片">
required <template #input>
v-model="describe" <van-uploader
rows="3" @delete="deleteFile(...arguments, 'uploaderImg')"
label="隐患描述" multiple
name="hdDescribe" :max-count="5"
type="textarea" upload-text="最多上传五个"
placeholder="请输入" v-model="uploaderImg"
:rules="[{ required: true, message: '隐患描述不能为空' }]" >
/> <template slot="default">
<!-- 11111111111 -->
<div
style="
width: 2.13333rem;
height: 2.13333rem;
background: #f7f8fa;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src="@/assets/upload/pic.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text"
>最多上传五个</span
>
</div>
</template>
</van-uploader>
</template>
</van-field>
<van-field name="hdPicture1" label="隐患照片"> <van-field name="hdVideo1" label="隐患视频">
<template #input> <template #input>
<van-uploader <van-uploader
@delete="deleteFile(...arguments,'uploaderImg')" multiple
multiple @delete="deleteFile(...arguments, 'uploaderVideo')"
:max-count="5" :max-count="5"
upload-text="最多上传五个" upload-text="最多上传五个"
v-model="uploaderImg" v-model="uploaderVideo"
> accept="video/*"
<template slot="default"> @click-preview="clickPre"
<!-- 11111111111 --> >
<div <template slot="default">
style=" <!-- 11111111111 -->
width: 2.13333rem; <div
height: 2.13333rem; style="
background: #f7f8fa; width: 2.13333rem;
display: flex; height: 2.13333rem;
align-items: center; background: #f7f8fa;
justify-content: center; display: flex;
flex-direction: column; align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src="@/assets/upload/video.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/>
<span class="van-uploader__upload-text"
>最多上传五个</span
>
</div>
</template>
</van-uploader>
</template>
</van-field>
<van-field
readonly
clickable
name="hdExpirationTime"
:value="expireTime"
label="隐患到期时间"
placeholder="点击选择日期"
@click="
showExpireTime = true;
currentDate = new Date();
" "
> />
<img <van-popup v-model="showExpireTime" position="bottom">
src="@/assets/upload/pic.png" <van-datetime-picker
alt="" type="datetime"
style="width: 0.64rem; height: 0.64rem" v-model="currentDate"
@confirm="onConExpireTime"
@cancel="showExpireTime = false"
/> />
<span class="van-uploader__upload-text">最多上传五个</span> </van-popup>
</div>
</template>
</van-uploader>
</template>
</van-field>
<van-field name="hdVideo1" label="隐患视频"> <van-field
<template #input> readonly
<van-uploader clickable
multiple name="rectificationUser"
@delete="deleteFile(...arguments,'uploaderVideo')" :value="recPeople"
:max-count="5" label="隐患整改人"
upload-text="最多上传五个" placeholder="请选择"
v-model="uploaderVideo" @click="showRecPeople = true"
accept="video/*" />
@click-preview="clickPre" <van-popup v-model="showRecPeople" position="bottom">
> <van-picker
<template slot="default"> show-toolbar
<!-- 11111111111 --> value-key="userName"
<div :columns="columnsRecPeople"
style=" @confirm="onConRecPeople"
width: 2.13333rem; @cancel="showRecPeople = false"
height: 2.13333rem;
background: #f7f8fa;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
"
>
<img
src="@/assets/upload/video.png"
alt=""
style="width: 0.64rem; height: 0.64rem"
/> />
<span class="van-uploader__upload-text">最多上传五个</span> </van-popup>
</div> <div style="margin: 16px 16px 0">
</template> <van-button round block type="info" native-type="submit"
</van-uploader> >上报</van-button
</template> >
</van-field> </div>
<van-field </van-form>
readonly <div style="margin: 10px 16px 0px; padding-bottom: 16px">
clickable <van-button round block type="warning" @click.native="cancel"
name="hdExpirationTime" >取消</van-button
:value="expireTime" >
label="隐患到期时间" </div>
placeholder="点击选择日期"
@click="
showExpireTime = true;
currentDate = new Date();
"
/>
<van-popup v-model="showExpireTime" position="bottom">
<van-datetime-picker
type="datetime"
v-model="currentDate"
@confirm="onConExpireTime"
@cancel="showExpireTime = false"
/>
</van-popup>
<van-field
readonly
clickable
name="rectificationUser"
:value="recPeople"
label="隐患整改人"
placeholder="请选择"
@click="showRecPeople = true"
/>
<van-popup v-model="showRecPeople" position="bottom">
<van-picker
show-toolbar
value-key="userName"
:columns="columnsRecPeople"
@confirm="onConRecPeople"
@cancel="showRecPeople = false"
/>
</van-popup>
<div style="margin: 16px 16px 0">
<van-button round block type="info" native-type="submit"
>上报</van-button
>
</div>
</van-form>
<div style="margin: 10px 16px 0px; padding-bottom: 16px">
<van-button round block type="warning" @click.native="cancel"
>取消</van-button
>
</div> </div>
</div>
</template> </template>
<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 { 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,
postHdName, postHdName,
postHdInventories, postHdInventories,
postHdRiskSource, postHdRiskSource,
postHdShowPeople, postHdShowPeople,
postHdReportAdd, postHdReportAdd,
dangerReturnEcho, dangerReturnEcho,
} from "@/service/danger"; } from "@/service/danger";
export default { export default {
name: "add-danger", name: "add-danger",
components: { components: {
LHeader, LHeader,
customPlayer customPlayer,
},
activated() {
this.taskId =
this.$route.params.taskId || localStorage.getItem("dangerAddTaskId");
console.log(this.taskId);
if (this.taskId) {
this.isShowreturnCause = true;
this.text = "隐患上报退回";
this.postReturnEcho();
}
this.getList();
},
mounted() {
this.$bus.$on("sourceAyy", (res) => {
setTimeout(() => {
this.source1 = res.join(",");
// 销毁一下监听事件 不然会越加越多
this.$bus.$off("riskLevelBus");
});
});
},
beforeRouteLeave(to, from, next) {
if (to.name != "choose-people") {
(this.text = "新增隐患"), (this.projectId = ""); // 所属工程
this.taskId = "";
this.projectName = "";
this.showProjectName = false;
this.columnsProjectName = [];
this.range = ""; //适用范围
this.showRange = false;
this.columnsRange = [];
this.type = ""; //隐患类型
this.showType = false;
this.columnsType = [];
this.dangerName = ""; //隐患项目名称
this.showDangerName = false;
this.columnsDangerName = [];
this.dangerNum = ""; //隐患单编号
this.dangerLevel = ""; //隐患项目级别
this.findTime = ""; //隐患发现时间
this.showFindTime = false;
this.source = ""; // 风险源
this.showSource = false;
this.columnsSource = [];
this.source1 = ""; // 风险源第二个字段
this.showSource1 = false;
this.columnsSource1 = [];
this.location = ""; // 检查部位
this.describe = ""; // 隐患描述
this.uploaderImg = []; //图像上传
this.uploaderVideo = []; //视频上传
this.expireTime = ""; // 隐患到期时间
this.showExpireTime = false;
this.recPeople = "";
this.showRecPeople = false;
this.columnsRecPeople = [];
this.isShowreturnCause = false;
this.returnCause = ""; // 退回原因
this.currentDate = new Date();
// 清空 localStorage
localStorage.removeItem("dangerAddTaskId");
}
next();
},
data() {
return {
// 视频预览地址
videoUrl:'',
id: 0,
text: "新增隐患",
taskId: "",
projectId: "", // 所属工程
projectName: "",
showProjectName: false,
columnsProjectName: [],
range: "", //适用范围
showRange: false,
columnsRange: [],
type: "", //隐患类型
showType: false,
columnsType: [],
dangerName: "", //隐患项目名称
showDangerName: false,
columnsDangerName: [],
dangerNum: "", //隐患单编号
dangerLevel: "", //隐患项目级别
findTime: "", //隐患发现时间
showFindTime: false,
source: "", // 风险源
showSource: false,
columnsSource: [],
source1: "", // 风险源第二个字段
showSource1: false,
columnsSource1: [],
location: "", // 检查部位
describe: "", // 隐患描述
uploaderImg: [], //图像上传
uploaderVideo: [], //视频上传
expireTime: "", // 隐患到期时间
showExpireTime: false,
recPeople: "",
showRecPeople: false,
columnsRecPeople: [],
isShowreturnCause: false,
returnCause: "", // 退回原因
currentDate: new Date(),
};
},
methods: {
// 点击预览图
clickPre(e){
console.log(e)
if(e.filePath){
this.videoUrl=e.filePath;
}else{
this.videoUrl=e.content;
}
}, },
async deleteFile(val,detail,key){ activated() {
// console.log(val,detail) this.taskId =
if(val.fileId){ this.$route.params.taskId ||
let formdata= new FormData(); localStorage.getItem("dangerAddTaskId");
formdata.append('key',val['fileId']) console.log(this.taskId);
let res = await postFun('/mobile/remove',formdata); if (this.taskId) {
if(res){ this.isShowreturnCause = true;
console.log(res); this.text = "隐患上报退回";
this.$toast({ this.postReturnEcho();
title:'提示',
message:'删除成功!'
})
} else {
console.log('删除失败');
this[key].splice(detail.index,0,val)
} }
} this.getList();
}, },
dangerType(danger) {
// 严重隐患 = A
// 较大隐患 = B mounted() {
this.$bus.$on("sourceAyy", (res) => {
setTimeout(() => {
this.source1 = res.join(",");
// 销毁一下监听事件 不然会越加越多
this.$bus.$off("riskLevelBus");
});
});
},
beforeRouteLeave(to, from, next) {
if (to.name != "choose-people") {
(this.text = "新增隐患"), (this.projectId = ""); // 所属工程
this.taskId = "";
this.projectName = "";
this.showProjectName = false;
this.columnsProjectName = [];
this.range = ""; //适用范围
this.showRange = false;
this.columnsRange = [];
this.type = ""; //隐患类型
this.showType = false;
this.columnsType = [];
this.dangerName = ""; //隐患项目名称
this.showDangerName = false;
this.columnsDangerName = [];
this.dangerNum = ""; //隐患单编号
this.dangerLevel = ""; //隐患项目级别
this.findTime = ""; //隐患发现时间
this.showFindTime = false;
this.source = ""; // 风险源
this.showSource = false;
this.columnsSource = [];
this.source1 = ""; // 风险源第二个字段
this.showSource1 = false;
this.columnsSource1 = [];
this.location = ""; // 检查部位
this.describe = ""; // 隐患描述
this.uploaderImg = []; //图像上传
this.uploaderVideo = []; //视频上传
this.expireTime = ""; // 隐患到期时间
this.showExpireTime = false;
this.recPeople = "";
this.showRecPeople = false;
this.columnsRecPeople = [];
this.isShowreturnCause = false;
this.returnCause = ""; // 退回原因
this.currentDate = new Date();
// 清空 localStorage
localStorage.removeItem("dangerAddTaskId");
}
next();
},
// 危险隐患 = C data() {
return {
// 视频预览地址
videoUrl: "",
// 重大隐患 = S id: 0,
switch (danger) { text: "新增隐患",
case "A": taskId: "",
return "严重隐患"; projectId: "", // 所属工程
case "B": projectName: "",
return "较大隐患"; showProjectName: false,
case "C": columnsProjectName: [],
return "危险隐患"; range: "", //适用范围
case "S": showRange: false,
return "重大隐患"; columnsRange: [],
case "严重隐患": type: "", //隐患类型
return "A"; showType: false,
case "较大隐患": columnsType: [],
return "B"; dangerName: "", //隐患项目名称
case "危险隐患": showDangerName: false,
return "C"; columnsDangerName: [],
case "重大隐患": dangerNum: "", //隐患单编号
return "S"; dangerLevel: "", //隐患项目级别
default: findTime: "", //隐患发现时间
return danger; showFindTime: false,
} source: "", // 风险源
showSource: false,
columnsSource: [],
source1: "", // 风险源第二个字段
showSource1: false,
columnsSource1: [],
location: "", // 检查部位
describe: "", // 隐患描述
uploaderImg: [], //图像上传
uploaderVideo: [], //视频上传
expireTime: "", // 隐患到期时间
showExpireTime: false,
recPeople: "",
showRecPeople: false,
columnsRecPeople: [],
isShowreturnCause: false,
returnCause: "", // 退回原因
currentDate: new Date(),
};
}, },
onSubmit(values) { methods: {
let formdata = new FormData(); // 点击预览图
formdata.append("id", this.id); clickPre(e) {
formdata.append("proId", this.projectId); console.log(e);
// formdata.append("projectName", this.projectName); if (e.filePath) {
formdata.append("hdRange", values.hdRange); this.videoUrl = e.filePath;
formdata.append("hdType", values.hdType); } else {
formdata.append("hdProjectName", values.hdProjectName); this.videoUrl = e.content;
formdata.append("hdProjectId", values.hdProjectId); }
formdata.append("hdLev", this.dangerType(values.hdLev)); },
formdata.append("hdDiscoveryTime", values.hdDiscoveryTime); async deleteFile(val, detail, key) {
formdata.append("dangerId", values.dangerId); // console.log(val,detail)
formdata.append("dangerSource", values.dangerSource); if (val.fileId) {
formdata.append("hdPosition", values.hdPosition); let formdata = new FormData();
formdata.append("hdDescribe", values.hdDescribe); formdata.append("key", val["fileId"]);
formdata.append("hdExpirationTime", values.hdExpirationTime||''); let res = await postFun("/mobile/remove", formdata);
formdata.append("rectificationUser", values.rectificationUser||''); if (res) {
console.log(values.hdPicture1, "这是要上传的文件"); console.log(res);
// 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式 this.$toast({
values.hdPicture1.forEach((item) => { title: "提示",
if (item.file) { message: "删除成功!",
formdata.append("hdPicture1[]", item.file); });
} } else {
}); console.log("删除失败");
values.hdVideo1.forEach((item) => { this[key].splice(detail.index, 0, val);
if (item.file) { }
formdata.append("hdVideo1[]", item.file); }
} },
}); dangerType(danger) {
this.$toast.loading({ // 严重隐患 = A
message: "提交中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
let url = "/hdreport/add";
if (this.taskId) {
url = `/hdreport/editSave/${this.taskId}`;
}
console.log(url);
postHdReportAdd(url, formdata) // 较大隐患 = B
.then((res) => {
this.$toast.clear();
this.$toast.success({
message: "提交成功",
duration: 2000,
});
history.go(-1);
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("提交失败,请稍后再试");
});
},
// 请求表单数据
getList() {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
getFormList("/hdreport/add")
.then((res) => {
this.$toast.clear();
this.columnsProjectName = res.data.projectInformations;
this.columnsRange = res.data.hdInventories;
this.columnsSource = res.data.factors;
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
// 请求已退回详情数据 // 危险隐患 = C
postReturnEcho() {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
dangerReturnEcho(`/hdreport/edit/${this.taskId}`)
.then((res) => {
this.$toast.clear();
// 对数据进行赋值
this.returnCause = res.data.reason;
let msg = res.data.hdReport;
// msg.hdPictureList=msg.hdPictureList||[];
// msg.hdVideoList=msg.hdVideoList||[];
this.id = msg.id;
this.projectId = msg.proId;
this.projectName = res.data.projectInformations.filter(
(item) => item.id == msg.proId
)[0]["projectName"];
this.range = msg.hdRange;
this.type = msg.hdType;
this.dangerName = msg.hdProjectName;
this.dangerNum = msg.hdProjectId;
this.dangerLevel = this.dangerType(msg.hdLev);
this.source1 = this.source1 ? this.source1 : msg.dangerSource;
this.findTime = msg.hdDiscoveryTime;
this.source = msg.dangerId;
this.location = msg.hdPosition;
this.describe = msg.hdDescribe;
this.expireTime = msg.hdExpirationTime;
this.recPeople = msg.rectificationUser;
this.uploaderImg = (res.data.imgsysFiles || []).map((item) => {
return {
...item,
url: item.filePath,
};
});
console.log(this.uploaderImg);
this.uploaderVideo = (res.data.videosysFiles || []).map((item) => {
return {
...item,
url: item.filePath,
};
});
postHdShowPeople(`/hdreport/showPeople/${msg.proId}`).then((res) => { // 重大隐患 = S
this.columnsRecPeople = res.data; switch (danger) {
}); case "A":
}) return "严重隐患";
.catch((err) => { case "B":
console.log(err); return "较大隐患";
this.$toast.clear(); case "C":
this.$toast.fail("加载失败,请稍后再试"); return "危险隐患";
}); case "S":
}, return "重大隐患";
case "严重隐患":
return "A";
case "较大隐患":
return "B";
case "危险隐患":
return "C";
case "重大隐患":
return "S";
default:
return danger;
}
},
// 所属项目 onSubmit(values) {
onConProjectName(value) { let formdata = new FormData();
if (!value) { formdata.append("id", this.id);
this.showProjectName = false; formdata.append("proId", this.projectId);
return; // formdata.append("projectName", this.projectName);
} formdata.append("hdRange", values.hdRange);
this.projectId = value.id; formdata.append("hdType", values.hdType);
this.projectName = value.projectName; formdata.append("hdProjectName", values.hdProjectName);
this.showProjectName = false; formdata.append("hdProjectId", values.hdProjectId);
// 这里请求隐患整改人接口 formdata.append("hdLev", this.dangerType(values.hdLev));
postHdShowPeople(`/hdreport/showPeople/${this.projectId}`).then((res) => { formdata.append("hdDiscoveryTime", values.hdDiscoveryTime);
this.columnsRecPeople = res.data; formdata.append("dangerId", values.dangerId);
}); formdata.append("dangerSource", values.dangerSource);
}, formdata.append("hdPosition", values.hdPosition);
// 适用范围 formdata.append("hdDescribe", values.hdDescribe);
onConRange(value) { formdata.append("hdExpirationTime", values.hdExpirationTime || "");
if (!value) { formdata.append(
this.showRange = false; "rectificationUser",
return; values.rectificationUser || ""
} );
this.range = value.hdRange; console.log(values.hdPicture1, "这是要上传的文件");
this.showRange = false; // 放图片路径 因为formdat存数组会自动变成字符串所以次用这种追加字段的方式
this.type = ""; values.hdPicture1.forEach((item) => {
this.dangerName = ""; if (item.file) {
this.dangerNum = ""; formdata.append("hdPicture1[]", item.file);
this.dangerLevel = ""; }
// 去请求隐患类型的数据 });
postHdTyp(`/hdreport/showHdType/${this.range}`).then((res) => { values.hdVideo1.forEach((item) => {
this.columnsType = res.data; if (item.file) {
}); formdata.append("hdVideo1[]", item.file);
}, }
// 隐患类型 });
onConType(value) { this.$toast.loading({
if (!value) { message: "提交中...",
this.showType = false; forbidClick: true,
return; loadingType: "spinner",
} duration: 0,
this.type = value.hdType; });
this.showType = false; let url = "/hdreport/add";
this.dangerName = ""; if (this.taskId) {
this.dangerNum = ""; url = `/hdreport/editSave/${this.taskId}`;
this.dangerLevel = ""; }
// 请求隐患项目名称的数据 console.log(url);
postHdName(`/hdreport/showHdName/${this.range}/${this.type}`).then(
(res) => {
this.columnsDangerName = res.data;
}
);
},
// 隐患项目名称
onConDangerName(value) {
if (!value) {
this.showDangerName = false;
return;
}
this.dangerName = value.hdName;
this.showDangerName = false;
// 请求隐患单编号和隐患级别
postHdInventories(
`/hdreport/showHdInventories/${this.range}/${this.type}/${this.dangerName}`
).then((res) => {
this.dangerNum = res.data[0].hdId;
this.dangerLevel = this.dangerType(res.data[0].hdLev);
});
},
// 隐患发现时间
onConFindTime(date) {
this.findTime = timestampToTime(date, "DT1", true);
this.showFindTime = false;
// this.currentDate = new Date()
},
// 风险源
onConSource(value) {
if (!value) {
this.showSource = false;
return;
}
this.source = value.factor;
this.showSource = false;
// 请求风险源第二个字段
let formdata = new FormData();
formdata.append("factor", this.source);
postHdRiskSource("/riskSource/list", formdata).then((res) => {
this.columnsSource1 = res.data;
});
},
// 风险源第二个字段
// onConSource1(value) {
// this.source1 = value.riskSource;
// this.showSource1 = false;
// },
goSelectTwo() {
if (this.source) {
// 跳转到多选页面
this.$router.push({
name: "choose-people",
params: {
source: this.source,
},
});
} else {
this.$toast("请先选择风险源");
}
},
// 隐患到期时间
onConExpireTime(date) {
this.expireTime = timestampToTime(date, "DT1", true);
this.showExpireTime = false;
// this.currentDate = new Date()
},
// 隐患整改人
onConRecPeople(value) {
if (!value) {
this.showRecPeople = false;
return;
}
this.recPeople = value.userName;
this.showRecPeople = false;
},
cancel() { postHdReportAdd(url, formdata)
this.$router.go(-1); .then((res) => {
this.$toast.clear();
this.$toast.success({
message: "提交成功",
duration: 2000,
});
history.go(-1);
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("提交失败,请稍后再试");
});
},
// 请求表单数据
getList() {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
getFormList("/hdreport/add")
.then((res) => {
this.$toast.clear();
this.columnsProjectName = res.data.projectInformations;
this.columnsRange = res.data.hdInventories;
this.columnsSource = res.data.factors;
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
// 请求已退回详情数据
postReturnEcho() {
this.$toast.loading({
message: "加载中...",
forbidClick: true,
loadingType: "spinner",
duration: 0,
});
dangerReturnEcho(`/hdreport/edit/${this.taskId}`)
.then((res) => {
this.$toast.clear();
// 对数据进行赋值
this.returnCause = res.data.reason;
let msg = res.data.hdReport;
// msg.hdPictureList=msg.hdPictureList||[];
// msg.hdVideoList=msg.hdVideoList||[];
this.id = msg.id;
this.projectId = msg.proId;
this.projectName = res.data.projectInformations.filter(
(item) => item.id == msg.proId
)[0]["projectName"];
this.range = msg.hdRange;
this.type = msg.hdType;
this.dangerName = msg.hdProjectName;
this.dangerNum = msg.hdProjectId;
this.dangerLevel = this.dangerType(msg.hdLev);
this.source1 = this.source1
? this.source1
: msg.dangerSource;
this.findTime = msg.hdDiscoveryTime;
this.source = msg.dangerId;
this.location = msg.hdPosition;
this.describe = msg.hdDescribe;
this.expireTime = msg.hdExpirationTime;
this.recPeople = msg.rectificationUser;
this.uploaderImg = (res.data.imgsysFiles || []).map(
(item) => {
return {
...item,
url: item.filePath,
};
}
);
console.log(this.uploaderImg);
this.uploaderVideo = (res.data.videosysFiles || []).map(
(item) => {
return {
...item,
url: item.filePath,
};
}
);
postHdShowPeople(`/hdreport/showPeople/${msg.proId}`).then(
(res) => {
this.columnsRecPeople = res.data;
}
);
})
.catch((err) => {
console.log(err);
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
// 所属项目
onConProjectName(value) {
if (!value) {
this.showProjectName = false;
return;
}
this.projectId = value.id;
this.projectName = value.projectName;
this.showProjectName = false;
// 这里请求隐患整改人接口
postHdShowPeople(`/hdreport/showPeople/${this.projectId}`).then(
(res) => {
this.columnsRecPeople = res.data;
}
);
},
// 适用范围
onConRange(value) {
if (!value) {
this.showRange = false;
return;
}
this.range = value.hdRange;
this.showRange = false;
this.type = "";
this.dangerName = "";
this.dangerNum = "";
this.dangerLevel = "";
// 去请求隐患类型的数据
postHdTyp(`/hdreport/showHdType/${this.range}`).then((res) => {
this.columnsType = res.data;
});
},
// 隐患类型
onConType(value) {
if (!value) {
this.showType = false;
return;
}
this.type = value.hdType;
this.showType = false;
this.dangerName = "";
this.dangerNum = "";
this.dangerLevel = "";
// 请求隐患项目名称的数据
postHdName(`/hdreport/showHdName/${this.range}/${this.type}`).then(
(res) => {
this.columnsDangerName = res.data;
}
);
},
// 隐患项目名称
onConDangerName(value) {
if (!value) {
this.showDangerName = false;
return;
}
this.dangerName = value.hdName;
this.showDangerName = false;
// 请求隐患单编号和隐患级别
postHdInventories(
`/hdreport/showHdInventories/${this.range}/${this.type}/${this.dangerName}`
).then((res) => {
this.dangerNum = res.data[0].hdId;
this.dangerLevel = this.dangerType(res.data[0].hdLev);
});
},
// 隐患发现时间
onConFindTime(date) {
this.findTime = timestampToTime(date, "DT1", true);
this.showFindTime = false;
// this.currentDate = new Date()
},
// 风险源
onConSource(value) {
if (!value) {
this.showSource = false;
return;
}
this.source = value.factor;
this.showSource = false;
// 请求风险源第二个字段
let formdata = new FormData();
formdata.append("factor", this.source);
postHdRiskSource("/riskSource/list", formdata).then((res) => {
this.columnsSource1 = res.data;
});
},
goSelectTwo() {
if (this.source) {
// 跳转到多选页面
this.$router.push({
name: "choose-people",
params: {
source: this.source,
},
});
} else {
this.$toast("请先选择风险源");
}
},
// 隐患到期时间
onConExpireTime(date) {
this.expireTime = timestampToTime(date, "DT1", true);
this.showExpireTime = false;
// this.currentDate = new Date()
},
// 隐患整改人
onConRecPeople(value) {
if (!value) {
this.showRecPeople = false;
return;
}
this.recPeople = value.userName;
this.showRecPeople = false;
},
cancel() {
this.$router.go(-1);
},
}, },
},
}; };
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
/* @import url(); 引入css类 */ /* @import url(); 引入css类 */
.gray { .gray {
/deep/.van-field__control { /deep/.van-field__control {
color: gray !important; color: gray !important;
} }
} }
</style> </style>
...@@ -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,18 +54,29 @@ ...@@ -62,18 +54,29 @@
> >
<van-col span="18">{{ hdReport.hdProjectId }}</van-col> <van-col span="18">{{ hdReport.hdProjectId }}</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-col span="6"
><span class="field-title"
>隐患项目名称:</span
></van-col
>
<van-col span="18">{{
hdReport.hdProjectName
}}</van-col>
</van-row>
<!-- hdProjectId -->
<!-- 隐藏的字段 --> <!-- 隐藏的字段 -->
<div v-show="reportOpen"> <div v-show="reportOpen">
<van-row gutter="">
<van-col span="6"
><span class="field-title"
>隐患项目名称:</span
></van-col
>
<van-col span="18">{{
hdReport.hdProjectName
}}</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"
...@@ -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"
...@@ -224,7 +230,7 @@ ...@@ -224,7 +230,7 @@
</div></van-col </div></van-col
> >
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="9" <van-col span="9"
><span class="field-title" ><span class="field-title"
>隐患确认信息:</span >隐患确认信息:</span
...@@ -272,8 +278,8 @@ ...@@ -272,8 +278,8 @@
item.endTime item.endTime
}}</van-col> }}</van-col>
</van-row> </van-row>
<van-row gutter=""> <van-row gutter="">
<van-col span="7" <van-col span="7"
><span class="field-title" ><span class="field-title"
>认定意见:</span >认定意见:</span
...@@ -351,7 +357,7 @@ ...@@ -351,7 +357,7 @@
<van-col span="9" <van-col span="9"
><span class="field-title" ><span class="field-title"
>认定隐患级别:</span >认定隐患级别:</span
></van-col ></van-col
> >
<van-col <van-col
span="10 span="10
...@@ -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