智慧农业大数据平台
guanqb
2022-08-31 78c2c070c36a8ade2c3b553ffabb4b7bcff82020
个人中心
3 files modified
2 files added
151 ■■■■ changed files
public/img/editLogin.webp patch | view | raw | blame | history
public/img/icon/user.png patch | view | raw | blame | history
src/views/equipment/index.vue 35 ●●●● patch | view | raw | blame | history
src/views/login/index.vue 2 ●●●●● patch | view | raw | blame | history
src/views/lyout/index.vue 114 ●●●●● patch | view | raw | blame | history
public/img/editLogin.webp
Binary files differ
public/img/icon/user.png
src/views/equipment/index.vue
@@ -8,21 +8,21 @@
                </span>
            </div>
            <div class="title">
                    {{currentDetails.farmName}}
<!--                <el-select-->
<!--                    class="equipment-plot-select"-->
<!--                    v-model="plotName"-->
<!--                    placeholder="选择地块"-->
<!--                    @change="landChangeValue($event)"-->
<!--                >-->
<!--                    <el-option-->
<!--                        v-for="(item, index) in plotList"-->
<!--                        :key="index"-->
<!--                        :label="item.landName"-->
<!--                        :value="item.id"-->
<!--                    ></el-option>-->
<!--                </el-select>-->
<!--
                {{currentDetails.farmName}}
                <!--                <el-select-->
                <!--                    class="equipment-plot-select"-->
                <!--                    v-model="plotName"-->
                <!--                    placeholder="选择地块"-->
                <!--                    @change="landChangeValue($event)"-->
                <!--                >-->
                <!--                    <el-option-->
                <!--                        v-for="(item, index) in plotList"-->
                <!--                        :key="index"-->
                <!--                        :label="item.landName"-->
                <!--                        :value="item.id"-->
                <!--                    ></el-option>-->
                <!--                </el-select>-->
                <!--
                <el-select
                    class="equipment-plot-select"
                    v-model="farmName"
@@ -35,7 +35,7 @@
                        :label="item.farmName"
                        :value="item.id"
                    ></el-option>
                </el-select> -->
                </el-select>-->
            </div>
        </div>
@@ -515,6 +515,7 @@
            const startTime = dateUtils.getSpecifyDayDate(10)// 获取10天前时间
            const endTime = dateUtils.getDayLast()// 获取今天最后日期
            getStationDateByStcd(stcd, startTime, endTime).then((res) => {
                console.log(res.data.data, '1111111111111111111234')
                // 遍历气象大集合
                res.data.data.weatherList.forEach(function (item, index) {
                    // 把气象无效数据过滤掉
@@ -582,7 +583,7 @@
            if (flvjs.isSupported()) {
                // var arr = this.vidList
                arr.forEach((item, index) => {
                    console.log(item.wssFlv,11112233)
                    console.log(item.wssFlv, 11112233)
                    if (item.wssFlv) {
                        var videoElement = document.getElementById(`videoElement${index}`)
                        this.flvPlayer = flvjs.createPlayer({
src/views/login/index.vue
@@ -112,6 +112,8 @@
                        if (res.data.access_token) {
                            this.$store.commit('setUser', res.data)
                            auth.setToken(res.data.access_token)
                            console.log('23232323', res.data)
                            window.localStorage.setItem('userName', res.data.nick_name)//赋值
                            this.$router.push({ path: '/' })
                        } else {
                            this.$message({
src/views/lyout/index.vue
@@ -27,6 +27,19 @@
                        :class="{on: currentPath == '/lyout/weather'}"
                        :data-path="'/lyout/weather'"
                    >气象监测</div>
                    <div class="userIcon" :class="{on: userOn == true}" @click="openUser">
                        <div class="userDetail" v-if="isShowUserDetail">
                            <div class="triangle"></div>
                            <div class="userName">用户名:{{userName}}</div>
                            <div class="userBtn">
                                <div class="edit" @click="goTOLogin">
                                    >
                                    <img src="../../../public/img/editLogin.webp" alt />
                                </div>
                                <div class="return" @click="goTOFllow">返回引导页</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
@@ -37,10 +50,14 @@
</template>
<script>
export default {
    data () {
        return {
            currentPath: ''
            currentPath: '',
            userOn: false,
            isShowUserDetail: false,
            userName: window.localStorage.getItem('userName')
        }
    },
    mounted () {
@@ -58,6 +75,17 @@
                this.currentPath = e.target.dataset.path
                this.$router.push(e.target.dataset.path)
            }
        },
        openUser () {
            this.userOn = !this.userOn
            this.isShowUserDetail = !this.isShowUserDetail
        },
        goTOLogin () {
            window.location.href = 'http://dev.jxpskj.com:8020/ncny/login.html'
            // this.$router.push({ path: '/login' })
        },
        goTOFllow () {
            window.location.href = 'http://dev.jxpskj.com:8020/ncny/systemwall2/index.html'
        }
    }
}
@@ -112,19 +140,97 @@
            }
            .r {
                margin-right: 32px;
                margin-right: 12px;
                display: flex;
                .nav {
                    margin-right: 16px;
                    background: url(../../../public/img/right-select.png) no-repeat;
                    background: url(../../../public/img/right-select.png)
                        no-repeat;
                    background-size: 100% 100%;
                }
                .nav.on {
                    background: url(../../../public/img/right-selected.png) no-repeat;
                    background: url(../../../public/img/right-selected.png)
                        no-repeat;
                    background-size: 100% 100%;
                }
                .userIcon {
                    height: 40px;
                    width: 40px;
                    border-radius: 50%;
                    margin-top: 4px;
                    cursor: pointer;
                    background: url(../../../public/img/icon/user.png) no-repeat;
                    background-size: 100% 100%;
                    box-shadow: inset 2px 2px 10px #0e7894,
                        inset -2px -2px 10px #0e7894;
                    .userDetail {
                        width: 240px;
                        height: 92px;
                        position: absolute;
                        top: 64px;
                        right: 4px;
                        background: rgba(3, 82, 102, 0.8);
                        border-radius: 8px;
                        cursor: default;
                        .triangle {
                            position: absolute;
                            top: -16px;
                            right: 20px;
                            // background-color: red;
                            width: 0px;
                            height: 0px;
                            border: 8px solid #000;
                            border-top-color: transparent;
                            border-bottom-color: rgba(3, 82, 102, 0.8);
                            border-left-color: transparent;
                            border-right-color: transparent;
                        }
                        .userName {
                            width: 100%;
                            height: 40px;
                            font-size: 14px;
                            font-weight: 500;
                            color: #6de9f3;
                            line-height: 22px;
                            border-bottom: 1px solid rgba(255, 255, 255, 0.5);
                            position: absolute;
                            top: 0px;
                        }
                        .userBtn {
                            width: 100%;
                            height: 50px;
                            position: absolute;
                            bottom: 0px;
                            display: flex;
                            justify-content: space-around;
                            & > div {
                                width: 100px;
                                height: 40px;
                                background-color: rgba(109, 233, 243, 1);
                                border-radius: 4px;
                                cursor: pointer;
                                img {
                                    width: 76px;
                                    height: 20px;
                                }
                            }
                            .return {
                                margin-left: -10px;
                                color: #198592;
                                font-size: 14px;
                            }
                        }
                    }
                }
                .userIcon.on {
                    box-shadow: inset 2px 2px 10px #00f6ff,
                        inset -2px -2px 10px #00f6ff;
                }
            }
            .c {