Commit f2662894 authored by yf's avatar yf

Merge branch 'develop' of http://git.censoft.com.cn/rongtong/rongtong-app into dev-yf'

parents 4f8f19e7 29cd078d
...@@ -9,7 +9,7 @@ import './permission' ...@@ -9,7 +9,7 @@ import './permission'
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import util from './api/util.js' import util from './api/util.js'
import {DropdownMenu, DropdownItem, 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, import {DropdownMenu, DropdownItem, 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, Lazyload } from 'vant' Step, Steps } from 'vant'
import 'lib-flexible/flexible' import 'lib-flexible/flexible'
import vueEsign from 'vue-esign' import vueEsign from 'vue-esign'
Vue.use(vueEsign) Vue.use(vueEsign)
......
...@@ -8,26 +8,11 @@ ...@@ -8,26 +8,11 @@
<van-tabs v-model="active" @change="tabList" color="#2980f7" animated> <van-tabs v-model="active" @change="tabList" color="#2980f7" animated>
<van-tab :title="buildingName"> <van-tab :title="buildingName">
<van-dropdown-menu z-index="1000"> <van-dropdown-menu z-index="1000">
<van-dropdown-item <van-dropdown-item v-model="value1" @change="changeFloor" :options="option1" get-container="body" />
v-model="value1" <van-dropdown-item v-model="value2" @change="changeRoom" :options="option2" get-container="body" />
@change="changeFloor"
:options="option1"
get-container="body"
/>
<van-dropdown-item
v-model="value2"
@change="changeRoom"
:options="option2"
get-container="body"
/>
</van-dropdown-menu> </van-dropdown-menu>
<div class="con-list"> <div class="con-list">
<van-cell-group <van-cell-group inset v-for="(item, index) in messageList" :key="index" @click="touchstart(index, item)">
inset
v-for="(item, index) in messageList"
:key="index"
@click="touchstart(index, item)"
>
<div style="font-size: 0.45rem;padding: 5px 0;"> <div style="font-size: 0.45rem;padding: 5px 0;">
{{ item.title }} {{ item.title }}
</div> </div>
...@@ -49,42 +34,33 @@ ...@@ -49,42 +34,33 @@
<van-col span="15">{{ item.roomName }}</van-col> <van-col span="15">{{ item.roomName }}</van-col>
</van-row> </van-row>
</van-col> </van-col>
<van-col <van-col span="7" :style="{ color: item.state == 1 ? '#0069e5' : '#03b615' }">
span="7"
:style="{ color: item.state == 1 ? '#0069e5' : '#03b615' }"
>
{{ "●待审批" }} {{ "●待审批" }}
</van-col> </van-col>
</van-row> </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
>
<!-- <van-button round type="info" @click="goConfirm(item)" v-show="active==0" <!-- <van-button round type="info" @click="goConfirm(item)" v-show="active==0"
>确认</van-button >确认</van-button
> --> > -->
</div> </div>
</van-overlay> </van-overlay>
</van-cell-group> </van-cell-group>
<div <div style="
style="
width: 100%; width: 100%;
text-align: center; text-align: center;
font-size: 0.48rem; font-size: 0.48rem;
position: fixed; position: fixed;
top: 30%; top: 30%;
" " v-if="messageList['length'] == 0">
v-if="messageList['length'] == 0"
>
暂无数据 暂无数据
</div> </div>
</div> </div>
</van-tab> </van-tab>
</van-tabs> </van-tabs>
</div> </div>
<div <div style="display: flex;
style="display: flex;
justify-content: space-around; justify-content: space-around;
background-color: #fff; background-color: #fff;
border-top: 1px solid #e3e3e3; border-top: 1px solid #e3e3e3;
...@@ -92,19 +68,12 @@ ...@@ -92,19 +68,12 @@
width: 100%; width: 100%;
text-align: center; text-align: center;
position: fixed; position: fixed;
bottom: 0;" bottom: 0;">
> <div @click="performTasks" style="color: #4bced0;font-size: 14px;font-weight: 600;">
<div
@click="performTasks"
style="color: #4bced0;font-size: 14px;font-weight: 600;"
>
<div style="font-size: 22px;"><van-icon name="plus" /></div> <div style="font-size: 22px;"><van-icon name="plus" /></div>
<div>新增固有风险</div> <div>新增固有风险</div>
</div> </div>
<div <div @click="endTasks" style="color: #D9001B;font-size: 14px;font-weight: 600;">
@click="endTasks"
style="color: #D9001B;font-size: 14px;font-weight: 600;"
>
<div style="font-size: 22px;"><van-icon name="cross" /></div> <div style="font-size: 22px;"><van-icon name="cross" /></div>
<div>任务执行结束</div> <div>任务执行结束</div>
</div> </div>
...@@ -113,13 +82,14 @@ ...@@ -113,13 +82,14 @@
</template> </template>
<script> <script>
import { Dialog } from 'vant';
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, generateId } from "@/utils/format"; import { timestampToTime, generateId } from "@/utils/format";
export default { export default {
name: "risk-confirme", name: "risk-confirme",
components: { components: {
LHeader LHeader,
}, },
data() { data() {
return { return {
...@@ -177,6 +147,19 @@ export default { ...@@ -177,6 +147,19 @@ export default {
//任务执行结束 //任务执行结束
endTasks() { endTasks() {
//toDo //toDo
postFun(
`/risk/plan/submit/${this.planId}/${this.buildingId}`
).then(res => {
console.log(res.msg,'lllll')
Dialog.alert({
title: '任务执行结束',
message: res.msg,
}).then(() => {
this.$router.push({
name:'riskAssess'
})
});
})
}, },
handadd() { handadd() {
this.$router.push({ this.$router.push({
...@@ -302,9 +285,11 @@ export default { ...@@ -302,9 +285,11 @@ export default {
font-family: ""; font-family: "";
color: #2c3e50; color: #2c3e50;
} }
.cell-wrap { .cell-wrap {
position: relative; position: relative;
} }
p { p {
font-size: 0.4rem; font-size: 0.4rem;
font-weight: none; font-weight: none;
...@@ -312,31 +297,38 @@ p { ...@@ -312,31 +297,38 @@ p {
margin: 0.186667rem 0; margin: 0.186667rem 0;
color: #7f7f7f; color: #7f7f7f;
} }
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
margin-bottom: 10px; margin-bottom: 10px;
padding: 10px; padding: 10px;
font-size: 13px; font-size: 13px;
position: relative; position: relative;
.van-row { .van-row {
margin-bottom: 0.133333rem; margin-bottom: 0.133333rem;
line-height: 0.64rem; line-height: 0.64rem;
} }
} }
.journal-wrap { .journal-wrap {
position: relative; position: relative;
} }
.supervise-wrap { .supervise-wrap {
position: relative; position: relative;
} }
.info-title { .info-title {
color: #2980f7; color: #2980f7;
font-weight: none; font-weight: none;
} }
.field-title { .field-title {
color: black; color: black;
font-weight: none; font-weight: none;
} }
.more { .more {
position: absolute; position: absolute;
bottom: 0.32rem; bottom: 0.32rem;
...@@ -345,10 +337,12 @@ p { ...@@ -345,10 +337,12 @@ p {
font-weight: none; font-weight: none;
z-index: 99; z-index: 99;
} }
.con-list { .con-list {
padding: 0; padding: 0;
min-height: 10rem; min-height: 10rem;
background-color: #f0f1f5; background-color: #f0f1f5;
.van-cell-group--inset { .van-cell-group--inset {
margin: 0; margin: 0;
margin-bottom: 0.26667rem; margin-bottom: 0.26667rem;
...@@ -359,13 +353,16 @@ p { ...@@ -359,13 +353,16 @@ p {
box-shadow: 0px 0px 10px 2px #f3f3f3; box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%; width: 90%;
margin: 0.4rem auto; margin: 0.4rem auto;
.van-row { .van-row {
font-size: 0.4rem; font-size: 0.4rem;
line-height: 0.8rem; line-height: 0.8rem;
margin-bottom: 0; margin-bottom: 0;
} }
.van-overlay { .van-overlay {
position: absolute; position: absolute;
.wrapper { .wrapper {
display: flex; display: flex;
align-items: center; align-items: center;
......
<template> <template>
<!-- 提交 --> <!-- 提交 -->
<div> <div>
<van-sticky offset-top="0"> <van-sticky offset-top="0">
<LHeader :text="text"></LHeader> <LHeader :text="text"></LHeader>
</van-sticky> </van-sticky>
<van-sticky offset-top="1.5rem"> <van-tabs
<van-search v-model="active"
v-model="searchValue" @change="postList"
show-action color="#2980f7"
placeholder="请输入搜索内容" animated
@search="onSearch" :sticky="true"
> >
<template #action> <van-tab v-for="item in tabs" :key="item.key" :title="item.title">
<div @click="onSearch">搜索</div> <!-- 内容列表 -->
</template> <div class="con-list">
</van-search> <van-cell-group
</van-sticky> inset
<!-- <van-tabs v-for="(item, index) in messageList"
v-model="active" :key="index"
@change="
postList(searchValue);
showIndex = null;
"
color="#2980f7"
animated
:sticky="true"
offset-top="2.93rem"
>
<van-tab v-for="(item, key) in tabs" :key="key" :title="item.title"> -->
<!-- 内容列表 -->
<div
class="con-list"
@touchmove="showIndex = null"
> >
<van-cell-group <div style="font-size: 0.45rem;padding: 5px 0;">
inset {{ item.title }}
v-for="(item, index) in messageList" </div>
:key="index" <van-row gutter="">
@click="touchstart(index, item)" <van-col span="17">
> <van-row gutter="">
<div style="font-size: 0.45rem;padding: 5px 0;">{{item.title}}</div> <van-col span="9">创建人:</van-col>
<van-col span="15">{{ item.leaderUserName }}</van-col>
<van-row gutter=""> </van-row>
<van-col span="17"> <van-row gutter="">
<van-row gutter=""> <van-col span="9">发起时间:</van-col>
<van-col span="9">发起时间:</van-col> <van-col span="15">{{
<van-col span="15">{{ item.time}}</van-col> timestampToTimes(item.startTime)
</van-row> }}</van-col>
<van-row gutter=""> </van-row>
<van-col span="9">处理人员:</van-col> </van-col>
<van-col span="15">{{ item.name }}</van-col> <van-col span="7">
</van-row> <van-row
</van-col> :style="{
<van-col span="7" :style="{'color':item.state == 1 ? '#0069e5':'#03b615'}"> color:
{{ '●待审批'}} active == 0
</van-col> ? '#f79648'
</van-row> : active == 1
? '#0069e5'
<!-- <van-row gutter=""> : '#03b615'
<van-col span="7">风险源:</van-col> }"
<van-col span="17">{{ item.riskSource }}</van-col> >
</van-row> --> {{ item.state }}
</van-row>
<!-- 长按显示遮罩层 --> <van-row>
<van-overlay :show="showIndex == index"> <van-button
<div class="wrapper" @click.stop="showIndex = null"> type="info"
<van-button round type="primary" @click="goDetail(item)" size="mini"
@click="todetail(index, item)"
>详情</van-button >{{ active == 2 ? '去处理' :'去审批' }}</van-button
>
<van-button round type="info" @click="goConfirm(item)" v-show="active==0"
>确认</van-button
> >
</div> </van-row>
</van-overlay> </van-col>
</van-cell-group> </van-row>
<div </van-cell-group>
<div
style=" style="
width: 100%; width: 100%;
text-align: center; text-align: center;
...@@ -83,164 +67,153 @@ ...@@ -83,164 +67,153 @@
position: fixed; position: fixed;
top: 30%; top: 30%;
" "
v-if="messageList['length']==0" v-if="messageList['length'] == 0"
> >
暂无数据 暂无数据
</div> </div>
</div> </div>
<!-- 暂无数据 --> <!-- 暂无数据 -->
<!-- {{messageList}} --> <!-- {{messageList}} -->
</van-tab>
<!-- </van-tab> </van-tabs>
</van-tabs> --> </div>
</template>
</div>
</template> <script>
import LHeader from "@/components/header.vue";
<script> import { getFun, postFun } from "@/service/table.js";
import LHeader from "@/components/header.vue"; import { timestampToTime, generateId } from "@/utils/format";
import { getFun, postFun } from "@/service/table.js"; export default {
// import { postriskConList } from "@/service/risk"; name: "risk-approve",
export default { components: {
name:'risk-confirme', LHeader
components: { },
LHeader, data() {
}, return {
data() { text: "风险审批",
return { searchValue: "",
text: "风险审批", isHaveNews: false,
searchValue: "", messageList: [
isHaveNews: false, {
messageList: [ title: "XX项目评估任务单",
{ time: "2022-12-12",
title:'XX项目评估任务单', name: "Mr.周",
time:'2022-12-12', state: 1
name:'Mr.周', }
state:1 ],
} Loop: "", // 定时器
], active: 0,
Loop: "", // 定时器 // 状态 wait 待评估,running 执行中,finish 已完成
showIndex: null, // 是否显示遮罩层, tabs: [
active: 0, {
tabs: [ title: "待审批",
{ key: "running"
title: "未执行", },
api: "/riskConfirm/list", {
}, title: "已审批",
{ key: "completed"
title: "已执行", },
api: "/riskConfirm/finishList", {
}, title: "已退回",
], key: "return"
}; }
],
buildingList: []
};
},
created() {
this.postList(0);
},
methods: {
timestampToTimes(time) {
return timestampToTime(new Date(time), "DT2", true);
}, },
created() { handadd() {
// this.postList();s this.$router.push({
name: "riskAdd",
params: {
title: "新增"
}
});
}, },
methods: { postList(name, title) {
handadd(){ this.$toast.loading({
this.$router.push({ message: "加载中...",
name: "riskAdd", forbidClick: true,
params: { loadingType: "spinner",
title:'新增' duration: 0
}, });
}) let url = `/risk/plan/approve/list?status=running`;
}, if (name == 0) {
postList(select = "") { url = `/risk/plan/approve/list?status=running`;
this.$toast.loading({ } else if (name == 1) {
message: "加载中...", url = `/risk/plan/approve/list?status=completed`;
forbidClick: true, } else {
loadingType: "spinner", url = `/risk/plan/approve/list?status=return`;
duration: 0, }
getFun(url)
.then(res => {
this.$toast.clear();
this.messageList = res.data || res.rows;
// 判断有无数据返回
if (this.messageList.length == 0) {
this.isHaveNews = true;
}
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
}); });
let formdata = new FormData(); },
formdata.append("select", select);
postFun(this.tabs[this.active]['api'], formdata) //查看详情
.then((res) => { todetail(index, item) {
this.$toast.clear(); this.$router.push({
this.messageList =res.data||res.rows; name: "riskTaskList",
// 判断有无数据返回 params: {
if (this.messageList.length == 0) { id: item.id,
this.isHaveNews = true; // buildingId: item.buildingId
}
})
.catch(() => {
this.$toast.clear();
this.$toast.fail("加载失败,请稍后再试");
});
},
onSearch(val) {
this.postList(this.searchValue);
},
touchstart(index, item) {
if (this.showIndex != null) {
this.showIndex = null;
return;
} }
this.showIndex = index; });
}, sessionStorage.setItem("planId", item.id);
sessionStorage.setItem("buildingId", '');
// 详情
goDetail(data) {
this.$router.push({
name: "risk-big-detail",
params: {
id: data.businessId||data.id,
},
});
this.showIndex = null;
},
// 确认
goConfirm(data) {
this.$router.push({
name: "risk-affirm",
params: {
data: data,
},
});
this.showIndex = null;
},
}, },
};
</script>
<style lang="less" scoped>
#app {
font-family: "";
color: #2c3e50;
} }
.con-list { };
padding: 0; </script>
background-color: #f0f1f5; <style lang="less" scoped>
.van-cell-group--inset { #app {
margin: 0; font-family: "";
margin-bottom: 0.26667rem; color: #2c3e50;
padding: 0.25rem; }
.con-list {
padding: 0;
background-color: #f0f1f5;
position: relative;
.van-cell-group--inset {
margin: 0;
margin-bottom: 0.26667rem;
padding: 0.25rem;
font-size: 0.4rem;
border-radius: 4%;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem; font-size: 0.4rem;
position: relative; line-height: 0.8rem;
border-radius: 4%; margin-bottom: 0;
box-shadow: 0px 0px 10px 2px #f3f3f3;
width: 90%;
margin: 0.4rem auto;
.van-row {
font-size: 0.4rem;
line-height: 0.8rem;
margin-bottom: 0;
}
.van-overlay {
position: absolute;
.wrapper {
display: flex;
align-items: center;
justify-content: space-evenly;
height: 100%;
}
}
} }
} }
/deep/.van-tab__pane{ }
min-height: 8rem;
} .wrapper {
</style> display: flex;
align-items: center;
\ No newline at end of file justify-content: center;
height: 100%;
}
</style>
...@@ -170,7 +170,7 @@ import { timestampToTime, generateId } from "@/utils/format"; ...@@ -170,7 +170,7 @@ import { timestampToTime, generateId } from "@/utils/format";
export default { export default {
name: "risk-execution", name: "risk-execution",
components: { components: {
LHeader LHeader,
}, },
data() { data() {
return { return {
......
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