Commit b1a877cd authored by 王李辉's avatar 王李辉

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

parents 12f84d52 9095144c
...@@ -49,7 +49,6 @@ service.interceptors.response.use(response => { ...@@ -49,7 +49,6 @@ service.interceptors.response.use(response => {
}); });
} }
}else{ }else{
// Notify({ type: 'danger', message: '失败' });
Promise.reject(new Error('Error')) Promise.reject(new Error('Error'))
} }
},err=>{ },err=>{
......
...@@ -63,17 +63,8 @@ export default { ...@@ -63,17 +63,8 @@ export default {
}, },
cardLocation(item){ cardLocation(item){
console.log(item) console.log(item)
this.$router.push({ sessionStorage.setItem('id',item.id)
name:'problem', this.$router.push('/problem')
query:{
checkitemId:item.id,
name:item.name,
type:item.type,
planStartTime:item.planStartTime,
planEndTime:item.planEndTime,
address:item.address,
}
})
} }
} }
} }
......
...@@ -12,11 +12,11 @@ ...@@ -12,11 +12,11 @@
<div> <div>
<LHeader v-bind:text="text"></LHeader> <LHeader v-bind:text="text"></LHeader>
<div class="card"> <div class="card">
<div>检查名称:{{itemlist.name}}</div> <div>检查名称:{{nums.name}}</div>
<div>检查类型:{{itemlist.type}}</div> <div>检查类型:{{nums.type}}</div>
<div>检查开始时间:{{itemlist.planStartTime}}</div> <div>检查开始时间:{{nums.planStartTime}}</div>
<div>检查结束时间:{{itemlist.planEndTime}}</div> <div>检查结束时间:{{nums.planEndTime}}</div>
<div>检查地点:{{itemlist.address}}</div> <div>检查地点:{{nums.address}}</div>
</div> </div>
<div class="button-more"> <div class="button-more">
<van-button type="primary" round size="large" @click="problem">检查问题上报{{nums.TroubleNumber}}</van-button> <van-button type="primary" round size="large" @click="problem">检查问题上报{{nums.TroubleNumber}}</van-button>
...@@ -38,27 +38,17 @@ export default { ...@@ -38,27 +38,17 @@ export default {
data() { data() {
return { return {
nums:{}, nums:{},
itemlist:{},
text:'问题上报' text:'问题上报'
} }
}, },
mounted() { mounted() {
if(this.$route.query.checkitemId){
this.itemlist={
id:this.$route.query.checkitemId,
name:this.$route.query.name,
type:this.$route.query.type,
planStartTime:this.$route.query.planStartTime,
planEndTime:this.$route.query.planEndTime,
address:this.$route.query.address,
}
}
this.init() this.init()
}, },
methods: { methods: {
init(){ init(){
var id=sessionStorage.getItem('id')
this.nums=[]; this.nums=[];
getFun('check/carry/count').then((Response)=>{ getFun('check/carry/count',{planId:id}).then((Response)=>{
this.nums=Response.data this.nums=Response.data
}) })
}, },
...@@ -74,7 +64,12 @@ export default { ...@@ -74,7 +64,12 @@ export default {
this.$router.push('/list') this.$router.push('/list')
}, },
note(){ note(){
this.$router.push('/note') this.$router.push({
name:'note',
query:{
id:this.nums.id
}
})
}, },
formwork(){ formwork(){
this.$router.push('/formwork') this.$router.push('/formwork')
......
...@@ -13,24 +13,12 @@ ...@@ -13,24 +13,12 @@
<LHeader v-bind:text="text"></LHeader> <LHeader v-bind:text="text"></LHeader>
<van-checkbox-group v-model="result" @change="checkedEvent" ref="checkboxGroup"> <van-checkbox-group v-model="result" @change="checkedEvent" ref="checkboxGroup">
<div class="card" v-for="(item,index) in list" :key="index" > <div class="card" v-for="(item,index) in list" :key="index" >
<van-checkbox :name="item.planItemId" :disabled="item.planItemId==1?true:false">问题{{item.id}}</van-checkbox> <van-checkbox :name="item.id" :disabled="item.checkSubmitId?true:false">问题{{item.id}}</van-checkbox>
<div>问题名称:{{item.title}}</div> <div>问题名称:{{item.title}}</div>
<div>问题位置:{{item.address}}</div> <div>问题位置:{{item.address}}</div>
<div>问题内容:{{item.context}}</div> <div>问题内容:{{item.context}}</div>
<div>发现时间:{{item.checkTime}}</div> <div>发现时间:{{item.checkTime}}</div>
</div> </div>
<!-- <div class="card">
<van-checkbox name="b">问题二</van-checkbox>
<div>问题描述:未编制专项试工方案或未进行设计计算</div>
<div>具体位置:项目内页管理</div>
<div>发现时间:2021-12-15</div>
</div>
<div class="card">
<van-checkbox name="c">问题三</van-checkbox>
<div>问题描述:未编制专项试工方案或未进行设计计算</div>
<div>具体位置:项目内页管理</div>
<div>发现时间:2021-12-15</div>
</div> -->
</van-checkbox-group> </van-checkbox-group>
<div class="page-footer"> <div class="page-footer">
<van-checkbox v-model="checkedAll" @change="checkedAllEvent" @click="checkedAllClick">全选</van-checkbox> <van-checkbox v-model="checkedAll" @change="checkedAllEvent" @click="checkedAllClick">全选</van-checkbox>
...@@ -55,16 +43,25 @@ export default { ...@@ -55,16 +43,25 @@ export default {
text:'问题记录', text:'问题记录',
checkedAll:false, checkedAll:false,
result: [], result: [],
list:[] list:[],
id:'',
} }
}, },
mounted() { mounted() {
if(this.$route.query.id){
this.id=this.$route.query.id
}
this.init() this.init()
}, },
methods: { methods: {
init(){ init(){
getFun('check/carry/trouble/list').then((Response)=>{ getFun('check/carry/trouble/list',).then((Response)=>{
this.list=Response.data this.list=Response.data
this.list.forEach((item)=>{
if(item.checkSubmitId){
this.result.push(parseInt(item.checkSubmitId))
}
})
}) })
}, },
//全选点击事件---只让全选框的触发全不选事件 //全选点击事件---只让全选框的触发全不选事件
...@@ -72,13 +69,18 @@ export default { ...@@ -72,13 +69,18 @@ export default {
if(this.checkedAll){ if(this.checkedAll){
this.$refs.checkboxGroup.toggleAll(true); this.$refs.checkboxGroup.toggleAll(true);
}else{ }else{
this.$refs.checkboxGroup.toggleAll(false); /* 全不选只可以控制未禁用状态下的复选框 */
for(var key of this.$refs.checkboxGroup.$children){
if(!key.$el._prevClass.includes('disabled')){
key.toggle(false)
}
}
} }
}, },
checkedEvent(list){ checkedEvent(){
if(list.length==3){ if(this.result.length==this.list.length){
this.checkedAll=true this.checkedAll=true
}else if(list.length<3){ }else if(this.result.length<this.list.length){
this.checkedAll=false this.checkedAll=false
} }
}, },
...@@ -91,9 +93,18 @@ export default { ...@@ -91,9 +93,18 @@ export default {
this.$toast.success('取消') this.$toast.success('取消')
}, },
commit(){ commit(){
var checkedList=[]
/* 禁用状态下的(已选过)问题不进行提交,进行清空处理 */
this.result.forEach((it)=>{
this.list.forEach((item)=>{
if(it==item.id&&!item.checkSubmitId){
checkedList.push(it)
}
})
})
var obj={ var obj={
planId:1, planId:this.id,
troubleIds:this.result troubleIds:checkedList
} }
this.$dialog.confirm({ this.$dialog.confirm({
title: '提示', title: '提示',
......
...@@ -11,17 +11,21 @@ ...@@ -11,17 +11,21 @@
<template> <template>
<div> <div>
<LHeader v-bind:text="text"></LHeader> <LHeader v-bind:text="text"></LHeader>
<div class="card" @click="cardLocation"> <div class="card" v-for="(item,index) in noticeList" :key="index" @click="cardLocation(item)">
<div>检查名称:昌平区回迁房改造项目安全检查</div> <div>负责人姓名:{{item.realName}}</div>
<div>检查名称:专项检查</div> <div>检查名称:{{item.name}}</div>
<div>检查名称:2021-12-15</div> <div>检查类型:{{item.type}}</div>
<div>检查名称:昌平区回迁房改造工程</div> <div>检查开始时间:{{item.planStartTime}}</div>
<div>检查结束时间:{{item.planEndTime}}</div>
<div>检查地点:{{item.address}}</div>
<div>是否完成检查:{{item.finish?'':''}}</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import LHeader from '@/components/header.vue' import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table'
export default { export default {
name: 'notice', name: 'notice',
components: { components: {
...@@ -29,17 +33,28 @@ export default { ...@@ -29,17 +33,28 @@ export default {
}, },
data() { data() {
return { return {
noticeList:[],
value:'', value:'',
text:'整改通知管理' text:'整改通知管理'
} }
}, },
mounted() { mounted() {
this.init()
}, },
methods: { methods: {
cardLocation(){ init(){
console.log(123) this.noticeList=[]
this.$router.push('/noticeList') getFun('check/notify/list').then((Response)=>{
this.noticeList=Response.data
})
},
cardLocation(item){
this.$router.push({
name:'noticeList',
query:{
id:item.id
}
})
} }
} }
} }
......
...@@ -19,39 +19,29 @@ ...@@ -19,39 +19,29 @@
<tr> <tr>
<th>序号</th> <th>序号</th>
<th>姓名</th> <th>姓名</th>
<th>性别</th> <th>状态</th>
<th>年龄</th> <th>问题数量</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(user,index) in user" :key="index"> <tr v-for="(user,index) in noticeTableList" :key="index">
<td align="center" v-text="index+1"></td> <td align="center" v-text="index+1"></td>
<td align="center" v-text="user.name"></td> <td align="center" v-text="user.realName"></td>
<td align="center" v-text="user.gender"></td> <td align="center" >{{user.submit?'已提交':'未提交'}}</td>
<td align="center" v-text="user.age"></td> <td align="center" v-text="user.troubleNumber"></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</van-tab> </van-tab>
<van-tab title="问题记录"> <van-tab title="问题记录">
<van-checkbox-group v-model="result" @change="checkedEvent" ref="checkboxGroup"> <van-checkbox-group v-model="result" @change="checkedEvent" ref="checkboxGroup">
<div class="card"> <div class="card" v-for="(item,index) in noticeQuestionList" :key="index" >
<van-checkbox name="a">问题一</van-checkbox> <van-checkbox :name="item.id" :disabled="item.checkSubmitId?true:false">问题{{item.id}}</van-checkbox>
<div>问题描述:未编制专项试工方案或未进行设计计算</div> <div>负责人姓名:{{item.realName}}</div>
<div>具体位置:项目内页管理</div> <div>问题名称:{{item.title}}</div>
<div>发现时间:2021-12-15</div> <div>问题位置:{{item.address}}</div>
</div> <div>问题内容:{{item.context}}</div>
<div class="card"> <div>发现时间:{{item.checkTime}}</div>
<van-checkbox name="b">问题二</van-checkbox>
<div>问题描述:未编制专项试工方案或未进行设计计算</div>
<div>具体位置:项目内页管理</div>
<div>发现时间:2021-12-15</div>
</div>
<div class="card">
<van-checkbox name="c">问题三</van-checkbox>
<div>问题描述:未编制专项试工方案或未进行设计计算</div>
<div>具体位置:项目内页管理</div>
<div>发现时间:2021-12-15</div>
</div> </div>
</van-checkbox-group> </van-checkbox-group>
<div class="page-footer"> <div class="page-footer">
...@@ -79,6 +69,7 @@ ...@@ -79,6 +69,7 @@
<script> <script>
import LHeader from '@/components/header.vue' import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table'
export default { export default {
name: 'notice', name: 'notice',
components: { components: {
...@@ -86,38 +77,57 @@ export default { ...@@ -86,38 +77,57 @@ export default {
}, },
data() { data() {
return { return {
noticeQuestionList:[],//整改通知问题记录列表
active: 0, active: 0,
checkedAll:false, checkedAll:false,
result: [], result: [],
valuetext:'', valuetext:'',
user:[ noticeTableList:[],
{name:"杨过",gender:"",age:"30"},
{name:"小龙女",gender:"",age:"35"},
{name:"郭靖",gender:"",age:"36"},
{name:"黄蓉",gender:"",age:"36"},
{name:"郭襄",gender:"",age:"18"},
],
text:'整改通知管理列表', text:'整改通知管理列表',
value: '', value: '',
id:'',
showCalendar: false, showCalendar: false,
} }
}, },
mounted() { mounted() {
if(this.$route.query.id){
this.id=this.$route.query.id
}
this.init()
this.problem()
}, },
methods: { methods: {
//全选点击事件---只让全选框的触发全不选事件 /* 上报状态列表 */
init(){
this.noticeTableList=[]
getFun('check/notify/user/list',{planId:this.id}).then((Response)=>{
this.noticeTableList=Response.data
})
},
/* 问题记录列表 */
problem(){
this.noticeQuestionList=[]
getFun('check/notify/trouble/list',{planId:this.id}).then((Response)=>{
this.noticeQuestionList=Response.data
})
},
/* 全选点击事件---只让全选框的触发全不选事件 */
checkedAllClick(){ checkedAllClick(){
if(this.checkedAll){ if(this.checkedAll){
this.$refs.checkboxGroup.toggleAll(true); this.$refs.checkboxGroup.toggleAll(true);
}else{ }else{
this.$refs.checkboxGroup.toggleAll(false); /* 全不选只可以控制未禁用状态下的复选框 */
for(var key of this.$refs.checkboxGroup.$children){
if(!key.$el._prevClass.includes('disabled')){
key.toggle(false)
}
}
} }
}, },
checkedEvent(list){ checkedEvent(list){
if(list.length==3){ if(this.result.length==this.list.length){
this.checkedAll=true this.checkedAll=true
}else if(list.length<3){ }else if(this.result.length<this.list.length){
this.checkedAll=false this.checkedAll=false
} }
}, },
......
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