@@ -1,5 +1,5 @@ | |||||
const ENV_PATH = { | const ENV_PATH = { | ||||
baseUrl: 'http://192.168.31.231:8080/autoSR/api', // 长龙 | |||||
baseUrl: 'http://192.168.31.244:8080/autoSR/api', // 长龙 | |||||
} | } | ||||
module.exports = ENV_PATH | module.exports = ENV_PATH |
@@ -96,7 +96,7 @@ | |||||
<view v-for="(item,index) in allList" :key="index"> | <view v-for="(item,index) in allList" :key="index"> | ||||
<view class=""> | <view class=""> | ||||
<view class="conmsg-msg-lab" style="border: none;"> | |||||
<view class="conmsg-msg-lab" :class="{mustSe: item.level == 1 && item.mustSelected == 0 }" style="border: none;"> | |||||
<view class="conmsg-msg-lab-1"> | <view class="conmsg-msg-lab-1"> | ||||
{{item.name}} | {{item.name}} | ||||
</view> | </view> | ||||
@@ -344,8 +344,13 @@ | |||||
if (this.form.showPhones != this.form.showPhone) { | if (this.form.showPhones != this.form.showPhone) { | ||||
this.form.phone = this.form.showPhone | this.form.phone = this.form.showPhone | ||||
} | } | ||||
let isPass = false // 默认通过 | |||||
let indexs = 0; // | |||||
let checkArr = {} | |||||
this.allList.map(item => { | this.allList.map(item => { | ||||
checkArr = this.allList.find(item => item.mustSelected == 0) | |||||
isPass = checkArr.children.findIndex(item => item.selected == 0) == -1 | |||||
if (isPass) return; | |||||
item.children.map(item1 => { | item.children.map(item1 => { | ||||
if (item1.selected == 0) { | if (item1.selected == 0) { | ||||
console.log(item, item1) | console.log(item, item1) | ||||
@@ -353,6 +358,15 @@ | |||||
} | } | ||||
}) | }) | ||||
}) | }) | ||||
if (isPass) { | |||||
uni.showToast({ | |||||
title: `${checkArr.name}为必选项~`, | |||||
icon: 'none', | |||||
duration: 2000 | |||||
}) | |||||
return | |||||
} | |||||
str = str.join(',') | str = str.join(',') | ||||
param = this.form | param = this.form | ||||
param.keywordIds = str | param.keywordIds = str | ||||
@@ -402,6 +416,7 @@ | |||||
padding: 0 30rpx; | padding: 0 30rpx; | ||||
.conmsg-msg-lab { | .conmsg-msg-lab { | ||||
position: relative; | |||||
height: 102rpx; | height: 102rpx; | ||||
display: flex; | display: flex; | ||||
font-size: 30rpx; | font-size: 30rpx; | ||||
@@ -410,6 +425,15 @@ | |||||
border-bottom: 1px solid #E0E0E0; | border-bottom: 1px solid #E0E0E0; | ||||
line-height: 102rpx; | line-height: 102rpx; | ||||
&.mustSe::before { | |||||
content: '*'; | |||||
color: red; | |||||
position: absolute; | |||||
left: -10rpx; | |||||
right: -10rpx; | |||||
z-index: 10; | |||||
} | |||||
.conmsg-msg-lab-1 { | .conmsg-msg-lab-1 { | ||||
display: flex; | display: flex; | ||||
min-width: 136rpx; | min-width: 136rpx; | ||||
@@ -103,7 +103,7 @@ | |||||
uni.setStorageSync(WXB_SESSION_LOGIN_DATA, data); //写入缓存 | uni.setStorageSync(WXB_SESSION_LOGIN_DATA, data); //写入缓存 | ||||
that.getMenu() | that.getMenu() | ||||
that.getUser(); | that.getUser(); | ||||
util.showSuccess('登录成功'); | |||||
// util.showSuccess('登录成功'); | |||||
} else { | } else { | ||||
util.showNone("账号名或密码错误,请重试"); | util.showNone("账号名或密码错误,请重试"); | ||||
return false; | return false; | ||||
@@ -5,7 +5,7 @@ | |||||
<view class="conmsg-msg"> | <view class="conmsg-msg"> | ||||
<view v-for="(item,index) in allList" :key="index"> | <view v-for="(item,index) in allList" :key="index"> | ||||
<view class=""> | <view class=""> | ||||
<view class="conmsg-msg-lab" style="border: none;"> | |||||
<view class="conmsg-msg-lab" :class="{mustSe: item.level == 1 && item.mustSelected == 0 }" style="border: none;"> | |||||
<view class="conmsg-msg-lab-1"> | <view class="conmsg-msg-lab-1"> | ||||
{{item.name}} | {{item.name}} | ||||
</view> | </view> | ||||
@@ -82,7 +82,13 @@ | |||||
projectId: uni.getStorageSync('buildingID').id, | projectId: uni.getStorageSync('buildingID').id, | ||||
} | } | ||||
let str = [] | let str = [] | ||||
let isPass = false // 默认通过 | |||||
let indexs = 0; // | |||||
let checkArr = {} | |||||
this.allList.map(item => { | this.allList.map(item => { | ||||
checkArr = this.allList.find(item => item.mustSelected == 0) | |||||
isPass = checkArr.children.findIndex(item => item.selected == 0) == -1 | |||||
if (isPass) return; | |||||
item.children.map(item1 => { | item.children.map(item1 => { | ||||
if (item1.selected == 0) { | if (item1.selected == 0) { | ||||
str.push(item1.keywordsId) | str.push(item1.keywordsId) | ||||
@@ -90,6 +96,15 @@ | |||||
}) | }) | ||||
}) | }) | ||||
if (isPass) { | |||||
uni.showToast({ | |||||
title: `${checkArr.name}为必选项~`, | |||||
icon: 'none', | |||||
duration: 2000 | |||||
}) | |||||
return | |||||
} | |||||
str = str.join(',') | str = str.join(',') | ||||
param.keywordIds = str | param.keywordIds = str | ||||
this.$u.post("matchKeywords/updateManualCalibration", param).then(res => { | this.$u.post("matchKeywords/updateManualCalibration", param).then(res => { | ||||
@@ -144,6 +159,7 @@ | |||||
padding: 0 30rpx; | padding: 0 30rpx; | ||||
.conmsg-msg-lab { | .conmsg-msg-lab { | ||||
position: relative; | |||||
height: 102rpx; | height: 102rpx; | ||||
display: flex; | display: flex; | ||||
font-size: 30rpx; | font-size: 30rpx; | ||||
@@ -151,6 +167,15 @@ | |||||
color: #333333; | color: #333333; | ||||
border-bottom: 1px solid #E0E0E0; | border-bottom: 1px solid #E0E0E0; | ||||
line-height: 102rpx; | line-height: 102rpx; | ||||
&.mustSe::before { | |||||
content: '*'; | |||||
color: red; | |||||
position: absolute; | |||||
left: -10rpx; | |||||
right: -10rpx; | |||||
z-index: 10; | |||||
} | |||||
.conmsg-msg-lab-1 { | .conmsg-msg-lab-1 { | ||||
display: flex; | display: flex; | ||||
@@ -4,8 +4,11 @@ | |||||
<u-search placeholder="输入项目名称" v-model="search" @search="s" @custom="s"></u-search> | <u-search placeholder="输入项目名称" v-model="search" @search="s" @custom="s"></u-search> | ||||
</view> | </view> | ||||
<view class="searchResultStyle"> | <view class="searchResultStyle"> | ||||
<view class="searchList" v-for="(item,index) in list" :key="index" @click="okSelect(item.id,item.propertyName)"> | |||||
{{item.propertyName}} | |||||
<view class="searchList" v-for="(item,index) in list" :key="index" @click="okSelect(item)"> | |||||
<text style="flex-grow: 1;"> | |||||
{{item.propertyName}} | |||||
</text> | |||||
<text v-if="item.daysRemaining < 0 || item.lockFlag == 1" style="color: #ff0000;flex-shrink: 0;font-size: 26rpx;">({{ item.daysRemaining < 0 ? '已过期' : '' }} {{ item.lockFlag == 1 ? '已禁用' : ''}})</text> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
</view> | </view> | ||||
@@ -22,22 +25,32 @@ | |||||
list: [], | list: [], | ||||
}; | }; | ||||
}, | }, | ||||
methods:{ | |||||
s(e){ | |||||
methods: { | |||||
s(e) { | |||||
this.init(e) | this.init(e) | ||||
}, | }, | ||||
okSelect(id,name){ | |||||
okSelect(data) { | |||||
if (data.lockFlag == 1) { | |||||
uni.showToast({ | |||||
title: `${data.propertyName}项目已禁用,不能操作`, | |||||
icon: 'none', | |||||
duration: 2000 | |||||
}) | |||||
return | |||||
} | |||||
let lopan = { | let lopan = { | ||||
id, | |||||
name | |||||
id: data.id, | |||||
name: data.propertyName | |||||
} | } | ||||
uni.setStorageSync("buildingID", lopan); | uni.setStorageSync("buildingID", lopan); | ||||
uni.navigateBack({ | uni.navigateBack({ | ||||
delta:-1 | |||||
delta: -1 | |||||
}) | }) | ||||
}, | }, | ||||
init(e){ | |||||
let data = {houseName:decodeURI(e)||''} | |||||
init(e) { | |||||
let data = { | |||||
houseName: decodeURI(e) || '' | |||||
} | |||||
uni.request({ | uni.request({ | ||||
url: config.service.getUser, | url: config.service.getUser, | ||||
method: "GET", | method: "GET", | ||||
@@ -67,10 +80,13 @@ | |||||
.searchResultStyle { | .searchResultStyle { | ||||
padding: 0 30rpx; | padding: 0 30rpx; | ||||
.searchList{ | |||||
.searchList { | |||||
border-bottom: 1rpx solid #E0E0E0; | border-bottom: 1rpx solid #E0E0E0; | ||||
padding: 30rpx 0; | padding: 30rpx 0; | ||||
font-size: 30rpx; | font-size: 30rpx; | ||||
display: flex; | |||||
justify-content: space-between; | |||||
} | } | ||||
} | } | ||||
} | } | ||||