Commit 17408192 authored by 13841799530's avatar 13841799530

Merge branch 'develop' of http://git.censoft.com.cn/BCDH-HSE/bcdh-app into develop

parents bd22910d 03332fc5
Pipeline #8249 passed with stage
in 5 minutes and 2 seconds
...@@ -19,7 +19,7 @@ import { prefix } from '@/common/js/utils' ...@@ -19,7 +19,7 @@ import { prefix } from '@/common/js/utils'
import { Divider, Popup, Overlay, Loading, Dialog, ContactCard, Form, AddressEdit, AddressList, Field, CellGroup, Cell, import { Divider, Popup, Overlay, Loading, Dialog, ContactCard, Form, AddressEdit, AddressList, Field, CellGroup, Cell,
SwipeCell, Icon, Stepper, Card, Checkbox, CheckboxGroup, Button, Swipe, SwipeItem, PullRefresh, List, SwipeCell, Icon, Stepper, Card, Checkbox, CheckboxGroup, Button, Swipe, SwipeItem, PullRefresh, List,
Tab, Tabs, GoodsAction, GoodsActionIcon, GoodsActionButton, SubmitBar, Toast ,Search,Picker,Uploader,Notify ,ContactList,Calendar,Radio,RadioGroup,Tag,Tabbar,TabbarItem,Sticky, Grid, GridItem,Skeleton,Col,Row, Image as VanImage, Badge,NoticeBar,DatetimePicker, Tab, Tabs, GoodsAction, GoodsActionIcon, GoodsActionButton, SubmitBar, Toast ,Search,Picker,Uploader,Notify ,ContactList,Calendar,Radio,RadioGroup,Tag,Tabbar,TabbarItem,Sticky, Grid, GridItem,Skeleton,Col,Row, Image as VanImage, Badge,NoticeBar,DatetimePicker,
Step, Steps, ImagePreview,progress} from 'vant' Step, Steps, ImagePreview,progress, Popover} from 'vant'
import 'lib-flexible/flexible' import 'lib-flexible/flexible'
import vueEsign from 'vue-esign' import vueEsign from 'vue-esign'
import VideoPlayer from 'vue-video-player' import VideoPlayer from 'vue-video-player'
...@@ -32,7 +32,7 @@ Vue.use(VideoPlayer) ...@@ -32,7 +32,7 @@ Vue.use(VideoPlayer)
Vue.use(Divider).use(Popup).use(Overlay).use(Loading).use(Dialog).use(Toast).use(ContactCard).use(Form).use(AddressEdit).use(AddressList).use(Field).use(CellGroup).use(Cell).use(SwipeCell).use(Icon).use(Stepper).use(Card).use(Button).use(Swipe).use(SwipeItem).use(PullRefresh).use(List).use(Tab).use(Tabs).use(GoodsAction).use(GoodsActionIcon).use(GoodsActionButton).use(SubmitBar).use(Checkbox).use(CheckboxGroup).use(Search).use(Picker).use(Uploader).use(Notify) Vue.use(Divider).use(Popup).use(Overlay).use(Loading).use(Dialog).use(Toast).use(ContactCard).use(Form).use(AddressEdit).use(AddressList).use(Field).use(CellGroup).use(Cell).use(SwipeCell).use(Icon).use(Stepper).use(Card).use(Button).use(Swipe).use(SwipeItem).use(PullRefresh).use(List).use(Tab).use(Tabs).use(GoodsAction).use(GoodsActionIcon).use(GoodsActionButton).use(SubmitBar).use(Checkbox).use(CheckboxGroup).use(Search).use(Picker).use(Uploader).use(Notify)
.use(ContactList).use(Calendar).use(Radio).use(RadioGroup).use(Tag).use(Tabbar).use(TabbarItem).use(Sticky) .use(ContactList).use(Calendar).use(Radio).use(RadioGroup).use(Tag).use(Tabbar).use(TabbarItem).use(Sticky)
.use(Grid).use(GridItem).use(Skeleton).use(Col).use(Row).use(VanImage).use(Badge).use(NoticeBar).use(DatetimePicker) .use(Grid).use(GridItem).use(Skeleton).use(Col).use(Row).use(VanImage).use(Badge).use(NoticeBar).use(DatetimePicker)
.use(Step).use(Steps).use(ImagePreview).use(progress) .use(Step).use(Steps).use(ImagePreview).use(progress).use(Popover)
Vue.config.productionTip = false Vue.config.productionTip = false
new Vue({ new Vue({
router, router,
......
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
<div> <div>
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
<!-- 内容列表 --> <!-- 内容列表 -->
<div class="title">2022年4月26日</div> <div class="title">{{nowTime}}</div>
<p class="title-text">巡查发起人:李斌</p> <p class="title-text">巡查发起人:{{sponsor}}</p>
<p class="title-text">系统提示:请依据当日任务完成当日巡查工作。</p> <p class="title-text">系统提示:请依据当日任务完成当日巡查工作。</p>
<div class="con-list"> <div class="con-list">
<van-cell-group <van-cell-group
inset inset
v-for="(item, index) in contentList" v-for="(item, index) in contentList"
:key="index" :key="index"
@click="onClick(item.content)" @click="onClick(item)"
> >
<div class="icon-wrap"> <div class="icon-wrap">
<span class="icon-img"> <span class="icon-img">
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import { postWork } from "@/service/workbench"; import { postWork } from "@/service/workbench";
import { timestampToTime } from "@/utils/format";
export default { export default {
name: "danger-patrol", name: "danger-patrol",
components: { components: {
...@@ -39,6 +40,8 @@ export default { ...@@ -39,6 +40,8 @@ export default {
data() { data() {
return { return {
text: "隐患巡查", text: "隐患巡查",
nowTime:"",
sponsor:"", // 巡查发起人
contentList: [ contentList: [
], ],
...@@ -82,11 +85,13 @@ export default { ...@@ -82,11 +85,13 @@ export default {
}; };
}, },
mounted() { mounted() {
this.nowTime = timestampToTime(new Date(), "DT7", true);
this.loading() this.loading()
}, },
methods: { methods: {
loading(){ loading(){
postWork("patrol/running/listCycle").then((res) => { postWork("patrol/running/listCycle").then((res) => {
this.sponsor = res.data[0].assignId
this.contentLists.forEach((x)=>{ this.contentLists.forEach((x)=>{
res.data.forEach((y)=>{ res.data.forEach((y)=>{
if(x.title==y.cycle){ if(x.title==y.cycle){
...@@ -98,7 +103,10 @@ export default { ...@@ -98,7 +103,10 @@ export default {
}, },
onClick(val) { onClick(val) {
this.$router.push({ this.$router.push({
name: "implement" name: "implement",
query:{
id:val.title
}
}); });
} }
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<!-- tab标签 --> <!-- tab标签 -->
<van-tabs <van-tabs
v-model="active" v-model="active"
@change="postList" @change="onChange"
color="#2980f7" color="#2980f7"
animated animated
:sticky="true" :sticky="true"
...@@ -15,35 +15,44 @@ ...@@ -15,35 +15,44 @@
<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"> <div class="con-list">
<!-- v-for="(item, index) in messageList" :key="index" --> <van-cell-group inset v-for="(item, index) in messageList" :key="index">
<van-cell-group inset>
<van-row gutter> <van-row gutter>
<van-col span="18"> <!-- <van-col span="18">
<span class="con_title">日查</span> <span class="con_title">日查</span>
<span>&nbsp;&nbsp;制度、规程、方案</span> <span>&nbsp;&nbsp;制度、规程、方案</span>
</van-col> </van-col>-->
<van-col span="6" class="con_type con_right">危险隐患</van-col> <van-col span="24" class="con_type">{{item.hdLev}}</van-col>
</van-row> </van-row>
<van-row gutter> <van-row gutter>
<van-col span="24">应建立地下有限空间作业安全生产责任制、安全生产规章制度和操作规程。</van-col> <van-col span="24">应建立地下有限空间作业安全生产责任制、安全生产规章制度和操作规程。</van-col>
</van-row> </van-row>
<van-row gutter class="cont-operation"> <van-row gutter class="cont-operation">
<van-col span="10" class="con_type">法律依据/出处</van-col> <van-col span="10" class="con_type">
<van-popover
v-model="showPopoverFlag[index]"
theme="dark"
trigger="click"
placement="bottom-start"
>
<span class="tip">《北京市地下有限空间管理办法》</span>
<template #reference>法律依据/出处</template>
</van-popover>
</van-col>
<van-col span="14" class="con_right"> <van-col span="14" class="con_right">
<van-radio-group <van-radio-group
v-model="radio" v-model="item.result"
direction="horizontal" direction="horizontal"
@change="operation" @change="operation(item.result,index)"
> >
<van-radio name="1" shape="square">合格</van-radio> <van-radio :name="1" shape="square" :disabled="item.result == '2'">合格</van-radio>
<van-radio name="2" shape="square">不合格</van-radio> <van-radio :name="2" shape="square" >不合格</van-radio>
</van-radio-group> </van-radio-group>
</van-col> </van-col>
</van-row> </van-row>
</van-cell-group> </van-cell-group>
</div> </div>
<!-- 暂无数据 --> <!-- 暂无数据 -->
<!-- <div <div
style=" style="
width: 100%; width: 100%;
text-align: center; text-align: center;
...@@ -52,19 +61,11 @@ ...@@ -52,19 +61,11 @@
top: 30%; top: 30%;
" "
v-if="messageList.length == 0" v-if="messageList.length == 0"
>暂无数据</div>--> >暂无数据</div>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
<div class="operation-btn"> <div class="operation-btn">
<!-- <van-button
block
type="info"
plain
native-type="button"
style="border-radius: 5px; background-color: #f0f1f5; margin-bottom: 10px;"
@click="save"
>保存</van-button> -->
<van-button <van-button
block block
type="info" type="info"
...@@ -78,7 +79,7 @@ ...@@ -78,7 +79,7 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table.js"; import { postWork } from "@/service/workbench";
export default { export default {
name: "implement", name: "implement",
components: { components: {
...@@ -86,10 +87,10 @@ export default { ...@@ -86,10 +87,10 @@ export default {
}, },
data() { data() {
return { return {
id: "", //巡查周期id
text: "执行巡查", text: "执行巡查",
messageList: [], messageList: [],
active: 0, active: 0,
radio: "1",
tabs: [ tabs: [
{ {
title: "安全管理类", title: "安全管理类",
...@@ -103,44 +104,84 @@ export default { ...@@ -103,44 +104,84 @@ export default {
title: "临时用电类", title: "临时用电类",
api: "/rectification/finishList" api: "/rectification/finishList"
} }
] ],
showPopover: false,
showPopoverFlag:[],
}; };
}, },
created() { mounted() {
// this.postList(); if (this.$route.query.id) {
this.id = this.$route.query.id;
}
this.postList();
}, },
methods: { methods: {
postList(val) { onChange() {
console.log(this.active); console.log(this.active);
// this.$toast.loading({
// message: "加载中...",
// forbidClick: true,
// loadingType: "spinner",
// duration: 0
// });
// let formdata = new FormData();
// postFun(this.tabs[this.active]["api"], formdata)
// .then(res => {
// console.log(res);
// this.$toast.clear();
// this.messageList = res.rows || res.data;
// })
// .catch(err => {
// console.log(err);
// this.$toast.clear();
// this.$toast.fail("加载失败,请稍后再试");
// });
}, },
operation() { postList(val) {
// 如果不合格跳转到隐患上报页面 this.$toast.loading({
if (this.radio == "2") { message: "加载中...",
this.$router.push({ forbidClick: true,
name: "add-danger" loadingType: "spinner",
duration: 0
});
let obj = {
cycle: this.id
};
postWork("patrol/running/list", obj)
.then(res => {
this.messageList = res.data;
this.$toast.clear();
})
.catch(err => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
}); });
},
operation(val, index) {
if(val == 1){
return
} }
// 如果不合格跳转到隐患上报页面
this.$dialog
.confirm({
title: "提示",
message: "确定跳转到隐患上报页面吗?"
})
.then(() => {
this.$router.push({
name: "add-danger"
});
})
.catch(() => {
this.messageList[index].result = 1
});
}, },
save() {}, finish() {
finish() {} this.$toast.loading({
message: "提交中...",
forbidClick: true,
loadingType: "spinner",
duration: 0
});
let obj2 = {
cycle: this.id
};
postWork("patrol/running/save", obj2)
.then(res => {
this.$toast.clear();
this.$toast.success({
message: "提交成功",
duration: 2000
});
// history.go(-1);
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("提交失败,请稍后再试");
});
}
} }
}; };
</script> </script>
...@@ -151,7 +192,7 @@ export default { ...@@ -151,7 +192,7 @@ export default {
color: #2c3e50; color: #2c3e50;
} }
.con-list { .con-list {
padding: 0; padding: 0 0 60px;
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
...@@ -204,10 +245,16 @@ export default { ...@@ -204,10 +245,16 @@ export default {
} }
.operation-btn { .operation-btn {
width: 95%; width: 95%;
margin: 20px 10px 10px; margin: 10px 10px;
position: fixed; position: fixed;
bottom: 50px; bottom: 50px;
right: 0; right: 0;
left: 0; left: 0;
} }
.tip {
width: auto;
height: 28px;
padding: 0 8px;
line-height: 28px;
}
</style> </style>
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