Browse Source

禅道上0816问题的修改

taidong
duanliangtao 1 year ago
parent
commit
11357db235
  1. 33
      subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.js
  2. 60
      subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml
  3. 23
      subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxss
  4. 17
      subpages/myTroubleshootDemand/pages/index/index.js
  5. 2
      subpages/myTroubleshootDemand/pages/index/index.wxss

33
subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.js

@ -18,6 +18,7 @@ Page({
*/
data: {
optionsId: '',
isDisabled: false, // 默认不禁用
defaultMeasureNames: {
label: 'categoryName',
value: 'categoryCode',
@ -33,11 +34,12 @@ Page({
happenTime: "",
content: "", //内容
address: "", //地址
demandType:'chengguan'
},
minDate: '2018-01-01 00:00:00',
tabVal: "0",
ruTabVal: "yes",
tabVal: '2',
ruTabVal: 'yes',
uploadImageList: [], //图片上传的数组
streetList: [], // 街道
imageId: 1,
@ -86,7 +88,8 @@ Page({
reportTypeVisible: false,
categoryIds:'',
processData: []
processData: [],
},
/**
@ -109,7 +112,8 @@ Page({
}
this.setData({
tabVal: options.type || 0,
optionsId: options.id
optionsId: options.id,
isDisabled:true
})
return
}
@ -187,7 +191,8 @@ Page({
})) : [],
uploadRecord: res.data.voiceList && res.data.voiceList.length > 0 ? res.data.voiceList[0] : null,
totalTime: this.format(res.data.voiceList && res.data.voiceList.length > 0 ? res.data.voiceList[0].duration : 0),
categoryIds:res.data.parentCategoryId+","+res.data.categoryId
categoryIds:res.data.parentCategoryId+","+res.data.categoryId,
ruTabVal:res.data.responsibleUnit
})
if (this.data.uploadRecord) {
this.downLoadAudio()
@ -227,7 +232,14 @@ formatTimestamp(timestamp) {
return `${year}-${month}-${day} ${hour}:${minute}:${second}`;
},
update() {
this.submitPersonalInfo()
if(this.data.isDisabled){// 由不可编辑变为可编辑
this.setData({
isDisabled: false
})
}else{
this.submitPersonalInfo()
}
},
updateMeasure() {
this.setData({
@ -1742,13 +1754,10 @@ formatTimestamp(timestamp) {
},
previewImage(e) {
const currentUrl = e.currentTarget.dataset.url;
const urls = this.data.item.internalFile
.filter(file => file.attachmentType === 'image')
.map(file => file.attachmentUrl);
wx.previewImage({
current: currentUrl, // 当前显示图片的http链接
urls: urls // 需要预览的图片http链接列表
current: currentUrl, // 当前显示的图片链接
urls: [currentUrl] // 只预览当前点击的图片
});
},
downloadFile: function (event) {

60
subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml

@ -1,6 +1,6 @@
<view class="complete-info" >
<block >
<view class="content">
<view class="content {{isDisabled ? 'disabled' : ''}}">
<view class="personal-info">
<view class="basic-info">
@ -170,7 +170,7 @@
</view>
<view class="item" wx:if="{{(tabVal === '2' && ruTabVal=== 'yes') || fmData.demandType==='chengguan'}}">
<view class="item" wx:if="{{tabVal === '2' && ruTabVal=== 'yes' && fmData.demandType==='chengguan'}}">
<view class="field">
<text class="must">*</text>
<view class="field-text">责任人</view>
@ -180,7 +180,7 @@
</view>
</view>
<view class="item" wx:if="{{(tabVal === '2' && ruTabVal=== 'yes') || fmData.demandType==='chengguan'}}">
<view class="item" wx:if="{{tabVal === '2' && ruTabVal=== 'yes' && fmData.demandType==='chengguan'}}">
<view class="field">
<text class="must">*</text>
<view class="field-text">责任人电话</view>
@ -224,7 +224,7 @@
{{ item.publicReply }}
</view>
</view>
<view class="card_content">
<view class="card_content" wx:if="{{item.timeLimit && item.timeLimit!='null'}}">
<view class="label1">办结时限:</view>
<view class="value1">
{{ item.limitTime }}
@ -233,18 +233,13 @@
<view class="card_content" wx:if="{{item.internalFile.length > 0}}">
<view class="label1">附件:</view>
<view class="value1">
<block wx:for="{{item.internalFile}}" wx:key="*this">
<view wx:if="{{item.attachmentType === 'image'}}">
<view class="image-row">
<view class="image-row">
<block wx:for="{{item.internalFile}}" wx:key="*this">
<view wx:if="{{item.attachmentType === 'image'}}">
<image src="{{item.attachmentUrl}}" mode="aspectFill" bindtap="previewImage" data-url="{{item.attachmentUrl}}" />
</view>
</view>
<!-- <view wx:else>
<navigator url="{{item.attachmentUrl}}" open-type="navigateTo" class="download-link">
下载附件
</navigator>
</view> -->
</block>
</block>
</view>
</view>
</view>
</view>
@ -261,7 +256,7 @@
{{ item.publicReply }}
</view>
</view>
<view class="card_content" wx:if="{{item.timeLimit}}">
<view class="card_content" wx:if="{{item.timeLimit && item.timeLimit!='null'}}">
<view class="label1">办结时限:</view>
<view class="value1">
{{ item.limitTime }}
@ -271,18 +266,18 @@
<view class="card_content" wx:if="{{item.internalFile.length > 0}}">
<view class="label1">附件:</view>
<view class="value1">
<block wx:for="{{item.internalFile}}" wx:key="*this">
<view wx:if="{{item.attachmentType === 'image'}}">
<view class="image-row">
<view class="image-row">
<block wx:for="{{item.internalFile}}" wx:key="*this">
<view wx:if="{{item.attachmentType === 'image'}}">
<image src="{{item.attachmentUrl}}" mode="aspectFill" bindtap="previewImage" data-url="{{item.attachmentUrl}}" />
</view>
</view>
<view wx:else>
<navigator url="{{item.attachmentUrl}}" data-url="{{item.attachmentUrl}}" bindtap="downloadFile" open-type="navigateTo" class="download-link">
下载附件
</navigator>
</view>
</block>
<view wx:else>
<navigator url="{{item.attachmentUrl}}" data-url="{{item.attachmentUrl}}" bindtap="downloadFile" open-type="navigateTo" class="download-link">
下载附件
</navigator>
</view>
</block>
</view>
</view>
</view>
</view>
@ -294,15 +289,18 @@
</view>
<view class="submit-button" wx:if="{{!optionsId}}">
<view class="submit-button" wx:if="{{!optionsId}}">
<button disabled="{{ submitDisabled }}" bindtap="submitPersonalInfo" hover-class="hover-submit" >提交</button>
</view>
<view class="bto_btn" wx:else>
<button hover-class="btn-hover" bind:tap="update" class="btn_blue" >修改</button>
<button bind:tap="delete" class="btn_yellow">删除</button>
<button bind:tap="process" class="btn_red" wx:if="{{tabVal === '0' || tabVal === '2'}}">处理</button>
</view>
</view>
<view class="bto_btn" wx:if="{{optionsId}}">
<button hover-class="btn-hover" bind:tap="update" class="btn_blue" >{{isDisabled ? '修改' : '提交'}}</button>
<button bind:tap="delete" class="btn_yellow">删除</button>
<button bind:tap="process" class="btn_red" wx:if="{{tabVal === '0' || tabVal === '2'}}">处理</button>
</view>
</block>
</view>
<view class="sheet-bg" wx:if="{{showRecord}}"></view>

23
subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxss

@ -18,6 +18,8 @@ page {
.content {
width: 100%;
min-height: calc(100vh - 100rpx);
margin-bottom: 50rpx;
/* max-height: calc(100vh - 20rpx); */
}
.content-list {
@ -1023,7 +1025,7 @@ background: rgb(175, 1, 1);
justify-content: space-between;
padding: 10rpx 20rpx;
position: fixed;
bottom: 50rpx; /* 调整为20rpx,距离底部20rpx */
bottom: 0rpx; /* 调整为20rpx,距离底部20rpx */
left: 0;
width: 100%;
background-color: #ffffff;
@ -1128,13 +1130,20 @@ background: rgb(175, 1, 1);
.image-row {
display: flex;
justify-content: space-between;
align-items: center; /* 保证图片垂直居中 */
flex-wrap: nowrap; /* 防止换行 */
overflow-x: auto; /* 当图片超出一行时,可以横向滚动 */
align-items: center;
}
.image-row image {
flex: 1;
flex: 0 0 auto; /* 防止图片缩放 */
margin: 0 5px; /* 控制图片之间的间距 */
max-width: 100%; /* 防止图片过大 */
max-height: 150px; /* 设置图片最大高度 */
width: 80px; /* 固定宽度,可根据需要调整 */
height: 80px; /* 固定高度,可根据需要调整 */
object-fit: cover; /* 保持图片比例 */
}
border: 2px solid #ccc; /* 添加边框,颜色为浅灰色 */
border-radius: 5px; /* 圆角边框,可根据需要调整 */
}
.disabled {
pointer-events: none; /* 禁止点击 */
}

17
subpages/myTroubleshootDemand/pages/index/index.js

@ -43,12 +43,17 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
// this.setData({
// pageNo:1,
// tableData:[],
// tableData1:[]
// })
// this.getMyWaitTroubleshootDemandList()
this.setData({
pageNo:1,
tableData:[],
tableData1:[]
})
console.log("页面重新onShow。。。。。。。。")
if(this.data.active==0){
this.getMyWaitTroubleshootDemandList()
}else{
this.getMyTroubleshootDemandList()
}
},
/**

2
subpages/myTroubleshootDemand/pages/index/index.wxss

@ -70,7 +70,7 @@ page {
height: 180rpx;
flex-direction: column;
border-radius: 20rpx;
padding: 30rpx 30rpx;
padding: 20rpx 30rpx;
box-sizing: border-box;
overflow: hidden;
box-sizing: border-box;

Loading…
Cancel
Save