南昌市物联网技防平台-小程序
Administrator
2021-05-28 ae2e87deb564cd619456d486d1050af5d5a82287
信息新增,信息核查完善
3 files modified
174 ■■■■ changed files
pages/infoRegistration/infoCheck.vue 114 ●●●● patch | view | raw | blame | history
pages/infoRegistration/infoRegistration.vue 43 ●●●●● patch | view | raw | blame | history
pages/patrol/patrol.vue 17 ●●●●● patch | view | raw | blame | history
pages/infoRegistration/infoCheck.vue
@@ -2,7 +2,10 @@
    <view class="content">
            <view class="row regis-info">
                <text class="info-title"><!-- <span style="color: red;">* --></span>客户名称: </text>
                <input class="input" type="text"  v-model="tenantName" placeholder="请输入客户名称" placeholder-class="placeholder" />
                <picker @change="tenantNameSelect" :range="tenantNameArray" class="tenant-select">
                      <label class="" v-model="tenantName">{{ tenantNameArrayType }}</label>
                </picker>
                <!-- <input class="input" type="text"  v-model="tenantName" placeholder="请输入客户名称" placeholder-class="placeholder" /> -->
            </view>
            <view class="row regis-info-linkman">
                <text class="info-title"><!-- <span style="color: red;">* --></span>联系人: </text>
@@ -18,7 +21,10 @@
            </view>
            <view class="row regis-info">
                <text class="info-title"><!-- <span style="color: red;">* --></span>客户类型: </text>
                <input class="input" type="text"  v-model="type" placeholder="请输入客户类型" placeholder-class="placeholder" />
                <picker @change="typeSelect" :range="typeArray" class="type-select">
                      <label class="" v-model="typeArrayType">{{ typeArrayType }}</label>
                </picker>
                <!-- <input class="input" type="text"  v-model="type" placeholder="请输入客户类型" placeholder-class="placeholder" /> -->
            </view>
            <view class="row regis-info-desc">
                <text class="info-title"><!-- <span style="color: red;">* --></span>域名地址: </text>
