Commit 615b381c authored by 罗新东's avatar 罗新东

隐患复查

parent 6115d83d
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
@click="showProjectName = true" @click="showProjectName = true"
:rules="[{ required: true, message: '所属项目不能为空' }]" :rules="[{ required: true, message: '所属项目不能为空' }]"
/> />
<van-popup v-model="showProjectName" position="bottom"> <van-popup v-model="showProjectName" position="bottom" v-if="!isShowreturnCause">
<van-picker <van-picker
show-toolbar show-toolbar
value-key="projectName" value-key="projectName"
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
@click="showRange = true" @click="showRange = true"
:rules="[{ required: true, message: '适用范围不能为空' }]" :rules="[{ required: true, message: '适用范围不能为空' }]"
/> />
<van-popup v-model="showRange" position="bottom"> <van-popup v-model="showRange" position="bottom" v-if="!isShowreturnCause">
<van-picker <van-picker
show-toolbar show-toolbar
value-key="hdRange" value-key="hdRange"
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
@click="showType = true" @click="showType = true"
:rules="[{ required: true, message: '隐患类型不能为空' }]" :rules="[{ required: true, message: '隐患类型不能为空' }]"
/> />
<van-popup v-model="showType" position="bottom"> <van-popup v-model="showType" position="bottom" v-if="!isShowreturnCause">
<van-picker <van-picker
show-toolbar show-toolbar
value-key="hdType" value-key="hdType"
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
@click="showDangerName = true" @click="showDangerName = true"
:rules="[{ required: true, message: '隐患项目名称不能为空' }]" :rules="[{ required: true, message: '隐患项目名称不能为空' }]"
/> />
<van-popup v-model="showDangerName" position="bottom"> <van-popup v-model="showDangerName" position="bottom" v-if="!isShowreturnCause">
<van-picker <van-picker
show-toolbar show-toolbar
value-key="hdName" value-key="hdName"
......
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,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-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col>
</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>
...@@ -59,7 +63,10 @@ ...@@ -59,7 +63,10 @@
:value="value" :value="value"
label="整改截止时间" label="整改截止时间"
placeholder="点击选择日期" placeholder="点击选择日期"
@click="showCalendar = true;currentDate = new Date()" @click="
showCalendar = true;
currentDate = new Date();
"
:rules="[{ required: true, message: '请选择日期' }]" :rules="[{ required: true, message: '请选择日期' }]"
/> />
<van-popup v-model="showCalendar" position="bottom"> <van-popup v-model="showCalendar" position="bottom">
...@@ -135,13 +142,13 @@ ...@@ -135,13 +142,13 @@
/> />
</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
> >
...@@ -151,13 +158,13 @@ ...@@ -151,13 +158,13 @@
<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 { getConfirmFormList, dangerConSub } from "@/service/danger"; import { getConfirmFormList, dangerConSub } from "@/service/danger";
export default { export default {
name: "affirm-danger", name: "affirm-danger",
components: { components: {
LHeader LHeader,
}, },
data() { data() {
return { return {
...@@ -177,19 +184,18 @@ export default { ...@@ -177,19 +184,18 @@ export default {
showPickerReview: false, showPickerReview: false,
valueIdea: "", valueIdea: "",
returnReason: "", returnReason: "",
currentDate: new Date() currentDate: new Date(),
}; };
}, },
beforeRouteEnter(to, from, next) { beforeRouteEnter(to, from, next) {
next(vm => { next((vm) => {
if (from.name === "confirme-danger") { if (from.name === "confirme-danger") {
vm.messageList = []; vm.messageList = [];
let paramsData = to.params.data; let paramsData = to.params.data;
vm.taskId = paramsData.taskId; vm.taskId = paramsData.taskId;
vm.messageList.push(paramsData); vm.messageList.push(paramsData);
vm.radio= "1", (vm.radio = "1"), (vm.value = "");
vm.value = "";
vm.rectId = ""; // 隐患整改人 vm.rectId = ""; // 隐患整改人
vm.valueRect = ""; vm.valueRect = "";
vm.reviewId = ""; // 隐患复查人 vm.reviewId = ""; // 隐患复查人
...@@ -198,7 +204,7 @@ export default { ...@@ -198,7 +204,7 @@ export default {
vm.returnReason = ""; vm.returnReason = "";
vm.getFormList(); vm.getFormList();
// 清空数据 // 清空数据
vm.currentDate = new Date() vm.currentDate = new Date();
} }
}); });
}, },
...@@ -213,10 +219,10 @@ export default { ...@@ -213,10 +219,10 @@ export default {
message: "加载中...", message: "加载中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0,
}); });
getConfirmFormList(`confirm/add/${this.taskId}`) getConfirmFormList(`confirm/add/${this.taskId}`)
.then(res => { .then((res) => {
this.$toast.clear(); this.$toast.clear();
this.columnsRect = res.data.rectificationUser; this.columnsRect = res.data.rectificationUser;
this.columnsReview = res.data.rectificationReview; this.columnsReview = res.data.rectificationReview;
...@@ -234,22 +240,31 @@ export default { ...@@ -234,22 +240,31 @@ export default {
} }
let formdata = new FormData(); let formdata = new FormData();
formdata.append("confirmResult", this.radio); formdata.append("confirmResult", this.radio);
formdata.append("endTime", values.endTime?values.endTime:''); formdata.append("endTime", values.endTime ? values.endTime : "");
formdata.append("rectificationUser", values.rectificationUser?values.rectificationUser:''); formdata.append(
formdata.append("rectificationReview", values.rectificationReview?values.rectificationReview:''); "rectificationUser",
formdata.append("confirmOpinion", values.confirmOpinion?values.confirmOpinion:''); values.rectificationUser ? values.rectificationUser : ""
);
formdata.append(
"rectificationReview",
values.rectificationReview ? values.rectificationReview : ""
);
formdata.append(
"confirmOpinion",
values.confirmOpinion ? values.confirmOpinion : ""
);
this.$toast.loading({ this.$toast.loading({
message: "提交中...", message: "提交中...",
forbidClick: true, forbidClick: true,
loadingType: "spinner", loadingType: "spinner",
duration: 0 duration: 0,
}); });
dangerConSub(`/confirm/add1/${this.taskId}`, formdata) dangerConSub(`/confirm/add1/${this.taskId}`, formdata)
.then(res => { .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);
}) })
...@@ -270,18 +285,18 @@ export default { ...@@ -270,18 +285,18 @@ export default {
}, },
onConRect(value) { onConRect(value) {
if(!value){ if (!value) {
this.showPickerRect = false; this.showPickerRect = false;
return return;
} }
this.valueRect = value.userName; this.valueRect = value.userName;
this.rectId = value.userId; this.rectId = value.userId;
this.showPickerRect = false; this.showPickerRect = false;
}, },
onConReview(value) { onConReview(value) {
if(!value){ if (!value) {
this.showPickerReview = false; this.showPickerReview = false;
return return;
} }
this.valueReview = value.userName; this.valueReview = value.userName;
this.reviewId = value.userId; this.reviewId = value.userId;
...@@ -292,15 +307,15 @@ export default { ...@@ -292,15 +307,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,9 +45,13 @@ ...@@ -45,9 +45,13 @@
<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-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col>
</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">
<van-button round type="primary" @click="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>详情</van-button >详情</van-button
> >
...@@ -61,7 +65,13 @@ ...@@ -61,7 +65,13 @@
<!-- 暂无数据 --> <!-- 暂无数据 -->
<div <div
style="width: 100%;text-align: center; font-size: .48rem;position: fixed; top: 30%;" style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if="isHaveNews" v-if="isHaveNews"
> >
暂无数据 暂无数据
...@@ -72,13 +82,13 @@ ...@@ -72,13 +82,13 @@
<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 tabBar from "@/components/TabBar"; import tabBar from "@/components/TabBar";
import { dangerConfirm } from "@/service/danger"; import { dangerConfirm } from "@/service/danger";
export default { export default {
components: { components: {
LHeader, LHeader,
tabBar tabBar,
}, },
data() { data() {
return { return {
...@@ -87,7 +97,7 @@ export default { ...@@ -87,7 +97,7 @@ export default {
searchValue: "", searchValue: "",
messageList: [], messageList: [],
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null // 是否显示遮罩层 showIndex: null, // 是否显示遮罩层
}; };
}, },
created() { created() {
...@@ -95,19 +105,19 @@ export default { ...@@ -95,19 +105,19 @@ export default {
}, },
methods: { methods: {
onSearch(val) { onSearch(val) {
this.postList(this.searchValue) this.postList(this.searchValue);
}, },
postList(select='') { postList(select = "") {
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('select',select); formdata.append("select", select);
dangerConfirm("/confirm/list",formdata) dangerConfirm("/confirm/list", formdata)
.then(res => { .then((res) => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.rows; this.messageList = res.rows;
// 判断有无数据返回 // 判断有无数据返回
...@@ -123,19 +133,18 @@ export default { ...@@ -123,19 +133,18 @@ export default {
touchstart(index, item) { touchstart(index, item) {
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return return;
} }
this.showIndex = index; this.showIndex = index;
}, },
// 详情 // 详情
goDetail(data) { goDetail(data) {
this.$router.push({ this.$router.push({
name: "normal-detail", name: "normal-detail",
params: { params: {
id: data.taskId id: data.taskId,
} },
}); });
this.showIndex = null; this.showIndex = null;
}, },
...@@ -145,11 +154,11 @@ export default { ...@@ -145,11 +154,11 @@ export default {
name: "affirm-danger", name: "affirm-danger",
params: { params: {
data: data, data: data,
} },
}); });
this.showIndex = null; this.showIndex = null;
} },
} },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
...@@ -45,6 +45,11 @@ ...@@ -45,6 +45,11 @@
<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-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col>
</van-row>
<!-- {{ item.taskName }} -->
<!-- 长按显示遮罩层 --> <!-- 长按显示遮罩层 -->
<van-overlay :show="showIndex == index"> <van-overlay :show="showIndex == index">
......
...@@ -49,10 +49,13 @@ ...@@ -49,10 +49,13 @@
<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-col span="6">工单状态:</van-col>
<van-col span="18">{{ item.taskName }}</van-col>
</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">
<van-button round type="primary" @click="goDetail(item)" <van-button round type="primary" @click="goDetail(item)"
>详情</van-button >详情</van-button
> >
...@@ -65,7 +68,13 @@ ...@@ -65,7 +68,13 @@
</div> </div>
<!-- 暂无数据 --> <!-- 暂无数据 -->
<div <div
style="width: 100%;text-align: center; font-size: .48rem;position: fixed; top: 30%;" style="
width: 100%;
text-align: center;
font-size: 0.48rem;
position: fixed;
top: 30%;
"
v-if="isHaveNews" v-if="isHaveNews"
> >
暂无数据 暂无数据
...@@ -77,12 +86,12 @@ ...@@ -77,12 +86,12 @@
<script> <script>
import tabBar from "@/components/TabBar"; import tabBar from "@/components/TabBar";
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 { dangerReview } from "@/service/danger"; import { dangerReview } from "@/service/danger";
export default { export default {
components: { components: {
LHeader, LHeader,
tabBar tabBar,
}, },
data() { data() {
return { return {
...@@ -91,7 +100,7 @@ export default { ...@@ -91,7 +100,7 @@ export default {
searchValue: "", searchValue: "",
messageList: [], messageList: [],
Loop: "", // 定时器 Loop: "", // 定时器
showIndex: null // 是否显示遮罩层 showIndex: null, // 是否显示遮罩层
}; };
}, },
created() { created() {
...@@ -99,20 +108,20 @@ export default { ...@@ -99,20 +108,20 @@ export default {
}, },
methods: { methods: {
onSearch(val) { onSearch(val) {
this.postList(this.searchValue) this.postList(this.searchValue);
}, },
postList(select='') { postList(select = "") {
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('select',select); formdata.append("select", select);
dangerReview("/review/list",formdata) dangerReview("/review/list", formdata)
.then(res => { .then((res) => {
this.$toast.clear(); this.$toast.clear();
this.messageList = res.rows; this.messageList = res.rows;
// 判断有无数据返回 // 判断有无数据返回
...@@ -129,36 +138,35 @@ export default { ...@@ -129,36 +138,35 @@ export default {
touchstart(index, item) { touchstart(index, item) {
if (this.showIndex != null) { if (this.showIndex != null) {
this.showIndex = null; this.showIndex = null;
return return;
} }
this.showIndex = index; this.showIndex = index;
}, },
// 详情 // 详情
goDetail(data) { goDetail(data) {
this.$router.push({ this.$router.push({
name: "normal-detail", name: "normal-detail",
params: { params: {
id: data.taskId id: data.taskId,
} },
}); });
this.showIndex = null; this.showIndex = null;
}, },
// 确认 // 确认
goConfirm(data) { goConfirm(data) {
localStorage.setItem('reviewdanger_params',JSON.stringify(data)) localStorage.setItem("reviewdanger_params", JSON.stringify(data));
this.$router.push({ this.$router.push({
name: "review-add", name: "review-add",
params: { params: {
data, data,
} },
}); });
this.showIndex = null; this.showIndex = null;
} },
}, },
filters: { filters: {
formatTime: function(row) { formatTime: function (row) {
if (new Date(row.dueDate).getTime() <= row.rectificationTime) { if (new Date(row.dueDate).getTime() <= row.rectificationTime) {
return "超期"; return "超期";
} else if ( } else if (
...@@ -170,8 +178,8 @@ export default { ...@@ -170,8 +178,8 @@ export default {
} else { } else {
return "正常"; return "正常";
} }
} },
} },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
......
This diff is collapsed.
...@@ -144,13 +144,7 @@ export default { ...@@ -144,13 +144,7 @@ export default {
} }
], ],
dangerList: [ dangerList: [
{
key: "11",
// path: "/danger",
path: "/insert-danger",
imgUrl: require("@/assets/workbench/risk-confirm.png"),
text: "我的上报"
},
// 隐患排查治理 // 隐患排查治理
{ {
key: "1", key: "1",
...@@ -159,6 +153,13 @@ export default { ...@@ -159,6 +153,13 @@ export default {
imgUrl: require("@/assets/workbench/danger-report.png"), imgUrl: require("@/assets/workbench/danger-report.png"),
text: "隐患上报" text: "隐患上报"
}, },
{
key: "11",
// path: "/danger",
path: "/insert-danger",
imgUrl: require("@/assets/workbench/risk-confirm.png"),
text: "我的上报"
},
{ {
key: "3", key: "3",
path: "/confirme-danger", path: "/confirme-danger",
......
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