|
|
@@ -22,6 +22,13 @@
|
|
|
|
|
|
<view class="show1">
|
|
|
|
|
|
+ <view class="textbg">
|
|
|
+ <view class="text1">
|
|
|
+ 厂房编号
|
|
|
+ </view>
|
|
|
+ <input class="text44" v-model="inputForm.des6" placeholder="输入厂房编号" :disabled="ischeck"></input>
|
|
|
+ </view>
|
|
|
+
|
|
|
<view class="textbg">
|
|
|
<view class="text1">
|
|
|
厂房名称
|
|
|
@@ -33,8 +40,8 @@
|
|
|
<view class="text1">
|
|
|
所属园区
|
|
|
</view>
|
|
|
- <view v-if="ischeck" class="text2" :class="inputForm.des1 === '需' ? 'text33' : 'text44'" >
|
|
|
- {{inputForm.des1}}
|
|
|
+ <view v-if="ischeck" class="text2" :class="inputForm.des8 === '需' ? 'text33' : 'text44'" >
|
|
|
+ {{inputForm.des8}}
|
|
|
</view>
|
|
|
|
|
|
<picker v-else class="title2" @change="bindPickerChange" rangeKey="label" rangeValue="value" :range="parkList">
|
|
|
@@ -49,6 +56,23 @@
|
|
|
</view>
|
|
|
<input class="text44" v-model="inputForm.address" placeholder="输入详细位置" :disabled="ischeck"></input>
|
|
|
</view>
|
|
|
+
|
|
|
+ <view class="textbg">
|
|
|
+ <view class="text1">
|
|
|
+ 联系人
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <button v-if="showloginbt" @click="tologin" class="cu-btn block bg-blue ">{{dengtxt}}</button>
|
|
|
+ <input v-else class="text44" v-model="inputForm.lxr" placeholder="输入联系人" :disabled="ischeck"></input>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="textbg">
|
|
|
+ <view class="text1">
|
|
|
+ 联系电话
|
|
|
+ </view>
|
|
|
+ <button v-if="showloginbt" @click="tologin" class="cu-btn block bg-blue ">{{dengtxt}}</button>
|
|
|
+ <input v-else class="text44" v-model="inputForm.phone" placeholder="输入联系电话" :disabled="ischeck"></input>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
|
|
|
<view class="titlebg2">
|
|
|
@@ -71,6 +95,21 @@
|
|
|
</picker>
|
|
|
|
|
|
</view>
|
|
|
+
|
|
|
+ <view class="textbg">
|
|
|
+ <view class="text12">
|
|
|
+ 产权
|
|
|
+ </view>
|
|
|
+ <view v-if="ischeck" class="text44" >
|
|
|
+ {{selecteddes7}}
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <picker v-else class="title2" @change="bindPickerChange4" rangeKey="label" rangeValue="value" :range="parkList4">
|
|
|
+ <view class="text44" :class="{ placeholder: selecteddes7 === '请选择' }">{{ selecteddes7 }}</view>
|
|
|
+ </picker>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
|
|
|
<view class="textbg">
|
|
|
<view class="text12">
|
|
|
@@ -122,6 +161,114 @@
|
|
|
</view>
|
|
|
|
|
|
<view class="textbg">
|
|
|
+ <view class="text12">
|
|
|
+ 适用产业
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 回显(查看模式) -->
|
|
|
+ <view v-if="ischeck" class="text44">
|
|
|
+ {{ inputForm.des2 || '暂无' }}
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 编辑(选择模式) -->
|
|
|
+ <zqs-select
|
|
|
+ v-else
|
|
|
+ class="input2"
|
|
|
+ :multiple="true"
|
|
|
+ :list="industryList"
|
|
|
+ label-key="label"
|
|
|
+ value-key="value"
|
|
|
+ placeholder=" 请选择"
|
|
|
+ title="请选择适用产业"
|
|
|
+ clearable
|
|
|
+ v-model="selectedIndustry"
|
|
|
+ @search="searchEvent"
|
|
|
+ @change="selectChange2"
|
|
|
+ ></zqs-select>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+ <view class="textbg">
|
|
|
+ <view class="text12">
|
|
|
+ 厂房装修
|
|
|
+ </view>
|
|
|
+ <view v-if="ischeck" class="text44">
|
|
|
+ {{ inputForm.des3==='1' ? '毛坯' :
|
|
|
+ inputForm.des3==='2' ? '精装' : '' }}
|
|
|
+ </view>
|
|
|
+ <picker v-else class="title2" @change="bindPickerChange6" rangeKey="label" rangeValue="value" :range="parkList6">
|
|
|
+ <view class="text44" :class="{ placeholder: selecteddes3 === '请选择' }">{{ selecteddes3 }}</view>
|
|
|
+ </picker>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="textbg">
|
|
|
+ <view class="text12">
|
|
|
+ 长宽
|
|
|
+ </view>
|
|
|
+ <view class="text221">
|
|
|
+ <input class="text44" v-model="inputForm.des4" placeholder="输入长宽" :disabled="ischeck"></input>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="textbg">
|
|
|
+ <view class="text12">
|
|
|
+ 承载负荷(kg/m²)
|
|
|
+ </view>
|
|
|
+ <view class="text221">
|
|
|
+ <input class="text44" v-model="inputForm.des5" placeholder="输入承载负荷" :disabled="ischeck"></input>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="textbg">
|
|
|
+ <view class="text12">
|
|
|
+ 行车数量
|
|
|
+ </view>
|
|
|
+ <view class="text221">
|
|
|
+ <input class="text44" v-model="inputForm.drivingCount" placeholder="输入行车数量" :disabled="ischeck"></input>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="textbg">
|
|
|
+ <view class="text12">
|
|
|
+ 行车承载负荷(吨)
|
|
|
+ </view>
|
|
|
+ <view class="text221">
|
|
|
+ <input class="text44" v-model="inputForm.drivingLoad" placeholder="输入行车承载负荷" :disabled="ischeck"></input>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="textbg">
|
|
|
+ <view class="text12">
|
|
|
+ 洁净车间
|
|
|
+ </view>
|
|
|
+ <view v-if="ischeck" class="text44">
|
|
|
+ {{ selectedcleanRoom }}
|
|
|
+ </view>
|
|
|
+ <picker v-else class="title2" @change="bindPickerChange5" rangeKey="label" rangeValue="value" :range="parkList5">
|
|
|
+ <view class="text44" :class="{ placeholder: selectedcleanRoom === '请选择' }">{{ selectedcleanRoom }}</view>
|
|
|
+ </picker>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="textbg">
|
|
|
+ <view class="text12">
|
|
|
+ 水电气情况
|
|
|
+ </view>
|
|
|
+ <view class="text221">
|
|
|
+ <input class="text44" v-model="inputForm.situation" placeholder="输入水电气情况" :disabled="ischeck"></input>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view v-if="!ischeck" class="textbg">
|
|
|
+ <view class="text12">
|
|
|
+ 纳入板块统计
|
|
|
+ </view>
|
|
|
+ <picker class="title2" @change="bindPickerChange7" rangeKey="label" rangeValue="value" :range="parkList7">
|
|
|
+ <view class="text44" :class="{ placeholder: selectedispark === '请选择' }">{{ selectedispark }}</view>
|
|
|
+ </picker>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="textbg" >
|
|
|
<view class="text12">
|
|
|
备注
|
|
|
</view>
|
|
|
@@ -130,14 +277,46 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+ <view v-if="!showloginbt&&!ischeck" class="cu-form-group margin-top" style="0.5px solid #eee;margin-top: 10rpx;">
|
|
|
+ <uni-file-picker style="margin-bottom: 10px;margin-top: 10rpx;" limit="1" ref="picFile" v-model="picLists"
|
|
|
+ fileMediatype="image" mode="grid" title="平面图" :auto-upload="autoUpload" @select="select"
|
|
|
+ @progress="progress" @success="success" @fail="fail" @delete="deleteFile"
|
|
|
+ :imageStyles="imageStyles" :disabled="ischeck">
|
|
|
+ </uni-file-picker>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view v-if="!showloginbt&&!ischeck" class="cu-form-group margin-top" style="0.5px solid #eee;margin-top: 10rpx;">
|
|
|
+ <uni-file-picker style="margin-bottom: 10px;margin-top: 10rpx;" limit="4" ref="picFile2" v-model="picLists2"
|
|
|
+ fileMediatype="image" mode="grid" title="厂房图" :auto-upload="autoUpload" @select="select2"
|
|
|
+ @progress="progress" @success="success" @fail="fail" @delete="deleteFile2"
|
|
|
+ :imageStyles="imageStyles" :disabled="ischeck">
|
|
|
+ </uni-file-picker>
|
|
|
+ </view>
|
|
|
+
|
|
|
<view style="height: 30rpx;background-color: white;"></view>
|
|
|
|
|
|
+ <view class="padding-xl" v-if="showloginbt">
|
|
|
+ <button @click="tologin" class="cu-btn block bg-blue margin-tb-sm lg">登录查看厂房照片</button>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="titlebg2" v-if="swiperList2.length>0" >
|
|
|
+ <view class="titlet1" ></view>
|
|
|
+ <view class="titlet2" >平面图</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view v-for="(item, index) in swiperList2" :key="'pic1-'+index" style="width: 100%;">
|
|
|
+ <image :src="item.url" mode="widthFix" style="width: 100%;" >
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view style="height: 40rpx;"></view>
|
|
|
+
|
|
|
<view class="titlebg2" v-if="swiperList.length>0" >
|
|
|
<view class="titlet1" ></view>
|
|
|
- <view class="titlet2" >图文详情</view>
|
|
|
+ <view class="titlet2" >厂房图</view>
|
|
|
</view>
|
|
|
|
|
|
- <view v-for="(item, index) in swiperList" :key="index" style="width: 100%;">
|
|
|
+ <view v-for="(item, index) in swiperList" :key="'pic2-'+index" style="width: 100%;">
|
|
|
<image :src="item.url" mode="widthFix" style="width: 100%;" >
|
|
|
</image>
|
|
|
</view>
|
|
|
@@ -147,6 +326,8 @@
|
|
|
<view class="padding-xl" v-if="!ischeck">
|
|
|
<button @click="save" class="cu-btn block bg-blue margin-tb-sm lg">提交</button>
|
|
|
</view>
|
|
|
+
|
|
|
+
|
|
|
|
|
|
</form>
|
|
|
</view>
|
|
|
@@ -167,6 +348,7 @@
|
|
|
isAdd: true,
|
|
|
autoUpload: false,
|
|
|
swiperList: [],
|
|
|
+ swiperList2: [],
|
|
|
inputForm: {
|
|
|
id: '',
|
|
|
name: '',
|
|
|
@@ -175,6 +357,7 @@
|
|
|
ownership: '',
|
|
|
area: '',
|
|
|
singleLayer: '',
|
|
|
+ cleanRoom: '',
|
|
|
numberLayers: '',
|
|
|
floorHeight: '',
|
|
|
idleArea: '',
|
|
|
@@ -188,7 +371,15 @@
|
|
|
des6: '',
|
|
|
des7: '',
|
|
|
des8: '',
|
|
|
- des9: '',
|
|
|
+ des9: '',
|
|
|
+ lxr: '',
|
|
|
+ phone: '',
|
|
|
+ drivingCount: '',
|
|
|
+ drivingLoad: '',
|
|
|
+ situation: '',
|
|
|
+ pic1: '',
|
|
|
+ pic2: '',
|
|
|
+ ispark: '',
|
|
|
|
|
|
},
|
|
|
t1: '厂房权属',
|
|
|
@@ -202,12 +393,37 @@
|
|
|
parkList: [],
|
|
|
parkList2: [],
|
|
|
parkList3: [],
|
|
|
+ parkList4: [],
|
|
|
+ parkList5: [],
|
|
|
+ parkList6: [],
|
|
|
+ parkList7: [{label: '是',value: '1'},{label: '否',value: '0'}],
|
|
|
selectedPark:'请选择',
|
|
|
selectedownership:'请选择',
|
|
|
- selectedsingleLayer:'请选择',
|
|
|
+ selectedsingleLayer:'请选择',
|
|
|
+ selecteddes7:'请选择',
|
|
|
+ selecteddes3:'请选择',
|
|
|
+ selectedcleanRoom:'请选择',
|
|
|
+ selectedispark:'请选择',
|
|
|
+ // 适用产业
|
|
|
+ industryList: [], // 字典数组
|
|
|
+ selectedIndustry: [], // 当前选中的 value 数组
|
|
|
+ showIndustryPicker: false,
|
|
|
+ showIndustryPop: false ,
|
|
|
+
|
|
|
+ dengtxt: '登录查看',
|
|
|
+
|
|
|
+ picLists: [],
|
|
|
+ picUrl: [],
|
|
|
+ picLists2: [],
|
|
|
+ picUrl2: [],
|
|
|
+ imageStyles: {
|
|
|
+ width: 90,
|
|
|
+ height: 90
|
|
|
+ },
|
|
|
|
|
|
index:0,
|
|
|
isLogin:"",
|
|
|
+ showloginbt:true,
|
|
|
username:"",
|
|
|
isadmin:false,
|
|
|
lyIndex: '',
|
|
|
@@ -230,12 +446,17 @@
|
|
|
},
|
|
|
mounted() {
|
|
|
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+
|
|
|
},
|
|
|
onShow() {
|
|
|
this.isLogin=this.$auth.checkisLogin();
|
|
|
//判断是否能新增
|
|
|
if(this.isLogin!=null){
|
|
|
this.getRole();
|
|
|
+
|
|
|
+ this.showloginbt=false;
|
|
|
}
|
|
|
},
|
|
|
onLoad(query) {
|
|
|
@@ -250,11 +471,19 @@
|
|
|
Promise.all([
|
|
|
loginService.getDictListBytype("sys_park"),
|
|
|
loginService.getDictListBytype("sys_ownership"),
|
|
|
- loginService.getDictListBytype("sys_single_layer")
|
|
|
- ]).then(([park, own, layer]) => {
|
|
|
+ loginService.getDictListBytype("sys_single_layer"),
|
|
|
+ loginService.getDictListBytype("sys_property_right"),
|
|
|
+ loginService.getDictListBytype("sys_clean_room"),
|
|
|
+ loginService.getDictListBytype("sys_renovation"),
|
|
|
+ loginService.getDictListBytype("sys_industry")
|
|
|
+ ]).then(([park, own, layer, propertyright, cleanroom,renovation,industry]) => {
|
|
|
this.parkList = park.data;
|
|
|
this.parkList2 = own.data;
|
|
|
this.parkList3 = layer.data;
|
|
|
+ this.parkList4 = propertyright.data;
|
|
|
+ this.parkList5 = cleanroom.data;
|
|
|
+ this.parkList6 = renovation.data;
|
|
|
+ this.industryList = industry.data;
|
|
|
// 字典到位后再回显详情
|
|
|
if (query.id) { // 有 id → 编辑/查看
|
|
|
this.isAdd = false
|
|
|
@@ -306,6 +535,77 @@
|
|
|
this.inputForm.singleLayer = item.value
|
|
|
},
|
|
|
|
|
|
+ bindPickerChange4(e) {
|
|
|
+ const idx = e.detail.value
|
|
|
+ const item = this.parkList4[idx]
|
|
|
+ this.selecteddes7 = item.label
|
|
|
+ this.inputForm.des7 = item.value
|
|
|
+ },
|
|
|
+
|
|
|
+ bindPickerChange5(e) {
|
|
|
+ const idx = e.detail.value
|
|
|
+ const item = this.parkList5[idx]
|
|
|
+ this.selectedcleanRoom = item.label
|
|
|
+ this.inputForm.cleanRoom = item.value
|
|
|
+ },
|
|
|
+
|
|
|
+ bindPickerChange6(e) {
|
|
|
+ const idx = e.detail.value
|
|
|
+ const item = this.parkList6[idx]
|
|
|
+ this.selecteddes3 = item.label
|
|
|
+ this.inputForm.des3 = item.value
|
|
|
+ },
|
|
|
+
|
|
|
+ bindPickerChange7(e) {
|
|
|
+ const idx = e.detail.value
|
|
|
+ const item = this.parkList7[idx]
|
|
|
+ this.selectedispark = item.label
|
|
|
+ this.inputForm.ispark = item.value
|
|
|
+ },
|
|
|
+
|
|
|
+ selectChange2() {
|
|
|
+ // 此处为点击的事件
|
|
|
+ //this.pickerData=this.pickerDataOld;
|
|
|
+ console.log(this.selectedIndustry);
|
|
|
+ },
|
|
|
+ searchEvent(val) {
|
|
|
+ //this.pickerData=this.filteredItems(val);
|
|
|
+ },
|
|
|
+
|
|
|
+ // industryChange(e){
|
|
|
+ // this.selectedIndustry = e.detail.value
|
|
|
+ // // 同时拼好 label 字符串
|
|
|
+ // const labels = this.selectedIndustry.map(v =>
|
|
|
+ // this.industryList.find(d => d.value === v)?.label
|
|
|
+ // ).filter(Boolean)
|
|
|
+ // this.inputForm.des1 = this.selectedIndustry.join(',')
|
|
|
+ // this.inputForm.des2 = labels.join(',')
|
|
|
+ // },
|
|
|
+
|
|
|
+ // 弹窗点确定
|
|
|
+ // confirmIndustry () {
|
|
|
+ // // 把 value 数组 -> 字符串
|
|
|
+ // this.inputForm.des1 = this.selectedIndustry.join(',')
|
|
|
+ // // 把对应 label 拼成字符串
|
|
|
+ // const dict = this.industryList
|
|
|
+ // const labels = this.selectedIndustry.map(v => {
|
|
|
+ // const item = dict.find(d => d.value === v)
|
|
|
+ // return item ? item.label : ''
|
|
|
+ // })
|
|
|
+ // this.inputForm.des2 = labels.join(',')
|
|
|
+ // this.showIndustryPicker = false
|
|
|
+ // },
|
|
|
+
|
|
|
+ // 回显(setData 里调用)
|
|
|
+ fillIndustry () {
|
|
|
+ // 后端是字符串,先拆成数组
|
|
|
+ if (this.inputForm.des1) {
|
|
|
+ this.selectedIndustry = this.inputForm.des1.split(',')
|
|
|
+ } else {
|
|
|
+ this.selectedIndustry = []
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
validate() {
|
|
|
for (const key in this.rules) {
|
|
|
const rule = this.rules[key]
|
|
|
@@ -322,6 +622,142 @@
|
|
|
}
|
|
|
return true
|
|
|
},
|
|
|
+
|
|
|
+
|
|
|
+ // 获取上传进度
|
|
|
+ progress(e) {
|
|
|
+ console.log('上传进度:', e)
|
|
|
+ },
|
|
|
+ // 上传成功
|
|
|
+ success(e) {
|
|
|
+ console.log('上传成功')
|
|
|
+ },
|
|
|
+ // 上传失败
|
|
|
+ fail(e) {
|
|
|
+ console.log('上传失败:', e)
|
|
|
+ },
|
|
|
+ deleteFile(e) {
|
|
|
+ this.picUrl.splice(e.index, 1)
|
|
|
+ },
|
|
|
+ deleteFile2(e) {
|
|
|
+ this.picUrl2.splice(e.index, 1)
|
|
|
+ },
|
|
|
+ // 获取上传状态
|
|
|
+ select(e) {
|
|
|
+ console.log('选择文件:', e)
|
|
|
+
|
|
|
+ var _this = this
|
|
|
+ var i = 0
|
|
|
+ upload()
|
|
|
+
|
|
|
+ function upload() {
|
|
|
+ if (i >= e.tempFiles.length) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var item = e.tempFiles[i]
|
|
|
+ uni.showLoading({
|
|
|
+ title: "上传中",
|
|
|
+ mask: true
|
|
|
+ });
|
|
|
+ uni.uploadFile({
|
|
|
+ url: '/yd_qycpfb/file/upload?uploadPath=userdir', // 仅为示例,非真实的接口地址
|
|
|
+ filePath: item.url,
|
|
|
+ name: 'file',
|
|
|
+ formData: {
|
|
|
+ 'fileName': item.name
|
|
|
+ },
|
|
|
+ header: {
|
|
|
+ 'token': _this.$auth.getUserToken()
|
|
|
+ },
|
|
|
+ success: (res) => {
|
|
|
+ var data = res.data
|
|
|
+ if (typeof data['error'] != "undefined") {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '上传失败,请联系开发!'
|
|
|
+ });
|
|
|
+ _this.$refs.picFile.clearFiles(_this.picLists.length)
|
|
|
+ } else {
|
|
|
+ _this.picUrl.push({
|
|
|
+ url: data,
|
|
|
+ uuid: item.uuid
|
|
|
+ })
|
|
|
+ i++;
|
|
|
+ upload()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: () => {
|
|
|
+ uni.hideLoading();
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '上传失败,请联系开发!'
|
|
|
+ });
|
|
|
+ _this.$refs.picFile.clearFiles(_this.picLists.length)
|
|
|
+ },
|
|
|
+ complete: function() {
|
|
|
+ uni.hideLoading();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ select2(e) {
|
|
|
+ console.log('选择文件:', e)
|
|
|
+
|
|
|
+ var _this = this
|
|
|
+ var i = 0
|
|
|
+ upload()
|
|
|
+
|
|
|
+ function upload() {
|
|
|
+ if (i >= e.tempFiles.length) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var item = e.tempFiles[i]
|
|
|
+ uni.showLoading({
|
|
|
+ title: "上传中",
|
|
|
+ mask: true
|
|
|
+ });
|
|
|
+ uni.uploadFile({
|
|
|
+ url: '/yd_qycpfb/file/upload?uploadPath=userdir', // 仅为示例,非真实的接口地址
|
|
|
+ filePath: item.url,
|
|
|
+ name: 'file',
|
|
|
+ formData: {
|
|
|
+ 'fileName': item.name
|
|
|
+ },
|
|
|
+ header: {
|
|
|
+ 'token': _this.$auth.getUserToken()
|
|
|
+ },
|
|
|
+ success: (res) => {
|
|
|
+ var data = res.data
|
|
|
+ if (typeof data['error'] != "undefined") {
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '上传失败,请联系开发!'
|
|
|
+ });
|
|
|
+ _this.$refs.picFile2.clearFiles(_this.picLists2.length)
|
|
|
+ } else {
|
|
|
+ _this.picUrl2.push({
|
|
|
+ url: data,
|
|
|
+ uuid: item.uuid
|
|
|
+ })
|
|
|
+ i++;
|
|
|
+ upload()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fail: () => {
|
|
|
+ uni.hideLoading();
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: '上传失败,请联系开发!'
|
|
|
+ });
|
|
|
+ _this.$refs.picFile2.clearFiles(_this.picLists2.length)
|
|
|
+ },
|
|
|
+ complete: function() {
|
|
|
+ uni.hideLoading();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
save(){
|
|
|
|
|
|
@@ -329,6 +765,26 @@
|
|
|
|
|
|
this.inputForm.state=1;
|
|
|
|
|
|
+ //产业
|
|
|
+
|
|
|
+ const labels = this.selectedIndustry.map(v =>
|
|
|
+ this.industryList.find(d => d.value === v)?.label
|
|
|
+ ).filter(Boolean)
|
|
|
+ this.inputForm.des1 = this.selectedIndustry.join(',')
|
|
|
+ this.inputForm.des2 = labels.join(',')
|
|
|
+
|
|
|
+ this.inputForm.pic1 = [];
|
|
|
+ this.inputForm.pic2 = [];
|
|
|
+ this.picUrl.forEach(item => {
|
|
|
+ this.inputForm.pic1.push(item.url.replace('https://ydwqfw.com.cn/yd_qycpfbWeb/', ''))
|
|
|
+ })
|
|
|
+ this.picUrl2.forEach(item => {
|
|
|
+ this.inputForm.pic2.push(item.url.replace('https://ydwqfw.com.cn/yd_qycpfbWeb/', ''))
|
|
|
+ })
|
|
|
+ this.inputForm.pic1 = this.inputForm.pic1.toString();
|
|
|
+ this.inputForm.pic2 = this.inputForm.pic2.toString();
|
|
|
+
|
|
|
+
|
|
|
uni.showLoading()
|
|
|
loginService.savefactoryBuildings(this.inputForm).then(({
|
|
|
data
|
|
|
@@ -346,8 +802,15 @@
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ tologin(){
|
|
|
+ uni.showLoading()
|
|
|
+ uni.reLaunch({
|
|
|
+ url: '/pages/login/factorylogin'
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
setData(data){
|
|
|
- this.inputForm = this.recover(this.inputForm, data)
|
|
|
+ this.inputForm = this.recover(this.inputForm, data)
|
|
|
|
|
|
const parkItem = this.parkList.find(p => p.value == data.park);
|
|
|
// 把中文名赋给用来显示的变量
|
|
|
@@ -358,7 +821,79 @@
|
|
|
this.selectedownership = ownItem ? ownItem.label : '请选择';
|
|
|
|
|
|
const layerItem = this.parkList3.find(p => p.value == data.singleLayer);
|
|
|
- this.selectedsingleLayer = layerItem ? layerItem.label : '请选择';
|
|
|
+ this.selectedsingleLayer = layerItem ? layerItem.label : '请选择';
|
|
|
+
|
|
|
+ const des7Item = this.parkList4.find(p => p.value == data.des7);
|
|
|
+
|
|
|
+ this.selecteddes7 = des7Item ? des7Item.label : '请选择';
|
|
|
+ console.log("产权:"+this.selecteddes7)
|
|
|
+
|
|
|
+ const des3Item = this.parkList6.find(p => p.value == data.des3);
|
|
|
+ this.selecteddes3 = des3Item ? des3Item.label : '请选择';
|
|
|
+
|
|
|
+
|
|
|
+ /* ===== 洁净车间回显 ===== */
|
|
|
+ const cleanItem = this.parkList5.find(p => p.value == data.cleanRoom)
|
|
|
+ this.selectedcleanRoom = cleanItem ? cleanItem.label : '请选择'
|
|
|
+
|
|
|
+ const isparkItem = this.parkList7.find(p => p.value == data.ispark)
|
|
|
+ this.selectedispark = isparkItem ? isparkItem.label : '请选择'
|
|
|
+
|
|
|
+ this.fillIndustry()
|
|
|
+
|
|
|
+ if(this.isLogin!=null){
|
|
|
+ // 回显图片
|
|
|
+ if(this.inputForm.pic2!=undefined&&this.inputForm.pic2!=''){
|
|
|
+ let pics=this.inputForm.pic2.split(",");
|
|
|
+ pics.forEach(item => {
|
|
|
+ if(item!=''){
|
|
|
+ this.swiperList.push({
|
|
|
+ 'url': "https://ydwqfw.com.cn/yd_qycpfbWeb/"+item,
|
|
|
+ })
|
|
|
+
|
|
|
+ this.picUrl2.push({
|
|
|
+ 'url': "https://ydwqfw.com.cn/yd_qycpfbWeb/"+item,
|
|
|
+ 'uuid': item
|
|
|
+ })
|
|
|
+ this.picLists2.push({
|
|
|
+ 'url': "https://ydwqfw.com.cn/yd_qycpfbWeb/"+item,
|
|
|
+ 'uuid': item
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ let pics2=this.inputForm.pic1;
|
|
|
+
|
|
|
+ if(pics2!=undefined&&pics2!=''){
|
|
|
+ this.swiperList2.push({
|
|
|
+ 'url': "https://ydwqfw.com.cn/yd_qycpfbWeb/"+pics2,
|
|
|
+ })
|
|
|
+
|
|
|
+ this.picUrl.push({
|
|
|
+ 'url': "https://ydwqfw.com.cn/yd_qycpfbWeb/"+pics2,
|
|
|
+ 'uuid': pics2
|
|
|
+ })
|
|
|
+ this.picLists.push({
|
|
|
+ 'url': "https://ydwqfw.com.cn/yd_qycpfbWeb/"+pics2,
|
|
|
+ 'uuid': pics2
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
},
|
|
|
|
|
|
@@ -396,7 +931,7 @@
|
|
|
font-size: 30rpx;
|
|
|
}
|
|
|
.text12{
|
|
|
- width: 200rpx;
|
|
|
+ width: 260rpx;
|
|
|
margin-left: 30rpx;
|
|
|
color: #000000;
|
|
|
font-size: 29rpx;
|
|
|
@@ -524,4 +1059,43 @@
|
|
|
.bg-blue {
|
|
|
background-color: #4285f4; /* 假设这是一个蓝色背景 */
|
|
|
}
|
|
|
+
|
|
|
+ .input2 {
|
|
|
+ flex: 1;
|
|
|
+ font-size: 30rpx;
|
|
|
+ color: #1E8AD7; /* 想保持的蓝色 */
|
|
|
+ padding-right: 20rpx;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* 关键:把颜色强制透传到组件内部 input/占位节点 */
|
|
|
+ .input2 .input, /* 有的版本用 .input */
|
|
|
+ .input2 .uni-input, /* 有的版本用 .uni-input */
|
|
|
+ .input2 input::placeholder,
|
|
|
+ .input2 .placeholder {
|
|
|
+ color: #1E8AD7 !important; /* 强制覆盖黑色 */
|
|
|
+ }
|
|
|
+ .input2 * {
|
|
|
+ color: #1E8AD7 !important;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /* 强制让 zqs-select 内部所有文字都变成蓝色 */
|
|
|
+ .input2,
|
|
|
+ .input2 *,
|
|
|
+ .input2 .input,
|
|
|
+ .input2 .uni-input,
|
|
|
+ .input2 .select-input,
|
|
|
+ .input2 .select-tag,
|
|
|
+ .input2 .placeholder,
|
|
|
+ .input2 input,
|
|
|
+ .input2 .input-placeholder,
|
|
|
+ .input2 .uni-input-placeholder {
|
|
|
+ color: #1E8AD7 !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .input2 input {
|
|
|
+ color: #1E8AD7 !important;
|
|
|
+ font-size: 30rpx !important;
|
|
|
+ }
|
|
|
</style>
|