Loading src/main.js +2 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ import { prefix } from '@/common/js/utils' import { Divider, Popup, Overlay, Loading, Dialog, ContactCard, Form, AddressEdit, AddressList, Field, CellGroup, Cell, 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, Step, Steps, ImagePreview,progress} from 'vant' Step, Steps, ImagePreview,progress, Popover} from 'vant' import 'lib-flexible/flexible' import vueEsign from 'vue-esign' import VideoPlayer from 'vue-video-player' Loading @@ -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) .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(Step).use(Steps).use(ImagePreview).use(progress) .use(Step).use(Steps).use(ImagePreview).use(progress).use(Popover) Vue.config.productionTip = false new Vue({ router, Loading src/views/danger/dangerPatrol/implement/index.vue +72 −38 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ <!-- tab标签 --> <van-tabs v-model="active" @change="postList" @change="onChange" color="#2980f7" animated :sticky="true" Loading @@ -18,17 +18,27 @@ <!-- v-for="(item, index) in messageList" :key="index" --> <van-cell-group inset> <van-row gutter> <van-col span="18"> <!-- <van-col span="18"> <span class="con_title">日查</span> <span> 制度、规程、方案</span> </van-col> <van-col span="6" class="con_type con_right">危险隐患</van-col> </van-col> --> <van-col span="24" class="con_type">危险隐患</van-col> </van-row> <van-row gutter> <van-col span="24">应建立地下有限空间作业安全生产责任制、安全生产规章制度和操作规程。</van-col> </van-row> <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="showPopover" theme="dark" trigger="click" placement="bottom-start" > <span class="tip" @click="showPopover = false">《北京市地下有限空间管理办法》</span> <template #reference class="width-auto">法律依据/出处</template> </van-popover> </van-col> <van-col span="14" class="con_right"> <van-radio-group v-model="radio" Loading Loading @@ -57,14 +67,6 @@ </van-tabs> <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 block type="info" Loading @@ -78,7 +80,7 @@ <script> import LHeader from "@/components/header.vue"; import { getFun, postFun } from "@/service/table.js"; import { postWork } from "@/service/workbench"; export default { name: "implement", components: { Loading @@ -103,33 +105,37 @@ export default { title: "临时用电类", api: "/rectification/finishList" } ] ], showPopover: false }; }, created() { // this.postList(); this.postList(); }, methods: { postList(val) { onChange() { 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("加载失败,请稍后再试"); // }); }, postList(val) { this.$toast.loading({ message: "加载中...", forbidClick: true, loadingType: "spinner", duration: 0 }); let obj = { cycle: 1 } postWork("patrol/running/list",obj) .then(res => { console.log(res); this.messageList = res.data; this.$toast.clear(); }) .catch(err => { this.$toast.clear(); this.$toast.fail("加载失败,请稍后再试"); }); }, operation() { // 如果不合格跳转到隐患上报页面 Loading @@ -139,8 +145,30 @@ export default { }); } }, save() {}, finish() {} finish() { this.$toast.loading({ message: "提交中...", forbidClick: true, loadingType: "spinner", duration: 0 }); let obj2 = { cycle: 1 }; 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> Loading Loading @@ -210,4 +238,10 @@ export default { right: 0; left: 0; } .tip { width: auto; height: 28px; padding: 0 8px; line-height: 28px; } </style> Loading
src/main.js +2 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ import { prefix } from '@/common/js/utils' import { Divider, Popup, Overlay, Loading, Dialog, ContactCard, Form, AddressEdit, AddressList, Field, CellGroup, Cell, 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, Step, Steps, ImagePreview,progress} from 'vant' Step, Steps, ImagePreview,progress, Popover} from 'vant' import 'lib-flexible/flexible' import vueEsign from 'vue-esign' import VideoPlayer from 'vue-video-player' Loading @@ -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) .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(Step).use(Steps).use(ImagePreview).use(progress) .use(Step).use(Steps).use(ImagePreview).use(progress).use(Popover) Vue.config.productionTip = false new Vue({ router, Loading
src/views/danger/dangerPatrol/implement/index.vue +72 −38 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ <!-- tab标签 --> <van-tabs v-model="active" @change="postList" @change="onChange" color="#2980f7" animated :sticky="true" Loading @@ -18,17 +18,27 @@ <!-- v-for="(item, index) in messageList" :key="index" --> <van-cell-group inset> <van-row gutter> <van-col span="18"> <!-- <van-col span="18"> <span class="con_title">日查</span> <span> 制度、规程、方案</span> </van-col> <van-col span="6" class="con_type con_right">危险隐患</van-col> </van-col> --> <van-col span="24" class="con_type">危险隐患</van-col> </van-row> <van-row gutter> <van-col span="24">应建立地下有限空间作业安全生产责任制、安全生产规章制度和操作规程。</van-col> </van-row> <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="showPopover" theme="dark" trigger="click" placement="bottom-start" > <span class="tip" @click="showPopover = false">《北京市地下有限空间管理办法》</span> <template #reference class="width-auto">法律依据/出处</template> </van-popover> </van-col> <van-col span="14" class="con_right"> <van-radio-group v-model="radio" Loading Loading @@ -57,14 +67,6 @@ </van-tabs> <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 block type="info" Loading @@ -78,7 +80,7 @@ <script> import LHeader from "@/components/header.vue"; import { getFun, postFun } from "@/service/table.js"; import { postWork } from "@/service/workbench"; export default { name: "implement", components: { Loading @@ -103,33 +105,37 @@ export default { title: "临时用电类", api: "/rectification/finishList" } ] ], showPopover: false }; }, created() { // this.postList(); this.postList(); }, methods: { postList(val) { onChange() { 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("加载失败,请稍后再试"); // }); }, postList(val) { this.$toast.loading({ message: "加载中...", forbidClick: true, loadingType: "spinner", duration: 0 }); let obj = { cycle: 1 } postWork("patrol/running/list",obj) .then(res => { console.log(res); this.messageList = res.data; this.$toast.clear(); }) .catch(err => { this.$toast.clear(); this.$toast.fail("加载失败,请稍后再试"); }); }, operation() { // 如果不合格跳转到隐患上报页面 Loading @@ -139,8 +145,30 @@ export default { }); } }, save() {}, finish() {} finish() { this.$toast.loading({ message: "提交中...", forbidClick: true, loadingType: "spinner", duration: 0 }); let obj2 = { cycle: 1 }; 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> Loading Loading @@ -210,4 +238,10 @@ export default { right: 0; left: 0; } .tip { width: auto; height: 28px; padding: 0 8px; line-height: 28px; } </style>