# Conflicts:
#	pages/knowledge/index.vue
main
limingtao 11 months ago
commit 99b7b27b51
  1. 253
      pages/investigation/task.vue
  2. 116
      pages/knowledge/index.vue

@ -385,11 +385,12 @@
<u-popup :show="showProblem" @close="showProblem = false">
<view class="custom-pop-head">
<view class="left" @click="
showProblem = false;
hiddenDangerList2 = [];
describe.hdDesc = '';
describe.hdInfo = '';
">取消</view>
showProblem = false;
hiddenDangerList2 = [];
describe.hdDesc = '';
describe.hdInfo = '';
">取消
</view>
<view class="title">存在隐患</view>
<view class="right" @click="investigationHandle2">确认</view>
</view>
@ -941,7 +942,7 @@
},
showInvestigationTag2(v) {
// console.log(v, this.investigationSelectList)
console.log('gxh查看1', v, this.investigationSelectList, this.hiddenDangerList)
if (this.checked.includes(v.id)) {
this.showInvestigation2 = true;
this.showInvestigation2Item = v
@ -997,6 +998,7 @@
this.showPicker = true
},
select2(v, list, list2) {
console.log('select2')
list.dangerItems.forEach(item => {
// this.troubleshootingDataitem.idid
let found = false;
@ -1064,6 +1066,7 @@
},
select3(v) {
console.log('select3')
// this.investigationSelectList.map((r) => {
// if (r.nid == v.nid) {
// r = v;
@ -1291,155 +1294,107 @@
},
// "/hiddenDanger/highDanger/getSectionInfo",
getBaseData(businessId) {
this.$request
.globalRequest(
"/hiddenDanger/highDanger/getSectionInfo", {
nuserid: this.$.getData("token"),
businessId
},
"GET"
)
.then((res) => {
if (res.code === 200) {
for (let k in res.result) {
if (res.result[k] == 0) {
res.result[k] = ""
}
this.$request.globalRequest("/hiddenDanger/highDanger/getSectionInfo", {nuserid: this.$.getData("token"), businessId}, "GET").then((res) => {
if (res.code === 200) {
for (let k in res.result) {
if (res.result[k] == 0) {
res.result[k] = ""
}
this.formData = {
...this.formData,
...res.result
};
console.log('this.columnsdlPicker', this.columnsdlPicker)
this.columnsdlPicker[0]?.forEach(item => {
if(item.enumvalue == this.formData.roadType) {
this.$set(this.formData, 'roadTypeName', item.enumName)
}
})
this.getStreetCommunityByXq()
this.getBaseDefaultData()
}
});
this.$request
.globalRequest(
"/hiddenDanger/highDanger/getSectionTraffic", {
nuserid: this.$.getData("token"),
businessId
},
"GET"
)
.then((res) => {
if (res.code === 200) {
// todo
this.formData = {
...this.formData,
...res.result
};
this.formData = {
...this.formData,
...res.result
};
console.log('this.columnsdlPicker', this.columnsdlPicker)
this.columnsdlPicker[0]?.forEach(item => {
if(item.enumvalue == this.formData.roadType) {
this.$set(this.formData, 'roadTypeName', item.enumName)
}
})
this.getStreetCommunityByXq()
this.getBaseDefaultData()
}
});
this.$request.globalRequest("/hiddenDanger/highDanger/getSectionTraffic", {nuserid: this.$.getData("token"), businessId}, "GET").then((res) => {
if (res.code === 200) {
// todo
this.formData = {
...this.formData,
...res.result
};
}
});
this.$request.globalRequest("/hiddenDanger/highDanger/getImportDangerDisplay", {sid: "02", businessId}, "GET").then((res) => {
if (res.code === 200) {
// todo
for (let items of res.result) {
for (let item of items.dangerItems) {
item.nid = items.nid
}
}
});
this.$request
.globalRequest(
"/hiddenDanger/highDanger/getImportDangerDisplay", {
sid: "02",
businessId
},
"GET"
)
.then((res) => {
if (res.code === 200) {
// todo
for (let items of res.result) {
for (let item of items.dangerItems) {
item.nid = items.nid
}
// console.log(res.result,11111)
this.investigationSelectList = res.result;
this.investigationSelectList.map((r) => {
this.troubleshootingData = [...this.troubleshootingData, ...r.dangerItems]
});
console.log('this.troubleshootingData', this.troubleshootingData)
// console.log(this.troubleshootingData, 11111)
this.checked = this.troubleshootingData.map(r => {
if (r.checked == 1) {
return r.id
}
// console.log(res.result,11111)
this.investigationSelectList = res.result;
this.investigationSelectList.map((r) => {
this.troubleshootingData = [...this.troubleshootingData, ...r.dangerItems]
});
console.log('this.troubleshootingData', this.troubleshootingData)
// console.log(this.troubleshootingData, 11111)
this.checked = this.troubleshootingData.map(r => {
if (r.checked == 1) {
return r.id
}
})
this.checked = this.checked.filter(item => item !== undefined);
for (let i in this.troubleshootingData) {
if (this.troubleshootingData[i].checked == 1) {
// alert(111)
this.initTroubleshootingData(this.troubleshootingData[i].id, i)
}
})
this.checked = this.checked.filter(item => item !== undefined);
for (let i in this.troubleshootingData) {
if (this.troubleshootingData[i].checked == 1) {
// alert(111)
this.initTroubleshootingData(this.troubleshootingData[i].id, i)
}
this.initCheckedSelect()
// console.log(this.troubleshootingData)
// this.$request
// .globalRequest(
// "/hiddenDanger/highDanger/getImportDangerDisplayDetail", {
// nuserid: this.$.getData("token"),
// businessId,
// dangerId: '26'
// },
// "GET"
// )
// .then((res) => {
// if (res.code === 200) {
// this.investigationSelectList.map((r) => {
// r.extraConfigs = [];
// res.result.map((m) => {
// if (r.nid == m.scenesId) {
// r.extraConfigs.push(m);
// }
// });
// });
// }
// });
}
});
this.$request
.globalRequest(
"/hiddenDanger/highDanger/getImportDangers", {
nuserid: this.$.getData("token"),
businessId
},
"GET"
)
.then((res) => {
if (res.code === 200) {
this.investigationList = res.result;
}
});
this.$request
.globalRequest(
"/hiddenDanger/highDanger/getUserHiddenDangerList", {
// nuserid: this.$.getData("token"),
pcType: 2,
businessId
},
"GET"
)
.then((res) => {
if (res.code === 200) {
this.hiddenDangerList.push(...res.result)
}
});
this.$request
.globalRequest(
"/hiddenDanger/highDanger/getDangerItems", {
nuserid: this.$.getData("token"),
businessId
},
"GET"
)
.then((res) => {
if (res.code === 200) {
this.problemTreeSelectConfirmList = res.result;
}
});
this.initCheckedSelect()
// console.log(this.troubleshootingData)
// this.$request
// .globalRequest(
// "/hiddenDanger/highDanger/getImportDangerDisplayDetail", {
// nuserid: this.$.getData("token"),
// businessId,
// dangerId: '26'
// },
// "GET"
// )
// .then((res) => {
// if (res.code === 200) {
// this.investigationSelectList.map((r) => {
// r.extraConfigs = [];
// res.result.map((m) => {
// if (r.nid == m.scenesId) {
// r.extraConfigs.push(m);
// }
// });
// });
// }
// });
}
});
this.$request.globalRequest("/hiddenDanger/highDanger/getImportDangers", {nuserid: this.$.getData("token"), businessId}, "GET").then((res) => {
if (res.code === 200) {
this.investigationList = res.result;
}
});
this.$request.globalRequest("/hiddenDanger/highDanger/getUserHiddenDangerList", {pcType: 2, businessId}, "GET").then((res) => {
if (res.code === 200) {
this.hiddenDangerList.push(...res.result)
}
});
this.$request.globalRequest("/hiddenDanger/highDanger/getDangerItems", {nuserid: this.$.getData("token"), businessId}, "GET")
.then((res) => {
if (res.code === 200) {
this.problemTreeSelectConfirmList = res.result;
}
});
},
handleSelectProblem(item, index) {
// this.problemTreeSelectConfirmList.push(item)
@ -1465,7 +1420,7 @@
)
.then((res) => {
if (res.code === 200 && res.result.length != 0) {
this.hiddenDangerList.push(...res.result)
// this.hiddenDangerList.push(...res.result)
console.log(this.troubleshootingData, 123)
console.log(res.result, 321)
@ -1861,7 +1816,7 @@
this.extraConfigs = extraConfigs
this.describeArr = describe
this.temporary = temporary
console.log(this.extraConfigs, this.describeArr)
console.log('describeArrdescribeArrdescribeArr', this.extraConfigs, this.describeArr)
if (!temporary) {
this.postSaveManualInvestigation()
return

@ -3,8 +3,7 @@
<scroll-view scroll-y="true" :scroll-top="scrollTop" :style="{
height: isExpanded ? 'calc(100% - 1rpx)' : 'calc(100% - 1rpx)',
}" class="chatlist" :class="{ 'chatlist-wrapper-expanded': isExpanded }" id="scrollView" ref="scrollView"
@click="clickContent"
>
@click="clickContent">
<view v-if="!msgList.length" class="helloContent">
<image :src="$.imgSrc + '/left_user.png'" class="imgLeft" />
<view class="titleBox">
@ -27,8 +26,7 @@
</view>
</view>
</view>
<view :class="['bar', item.answerId == '0' ? 'currAnswer' : '']" v-for="(item,index) in msgList"
:key="item.id">
<view :class="['bar', item.answerId == '0' ? 'currAnswer' : '']" v-for="item in msgList" :key="item.id">
<!--<image :src="item.answerId == '0' ? $.imgSrc + '/self.png' : $.imgSrc + '/left_user.png'" class="img" />-->
<image :src="
item.answerId == '0'
@ -41,12 +39,14 @@
<view class="icon" v-show="item.answerId != '0' && item.isOver && item.isSuccess">
<uni-icons
:type="item.iconsType == '' ? 'hand-up' : (item.iconsType == 'handUp' ? 'hand-up-filled' : 'hand-up')"
:color="item.iconsType == 'handUp' ? '#FFD131' : ''" size="22"
@click="clickIcon('handUp', item.qaId,index)">
:color="item.iconsType == 'handUp' ? '#FFD131' : ''"
size="22"
@click="clickIcon('handUp', item.qaId)">
</uni-icons>
<uni-icons
:type="item.iconsType == '' ? 'hand-down' : (item.iconsType == 'handDown' ? 'hand-down-filled' : 'hand-down')"
size="22" @click="clickIcon('handDown', item.qaId,index)">
size="22"
@click="clickIcon('handDown', item.qaId)">
</uni-icons>
</view>
</view>
@ -60,10 +60,10 @@
<view class="con" :class="{ 'con-wrapper-expanded': isExpanded }"></view>
<view class="input-wrapper" :class="{ 'input-wrapper-expanded': isExpanded }">
<view class="topContent">
<input class="uni-input" placeholder="请输入内容" :value="inputValue" @confirm="handleSend"
<input class="uni-input" :placeholder="loading ? '请等待回复结束' : '请输入内容'" :value="inputValue" @confirm="handleSend" :disabled="loading"
@input="onKeyInput" />
<uni-icons class="uni-icon" type="plus" size="30" @click="handlePlus" color='#cccccc'></uni-icons>
<uni-icons class="uni-icon" type="plus" size="30" @click="handlePlus" color='#cccccc' :disabled="loading"></uni-icons>
</view>
<view v-if="isExpanded" class="expanded">
<view @click="chooseImage" class="expandedItem">
@ -139,7 +139,6 @@
lastScrollTop: 0, //
temp: 0,
iconsType: '',
isUserScrolling: false,
};
},
onLoad() {
@ -167,32 +166,38 @@
}
},
methods: {
async clickIcon(type, qaId, index) {
if (this.iconsType == '') {
this.iconsType = type
this.$set(this.msgList[index], 'iconsType', type)
} else {
if (this.iconsType == 'handUp') {
if (type == 'handUp') {
this.iconsType = ''
this.$set(this.msgList[index], 'iconsType', '')
} else {
this.iconsType = 'handDown'
this.$set(this.msgList[index], 'iconsType', 'handDown')
}
} else {
if (type == 'handUp') {
this.$set(this.msgList[index], 'iconsType', 'handUp')
this.iconsType = 'handUp'
async clickIcon(type, qaId) {
console.log(this.msgList)
this.msgList.forEach(item => {
if(item.qaId == qaId) {
if(item.iconsType == '' || !item.hasOwnProperty('iconsType')) {
this.iconsType = type
this.$set(item, 'iconsType', type)
} else {
this.iconsType = ''
this.$set(this.msgList[index], 'iconsType', '')
if(item.iconsType == 'handUp') {
if(type == 'handUp') {
this.iconsType = ''
this.$set(item, 'iconsType', '')
} else {
this.iconsType = 'handDown'
this.$set(item, 'iconsType', 'handDown')
}
} else {
if(type == 'handUp') {
this.iconsType = 'handUp'
this.$set(item, 'iconsType', 'handUp')
} else {
this.iconsType = ''
this.$set(item, 'iconsType', '')
}
}
}
}
}
})
const params = {
qaId,
feedbackStatus: this.iconsType == '' ? 0 : (this.iconsType == 'handUp' ? 1 : 2),
feedbackStatus : this.iconsType == '' ? 0 : (this.iconsType == 'handUp' ? 1 : 2),
feedbackInfo: ''
}
// this.$request.globalRequest('/hitap/feadBack', params, 'POST').then(res => {
@ -207,48 +212,26 @@
},
data: params
})
uni.showToast({
title: res.data.result,
// icon: 'success',
duration: 2000
});
},
handleTouchStart(e) {
// this.isUserScrolling = true;
//
// this.startX = e.touches[0].clientX;
// this.startY = e.touches[0].clientY;
// // this.isScrolling = false; //
this.$.toast(res.data.result);
// uni.showToast({
// title: res.data.result,
// // icon: 'success',
// duration: 2000
// });
},
handleTouchMove(e) {
console.log(e)
// this.isUserScrolling = true
this.isHandleScroll = false
//
// this.startX = e.touches[0].clientX;
// this.startY = e.touches[0].clientY;
// // this.isScrolling = false; //
},
handleTouchEnd(e) {
// this.isUserScrolling = true;
// setTimeout(() => {
// this.isUserScrolling = false;
// }, 300); //
//
// startXstartY
//
},
handleScroll(event) {
console.log(event)
// event.detail
const scrollTop = event.detail.scrollTop;
if (scrollTop > this.lastScrollTop) {
console.log('向下滑动');
// this.temp=0
} else {
this.temp++
if (this.temp == 2&&this.isUserScrolling) {
if (this.temp == 2) {
this.isHandleScroll = false
}
@ -336,7 +319,6 @@
}
this.temp = 0
this.isHandleScroll = true
this.isUserScrolling = false
this.changeMsgList("0", this.inputValue || text);
this.queryChat(this.inputValue || text);
this.inputValue = "";
@ -813,7 +795,6 @@
.titleTwo {
margin: 15rpx 0;
font-size: 28rpx;
font-size: 28rpx;
line-height: 42rpx;
}
@ -829,7 +810,6 @@
.text {
font-size: 28rpx;
// line-height:50rpx;
}
}
}
@ -1097,13 +1077,11 @@
color: #999999 !important;
}
}
.icon {
.icon{
display: flex;
justify-content: flex-end;
margin: 0 15rpx 15rpx 12rpx;
.uni-icons {
.uni-icons{
margin-left: 15rpx;
}
}

Loading…
Cancel
Save