Commit 3e28a55e authored by yf's avatar yf

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

parents fa2a3f85 b6065533
......@@ -354,7 +354,7 @@ export default {
created() {
if (this.$route.params.inherentId) {
this.inherentId = this.$route.params.inherentId
this.buildingIds = this.$route.params.buildingIds
this.buildingIds = this.$route.params.buildingId
this.postReturnEcho();
}
// this.getList();
......@@ -458,6 +458,11 @@ export default {
params: {
id: this.inherentId,
// planId:this.planId
buildingId:this.buildingId,
planId:this.inherentId,
floorId:this.form.floorId,
roomName:this.form.roomName,
roomId:this.form.roomId,
},
})
},
......
<template>
<div>
<LHeader :text="text"></LHeader>
<van-form
@submit="onSubmit"
:scroll-to-error="true"
......@@ -466,11 +465,16 @@ export default {
var userInfo=getUserInfo()
this.form.buildingIds=this.$route.params.id
this.form.planId=this.$route.params.planId
this.form.floorId = this.$route.params.floorId
this.form.roomId = this.$route.params.roomId
this.form.inherentId = this.$route.params.id
this.form.roomName = this.$route.params.roomName
this.form.buildingName = '1号楼'
this.form.userId=userInfo.userId
this.form.userName=userInfo.userName
this.form.deptName=userInfo.dept.deptName
this.form.projectId='测试项目'
},
methods: {
seletFloor(name){
......@@ -600,7 +604,8 @@ export default {
onSubmit(values) {
// console.log('%c [ values ]-592', 'font-size:13px; background:pink; color:#bf2c9f;', values)
var formDataJson=this.jsonToFormData(this.form)
let url = "/risk/plan/inherent";
// let url = "/risk/plan/inherent";
let url = "/risk/plan/existing";
values.hdPicture1.forEach((item) => {
if (item.file) {
formDataJson.append("pictureFile[]", item.file);
......
......@@ -51,10 +51,10 @@
:value="form.projectName"
label="关联项目"
placeholder="请选择"
@click="showSource = true"
@click="show = true"
:rules="[{ required: true, message: '关联项目不能为空' }]"
/>
<van-popup v-model="showSource" position="bottom">
<!-- <van-popup v-model="showSource" position="bottom">
<van-picker
show-toolbar
value-key="name"
......@@ -62,7 +62,7 @@
@confirm="onConSource"
@cancel="showSource = false"
/>
</van-popup>
</van-popup> -->
<van-field
required
......@@ -167,7 +167,7 @@
</van-popup>
<van-popup v-model="show" position="bottom" :style="{ height: '100%' }">
<!-- <selectPeople @onClose="onClose" @onSave="onSave"></selectPeople> -->
<selectPeople @onClose="onClose" @onSave="onSave"></selectPeople>
</van-popup>
<van-popup
......@@ -196,6 +196,7 @@
<div style="display:flex;margin-top: 44px;">
<van-checkbox-group
v-model="riskList"
ref="checkboxGroup"
style="width: 100%;font-size: 18px;"
>
<van-checkbox
......@@ -207,6 +208,10 @@
>{{ item[filedName] }}</van-checkbox
>
</van-checkbox-group>
<div>
<van-button type="primary" @click="checkAll">全选</van-button>
<van-button type="info" @click="toggleAll">反选</van-button>
</div>
</div>
</van-popup>
......@@ -268,7 +273,7 @@
<script>
import LHeader from "@/components/header.vue";
import selectDept from "@/components/selectDept/index.vue";
// import selectPeople from "@/views/riskTask/selectPeople/index.vue";
import selectPeople from "@/views/riskProject/add/projectList.vue";
import { timestampToTime, generateId } from "@/utils/format";
import {
getUserInfo,
......@@ -276,19 +281,12 @@ import {
setLocalUserInfo
} from "@/utils/userInfo";
import { getFun, postFun } from "@/service/table.js";
// import {
// getFormList,
// postHdSource,
// postHdType,
// postHdPeople,
// postReAdd,
// postriskConiCause,
// postRiskShowMeasures,
// } from "@/service/risk";
export default {
name: "risk-add",
components: {
LHeader,
selectPeople,
selectDept
},
beforeRouteLeave(to, from, next) {
......@@ -368,6 +366,12 @@ export default {
// this.getList();
},
methods: {
checkAll() {
this.$refs.checkboxGroup.toggleAll(true);
},
toggleAll() {
this.$refs.checkboxGroup.toggleAll();
},
// 确定时间的方法
onConTime(date) {
console.log(
......@@ -400,7 +404,7 @@ export default {
loadingType: "spinner",
duration: 0
});
getFun(`/risk/plan/user/list/${this.form.projectId}`).then(res => {
getFun(`/risk/plan/user/list/${this.form.deptId}`).then(res => {
if (res.code == 200) {
this.columnsTrouble = res.data;
// 对数据进行赋值
......@@ -460,7 +464,7 @@ export default {
loadingType: "spinner",
duration: 0
});
getFun(`/risk/plan/user/list/${this.form.projectId}`).then(res => {
getFun(`/risk/plan/user/list/${this.form.deptId}`).then(res => {
if (res.code == 200) {
this.riskModelList = res.data;
// 对数据进行赋值
......@@ -742,8 +746,8 @@ export default {
this.show = false;
},
onSave(e) {
this.projectDirector = e[0].loginName;
this.projectDirectorName = e[0].userName;
this.form.projectId = e.id;
this.form.projectName = e.name;
this.show = false;
}
},
......
......@@ -16,7 +16,6 @@
<div style="font-size: 0.45rem;padding: 5px 0;">
{{ item.title }}
</div>
<van-row gutter="">
<van-col span="17">
<van-row gutter="">
......@@ -263,11 +262,16 @@ export default {
},
// 详情
goDetail(data) {
sessionStorage.setItem('buildingId',this.buildingId)
sessionStorage.setItem('planId',this.planId)
sessionStorage.setItem('buildingName',this.buildingName)
this.$router.push({
name: "addCurrent",
params: {
inherentId: data.businessId || data.id,
buildingIds: this.active
planId: this.planId,
buildingId:this.buildingId,
buildingName:this.buildingName
}
});
this.showIndex = null;
......
<template>
<div>
<!-- 搜索 -->
<div class="content-wrap">
<div class="search-wrap">
<van-search v-model="searchVal" placeholder="搜索" @input="onInput"/>
</div>
</div>
<div style="margin-bottom: 1.4rem;">
<van-radio-group v-model="radio">
<van-list
v-model="loading"
:finished="finished"
finished-text="没有更多了"
@load="getInsideUser()"
>
<van-radio v-for="item in projectList" :name="item.id" :key="item.id" @click="selData(item)">
<van-cell :title="item.name" />
</van-radio>
</van-list>
</van-radio-group>
</div>
<!-- 底部信息 -->
<footer class="footer">
<van-cell-group>
<div class="operate">
<van-button
size="small"
ttype="info"
plain
native-type="button"
style="border-radius: 5px; background-color: #f0f1f5;"
@click.native="cancel"
>取消
</van-button
>
<van-button
size="small"
type="info"
native-type="button"
style="margin:0 10px 0 20px;border-radius: 5px;"
@click.native="save"
>保存
</van-button
>
</div>
</van-cell-group>
</footer>
</div>
</template>
<script>
// import LHeader from "@/components/header.vue";
import {getFun, postFun} from '@/service/table';
import {getUserInfo} from "@/utils/userInfo";
import {debounce} from "@/utils/common.js";
export default {
name: "select-people",
components: {
// LHeader
},
created() {
},
data() {
return {
text: "选择人员",
personName: "",
searchVal: "",
radio: "",
pageSize: 20,
pageNum: 1,
loading: false,
finished: false,
projectList:[],
itemSel:{
}
};
},
methods: {
// 查询内部人员
getInsideUser() {
var obj={
name:this.searchVal,
pageSize:this.pageSize,
pageNum:this.pageNum,
}
getFun("risk/plan/project/list", obj)
.then(res => {
this.projectList.push(...res.rows)
this.loading = false;
if (this.projectList.length >= res.total) {
this.finished = true;
}
if(!(this.pageNum*this.pageSize-this.total>=0)){
this.pageNum++;
}
})
},
// 待搜索框内容发生变化
onInput: debounce(function () {
this.projectList=[]
this.pageNum=1
this.finished = false
this.loading = true
this.getInsideUser();
}, 800),
selData(e){
this.itemSel=e
},
save() {
this.$emit('onSave', this.itemSel)
},
cancel() {
this.$emit('onClose')
}
}
};
</script>
<style lang="less" scoped>
/* @import url(); 引入css类 */
// 搜索
.content-wrap {
padding: 10px;
background-color: #f0f1f5;
}
.search-wrap {
margin: 0.26667rem;
.van-search {
border-radius: 5px;
padding: 5px 12px;
}
.van-search__content {
background-color: #ffffff;
}
}
.upStep {
.van-cell-group {
display: flex;
height: 1.2rem;
align-items: center;
.upStep-btn {
width: 25%;
text-align: center;
display: flex;
span {
width: 1.866667rem;
background-color: #1989fa;
text-align: center;
display: inline-block;
color: white;
height: 0.8rem;
line-height: 0.8rem;
font-size: 0.346667rem;
border-radius: 0.08rem;
}
}
.upStep-content {
width: 75%;
height: 0.8rem;
line-height: 0.8rem;
padding-left: 0.42667rem;
box-sizing: border-box;
font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
.dept-list-wrap {
margin-top: 0.266667rem;
}
.people-wrap {
margin-top: 0.266667rem;
/deep/ .van-radio__label {
display: flex;
align-items: center;
}
}
.footer {
width: 100%;
height: 1.4rem;
z-index: 9;
position: fixed;
bottom: 0px;
box-shadow: 0px 8px 15px #000;
.van-cell-group {
height: 100%;
.selected {
height: 1.066667rem;
display: flex;
align-items: center;
padding-left: 10px;
border-bottom: 1px solid #cacbcb;
.selected-title {
color: #4187f7;
}
.selected-content {
width: 80%;
padding-left: 10px;
box-sizing: border-box;
}
}
.operate {
height: 1.333333rem;
display: flex;
justify-content: flex-end;
align-items: center;
.van-button {
width: 1.6rem;
}
}
}
}
</style>
\ No newline at end of file
This diff is collapsed.
......@@ -3,33 +3,101 @@
<van-sticky offset-top="0">
<LHeader :text="text"></LHeader>
</van-sticky>
<div class="section">
<van-tabs v-model="activeName" color="#2980f7" animated >
<van-tab title="固有风险信息" name="a">
</van-tab>
<van-tab title="现状风险" name="b">
<van-cell-group
inset
v-for="(item, index) in quoRiskList"
:key="index"
>
<div style="font-size: 0.45rem;padding: 5px 0;">
{{ item.name }}
</div>
<van-row gutter="">
<van-col span="17">
<van-row gutter="">
<van-col span="9">创建人:</van-col>
<van-col span="15">{{ item.leaderUserName }}</van-col>
</van-row>
<van-row gutter="">
<van-col span="9">发起时间:</van-col>
<van-col span="15">{{
timestampToTimes(item.startTime)
}}</van-col>
</van-row>
</van-col>
<van-col span="7">
<van-row>
{{ item.state }}
</van-row>
<van-row>
<van-button
type="info"
size="mini"
@click="todetail(index, item)"
>{{ active == 2 ? "去处理" : "去审批" }}</van-button
>
</van-row>
</van-col>
</van-row>
</van-cell-group>
</van-tab>
<van-tab title="四色图" name="c">
<drawCanvas/>
</van-tab>
</van-tabs>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import LHeader from "@/components/header.vue";
import drawCanvas from '@/views/drawCanvas/riskView.vue'
import { getFun, postFun } from "@/service/table.js";
export default {
name:'taskDetail',
name: 'taskDetail',
data() {
return {
text: "固有风险列表",
activeName: 'a',
quoRiskList:[],//现状风险列表
InherentRisk:[],//固有风险
inherentId:''
}
},
components: {
LHeader,
drawCanvas
},
created(){
this.inherentId = this.$route.params.id
},
mounted() {
this.getQuoRiskList(this.$route.params.id)
},
methods: {
getQuoRiskList(inherentId){
getFun(`/risk/plan/existing/list/${inherentId}`).then(res=>{
this.quoRiskList = res.data
})
}
},
}
</script>
<style scoped>
.wrap{
height: 100vh;
width: 100vw;
.wrap {
height: 100vh;
width: 100vw;
}
.section {
width: 100%;
height: 100%;
overflow-y: auto;
}
</style>
......@@ -3,13 +3,13 @@ module.exports = {
devServer: {
open: true,
host: 'localhost',
port: 8081,
port: 8080,
https: false,
//以上的ip和端口是我们本机的;下面为需要跨域的
proxy: { //配置跨域
'/app-api': {
// target: 'http://192.168.4.232:8080/', //这里是后台的地址
target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
target: 'http://192.168.4.232:8080/', //这里是后台的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
// target: 'http://192.168.10.137:8080/', //这里是昊哥的地址
// target: 'http://localhost:8080/', //这里是后台的地址
ws: true,
......
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