Loading src/views/notice/index.vue +24 −9 Original line number Original line Diff line number Diff line Loading @@ -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: { Loading @@ -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 } }) } } } } } } Loading src/views/notice/noticeList/index.vue +45 −35 Original line number Original line Diff line number Diff line Loading @@ -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"> Loading Loading @@ -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: { Loading @@ -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 } } }, }, Loading Loading
src/views/notice/index.vue +24 −9 Original line number Original line Diff line number Diff line Loading @@ -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: { Loading @@ -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 } }) } } } } } } Loading
src/views/notice/noticeList/index.vue +45 −35 Original line number Original line Diff line number Diff line Loading @@ -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"> Loading Loading @@ -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: { Loading @@ -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 } } }, }, Loading