shuishen
2022-02-19 7d00ffecf10913818004c167677e68e7cf45d98b
我参与及注册页面更改
2 files modified
197 ■■■■■ changed files
pages/grabOrders/grabOrders.vue 23 ●●●●● patch | view | raw | blame | history
pages/registerUser/registerUser.vue 174 ●●●●● patch | view | raw | blame | history
pages/grabOrders/grabOrders.vue
@@ -5,7 +5,7 @@
                swiperWidth="750"></u-tabs-swiper>
        </view>
        <!-- @animationfinish="animationfinish" -->
        <swiper :current="swiperCurrent" @transition="transition"  @animationfinish="animationfinish"
        <swiper :current="swiperCurrent" @transition="transition" @animationfinish="animationfinish"
            style="height: calc(100vh - 40px);width: 100%">
            <swiper-item class="swiper-item" v-for="(item, index) in list" :key="index"
                style="height: 100vh; width: 100%">
@@ -113,8 +113,12 @@
                    d = {
                        serid: uni.getStorageSync("ids"),
                        type: val + "",
                    };
                    };
                if (val == 1) {
                    d.jurisdiction = this.$store.state.UserData.jurisdiction
                }
                uni.request({
                    url: this.$store.state.piAPI + "taskqd/selectLi",
                    method: "POST",
@@ -128,16 +132,17 @@
                        if (val == 1) {
                            that.rightdata = data;
                        } else {
                            let no = [],ok = [];
                            for(var k in data){
                                if(data[k].type !=1 ){
                            let no = [],
                                ok = [];
                            for (var k in data) {
                                if (data[k].type != 1) {
                                    no.push(data[k]);
                                }else{
                                } else {
                                    ok.push(data[k])
                                }
                            }
                            that.leftdata = [...no,...ok];
                            that.leftdata = [...no, ...ok];
                        }
                    },
                });
pages/registerUser/registerUser.vue
@@ -6,16 +6,12 @@
                <u-input v-model="form[item.froms]" :placeholder="item.placeholder" />
            </u-form-item>
            <u-form-item label="角色" prop="role" left-icon="account-fill" label-width="200" :required="true">
                <u-radio-group v-model="form.role" @change="radioGroupChange">
                    <u-radio v-for="(item, index) in role" :key="index" :name="item.name" :disabled="item.disabled">
                        {{ item.name }}
                    </u-radio>
                </u-radio-group>
                <u-input v-model="form.role" type="select" placeholder="请选择角色" :border="true" @click="depl" />
                <u-select v-model="show" mode="mutil-column-auto" :list="roleList" @confirm="radioGroupChange"></u-select>
            </u-form-item>
            <u-form-item label="组织机构" prop="obj" left-icon="account-fill" label-width="200" :required="true"
            <u-form-item label="工作单位" prop="obj" left-icon="account-fill" label-width="200" :required="true"
                v-if="xqShow">
                <u-input v-model="form.obj" type="select" placeholder="请选择组织机构" :border="true" @click="depl" />
                <u-select v-model="show" mode="mutil-column-auto" :list="listbm" @confirm="confirm"></u-select>
                <u-input v-model="form.obj" placeholder="请输入工作单位" />
            </u-form-item>
            <u-form-item label="辖区" prop="xq" left-icon="account-fill" label-width="200" :required="true">
                <u-input v-model="form.xq" type="select" placeholder="请选择辖区" :border="true" @click="deplxq" />
@@ -52,14 +48,14 @@
                        img: 'man-add-fill',
                        froms: 'user',
                        requireds: true,
                        placeholder: '请输入帐号'
                        placeholder: '请输入身份证号'
                    },
                    {
                        title: '密码',
                        img: 'lock-fill',
                        froms: 'pass',
                        requireds: true,
                        placeholder: '请输入密码'
                        placeholder: '请输入6~16位密码'
                    },
                    {
                        title: '确认密码',
@@ -106,30 +102,6 @@
                        disabled: false
                    },
                ],
                role: [{
                        name: '民警',
                        disabled: false
                    },
                    {
                        name: '群众',
                        disabled: false
                    },
                    {
                        name: '群防队伍',
                        disabled: false
                    },
                    // {
                    //     name: '保安',
                    //     disabled: false
                    // },
                ],
                objList: [{
                        text: '赣州'
                    },
                    {
                        text: '南昌'
                    }
                ],
                form: {
                    user: '',
                    pass: '',
@@ -147,18 +119,27 @@
                rules: {
                    user: [{
                        required: true,
                        message: '请输入账号',
                        message: '请输入身份证号',
                        // 可以单个或者同时写两个触发验证方式 
                        trigger: ['change', 'blur'],
                    }, {
                        pattern: /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/,
                        message: '证件号码格式有误!',
                        trigger: 'blur'
                    }],
                    pass: [{
                        required: true,
                        message: '请输入密码',
                        message: '请输入6~16位密码',
                        // 可以单个或者同时写两个触发验证方式 
                        trigger: ['change', 'blur'],
                    }, {
                        min: 6,
                        message: '密码不能少于6个字',
                        message: '密码不能少于6位',
                        trigger: ['change', 'blur']
                    }, {
                        min: 16,
                        message: '密码不能超出16位',
                        trigger: ['change', 'blur']
                    }],
                    passTwo: [{
@@ -187,7 +168,7 @@
                    }],
                    obj: [{
                        required: true,
                        message: '请选择组织机构',
                        message: '请输入工作单位',
                        // 可以单个或者同时写两个触发验证方式 
                        trigger: ['change', 'blur'],
                    }],
@@ -240,7 +221,17 @@
                faceState: -2,
                facebc: '#fff',
                faceco: '#000',
                faceMsg: ''
                faceMsg: '',
                roleList: [
                    {label: '民警', value: 1417092295132561409},
                    {label: '治保会队伍', value: 1424615693403414529},
                    {label: '内保干部队伍', value: 1424615773594312705},
                    {label: '治安巡防队伍', value: 1424615835435130881},
                    {label: '信息员队伍', value: 1424615909959524354},
                    {label: '保安员队伍', value: 1424615972718895106},
                    {label: '警务辅助队伍', value: 1424616047083905026},
                    {label: '平安志愿者', value: 1494565079268491266}
                ]
            };
        },
        methods: {
@@ -258,40 +249,44 @@
            },
            depl() {
                var that = this;
                uni.request({
                    url: that.$store.state.piAPI + "/blade-system/dept/trees",
                    method: 'get',
                    success: (res) => {
                        var routerArr = res.data.data;
                        var arr = that.formatRoutes(routerArr);
                        var list = [];
                        if (that.deptXb != "") {
                            list.push(arr[that.deptXb]);
                            for (var i = 0; i < list.length; i++) {
                                list[i].children.unshift({
                                    label: '--请选择--',
                                    value: 0,
                                    children: []
                                })
                                for (var j = 0; j < list[i].children.length; j++) {
                                    list[i].children[j].children.unshift({
                                        label: '--请选择--',
                                        value: 0,
                                    })
                                }
                            }
                            that.listbm = list;
                            that.show = true;
                        } else {
                            uni.showToast({
                                title: '请选择角色',
                                icon: "none",
                                duration: 1000
                            });
                        }
                    }
                })
                that.show = true;
            },
            // depl() {
            //     var that = this;
            //     uni.request({
            //         url: that.$store.state.piAPI + "/blade-system/dept/trees",
            //         method: 'get',
            //         success: (res) => {
            //             var routerArr = res.data.data;
            //             var arr = that.formatRoutes(routerArr);
            //             var list = [];
            //             if (that.deptXb != "") {
            //                 list.push(arr[that.deptXb]);
            //                 for (var i = 0; i < list.length; i++) {
            //                     list[i].children.unshift({
            //                         label: '--请选择--',
            //                         value: 0,
            //                         children: []
            //                     })
            //                     for (var j = 0; j < list[i].children.length; j++) {
            //                         list[i].children[j].children.unshift({
            //                             label: '--请选择--',
            //                             value: 0,
            //                         })
            //                     }
            //                 }
            //                 that.listbm = list;
            //                 that.show = true;
            //             } else {
            //                 uni.showToast({
            //                     title: '请选择角色',
            //                     icon: "none",
            //                     duration: 1000
            //                 });
            //             }
            //         }
            //     })
            // },
            deplxq() {
                var that = this;
                uni.request({
@@ -319,19 +314,6 @@
                        that.showxq = true;
                    }
                })
            },
            confirm(e) {
                var arr = "";
                var data = [];
                for (var i = 0; i < e.length; i++) {
                    if (e[i].value != "0") {
                        arr += e[i].value + ",";
                        data.push(e[i]);
                    }
                }
                var obj = arr.substr(0, arr.length - 1);
                this.form.obj = data[data.length - 1].label;
                this.form.objId = obj;
            },
            confirmxq(e) {
                var arr = "";
@@ -392,25 +374,13 @@
            dataChange(data) {
                console.log(data);
            },
            objCallback(index) {
                this.form.obj = this.objList[index].text;
            },
            // 选中任一radio时,由radio-group触发
            radioGroupChange(e) {
                this.xqShow = true;
                if (e == "群众") {
                    this.xqShow = false;
                    this.form.jsid = '1416225849858883585';
                    this.form.objId = '1424616967934959617,1424617046523633666';
                } else if (e == "民警") {
                    this.form.jsid = '1417092295132561409';
                    this.deptXb = "0";
                } else if (e == "群防队伍") {
                    this.deptXb = "1";
                    this.form.jsid = '1372092102682521602';
                } else if (e == "保安") {
                    this.form.jsid = '';
                }
                this.form.role = e[0].label
                this.form.jsid = e[0].value
                this.show = false;
            }
        },
        onReady() {