Commit a1d4c276 authored by kaitly205422@163.com's avatar kaitly205422@163.com

风险巡查问题修改

parent 0797b5bf
...@@ -7,8 +7,8 @@ module.exports = { ...@@ -7,8 +7,8 @@ module.exports = {
'plugin:vue/essential' 'plugin:vue/essential'
], ],
rules: { rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', 'no-console': 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' 'no-debugger': 'off'
}, },
parserOptions: { parserOptions: {
parser: 'babel-eslint' parser: 'babel-eslint'
......
...@@ -127,7 +127,6 @@ export default { ...@@ -127,7 +127,6 @@ export default {
this.cachePage.push(roterFromName); this.cachePage.push(roterFromName);
} }
} }
console.log(this.cachePage, 'cach')
}, },
}, },
watch: { watch: {
...@@ -150,6 +149,8 @@ export default { ...@@ -150,6 +149,8 @@ export default {
this.handleCache("risk-confirme", to.name, "risk-affirm"); this.handleCache("risk-confirme", to.name, "risk-affirm");
} else if (to.name == 'taskLedger' || from.name == 'taskLedger') { } else if (to.name == 'taskLedger' || from.name == 'taskLedger') {
this.handleCache("riskTaskList", to.name, "taskLedger"); this.handleCache("riskTaskList", to.name, "taskLedger");
} else if (to.name == 'riskView' || from.name == 'riskInherent') {
this.handleCache("addInherent", to.name, "riskInherent");
} }
// 列表页面动态添加缓存 // 列表页面动态添加缓存
......
...@@ -96,6 +96,5 @@ export const rotateBase64Img = (src, edg, callback) => { ...@@ -96,6 +96,5 @@ export const rotateBase64Img = (src, edg, callback) => {
} }
}; };
} catch (e) { } catch (e) {
console.log(e);
} }
}; };
...@@ -347,21 +347,23 @@ export default { ...@@ -347,21 +347,23 @@ export default {
this.layoutData = res.data; this.layoutData = res.data;
this.layoutDataStr = JSON.stringify(this.layoutData); this.layoutDataStr = JSON.stringify(this.layoutData);
res.data.forEach((item) => { res.data.forEach((item) => {
item.position = JSON.parse(item.position); if (item.position) {
item.position.i = item.id; item.position = JSON.parse(item.position);
item.position.id = item.id; item.position.i = item.id;
if (!this.showHeader) { item.position.id = item.id;
item.position.isDraggable = false; if (!this.showHeader) {
item.position.isResizable = false; item.position.isDraggable = false;
item.position.isResizable = false;
}
if (!this.isViews) {
//添加页面不显示颜色
item.position.c = "#e6e5e5";
} else {
item.position.c = item.color;
}
this.layout.push(item.position);
this.updateLayoutHeight();
} }
if (!this.isViews) {
//添加页面不显示颜色
item.position.c = "#e6e5e5";
} else {
item.position.c = item.color;
}
this.layout.push(item.position);
this.updateLayoutHeight();
}); });
// console.log(res.data); // console.log(res.data);
} }
...@@ -469,8 +471,8 @@ export default { ...@@ -469,8 +471,8 @@ export default {
const max = Math.max( const max = Math.max(
...this.layoutData.map((x) => { ...this.layoutData.map((x) => {
let data = x.position; let data = x.position;
if (!data) return 0;
if (typeof x.position == "string") { if (typeof x.position == "string") {
// x.position.y + x.position.h
data = JSON.parse(x.position); data = JSON.parse(x.position);
} }
return data.y + data.h; return data.y + data.h;
...@@ -490,8 +492,8 @@ export default { ...@@ -490,8 +492,8 @@ export default {
// 拖动时判断layoutHeight是否需要更新 // 拖动时判断layoutHeight是否需要更新
item.x = (x / this.W) * 12; item.x = (x / this.W) * 12;
item.y = y / 30; item.y = y / 30;
item.x = (newX / this.W) * 12; item.x = (x / this.W) * 12;
item.y = newY / 30; item.y = y / 30;
debounce(this.updateLayoutHeight)(); debounce(this.updateLayoutHeight)();
// if (top > this.layoutHeight) { // if (top > this.layoutHeight) {
// this.layoutHeight = top; // this.layoutHeight = top;
...@@ -555,11 +557,13 @@ export default { ...@@ -555,11 +557,13 @@ export default {
}); });
//修改房间后返回清掉房间的值 //修改房间后返回清掉房间的值
var inherenForm = JSON.parse(sessionStorage.getItem("inherenForm")); if (sessionStorage.getItem("inherenForm")) {
if (inherenForm) { var inherenForm = JSON.parse(sessionStorage.getItem("inherenForm"));
inherenForm.roomName = ""; if (inherenForm) {
inherenForm.roomId = ""; inherenForm.roomName = "";
sessionStorage.setItem("inherenForm", JSON.stringify(inherenForm)); inherenForm.roomId = "";
sessionStorage.setItem("inherenForm", JSON.stringify(inherenForm));
}
} }
//保存 //保存
let data = this.layoutData; let data = this.layoutData;
...@@ -757,7 +761,8 @@ export default { ...@@ -757,7 +761,8 @@ export default {
} }
.north { .north {
position: fixed; /* position: fixed; */
position: absolute;
display: inline-block; display: inline-block;
top: 1.5rem; top: 1.5rem;
right: 0.5rem; right: 0.5rem;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</van-sticky> </van-sticky>
<!-- tab标签 --> <!-- tab标签 -->
<template v-if="tabs.length"> <template v-if="tabs.length">
<van-tabs v-model="active" color="#2980f7" animated @click="tabClick" :sticky="true" offset-top="1.5rem"> <van-tabs v-model="active" color="#2980f7" animated @change="tabClick" :sticky="true" offset-top="1.5rem">
<van-tab v-for="(i, key) in tabs" :key="key" :title="i.title"> <van-tab v-for="(i, key) in tabs" :key="key" :title="i.title">
<!-- 内容列表 --> <!-- 内容列表 -->
<div class="con-list"> <div class="con-list">
...@@ -143,6 +143,9 @@ export default { ...@@ -143,6 +143,9 @@ export default {
this.loadingTabs() this.loadingTabs()
}, },
methods: { methods: {
tabClick() {
this.showIndex = null;
},
loadingTabs() { loadingTabs() {
getFun("/risk/currentRiskPatrolDetail/detailList", { projectId: this.id, patrolId: this.$route.query.patrolId }).then(res => { getFun("/risk/currentRiskPatrolDetail/detailList", { projectId: this.id, patrolId: this.$route.query.patrolId }).then(res => {
const tabs = new Set(res.rows.map(x => x.type)); const tabs = new Set(res.rows.map(x => x.type));
......
This diff is collapsed.
<!-- 新建项目/新建楼宇--> <!-- 新建项目/新建楼宇-->
<template> <template>
<div class="project-component"> <div class="project-component">
<LHeader text="新增楼层" :customBack="toCancel"></LHeader> <LHeader text="新增楼层" :customBack="toCancel"></LHeader>
<van-form <van-form @submit="onSubmit" :scroll-to-error="true" :show-error="false" validate-trigger="onSubmit">
@submit="onSubmit"
:scroll-to-error="true"
:show-error="false"
validate-trigger="onSubmit"
>
<van-field <van-field label="楼层" required :rules="[{ required: true, message: '请填写楼层名称' }]">
label="楼层" <template #input>
required <van-radio-group v-model="form.type" direction="horizontal">
:rules="[{ required: true, message: '请填写楼层名称' }]" <van-radio name="地上">地上</van-radio>
> <van-radio name="地下">地下</van-radio>
<template #input> </van-radio-group>
<van-radio-group v-model="form.type" direction="horizontal"> </template>
<van-radio name="地上">地上</van-radio> </van-field>
<van-radio name="地下">地下</van-radio> <van-field label="楼层名称" v-model="form.name" required :rules="[{ required: true, message: '请填写楼层名称' }]"><template
</van-radio-group> #right-icon><span></span></template></van-field>
</template>
</van-field>
<van-field
label="楼层名称"
v-model="form.name"
required
:rules="[{ required: true, message: '请填写楼层名称' }]"
><template #right-icon><span></span></template></van-field>
<div class="action-btns"> <div class="action-btns">
<van-button <van-button class="confirm-btn" :loading="loadingStatus" :loading-text="loadingText" round block type="info"
class="confirm-btn" native-type="submit">
:loading="loadingStatus"
:loading-text="loadingText"
round
block
type="info"
native-type="submit"
>
保存 保存
</van-button> </van-button>
...@@ -54,7 +33,6 @@ ...@@ -54,7 +33,6 @@
</van-form> </van-form>
</div> </div>
</template> </template>
<script> <script>
...@@ -65,11 +43,11 @@ export default { ...@@ -65,11 +43,11 @@ export default {
LHeader, LHeader,
}, },
props: { props: {
buildingId:{ buildingId: {
type:Number, type: String,
} }
}, },
destroyed(){ destroyed() {
this.toCancel() this.toCancel()
}, },
data() { data() {
...@@ -80,26 +58,27 @@ export default { ...@@ -80,26 +58,27 @@ export default {
}; };
}, },
methods: { methods: {
toCancel(data=null){ toCancel(data = null) {
this.$emit('close',data) this.$emit('close', data)
}, },
onSubmit(values){ onSubmit(values) {
if(!this.buildingId){ console.log(this.buildingId)
return; if (!this.buildingId) {
} return;
this.form.buildingId = this.buildingId }
this.form.name = this.form.name+'' this.form.buildingId = this.buildingId
postFun('/risk/plan/floor', this.form) this.form.name = this.form.name + ''
postFun('/risk/plan/floor', this.form)
.then(res => { .then(res => {
this.$toast.clear(); this.$toast.clear();
this.$toast.success({ this.$toast.success({
message: "提交成功", message: "提交成功",
duration: 2000 duration: 2000
}); });
this.toCancel(res.data) this.toCancel(res.data)
}) })
.catch(() => { .catch(() => {
this.$emit('close') this.$emit('close')
}); });
} }
} }
...@@ -107,7 +86,6 @@ export default { ...@@ -107,7 +86,6 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.project-component { .project-component {
position: fixed; position: fixed;
width: 100vw; width: 100vw;
...@@ -116,16 +94,19 @@ export default { ...@@ -116,16 +94,19 @@ export default {
left: 0; left: 0;
z-index: 100; z-index: 100;
background: #fff; background: #fff;
.van-form{
.van-form {
height: calc(100vh - 1.6rem); height: calc(100vh - 1.6rem);
overflow: auto; overflow: auto;
}
.action-btns {
margin-top: 1rem;
padding: 0 0.5rem;
.cancel-btn {
margin-top: 0.3rem;
} }
}
.action-btns {
margin-top: 1rem;
padding: 0 0.5rem;
.cancel-btn {
margin-top: 0.3rem;
}
}
} }
</style> </style>
This diff is collapsed.
...@@ -217,7 +217,7 @@ ...@@ -217,7 +217,7 @@
<van-popup v-model="measuresDept" position="bottom" :style="{ height: '100%' }"> <van-popup v-model="measuresDept" position="bottom" :style="{ height: '100%' }">
<div class="van-picker__toolbar" style="position: absolute;width: 100%;top: 0;"> <div class="van-picker__toolbar" style="position: absolute;width: 100%;top: 0;">
<button type="button" class="van-picker__cancel" v-on:click=" <button type="button" class="van-picker__cancel" v-on:click="
{ {
form.measuresDeptId = 0; form.measuresDeptId = 0;
projectDept = false; projectDept = false;
} }
...@@ -726,7 +726,6 @@ export default { ...@@ -726,7 +726,6 @@ export default {
performTasks() { }, performTasks() { },
// 点击预览图 // 点击预览图
clickPre(e) { clickPre(e) {
console.log(e);
if (e.filePath) { if (e.filePath) {
this.videoUrl = e.filePath; this.videoUrl = e.filePath;
} else { } else {
......
This diff is collapsed.
<template> <template>
<div class="assess-model"> <div class="assess-model">
<div> <LHeader :text="title"></LHeader></div> <div>
<LHeader :text="title"></LHeader>
</div>
<div class="assess-model-container"> <div class="assess-model-container">
<div class="assess-model-select-title"><span>选择影响因素</span></div> <div class="assess-model-select-title"><span>选择影响因素</span></div>
<van-checkbox-group class="assess-model-select" v-model="effectValue"> <van-checkbox-group class="assess-model-select" v-model="effectValue">
<van-checkbox <van-checkbox v-for="(item) in effectList" :key="item.dictLabel" :name="item.dictLabel" shape="square">
v-for="(item) in effectList" <van-icon slot="icon" slot-scope="props" :name="props.checked ? 'success' : ''" />
:key="item.dictLabel"
:name="item.dictLabel"
shape="square"
>
<van-icon slot="icon"
slot-scope="props" :name="props.checked?'success':''" />
{{ item.dictLabel }} {{ item.dictLabel }}
</van-checkbox> </van-checkbox>
</van-checkbox-group> </van-checkbox-group>
</div> </div>
<footer class="assess-model-footer"> <footer class="assess-model-footer">
<van-button round type="info" @click="toNext">下一步</van-button> <van-button round type="info" @click="toNext">下一步</van-button>
</footer> </footer>
</div> </div>
</template> </template>
...@@ -25,86 +21,88 @@ ...@@ -25,86 +21,88 @@
<script> <script>
import LHeader from "@/components/header.vue"; import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table"; import { getFun, postFun } from "@/service/table";
export default { export default {
components:{ components: {
LHeader LHeader
}, },
data(){ data() {
return { return {
title:'影响因素', title: '影响因素',
effectList: [], effectList: [],
effectValue:[] effectValue: []
}
},
mounted() {
const present = localStorage.getItem('presentForm')
let presentForm = present ? JSON.parse(present) : null;
if (this.$store.state.assessModel.step1) {
this.effectValue = this.$store.state.assessModel.step1.split(",")
} else if (presentForm && presentForm.factorItems) { // 用户刷新
this.$store.commit('SET_ASSESS_STEP1', presentForm.factorItems);
this.$store.commit('SET_ASSESS_STEP2', presentForm.evaluationItemIds);
}
this.getData()
},
beforeRouteLeave(to, form, next) {
if (to.name === 'addPresent') {
this.$store.commit('SET_ASSESS_STEP1', '')
}
next()
},
methods: {
toNext() {
let effectValue = this.effectList.filter(x => this.effectValue.includes(x.dictLabel))
if (effectValue.length) {
effectValue = effectValue.map(x => x.dictLabel)
} }
}, if (this.effectValue.length == 0) {
mounted(){ this.$toast("请先选择影响因素")
const present = localStorage.getItem('presentForm') return;
let presentForm =present ?JSON.parse(present):null;
if(this.$store.state.assessModel.step1){
this.effectValue = this.$store.state.assessModel.step1.split(",")
}else if(presentForm&&presentForm.factorItems){ // 用户刷新
this.$store.commit('SET_ASSESS_STEP1',presentForm.factorItems);
this.$store.commit('SET_ASSESS_STEP2',presentForm.evaluationItemIds);
} }
this.getData() this.$store.commit('SET_ASSESS_STEP1', effectValue.join(','))
// 保存数据
this.$router.push({
path: '/assess/model/step2',
query: {
ids: effectValue.join(',')
}
})
}, },
beforeRouteLeave(to,form,next){ getData() {
// console.log(e); getFun('/risk/plan/dict/data/list', {
if(to.name==='addPresent'){ dictType: 'evaluation_model_classification'
this.$store.commit('SET_ASSESS_STEP1','') }).then(res => {
} // console.log(res);
next() if (res.code !== 200) return;
this.effectList = res.data;
}).catch(() => {
this.$toast('网络请求错误')
})
},
destroy() {
}, },
methods:{
toNext(){
let effectValue = this.effectList.filter(x=>this.effectValue.includes(x.dictLabel))
if(effectValue.length){
effectValue = effectValue.map(x=>x.dictLabel)
}
if(this.effectValue.length == 0){
this.$toast("请先选择影响因素")
return;
}
this.$store.commit('SET_ASSESS_STEP1',effectValue.join(','))
// 保存数据
this.$router.push({
path: '/assess/model/step2',
query:{
ids:effectValue.join(',')
}
})
},
getData(){
getFun('/risk/plan/dict/data/list',{
dictType:'evaluation_model_classification'
}).then(res=>{
// console.log(res);
if(res.code!==200) return;
this.effectList = res.data;
}).catch(()=>{
this.$toast('网络请求错误')
})
},
destroy(){
},
}
} }
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.assess-model{ .assess-model {
background: #fff; background: #fff;
z-index: 10; z-index: 10;
.assess-model-select-title{
.assess-model-select-title {
font-weight: 400; font-weight: 400;
font-size: 14px; font-size: 14px;
color: rgba(69,90,100,.6); color: rgba(69, 90, 100, .6);
padding: 0.6rem 0.7rem; padding: 0.6rem 0.7rem;
} }
.assess-model-container{
.assess-model-container {
height: calc(100% - 1.5rem); height: calc(100% - 1.5rem);
overflow: auto; overflow: auto;
} }
.assess-model-footer{
.assess-model-footer {
width: 100%; width: 100%;
height: 1.4rem; height: 1.4rem;
z-index: 9; z-index: 9;
...@@ -112,16 +110,19 @@ import { getFun, postFun } from "@/service/table"; ...@@ -112,16 +110,19 @@ import { getFun, postFun } from "@/service/table";
bottom: 0px; bottom: 0px;
text-align: center; text-align: center;
line-height: 1rem; line-height: 1rem;
.van-button{
.van-button {
width: 90%; width: 90%;
margin: 0 auto; margin: 0 auto;
} }
} }
} }
.van-checkbox-group{
.van-checkbox-group {
padding: 0 1rem; padding: 0 1rem;
box-sizing: border-box; box-sizing: border-box;
.van-checkbox{
.van-checkbox {
background: #fff; background: #fff;
margin-bottom: 0.4rem; margin-bottom: 0.4rem;
padding: 0.4rem; padding: 0.4rem;
...@@ -129,22 +130,24 @@ import { getFun, postFun } from "@/service/table"; ...@@ -129,22 +130,24 @@ import { getFun, postFun } from "@/service/table";
box-shadow: 1px 1px 3px 1px #dddddd; box-shadow: 1px 1px 3px 1px #dddddd;
color: #1c1c1c; color: #1c1c1c;
text-align: center; text-align: center;
::v-deep .van-icon{
::v-deep .van-icon {
border-radius: 0.08rem; border-radius: 0.08rem;
border:none; border: none;
background: transparent; background: transparent;
color: #1989fa; color: #1989fa;
} }
::v-deep .van-checkbox__label{
::v-deep .van-checkbox__label {
flex: 1; flex: 1;
text-align: center; text-align: center;
font-size: 0.45rem; font-size: 0.45rem;
transform: translateX(-20px); transform: translateX(-20px);
} }
} }
.van-checkbox[aria-checked="true"]{
box-shadow: 1px 1px 3px 1px #38fc; .van-checkbox[aria-checked="true"] {
box-shadow: 1px 1px 3px 1px #38fc;
} }
} }</style>
</style> \ No newline at end of file
\ No newline at end of file
...@@ -229,7 +229,6 @@ export default { ...@@ -229,7 +229,6 @@ export default {
}); });
}) })
.catch(err => { .catch(err => {
console.log("err==>>", err);
}); });
}, },
workBenchList() { workBenchList() {
......
...@@ -9,11 +9,11 @@ module.exports = { ...@@ -9,11 +9,11 @@ module.exports = {
proxy: { proxy: {
//配置跨域 //配置跨域
"/app-api": { "/app-api": {
target: "http://192.168.4.232:8080/", //这里是后台的地址 // target: "http://192.168.4.232:8080/", //这里是后台的地址
// target: "http://localhost:8080/", //这里是后台的地址 // target: "http://localhost:8080/", //这里是后台的地址
// target: 'http://192.168.15.124:8080/', //这里是杨帆的地址 // target: 'http://192.168.15.124:8080/', //这里是杨帆的地址
// target: "http://192.168.14.152:8080/", //这里是鲍德的地址 // target: "http://192.168.14.152:8080/", //这里是鲍德的地址
// target: "http://192.168.15.230:8080/", //这里是晓静的地址 target: "http://192.168.15.230:8080/", //这里是晓晋的地址
// target: 'http://localhost:8081/', //这里是后台的地址 // target: 'http://localhost:8081/', //这里是后台的地址
// target: 'http://127.0.0.1:8080', //这里是后台的地址 // target: 'http://127.0.0.1:8080', //这里是后台的地址
ws: true, 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