数据更新下载优化
This commit is contained in:
parent
5f4dc9cc68
commit
7be0662788
|
|
@ -3091,9 +3091,13 @@
|
||||||
<view> 问题描述:</view>
|
<view> 问题描述:</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="querybox_title2">
|
<view class="querybox_title2">
|
||||||
<csr-uni-data-select :multiple="false" :filterable="false" v-model="formdata.issue" placeholder="选择问题描述"
|
<!-- <niceui-data-select-input v-model="formdata.issue"
|
||||||
dataKey="issue" dataValue="issue" :localdata="standardCommonIssueslist" :clear="false"
|
:localdata="standardCommonIssueslist"></niceui-data-select-input> -->
|
||||||
@change="standardCommonIssuechange"></csr-uni-data-select>
|
<!-- <sh-select labelKey="issue" valueKey="issue" :localdata="standardCommonIssueslist"
|
||||||
|
v-model="formdata.issue" search :allowCreate="true" /> -->
|
||||||
|
<csr-uni-data-select :multiple="false" :filterable="true" v-model="formdata.issue" dataKey="issue"
|
||||||
|
dataValue="issue" :localdata="standardCommonIssueslist" :clear="true" :allowCreate="true"
|
||||||
|
:placeholder="formdata.issue||'选择问题描述'" @change="standardCommonIssuechange"></csr-uni-data-select>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
|
|
@ -3183,6 +3187,7 @@
|
||||||
parseObjectToArray,
|
parseObjectToArray,
|
||||||
savebendiImage,
|
savebendiImage,
|
||||||
} from '@/utils/util'
|
} from '@/utils/util'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
UniMenu,
|
UniMenu,
|
||||||
|
|
@ -3397,7 +3402,8 @@
|
||||||
this.formdata.voiceUrl = '';
|
this.formdata.voiceUrl = '';
|
||||||
},
|
},
|
||||||
|
|
||||||
parseStr(str, resultInfo = "") {
|
parseStr(str, resultInfo = "", showval = true) {
|
||||||
|
//str--字符串 resultInfo--值 showval--是否清空值(保存并添加时用的)
|
||||||
const regex = /\{(\d+)\}/g;
|
const regex = /\{(\d+)\}/g;
|
||||||
const matches = [];
|
const matches = [];
|
||||||
let match;
|
let match;
|
||||||
|
|
@ -3434,7 +3440,7 @@
|
||||||
|
|
||||||
// 构建list数组
|
// 构建list数组
|
||||||
const list = matches.map((match, index) => ({
|
const list = matches.map((match, index) => ({
|
||||||
value: index < values.length ? values[index] : '',
|
value: showval ? index < values.length ? values[index] : '' : '',
|
||||||
maxvalue: parseInt(match.number, 10),
|
maxvalue: parseInt(match.number, 10),
|
||||||
dw: index === matches.length - 1 ? dw : ''
|
dw: index === matches.length - 1 ? dw : ''
|
||||||
}));
|
}));
|
||||||
|
|
@ -3483,6 +3489,7 @@
|
||||||
let jsonlist = fujianjson.fubiaolist;
|
let jsonlist = fujianjson.fubiaolist;
|
||||||
this.fubiaoobj.jsonmap = jsonlist.filter(item => item.attachmentType == objitem.attachmentType)[0]
|
this.fubiaoobj.jsonmap = jsonlist.filter(item => item.attachmentType == objitem.attachmentType)[0]
|
||||||
this.fubiaoobj.datalist = this.parseObjectToArray(this.fubiaoobj.jsonmap.data);
|
this.fubiaoobj.datalist = this.parseObjectToArray(this.fubiaoobj.jsonmap.data);
|
||||||
|
console.log('456654645', this.fubiaoobj);
|
||||||
} else {
|
} else {
|
||||||
let jsonlist = fujianjson.fubiaolist;
|
let jsonlist = fujianjson.fubiaolist;
|
||||||
this.fubiaoobj.jsonmap = jsonlist.filter(item => item.attachmentType == objitem.attachmentType)[0]
|
this.fubiaoobj.jsonmap = jsonlist.filter(item => item.attachmentType == objitem.attachmentType)[0]
|
||||||
|
|
@ -3622,6 +3629,21 @@
|
||||||
this.$modal.msgError("抽查情况不能为空!")
|
this.$modal.msgError("抽查情况不能为空!")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.formdata.materialActivityFiles) {
|
||||||
|
let returnshow = false;
|
||||||
|
for (let cc of this.formdata.materialActivityFiles) {
|
||||||
|
if (cc.resultType === '' || cc.resultType === null) {
|
||||||
|
returnshow = true;
|
||||||
|
this.$modal.msgError("现场验收不能为空!")
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (returnshow) return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
for (let mm of this.locationslist) {
|
for (let mm of this.locationslist) {
|
||||||
mm.selectFlag = null;
|
mm.selectFlag = null;
|
||||||
}
|
}
|
||||||
|
|
@ -3635,7 +3657,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.formdata.imgUrlbase64list) {
|
if (this.formdata.imgUrlbase64list && typeof this.formdata.imgUrlbase64list !== "string") {
|
||||||
this.formdata.imgUrlbase64list = JSON.stringify(this.formdata.imgUrlbase64list);
|
this.formdata.imgUrlbase64list = JSON.stringify(this.formdata.imgUrlbase64list);
|
||||||
}
|
}
|
||||||
this.formdata.locations = JSON.stringify(this.locationslist);
|
this.formdata.locations = JSON.stringify(this.locationslist);
|
||||||
|
|
@ -3663,7 +3685,7 @@
|
||||||
} else {
|
} else {
|
||||||
this.formdata.padstatus = '2'
|
this.formdata.padstatus = '2'
|
||||||
}
|
}
|
||||||
if (this.formdata.materialActivityFiles) {
|
if (this.formdata.materialActivityFiles && typeof this.formdata.materialActivityFiles !== "string") {
|
||||||
this.formdata.materialActivityFiles = JSON.stringify(this.formdata.materialActivityFiles)
|
this.formdata.materialActivityFiles = JSON.stringify(this.formdata.materialActivityFiles)
|
||||||
}
|
}
|
||||||
if (this.fubiaoobj) {
|
if (this.fubiaoobj) {
|
||||||
|
|
@ -3788,12 +3810,27 @@
|
||||||
this.$modal.msgError("抽查情况不能为空!")
|
this.$modal.msgError("抽查情况不能为空!")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.formdata.materialActivityFiles) {
|
||||||
|
let returnshow = false;
|
||||||
|
for (let cc of this.formdata.materialActivityFiles) {
|
||||||
|
if (cc.resultType === '' || cc.resultType === null) {
|
||||||
|
returnshow = true;
|
||||||
|
this.$modal.msgError("现场验收不能为空!")
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (returnshow) return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const baocunitem = JSON.parse(JSON.stringify(this.formdata));
|
||||||
for (let mm of this.locationslist) {
|
for (let mm of this.locationslist) {
|
||||||
mm.selectFlag = null;
|
mm.selectFlag = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.formdata.checkPointids) {
|
if (baocunitem.checkPointids) {
|
||||||
for (let m of this.formdata.checkPointids) {
|
for (let m of baocunitem.checkPointids) {
|
||||||
let index = this.locationslist.findIndex(element => element.standardLocationId ==
|
let index = this.locationslist.findIndex(element => element.standardLocationId ==
|
||||||
m); // 使用 findIndex 直接获取索引
|
m); // 使用 findIndex 直接获取索引
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
|
|
@ -3803,12 +3840,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (this.formdata.imgUrlbase64list) {
|
if (baocunitem.imgUrlbase64list && typeof baocunitem.imgUrlbase64list !== "string") {
|
||||||
this.formdata.imgUrlbase64list = JSON.stringify(this.formdata.imgUrlbase64list);
|
baocunitem.imgUrlbase64list = JSON.stringify(baocunitem.imgUrlbase64list);
|
||||||
}
|
}
|
||||||
this.formdata.locations = JSON.stringify(this.locationslist);
|
baocunitem.locations = JSON.stringify(this.locationslist);
|
||||||
this.formdata.imgUrl = this.imgfileList1.toString();
|
baocunitem.imgUrl = this.imgfileList1.toString();
|
||||||
if (this.formdata.tableLevel4Id) {
|
if (baocunitem.tableLevel4Id) {
|
||||||
// if (this.formdata.padstatus == '0') {
|
// if (this.formdata.padstatus == '0') {
|
||||||
// //padstatus 0--没有tableLevel4Id 1--有tableLevel4Id 2--需要新增的 3--需要修改的 4--删除的
|
// //padstatus 0--没有tableLevel4Id 1--有tableLevel4Id 2--需要新增的 3--需要修改的 4--删除的
|
||||||
// this.formdata.padstatus = '2'
|
// this.formdata.padstatus = '2'
|
||||||
|
|
@ -3816,114 +3853,111 @@
|
||||||
// //padstatus 0--没有tableLevel4Id 1--有tableLevel4Id 2--需要新增的 3--需要修改的 4--删除的
|
// //padstatus 0--没有tableLevel4Id 1--有tableLevel4Id 2--需要新增的 3--需要修改的 4--删除的
|
||||||
// this.formdata.padstatus = '3'
|
// this.formdata.padstatus = '3'
|
||||||
// }
|
// }
|
||||||
this.formdata.padstatus = '3'
|
baocunitem.padstatus = '3'
|
||||||
} else {
|
} else {
|
||||||
this.formdata.padstatus = '2'
|
baocunitem.padstatus = '2'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.formdata.materialActivityFiles) {
|
if (baocunitem.materialActivityFiles && typeof baocunitem.materialActivityFiles !== "string") {
|
||||||
this.formdata.materialActivityFiles = JSON.stringify(this.formdata.materialActivityFiles)
|
baocunitem.materialActivityFiles = JSON.stringify(baocunitem.materialActivityFiles)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (this.formdata.records) {
|
if (baocunitem.records) {
|
||||||
for (let s of this.formdata.records) {
|
for (let s of baocunitem.records) {
|
||||||
let vallsit = s.infopadobj.list.map(item => item.value);
|
let vallsit = s.infopadobj.list.map(item => item.value);
|
||||||
s.resultInfo = vallsit.toString();
|
s.resultInfo = vallsit.toString();
|
||||||
}
|
}
|
||||||
this.formdata.records = JSON.stringify(this.formdata.records);
|
baocunitem.records = JSON.stringify(baocunitem.records);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.fubiaoobj) {
|
if (this.fubiaoobj) {
|
||||||
this.formdata.attachmentJson = JSON.stringify(this.fubiaoobj.formdata);
|
baocunitem.attachmentJson = JSON.stringify(this.fubiaoobj.formdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
let updata = {
|
let updata = {
|
||||||
|
|
||||||
createTime: this.formdata.createTime,
|
createTime: baocunitem.createTime,
|
||||||
updateTime: this.formdata.updateTime,
|
updateTime: baocunitem.updateTime,
|
||||||
createBy: this.formdata.createBy,
|
createBy: baocunitem.createBy,
|
||||||
updateBy: this.formdata.updateBy,
|
updateBy: baocunitem.updateBy,
|
||||||
tableLevel4Id: this.formdata.tableLevel4Id,
|
tableLevel4Id: baocunitem.tableLevel4Id,
|
||||||
tableLevel4Code: this.formdata.tableLevel4Code,
|
tableLevel4Code: baocunitem.tableLevel4Code,
|
||||||
parentNo: this.formdata.parentNo,
|
parentNo: baocunitem.parentNo,
|
||||||
parentId: this.formdata.parentId,
|
parentId: baocunitem.parentId,
|
||||||
buildingId: this.formdata.buildingId,
|
buildingId: baocunitem.buildingId,
|
||||||
checkPoint: this.formdata.checkPoint,
|
checkPoint: baocunitem.checkPoint,
|
||||||
resultType: this.formdata.resultType,
|
resultType: baocunitem.resultType,
|
||||||
resultTypeInfo: this.formdata.resultTypeInfo,
|
resultTypeInfo: baocunitem.resultTypeInfo,
|
||||||
issue: this.formdata.issue,
|
issue: baocunitem.issue,
|
||||||
standard: this.formdata.standard,
|
standard: baocunitem.standard,
|
||||||
term: this.formdata.term,
|
term: baocunitem.term,
|
||||||
issueType: this.formdata.issueType,
|
issueType: baocunitem.issueType,
|
||||||
issueTypeInfo: this.formdata.issueTypeInfo,
|
issueTypeInfo: baocunitem.issueTypeInfo,
|
||||||
rectifyCompanyId: this.formdata.rectifyCompanyId,
|
rectifyCompanyId: baocunitem.rectifyCompanyId,
|
||||||
rectifyCompanyName: this.formdata.rectifyCompanyName,
|
rectifyCompanyName: baocunitem.rectifyCompanyName,
|
||||||
regulatoryCompanyId: this.formdata.regulatoryCompanyId,
|
regulatoryCompanyId: baocunitem.regulatoryCompanyId,
|
||||||
regulatoryCompanyName: this.formdata.regulatoryCompanyName,
|
regulatoryCompanyName: baocunitem.regulatoryCompanyName,
|
||||||
expectDeadLineDate: this.formdata.expectDeadLineDate,
|
expectDeadLineDate: baocunitem.expectDeadLineDate,
|
||||||
deadLineWarning: this.formdata.deadLineWarning,
|
deadLineWarning: baocunitem.deadLineWarning,
|
||||||
attachmentId: this.formdata.attachmentId,
|
attachmentId: baocunitem.attachmentId,
|
||||||
imgUrl: this.formdata.imgUrl,
|
imgUrl: baocunitem.imgUrl,
|
||||||
voiceUrl: this.formdata.voiceUrl,
|
voiceUrl: baocunitem.voiceUrl,
|
||||||
checkerName: this.formdata.checkerName,
|
checkerName: baocunitem.checkerName,
|
||||||
checkDate: this.formdata.checkDate,
|
checkDate: baocunitem.checkDate,
|
||||||
status: this.formdata.status,
|
status: baocunitem.status,
|
||||||
statusInfo: this.formdata.statusInfo,
|
statusInfo: baocunitem.statusInfo,
|
||||||
projectId: this.formdata.projectId,
|
projectId: baocunitem.projectId,
|
||||||
remark: this.formdata.remark,
|
remark: baocunitem.remark,
|
||||||
imgNum: this.formdata.imgNum,
|
imgNum: baocunitem.imgNum,
|
||||||
attachmentJson: this.formdata.attachmentJson,
|
attachmentJson: baocunitem.attachmentJson,
|
||||||
standardTableLevel2Id: this.formdata.standardTableLevel2Id,
|
standardTableLevel2Id: baocunitem.standardTableLevel2Id,
|
||||||
standardTableLevel1Id: this.formdata.standardTableLevel1Id,
|
standardTableLevel1Id: baocunitem.standardTableLevel1Id,
|
||||||
standardTableLevel3Id: this.formdata.standardTableLevel3Id,
|
standardTableLevel3Id: baocunitem.standardTableLevel3Id,
|
||||||
standardTableLevel4Id: this.formdata.standardTableLevel4Id,
|
standardTableLevel4Id: baocunitem.standardTableLevel4Id,
|
||||||
checkContent: this.formdata.checkContent,
|
checkContent: baocunitem.checkContent,
|
||||||
phaseTypesControlInfo: this.formdata.phaseTypesControlInfo,
|
phaseTypesControlInfo: baocunitem.phaseTypesControlInfo,
|
||||||
checkMethod: this.formdata.checkMethod,
|
checkMethod: baocunitem.checkMethod,
|
||||||
allScopeFlag: this.formdata.allScopeFlag,
|
allScopeFlag: baocunitem.allScopeFlag,
|
||||||
checkScope: this.formdata.checkScope,
|
checkScope: baocunitem.checkScope,
|
||||||
activeCheckFlag: this.formdata.activeCheckFlag,
|
activeCheckFlag: baocunitem.activeCheckFlag,
|
||||||
locationType: this.formdata.locationType,
|
locationType: baocunitem.locationType,
|
||||||
locations: this.formdata.locations,
|
locations: baocunitem.locations,
|
||||||
locationInfos: this.formdata.locationInfos,
|
locationInfos: baocunitem.locationInfos,
|
||||||
records: this.formdata.records,
|
records: baocunitem.records,
|
||||||
recordInfos: this.formdata.recordInfos,
|
recordInfos: baocunitem.recordInfos,
|
||||||
materialActivityFiles: this.formdata.materialActivityFiles,
|
materialActivityFiles: baocunitem.materialActivityFiles,
|
||||||
attachmentType: this.formdata.attachmentType,
|
attachmentType: baocunitem.attachmentType,
|
||||||
attachmentName: this.formdata.attachmentName,
|
attachmentName: baocunitem.attachmentName,
|
||||||
buildingName: this.formdata.buildingName,
|
buildingName: baocunitem.buildingName,
|
||||||
buildingMap: this.formdata.buildingMap,
|
buildingMap: baocunitem.buildingMap,
|
||||||
standardCommonIssues: this.formdata.standardCommonIssues,
|
standardCommonIssues: baocunitem.standardCommonIssues,
|
||||||
companyMap: this.formdata.companyMap,
|
companyMap: baocunitem.companyMap,
|
||||||
regulatoryCompanyMap: this.formdata.regulatoryCompanyMap,
|
regulatoryCompanyMap: baocunitem.regulatoryCompanyMap,
|
||||||
issueTypeMap: this.formdata.issueTypeMap,
|
issueTypeMap: baocunitem.issueTypeMap,
|
||||||
checkResultTypeMap: this.formdata.checkResultTypeMap,
|
checkResultTypeMap: baocunitem.checkResultTypeMap,
|
||||||
logs: this.formdata.logs,
|
logs: baocunitem.logs,
|
||||||
phaseTypes: this.formdata.phaseTypes,
|
phaseTypes: baocunitem.phaseTypes,
|
||||||
syncTime: this.formdata.syncTime,
|
syncTime: baocunitem.syncTime,
|
||||||
syncTimestamp: this.formdata.syncTimestamp,
|
syncTimestamp: baocunitem.syncTimestamp,
|
||||||
imgUrlbase64list: this.formdata.imgUrlbase64list,
|
imgUrlbase64list: baocunitem.imgUrlbase64list,
|
||||||
voiceUrllist: this.formdata.voiceUrllist,
|
voiceUrllist: baocunitem.voiceUrllist,
|
||||||
padstatus: this.formdata.padstatus,
|
padstatus: baocunitem.padstatus,
|
||||||
}
|
}
|
||||||
if (this.formdata.padstatus = '3') {
|
if (baocunitem.padstatus = '3') {
|
||||||
//padstatus 0--没有tableLevel4Id 1--有tableLevel4Id 2--需要新增的 3--需要修改的 4--删除的
|
//padstatus 0--没有tableLevel4Id 1--有tableLevel4Id 2--需要新增的 3--需要修改的 4--删除的
|
||||||
updata.uuid = this.formdata.uuid;
|
updata.uuid = baocunitem.uuid;
|
||||||
console.log('马上更新11111:', updata);
|
console.log('马上更新11111:', updata);
|
||||||
|
|
||||||
let xinzneg = await this.$dbUtils.upnewdateSQL('xiaofangdb', 'projectxianchangtable', updata, 'uuid', this
|
let xinzneg = await this.$dbUtils.upnewdateSQL('xiaofangdb', 'projectxianchangtable', updata, 'uuid',
|
||||||
.formdata
|
baocunitem.uuid);
|
||||||
.uuid);
|
|
||||||
if (xinzneg) {
|
if (xinzneg) {
|
||||||
this.$modal.msgSuccess("保存成功!")
|
this.$modal.msgSuccess("保存成功!")
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError("保存失败!")
|
this.$modal.msgError("保存失败!")
|
||||||
}
|
}
|
||||||
console.log('更新结果:', xinzneg, this
|
console.log('更新结果:', xinzneg, baocunitem.uuid);
|
||||||
.formdata
|
|
||||||
.uuid);
|
|
||||||
} else {
|
} else {
|
||||||
console.log('马上新增11111:', updata);
|
console.log('马上新增11111:', updata);
|
||||||
|
|
||||||
|
|
@ -3933,46 +3967,22 @@
|
||||||
} else {
|
} else {
|
||||||
this.$modal.msgError("保存失败!")
|
this.$modal.msgError("保存失败!")
|
||||||
}
|
}
|
||||||
console.log('新增结果:', xinzneg, this
|
console.log('新增结果:', xinzneg, baocunitem.uuid);
|
||||||
.formdata
|
|
||||||
.uuid);
|
|
||||||
}
|
}
|
||||||
this.addinfo(); //保存并添加
|
this.resetformdata(); //重置保存添加
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
async addinfo() {
|
|
||||||
|
|
||||||
|
async resetformdata() {
|
||||||
//重置保存添加
|
//重置保存添加
|
||||||
this.jzwlist = JSON.parse(this.objitem.buildingMap) || [];
|
console.log("sdfds", this.formdata)
|
||||||
this.locationslist = JSON.parse(this.objitem.locations) || [];
|
// return
|
||||||
this.standardCommonIssueslist = JSON.parse(this.objitem.standardCommonIssues) || [];
|
// materialActivityFiles
|
||||||
this.issueTypeMaplist = JSON.parse(this.objitem.issueTypeMap) || [];
|
|
||||||
this.companyMaplist = JSON.parse(this.objitem.companyMap) || [];
|
|
||||||
this.regulatoryCompanyMaplist = JSON.parse(this.objitem.regulatoryCompanyMap) || [];
|
|
||||||
// this.recordslist = JSON.parse(objitem.records) || [];
|
|
||||||
let recordsl = JSON.parse(this.objitem.records) || [];
|
|
||||||
for (let xx of recordsl) {
|
|
||||||
let info = xx.info;
|
|
||||||
let resultInfo = xx.resultInfo;
|
|
||||||
xx.infopadobj = this.parseStr(info, resultInfo);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
let httpurl = this.userStore.allurl;
|
|
||||||
this.formdata = JSON.parse(JSON.stringify(this.objitem));
|
|
||||||
this.formdata.records = recordsl;
|
|
||||||
this.formdata.checkPointids = this.locationslist.filter(item => item.selectFlag == true).map(item => item
|
|
||||||
.standardLocationId);
|
|
||||||
this.formdata.materialActivityFiles = JSON.parse(this.formdata.materialActivityFiles) || [];
|
|
||||||
// if (this.formdata.imgUrl) {
|
|
||||||
// this.imgfileList1 = JSON.parse(this.formdata.imgUrlbase64list);
|
|
||||||
// }
|
|
||||||
// if (this.formdata.voiceUrl) {
|
|
||||||
// this.voiceUrlfileList1 = JSON.parse(this.formdata.voiceUrllist);
|
|
||||||
// }
|
|
||||||
this.imgfileList1 = [];
|
this.imgfileList1 = [];
|
||||||
this.voiceUrlfileList1 = [];
|
this.voiceUrlfileList1 = [];
|
||||||
|
this.formdata.voiceUrl = "";
|
||||||
this.formdata.tableLevel4Id = null;
|
this.formdata.tableLevel4Id = null;
|
||||||
this.formdata.tableLevel4Code = null;
|
this.formdata.tableLevel4Code = null;
|
||||||
this.fubiaoobj = null;
|
this.fubiaoobj = null;
|
||||||
|
|
@ -3981,9 +3991,23 @@
|
||||||
this.formdata.checkPointids = null;
|
this.formdata.checkPointids = null;
|
||||||
this.formdata.remark = null;
|
this.formdata.remark = null;
|
||||||
this.formdata.issue = null;
|
this.formdata.issue = null;
|
||||||
this.formdata.resultType = null;
|
this.formdata.resultType = "1";
|
||||||
this.formdata.checkPoint = null;
|
this.formdata.checkPoint = null;
|
||||||
if (this.formdata.attachmentType) {
|
let recordsl = this.formdata.records || [];
|
||||||
|
for (let xx of recordsl) {
|
||||||
|
let info = xx.info;
|
||||||
|
let resultInfo = xx.resultInfo;
|
||||||
|
xx.infopadobj = this.parseStr(info, resultInfo, false);
|
||||||
|
//infopadlist
|
||||||
|
}
|
||||||
|
this.formdata.records = recordsl;
|
||||||
|
if (this.formdata.materialActivityFiles) {
|
||||||
|
for (let xxx of this.formdata.materialActivityFiles) {
|
||||||
|
xxx.resultType = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.formdata.attachmentType !== '0') {
|
||||||
this.fubiaoobj = {
|
this.fubiaoobj = {
|
||||||
typeid: this.formdata.attachmentType,
|
typeid: this.formdata.attachmentType,
|
||||||
name: this.formdata.attachmentName,
|
name: this.formdata.attachmentName,
|
||||||
|
|
@ -4008,7 +4032,12 @@
|
||||||
console.log('456654645', this.fubiaoobj);
|
console.log('456654645', this.fubiaoobj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log('dddd', this.formdata)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -288,6 +288,54 @@
|
||||||
hideKeyboard() {
|
hideKeyboard() {
|
||||||
uni.hideKeyboard()
|
uni.hideKeyboard()
|
||||||
},
|
},
|
||||||
|
parseStr(str, resultInfo = "", showval = true) {
|
||||||
|
//str--字符串 resultInfo--值 showval--是否清空值(保存并添加时用的)
|
||||||
|
const regex = /\{(\d+)\}/g;
|
||||||
|
const matches = [];
|
||||||
|
let match;
|
||||||
|
|
||||||
|
// 提取所有{数字}的位置和值
|
||||||
|
while ((match = regex.exec(str)) !== null) {
|
||||||
|
matches.push({
|
||||||
|
number: match[1],
|
||||||
|
start: match.index,
|
||||||
|
end: regex.lastIndex
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 无占位符的情况
|
||||||
|
if (matches.length === 0) {
|
||||||
|
return {
|
||||||
|
name: str,
|
||||||
|
list: []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提取最后一个占位符后的单位
|
||||||
|
const lastMatch = matches[matches.length - 1];
|
||||||
|
const dw = str.substring(lastMatch.end).trim();
|
||||||
|
|
||||||
|
// 构建name部分(去除所有占位符)
|
||||||
|
const namePart = str
|
||||||
|
.substring(0, lastMatch.start)
|
||||||
|
.replace(regex, '')
|
||||||
|
.trim();
|
||||||
|
|
||||||
|
// 解析resultInfo
|
||||||
|
const values = resultInfo.split(',').map(v => v.trim());
|
||||||
|
|
||||||
|
// 构建list数组
|
||||||
|
const list = matches.map((match, index) => ({
|
||||||
|
value: showval ? index < values.length ? values[index] : '' : '',
|
||||||
|
maxvalue: parseInt(match.number, 10),
|
||||||
|
dw: index === matches.length - 1 ? dw : ''
|
||||||
|
}));
|
||||||
|
|
||||||
|
return {
|
||||||
|
label: namePart,
|
||||||
|
list
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
async getinfo() {
|
async getinfo() {
|
||||||
//获取详情
|
//获取详情
|
||||||
|
|
@ -334,15 +382,13 @@
|
||||||
// this.recordslist = JSON.parse(objitem.records) || [];
|
// this.recordslist = JSON.parse(objitem.records) || [];
|
||||||
let recordsl = JSON.parse(objitem.records) || [];
|
let recordsl = JSON.parse(objitem.records) || [];
|
||||||
for (let xx of recordsl) {
|
for (let xx of recordsl) {
|
||||||
let titlestr = xx.info;
|
let info = xx.info;
|
||||||
let [labelPart, valuePart] = titlestr.split('{');
|
let resultInfo = xx.resultInfo;
|
||||||
let maxvalue = parseInt(valuePart.replace('}', ''), 10);
|
xx.infopadobj = this.parseStr(info, resultInfo);
|
||||||
xx.label = labelPart;
|
//infopadlist
|
||||||
xx.maxvalue = maxvalue;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let httpurl = this.userStore.allurl;
|
let httpurl = this.userStore.allurl;
|
||||||
this.formdata = objitem;
|
this.formdata = objitem;
|
||||||
this.formdata.records = recordsl;
|
this.formdata.records = recordsl;
|
||||||
|
|
|
||||||
|
|
@ -76,8 +76,9 @@
|
||||||
<view style="color: #ca4341; margin-right:5px;"></view>
|
<view style="color: #ca4341; margin-right:5px;"></view>
|
||||||
<view> 问题描述:</view>
|
<view> 问题描述:</view>
|
||||||
</view>
|
</view>
|
||||||
<csr-uni-data-select :multiple="false" :filterable="false" v-model="formdata.issue" placeholder="选择问题描述"
|
<csr-uni-data-select :multiple="false" :filterable="false" v-model="formdata.issue" :allowCreate="true"
|
||||||
dataKey="issue" dataValue="issue" :localdata="standardCommonIssueslist" :clear="false"
|
:placeholder="formdata.issue||'选择问题描述'" dataKey="issue" dataValue="issue"
|
||||||
|
:localdata="standardCommonIssueslist" :clear="false"
|
||||||
@change="standardCommonIssuechange"></csr-uni-data-select>
|
@change="standardCommonIssuechange"></csr-uni-data-select>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -339,6 +340,54 @@
|
||||||
hideKeyboard() {
|
hideKeyboard() {
|
||||||
uni.hideKeyboard()
|
uni.hideKeyboard()
|
||||||
},
|
},
|
||||||
|
parseStr(str, resultInfo = "", showval = true) {
|
||||||
|
//str--字符串 resultInfo--值 showval--是否清空值(保存并添加时用的)
|
||||||
|
const regex = /\{(\d+)\}/g;
|
||||||
|
const matches = [];
|
||||||
|
let match;
|
||||||
|
|
||||||
|
// 提取所有{数字}的位置和值
|
||||||
|
while ((match = regex.exec(str)) !== null) {
|
||||||
|
matches.push({
|
||||||
|
number: match[1],
|
||||||
|
start: match.index,
|
||||||
|
end: regex.lastIndex
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 无占位符的情况
|
||||||
|
if (matches.length === 0) {
|
||||||
|
return {
|
||||||
|
name: str,
|
||||||
|
list: []
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提取最后一个占位符后的单位
|
||||||
|
const lastMatch = matches[matches.length - 1];
|
||||||
|
const dw = str.substring(lastMatch.end).trim();
|
||||||
|
|
||||||
|
// 构建name部分(去除所有占位符)
|
||||||
|
const namePart = str
|
||||||
|
.substring(0, lastMatch.start)
|
||||||
|
.replace(regex, '')
|
||||||
|
.trim();
|
||||||
|
|
||||||
|
// 解析resultInfo
|
||||||
|
const values = resultInfo.split(',').map(v => v.trim());
|
||||||
|
|
||||||
|
// 构建list数组
|
||||||
|
const list = matches.map((match, index) => ({
|
||||||
|
value: showval ? index < values.length ? values[index] : '' : '',
|
||||||
|
maxvalue: parseInt(match.number, 10),
|
||||||
|
dw: index === matches.length - 1 ? dw : ''
|
||||||
|
}));
|
||||||
|
|
||||||
|
return {
|
||||||
|
label: namePart,
|
||||||
|
list
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
async getinfo() {
|
async getinfo() {
|
||||||
//获取详情
|
//获取详情
|
||||||
|
|
@ -368,21 +417,16 @@
|
||||||
this.companyMaplist = JSON.parse(objitem.companyMap) || [];
|
this.companyMaplist = JSON.parse(objitem.companyMap) || [];
|
||||||
this.regulatoryCompanyMaplist = JSON.parse(objitem.regulatoryCompanyMap) || [];
|
this.regulatoryCompanyMaplist = JSON.parse(objitem.regulatoryCompanyMap) || [];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// this.recordslist = JSON.parse(objitem.records) || [];
|
// this.recordslist = JSON.parse(objitem.records) || [];
|
||||||
let recordsl = JSON.parse(objitem.records) || [];
|
let recordsl = JSON.parse(objitem.records) || [];
|
||||||
for (let xx of recordsl) {
|
for (let xx of recordsl) {
|
||||||
let titlestr = xx.info;
|
let info = xx.info;
|
||||||
let [labelPart, valuePart] = titlestr.split('{');
|
let resultInfo = xx.resultInfo;
|
||||||
let maxvalue = parseInt(valuePart.replace('}', ''), 10);
|
xx.infopadobj = this.parseStr(info, resultInfo);
|
||||||
xx.label = labelPart;
|
//infopadlist
|
||||||
xx.maxvalue = maxvalue;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let httpurl = this.userStore.allurl;
|
let httpurl = this.userStore.allurl;
|
||||||
this.formdata = objitem;
|
this.formdata = objitem;
|
||||||
this.formdata.records = recordsl;
|
this.formdata.records = recordsl;
|
||||||
|
|
@ -485,10 +529,10 @@
|
||||||
// }
|
// }
|
||||||
|
|
||||||
this.formdata.imgUrl = this.imgfileList1.toString();
|
this.formdata.imgUrl = this.imgfileList1.toString();
|
||||||
if (this.formdata.materialActivityFiles) {
|
if (this.formdata.materialActivityFiles && typeof this.formdata.materialActivityFiles !== "string") {
|
||||||
this.formdata.materialActivityFiles = JSON.stringify(this.formdata.materialActivityFiles)
|
this.formdata.materialActivityFiles = JSON.stringify(this.formdata.materialActivityFiles)
|
||||||
}
|
}
|
||||||
if (this.formdata.records) {
|
if (this.formdata.records && typeof this.formdata.records !== "string") {
|
||||||
this.formdata.records = JSON.stringify(this.formdata.records)
|
this.formdata.records = JSON.stringify(this.formdata.records)
|
||||||
}
|
}
|
||||||
let updata = {
|
let updata = {
|
||||||
|
|
|
||||||
|
|
@ -238,8 +238,8 @@
|
||||||
<u-modal content="" :closeOnClickOverlay="true" title="复查发现新问题" :showConfirmButton="false" :showCancelButton="false"
|
<u-modal content="" :closeOnClickOverlay="true" title="复查发现新问题" :showConfirmButton="false" :showCancelButton="false"
|
||||||
cancelText="取消" confirmText="保存" width="850px" :show="fuchaxwtshow" confirmColor="#42b983" cancelColor="#ca4341">
|
cancelText="取消" confirmText="保存" width="850px" :show="fuchaxwtshow" confirmColor="#42b983" cancelColor="#ca4341">
|
||||||
<view class="slot-content">
|
<view class="slot-content">
|
||||||
<scroll-view scroll-y="true" style="height:500px;">
|
<scroll-view scroll-y="true" style="width:800px;height:500px;">
|
||||||
<view style="display: flex; flex-direction: column;align-items: left; border-top:1px solid #eee;">
|
<view style="width:100%;display: flex; flex-direction: column;align-items: left; border-top:1px solid #eee;">
|
||||||
<FuchaxwtEditnr style="width:97%;" :objitem="rowitem" :sjnum="sjnum" @tkeventclose="closefuchaxwt"
|
<FuchaxwtEditnr style="width:97%;" :objitem="rowitem" :sjnum="sjnum" @tkeventclose="closefuchaxwt"
|
||||||
@shaunxian="getlistinfo()" />
|
@shaunxian="getlistinfo()" />
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -250,8 +250,8 @@
|
||||||
<u-modal content="" :closeOnClickOverlay="true" title="复查" :showConfirmButton="false" :showCancelButton="false"
|
<u-modal content="" :closeOnClickOverlay="true" title="复查" :showConfirmButton="false" :showCancelButton="false"
|
||||||
cancelText="取消" confirmText="保存" width="850px" :show="fuchashow" confirmColor="#42b983" cancelColor="#ca4341">
|
cancelText="取消" confirmText="保存" width="850px" :show="fuchashow" confirmColor="#42b983" cancelColor="#ca4341">
|
||||||
<view class="slot-content">
|
<view class="slot-content">
|
||||||
<scroll-view scroll-y="true" style="height:500px;">
|
<scroll-view scroll-y="true" style="width:800px; height:500px;">
|
||||||
<view style="display: flex; flex-direction: column;align-items: left; border-top:1px solid #eee;">
|
<view style="width:100%;display: flex; flex-direction: column;align-items: left; border-top:1px solid #eee;">
|
||||||
<FuchaEditnr style="width:97%;" :objitem="rowitem" :sjnum="sjnum" @tkeventclose="closefucha"
|
<FuchaEditnr style="width:97%;" :objitem="rowitem" :sjnum="sjnum" @tkeventclose="closefucha"
|
||||||
@shaunxian="getlistinfo()" />
|
@shaunxian="getlistinfo()" />
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -286,7 +286,7 @@
|
||||||
</u-modal>
|
</u-modal>
|
||||||
<UniMenu />
|
<UniMenu />
|
||||||
<!-- color="#2f7d09" textColor="#2f7d09" -->
|
<!-- color="#2f7d09" textColor="#2f7d09" -->
|
||||||
<zero-loading v-if="shujuStore.pageloading" :maskOpacity="0.3" color="#c41818" textColor="#c41818" :mask="true"
|
<zero-loading v-if="shujuStore.pageloading" :maskOpacity="0.5" color="#c41818" textColor="#c41818" :mask="true"
|
||||||
:showText="true" :text="shujuStore.pageloadingtext" type="wobble"></zero-loading>
|
:showText="true" :text="shujuStore.pageloadingtext" type="wobble"></zero-loading>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,15 @@
|
||||||
<view class="uni-popper__arrow"></view>
|
<view class="uni-popper__arrow"></view>
|
||||||
<scroll-view scroll-y="true" class="uni-select__selector-scroll">
|
<scroll-view scroll-y="true" class="uni-select__selector-scroll">
|
||||||
<view class="uni-select__selector-empty" v-if="filterMixinDatacomResData.length === 0">
|
<view class="uni-select__selector-empty" v-if="filterMixinDatacomResData.length === 0">
|
||||||
|
<view v-if="!allowCreate">
|
||||||
<span>{{emptyTips}}</span>
|
<span>{{emptyTips}}</span>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-else>
|
||||||
|
|
||||||
|
<span v-if="!filterInput">{{emptyTips}}</span>
|
||||||
|
<span v-else @click="changexz(filterInput)">{{filterInput}}</span>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view v-else :class="['uni-select__selector-item', {'uni-select_selector-item_active' :multiple
|
<view v-else :class="['uni-select__selector-item', {'uni-select_selector-item_active' :multiple
|
||||||
&& currentArr.includes(item[dataValue])}]"
|
&& currentArr.includes(item[dataValue])}]"
|
||||||
style="display: flex;justify-content: space-between;align-items: center;"
|
style="display: flex;justify-content: space-between;align-items: center;"
|
||||||
|
|
@ -72,6 +79,9 @@
|
||||||
* @property {String} placeholder 输入框的提示文字
|
* @property {String} placeholder 输入框的提示文字
|
||||||
* @property {Boolean} disabled 是否禁用
|
* @property {Boolean} disabled 是否禁用
|
||||||
* @event {Function} change 选中发生变化触发
|
* @event {Function} change 选中发生变化触发
|
||||||
|
* @event {Boolean} allowCreate 是否显示新增
|
||||||
|
*
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
@ -102,6 +112,10 @@
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
|
allowCreate: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
localdata: {
|
localdata: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default () {
|
default () {
|
||||||
|
|
@ -373,8 +387,16 @@
|
||||||
} else {
|
} else {
|
||||||
// console.log('1sdfs7', this.current, this.modelValue)
|
// console.log('1sdfs7', this.current, this.modelValue)
|
||||||
// const def = this.mixinDatacomResData.find(item => item[this.dataValue] === defValue)
|
// const def = this.mixinDatacomResData.find(item => item[this.dataValue] === defValue)
|
||||||
const def = this.mixinDatacomResData.find(item => item[this.dataValue] == defValue)
|
// console.log('1sdfs8', this.current, this.modelValue)
|
||||||
this.current = def ? this.formatItemName(def) : ''
|
// console.log('1sdfs7', defValue)
|
||||||
|
|
||||||
|
let def = this.mixinDatacomResData.find(item => item[this.dataValue] == this.modelValue)
|
||||||
|
if (this.modelValue === '') {
|
||||||
|
def = null
|
||||||
|
}
|
||||||
|
// console.log('1sdfs910', def, defValue, this.mixinDatacomResData)
|
||||||
|
this.current = def ? this.formatItemName(def) : '';
|
||||||
|
// console.log('1sdfs9', this.current, this.modelValue)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|
@ -448,6 +470,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
changexz(val) {
|
||||||
|
//新增
|
||||||
|
console.error('sdsd', val)
|
||||||
|
this.$emit('update:modelValue', val)
|
||||||
|
this.$emit('input', val)
|
||||||
|
this.showSelector = false
|
||||||
|
},
|
||||||
delItem(item) {
|
delItem(item) {
|
||||||
if (this.disabled) {
|
if (this.disabled) {
|
||||||
return
|
return
|
||||||
|
|
@ -474,8 +503,15 @@
|
||||||
this.$emit('update:modelValue', val)
|
this.$emit('update:modelValue', val)
|
||||||
const current = this.mixinDatacomResData.find(item => val == item[this.dataValue])
|
const current = this.mixinDatacomResData.find(item => val == item[this.dataValue])
|
||||||
console.log(current);
|
console.log(current);
|
||||||
|
if (current == undefined || current == null) {
|
||||||
|
let xxobj = {};
|
||||||
|
xxobj[this.dataValue] = this.filterInput;
|
||||||
|
this.$emit('change', xxobj)
|
||||||
|
} else {
|
||||||
this.$emit('change', current)
|
this.$emit('change', current)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
if (this.collection) {
|
if (this.collection) {
|
||||||
this.setCache(val);
|
this.setCache(val);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -403,7 +403,7 @@ async function processDeleteData(deleteDataList, results) {
|
||||||
|
|
||||||
for (const item of deleteDataList) {
|
for (const item of deleteDataList) {
|
||||||
try {
|
try {
|
||||||
const deleteResult = await callDeleteServerApi(item.uuid);
|
const deleteResult = await callDeleteServerApi(item.tableLevel4Id);
|
||||||
|
|
||||||
if (deleteResult.success) {
|
if (deleteResult.success) {
|
||||||
await deleteLocalData(item.uuid, 'projectxianchangtable');
|
await deleteLocalData(item.uuid, 'projectxianchangtable');
|
||||||
|
|
@ -604,9 +604,16 @@ async function callUpdateServerApi(data) {
|
||||||
'Bearerauth': `Bearer ${getToken()}`
|
'Bearerauth': `Bearer ${getToken()}`
|
||||||
},
|
},
|
||||||
success: async (res) => {
|
success: async (res) => {
|
||||||
// console.error('批量处理4:', res);
|
// console.error('批量处理44444:', res);
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
|
|
||||||
|
resolve({
|
||||||
|
success: true,
|
||||||
|
data: res.data.data
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if (res.data.msg == "已被删除,无法更新") {
|
||||||
resolve({
|
resolve({
|
||||||
success: true,
|
success: true,
|
||||||
data: res.data.data
|
data: res.data.data
|
||||||
|
|
@ -617,6 +624,8 @@ async function callUpdateServerApi(data) {
|
||||||
message: res.data.msg || '更新失败'
|
message: res.data.msg || '更新失败'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
},
|
},
|
||||||
fail: (error) => {
|
fail: (error) => {
|
||||||
reject(new Error(`更新请求失败: ${error.errMsg}`));
|
reject(new Error(`更新请求失败: ${error.errMsg}`));
|
||||||
|
|
@ -640,16 +649,28 @@ async function callDeleteServerApi(id) {
|
||||||
},
|
},
|
||||||
|
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
|
console.log("删除接口", res)
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
resolve({
|
resolve({
|
||||||
success: true,
|
success: true,
|
||||||
data: res.data.data
|
data: res.data.data
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
if (res.data.msg == "Index 0 out of bounds for length 0") {
|
||||||
|
resolve({
|
||||||
|
success: true,
|
||||||
|
data: res.data.data
|
||||||
|
});
|
||||||
|
} else {
|
||||||
resolve({
|
resolve({
|
||||||
success: false,
|
success: false,
|
||||||
message: res.data.msg || '删除失败'
|
message: res.data.msg || '删除失败'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail: (error) => {
|
fail: (error) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue