From e041045fb1e2efe47a7d20a7197e5ae7ffb2adac Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Wed, 14 Sep 2022 08:53:57 +0800
Subject: [PATCH] 服务器配置
---
pages/registerUser/registerUser.vue | 153 +++++++++++++++++++++++++++++++++++++--------------
1 files changed, 111 insertions(+), 42 deletions(-)
diff --git a/pages/registerUser/registerUser.vue b/pages/registerUser/registerUser.vue
index 04785f4..eb5281d 100644
--- a/pages/registerUser/registerUser.vue
+++ b/pages/registerUser/registerUser.vue
@@ -29,6 +29,12 @@
<u-select v-model="showxq" mode="mutil-column-auto" :list="listxq" @confirm="confirmxq"></u-select>
</u-form-item>
+ <u-form-item label="所属队伍" prop="teamName" left-icon="map" label-width="200" :required="true">
+ <u-input v-model="form.teamName" type="select" placeholder="请选择所属队伍" :border="true"
+ @click="openTeamPopup" />
+
+ </u-form-item>
+
<u-form-item label="性别" label-width="200" left-icon="man">
<u-radio-group v-model="form.sex">
<u-radio v-for="(item, index) in sex" :key="index" :name="item.name" :disabled="item.disabled">
@@ -56,8 +62,25 @@
</u-checkbox>
</view>
+ <u-popup v-model="showTeam" border-radius="14" length="60%" mode="bottom" zIndex="9999" closeable="true"
+ @close="showTeam = false">
+ <view class="team-popup">
+ <view class="title">
+ 选择所属队伍
+ </view>
+
+ <scroll-view scroll-y="true" style="height: calc(100% - 88rpx);">
+ <view @click="currentTeam(item)" v-for="(item, index) in teamList" :key="index">
+ <u-icon v-show="item.isBrand == '1'" size="40" name="/static/images/icon/medal.png"></u-icon>
+ {{item.name}}
+ </view>
+ </scroll-view>
+ </view>
+ </u-popup>
+
<u-button class="submit" @click="zc">
注册</u-button>
+
</view>
</template>
@@ -99,6 +122,7 @@
liveLng: '',
liveLat: '',
+ teamList: '',
userConsent: false,
jobValue: '无',
jobList: [{
@@ -128,7 +152,14 @@
deptXb: "",
flag: false,
list: [{
- title: '账号',
+ title: '手机号',
+ img: 'phone-fill',
+ froms: 'phone',
+ requireds: true,
+ placeholder: '请输入真实手机号'
+ },
+ {
+ title: '身份证',
img: 'man-add-fill',
froms: 'user',
requireds: true,
@@ -156,13 +187,6 @@
froms: 'name',
requireds: true,
placeholder: '请输入真实姓名'
- },
- {
- title: '手机号',
- img: 'phone-fill',
- froms: 'phone',
- requireds: true,
- placeholder: '请输入真实手机号'
},
// {
// title: '部门',
@@ -195,7 +219,9 @@
address: '',
jobUnit: '',
signals: '',
- workjurisdiction: ''
+ workjurisdiction: '',
+ teamName: '',
+ teamId: '',
},
rules: {
user: [{
@@ -291,6 +317,12 @@
// 可以单个或者同时写两个触发验证方式
trigger: ['change', 'blur'],
}],
+ teamName: [{
+ required: true,
+ message: '请选择所属队伍',
+ // 可以单个或者同时写两个触发验证方式
+ trigger: ['change', 'blur'],
+ }],
depts: [{
required: true,
message: '请输入真实姓名',
@@ -304,43 +336,58 @@
faceco: '#000',
faceMsg: '',
roleList: [{
- label: '平安志愿者',
- value: "1416225906918195201"
- }, {
- label: '民警',
- value: "1417092295132561409"
- },
- {
- label: '治保会队伍',
- value: "1495714130024673282"
- },
- {
- label: '内保干部队伍',
- value: "1495714221926068225"
- },
- {
- label: '治安巡防队伍',
- value: "1495714272471625729"
- },
- {
- label: '信息员队伍',
- value: "1495714309071122434"
- },
- {
- label: '保安员队伍',
- value: "1495714343888039937"
- },
- {
- label: '警务辅助队伍',
- value: "1495714378025480193"
- }
- ],
+ label: '洪城义警',
+ value: "1416225906918195201"
+ }, {
+ label: '民警',
+ value: "1417092295132561409"
+ }],
+ showTeam: false
};
},
onLoad() {
this.deplxq();
},
methods: {
+ /**
+ * 当前选中的队伍
+ */
+ currentTeam(params) {
+ this.form.teamId = params.id
+ this.form.teamName = params.name
+ this.showTeam = false
+ },
+ /**
+ * 所属队伍的弹窗
+ */
+ openTeamPopup() {
+ var that = this;
+ var data = that.form;
+ var xq = "";
+ if (data.role == "民警") {
+ xq = data.xq
+ } else if (data.role == "洪城义警") {
+ xq = data.jurisdiction
+ }
+
+ if (xq == "") {
+ uni.showToast({
+ title: "请先选择角色或服务范围",
+ icon: 'none',
+ duration: 2000
+ });
+ return
+ }
+
+ uni.request({
+ url: that.$store.state.piAPI + "/team/page?current=1&size=999&police=" + xq,
+ method: 'get',
+ success: (res) => {
+ that.teamList = res.data.data.records;
+ that.showTeam = true;
+ }
+ })
+ },
agreement(e) {
uni.navigateTo({
url: '/pages/registerUser/agreement?e=' + e
@@ -541,7 +588,8 @@
workaddress: d.xq,
// 工作辖区
workjurisdiction: d.workjurisdiction,
- signals: d.signals
+ signals: d.signals,
+ team: d.teamId
}
uni.request({
url: url,
@@ -573,7 +621,7 @@
})
}, 2000);
- }else{
+ } else {
uni.showToast({
title: '注册失败,请确认信息后重试',
icon: 'none',
@@ -684,4 +732,25 @@
color: #103289;
}
}
+
+ .team-popup {
+ height: 100%;
+ overflow: hidden;
+
+ .title {
+ font-size: 30rpx;
+ font-weight: bold;
+ text-align: center;
+ border-bottom: 1rpx solid #ccc;
+ height: 88rpx;
+ line-height: 88rpx;
+ }
+
+ view {
+ padding: 0 20rpx;
+ height: 72rpx;
+ line-height: 72rpx;
+ vertical-align: middle;
+ }
+ }
</style>
--
Gitblit v1.9.3