Commit de470e2e authored by 13841799530's avatar 13841799530

单独

parent e5968b8a
...@@ -233,6 +233,24 @@ const routes = [{ ...@@ -233,6 +233,24 @@ const routes = [{
}, },
component: () => import( /* webpackChunkName: "create-order" */ '../views/notice/noticeList'), component: () => import( /* webpackChunkName: "create-order" */ '../views/notice/noticeList'),
}, },
{
path: '/noticeListDetail',
name: 'noticeListDetail',
meta: {
title: '整改通知管理详情',
index: 3
},
component: () => import( /* webpackChunkName: "create-order" */ '../views/notice/noticeList/detail'),
},
{
path: '/noticeListEdit',
name: 'noticeListEdit',
meta: {
title: '整改通知管理编辑',
index: 3
},
component: () => import( /* webpackChunkName: "create-order" */ '../views/notice/noticeList/edit'),
},
{ {
path: '/sign', path: '/sign',
name: 'sign', name: 'sign',
...@@ -242,6 +260,33 @@ const routes = [{ ...@@ -242,6 +260,33 @@ const routes = [{
}, },
component: () => import( /* webpackChunkName: "create-order" */ '../views/notice/noticeList/sign'), component: () => import( /* webpackChunkName: "create-order" */ '../views/notice/noticeList/sign'),
}, },
{
path: '/checked-confirm',
name: 'checked-confirm',
meta: {
title: '整改确认',
index: 3
},
component: () => import( /* webpackChunkName: "create-order" */ '../views/checkedConfirm'),
},
{
path: '/confirmNote',
name: 'confirmNote',
meta: {
title: '整改确认问题记录',
index: 3
},
component: () => import( /* webpackChunkName: "create-order" */ '../views/checkedConfirm/confirmNote'),
},
{
path: '/confirmDetail',
name: 'confirmDetail',
meta: {
title: '整改确认问题记录',
index: 3
},
component: () => import( /* webpackChunkName: "create-order" */ '../views/checkedConfirm/confirmNote/detail'),
},
// 登录页 // 登录页
{ {
path: '/login2', path: '/login2',
......
...@@ -169,6 +169,7 @@ export default { ...@@ -169,6 +169,7 @@ export default {
}, },
//修改卡片值 //修改卡片值
update(index,item){ update(index,item){
console.log(item)
item.show=false item.show=false
//向编辑页面传值做数据回显 //向编辑页面传值做数据回显
var obj={ var obj={
...@@ -180,6 +181,7 @@ export default { ...@@ -180,6 +181,7 @@ export default {
pictures:item.pictures,//图片 pictures:item.pictures,//图片
videos:item.videos//视频 videos:item.videos//视频
} }
console.log(obj,'检查')
this.$forceUpdate()//强制刷新 this.$forceUpdate()//强制刷新
this.$router.push({name:'edit',query:{name:'note',obj:JSON.stringify(obj)}}) this.$router.push({name:'edit',query:{name:'note',obj:JSON.stringify(obj)}})
}, },
......
<!--
* 严肃声明:
* 开源版本请务必保留此注释头信息,若删除我方将保留所有法律责任追究!
* 本系统已申请软件著作权,受国家版权局知识产权以及国家计算机软件著作权保护!
* 可正常分享和学习源码,不得用于违法犯罪活动,违者必究!
* Copyright (c) 2020 陈尼克 all rights reserved.
* 版权所有,侵权必究!
*
-->
<template>
<div>
<LHeader v-bind:text="text"></LHeader>
<div class="card">
<div>问题位置:{{list.address}}</div>
<div>责任单位:{{list.deptId}}</div>
<div>问题描述:{{list.context}}</div>
<div>法律依据:{{list.checkBasis}}</div>
<div>图片展示:<van-uploader multiple :deletable="false" :show-upload="false" v-model="list.pictures" /></div>
<div>视频展示:<van-uploader multiple :deletable="false" :show-upload="false" :disabled="true" v-model="list.videos" /></div>
</div>
<tab-bar :index="1"></tab-bar>
</div>
</template>
<script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table'
export default {
name: 'confirmDetail',
components: {
"LHeader":LHeader,
"tabBar":tabBar
},
data() {
return {
text:'问题详情',//顶部文本
list:{},//详情列表
id:'',//详情列表id
}
},
mounted() {
this.id=this.$route.query.id
this.init()
},
methods: {
/* 获取详情列表 */
init(){
this.list={}
getFun('check/confirm/trouble/list',{planId:this.id}).then((Response)=>{
this.list=Response.data.list
})
}
}
}
</script>
<style lang="less" scoped>
.card{
width:90%;
box-shadow: 0px 0px 10px 2px #F3F3F3;
padding: 0.25rem;
margin:0.4rem auto;
background: white;
border-radius: 4%;
}
.card div{
font-size: 0.4rem;
line-height: 0.8rem;
}
</style>
<!--
* 严肃声明:
* 开源版本请务必保留此注释头信息,若删除我方将保留所有法律责任追究!
* 本系统已申请软件著作权,受国家版权局知识产权以及国家计算机软件著作权保护!
* 可正常分享和学习源码,不得用于违法犯罪活动,违者必究!
* Copyright (c) 2020 陈尼克 all rights reserved.
* 版权所有,侵权必究!
*
-->
<template>
<div>
<LHeader v-bind:text="text"></LHeader>
<van-checkbox-group v-model="result" @change="checkedEvent" ref="checkboxGroup">
<div class="card" v-for="(item,index) in noticeQuestionList" :key="index">
<van-overlay @click.stop="close(item)" :show="item.show" >
<van-button round type="primary" @click.stop="detail(index,item)">详情</van-button>
</van-overlay>
<van-checkbox :name="item.id" :disabled="finish=='true'?true:item.checkSubmitId?true:false">问题{{index+1}}</van-checkbox>
<div @click="cardClick(item)">
<div>负责人姓名:{{item.realName}}</div>
<div>问题名称:{{item.title}}</div>
<div>问题位置:{{item.address}}</div>
<div>问题内容:{{item.context}}</div>
<div>发现时间:{{item.checkTime}}</div>
</div>
</div>
</van-checkbox-group>
<div class="page-footer">
<van-checkbox v-model="checkedAll" @change="checkedAllEvent" @click="checkedAllClick" :disabled="finish=='true'?true:false">全选</van-checkbox>
</div>
<van-field
readonly
clickable
name="calendar"
:value="value"
label="整改完成时间"
placeholder="请选择时间"
@click="calendarOpen"
/>
<van-popup v-model="showCalendar" position="bottom">
<van-datetime-picker v-model="currentDate" type="datehour" @confirm="onConfirm" @cancel="showCalendar=false" title="选择年月日小时"/>
</van-popup>
<div class="sign"><span>检查组负责人签字确认:</span><van-tag color="#ffe1e1" :disabled="finish=='true'?true:false"><p v-show="istext" @click="sign" >电子签字</p><img class="sign-img" v-show="isImg" :src="resultImg" alt=""></van-tag></div>
<van-field
readonly
clickable
name="person"
:value="person"
label="人员选择"
placeholder="请选择人员"
@click="personChecked"
/>
<van-popup v-model="showCalendar2" position="bottom">
<van-picker ref="apicker" title="人员匹配" show-toolbar :columns="columns" @confirm="personOnConfirm" @cancel="showCalendar2=false"/>
</van-popup>
<div class="page-footer-button">
<van-button round type="info" size="large" @click="commit" :disabled="finish=='true'?true:isFinish==true?true:false">整改确认</van-button>
</div>
<tab-bar :index="1"></tab-bar>
</div>
</template>
<script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table'
export default {
name: 'confirmNote',
components: {
"LHeader":LHeader,
"tabBar":tabBar
},
data() {
return {
currentDate: new Date(),//当前默认时间
dialogShow:false,//弹框是否显示
istext:true,//是否显示文字
isImg:false,//是否显示图片
resultImg:'',//电子签名图片
noticeQuestionList:[],//整改通知问题记录列表
active: 0,//tab选中状态
checkedAll:false,//全选状态
result: [],//勾选数组
noticeTableList:[],//上报状态列表
text:'整改确认问题记录',
value: '',//日期值
id:'',//整改通知id
showCalendar: false,//日期弹出层状态
showCalendar2: false,//人员匹配弹出层状态
finish:true,//检查状态
isFinish:false,//提交状态
person:'',//人员匹配
columns:'',//下拉数组
projectId:'',//判断请求树形菜单还是下拉框
}
},
watch:{
},
mounted() {
//获取确认id
if(this.$route.query.id){
this.id=this.$route.query.id
this.projectId=this.$route.query.projectId
}
this.problem()
this.init()
},
methods: {
/* 问题记录列表 */
problem(){
this.noticeQuestionList=[]
this.$toast.loading({
message:'加载中...',
forbidClick: true,
loadingType: 'spinner',
duration: 0
})
getFun('check/confirm/trouble/list',{planId:this.id}).then((Response)=>{
/* ---新增---- */
this.isFinish=Response.data.isFinish
this.noticeQuestionList=Response.data.list
//初始化每个div的弹框,遮罩层显示状态
this.noticeQuestionList.forEach((item)=>{
item.show=false
})
this.$toast.clear()
/* ----详情---- */
if(this.isFinish){
//获取选中状态数组
this.noticeQuestionList.forEach((item)=>{
if(item.checkSubmitId){
this.result.push(parseInt(item.checkSubmitId))
}
})
//日期数据回显
if(Response.data.finishTime){
this.value=Response.data.finishTime
}
//电子签名数据回显
if(Response.data.leaderSign){
this.resultImg=Response.data.leaderSign
}
//电子签名数据2回显
if(Response.data.managerSign){
this.resultImg2=Response.data.managerSign
}
//判断是否有签名
if(this.resultImg){
this.istext=false
this.isImg=true
}
//判断是否有签名
if(this.resultImg2){
this.istext2=false
this.isImg2=true
}
}
})
},
//请求人员匹配下拉菜单
init(){
this.columns=[];
if(this.projectId){
//请求下拉菜单
getFun('check/project/user/list',{projectId:this.projectId}).then((Response)=>{
this.columns=Response.data
})
}else{
//请求下拉树形菜单
getFun('/check/dept/user/tree',{projectId:this.projectId}).then((Response)=>{
this.columns=Response.data
})
}
},
/* 全选点击事件---只让全选框的触发全不选事件 */
checkedAllClick(){
if(this.checkedAll){
this.$refs.checkboxGroup.toggleAll(true);
}else{
/* 全不选只可以控制未禁用状态下的复选框 */
for(var key of this.$refs.checkboxGroup.$children){
if(!key.$el._prevClass.includes('disabled')){
key.toggle(false)
}
}
}
},
/* 复选框改变事件 */
checkedEvent(){
if(this.result.length==this.noticeQuestionList.length){
this.checkedAll=true
}else if(this.result.length<this.noticeQuestionList.length){
this.checkedAll=false
}
},
//人员选择事件
personChecked(){
this.showCalendar2=true//显示遮罩层
},
/* 全选框改变事件 */
checkedAllEvent(){
if(this.checkedAll){
this.$refs.checkboxGroup.toggleAll(true);
}
},
/* 时间戳转换 */
onConfirm(date) {
this.value = this.util.timestampToTime(date,'DT1',true)
this.showCalendar = false;
},
//日期输入框点击事件
calendarOpen(){
if(this.finish=='false'){
this.showCalendar = true
}
},
//标签点击事件防止标签切换首次进入不执行复选框监听事件
tabClick(idx){
if(idx==1){
if(this.result.length==this.noticeQuestionList.length){
this.checkedAll=true
}else if(this.result.length<this.noticeQuestionList.length){
this.checkedAll=false
}
}
},
//电子签名1
sign(){
//点击电子签名,保存用户选择的日期和复选框回显值
if(this.finish=='false'){
this.$router.push({name:'sign',query:{name:'sign',img:true}})
}
},
//提交问题记录
commit(){
var checkedList=[]
/* 禁用状态下的(已选过)问题不进行提交,进行清空处理 */
this.result.forEach((it)=>{
this.noticeQuestionList.forEach((item)=>{
if(it==item.id&&!item.checkSubmitId){
checkedList.push(it)
}
})
})
var obj={
planId:this.id,
leaderSign:this.resultImg,
}
this.$dialog.confirm({
title: '提示',
message: '确定提交检查问题?',
}).then(()=>{
this.$toast.loading({
message:'提交中...',
forbidClick: true,
loadingType: 'spinner',
duration: 0
})
postFun('check/notify/trouble',obj).then((Response)=>{
this.$toast.clear()
this.$toast.success('提交成功')
this.init()
this.$router.push('/notice')
}).catch(()=>{
this.$toast.clear()
this.$toast.fail('提交失败,请稍后再试')
})
})
},
//卡片单击事件
cardClick(item){
item.show=true
this.$forceUpdate()//强制刷新
},
//关闭遮罩层事件
close(item){
item.show=false
this.$forceUpdate()//强制刷新
},
//列表详情
detail(index,item){
item.show=false
this.$forceUpdate()//强制刷新
this.$router.push({name:'confirmDetail',query:{id:item.id}})
},
//人员匹配确认按钮
personOnConfirm(){
//获取回显的部门值和部门id数组
this.person=""
this.ids=[]
var valueList=this.$refs.apicker.getValues()
valueList.forEach((item)=>{
this.ids.push(item.id)
this.person+=item.text+' / '
})
console.log(this.person)
this.showCalendar2 = false;
}
}
}
</script>
<style lang="less" scoped>
/* 问题记录卡片样式 */
.card{
position: relative;
width:90%;
box-shadow: 0px 0px 10px 2px #F3F3F3;
padding: 0.25rem;
margin:0.4rem auto;
background: white;
border-radius: 4%;
.van-overlay {
display:flex;
justify-content: space-evenly;
align-items: center;
.van-button{
width: 20%;
margin-top: 0;
}
text-align: center;
position: absolute;
}
}
.card div,.card-status{
font-size: 0.4rem;
line-height: 0.8rem;
}
/* 状态列表卡片样式 */
.card-status{
width:90%;
box-shadow: 0px 0px 10px 2px #F3F3F3;
padding: 0.25rem;
margin:0.4rem auto;
background: white;
border-radius: 4%;
}
.card-left{
vertical-align: middle;
}
.card-middle div:nth-child(1){
font-size: 0.5rem;
font-weight: bolder;
width: 5rem;
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis;
}
.card-middle div:nth-child(2){
font-size: 0.3rem;
font-weight: bolder;
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis;
}
.card-right{
font-size: 0.3rem;
text-align: right;
font-weight: bolder;
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis;
}
.card-right div:nth-child(1){
font-size: 0.9rem;
color:#2980F7;
text-align: right;
margin-right: 0.3rem;
font-weight: bolder;
}
// table{
// width: 100%;
// }
.page-footer{
text-align: right;
padding: 0.25rem;
width: 90%;
}
.van-button{
width: 90%;
margin-top: 0.6rem;
}
.page-footer-button{
text-align: center;
}
.sign{
width: 90%;
height: 2rem;
display: flex;
align-items: center;
margin-top: 0.5rem;
margin-left:0.4rem ;
font-size: 0.37333rem;
}
.van-tag{
color: #323233
}
.sign-img{
width: 2rem;
height: 1rem;
}
</style>
<!--
* 严肃声明:
* 开源版本请务必保留此注释头信息,若删除我方将保留所有法律责任追究!
* 本系统已申请软件著作权,受国家版权局知识产权以及国家计算机软件著作权保护!
* 可正常分享和学习源码,不得用于违法犯罪活动,违者必究!
* Copyright (c) 2020 陈尼克 all rights reserved.
* 版权所有,侵权必究!
*
-->
<template>
<div>
<LHeader v-bind:text="text"></LHeader>
<div class="card" v-for="(item,index) in checkedConfirmList" :key="index" @click="cardLocation(item)">
<div>负责人:{{item.name}}</div>
<div>部门名称:{{item.realName}}</div>
<div>开始时间:{{item.planStartTime}}</div>
<div>结束时间:{{item.planEndTime}}</div>
<div>检查地点:{{item.address}}</div>
<div>检查类型:{{item.type}}</div>
</div>
<tab-bar :index="1"></tab-bar>
</div>
</template>
<script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table'
export default {
name: 'checked-confirm',
components: {
"LHeader":LHeader,
"tabBar":tabBar
},
data() {
return {
checkedConfirmList:[],//检查确认列表
text:'检查确认列表',//顶部文本
}
},
mounted() {
this.list()
},
methods: {
/* 首次进入页面请求检查执行列表接口 */
list(){
this.checkedConfirmList=[]
this.$toast.loading({
message:'加载中...',
forbidClick: true,
loadingType: 'spinner',
duration: 0
})
getFun('check/confirm/list').then((Response)=>{
this.checkedConfirmList=Response.data
this.$toast.clear()
}).catch(()=>{
this.$toast.clear()
this.$toast.fail('加载失败,请稍后再试')
})
},
cardLocation(item){
this.$router.push({name:'confirmNote',query:{projectId:item.projectId,id:item.id}})//此id来判断是否加载问题上报新数据
}
}
}
</script>
<style lang="less" scoped>
.card{
width:90%;
box-shadow: 0px 0px 10px 2px #F3F3F3;
padding: 0.25rem;
margin:0.4rem auto;
background: white;
border-radius: 4%;
}
.card div{
font-size: 0.4rem;
line-height: 0.8rem;
}
</style>
<!--
* 严肃声明:
* 开源版本请务必保留此注释头信息,若删除我方将保留所有法律责任追究!
* 本系统已申请软件著作权,受国家版权局知识产权以及国家计算机软件著作权保护!
* 可正常分享和学习源码,不得用于违法犯罪活动,违者必究!
* Copyright (c) 2020 陈尼克 all rights reserved.
* 版权所有,侵权必究!
*
-->
<template>
<div>
<LHeader v-bind:text="text"></LHeader>
<div class="card">
<div>问题位置:{{list.address}}</div>
<div>责任单位:{{list.deptId}}</div>
<div>问题描述:{{list.context}}</div>
<div>法律依据:{{list.checkBasis}}</div>
<div>图片展示:<van-uploader multiple :deletable="false" :show-upload="false" v-model="list.pictures" /></div>
<div>视频展示:<van-uploader multiple :deletable="false" :show-upload="false" :disabled="true" v-model="list.videos" /></div>
</div>
<tab-bar :index="1"></tab-bar>
</div>
</template>
<script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table'
export default {
name: 'detail',
components: {
"LHeader":LHeader,
"tabBar":tabBar
},
data() {
return {
text:'整改问题详情',//顶部文本
list:{},//详情列表
id:'',//详情列表id
}
},
mounted() {
this.id=this.$route.query.id
this.init()
},
methods: {
/* 获取详情列表 */
init(){
this.list={}
getFun('check/notify/trouble/'+this.id).then((Response)=>{
this.list=Response.data
})
}
}
}
</script>
<style lang="less" scoped>
.card{
width:90%;
box-shadow: 0px 0px 10px 2px #F3F3F3;
padding: 0.25rem;
margin:0.4rem auto;
background: white;
border-radius: 4%;
}
.card div{
font-size: 0.4rem;
line-height: 0.8rem;
}
</style>
<!--
* 严肃声明:
* 开源版本请务必保留此注释头信息,若删除我方将保留所有法律责任追究!
* 本系统已申请软件著作权,受国家版权局知识产权以及国家计算机软件著作权保护!
* 可正常分享和学习源码,不得用于违法犯罪活动,违者必究!
* Copyright (c) 2020 陈尼克 all rights reserved.
* 版权所有,侵权必究!
*
-->
<template>
<div>
<LHeader v-bind:text="text"></LHeader>
<van-form @submit="onSubmit" @failed="onFailed">
<van-field
v-model="editObj.context"
name="问题描述"
label="问题描述"
placeholder="问题描述"
:rules="[{ required: true, message: '请填写问题描述' }]"
/>
<van-field
v-model="editObj.checkBasis"
name="法律依据"
label="法律依据"
placeholder="法律依据"
:rules="[{ required: true, message: '请填写法律依据' }]"
/>
<van-field
v-model="editObj.address"
name="问题位置"
label="问题位置"
placeholder="问题位置"
:rules="[{ required: true, message: '请填写问题位置' }]"
/>
<van-field
readonly
clickable
name="picker"
:value="editObj.value"
label="责任单位"
placeholder="请选择部门"
@click="showPicker = true"
:rules="[{ required: true, message: '请填写问题位置' }]"
/>
<van-popup v-model="showPicker" position="bottom">
<van-picker ref="apicker"
show-toolbar
:columns="columns"
@confirm="onConfirm"
@cancel="showPicker = false"
@change="checkScroll"
/>
<!-- <van-area title="标题" :area-list="areaList" @confirm="onConfirm" /> -->
</van-popup>
<van-field name="uploader" label="图像上传" :rules="[{ required: true, message: '请上传图像' }]">
<template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="editObj.pictures" />
</template>
</van-field>
<van-field name="uploader2" label="视频上传" :rules="[{ required: true, message: '请上传视频' }]">
<template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="editObj.videos" />
</template>
</van-field>
<div style="margin: 0.5rem">
<van-button round block type="info" native-type="submit">提交</van-button>
</div>
</van-form>
<tab-bar :index="1"></tab-bar>
</div>
</template>
<script>
import tabBar from "@/components/TabBar";
import LHeader from '@/components/header.vue'
import { getFun,postFun } from '@/service/table'
export default {
name: 'list',
components: {
"LHeader":LHeader,
"tabBar":tabBar
},
data() {
return {
/* form表单 */
editObj:{},
value:'',//责任单位
showPicker:false,//默认是否展示弹出层
columns: [],//下拉数组
text:'整改通知问题编辑',//顶部文本
ids:[],//下拉框选中值数组id
}
},
mounted() {
if(this.$route.query.name=='noticeList'){
this.editObj=JSON.parse(this.$route.query.obj)
this.editObj.value=""
this.editObj.pictures=[]
this.editObj.videos=[]
}
console.log(this.editObj)
this.init()
},
methods: {
/* 获取下拉树级联列表 */
init(){
getFun('check/dept/tree').then((Response)=>{
this.columns=Response.data
})
},
/* 下拉框文本溢出动画效果 */
checkScroll () {
this.$nextTick(() => {
// 获取选中元素
let selectedItems = [...document.querySelectorAll('.van-picker-column__item--selected')]
selectedItems.forEach(item => {
let child = item.querySelector('.van-ellipsis')
if (child.offsetWidth > item.offsetWidth) { // 判断child文字宽度
item.classList.add('scroll')
} else {
item.classList.remove('scroll')
}
})
})
},
onFailed(errorInfo){
this.$toast.fail('提交失败,请完善信息')
},
/* 问题提交 */
onSubmit(value){
var pictures=[];
value.uploader.forEach((item) => {
pictures.push(item.content)
});
var videos=[];
value.uploader2.forEach((item) => {
videos.push(item.content)
});
var obj={
id:this.editObj.id,//列表ID
pictures:pictures,//图片
videos:videos,//视频
address:value['问题位置'],//问题位置
deptIds:this.ids,//责任单位
context:value['问题描述'],//问题描述
checkBasis:value['法律依据']//法律依据
}
this.$dialog.confirm({
title: '提示',
message: '确定提交检查问题?',
}).then(()=>{
this.$toast.loading({
message:'提交中...',
forbidClick: true,
loadingType: 'spinner',
duration: 0
})
postFun('check/notify/trouble/update',obj).then((Response)=>{
this.$toast.clear()
this.$toast.success({
message:'提交成功',
duration: 2000
})
this.$router.push({
name:'note',
query:{
pageName:'problemList'
}
})
}).catch(()=>{
this.$toast.clear()
this.$toast.fail('提交失败,请稍后再试')
})
}).catch(()=>{
})
},
/* 确认选择级联菜单的回显数据处理 */
onConfirm(){
//获取回显的部门值和部门id数组
this.value=""
this.ids=[]
var valueList=this.$refs.apicker.getValues()
valueList.forEach((item)=>{
this.ids.push(item.id)
this.editObj.value+=item.text+' / '
})
this.showPicker = false;
}
}
}
</script>
<style lang="less" scoped>
.card{
width:90%;
box-shadow: 0px 0px 10px 2px #F3F3F3;
padding: 0.25rem;
margin:0.4rem auto;
background: white;
}
.card div{
font-size: 0.4rem;
}
/deep/ .van-picker-column__item--selected {
/* 重写选中后的效果 */
.van-ellipsis {
text-overflow: unset;
overflow: visible;
}
/* 增加scroll类 */
&.scroll > .van-ellipsis {
animation: move 4s linear infinite;
}
}
@keyframes move {
0% { transform: translateX(100%); }
100% { transform: translateX(-100%); }
}
</style>
...@@ -14,7 +14,22 @@ ...@@ -14,7 +14,22 @@
<LHeader v-bind:text="text"></LHeader> <LHeader v-bind:text="text"></LHeader>
<van-tabs v-model="active" @click="tabClick"> <van-tabs v-model="active" @click="tabClick">
<van-tab title="上报状态"> <van-tab title="上报状态">
<table border="1" cellspacing="0"> <div class="card-status" v-for="(item,index) in noticeTableList" :key="index">
<van-row>
<van-col span="5" class="card-left">
<van-image round width="1.5rem" height="1.5rem" src="http://192.168.4.157:8096/hse/profile/upload/2021/10/27/8d91706250358ddad8499e3fec21578f.jpg"/>
</van-col>
<van-col span="7" class="card-middle">
<div>{{item.realName}}</div>
<div><span>提交时间 </span>{{item.submitTime}}</div>
</van-col>
<van-col span="10" class="card-right">
<div>{{item.troubleNumber}}</div>
<div>问题数量</div>
</van-col>
</van-row>
</div>
<!-- <table border="1" cellspacing="0">
<thead> <thead>
<tr> <tr>
<th>序号</th> <th>序号</th>
...@@ -31,7 +46,7 @@ ...@@ -31,7 +46,7 @@
<td align="center" v-text="user.troubleNumber"></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">
...@@ -51,26 +66,6 @@ ...@@ -51,26 +66,6 @@
</div> </div>
</div> </div>
</van-checkbox-group> </van-checkbox-group>
<van-dialog v-model="dialogShow" @confirm="commitDialog()" :title="dialogTitle" show-cancel-button>
<van-field
v-model="updateObj.title"
name="问题名称"
label="问题名称"
placeholder="问题名称"
/>
<van-field
v-model="updateObj.address"
name="问题位置"
label="问题位置"
placeholder="问题位置"
/>
<van-field
v-model="updateObj.context"
name="问题内容"
label="问题内容"
placeholder="问题内容"
/>
</van-dialog>
<div class="page-footer"> <div class="page-footer">
<van-checkbox v-model="checkedAll" @change="checkedAllEvent" @click="checkedAllClick" :disabled="finish=='true'?true:false">全选</van-checkbox> <van-checkbox v-model="checkedAll" @change="checkedAllEvent" @click="checkedAllClick" :disabled="finish=='true'?true:false">全选</van-checkbox>
</div> </div>
...@@ -229,7 +224,6 @@ export default { ...@@ -229,7 +224,6 @@ export default {
//初始化每个div的弹框,遮罩层显示状态 //初始化每个div的弹框,遮罩层显示状态
this.noticeQuestionList.forEach((item)=>{ this.noticeQuestionList.forEach((item)=>{
item.show=false item.show=false
item.dialogShow=false
}) })
console.log(this.noticeQuestionList) console.log(this.noticeQuestionList)
/* ----详情---- */ /* ----详情---- */
...@@ -379,58 +373,58 @@ export default { ...@@ -379,58 +373,58 @@ export default {
//修改卡片值 //修改卡片值
update(index,item){ update(index,item){
item.show=false item.show=false
this.dialogShow=true //向编辑页面传值做数据回显
//把列表可编辑数据回显到弹框表单中 var obj={
this.dialogTitle='问题'+(index+1),//标题 id:item.id,//问题ID
this.updateObj.id=item.id,//问题ID address:item.address,//问题位置
this.updateObj.title=item.title,//问题名称 deptId:item.deptId,//责任单位ID
this.updateObj.address=item.address,//问题位置 context:item.context,//问题描述
this.updateObj.context=item.context//问题内容 checkBasis:item.checkBasis,//法律依据
pictures:item.pictures,//图片
videos:item.videos//视频
}
this.$forceUpdate()//强制刷新 this.$forceUpdate()//强制刷新
this.$router.push({name:'noticeListEdit',query:{name:'noticeList',obj:JSON.stringify(obj)}})
}, },
//列表详情 //列表详情
detail(){ detail(index,item){
item.show=false
this.$forceUpdate()//强制刷新
this.$router.push({name:'noticeListDetail',query:{id:item.id}})
}, },
//卡片删除 //卡片删除
Delete(item){ Delete(item){
item.show=false item.show=false
this.$forceUpdate()//强制刷新 this.$forceUpdate()//强制刷新
alert('删除成功') this.$dialog.confirm({
title: '提示',
}, message: '确定删除该记录?',
//弹框数据提交 }).then(()=>{
commitDialog(){ this.$toast.loading({
this.noticeQuestionList.forEach((item)=>{ message:'删除中...',
if(item.id==this.updateObj.id){ forbidClick: true,
item.title=this.updateObj.title,//问题名称 loadingType: 'spinner',
item.address=this.updateObj.address,//问题位置 duration: 0
item.context=this.updateObj.context//问题内容 })
} postFun('check/notify/trouble/delete/'+item.id).then((Response)=>{
}) this.$toast.clear()
console.log(this.updateObj,123) this.$toast.success('删除成功')
this.$forceUpdate()//强制刷新 this.init()
this.$toast.loading({ }).catch(()=>{
message:'提交中...', this.$toast.clear()
forbidClick: true, this.$toast.fail('删除失败,请稍后再试')
loadingType: 'spinner', })
duration: 0 this.$toast.clear()
})
postFun('check/trouble/update',this.updateObj).then((Response)=>{
if(Response.code==0){
this.$toast.clear()
this.$toast.success('提交成功')
}
}).catch(()=>{ }).catch(()=>{
this.$toast.clear() this.$toast.success('取消删除')
this.$toast.fail('提交失败,请稍后再试')
}) })
}
},
} }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/* 问题记录卡片样式 */
.card{ .card{
position: relative; position: relative;
width:90%; width:90%;
...@@ -451,13 +445,55 @@ export default { ...@@ -451,13 +445,55 @@ export default {
position: absolute; position: absolute;
} }
} }
.card div{ .card div,.card-status{
font-size: 0.4rem; font-size: 0.4rem;
line-height: 0.8rem; line-height: 0.8rem;
} }
table{ /* 状态列表卡片样式 */
width: 100%; .card-status{
width:90%;
box-shadow: 0px 0px 10px 2px #F3F3F3;
padding: 0.25rem;
margin:0.4rem auto;
background: white;
border-radius: 4%;
}
.card-left{
vertical-align: middle;
}
.card-middle div:nth-child(1){
font-size: 0.5rem;
font-weight: bolder;
width: 5rem;
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis;
}
.card-middle div:nth-child(2){
font-size: 0.3rem;
font-weight: bolder;
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis;
}
.card-right{
font-size: 0.3rem;
text-align: right;
font-weight: bolder;
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis;
}
.card-right div:nth-child(1){
font-size: 0.9rem;
color:#2980F7;
text-align: right;
margin-right: 0.3rem;
font-weight: bolder;
} }
// table{
// width: 100%;
// }
.page-footer{ .page-footer{
text-align: right; text-align: right;
padding: 0.25rem; padding: 0.25rem;
......
...@@ -251,6 +251,12 @@ export default { ...@@ -251,6 +251,12 @@ export default {
path: "", path: "",
imgUrl: require("@/assets/workbench/ehcek-record.png"), imgUrl: require("@/assets/workbench/ehcek-record.png"),
text: "检查记录" text: "检查记录"
},
{
key: "8",
path: "/checked-confirm",
imgUrl: require("@/assets/workbench/ehcek-record.png"),
text: "整改确认"
} }
], ],
......
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