Commit 297fdc87 authored by lei's avatar lei

Merge branch 'gaoqucodecheck' of...

Merge branch 'gaoqucodecheck' of http://h.gemho.cn:7099/zhaojunbao/gaoquyingjih5-asd into gaoqucodecheck

# Conflicts:
#	src/_shanghu_detail.js
parents 034023ed 24473e23
...@@ -13,25 +13,6 @@ window.onload = function() { ...@@ -13,25 +13,6 @@ window.onload = function() {
}, 0); }, 0);
} }
// 初始化检查项数据结构
function createCheckItem(id) {
return {
id: id,
title: `检查项目 ${id}`,
selected: null,
subChecks: Array.from({
length: 10
}, (_, i) => ({
id: i + 1,
checked: false
})),
description: '',
photos: [],
deadlineDays: '',
deadlineDate: ''
};
}
new Vue({ new Vue({
el: '#app', el: '#app',
data: { data: {
...@@ -39,21 +20,19 @@ window.onload = function() { ...@@ -39,21 +20,19 @@ window.onload = function() {
flag: 'ADD', flag: 'ADD',
// flag: 'JC_XQ', // flag: 'JC_XQ',
// flag: 'YH_XQ', // flag: 'YH_XQ',
showDeadlinePicker: false,
deadlineOptions: ['1', '3', '5', '7'], deadlineOptions: ['1', '3', '5', '7'],
checkData: [], // 提交给后端,图片使用vant结构,base64,后端处理,不走爱山东中台。(数据量大!) checkData: [], // 提交给后端,图片使用vant结构,base64,后端处理,不走爱山东中台。(数据量大!)
originCheckData: [],
checkPageIndex: 0, checkPageIndex: 0,
currentItem: null, noCount: 0,
noCount:0,
totalItems: 0, totalItems: 0,
notNullCount: 0, notNullCount: 0,
// 外层表单信息 // 外层表单信息
checkDate: gemhoUtil.getTargetDateYMD(), // 检查日期 checkDate: gemhoUtil.getTargetDateYMD(), // 检查日期
checkPeopleName: '',// 检查人员 checkPeopleName: '', // 检查人员
rectificationDeadline: '', // 整改截止日期 rectificationDeadline: '', // 整改截止日期
reviewDate: '', // 隐患审核日期 reviewDate: '', // 隐患审核日期
reviewRecord: '', reviewRecord: '',
originCheckData: [],
}, },
mounted() { mounted() {
this.getDetail() this.getDetail()
...@@ -85,7 +64,8 @@ window.onload = function() { ...@@ -85,7 +64,8 @@ window.onload = function() {
}); });
}, },
getOriginMatchedItemById(id) { getOriginMatchedItemById(id) {
const result = this.originCheckData[this.checkPageIndex]['gqCheckItemVoList'].find(item => item.id === id) || [] const result = this.originCheckData[this.checkPageIndex]['gqCheckItemVoList'].find(item =>
item.id === id) || []
return JSON.parse(JSON.stringify(result)) return JSON.parse(JSON.stringify(result))
}, },
// 处理单选变化 // 处理单选变化
...@@ -95,8 +75,10 @@ window.onload = function() { ...@@ -95,8 +75,10 @@ window.onload = function() {
console.log(val, newItem, '数据改变了。。。。newItem') console.log(val, newItem, '数据改变了。。。。newItem')
newItem.itemAnswer = val newItem.itemAnswer = val
// console.log(this.checkData[this.checkPageIndex]['gqCheckItemVoList']) // console.log(this.checkData[this.checkPageIndex]['gqCheckItemVoList'])
this.$set(this.checkData[this.checkPageIndex]['gqCheckItemVoList'], index, newItem); this.$set(this.checkData[this.checkPageIndex]['gqCheckItemVoList'], index, JSON.parse(JSON
console.log(val, this.checkData[this.checkPageIndex]['gqCheckItemVoList'][index], '数据改变了后', index) .stringify()));
console.log(val, this.checkData[this.checkPageIndex]['gqCheckItemVoList'][index], '数据改变了后',
index)
}, },
// 文件上传处理 // 文件上传处理
handleFileUpload(file) { handleFileUpload(file) {
...@@ -120,7 +102,7 @@ window.onload = function() { ...@@ -120,7 +102,7 @@ window.onload = function() {
formatDate(date) { formatDate(date) {
return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`; return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`;
}, },
getDetail(){ getDetail4INIT() { // 安全检查模板初始化
this.checkDate = res.checkDate // 检查日期 this.checkDate = res.checkDate // 检查日期
this.checkPeopleName = res.checkPeopleName // 检查人员 this.checkPeopleName = res.checkPeopleName // 检查人员
this.rectificationDeadline = res.rectificationDeadline // 整改截止日期 this.rectificationDeadline = res.rectificationDeadline // 整改截止日期
...@@ -130,7 +112,42 @@ window.onload = function() { ...@@ -130,7 +112,42 @@ window.onload = function() {
// 表单数据 // 表单数据
this.checkData = JSON.parse(JSON.stringify(res.data)) this.checkData = JSON.parse(JSON.stringify(res.data))
this.originCheckData = JSON.parse(JSON.stringify(res.data)) this.originCheckData = JSON.parse(JSON.stringify(res.data))
},
getDetail4YH_XQ() { // 隐患详情
const reqParam = {
"merId": "1",
}
this.checkDate = res.checkDate // 检查日期
this.checkPeopleName = res.checkPeopleName // 检查人员
this.rectificationDeadline = res.rectificationDeadline // 整改截止日期
this.reviewDate = res.reviewDate // 隐患审核日期
this.reviewRecord = res.reviewRecord
// 表单数据
this.checkData = res.data
},
getDetail4JC_XQ() { // 检查单详情
const reqParam = {
"merId": "1",
}
this.checkDate = res.data.checkTime // 检查日期
this.checkPeopleName = res.data.checkPeopleName // 检查人员
this.checkData = res.data.gqCheckTypeDtoList
this.noCount = res.data.hiddenCount
this.notNullCount = res.data.notRectifiedCount
this.totalItems = res.itemAllCount
},
add4ZG_XQ() {
const reqParam = {
"merId": "1",
"gqCheckTypeVoList": this.checkData,
}
},
add4JC_XQ() {
const reqParam = {
"merId": "1",
"gqCheckTypeVoList": this.checkData
}
} }
} }
}); });
......
...@@ -13,22 +13,22 @@ ...@@ -13,22 +13,22 @@
<!-- 表单内容 --> <!-- 表单内容 -->
<van-cell-group inset> <van-cell-group inset>
<van-cell-group> <van-cell-group>
<van-field label="商家名称" v-model="formData.sjName1" /> <van-field label="商家名称" v-model="formData.unitName" :disabled="flag=='XQ'" />
</van-cell-group> </van-cell-group>
<van-cell-group> <van-cell-group>
<van-field label="负责人" v-model="formData.sjName2" type="tel"/> <van-field label="负责人" v-model="formData.owner" type="tel" :disabled="flag=='XQ'"/>
</van-cell-group> </van-cell-group>
<van-cell-group> <van-cell-group>
<van-field label="电话" v-model="formData.sjName3" type="number" /> <van-field label="电话" v-model="formData.merchantPhone" type="number" :disabled="flag=='XQ'" />
</van-cell-group> </van-cell-group>
<van-cell-group> <van-cell-group>
<van-field label="地址" v-model="formData.sjName4" /> <van-field label="地址" v-model="formData.businessAddress" :disabled="flag=='XQ'"/>
</van-cell-group> </van-cell-group>
<van-cell-group> <van-cell-group>
<van-field label="场所类型" v-model="formData.sjName5"/> <van-field label="场所类型" v-model="formData.smallPlaceTypeName" :disabled="flag=='XQ'"/>
</van-cell-group> </van-cell-group>
<van-cell-group> <!-- <van-cell-group>
<van-field label="场所类型" v-model="formData.type" placeholder="请选择场所类型" readonly clickable <van-field label="场所类型" v-model="formData.type" placeholder="请选择场所类型" readonly clickable
@click="showTypePicker = true" /> @click="showTypePicker = true" />
</van-cell-group> </van-cell-group>
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
@cancel="showTypePicker = false" /> @cancel="showTypePicker = false" />
</van-popup> </van-popup>
<van-cell-group> <van-cell-group>
<van-field label="安全二维码" v-model="formData.sjName6"/> <van-field label="安全二维码"/>
</van-cell-group> </van-cell-group> -->
</van-cell-group> </van-cell-group>
</div> </div>
......
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