问题修复

main
zhangqun 11 months ago
parent 08fec1782f
commit ce8333d79b
  1. 8
      common/globalJs/request.js
  2. 2
      pages/investigation/components/investigation-item2.vue
  3. 2
      pages/investigation/components/problem-box.vue
  4. 4
      pages/investigation/components/problem-tree-item.vue
  5. 55
      pages/investigation/task.vue

@ -69,10 +69,10 @@ class Request {
// console.log('resInterceptors-----------------',resInterceptors) // console.log('resInterceptors-----------------',resInterceptors)
if(resInterceptors.statusCode == 400 || resInterceptors.data.code == 403){ if(resInterceptors.statusCode == 400 || resInterceptors.data.code == 403){
$.toast('登录信息已过期,请重新登录') $.toast('登录信息已过期,请重新登录')
$.removeData('token') // $.removeData('token')
setTimeout(() => { // setTimeout(() => {
$.openNew('/pages/logIn/logIn') // $.openNew('/pages/logIn/logIn')
},1500) // },1500)
return return
} }
if (!resInterceptors && resInterceptors != '') { if (!resInterceptors && resInterceptors != '') {

@ -122,7 +122,7 @@
<view class="investigation-item" style="width: 96%; padding: 0"> <view class="investigation-item" style="width: 96%; padding: 0">
<view class="detail-item"> <view class="detail-item">
<uni-forms-item <uni-forms-item
label="需采集补充信息" label="补充信息"
label-position="top" label-position="top"
label-width="200px" label-width="200px"
/> />

@ -29,7 +29,7 @@
></u-upload> ></u-upload>
</view> </view>
<view class="detail-item"> <view class="detail-item">
<uni-forms-item label="需采集补充信息" label-position="top" label-width="200px"/> <uni-forms-item label="补充信息" label-position="top" label-width="200px"/>
<u-textarea <u-textarea
placeholder="请输入" placeholder="请输入"
border="none" border="none"

@ -23,11 +23,11 @@
<view <view
class="investigation-item" class="investigation-item"
:class="problemTreeSelect === item.id ? 'active' : ''" :class="problemTreeSelect === item.id ? 'active' : ''"
v-for="(item, index) in 50" v-for="(item, index) in problemTreeSelectList"
:key="item.itemname" :key="item.itemname"
@click="handleSelectProblem(item, index)" @click="handleSelectProblem(item, index)"
> >
<text>{{ item.itemname }}</text>111 <text>{{ item.itemname }}</text>
<uni-icons <uni-icons
type="checkmarkempty" type="checkmarkempty"
size="24" size="24"

@ -98,9 +98,9 @@
</view> </view>
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
<view class="photo"> <!-- <view class="photo">
<image src="/static/base.jpg" mode="widthFix"></image> <image src="/static/base.jpg" mode="widthFix"></image>
</view> </view> -->
</view> </view>
<view class="echarts" v-if="active === 2"> <view class="echarts" v-if="active === 2">
<qiun-data-charts type="area" :opts="opts" :chartData="chartData" /> <qiun-data-charts type="area" :opts="opts" :chartData="chartData" />
@ -250,8 +250,8 @@
<view v-for="(item,index) in hiddenDangerList" :key="item" style="width: 100%"> <view v-for="(item,index) in hiddenDangerList" :key="item" style="width: 100%">
<view class="problem-item"> <view class="problem-item">
<view style="display: flex; justify-content: space-between"> <view style="display: flex; justify-content: space-between">
<view style="width: 80%"> <view style="width: 80%;line-height: 30px;">
{{ item.dangerProblem }} {{ item.hdTermName }}
</view> </view>
<view> <view>
<view class="check" @click="onHiddenDangerList(item,index)"> <view class="check" @click="onHiddenDangerList(item,index)">
@ -266,7 +266,7 @@
</view> </view>
</view> </view>
<!-- <view class="text">{{ item.hdTerm }}</view> --> <!-- <view class="text">{{ item.hdTerm }}</view> -->
<view class="text">{{ item.hdDesc }}</view> <!-- <view class="text">{{ item.hdDesc }}</view> -->
</view> </view>
</view> </view>
@ -321,7 +321,7 @@
@delete="(e) => deletePic(e, 'fileList')" name="1" :maxCount="1"></u-upload> @delete="(e) => deletePic(e, 'fileList')" name="1" :maxCount="1"></u-upload>
</view> </view>
<view class="detail-item"> <view class="detail-item">
<uni-forms-item label="需采集补充信息" label-position="top" label-width="200px" /> <uni-forms-item label="补充信息" label-position="top" label-width="200px" />
<u-textarea placeholder="请输入" border="none" v-model="describe.hdInfo" /> <u-textarea placeholder="请输入" border="none" v-model="describe.hdInfo" />
</view> </view>
</view> </view>
@ -350,6 +350,18 @@
@first="active = 1" @last="active = 3" /> @first="active = 1" @last="active = 3" />
<bottom-button v-else-if="active === 3" :secondText="'暂存'" @first="active = 2" @second="submit(false)" <bottom-button v-else-if="active === 3" :secondText="'暂存'" @first="active = 2" @second="submit(false)"
@last="submit(true)" /> @last="submit(true)" />
<u-modal
:show="modalShow"
content="您未录入任何隐患问题,该点段将以“无隐患”结论提交结果,请确认是否提交?"
confirm-text="确定"
cancel-text="取消"
:showConfirmButton="true"
:showCancelButton="true"
@confirm="postSaveManualInvestigation"
@cancel="modalShow = false"
:closeOnClickOverlay="false"
></u-modal>
</view> </view>
</template> </template>
@ -550,6 +562,10 @@
// //
troubleshootingData: [], troubleshootingData: [],
checked: [], checked: [],
modalShow: false,
extraConfigs: [],
describeArr: [],
temporary: ''
}; };
}, },
methods: { methods: {
@ -1078,14 +1094,30 @@
extraConfigs: extraConfigs, extraConfigs: extraConfigs,
describe: describe, describe: describe,
}); });
this.extraConfigs = extraConfigs
this.describeArr = describe
this.temporary = temporary
console.log(this.extraConfigs,this.describeArr)
if(!temporary) {
this.postSaveManualInvestigation()
return
}
if(this.extraConfigs.length <= 0 || this.describeArr.length <= 0) {
this.modalShow = true
} else {
this.postSaveManualInvestigation()
}
},
postSaveManualInvestigation() {
this.$request this.$request
.globalRequest( .globalRequest(
"/hiddenDanger/highDanger/saveManualInvestigation", { "/hiddenDanger/highDanger/saveManualInvestigation", {
...this.formData, ...this.formData,
businessId: this.businessId, businessId: this.businessId,
extraConfigs: extraConfigs, extraConfigs: this.extraConfigs,
describe: describe, describe: this.describeArr,
temporary: this.temporary,
// describe: [{ // describe: [{
// "bigCategory": "1", // "bigCategory": "1",
// "bigCategoryName": "线", // "bigCategoryName": "线",
@ -1097,14 +1129,17 @@
// "hdPic": "", // "hdPic": "",
// "hdInfo": "" // "hdInfo": ""
// }], // }],
temporary,
}, },
"POST" "POST"
) )
.then((res) => { .then((res) => {
console.log(res); console.log(res);
if (res.code === 200) { if (res.code === 200) {
if(this.temporary) {
this.$.toast("保存成功"); this.$.toast("保存成功");
} else {
this.$.toast("暂存成功");
}
setTimeout(() => { setTimeout(() => {
uni.navigateBack({ uni.navigateBack({
delta: 2, // 1 delta: 2, // 1
@ -1127,7 +1162,7 @@
this.$.toast(res.msg); this.$.toast(res.msg);
} }
}); });
}, }
}, },
}; };
</script> </script>

Loading…
Cancel
Save