Commit 144b31e7 authored by 罗新东's avatar 罗新东

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

parents 615b381c e5968b8a
Pipeline #7101 passed with stage
in 12 seconds
......@@ -12,32 +12,22 @@
<div>
<LHeader v-bind:text="text"></LHeader>
<van-form @submit="onSubmit" @failed="onFailed">
<!-- <van-field
v-model="problemName"
name="问题名称"
label="问题名称"
placeholder="问题名称"
:rules="[{ required: true, message: '请填写问题名称' }]"
/> -->
<van-field
v-model="problemDescribe"
v-model="editObj.context"
name="问题描述"
label="问题描述"
placeholder="问题描述"
:rules="[{ required: true, message: '请填写问题描述' }]"
:disabled="isFormwork"
/>
<van-field
v-if="islay"
v-model="checkBasis"
v-model="editObj.checkBasis"
name="法律依据"
label="法律依据"
placeholder="法律依据"
:disabled="isFormwork"
:rules="[{ required: true, message: '请填写法律依据' }]"
/>
<van-field
v-model="problemPosition"
v-model="editObj.address"
name="问题位置"
label="问题位置"
placeholder="问题位置"
......@@ -47,11 +37,10 @@
readonly
clickable
name="picker"
:value="value"
:value="editObj.value"
label="责任单位"
:disabled="Isvalue"
placeholder="请选择部门"
@click="!Isvalue?showPicker = true:showPicker = false"
@click="showPicker = true"
:rules="[{ required: true, message: '请填写问题位置' }]"
/>
<van-popup v-model="showPicker" position="bottom">
......@@ -66,12 +55,12 @@
</van-popup>
<van-field name="uploader" label="图像上传" :rules="[{ required: true, message: '请上传图像' }]">
<template #input>
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="uploaderImg" />
<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="uploaderVideo" />
<van-uploader multiple :max-count="5" upload-text="最多上传五个" v-model="editObj.videos" />
</template>
</van-field>
<div style="margin: 0.5rem">
......@@ -95,43 +84,21 @@ export default {
data() {
return {
/* form表单 */
// problemName:'',//问题名称
problemPosition:'',//问题位置
editObj:{},
value:'',//责任单位
valueId:0,//责任单位id
problemDescribe:'',//问题描述
uploaderImg:[],//图像上传
uploaderVideo:[],//视频上传
checkBasis:'',//法律依据
showPicker:false,//默认是否展示弹出层
columns: [],//下拉数组
text:'问题编辑',//顶部文本
jumpObj:{},//跳转对象
id:'',//检查执行id
ids:[],//下拉框选中值数组id
planId:'',//不合格跳转进本页面所传列表id
planItemId:'',//不合格跳转进本页面所传列id
islay:false,//是否显示法律依据
isFormwork:false,//决定是否从不合格跳转到本页面是否禁用检查名称,内容,法律依据
Isvalue:false,//是否禁用责任单位
}
},
mounted() {
if(this.$route.query.id){
this.id=this.$route.query.id
var obj=JSON.parse(this.$route.query.obj)
this.Isvalue=obj.projectFlag
this.ids=obj.deptIdList
this.value=obj.deptNameList.join('/')
}
if(this.$route.query.name=='formwork'){
// this.problemName=this.$route.query.checkitem,//检查项目
this.problemDescribe=this.$route.query.checkContent,//检查内容
this.checkBasis=this.$route.query.checkBasis//法规依据
this.isFormwork=true
this.planId=this.$route.query.planId
this.planItemId=this.$route.query.planItemId,
this.islay=true
if(this.$route.query.name=='note'){
this.editObj=JSON.parse(this.$route.query.obj)
this.editObj.value=""
this.editObj.pictures=[]
this.editObj.videos=[]
console.log(this.editObj)
}
this.init()
},
......@@ -172,11 +139,9 @@ export default {
videos.push(item.content)
});
var obj={
planId:this.planId?this.planId:this.id,
planItemId:this.planItemId?this.planItemId:'',
pictures:pictures,
videos:videos,
title:value['问题名称'],//问题名称
id:this.editObj.id,//列表ID
pictures:pictures,//图片
videos:videos,//视频
address:value['问题位置'],//问题位置
deptIds:this.ids,//责任单位
context:value['问题描述'],//问题描述
......@@ -193,14 +158,14 @@ export default {
loadingType: 'spinner',
duration: 0
})
postFun('check/carry/trouble',obj).then((Response)=>{
postFun('check/carry/trouble/update',obj).then((Response)=>{
this.$toast.clear()
this.$toast.success({
message:'提交成功',
duration: 2000
})
this.$router.push({
name:'problem',
name:'note',
query:{
pageName:'problemList'
}
......@@ -221,9 +186,8 @@ export default {
this.ids=[]
var valueList=this.$refs.apicker.getValues()
valueList.forEach((item)=>{
console.log(item)
this.ids.push(item.id)
this.value+=item.text+' / '
this.editObj.value+=item.text+' / '
})
this.showPicker = false;
}
......
......@@ -20,7 +20,7 @@
</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.title}}</div>
<!-- <div>问题名称:{{item.title}}</div> -->
<div>问题位置:{{item.address}}</div>
<div>问题内容:{{item.context}}</div>
<div>发现时间:{{item.checkTime}}</div>
......@@ -170,8 +170,18 @@ export default {
//修改卡片值
update(index,item){
item.show=false
//向编辑页面传值做数据回显
var obj={
id:item.id,//问题ID
address:item.address,//问题位置
deptId:item.deptId,//责任单位ID
context:item.context,//问题描述
checkBasis:item.checkBasis,//法律依据
pictures:item.pictures,//图片
videos:item.videos//视频
}
this.$forceUpdate()//强制刷新
this.$router.push('/edit')
this.$router.push({name:'edit',query:{name:'note',obj:JSON.stringify(obj)}})
},
//列表详情
detail(index,item){
......
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