|
@@ -136,7 +136,10 @@
|
|
formData: {
|
|
formData: {
|
|
status: '0',
|
|
status: '0',
|
|
File: [],
|
|
File: [],
|
|
- detresult: {id:null,name:null}
|
|
|
|
|
|
+ detresult: {
|
|
|
|
+ id: null,
|
|
|
|
+ name: null
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 自定义表单校验规则
|
|
// 自定义表单校验规则
|
|
customRules: {
|
|
customRules: {
|
|
@@ -173,25 +176,25 @@
|
|
// this.wheight = data.height
|
|
// this.wheight = data.height
|
|
// }).exec()
|
|
// }).exec()
|
|
const query = uni.createSelectorQuery().in(this)
|
|
const query = uni.createSelectorQuery().in(this)
|
|
- console.log('query',query);
|
|
|
|
|
|
+ // console.log('query',query);
|
|
const thisNode = query.select('.heigthButton')
|
|
const thisNode = query.select('.heigthButton')
|
|
- console.log('thisNode',thisNode);
|
|
|
|
|
|
+ // console.log('thisNode',thisNode);
|
|
thisNode.boundingClientRect(data => {
|
|
thisNode.boundingClientRect(data => {
|
|
- console.log('data',data);
|
|
|
|
|
|
+ // console.log('data',data);
|
|
this.wheight = data.height
|
|
this.wheight = data.height
|
|
}).exec()
|
|
}).exec()
|
|
},
|
|
},
|
|
// 在 vue页面,向起始页通过事件传递数据
|
|
// 在 vue页面,向起始页通过事件传递数据
|
|
// 在 vue页面,向起始页通过事件传递数据
|
|
// 在 vue页面,向起始页通过事件传递数据
|
|
onLoad: function(option) {
|
|
onLoad: function(option) {
|
|
- console.log('op', option);
|
|
|
|
|
|
+ // console.log('op', option);
|
|
this.actions2.map(i => {
|
|
this.actions2.map(i => {
|
|
i.name = i.label;
|
|
i.name = i.label;
|
|
i.id = i.value;
|
|
i.id = i.value;
|
|
});
|
|
});
|
|
//获取当前表单数据
|
|
//获取当前表单数据
|
|
getFpdDetection(option.id).then(res => {
|
|
getFpdDetection(option.id).then(res => {
|
|
- console.log('thisform', res);
|
|
|
|
|
|
+ // console.log('thisform', res);
|
|
//对检测结果进行初始化
|
|
//对检测结果进行初始化
|
|
const reArr = getDictDatas(DICT_TYPE.BACKEND_DET_RESULT)
|
|
const reArr = getDictDatas(DICT_TYPE.BACKEND_DET_RESULT)
|
|
// console.log('reArr',reArr);
|
|
// console.log('reArr',reArr);
|
|
@@ -207,6 +210,11 @@
|
|
|
|
|
|
|
|
|
|
this.formData = res.data
|
|
this.formData = res.data
|
|
|
|
+ if (this.formData.detinspect) {
|
|
|
|
+
|
|
|
|
+ const nowArr = this.formData.detinspect.split(',')
|
|
|
|
+ this.checkArr = [...nowArr]
|
|
|
|
+ }
|
|
var File = this.formData.File = []
|
|
var File = this.formData.File = []
|
|
if (this.formData.att != '') {
|
|
if (this.formData.att != '') {
|
|
File.push({
|
|
File.push({
|
|
@@ -222,7 +230,7 @@
|
|
pageSize: this.pageSize,
|
|
pageSize: this.pageSize,
|
|
userId: this.$store.state.user.id
|
|
userId: this.$store.state.user.id
|
|
}).then(response => {
|
|
}).then(response => {
|
|
- console.log(response, 'response');
|
|
|
|
|
|
+ // console.log(response, 'response');
|
|
// 取到用户对应的单位名称与id
|
|
// 取到用户对应的单位名称与id
|
|
response.data.forEach(v => {
|
|
response.data.forEach(v => {
|
|
if (this.formData.orgId === v.dwid) {
|
|
if (this.formData.orgId === v.dwid) {
|
|
@@ -230,7 +238,7 @@
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
});
|
|
- console.log('edit页面的val的值', this.formData);
|
|
|
|
|
|
+ // console.log('edit页面的val的值', this.formData);
|
|
})
|
|
})
|
|
// const navData = JSON.parse(option.navData)
|
|
// const navData = JSON.parse(option.navData)
|
|
// console.log('navdata', navData);
|
|
// console.log('navdata', navData);
|
|
@@ -252,7 +260,7 @@
|
|
pageSize: this.pageSize,
|
|
pageSize: this.pageSize,
|
|
userId: this.$store.state.user.id
|
|
userId: this.$store.state.user.id
|
|
}).then(response => {
|
|
}).then(response => {
|
|
- console.log(response, 'response');
|
|
|
|
|
|
+ // console.log(response, 'response');
|
|
// 取到用户对应的单位名称与id
|
|
// 取到用户对应的单位名称与id
|
|
response.data.map(v => {
|
|
response.data.map(v => {
|
|
this.actions5.push({
|
|
this.actions5.push({
|
|
@@ -272,7 +280,7 @@
|
|
this.resultOptions = [...trueArr]
|
|
this.resultOptions = [...trueArr]
|
|
//初始化检测项目选项
|
|
//初始化检测项目选项
|
|
const trueArr1 = []
|
|
const trueArr1 = []
|
|
- console.log('detinspectOptions', this.detinspectOptions);
|
|
|
|
|
|
+ // console.log('detinspectOptions', this.detinspectOptions);
|
|
this.detinspectOptions.forEach(item => {
|
|
this.detinspectOptions.forEach(item => {
|
|
trueArr1.push({
|
|
trueArr1.push({
|
|
id: item.value,
|
|
id: item.value,
|
|
@@ -287,7 +295,7 @@
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
submit(ref) {
|
|
submit(ref) {
|
|
- console.log(this.formData, 'alertalertalert');
|
|
|
|
|
|
+ // console.log(this.formData, 'alertalertalert');
|
|
// if (!this.formData.orgName) {
|
|
// if (!this.formData.orgName) {
|
|
// return this.$modal.msgError('请选择所属单位')
|
|
// return this.$modal.msgError('请选择所属单位')
|
|
// }
|
|
// }
|
|
@@ -298,7 +306,7 @@
|
|
.validate()
|
|
.validate()
|
|
.then(res => {
|
|
.then(res => {
|
|
this.formData['status'] = 0;
|
|
this.formData['status'] = 0;
|
|
- console.log(this.formData);
|
|
|
|
|
|
+ // console.log(this.formData);
|
|
// if (this.formData.File.length > 0) {
|
|
// if (this.formData.File.length > 0) {
|
|
// this.formData.attId = this.formData.File[0].url.toString();
|
|
// this.formData.attId = this.formData.File[0].url.toString();
|
|
// } else {
|
|
// } else {
|
|
@@ -307,17 +315,17 @@
|
|
//对提交的数据进行处理
|
|
//对提交的数据进行处理
|
|
this.$set(this.formData, 'detresult', this.formData.detresult.id)
|
|
this.$set(this.formData, 'detresult', this.formData.detresult.id)
|
|
var jsdata = JSON.stringify(this.formData);
|
|
var jsdata = JSON.stringify(this.formData);
|
|
- console.log(jsdata, 'jsdatajsdatajsdata');
|
|
|
|
|
|
+ // console.log(jsdata, 'jsdatajsdatajsdata');
|
|
updateFpdDetection(jsdata).then(response => {
|
|
updateFpdDetection(jsdata).then(response => {
|
|
- console.log('response.data.msg,', response.data);
|
|
|
|
|
|
+ // console.log('response.data.msg,', response.data);
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
title: response.data.msg
|
|
title: response.data.msg
|
|
});
|
|
});
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
- console.log('修改成功!');
|
|
|
|
|
|
+ // console.log('修改成功!');
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
uni.navigateBack({
|
|
uni.navigateBack({
|
|
- delta: 1
|
|
|
|
|
|
+ delta: 2
|
|
})
|
|
})
|
|
// uni.navigateTo({
|
|
// uni.navigateTo({
|
|
// url: '/pagesA/fire/fpd_detection/detection_details/detection_details?id='+this.formData.id
|
|
// url: '/pagesA/fire/fpd_detection/detection_details/detection_details?id='+this.formData.id
|
|
@@ -356,7 +364,7 @@
|
|
Authorization: 'Bearer ' + getAccessToken()
|
|
Authorization: 'Bearer ' + getAccessToken()
|
|
}, //请求token
|
|
}, //请求token
|
|
success: res => {
|
|
success: res => {
|
|
- console.log('res', res);
|
|
|
|
|
|
+ // console.log('res', res);
|
|
let data = JSON.parse(res.data);
|
|
let data = JSON.parse(res.data);
|
|
// 返回的url
|
|
// 返回的url
|
|
var fileLink = data.data;
|
|
var fileLink = data.data;
|
|
@@ -377,7 +385,7 @@
|
|
|
|
|
|
},
|
|
},
|
|
fail: () => {
|
|
fail: () => {
|
|
- console.log('err');
|
|
|
|
|
|
+ // console.log('err');
|
|
uni.showToast({
|
|
uni.showToast({
|
|
icon: 'error',
|
|
icon: 'error',
|
|
title: '文件上传失败!'
|
|
title: '文件上传失败!'
|
|
@@ -387,13 +395,13 @@
|
|
},
|
|
},
|
|
// 移出图片函数
|
|
// 移出图片函数
|
|
async deleteFile(e) {
|
|
async deleteFile(e) {
|
|
- console.log(e);
|
|
|
|
|
|
+ // console.log(e);
|
|
this.formData.attId = [];
|
|
this.formData.attId = [];
|
|
- console.log('移除了:', this.formData.attId);
|
|
|
|
|
|
+ // console.log('移除了:', this.formData.attId);
|
|
},
|
|
},
|
|
//检测项目多选框选中
|
|
//检测项目多选框选中
|
|
checkboxChange2(arr) { //勾选的事件
|
|
checkboxChange2(arr) { //勾选的事件
|
|
- console.log('arr', arr);
|
|
|
|
|
|
+ // console.log('arr', arr);
|
|
this.checkArr = [...arr]
|
|
this.checkArr = [...arr]
|
|
|
|
|
|
},
|
|
},
|
|
@@ -419,17 +427,17 @@
|
|
},
|
|
},
|
|
|
|
|
|
changetime(e) {
|
|
changetime(e) {
|
|
- console.log('change', e);
|
|
|
|
|
|
+ // console.log('change', e);
|
|
},
|
|
},
|
|
// 所属单位
|
|
// 所属单位
|
|
sexSelect5(e) {
|
|
sexSelect5(e) {
|
|
this.formData.orgId = e.id;
|
|
this.formData.orgId = e.id;
|
|
this.formData.orgName = e.name;
|
|
this.formData.orgName = e.name;
|
|
- console.log(this.formData.orgId);
|
|
|
|
|
|
+ // console.log(this.formData.orgId);
|
|
},
|
|
},
|
|
// 检测维保结果select事件
|
|
// 检测维保结果select事件
|
|
setResult(e) {
|
|
setResult(e) {
|
|
- console.log('e', e);
|
|
|
|
|
|
+ // console.log('e', e);
|
|
// this.formData.detresult.id = e.id;
|
|
// this.formData.detresult.id = e.id;
|
|
// this.formData.detresult.name = e.name;
|
|
// this.formData.detresult.name = e.name;
|
|
this.$set(this.formData, 'detresult', {
|
|
this.$set(this.formData, 'detresult', {
|
|
@@ -441,7 +449,7 @@
|
|
},
|
|
},
|
|
// 检测检测项目select事件
|
|
// 检测检测项目select事件
|
|
setInsp(e) {
|
|
setInsp(e) {
|
|
- console.log('e', e);
|
|
|
|
|
|
+ // console.log('e', e);
|
|
this.formData.detinspect = e.name;
|
|
this.formData.detinspect = e.name;
|
|
// this.formData.orgName = e.name;
|
|
// this.formData.orgName = e.name;
|
|
// console.log(this.formData.orgId);
|
|
// console.log(this.formData.orgId);
|