@@ -34,6 +40,7 @@
    export default{
        data () {
            return {
                id:"",
                tenantName:"",
                linkman:"",
                contactNumber:"",
@@ -44,27 +51,93 @@
                display1:'none',
                display2:'none',
                display3:'none',
                array:[],
                index:0,
                value: '',
                tenantlist:[
                    {
                        value: '选项1',
                        label: '黄金糕'
                    }
                ]
                tenantArr:[],
                tenantNameArray:[],
                tenantNameArrayIndex:0,
                tenantNameArrayType:'---请选择---',
                typeArray:["学校","医院","小区"],
                typeArrayIndex:0,
                typeArrayType:'---请选择---'
            }
        },
        onLoad() {
            
        },
        mounted(){
            this.getTenantList();
        },
        methods: {
            //获取客户信息
            getTenantList(){
                var that = this;
                uni.request({
                    url: 'https://web.byisf.com/api/blade-system/tenant/page',
                    method:'GET',
                    success: (res) => {
                        that.tenantArr = res.data.data.records;
                        if(that.tenantArr.length>0 ){
                            for (var i = 0; i < that.tenantArr.length; i++) {
                                if(that.tenantArr[i].tenantName!=""){
                                    that.tenantNameArray.push(that.tenantArr[i].tenantName);
                                }
                            }
                        }
                    }
                });
            },
            //客户名称下拉改变事件
            tenantNameSelect(e) {
                var that = this;
                this.tenantNameArrayIndex = e.target.value;
                this.tenantNameArrayType=this.tenantNameArray[this.tenantNameArrayIndex];
                //获取id
                for (var i = 0; i < that.tenantArr.length; i++) {
                    if(that.tenantArr[i].tenantName==that.tenantNameArrayType){
                        that.id = that.tenantArr[i].id;
                        that.linkman = that.tenantArr[i].linkman;
                        that.contactNumber = that.tenantArr[i].contactNumber;
                        that.address = that.tenantArr[i].address;
                        that.type = that.tenantArr[i].type;
                        if(that.tenantArr[i].type=="1"){
                            that.typeArrayType = '学校';
                        }
                        if(that.tenantArr[i].type=="2"){
                            that.typeArrayType = '医院';
                        }
                        if(that.tenantArr[i].type=="3"){
                            that.typeArrayType = '小区';
                        }
                        that.domain = that.tenantArr[i].domain;
                    }
                }
            },
            //客户类型下拉改变事件
            typeSelect(e){
                var that = this;
                this.typeArrayIndex = e.target.value;
                this.typeArrayType=this.typeArray[this.typeArrayIndex];
                if(that.typeArrayType == '学校'){
                    that.type = 1;
                }
                if(that.typeArrayType =='医院'){
                    that.type = 2;
                }
                if(that.typeArrayType =='小区'){
                    that.type = 3;
                }
            },
            //提交修改
            confirm(){
                uni.request({
                    // url: 'http://localhost:89/equipment/equipment/AppSubmit?'+params, //仅为示例,并非真实接口地址。
                    url: 'https://web.byisf.com/api/blade-system/tenant/submit', //仅为示例,并非真实接口地址。
                    url: 'https://web.byisf.com/api/blade-system/tenant/submit',
                    method:'POST',
                    data:{
                        "id":this.id,
                        "tenantName":this.tenantName,
                        "linkman":this.linkman,
                        "contactNumber":this.contactNumber,
@@ -151,12 +224,15 @@
        letter-spacing: 2rpx;
    }
    
    .region-select {
    .tenant-select{
        position: relative;
        left: 40rpx;
        top: 20rpx;
        width: 400rpx;
        height: 60rpx;
        /* border: 1rpx solid #C8C9CC; */
        left: 35rpx;
        top: 28rpx;
    }
    .type-select{
        position: relative;
        left: 45rpx;
        top: 28rpx;
    }
</style>
pages/infoRegistration/infoRegistration.vue
@@ -18,7 +18,10 @@
            </view>
            <view class="row regis-info">
                <text class="info-title"><!-- <span style="color: red;">* --></span>客户类型: </text>
                <input class="input" type="text"  v-model="type" placeholder="请输入客户类型" placeholder-class="placeholder" />
                <picker @change="typeSelect" :range="typeArray" class="type-select">
                      <label class="" v-model="typeArrayType">{{ typeArrayType }}</label>
                </picker>
                <!-- <input class="input" type="text"  v-model="type" placeholder="请输入客户类型" placeholder-class="placeholder" /> -->
            </view>
            <view class="row regis-info-desc">
                <text class="info-title"><!-- <span style="color: red;">* --></span>域名地址: </text>
@@ -44,21 +47,32 @@
                display1:'none',
                display2:'none',
                display3:'none',
                array:[],
                index:0,
                value: '',
                tenantlist:[
                    {
                        value: '选项1',
                        label: '黄金糕'
                    }
                ]
                typeArray:["学校","医院","小区"],
                typeArrayIndex:0,
                typeArrayType:'---请选择---'
            }
        },
        onLoad() {
            
        },
        methods: {
            //客户类型下拉改变事件
            typeSelect(e){
                var that = this;
                this.typeArrayIndex = e.target.value;
                this.typeArrayType=this.typeArray[this.typeArrayIndex];
                if(that.typeArrayType == '学校'){
                    that.type = 1;
                }
                if(that.typeArrayType =='医院'){
                    that.type = 2;
                }
                if(that.typeArrayType =='小区'){
                    that.type = 3;
                }
            },
            //提交信息
            confirm(){
                uni.request({
                    // url: 'http://localhost:89/equipment/equipment/AppSubmit?'+params, //仅为示例,并非真实接口地址。
@@ -151,12 +165,9 @@
        letter-spacing: 2rpx;
    }
    
    .region-select {
    .type-select{
        position: relative;
        left: 40rpx;
        top: 20rpx;
        width: 400rpx;
        height: 60rpx;
        /* border: 1rpx solid #C8C9CC; */
        left: 45rpx;
        top: 28rpx;
    }
</style>
pages/patrol/patrol.vue
@@ -15,22 +15,7 @@
        methods: {},
        mounted() {},
        onLoad: function(options) {
            var data = [];
            if (options.data == undefined) {
                data = [{
                    "id": '100000',
                    "place": '无数据',
                    "state": '0',
                    "dtype": '0',
                    "size": '300',
                    "jd": "115.822311",
                    "wd": "28.646341"
                }]
                data = JSON.stringify(data);
            }else{
                data = options.data;
            }
            this.urls = "https://web.byisf.com/xcxjingqingmap_patrol/xcxmap.html";
            this.urls = "https://web.byisf.com/xcxjingqingmap_patrol/xcxmap.html?snumber="+this.$store.state.puserID;
        },
    }
</script>