|
@@ -26,14 +26,14 @@
|
|
</u-form-item>
|
|
</u-form-item>
|
|
<u-form-item label="所属单位" @click="
|
|
<u-form-item label="所属单位" @click="
|
|
showSex5 = true;
|
|
showSex5 = true;
|
|
- hideKeyboard();" prop="orgId" :required="true">
|
|
|
|
- <u--input v-model="formData.orgId" disabled disabledColor="#ffffff"
|
|
|
|
|
|
+ hideKeyboard();" prop="orgName" :required="true">
|
|
|
|
+ <u--input v-model="formData.orgName" disabled disabledColor="#ffffff"
|
|
placeholder="请选择所属单位"></u--input>
|
|
placeholder="请选择所属单位"></u--input>
|
|
</u-form-item>
|
|
</u-form-item>
|
|
<u-form-item label="附件">
|
|
<u-form-item label="附件">
|
|
<!-- 选择文件上传 -->
|
|
<!-- 选择文件上传 -->
|
|
<uni-file-picker
|
|
<uni-file-picker
|
|
- v-model="formData.att"
|
|
|
|
|
|
+ v-model="formData.File"
|
|
del-icon
|
|
del-icon
|
|
limit="1"
|
|
limit="1"
|
|
auto-upload
|
|
auto-upload
|
|
@@ -56,24 +56,24 @@
|
|
<u-action-sheet :show="showreOption" :actions="resultOptions" title="请选择检测维保结果"
|
|
<u-action-sheet :show="showreOption" :actions="resultOptions" title="请选择检测维保结果"
|
|
@close="showreOption = false" @select="setResult"></u-action-sheet>
|
|
@close="showreOption = false" @select="setResult"></u-action-sheet>
|
|
<!-- 检测项目选项框 -->
|
|
<!-- 检测项目选项框 -->
|
|
-<!-- <u-action-sheet :show="showInspOption" :actions="detinspectOptions" title="请选择检测项目"
|
|
|
|
|
|
+ <!-- <u-action-sheet :show="showInspOption" :actions="detinspectOptions" title="请选择检测项目"
|
|
@close="showInspOption = false" @select="setInsp"></u-action-sheet> -->
|
|
@close="showInspOption = false" @select="setInsp"></u-action-sheet> -->
|
|
<!-- ----隐患 -->
|
|
<!-- ----隐患 -->
|
|
<u-popup :show="showInspOption" :round="10" @close="showInspOption=false">
|
|
<u-popup :show="showInspOption" :round="10" @close="showInspOption=false">
|
|
<view style="width: 70vw;overflow-y: auto;margin-bottom: 80rpx;padding:10px">
|
|
<view style="width: 70vw;overflow-y: auto;margin-bottom: 80rpx;padding:10px">
|
|
<text class="text-xl">选择隐患类型:</text>
|
|
<text class="text-xl">选择隐患类型:</text>
|
|
<view class="" class="person-forward">
|
|
<view class="" class="person-forward">
|
|
- <u-checkbox-group placement="column"
|
|
|
|
- v-model="checkArr" @change="checkboxChange2" activeColor="#4CB2B6"
|
|
|
|
- iconSize="red">
|
|
|
|
- <u-checkbox v-for="(items, indexs) in detinspectOptions" :key="indexs" :customStyle="{marginBottom: '60rpx'}" :label="items.name" :name="items.name">
|
|
|
|
|
|
+ <u-checkbox-group placement="column" v-model="checkArr" @change="checkboxChange2"
|
|
|
|
+ activeColor="#4CB2B6" iconSize="red">
|
|
|
|
+ <u-checkbox v-for="(items, indexs) in detinspectOptions" :key="indexs"
|
|
|
|
+ :customStyle="{marginBottom: '60rpx'}" :label="items.name" :name="items.name">
|
|
</u-checkbox>
|
|
</u-checkbox>
|
|
</u-checkbox-group>
|
|
</u-checkbox-group>
|
|
</view>
|
|
</view>
|
|
<view class="flex flex-direction-row "
|
|
<view class="flex flex-direction-row "
|
|
style="position: fixed;bottom: 10px;left: 50%;transform: translate(-50%);height: 100rpx;width: 80%">
|
|
style="position: fixed;bottom: 10px;left: 50%;transform: translate(-50%);height: 100rpx;width: 80%">
|
|
- <u-button shape="circle" type="primary" color="#4CB2B6" text="确定"
|
|
|
|
- @click="checkboxConfirm2()" customStyle="margin-right:20px;padding:0 30px">
|
|
|
|
|
|
+ <u-button shape="circle" type="primary" color="#4CB2B6" text="确定" @click="checkboxConfirm2()"
|
|
|
|
+ customStyle="margin-right:20px;padding:0 30px">
|
|
</u-button>
|
|
</u-button>
|
|
<u-button type="primary" plain color="#4CB2B6" text="取消" shape="circle"
|
|
<u-button type="primary" plain color="#4CB2B6" text="取消" shape="circle"
|
|
@click="checkboxCancel2()" customStyle="padding:0 30px">
|
|
@click="checkboxCancel2()" customStyle="padding:0 30px">
|
|
@@ -94,8 +94,8 @@
|
|
createFpdDetection, // 更新
|
|
createFpdDetection, // 更新
|
|
getOrgId,
|
|
getOrgId,
|
|
upload, //上传文件
|
|
upload, //上传文件
|
|
- getFpdDetection,//根据id拿数据
|
|
|
|
- updateFpdDetection//更新消防设备维护和检测台账
|
|
|
|
|
|
+ getFpdDetection, //根据id拿数据
|
|
|
|
+ updateFpdDetection //更新消防设备维护和检测台账
|
|
} from '@/api/fpdDetection/index.js';
|
|
} from '@/api/fpdDetection/index.js';
|
|
import {
|
|
import {
|
|
DICT_TYPE,
|
|
DICT_TYPE,
|
|
@@ -183,39 +183,30 @@
|
|
// 在 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=>{
|
|
|
|
- console.log('thisform',res);
|
|
|
|
- this.formData = res.data
|
|
|
|
- })
|
|
|
|
- // 在 vue页面,向起始页通过事件传递数据
|
|
|
|
- // var data = option.id;
|
|
|
|
- // that = this;
|
|
|
|
- // const eventChannel = this.getOpenerEventChannel();
|
|
|
|
- // eventChannel.on('acceptDataFromOpenedPage', function(val) {
|
|
|
|
- // that.formData = val;
|
|
|
|
- // console.log(val,'val33333333333');
|
|
|
|
- // var File = that.formData.File = []
|
|
|
|
- // if(that.formData.att !='' ){
|
|
|
|
- // File.push({
|
|
|
|
- // url: that.formData.att,
|
|
|
|
- // name: that.formData.att
|
|
|
|
- // });
|
|
|
|
- // }else{
|
|
|
|
- // File =null
|
|
|
|
- // }
|
|
|
|
- // console.log('edit页面的val的值', that.formData);
|
|
|
|
- // if(that.formData.drillType == 1){
|
|
|
|
- // that.formData.drillTypeName = '培训'
|
|
|
|
- // }else if(that.formData.drillType == 2){
|
|
|
|
- // that.formData.drillTypeName = '演练'
|
|
|
|
- // }
|
|
|
|
- // });
|
|
|
|
|
|
+ // getFpdDetection(option.id).then(res => {
|
|
|
|
+ // console.log('thisform', res);
|
|
|
|
+ // this.formData = res.data
|
|
|
|
+ // })
|
|
|
|
+ const navData = JSON.parse(option.navData)
|
|
|
|
+ console.log('navdata', navData);
|
|
|
|
+ this.formData = navData;
|
|
|
|
+ var File = this.formData.File = []
|
|
|
|
+ if (this.formData.att != '') {
|
|
|
|
+ File.push({
|
|
|
|
+ url: this.formData.att,
|
|
|
|
+ name: this.formData.att
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ File = null
|
|
|
|
+ }
|
|
|
|
+ console.log('edit页面的val的值', this.formData);
|
|
|
|
+
|
|
// 获取单位id
|
|
// 获取单位id
|
|
getOrgId({
|
|
getOrgId({
|
|
pageNo: this.pageNo,
|
|
pageNo: this.pageNo,
|
|
@@ -358,23 +349,23 @@
|
|
},
|
|
},
|
|
//检测项目多选框选中
|
|
//检测项目多选框选中
|
|
checkboxChange2(arr) { //勾选的事件
|
|
checkboxChange2(arr) { //勾选的事件
|
|
- console.log('arr',arr);
|
|
|
|
|
|
+ console.log('arr', arr);
|
|
this.checkArr = [...arr]
|
|
this.checkArr = [...arr]
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
- checkboxConfirm2(){
|
|
|
|
|
|
+ checkboxConfirm2() {
|
|
this.showInspOption = false
|
|
this.showInspOption = false
|
|
this.formData.detinspect = this.checkArr.join(',')
|
|
this.formData.detinspect = this.checkArr.join(',')
|
|
// console.log('detinspect',this.formData.detinspect);
|
|
// console.log('detinspect',this.formData.detinspect);
|
|
},
|
|
},
|
|
- checkboxCancel2(){
|
|
|
|
|
|
+ checkboxCancel2() {
|
|
this.showInspOption = false
|
|
this.showInspOption = false
|
|
- if(this.formData.detinspect){
|
|
|
|
-
|
|
|
|
- const nowArr = this.formData.detinspect.split(',')
|
|
|
|
- this.checkArr = [...nowArr]
|
|
|
|
|
|
+ if (this.formData.detinspect) {
|
|
|
|
+
|
|
|
|
+ const nowArr = this.formData.detinspect.split(',')
|
|
|
|
+ this.checkArr = [...nowArr]
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
// 隐藏键盘
|
|
// 隐藏键盘
|
|
hideKeyboard() {
|
|
hideKeyboard() {
|