From fe0193aa07a3db1b6e913c852007298c598d2252 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Tue, 31 Oct 2023 19:12:36 +0800
Subject: [PATCH] 删除原水库页面
---
/dev/null | 34 -----
pages.json | 326 ------------------------------------------------------
2 files changed, 1 insertions(+), 359 deletions(-)
diff --git a/pages.json b/pages.json
index a08b275..7146f3f 100644
--- a/pages.json
+++ b/pages.json
@@ -31,301 +31,10 @@
],
"subPackages": [
- //登录
- {
- "root": "subPackage/login",
- "pages": [{
- "path": "login-account",
- "style": {
- "navigationBarTitleText": "账号登录",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom"
- }
- },
- {
- "path": "login-code",
- "style": {
- "navigationBarTitleText": "验证码登录",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom"
- }
- }
- ]
- },
- //实时监控
- {
- "root": "subPackage/realtimeMonitor",
- "pages": [
- //搜索页
- {
- "path": "search/index",
- "style": {
- "navigationBarTitleText": "搜索",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom"
- }
- },
- //实时监控列表
- {
- "path": "realtimeMonitor/index",
- "style": {
- "navigationBarTitleText": "实时监视",
- // "navigationBarBackgroundColor":"#51A4FA",
- "enablePullDownRefresh": false,
- "onReachBottomDistance": 100,
- "navigationStyle": "custom",
- "navigationBarTextStyle": "white"
- }
- },
- //水库详情
- {
- "path": "reservoir/detail",
- "style": {
- "navigationBarTitleText": "水库详情页",
- "navigationBarTextStyle": "white",
- "navigationBarBackgroundColor": "#5887f9",
- "enablePullDownRefresh": false,
- "backgroundColor": "#F9F9FA"
- }
- },
-
- //实时汛情统计数据
- {
- "path": "reservoir/floodSituationStatistics",
- "style": {
- "navigationBarTitleText": "水库统计",
- "enablePullDownRefresh": false
- }
- },
- //报汛
- {
- "path": "reservoir/reportFlood",
- "style": {
- "navigationBarTitleText": "报汛",
- "enablePullDownRefresh": false
- }
- }
- ]
- },
- //大坝安全
- {
- "root": "subPackage/dbSafety",
- "pages": [{
- "path": "index",
- "style": {
- "navigationBarTitleText": "大坝安全监测",
- "navigationBarBackgroundColor": "#5887f9",
- "navigationBarTextStyle": "white",
- "navigationStyle": "custom",
- "enablePullDownRefresh": true
- }
- },
- {
- "path": "bxList",
- "style": {
- "navigationBarTitleText": "变形监测",
- "navigationBarBackgroundColor": "#5887f9",
- "navigationBarTextStyle": "white",
- "navigationStyle": "custom"
- }
- },
- {
- "path": "slList",
- "style": {
- "navigationBarTitleText": "渗流监测",
- "navigationBarBackgroundColor": "#5887f9",
- "navigationBarTextStyle": "white",
- "navigationStyle": "custom"
- }
- },
- {
- "path": "daba",
- "style": {
- "navigationBarTitleText": "监测分析",
- "navigationBarBackgroundColor": "#5887f9",
- "navigationBarTextStyle": "white"
- }
- }
- ]
- },
- //雨水情信息
- {
- "root": "subPackage/rainWaterCondition",
- "pages": [{
- "path": "rainWaterCondition",
- "style": {
- "navigationBarTitleText": "雨水情信息",
- "navigationBarBackgroundColor": "#5887f9",
- "navigationBarTextStyle": "white",
- "navigationStyle": "custom",
- "enablePullDownRefresh": true
- }
- }]
- },
-
- //巡检
- {
- "root": "subPackage/patrol",
- "pages": [
- //巡查任务列表
- {
- "path": "patrol",
- "style": {
- "navigationBarTitleText": "安全巡查",
- "enablePullDownRefresh": false
- }
- },
- //巡查上报
- {
- "path": "patrolReport",
- "style": {
- "navigationBarTitleText": "巡查报告",
- "enablePullDownRefresh": false
- }
- },
- //巡查项填写
- {
- "path": "itemRecord",
- "style": {
- "navigationBarTitleText": "填写报告",
- "enablePullDownRefresh": false
- }
- },
- //巡查任务详情
- {
- "path": "patrolDetail",
- "style": {
- "navigationBarTitleText": "任务详情",
- "enablePullDownRefresh": false
- }
- },
- //巡查项详情
- {
- "path": "itemDetail",
- "style": {
- "navigationBarTitleText": "巡查项详情",
- "enablePullDownRefresh": false
- }
- },
- {
- "path": "patrolHandle",
- "style": {
- "navigationBarTitleText": "巡查处理",
- "enablePullDownRefresh": false
- }
- }
- ]
- },
//我的
{
"root": "subPackage/user",
"pages": [
- //修改密码
- {
- "path": "password",
- "style": {
- "navigationBarTitleText": "修改密码",
- "enablePullDownRefresh": false
- }
- },
- {
- "path": "addressList",
- "style": {
- "navigationBarTitleText": "通讯录",
- "enablePullDownRefresh": false
- }
- },
- {
- "path": "feedback",
- "style": {
- "navigationBarTitleText": "反馈与建议",
- "enablePullDownRefresh": false
- }
- },
- //历史报汛
- {
- "path": "historical/index",
- "style": {
- "navigationBarTitleText": "历史报汛",
- "enablePullDownRefresh": false
- }
- },
-
- //报汛详情
- {
- "path": "historical/detail/index",
- "style": {
- "navigationBarTitleText": "报汛详情",
- "enablePullDownRefresh": false
- }
- },
- {
- "path": "history/patrol",
- "style": {
- "navigationBarTitleText": "历史巡查",
- "enablePullDownRefresh": false
- }
- },
- {
- "path": "history/detail/patrolDetail",
- "style": {
- "navigationBarTitleText": "处理详情",
- "enablePullDownRefresh": false
- }
- },
- {
- "path": "history/protect",
- "style": {
- "navigationBarTitleText": "历史管护",
- "enablePullDownRefresh": false
- }
- },
- {
- "path": "history/scheduling",
- "style": {
- "navigationBarTitleText": "历史调度",
- "enablePullDownRefresh": false
- }
- },
- {
- "path": "history/danger",
- "style": {
- "navigationBarTitleText": "历史险情上报",
- "enablePullDownRefresh": false
- }
- },
- {
- "path": "history/detail/dangerDetail",
- "style": {
- "navigationBarTitleText": "历史险情详情",
- "enablePullDownRefresh": false
- }
- },
-
- //隐私政策
- {
- "path": "privacyPolicy",
- "style": {
- "navigationBarTitleText": "隐私政策",
- "enablePullDownRefresh": false
- }
- },
- //消息
- {
- "path": "message/index",
- "style": {
- "navigationBarTitleText": "消息",
- "enablePullDownRefresh": false
- }
- },
- //消息详情
- {
- "path": "message/detail/index",
- "style": {
- "navigationBarTitleText": "消息详情",
- "enablePullDownRefresh": false
- }
- },
//切换角色
{
"path": "role/index",
@@ -338,40 +47,7 @@
}
]
},
- //监测上报
- {
- "root": "subPackage/jcsb",
- "pages": [{
- "path": "jcsb/index",
- "style": {
- "navigationBarTitleText": "险情上报",
- "enablePullDownRefresh": false
- }
- },
- {
- "path": "manageProtect/index",
- "style": {
- "navigationBarTitleText": "管护上报",
- "enablePullDownRefresh": false
- }
- },
- {
- "path": "modules/scheduling",
- "style": {
- "navigationBarTitleText": "调度模块",
- "enablePullDownRefresh": false
- }
- },
- {
- "path": "db/index",
- "style": {
- "navigationBarTitleText": "监测上报",
- "enablePullDownRefresh": false
- }
- }
- ]
- },
-
+
//工作台
{
"root": "subPackage/workbench",
diff --git a/pages/home/components/List.vue b/pages/home/components/List.vue
deleted file mode 100644
index 19e99ff..0000000
--- a/pages/home/components/List.vue
+++ /dev/null
@@ -1,249 +0,0 @@
-<template>
- <view class="list">
- <view @click="navigatorPage(item)" class="list_item" v-for="(item,index) in list" :key="index">
- <view class="list_info">
- <view class="name">
- <text>{{item.res_nm}}</text>
-
- <span style="color: #1180ff;" v-show="item.is_gate&&item.is_gate.indexOf('有闸') != -1">(有闸)</span>
- <span style="color: #FF5757;" v-if="item.is_danger_res == 'true'">(病)</span>
- </view>
- <view class="oth_reg_cd">
- <view>{{isNull(item.oth_reg_cd)}}</view>
- </view>
- </view>
- <view class="list_data">
- <view class="list_left">
- <image v-if="item.station_image" class="list_img" :src="item.current_site_image.url">
- </image>
- <image v-else class="list_img" src="https://sk.hubeishuiyi.cn/business/img/emptyImg.514374af.png">
- </image>
- </view>
-
- <view class="list_right">
- <view class="line">
- <view class="item item1">
- <view class="l">当前水位:</view>
- <view class="r" :style="{color:item.over_z>0?'#FF1818':''}">
- <text> {{isNull(item.rz)}}m</text>
- <text v-if="item.powerIconShow" class="iconfont" :class="item.iconClass"></text>
- </view>
- </view>
- <view class="item item2">
- <view class="item">
- <view class="l">今日雨量:</view>
- <view class="r">{{isNull(item.cur_drp)}}mm</view>
- </view>
- </view>
- </view>
-
- <view class="line">
- <view class="item item1">
- <view class="l">汛限水位:</view>
- <view class="r">{{isNull(item.flse_lim_stag)}}m</view>
- </view>
- <view class="item item2">
- <view class="l">比汛限:</view>
- <view class="r" :style="{color:item.over_z>0?'#FF1818':''}">{{isNull(item.over_z)}}m</view>
- </view>
- </view>
-
- <view v-if="item.control_z" class="line">
- <view class="item item1">
- <view class="l">控制水位:</view>
- <view class="r">{{isNull(item.control_z)}}m</view>
- </view>
- <view class="item item2">
- <view class="l">比控制:</view>
- <view class="r">{{item.control_z?(item.rz-item.control_z).toFixed(2):'--'}}m</view>
- </view>
- </view>
-
- <view class="line">
- <view class="item item1">
- <view class="l">堰顶高程:</view>
- <view class="r">{{isNull(item.weir_top_elev)}}m</view>
- </view>
- <view class="item item2">
- <view class="l">坝顶高程:</view>
- <view class="r">{{isNull(item.dam_top_elevation)}}m</view>
- </view>
- </view>
-
- <view class="line">
- <view class="item item1">
- <view class="l">24h预报:</view>
- <view class="r">--</view>
- </view>
- <view class="item item2">
- <view class="l">昨日雨量:</view>
- <view class="r">{{isNull(item.ytr_drp)}}mm</view>
- </view>
- </view>
-
- <view class="line">
- <view class="item">
- <view class="l">纳雨量:</view>
- <view class="r"> --(到汛限) | --(到坝顶)</view>
- </view>
- </view>
- </view>
- </view>
- <view class="time">监测时间:{{isNull(item.tm)}}</view>
-
- </view>
- </view>
-</template>
-
-<script>
- export default {
- props: {
- list: {
- type: Array,
- default: () => []
- }
- },
- computed: {
- getTextColor() {
- return (num) => {
- if (num > 0) {
- return 'color: #FF1818;'
- } else {
- return ''
- }
- }
- },
- isNull() {
- return (prop) => {
- if (prop === 0 || prop) {
- return prop
- } else {
- return "--"
- }
- }
- }
- },
- data() {
- return {
-
- }
- },
- methods: {
- navigatorPage(item) {
- let data = {
- id: item.res_cd,
- name: item.res_nm
- }
- let url = "/subPackage/realtimeMonitor/reservoir/detail?item=" + JSON.stringify(data)
- this.$u.func.globalNavigator(url, "navTo")
- }
- }
- }
-</script>
-
-<style lang="scss" scoped>
- .list {
- box-sizing: border-box;
-
- .list_item:nth-child(n+2) {
- padding-top: 36rpx;
- }
-
- .list_item:last-child {
- padding-bottom: 30rpx;
- }
-
- .common {
- padding-top: 16rpx;
- }
-
- .list_info {
- display: flex;
- justify-content: space-between;
- align-items: center;
-
- .oth_reg_cd {
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #BBBBBB;
- }
-
- .title {
- color: #333333;
- font-family: PingFang-SC-Heavy;
- font-size: 35rpx;
-
- .status {
- color: #FF5757;
- font-weight: bold;
- font-size: 35rpx;
- font-family: PingFang-SC-Heavy;
- }
- }
-
- .over {
- height: 20rpx;
- font-size: 20rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FF4A4A;
- line-height: 17rpx;
- margin-bottom: 10rpx;
- }
- }
-
- .list_data {
- display: flex;
- justify-content: space-around;
- height: 288rpx;
-
- .list_left {
- font-size: 0;
- display: flex;
- align-items: center;
-
- .list_img {
- width: 276rpx;
- height: 244rpx;
- border-radius: 14rpx;
- }
- }
-
- .list_right {
- width: 84%;
- font-size: 24rpx;
- line-height: 30rpx;
- margin-left: 20rpx;
-
- .line {
- display: flex;
-
- .item {
- display: flex;
- width: 50%;
- line-height: 48rpx;
- align-items: center;
- white-space: nowrap;
- }
-
- .item1 {
- width: 55%;
- }
-
- .item2 {
- width: 40%;
- }
- }
- }
- }
-
- .time {
- font-size: 26rpx;
- border-top: 1px solid #e8ecef;
- color: #999999;
- padding: 10rpx 0;
- }
-
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/dbSafety/bxList.vue b/subPackage/dbSafety/bxList.vue
deleted file mode 100644
index e6957d9..0000000
--- a/subPackage/dbSafety/bxList.vue
+++ /dev/null
@@ -1,460 +0,0 @@
-<template>
- <view class="container">
- <!--顶部导航栏-->
- <view class="customizeBar">
- <u-navbar placeholder title="变形监测" autoBack bgColor="#5887f9" titleStyle="color:#ffffff"
- leftIconColor="#ffffff" safeAreaInsetTop>
- </u-navbar>
- </view>
-
- <!--筛选栏-->
- <view class="top-bar">
- <mySearch v-if="mySearchShow" :defaultValue="adBase" :keyWord="query.res_nm" @getKey="getSearchKey"
- @regionChange="regionChange" @basinChange="basinChange">
- </mySearch>
- <uFilter :top="filterTop" :menuList="dropDownData" :defaultModel="defaultSelected" @submit='dropDownConfirm'
- @reset='resetDropDown'></uFilter>
- </view>
-
- <view class="data-list">
- <view class="data-item" v-for="(item,index) in dataList" :key="index">
- <dataItem :item="item" type="bx">
-
- </dataItem>
- </view>
-
-
- <u-loading-page :loading="loadingPage"></u-loading-page>
- <u-loading-icon text="加载中" textSize="18" :show="loadingIcon"></u-loading-icon>
-
- </view>
-
- </view>
-</template>
-
-<script>
- import uFilter from "@/subPackage/dbSafety/components/filterBar.vue"
- import mySearch from "@/subPackage/dbSafety/components/my-search.vue"
- import dataItem from "@/subPackage/dbSafety/components/dataItem.vue"
- import {
- bizDictionary
- } from "@/api/system/dict"
- import {
- dropDownData
- } from "@/subPackage/dbSafety/const/dropDownData.js"
- import {
- getLatestSySlData
- } from "@/api/dataCenter/dbSafety/dbSafety"
- import {
- reservoirList
- } from "@/api/dataCenter/reservoir/reservoir"
- export default {
- components: {
- mySearch,
- uFilter,
- dataItem
- },
-
- data() {
- return {
- //当用户没有行政区划时为false,隐藏搜索框
- mySearchShow: true,
- //当前登录用户的行政区划
- adBase: uni.getStorageSync("adCodeBase"),
- //查询参数
- query: {},
- //下拉选项
- dropDownData: dropDownData,
- //默认选中
- defaultSelected: {},
-
- //列表数据
- dataList: [],
-
- page: {
- pageSize: 48,
- pageNo: 1
- },
-
- loadingPage: false,
- loadingIcon: false,
- }
- },
- computed: {
- //自适应计算筛选栏高度
- filterTop() {
- const info = uni.getWindowInfo()
- const statusBar = info.statusBarHeight
- return 69 - (statusBar / 2)
- }
- },
- created() {
-
- },
- mounted() {
-
- },
- onLoad(option) {
- this.initDict()
- },
- onShow() {
-
- },
- onReachBottom() {
- this.page.pageNo += 1
- this.getDataList()
- },
- methods: {
- //初始化字典
- initDict() {
- bizDictionary({
- code: "RES_LABEL"
- }).then(res => {
- let data = res.data
- let obj = this.dropDownData[0].children.find(e => e.label == "标签")
- obj.option = []
-
- data.forEach(e => {
- obj.option.push({
- label: e.dictValue,
- value: `${e.dictKey}`
- })
- })
- this.initDefault()
- this.buildRegion(this.adBase)
- })
- },
-
- //初始化默认选择
- initDefault() {
- this.defaultSelected = {
- //排序
- is_order: "1",
- //是否有数据
- is_has_data: "y",
- //工程规模
- eng_scal: "",
- //是否病险
- danger_stat: "",
- //标签
- label_str: "",
- //收藏
- collect: "",
- }
-
- Object.assign(this.query, this.defaultSelected)
-
- },
-
- //获取输入框搜索条件
- getSearchKey(key) {
- this.query.res_nm = key
- this.reload()
- },
-
- //行政区划改变
- regionChange(region) {
- this.buildRegion(region)
- },
-
- //流域变更
- basinChange(basin) {
- console.log("流域:", basin)
- this.query.bas_guid = basin.name
- this.reload()
- },
-
- //下拉选择项
- dropDownConfirm(data) {
- console.log("下拉选择项:", data)
- this.page.pageNo = 1
-
- let objKey = Object.keys(data)
-
- objKey.forEach(key => {
- if (data["label_str"] && key == "label_str") {
- this.query[key] = data[key].join(",")
- } else {
- this.query[key] = data[key]
- }
- })
- console.log(this.query, "---------")
- this.getDataList()
- },
-
- //重置下拉选项
- resetDropDown() {
- this.initDefault()
- this.reload()
- },
-
- //重新加载
- reload() {
- this.page.pageNo = 1
- this.getDataList()
- },
-
- //获取列表数据
- async getDataList() {
-
- if (this.page.pageNo == 1) {
- this.dataList = []
- this.loadingPage = !this.loadingPage
- } else {
- this.loadingIcon = !this.loadingIcon
- }
-
- let params = {}
- Object.assign(params, this.query, this.page, this.getResIds())
-
- console.log("查询条件", Object.assign(params, this.query, this.page, this.getResIds()))
-
- const res = await getLatestSySlData(params)
- let data = res.data
- console.log(res, "-----")
-
- let arr = await this.buildArr(data)
- this.dataList = this.dataList.concat(arr)
-
- if (this.page.pageNo == 1) {
- this.loadingPage = !this.loadingPage
- } else {
- this.loadingIcon = !this.loadingIcon
- }
-
- console.log("最终数据", this.dataList)
- },
-
- getResIds() {
- if (this.query.collect == 1) {
- this.collectResIds = this.userInfo.detail.collect ? this.userInfo.detail.collect : 0
- this.collectResIds = this.collectResIds.split(",").map(e => `${e}`).join(",")
- } else {
- this.collectResIds = ""
- }
- return {
- res_str: this.collectResIds
- }
- },
-
- //构建arr
- async buildArr(data) {
- let resCds = []
- let arr = []
-
- //遍历sy列表
- data.sy.forEach((sy, index) => {
-
- //判断sl列表中是否有相同的res_cd
- const sl = data.sl.find(v => v.res_cd === sy.res_cd)
-
- //有则把sl数据添加进arr中
- if (sl) {
- arr.push({
- sy: sy,
- sl: sl
- })
- } else {
- arr.push({
- sy: sy,
- sl: {}
- })
- }
-
- resCds.push(sy.res_cd)
- })
-
- arr.forEach(item => {
- item.sy.children.sort((a, b) => a.cd - b.cd)
-
- item.sy.children.forEach(item => {
- if (item.trend == '1') {
- item.iconClass = 'icon-wendushangsheng'
- } else if (item.trend == '-1') {
- item.iconClass = 'icon-wenduxiajiang'
- } else if (item.trend == '0') {
- item.iconClass = 'icon-a-youjiantouzhixiangyoujiantou'
- }
- })
- })
-
- //遍历渗流数组
- data.sl.forEach((sl, index) => {
-
- //判断arr中是否已有相同的sl数据
- const sy = arr.find(v => {
-
- if (v.sl.res_cd) {
- return v.sl.res_cd === sl.res_cd
- } else {
- return false
- }
- })
- if (sy) {
-
- } else {
- arr.push({
- sy: {},
- sl: sl
- })
- }
- resCds.push(sl.res_cd)
- })
-
- console.log(arr, "------------")
- console.log(resCds, "/*/*/*")
- const res_cds = resCds.map(e => `'${e}'`).join(",")
- const res = await reservoirList(999, 1, {
- res_cds
- })
-
- let reservoirData = res.data.data
- //循环arr,从reservoirData中获取当前水位,昨日雨量
- arr.forEach(item => {
- reservoirData.forEach(reservoir => {
- if (item.sy.res_cd == reservoir.res_cd || item.sl.res_cd == reservoir.res_cd) {
-
-
- reservoir.current_site_image = ''
- reservoir.current_site_image_index = ''
- reservoir.imagesArray = []
-
- if (reservoir.station_image && reservoir.station_image.trim().length > 0) {
-
- let arr = []
-
- if (reservoir.station_image.indexOf(',') != -1) {
- arr = reservoir.station_image.split(',').map(arrItem => {
- if (arrItem.indexOf('~') != -1) {
- if (arrItem.split('~').length > 2) {
- arrItem = arrItem.split('~')
- } else {
- let cur = arrItem.split('~')
- cur.push(this.publicPath +
- 'img/emptyImg.514374af.png')
- arrItem = cur
- }
- }
-
- return arrItem
- })
- } else {
- if (reservoir.station_image.indexOf('~') != -1) {
- if (reservoir.station_image.split('~').length > 2) {
- arr = [reservoir.station_image.split('~')]
- } else {
- let cur = reservoir.station_image.split('~')
- cur.push(this.publicPath + 'img/emptyImg.514374af.png')
- arr = [cur]
- }
- }
- }
-
- if (arr && arr.length > 0) {
- arr.forEach(arrItem => {
-
- let urlStr = arrItem[2]
-
- if (urlStr.indexOf(
- 'http://183.95.190.143:9096/images') != -
- 1) {
- urlStr = urlStr.replace(
- 'http://183.95.190.143:9096/images',
- 'https://sk.hubeishuiyi.cn/imgWLW/images')
- }
-
- if (urlStr.indexOf(
- 'http://223.75.53.106:8891/skjgimages') != -
- 1) {
- urlStr = urlStr.replace(
- `http://223.75.53.106:8891/skjgimages`,
- `https://sk.hubeishuiyi.cn/imgLK/skjgimages`
- )
- }
-
- reservoir.imagesArray.push({
- title: arrItem[1],
- url: urlStr
- })
- })
- }
-
- reservoir.current_site_image = reservoir.imagesArray.length > 0 ?
- reservoir.imagesArray[0] :
- ''
- reservoir.current_site_image_index = reservoir.imagesArray.length > 0 ?
- 0 : ''
- reservoir.current_site_image.url = reservoir.current_site_image.url
- .replace(/\\/g, "/");
- }
-
-
-
-
-
-
- if (reservoir.rz && reservoir.rz_1h) {
- reservoir.powerIconShow = true
- if (reservoir.rz - reservoir.rz_1h > 0) {
- reservoir.iconClass = 'icon-wendushangsheng'
- } else if (reservoir.rz - reservoir.rz_1h < 0) {
- reservoir.iconClass = 'icon-wenduxiajiang'
- }
- } else {
- reservoir.powerIconShow = false
- }
- item.reservoir = reservoir
- }
- })
- })
- return arr
- },
-
- //对行政区划进行处理
- buildRegion(region) {
- delete this.query.city_cd
- delete this.query.county_cd
- delete this.query.town_cd
-
- if (region.adGrad == 4) {
- this.query.town_cd = region.adCode
- }
- //市
- if (region.adGrad == 2) {
- this.query.city_cd = region.adCode
- }
- //区
- if (region.adGrad == 3) {
- this.query.county_cd = region.adCode
- }
-
- this.adBase = region
-
- this.reload()
- }
-
- }
- }
-</script>
-
-<style scoped lang="scss">
- .container {
-
- .container {
- min-height: 100vh;
- }
-
- .top-bar {
- width: 100%;
- display: flex;
- justify-content: space-around;
- // position: fixed;
- // top: 200rpx;
- flex-direction: column;
- position: -webkit-sticky;
- position: sticky;
- top: calc(var(--status-bar-height) + 80rpx);
- // top: 80rpx;
- }
- }
-</style>
\ No newline at end of file
diff --git "a/subPackage/dbSafety/components/dataItem - \345\211\257\346\234\254.vue" "b/subPackage/dbSafety/components/dataItem - \345\211\257\346\234\254.vue"
deleted file mode 100644
index 7fed7c8..0000000
--- "a/subPackage/dbSafety/components/dataItem - \345\211\257\346\234\254.vue"
+++ /dev/null
@@ -1,266 +0,0 @@
-<template>
- <view @click="navigatorPage" class="item">
- <view class="top">
- <view class="left df res_nm">
- <text>{{item.reservoir.res_nm}}</text>
- </view>
- <view class="right df oth_reg_cd">
- <text>{{item.reservoir.oth_reg_cd}}</text>
- </view>
- </view>
-
- <view class="middle">
- <view class="left">
- <image lazy-load class="img"
- :src="item.reservoir.current_site_image&&item.reservoir.current_site_image.url !=''?item.reservoir.current_site_image.url:'https://sk.hubeishuiyi.cn/business/img/emptyImg.514374af.png'">
- </image>
-
- </view>
- <view class="right">
- <view class="info">
- <view class="header df location">
- <text>{{isNullRegion(item.reservoir)}}</text>
- </view>
- <view class="content">
- <view v-for="(sy,index) in item.sy.children" :key="sy.cd + sy.res_cd + index"
- class="content-item df">
- <view class="label">
- <text>{{sy.cd_nm}}:</text>
- </view>
-
-
- <view class="value">
- <text>{{isNull(sy.sy_val)}}m</text>
- <text class="iconfont" :class="sy.iconClass"></text>
- </view>
- </view>
-
-
- <view class="content-item df">
- <view class="label">
- <text>当前水位:</text>
- </view>
- <view class="value" :style="{color:item.reservoir.over_z>0?'#FF1818':''}">
- <text> {{isNull(item.reservoir.rz)}}m</text>
- <text v-if="item.reservoir.powerIconShow" class="iconfont"
- :class="item.reservoir.iconClass"></text>
- </view>
- </view>
-
- <view class="content-item df">
- <view class="label">
- <text>昨日雨量:</text>
- </view>
- <view class="value">
- <text>{{isNull(item.reservoir.ytr_drp)}}mm</text>
- </view>
- </view>
-
- <view v-for="(sl,index) in item.sl.children" :key="index" class="content-item df">
- <view v-if="sl.cd != null" class="label">
- <text>{{`渗流量:`}}</text>
- </view>
-
- <view v-else class="label">
- <text>{{`渗流量:`}}</text>
- </view>
-
- <view class="value">
- <text>{{isNull(sl.sl_val)}}(L/s)</text>
- </view>
- </view>
-
- </view>
- </view>
- </view>
- </view>
-
- <view class="bottom">
- <view class="left time df">
- <text>{{isNull(item.sy.max_tm)}}</text>
- </view>
- </view>
-
- </view>
-</template>
-
-<script>
- export default {
- props: {
- item: {
- type: Object,
- default: () => {}
- },
- type: {
- type: String,
- required: true
- }
- },
- data() {
- return {
-
- }
- },
- computed: {
- isNull() {
- return (prop) => {
- if (prop === 0 || prop) {
- return prop
- } else {
- return "--"
- }
- }
- },
- isNullRegion() {
- return (item => {
- let region = []
- if (item.city_nm) {
- region.push(item.city_nm)
- }
- if (item.county_nm) {
- region.push(item.county_nm)
- }
- if (item.town_nm) {
- region.push(item.town_nm)
- }
- return region.join("-")
- })
- },
- },
-
- created() {
-
- },
- mounted() {
-
- },
- onLoad(option) {
-
- },
- onShow() {
-
- },
- methods: {
- navigatorPage() {
- let data = JSON.stringify(this.item)
- this.$u.func.globalNavigator("/subPackage/dbSafety/daba?data=" + data + "&type=" + this.type)
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- .item {
- padding: 10rpx 20rpx;
-
- .top {
- display: flex;
- justify-content: space-between;
-
- .res_nm {
- color: #333333;
- font-family: PingFang-SC-Heavy;
- font-size: 35rpx;
- }
-
- .oth_reg_cd {
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #BBBBBB;
- }
-
- }
-
- .middle {
- display: flex;
- justify-content: space-between;
- height: 264rpx;
-
- .left {
- width: 35%;
-
- .img {
- width: 100%;
- height: 100%;
- position: static;
-
- ::v-deep img {
- position: static;
- }
- }
- }
-
- .right {
- width: 62%;
- font-size: 24rpx;
- line-height: 30rpx;
- // margin-left: 20rpx;
-
- .info {
-
- .header {
- justify-content: flex-end;
- }
-
- .location {
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #BBBBBB;
- }
-
- .content {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- align-items: center;
-
- .content-item:nth-child(2n+1) {
- flex: 1.1;
- }
-
- .content-item {
- display: flex;
- align-items: center;
- flex: 0.9;
- min-width: 160rpx;
- height: 40rpx;
- }
- }
-
- }
- }
- }
-
- .bottom {
- height: 50rpx;
-
- .left {
- align-items: center;
- height: 50rpx;
- }
-
- .time {
- // width: 238rpx;
- flex: 1; // height: 22rpx;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #BBBBBB;
- line-height: 28rpx;
- }
- }
- }
-
- // text {
- // font-size: 24rpx;
- // font-family: PingFang SC;
- // // font-weight: bold;
- // color: #333333;
- // }
-
- .df {
- display: flex;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/dbSafety/components/dataItem.vue b/subPackage/dbSafety/components/dataItem.vue
deleted file mode 100644
index fe28c8a..0000000
--- a/subPackage/dbSafety/components/dataItem.vue
+++ /dev/null
@@ -1,366 +0,0 @@
-<template>
- <view @click="navigatorPage" class="item">
- <view class="top">
- <view class="left df res_nm">
- <text>{{item.reservoir.res_nm}}</text>
- </view>
- <view class="right df oth_reg_cd">
- <text>{{item.reservoir.oth_reg_cd}}</text>
- </view>
- </view>
-
- <view class="middle">
- <view class="left">
- <image lazy-load class="img"
- :src="item.reservoir.current_site_image&&item.reservoir.current_site_image.url !=''?item.reservoir.current_site_image.url:'https://sk.hubeishuiyi.cn/business/img/emptyImg.514374af.png'">
- </image>
-
- </view>
- <view class="right">
- <view class="info">
- <view class="header df location">
- <text>{{isNullRegion(item.reservoir)}}</text>
- </view>
- <view class="content">
- <view class="custom-slot">
- <slot name="custom">
-
-
- </slot>
- </view>
- <view class="content-item df">
- <view class="label">
- <text>当前水位:</text>
- </view>
- <view class="value" :style="{color:item.reservoir.over_z>0?'#FF1818':''}">
- <text> {{isNull(item.reservoir.rz)}}m</text>
- <text v-if="item.reservoir.powerIconShow" class="iconfont"
- :class="item.reservoir.iconClass"></text>
- </view>
- </view>
-
- <view class="content-item df">
- <view class="label" style="margin-left: 20rpx;">
- <text>昨日雨量:</text>
- </view>
- <view class="value">
- <text>{{isNull(item.reservoir.ytr_drp)}}mm</text>
- </view>
- </view>
-
- </view>
- </view>
- </view>
- </view>
-
- <view class="bottom">
- <view class="btn-group">
- <view @click="collect(item.reservoir)" style="margin-right: 20rpx;" v-if="item.reservoir.isCollect == 2"
- class="btn">
- <view class="icon">
- <u-icon name="star" color='#1180ff'></u-icon>
- </view>
- <view>
- <text class="text btn">收藏</text>
- </view>
- </view>
- <view @click="collect(item.reservoir)" style="margin-right: 20rpx;" v-if="item.reservoir.isCollect == 1"
- class="btn">
- <view class="icon">
- <u-icon name="star-fill" color='#1180ff'></u-icon>
- </view>
- <view>
- <text class="text btn">取消收藏</text>
- </view>
- </view>
- <view class="btn">
- <view class="icon">
- <image class="img-icon"
- src="@/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/navigator.png">
- </image>
- </view>
- <view @click="locationNav(item.reservoir)">
- <text class="text btn">定位</text>
- </view>
- </view>
- </view>
- </view>
-
- </view>
-</template>
-
-<script>
- import tabInfo from "@/subPackage/dbSafety/components/tabInfo.vue"
- import store from "@/store/index.js"
- import {
- getMyCollect,
- updateCollect
- } from "@/api/system/user"
- export default {
- props: {
- item: {
- type: Object,
- default: () => {}
- },
- type: {
- type: String,
- required: true
- }
- },
- components: {
- tabInfo
- },
- data() {
- return {
-
- }
- },
-
- computed: {
- isNull() {
- return (prop) => {
- if (prop === 0 || prop) {
- return prop
- } else {
- return "--"
- }
- }
- },
- isNullRegion() {
- return (item => {
- let region = []
- if (item.city_nm) {
- region.push(item.city_nm)
- }
- if (item.county_nm) {
- region.push(item.county_nm)
- }
- if (item.town_nm) {
- region.push(item.town_nm)
- }
- return region.join("-")
- })
- },
- },
-
- created() {
-
- },
- mounted() {
-
- },
- onLoad(option) {
-
- },
- onShow() {
-
- },
- methods: {
- navigatorPage() {
- let data = JSON.stringify(this.item)
- this.$u.func.globalNavigator("/subPackage/dbSafety/daba?data=" + data + "&type=" + this.type)
- },
-
- collect(item) {
- let params = {
- userId: this.userInfo.user_id,
- resId: item.res_cd,
- status: item.isCollect == 1 ? 2 : 1
- }
- updateCollect(params).then(res => {
- //提示
- if (params.status == 1) {
- this.$u.func.showToast("收藏成功")
- } else {
- this.$u.func.showToast("取消成功")
- }
- let data = res.data
- if (JSON.stringify(data) == "{}") {
- data = ""
- }
- this.userInfo.detail.collect = data
- store.commit("SET_USER_INFO", this.userInfo)
- this.reservoirInCollect(item)
- })
- },
-
- reservoirInCollect(reservoir) {
- let collectResIds = this.userInfo.detail.collect
- reservoir.isCollect = collectResIds.indexOf(reservoir.res_cd) > -1 ? 1 : 2
- },
-
- locationNav(item) {
- uni.openLocation({
- latitude: item.res_lat,
- longitude: item.res_lon,
- scale: 15,
- name: item.res_nm
- });
- },
-
- }
- }
-</script>
-
-<style scoped lang="scss">
- .item {
- padding: 10rpx 20rpx;
-
- .top {
- display: flex;
- justify-content: space-between;
- padding: 16rpx 0;
-
- .res_nm {
- color: #333333;
- font-family: PingFang-SC-Heavy;
- font-size: 35rpx;
- }
-
- .oth_reg_cd {
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #BBBBBB;
- align-items: center;
- }
-
- }
-
- .middle {
- display: flex;
- justify-content: space-between;
- height: 264rpx;
-
- .left {
- width: 35%;
-
- .img {
- width: 100%;
- height: 100%;
- position: static;
-
- ::v-deep img {
- position: static;
- }
- }
- }
-
- .right {
- width: 70%;
- font-size: 24rpx;
- line-height: 30rpx;
- // margin-left: 20rpx;
-
- .info {
-
- .header {
- justify-content: flex-end;
- }
-
- .location {
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #BBBBBB;
- }
-
- .content {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- align-items: center;
-
- .custom-slot {
- width: 100%;
- }
-
- .content-item:nth-child(2n+1) {
- // flex: 2;
- }
-
- .content-item:nth-child(2n) {
- // flex: 2;
- margin-left: 26rpx;
- }
-
- .content-item {
- display: flex;
- align-items: center;
- // flex: 2;
- min-width: 160rpx;
- height: 40rpx;
- }
- }
-
- }
- }
- }
-
- .bottom {
- height: 50rpx;
- display: flex;
- justify-content: flex-end;
-
- .left {
- align-items: center;
- height: 50rpx;
- }
-
- .time {
- // width: 238rpx;
- flex: 1; // height: 22rpx;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #BBBBBB;
- line-height: 28rpx;
- }
-
- .btn-group {
- display: flex;
- align-items: center;
-
- .btn {
- display: flex;
- align-items: center;
-
- .img-icon {
- height: 22rpx;
- width: 22rpx;
- position: static;
-
- ::v-deep img {
- position: static;
- }
- }
-
- .text {
- // width: 48rpx;
- height: 22rpx;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #333333;
- line-height: 28rpx;
- }
-
- }
- }
- }
- }
-
- // text {
- // font-size: 24rpx;
- // font-family: PingFang SC;
- // // font-weight: bold;
- // color: #333333;
- // }
- /deep/ .u-icon__icon {
- position: static;
- }
-
- .df {
- display: flex;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/dbSafety/components/filterBar.vue b/subPackage/dbSafety/components/filterBar.vue
deleted file mode 100644
index 15073e3..0000000
--- a/subPackage/dbSafety/components/filterBar.vue
+++ /dev/null
@@ -1,519 +0,0 @@
-<template>
- <view class="filterBar">
- <view class="wrap flex f-a-i" :style="{'--top':`${top}rpx`}">
- <view class="wrap-item flex f-a-i f-d-c" v-for="(item,index) in menu" :key="index"
- :class="[item.selected?'active':'']">
- <view class="wrap-item-box flex f-a-i" @click='select(item,index)'>
- <view class="label">
- {{item.label}}
- </view>
- <view class="item-icon" :class="[item.selected?'selected-item-icon':'']">
- <u-icon color='' size='10' name="arrow-down-fill"></u-icon>
- </view>
- </view>
- <view :class="[item.selected?'wrap-item-box-child':'']" :style="{top:calcTop}"
- class="wrap-item-box-child-default">
- <scroll-view scroll-y="true" class="scroll-Y">
- <view class="type-line" v-if="item.type=='line'">
- <view class="type-line-item flex f-a-i" v-for="(cItem,cIndex) in item.children"
- :key="cIndex" @click='lineSelect(item,cItem,index,cIndex)'>
- <view :class="[cItem.selected?'active':'']" class="type-label">{{cItem.label}}
- </view>
- <u-icon v-if="cItem.selected" color='#1180ff' size='16' name="checkbox-mark"></u-icon>
- </view>
- </view>
- <view class="type-check" v-if="item.type=='check'">
- <view class="type-check-item" v-for="(cItem,cIndex) in item.children" :key="cIndex">
- <!-- 单选 -->
- <view class="radio" v-if="cItem.type =='radio'">
- <view class="radio-label">{{cItem.label}}</view>
- <view class="option flex f-a-i">
- <view class="option-item" v-for="(c_clItem,c_clIndex) in cItem.option"
- :key="c_clIndex" :class="{'check_active':c_clItem.selected}"
- @click='radioSelect(cItem,c_clItem)'>{{c_clItem.label}}</view>
-
- </view>
- </view>
- <!-- 多选 -->
- <view class="type-label radio" v-else>
- <view class="radio-label">{{cItem.label}}</view>
- <view class="option flex f-a-i">
- <view class="option-item" :class="{'check_active':c_clItem.selected}"
- v-for="(c_clItem,c_clIndex) in cItem.option" :key="c_clIndex"
- @click='radioCheckSelect(cItem,c_clItem)'>{{c_clItem.label}}</view>
- </view>
- </view>
- </view>
- </view>
- </scroll-view>
- <view class="btn-box flex f-a-i" v-if="item.type=='check'">
- <view class="reset" @click="resetFilterData(index)">重置</view>
- <view class="submit" @click="setFilterData(item)">确定</view>
- </view>
- </view>
- </view>
- </view>
- <view :class="[showOver?'show':'']" :style="{top:calcShadow}" @click="hideOverLay"></view>
- </view>
-</template>
-
-<script>
- export default {
- name: "uFilter",
- props: {
- menuList: {
- type: Array,
- required: true,
- default: () => []
- },
- defaultModel: {
- type: Object,
- required: true,
- default: () => {}
- },
- top: {
- type: Number,
- default: 0
- },
- shadowTip: {
- type: Number,
- default: 36
- }
- },
- data() {
- return {
- //显示遮罩层
- showOver: false,
- //数据值
- model: {},
- lineLabel: "",
- menu: [],
- }
- },
- computed: {
- calcTop() {
- const info = uni.getWindowInfo()
- const windowTop = info.windowTop
- const safeToTop = info.safeAreaInsets.top
- const top = (windowTop + safeToTop + 36 - 8 + (this.top * 2)) + "rpx"
- // return {
- return top
- // }
- },
- calcShadow() {
- const info = uni.getWindowInfo()
- const windowTop = info.windowTop
- const safeToTop = info.safeAreaInsets.top
- const top = (windowTop + safeToTop + 36 + 300 + (this.shadowTip * 2)) + "rpx"
- return top
- }
- },
- watch: {
- menuList: {
- handler(newVal) {
- if (newVal) {
- this.menu = JSON.parse(JSON.stringify(newVal))
- this.init()
- }
- },
- immediate: true,
- deep: true
- },
-
- defaultModel: {
- handler(newVal) {
- if (newVal) {
- this.model = JSON.parse(JSON.stringify(newVal))
- this.defaultSelect()
- this.$forceUpdate();
- }
- },
- immediate: true,
- deep: true
- },
- },
- methods: {
- //初始化数据父级、子集selected
- init() {
- try {
- this.menu.forEach(v => {
- if (!v.hasOwnProperty('selected')) {
- this.$set(v, "selected", false)
- }
- if (v.type == 'line') {
- v.children.forEach(clV => {
- if (!clV.hasOwnProperty('selected')) {
- this.$set(clV, "selected", false)
- }
- })
- } else if (v.type == 'check') {
- v.children.forEach(clV => {
- clV.option.forEach(pv => {
- if (!pv.hasOwnProperty('selected')) {
- this.$set(pv, "selected", false)
- }
- })
- })
- }
- })
- } catch (e) {
- console.log(e, "eeee")
- }
- },
- //初始选中第一项
- // defaultVal(data) {
- // if (data.type == 'line') {
- // this.model[data.prop] = data.children[0].value
- // } else if (data.type == 'check') {
- // data.children.forEach(v => this.model[v.prop] = v.option[0].value)
- // }
- // },
- //根据初始值渲染第几项选中
- defaultSelect() {
- this.menu.forEach(v => {
- if (v.type == 'line') {
- const index = v.children.findIndex(cl => {
- if (cl.value == this.model[v.prop]) {
- return cl.value == this.model[v.prop]
- }
- })
- //初始化所有选择项
- v.children.forEach(l => l.selected = false)
- if (index >= 0) {
- v.children[index].selected = true
- v.label = v.children[index].label
- // this.lineLabel = v.children[index].label
- this.$forceUpdate();
- }
- } else if (v.type == 'check') {
- v.children.forEach(cl => {
- if (cl.type == 'radio') {
- const index = cl.option.findIndex(clO => {
- if (clO.value == this.model[cl.prop]) {
- return clO.value == this.model[cl.prop]
- }
- })
- //初始化所有选择项
- cl.option.forEach(cvo => cvo.selected = false)
- if (index >= 0) {
- cl.option[index].selected = true
- this.$forceUpdate();
- }
- } else if (cl.type == 'checkbox') {
- cl.option.forEach(cvo => cvo.selected = false)
- if (this.model[cl.prop]) {
- this.model[cl.prop].forEach(p => {
- const index = cl.option.findIndex(clO => {
- if (clO.value == p) {
- return clO.value == p
- }
- })
- if (index >= 0) {
- cl.option[index].selected = true
- this.$forceUpdate();
- }
- })
- }
-
- }
- })
- }
- })
- this.$forceUpdate();
- },
- //菜单栏选中
- select(item, index) {
- //重置所有的菜单选择状态
- this.menu.forEach((v, vIndex) => {
- if (vIndex != index) {
- v.selected = false
- } else {
- v.selected = !v.selected
- }
- })
- if (!item.selected) return this.showOver = false
- this.showOver = true
- this.$forceUpdate();
- },
- //行菜单子集选中
- lineSelect(item, cItem, index, cIndex) {
- this.menu[index].children.forEach((v, vIndex) => {
- v.selected = false
- })
- cItem.selected = true
- this.model[item.prop] = cItem.value
- item.label = cItem.label
- this.setFilterData()
- },
- //单选方法
- radioSelect(item, clItem) {
- if (clItem.selected) return
- item.option.forEach(v => v.selected = false)
- this.$set(clItem, 'selected', true)
- // clItem.selected = true
- this.model[item.prop] = clItem.value
- this.$forceUpdate()
- },
- //多选方法
- radioCheckSelect(item, clItem) {
- if (!this.model[item.prop]) {
- this.model[item.prop] = []
- }
- clItem.selected = !clItem.selected
- if (clItem.selected) {
- this.model[item.prop].push(clItem.value)
- } else {
- const index = this.model[item.prop].findIndex(v => v == clItem.value)
- this.model[item.prop].splice(index, 1)
- }
- this.$forceUpdate()
- },
- //重置
- resetFilterData(index) {
- this.redioReset(index)
- this.$emit("reset", this.model)
- this.hideOverLay()
- this.$forceUpdate()
- },
- //单选/多选重置
- redioReset(index) {
- const props = this.menu.filter(v => v.type == 'line').map(m => m.prop)
- this.menu[index].children.forEach(v => {
- //判断是否有type为line的状态栏 取出props
- if (props.length > 0) {
- props.forEach(p => {
- // !this.defaultModel[v.prop]
- if (p != v.prop && !this.defaultModel.hasOwnProperty(v.prop)) {
- delete this.model[v.prop]
- } else if (p != v.prop && this.defaultModel.hasOwnProperty(v.prop)) {
- this.model[v.prop] = this.defaultModel[v.prop]
- }
- })
- } else {
- if (!this.defaultModel.hasOwnProperty(v.prop)) {
- delete this.model[v.prop]
- } else if (this.defaultModel.hasOwnProperty(v.prop)) {
- this.model[v.prop] = this.defaultModel[v.prop]
- }
- }
- v.option.forEach(op => op.selected = false)
- if (v.type == 'radio') {
- const index = v.option.findIndex(clO => {
- return clO.value == this.model[v.prop]
- })
- v.option.forEach(cvo => cvo.selected = false)
- if (index >= 0) {
- v.option[index].selected = true
- }
- } else if (v.type == 'checkbox') {
- v.option.forEach(cvo => cvo.selected = false)
- if (this.model[v.prop]) {
- this.model[v.prop].forEach(p => {
- const index = v.option.findIndex(clO => {
- return clO.value == p
- })
- if (index >= 0) {
- v.option[index].selected = true
- }
- })
- }
- }
- })
- },
- //确定
- setFilterData(item) {
- this.$emit("submit", this.model)
- this.hideOverLay()
- this.$forceUpdate()
- },
- hideOverLay() {
- this.menu.forEach(v => {
- v.selected = false
- })
- this.showOver = false
- this.$forceUpdate()
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- .filterBar {
- width: 100%;
- background-color: #fff;
-
- .flex {
- display: flex;
- }
-
- .f-d-c {
- flex-direction: column;
- }
-
- .f-a-i {
- align-items: center;
- }
-
- .active {
- color: #1180ff !important;
- }
-
- .check_active {
- color: #fff !important;
- background-color: #1180ff !important;
- border: none !important;
- }
-
- .wrap {
- z-index: 3;
- width: 100%;
- font-size: 32rpx;
- border-bottom: 2rpx solid #e8e8e8;
- justify-content: space-around;
- // padding-bottom: 20rpx;
- height: 72rpx;
- box-sizing: border-box;
-
-
-
- &-item {
- color: #333333;
- text-align: center;
- transition: color .3s ease;
-
- .label {
- margin-right: 8rpx;
- font-size: 28rpx;
- }
-
- .item-icon {
- color: #333333;
- transition: transform .3s linear;
- transform: rotate(0);
- }
-
- .selected-item-icon {
- color: #1180ff;
- transform: rotate(180deg);
- }
-
- &-box-child {
- // top: 72rpx !important;
- width: 100% !important;
- opacity: 1 !important;
- z-index: 999 !important;
- visibility: visible !important;
- }
-
- &-box-child-default {
- position: absolute;
- // top: 16rpx;
- top: 0;
- left: 0;
- right: 0;
- opacity: 0;
- background: #fff;
- transition: opacity .1s linear;
- z-index: -999;
- visibility: hidden;
-
- .scroll-Y {
- height: 600rpx;
- }
-
- .btn-box {
- justify-content: space-between;
- height: 120rpx;
- flex-direction: row !important;
- align-items: center;
- padding: 0 24rpx;
- // position: fixed;
- background: #fff;
- width: 100%;
- box-sizing: border-box;
-
- >view {
- width: 240rpx;
- height: 60rpx;
- border-radius: 80rpx;
- border: solid 1rpx #5887f9;
- align-items: center;
- justify-content: center;
- box-sizing: border-box;
- line-height: 56rpx;
- font-size: 36rpx;
- }
-
- .reset {
- color: #1180ff;
- }
-
- .submit {
- color: #fff;
- background-color: #1180ff;
- }
- }
-
- .type-line {
- padding-bottom: 40rpx;
- font-size: 28rpx;
-
- .type-line-item {
- color: #333333;
- justify-content: space-between;
- padding: 20rpx;
- border-bottom: 2rpx solid #e8e8e8;
- }
- }
-
- .type-check {
-
- .type-check-item {
- width: 100%;
- text-align: left;
- color: #333333;
- font-size: 28rpx;
- padding-bottom: 20rpx;
-
- .radio {
- padding: 0 24rpx;
-
- .radio-label {
- padding: 10rpx 0;
- }
-
- .option {
- flex-wrap: wrap;
-
- &-item {
- min-width: 120rpx;
- text-align: center;
- box-sizing: border-box;
- padding: 5rpx 40rpx;
- height: 60rpx;
- line-height: 46rpx;
- background-color: #fff;
- color: #333333;
- border: 2rpx solid #e8e8e8;
- margin-top: 16rpx;
- margin-right: 32rpx;
- }
- }
- }
- }
- }
- }
- }
- }
-
- .show {
- background-color: rgba(0, 0, 0, .5);
- z-index: 2;
- position: fixed;
- top: calc(44px + env(safe-area-inset-top) + 72rpx);
- bottom: 0;
- left: 0;
- right: 0;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/dbSafety/components/my-search.vue b/subPackage/dbSafety/components/my-search.vue
deleted file mode 100644
index 264ff2e..0000000
--- a/subPackage/dbSafety/components/my-search.vue
+++ /dev/null
@@ -1,265 +0,0 @@
-<template>
- <view class="select-group">
- <view class="condition">
- <view class="region-text" @click="regionPopup">
- <view class="area-box">
- <view class="text">
- <regionSelect :isTown="true" :defaultValue="defaultRegion" @regionChange="regionChange">
- </regionSelect>
- </view>
- <view class="icon">
- <image class="img-icon" :src="imageList.iconDownBlack"></image>
- </view>
- </view>
- <u--input v-model="searchKey" placeholder="搜索水库" border="none" prefixIcon="search"
- prefixIconStyle="font-size: 22px;color: #909399" @confirm="sendSearchKey">
- </u--input>
-
- <view class="basin-box" style="margin-right: 20rpx;">
- <view class="text">
- <BasinSelect :code="basCode" @basinChange="basinChange"></BasinSelect>
- </view>
- <view class="icon">
- <u-icon name="arrow-down-fill" size="12"></u-icon>
- </view>
- </view>
-
- </view>
- </view>
-
- </view>
-</template>
-
-<script>
- import regionSelect from "@/components/my-components/regionSelect.vue"
- import BasinSelect from '@/components/my-components/basinSelect.vue'
- export default {
- props: ['flag', "videoType", 'status', 'camera', 'keyWord', 'defaultValue'],
- components: {
- regionSelect,
- BasinSelect
- },
- data() {
- return {
- imageList: {
- iconDownBlack: "https://sk.hubeishuiyi.cn/business/xcxImg/realtimeMonitiorImg/downBlack.png",
- search: "https://sk.hubeishuiyi.cn/business/xcxImg/realtimeMonitiorImg/search.png",
- more: "https://sk.hubeishuiyi.cn/business/xcxImg/realtimeMonitiorImg/more.png"
- },
- tabList: [{
- name: "全部"
- },
- // {
- // name: "收藏"
- // }
- ],
- inactiveStyle: {
- fontSize: "32rpx",
- },
- activeStyle: {
- fontSize: "32rpx",
- color: "#4593F2"
- },
- searchKey: "",
- popUpVisible: false,
- filterList: [],
- defaultRegion: {},
- basCode: ""
- }
- },
- watch: {
-
- },
- created() {
- this.init()
- },
- mounted() {
-
- },
- onLoad(option) {
-
- },
- onShow() {
-
- },
- methods: {
- init() {
- this.defaultRegion = this.defaultValue
- if (this.keyWord) {
- this.searchKey = this.keyWord
- }
-
- if (this.videoType) {
- let arr = this.videoTypeList.filter(e => {
- return e.value == this.videoType
- })
- this.query.videoType = arr[0].value
- this.query.videoTypeLabel = arr[0].name
- }
-
- if (this.status) {
- let arr = this.statusList.filter(e => {
- return e.value == this.status
- })
- this.query.status = arr[0].value
- this.query.statusLabel = arr[0].name
- }
-
- if (this.camera) {
- let arr = this.cameraList.filter(e => {
- return e.value == this.camera
- })
- this.query.camera = arr[0].value
- this.query.cameraLabel = arr[0].name
- }
- },
- tabClick() {
-
- },
- cancelSearch() {
-
- },
- /**
- * 区域弹出层
- */
- regionPopup() {
- this.popUpVisible = !this.popUpVisible
- },
- closePopup(data) {
- this.region = data
- this.popUpVisible = false
- },
- radioChange(n) {
- this.$emit("radioChange", n)
- },
- videoTypeChange(item) {
- this.query.videoType = item.value
- },
- statusChange(item) {
- this.query.status = item.value
- },
- cameraChange(item) {
- this.query.camera = item.value
- },
- /**
- * 重置
- */
- reset() {
- this.query = {
- videoTypeLabel: "全部",
- videoType: "1",
- statusLabel: "全部",
- status: "1",
- cameraLabel: "全部",
- camera: "1"
- }
- },
- submit() {
- this.$emit("radioChange", this.query)
- },
- regionChange(region) {
- this.basCode = region.adCode
-
- this.$emit("regionChange", region)
- },
- basinChange(basin) {
- console.log(basin)
- this.$emit("basinChange", basin)
- },
- sendSearchKey() {
- this.$emit("getKey", this.searchKey)
- }
- }
- }
-</script>
-
-<style lang="scss" scoped>
- .select-group {
- display: flex;
- // margin: 10rpx 0;
- height: 100%;
- // margin: 0 30rpx;
- // width: 670rpx;
- // box-shadow: 0px 0px 20rpx #e2e2e2;
- border-radius: 10rpx;
- background-color: #ffffff;
- padding: 15rpx;
-
- .item {
- display: flex;
- align-items: center;
- flex: 1;
- margin-right: -150rpx;
- }
-
- .condition {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: space-around;
-
- .region-text {
- width: 95%;
- height: 66rpx;
- background-color: #F5F5F5;
- display: flex;
- align-items: center;
- border-radius: 8rpx;
-
- .area-box {
- display: flex;
- align-items: center;
- }
-
- .basin-box {
- display: flex;
- align-items: center;
- }
-
- .text {
- margin-left: 20rpx;
- color: #333333;
- font-family: PingFang-SC-Medium;
- font-size: 30rpx;
- }
-
- .img-icon {
- display: flex;
- width: 22rpx;
- height: 18rpx;
- }
- }
-
- .img-icon {
- width: 40rpx;
- height: 40rpx;
- padding: 0 20rpx;
- }
-
- }
- }
-
- .order {
- width: 500rpx;
-
- padding: 30rpx;
-
- .title {
- margin-bottom: 50rpx;
- }
- }
-
- .query {
- width: 500rpx;
-
- padding: 30rpx;
-
- .title {
- margin-bottom: 50rpx;
- }
-
- .btn-group {
- display: flex;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/dbSafety/components/sl.vue b/subPackage/dbSafety/components/sl.vue
deleted file mode 100644
index 2f6c593..0000000
--- a/subPackage/dbSafety/components/sl.vue
+++ /dev/null
@@ -1,278 +0,0 @@
-<template>
- <view>
- <!-- <view class="place"></view> -->
- <view class="main">
- <view class="itme-box">
- <view class="h-table">
- <view class="h-tr h-tr-5 h-thead ">
- <view class="h-td column-0">序号</view>
- <view class="h-td column-1">水库</view>
- <view class="h-td column-2">测点</view>
- <view class="h-td column-3">渗流量(L/ps)</view>
- <view class="h-td column-4">监测时间</view>
- </view>
- <scroll-view scroll-y style="height: 74vh;width: 100%;" @scrolltolower="scrolltolower">
- <view class="h-tr h-tr-5" v-for="(item,index) in tableList" :key="index">
- <view class="h_box h-tr h-tr-5">
- <view class="h-td column-0">{{index+1}}</view>
- <view class="h-td column-1 name " @click="goReservoirDetail(item)">{{item.res_nm}}
- </view>
- <view class="h-td column-2">{{item.cd}}</view>
- <view class="h-td column-3">{{item.spqn}}</view>
- <view class="h-td column-4">{{item.tm}}</view>
- </view>
- </view>
- </scroll-view>
- </view>
- </view>
- <u-loading-icon text="加载中" textSize="18" :show="showLoading"></u-loading-icon>
- </view>
- <u-loading-page :loading="pageLoading"></u-loading-page>
- </view>
-</template>
-
-<script>
- import {
- getSlList
- } from "@/api/dataCenter/dbSafety/dbSafety"
- export default {
- props: {
- res_nm: {
- type: String,
- default: "",
- },
- },
- data() {
- return {
- tableList: [],
- isShow: false,
- pages: {
- pageNo: 1,
- pageSize: 25
- },
- region: {},
- showLoading: false,
- pageLoading: false,
- }
- },
- created() {
- this.getSlListData()
- },
- options: {
- styleIsolation: 'shared'
- },
- methods: {
- showCity() {
- this.isShow = !this.isShow
- },
- getTableData() {
- uni.stopPullDownRefresh()
- },
- getSlListData() {
- this.tableList = []
- let regionData = uni.getStorageSync("adCodeBase")
-
- if (!regionData) return
- let params = {
- pageSize: this.pages.pageSize,
- pageNo: this.pages.pageNo,
- res_nm: this.res_nm
- }
- if (!this.region.label && !this.region.value) {
- if (regionData.adGrad == 1) {
- params.province_cd = regionData.adCode
- } else if (regionData.adGrad == 2) {
- params.city_cd = regionData.adCode
- } else if (regionData.adGrad == 3) {
- params.county_cd = regionData.adCode
- }
- params.bas_guid = this.region.name
- } else {
- params[this.region.label] = this.region.value
- params.bas_guid = this.region.name
- }
-
- this.getSlList(params)
- },
-
- // 渗流列表
- getSlList(params) {
- this.pageLoading = true
- getSlList(params).then(res => {
- let data = res.data.data
- data.forEach(res => {
- let obj = {}
- if (res.children.length > 0) {
- res.children.forEach(station => {
- obj = {
- res_nm: res.res_nm,
- res_cd: res.res_cd,
- cd: station.cd,
- spqn: station.spqn,
- tm: station.tm.substring(5, 16)
- }
- this.tableList.push(obj)
- })
- } else {
- obj = {
- res_nm: res.res_nm,
- res_cd: res.res_cd,
- cd: "--",
- spqn: "--",
- tm: "--"
- }
- }
- })
-
- this.pageLoading = false
- uni.stopPullDownRefresh()
- })
- },
-
- scrolltolower() {
- this.pages.pageNo += 1
- this.showLoading = true
- let params = {
- pageSize: this.pages.pageSize,
- pageNo: this.pages.pageNo,
- res_nm: this.res_nm
- }
- params[this.region.label] = this.region.value
- getSlList(params).then(res => {
- let data = res.data.data
- data.forEach(res => {
- let obj = {}
- if (res.children.length > 0) {
- res.children.forEach(station => {
- obj = {
- res_nm: res.res_nm,
- res_cd: res.res_cd,
- cd: station.cd,
- spqn: station.spqn,
- tm: station.tm.substring(5, 16)
- }
- this.tableList.push(obj)
- })
- } else {
- obj = {
- res_nm: res.res_nm,
- res_cd: res.res_cd,
- cd: "--",
- spqn: "--",
- tm: "--"
- }
- }
- })
- this.showLoading = false
- })
-
- },
-
- // 搜索
- search() {
- this.pages.pageNo = 1
- this.getSyListData()
- },
-
- /**
- * 跳转到水库详情页
- * @param {Object} item 当前行数据
- */
- goReservoirDetail(item) {
- let data = {
- id: item.res_cd,
- name: item.res_nm
- }
- let dataStr = JSON.stringify(data)
- let url = "/subPackage/realtimeMonitor/reservoir/detail?item=" + dataStr
- this.$u.func.globalNavigator(url, "navTo")
- },
-
-
- }
- }
-</script>
-
-<style scoped lang="scss">
- /* 引入表格样式表 */
- @import "@/subPackage/rainWaterCondition/static/style/helang-table.scss";
-
- ::v-deep .h-table .h-tr {
- flex-wrap: wrap;
- }
-
- .place {
- height: 200rpx;
- }
-
-
- .h-table {
- .h-thead {
- color: #51A4FA;
- background-color: #E1F3FF;
- justify-content: space-between;
- }
-
- .h-td {
- border-right-width: 0;
- font-size: 25rpx;
- }
-
- .show_city {
- width: 100% !important;
- display: flex;
- align-items: center;
- justify-content: flex-end;
- padding: 0 26rpx;
- background: #f5f5f5;
- transition: width 150ms ease-in;
- }
-
- .h_box {
- display: flex;
- align-items: center;
- justify-content: space-between;
- width: 100%;
- }
-
- .h-tr {
- border-width: 0;
- text-align: center;
-
- .column-0 {
- width: 15%;
- }
-
- .column-1 {
- width: 20%;
- }
-
- .column-2 {
- width: 15%;
- }
-
- .column-3 {
- width: 22%;
- }
-
- .column-4 {
- width: 28%;
- }
-
- // .column-5 {
- // width: 20%;
- // }
- }
-
- .name {
- color: #3c9cff;
- }
-
- .differ {
- color: #ff0000;
- }
-
-
-
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/dbSafety/components/sy.vue b/subPackage/dbSafety/components/sy.vue
deleted file mode 100644
index 7f62a05..0000000
--- a/subPackage/dbSafety/components/sy.vue
+++ /dev/null
@@ -1,239 +0,0 @@
-<template>
- <view>
- <!-- <view class="place"></view> -->
- <view class="main">
- <view class="itme-box">
- <view class="h-table">
- <view class="h-tr h-tr-6 h-thead ">
- <view class="h-td column-0">序号</view>
- <view class="h-td column-1">水库</view>
- <view class="h-td column-2">测点</view>
- <view class="h-td column-3">时间</view>
- <view class="h-td column-4">渗透压力(kpa)</view>
- <view class="h-td column-5">渗压水位(m)</view>
- </view>
- <scroll-view scroll-y style="height: 74vh;width: 100%;" @scrolltolower="scrolltolower">
- <view class="h-tr h-tr-6" v-for="(item,index) in tableList" :key="index">
- <view class="h_box h-tr h-tr-6">
- <view class="h-td column-0">{{index+1}}</view>
- <view class="h-td column-1 name ">
- <view @click.stop="goReservoirDetail(item)"> {{item.res_nm}}</view>
- </view>
- <view class="h-td column-2">{{item.cd}}</view>
- <view class="h-td column-3">{{item.tm}}</view>
- <view class="h-td column-4">{{item.oms_pressure}}</view>
- <view class="h-td column-5">{{item.sw_val}}</view>
- </view>
- </view>
- </scroll-view>
- </view>
- </view>
- <u-loading-icon text="加载中" textSize="18" :show="showLoading"></u-loading-icon>
- </view>
- <u-loading-page :loading="pageLoading"></u-loading-page>
- </view>
-</template>
-
-<script>
- import {
- getSyList
- } from "@/api/dataCenter/dbSafety/dbSafety"
- export default {
- props: {
- res_nm: {
- type: String,
- default: "",
- },
- },
- data() {
- return {
- tableList: [],
- isShow: false,
- pages: {
- pageNo: 1,
- pageSize: 25
- },
- region: {},
- showLoading: false,
- pageLoading: false,
- }
- },
- created() {
- this.getSyListData()
- },
- options: {
- styleIsolation: 'shared'
- },
- methods: {
- showCity() {
- this.isShow = !this.isShow
- },
-
- getSyListData() {
- let regionData = uni.getStorageSync("adCodeBase")
- if (!regionData) return
- let params = {
- pageSize: this.pages.pageSize,
- pageNo: this.pages.pageNo,
- res_nm: this.res_nm
- }
- if (!this.region.label && !this.region.value) {
- if (regionData.adGrad == 1) {
- params.province_cd = regionData.adCode
- } else if (regionData.adGrad == 2) {
- params.city_cd = regionData.adCode
- } else if (regionData.adGrad == 3) {
- params.county_cd = regionData.adCode
- }
- params.bas_guid = this.region.name
- } else {
- params[this.region.label] = this.region.value
- params.bas_guid = this.region.name
- }
- this.getSyList(params)
- },
-
- // 渗压列表
- getSyList(params) {
- this.pageLoading = true
- getSyList(params).then(res => {
- console.log(res, "res====")
- this.tableList = res.data.data
- this.tableList.forEach(e => {
- e.tm = e.tm.substring(5, 16)
- // let tm = new Date(e.tm)
- // let formatter = dateFormat(tm, 'MM-dd hh:mm')
- // e.tm = formatter
- })
- this.pageLoading = false
- uni.stopPullDownRefresh()
- })
- },
-
- scrolltolower() {
- this.pages.pageNo += 1
- this.showLoading = true
- let params = {
- pageSize: this.pages.pageSize,
- pageNo: this.pages.pageNo,
- res_nm: this.res_nm
- }
-
-
- params[this.region.label] = this.region.value
- getSyList(params).then(res => {
- let data = res.data.data
- data.forEach(v => {
- v.tm = v.tm.substring(5, 16)
- })
- this.tableList = this.tableList.concat(data)
- this.showLoading = false
- })
- },
-
- // 搜索
- search() {
- this.pages.pageNo = 1
- this.getSyListData()
- },
-
-
- //跳转到水库详情页
- goReservoirDetail(item) {
- let data = {
- id: item.res_cd,
- name: item.res_nm
- }
- let dataStr = JSON.stringify(data)
- let url = "/subPackage/realtimeMonitor/reservoir/detail?item=" + dataStr
- this.$u.func.globalNavigator(url, "navTo")
- },
-
-
- }
- }
-</script>
-
-<style scoped lang="scss">
- /* 引入表格样式表 */
- @import "@/subPackage/rainWaterCondition/static/style/helang-table.scss";
-
- ::v-deep .h-table .h-tr {
- flex-wrap: wrap;
- }
-
- .place {
- height: 200rpx;
- }
-
-
- .h-table {
- .h-thead {
- color: #51A4FA;
- background-color: #E1F3FF;
- justify-content: space-between;
- }
-
- .h-td {
- border-right-width: 0;
- font-size: 25rpx;
- }
-
- .show_city {
- width: 100% !important;
- display: flex;
- align-items: center;
- justify-content: flex-end;
- padding: 0 26rpx;
- background: #f5f5f5;
- transition: width 150ms ease-in;
- }
-
- .h_box {
- display: flex;
- align-items: center;
- justify-content: space-between;
- width: 100%;
- }
-
- .h-tr {
- border-width: 0;
- text-align: center;
-
- .column-0 {
- width: 10%;
- }
-
- .column-1 {
- width: 24%;
- }
-
- .column-2 {
- width: 10%;
- }
-
- .column-3 {
- width: 24%;
- }
-
- .column-4 {
- width: 16%;
- }
-
- .column-5 {
- width: 16%;
- }
- }
-
- .name {
- color: #3c9cff;
- }
-
- .differ {
- color: #ff0000;
- }
-
-
-
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/dbSafety/components/tabInfo.vue b/subPackage/dbSafety/components/tabInfo.vue
deleted file mode 100644
index 7bf30dd..0000000
--- a/subPackage/dbSafety/components/tabInfo.vue
+++ /dev/null
@@ -1,192 +0,0 @@
-<template>
- <view :style="{'height':height}" class="main-contain">
- <view @click.stop="leftClick" class="left">
- <u-icon class="btn-icon" v-show="index != 0" name="arrow-left" color="#2979ff" size="14"></u-icon>
- </view>
-
-
- <view v-if="type == 'sy'" class="tab">
- <view v-for="(item,index) in dataList" :key="index" class="item">
- <view class="item1">
- <view class="cd_nm">{{item.cd_nm}}:</view>
- <view class="value">{{item.spprwl}}m</view>
- <view class="iconfont icon" :class="item.iconClass">
- {{item.diff_rz}}m
- </view>
- </view>
- <view class="time">{{timeFormat(item.cd_tm)}}</view>
- </view>
-
- </view>
-
- <view v-if="type == 'sl'" class="tab">
- <view v-for="(item,index) in dataList" :key="index" class="item">
- <view class="item1">
- <view class="cd_nm">{{item.cd_nm}}:</view>
- <view class="value">{{item.spqn}}(L/s)</view>
- <view class="iconfont icon" :class="item.iconClass">
- {{item.diff_spqn}}(L/s)
- </view>
- </view>
- <view class="time">{{timeFormat(item.cd_tm)}}</view>
- </view>
- </view>
-
- <view @click.stop="rightClick" class="right">
- <u-icon class="btn-icon" v-show="index != list.length-1 && list.length>0" name="arrow-right" color="#2979ff"
- size="14"></u-icon>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- props: {
- type: {
- type: String,
- required: true
- },
- dataItem: {
- type: Object,
- default: () => {}
- },
- height: {
- type: String,
- default: ""
- }
- },
- computed: {
- //时间截取
- timeFormat() {
- return (val => {
- if (val) {
- return val.substr(5, 11)
- } else {
- return "--"
- }
-
- })
- },
- },
-
- watch: {
- dataItem: {
- handler(newVal, oldVal) {
- if (newVal.children) {
- this.list = this.groupData(newVal.children, 3)
- console.log("list", this.list)
- }
- },
- deep: true,
- immediate: true
- },
- index: {
- handler(newVal) {
- if (newVal >= 0 && newVal <= this.list.length) {
- this.dataList = this.list[newVal]
-
-
- }
- }
- }
- },
-
- data() {
- return {
- indicator: true,
- list: [],
- dataList: [],
- index: 0
- }
- },
- created() {
-
- },
- mounted() {
- this.dataList = this.list[this.index]
- },
- onLoad(option) {
-
- },
- onShow() {
-
- },
- methods: {
- leftClick() {
- if (this.index > 0) {
- this.index -= 1
- }
- },
- rightClick() {
- if (this.index < this.list.length - 1) {
- this.index += 1
- }
- },
-
- //拆分数组,并按所给数量进行组装
- groupData(list, num) {
- const result = [];
- for (let i = 0; i < list.length; i += num) {
- result.push(list.slice(i, i + num));
- }
- console.log("result:", result)
- return result;
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- .main-contain {
- display: flex;
- align-items: center;
-
- .left {
- width: 4%;
- }
-
- .tab {
- width: 92%;
-
- .item {
- display: flex;
- align-items: center;
- height: 38rpx;
-
- .item1 {
- display: flex;
- align-items: center;
- width: 63%;
-
- .cd_nm {}
-
- .value {}
- }
-
-
-
- .icon {
- font-size: 24rpx;
- margin-left: 5rpx;
- }
-
- .time {
- margin-left: 10px;
- }
- }
- }
-
- .right {
- width: 4%;
- }
-
- }
-
- // /deep/ .u-icon__icon span {
- // z-index: -1;
- // }
-
- /deep/ .u-icon__icon {
- position: static;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/dbSafety/components/uni-components/uni-data-select/changelog.md b/subPackage/dbSafety/components/uni-components/uni-data-select/changelog.md
deleted file mode 100644
index eb3d1ce..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-data-select/changelog.md
+++ /dev/null
@@ -1,35 +0,0 @@
-## 1.0.6(2023-04-12)
-- 修复 微信小程序点击时会改变背景颜色的 bug
-## 1.0.5(2023-02-03)
-- 修复 禁用时会显示清空按钮
-## 1.0.4(2023-02-02)
-- 优化 查询条件短期内多次变更只查询最后一次变更后的结果
-- 调整 内部缓存键名调整为 uni-data-select-lastSelectedValue
-## 1.0.3(2023-01-16)
-- 修复 不关联服务空间报错的问题
-## 1.0.2(2023-01-14)
-- 新增 属性 `format` 可用于格式化显示选项内容
-## 1.0.1(2022-12-06)
-- 修复 当where变化时,数据不会自动更新的问题
-## 0.1.9(2022-09-05)
-- 修复 微信小程序下拉框出现后选择会点击到蒙板后面的输入框
-## 0.1.8(2022-08-29)
-- 修复 点击的位置不准确
-## 0.1.7(2022-08-12)
-- 新增 支持 disabled 属性
-## 0.1.6(2022-07-06)
-- 修复 pc端宽度异常的bug
-## 0.1.5
-- 修复 pc端宽度异常的bug
-## 0.1.4(2022-07-05)
-- 优化 显示样式
-## 0.1.3(2022-06-02)
-- 修复 localdata 赋值不生效的 bug
-- 新增 支持 uni.scss 修改颜色
-- 新增 支持选项禁用(数据选项设置 disabled: true 即禁用)
-## 0.1.2(2022-05-08)
-- 修复 当 value 为 0 时选择不生效的 bug
-## 0.1.1(2022-05-07)
-- 新增 记住上次的选项(仅 collection 存在时有效)
-## 0.1.0(2022-04-22)
-- 初始化
diff --git a/subPackage/dbSafety/components/uni-components/uni-data-select/components/uni-data-select/uni-data-select.vue b/subPackage/dbSafety/components/uni-components/uni-data-select/components/uni-data-select/uni-data-select.vue
deleted file mode 100644
index 6bcabfb..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-data-select/components/uni-data-select/uni-data-select.vue
+++ /dev/null
@@ -1,523 +0,0 @@
-<template>
- <view class="uni-stat__select">
- <span v-if="label" class="uni-label-text hide-on-phone">{{label + ':'}}</span>
- <view class="uni-stat-box" :class="{'uni-stat__actived': current}">
- <view class="uni-select" :class="{'uni-select--disabled':disabled}">
- <view class="uni-select__input-box" @click="toggleSelector">
- <view v-if="current" class="uni-select__input-text">{{current}}</view>
- <view v-else class="uni-select__input-text uni-select__input-placeholder">{{typePlaceholder}}</view>
- <view v-if="current && clear && !disabled" @click.stop="clearVal">
- <uni-icons type="clear" color="#c0c4cc" size="24" />
- </view>
- <view v-else>
- <uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" />
- </view>
- </view>
- <view class="uni-select--mask" v-if="showSelector" @click="toggleSelector" />
- <view class="uni-select__selector" v-if="showSelector">
- <view class="uni-popper__arrow"></view>
- <scroll-view scroll-y="true" class="uni-select__selector-scroll">
- <view class="uni-select__selector-empty" v-if="mixinDatacomResData.length === 0">
- <text>{{emptyTips}}</text>
- </view>
- <view v-else class="uni-select__selector-item" v-for="(item,index) in mixinDatacomResData"
- :key="index" @click="change(item)">
- <text
- :class="{'uni-select__selector__disabled': item.disable}">{{formatItemName(item)}}</text>
- </view>
- </scroll-view>
- </view>
- </view>
- </view>
- </view>
-</template>
-
-<script>
- import uniIcons from "../../../uni-icons/components/uni-icons/uni-icons.vue"
- /**
- * DataChecklist 数据选择器
- * @description 通过数据渲染的下拉框组件
- * @tutorial https://uniapp.dcloud.io/component/uniui/uni-data-select
- * @property {String} value 默认值
- * @property {Array} localdata 本地数据 ,格式 [{text:'',value:''}]
- * @property {Boolean} clear 是否可以清空已选项
- * @property {Boolean} emptyText 没有数据时显示的文字 ,本地数据无效
- * @property {String} label 左侧标题
- * @property {String} placeholder 输入框的提示文字
- * @property {Boolean} disabled 是否禁用
- * @event {Function} change 选中发生变化触发
- */
-
- export default {
- name: "uni-data-select",
- components: {
- uniIcons
- },
- mixins: [uniCloud.mixinDatacom || {}],
- props: {
- localdata: {
- type: Array,
- default () {
- return []
- }
- },
- value: {
- type: [String, Number],
- default: ''
- },
- modelValue: {
- type: [String, Number],
- default: ''
- },
- label: {
- type: String,
- default: ''
- },
- placeholder: {
- type: String,
- default: '请选择'
- },
- emptyTips: {
- type: String,
- default: '无选项'
- },
- clear: {
- type: Boolean,
- default: true
- },
- defItem: {
- type: Number,
- default: 0
- },
- disabled: {
- type: Boolean,
- default: false
- },
- // 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}"
- format: {
- type: String,
- default: ''
- },
- },
- data() {
- return {
- showSelector: false,
- current: '',
- mixinDatacomResData: [],
- apps: [],
- channels: [],
- cacheKey: "uni-data-select-lastSelectedValue",
- };
- },
- created() {
- this.debounceGet = this.debounce(() => {
- this.query();
- }, 300);
- if (this.collection && !this.localdata.length) {
- this.debounceGet();
- }
- },
- computed: {
- typePlaceholder() {
- const text = {
- 'opendb-stat-app-versions': '版本',
- 'opendb-app-channels': '渠道',
- 'opendb-app-list': '应用'
- }
- const common = this.placeholder
- const placeholder = text[this.collection]
- return placeholder ?
- common + placeholder :
- common
- },
- valueCom() {
- // #ifdef VUE3
- return this.modelValue;
- // #endif
- // #ifndef VUE3
- return this.value;
- // #endif
- }
- },
- watch: {
- localdata: {
- immediate: true,
- handler(val, old) {
- if (Array.isArray(val) && old !== val) {
- this.mixinDatacomResData = val
- }
- }
- },
- valueCom(val, old) {
- this.initDefVal()
- },
- mixinDatacomResData: {
- immediate: true,
- handler(val) {
- if (val.length) {
- this.initDefVal()
- }
- }
- }
- },
- methods: {
- debounce(fn, time = 100) {
- let timer = null
- return function(...args) {
- if (timer) clearTimeout(timer)
- timer = setTimeout(() => {
- fn.apply(this, args)
- }, time)
- }
- },
- // 执行数据库查询
- query() {
- this.mixinDatacomEasyGet();
- },
- // 监听查询条件变更事件
- onMixinDatacomPropsChange() {
- if (this.collection) {
- this.debounceGet();
- }
- },
- initDefVal() {
- let defValue = ''
- if ((this.valueCom || this.valueCom === 0) && !this.isDisabled(this.valueCom)) {
- defValue = this.valueCom
- } else {
- let strogeValue
- if (this.collection) {
- strogeValue = this.getCache()
- }
- if (strogeValue || strogeValue === 0) {
- defValue = strogeValue
- } else {
- let defItem = ''
- if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) {
- defItem = this.mixinDatacomResData[this.defItem - 1].value
- }
- defValue = defItem
- }
- if (defValue || defValue === 0) {
- this.emit(defValue)
- }
- }
- const def = this.mixinDatacomResData.find(item => item.value === defValue)
- this.current = def ? this.formatItemName(def) : ''
- },
-
- /**
- * @param {[String, Number]} value
- * 判断用户给的 value 是否同时为禁用状态
- */
- isDisabled(value) {
- let isDisabled = false;
-
- this.mixinDatacomResData.forEach(item => {
- if (item.value === value) {
- isDisabled = item.disable
- }
- })
-
- return isDisabled;
- },
-
- clearVal() {
- this.emit('')
- if (this.collection) {
- this.removeCache()
- }
- },
- change(item) {
- if (!item.disable) {
- this.showSelector = false
- this.current = this.formatItemName(item)
- this.emit(item.value)
- }
- },
- emit(val) {
- this.$emit('input', val)
- this.$emit('update:modelValue', val)
- this.$emit('change', val)
- if (this.collection) {
- this.setCache(val);
- }
- },
- toggleSelector() {
- if (this.disabled) {
- return
- }
-
- this.showSelector = !this.showSelector
- },
- formatItemName(item) {
- let {
- text,
- value,
- channel_code
- } = item
- channel_code = channel_code ? `(${channel_code})` : ''
-
- if (this.format) {
- // 格式化输出
- let str = "";
- str = this.format;
- for (let key in item) {
- str = str.replace(new RegExp(`{${key}}`, "g"), item[key]);
- }
- return str;
- } else {
- return this.collection.indexOf('app-list') > 0 ?
- `${text}(${value})` :
- (
- text ?
- text :
- `未命名${channel_code}`
- )
- }
- },
- // 获取当前加载的数据
- getLoadData() {
- return this.mixinDatacomResData;
- },
- // 获取当前缓存key
- getCurrentCacheKey() {
- return this.collection;
- },
- // 获取缓存
- getCache(name = this.getCurrentCacheKey()) {
- let cacheData = uni.getStorageSync(this.cacheKey) || {};
- return cacheData[name];
- },
- // 设置缓存
- setCache(value, name = this.getCurrentCacheKey()) {
- let cacheData = uni.getStorageSync(this.cacheKey) || {};
- cacheData[name] = value;
- uni.setStorageSync(this.cacheKey, cacheData);
- },
- // 删除缓存
- removeCache(name = this.getCurrentCacheKey()) {
- let cacheData = uni.getStorageSync(this.cacheKey) || {};
- delete cacheData[name];
- uni.setStorageSync(this.cacheKey, cacheData);
- },
- }
- }
-</script>
-
-<style lang="scss">
- $uni-base-color: #6a6a6a !default;
- $uni-main-color: #333 !default;
- $uni-secondary-color: #909399 !default;
- $uni-border-3: #e5e5e5;
-
-
- /* #ifndef APP-NVUE */
- @media screen and (max-width: 500px) {
- .hide-on-phone {
- display: none;
- }
- }
-
- /* #endif */
- .uni-stat__select {
- display: flex;
- align-items: center;
- // padding: 15px;
- /* #ifdef H5 */
- cursor: pointer;
- /* #endif */
- width: 100%;
- flex: 1;
- box-sizing: border-box;
- }
-
- .uni-stat-box {
- width: 100%;
- flex: 1;
- }
-
- .uni-stat__actived {
- width: 100%;
- flex: 1;
- // outline: 1px solid #2979ff;
- }
-
- .uni-label-text {
- font-size: 14px;
- font-weight: bold;
- color: $uni-base-color;
- margin: auto 0;
- margin-right: 5px;
- }
-
- .uni-select {
- font-size: 14px;
- border: 1px solid $uni-border-3;
- box-sizing: border-box;
- border-radius: 4px;
- padding: 0 5px;
- padding-left: 10px;
- position: relative;
- /* #ifndef APP-NVUE */
- display: flex;
- user-select: none;
- /* #endif */
- flex-direction: row;
- align-items: center;
- border-bottom: solid 1px $uni-border-3;
- width: 100%;
- flex: 1;
- height: 35px;
-
- &--disabled {
- background-color: #f5f7fa;
- cursor: not-allowed;
- }
- }
-
- .uni-select__label {
- font-size: 16px;
- // line-height: 22px;
- height: 35px;
- padding-right: 10px;
- color: $uni-secondary-color;
- }
-
- .uni-select__input-box {
- height: 35px;
- position: relative;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex: 1;
- flex-direction: row;
- align-items: center;
- }
-
- .uni-select__input {
- flex: 1;
- font-size: 14px;
- height: 22px;
- line-height: 22px;
- }
-
- .uni-select__input-plac {
- font-size: 14px;
- color: $uni-secondary-color;
- }
-
- .uni-select__selector {
- /* #ifndef APP-NVUE */
- box-sizing: border-box;
- /* #endif */
- position: absolute;
- top: calc(100% + 12px);
- left: 0;
- width: 100%;
- background-color: #FFFFFF;
- border: 1px solid #EBEEF5;
- border-radius: 6px;
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
- z-index: 3;
- padding: 4px 0;
- }
-
- .uni-select__selector-scroll {
- /* #ifndef APP-NVUE */
- max-height: 200px;
- box-sizing: border-box;
- /* #endif */
- }
-
- /* #ifdef H5 */
- @media (min-width: 768px) {
- .uni-select__selector-scroll {
- max-height: 600px;
- }
- }
-
- /* #endif */
-
- .uni-select__selector-empty,
- .uni-select__selector-item {
- /* #ifndef APP-NVUE */
- display: flex;
- cursor: pointer;
- /* #endif */
- line-height: 35px;
- font-size: 14px;
- text-align: center;
- /* border-bottom: solid 1px $uni-border-3; */
- padding: 0px 10px;
- }
-
- .uni-select__selector-item:hover {
- background-color: #f9f9f9;
- }
-
- .uni-select__selector-empty:last-child,
- .uni-select__selector-item:last-child {
- /* #ifndef APP-NVUE */
- border-bottom: none;
- /* #endif */
- }
-
- .uni-select__selector__disabled {
- opacity: 0.4;
- cursor: default;
- }
-
- /* picker 弹出层通用的指示小三角 */
- .uni-popper__arrow,
- .uni-popper__arrow::after {
- position: absolute;
- display: block;
- width: 0;
- height: 0;
- border-color: transparent;
- border-style: solid;
- border-width: 6px;
- }
-
- .uni-popper__arrow {
- filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
- top: -6px;
- left: 10%;
- margin-right: 3px;
- border-top-width: 0;
- border-bottom-color: #EBEEF5;
- }
-
- .uni-popper__arrow::after {
- content: " ";
- top: 1px;
- margin-left: -6px;
- border-top-width: 0;
- border-bottom-color: #fff;
- }
-
- .uni-select__input-text {
- // width: 280px;
- width: 100%;
- color: $uni-main-color;
- white-space: nowrap;
- text-overflow: ellipsis;
- -o-text-overflow: ellipsis;
- overflow: hidden;
- }
-
- .uni-select__input-placeholder {
- color: $uni-base-color;
- font-size: 12px;
- }
-
- .uni-select--mask {
- position: fixed;
- top: 0;
- bottom: 0;
- right: 0;
- left: 0;
- z-index: 2;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/dbSafety/components/uni-components/uni-data-select/package.json b/subPackage/dbSafety/components/uni-components/uni-data-select/package.json
deleted file mode 100644
index 0187429..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-data-select/package.json
+++ /dev/null
@@ -1,85 +0,0 @@
-{
- "id": "uni-data-select",
- "displayName": "uni-data-select 下拉框选择器",
- "version": "1.0.6",
- "description": "通过数据驱动的下拉框选择器",
- "keywords": [
- "uni-ui",
- "select",
- "uni-data-select",
- "下拉框",
- "下拉选"
-],
- "repository": "https://github.com/dcloudio/uni-ui",
- "engines": {
- "HBuilderX": "^3.1.1"
- },
- "directories": {
- "example": "../../temps/example_temps"
- },
-"dcloudext": {
- "sale": {
- "regular": {
- "price": "0.00"
- },
- "sourcecode": {
- "price": "0.00"
- }
- },
- "contact": {
- "qq": ""
- },
- "declaration": {
- "ads": "无",
- "data": "无",
- "permissions": "无"
- },
- "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
- "type": "component-vue"
- },
- "uni_modules": {
- "dependencies": ["uni-load-more"],
- "encrypt": [],
- "platforms": {
- "cloud": {
- "tcb": "y",
- "aliyun": "y"
- },
- "client": {
- "App": {
- "app-vue": "u",
- "app-nvue": "n"
- },
- "H5-mobile": {
- "Safari": "y",
- "Android Browser": "y",
- "微信浏览器(Android)": "y",
- "QQ浏览器(Android)": "y"
- },
- "H5-pc": {
- "Chrome": "y",
- "IE": "y",
- "Edge": "y",
- "Firefox": "y",
- "Safari": "y"
- },
- "小程序": {
- "微信": "y",
- "阿里": "u",
- "百度": "u",
- "字节跳动": "u",
- "QQ": "u",
- "京东": "u"
- },
- "快应用": {
- "华为": "u",
- "联盟": "u"
- },
- "Vue": {
- "vue2": "y",
- "vue3": "y"
- }
- }
- }
- }
-}
diff --git a/subPackage/dbSafety/components/uni-components/uni-data-select/readme.md b/subPackage/dbSafety/components/uni-components/uni-data-select/readme.md
deleted file mode 100644
index eb58de3..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-data-select/readme.md
+++ /dev/null
@@ -1,8 +0,0 @@
-## DataSelect 下拉框选择器
-> **组件名:uni-data-select**
-> 代码块: `uDataSelect`
-
-当选项过多时,使用下拉菜单展示并选择内容
-
-### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-data-select)
-#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
diff --git a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/changelog.md b/subPackage/dbSafety/components/uni-components/uni-datetime-picker/changelog.md
deleted file mode 100644
index 47e3ccf..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/changelog.md
+++ /dev/null
@@ -1,137 +0,0 @@
-## 2.2.23(2023-05-02)
-- 修复 部分情况修改时间,开始时间未更新 [详情](https://github.com/dcloudio/uni-ui/issues/737)
-- 修复 部分平台及设备第一次点击无法显示弹框
-- 修复 ios 日期格式未补零显示及使用异常 [详情](https://ask.dcloud.net.cn/question/162979)
-## 2.2.22(2023-03-30)
-- 修复 日历 picker 修改年月后,自动选中当月1日 [详情](https://ask.dcloud.net.cn/question/165937)
-- 修复 小程序端 低版本 ios NaN [详情](https://ask.dcloud.net.cn/question/162979)
-## 2.2.21(2023-02-20)
-- 修复 firefox 浏览器显示区域点击无法拉起日历弹框的Bug [详情](https://ask.dcloud.net.cn/question/163362)
-## 2.2.20(2023-02-17)
-- 优化 值为空依然选中当天问题
-- 优化 提供 default-value 属性支持配置选择器打开时默认显示的时间
-- 优化 非范围选择未选择日期时间,点击确认按钮选中当前日期时间
-- 优化 字节小程序日期时间范围选择,底部日期换行问题
-## 2.2.19(2023-02-09)
-- 修复 2.2.18 引起范围选择配置 end 选择无效的Bug [详情](https://github.com/dcloudio/uni-ui/issues/686)
-## 2.2.18(2023-02-08)
-- 修复 移动端范围选择change事件触发异常的Bug [详情](https://github.com/dcloudio/uni-ui/issues/684)
-- 优化 PC端输入日期格式错误时返回当前日期时间
-- 优化 PC端输入日期时间超出 start、end 限制的Bug
-- 优化 移动端日期时间范围用法时间展示不完整问题
-## 2.2.17(2023-02-04)
-- 修复 小程序端绑定 Date 类型报错的Bug [详情](https://github.com/dcloudio/uni-ui/issues/679)
-- 修复 vue3 time-picker 无法显示绑定时分秒的Bug
-## 2.2.16(2023-02-02)
-- 修复 字节小程序报错的Bug
-## 2.2.15(2023-02-02)
-- 修复 某些情况切换月份错误的Bug
-## 2.2.14(2023-01-30)
-- 修复 某些情况切换月份错误的Bug [详情](https://ask.dcloud.net.cn/question/162033)
-## 2.2.13(2023-01-10)
-- 修复 多次加载组件造成内存占用的Bug
-## 2.2.12(2022-12-01)
-- 修复 vue3 下 i18n 国际化初始值不正确的Bug
-## 2.2.11(2022-09-19)
-- 修复 支付宝小程序样式错乱的Bug [详情](https://github.com/dcloudio/uni-app/issues/3861)
-## 2.2.10(2022-09-19)
-- 修复 反向选择日期范围,日期显示异常的Bug [详情](https://ask.dcloud.net.cn/question/153401?item_id=212892&rf=false)
-## 2.2.9(2022-09-16)
-- 可以使用 uni-scss 控制主题色
-## 2.2.8(2022-09-08)
-- 修复 close事件无效的Bug
-## 2.2.7(2022-09-05)
-- 修复 移动端 maskClick 无效的Bug [详情](https://ask.dcloud.net.cn/question/140824)
-## 2.2.6(2022-06-30)
-- 优化 组件样式,调整了组件图标大小、高度、颜色等,与uni-ui风格保持一致
-## 2.2.5(2022-06-24)
-- 修复 日历顶部年月及底部确认未国际化的Bug
-## 2.2.4(2022-03-31)
-- 修复 Vue3 下动态赋值,单选类型未响应的Bug
-## 2.2.3(2022-03-28)
-- 修复 Vue3 下动态赋值未响应的Bug
-## 2.2.2(2021-12-10)
-- 修复 clear-icon 属性在小程序平台不生效的Bug
-## 2.2.1(2021-12-10)
-- 修复 日期范围选在小程序平台,必须多点击一次才能取消选中状态的Bug
-## 2.2.0(2021-11-19)
-- 优化 组件UI,并提供设计资源 [详情](https://uniapp.dcloud.io/component/uniui/resource)
-- 文档迁移 [https://uniapp.dcloud.io/component/uniui/uni-datetime-picker](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker)
-## 2.1.5(2021-11-09)
-- 新增 提供组件设计资源,组件样式调整
-## 2.1.4(2021-09-10)
-- 修复 hide-second 在移动端的Bug
-- 修复 单选赋默认值时,赋值日期未高亮的Bug
-- 修复 赋默认值时,移动端未正确显示时间的Bug
-## 2.1.3(2021-09-09)
-- 新增 hide-second 属性,支持只使用时分,隐藏秒
-## 2.1.2(2021-09-03)
-- 优化 取消选中时(范围选)直接开始下一次选择, 避免多点一次
-- 优化 移动端支持清除按钮,同时支持通过 ref 调用组件的 clear 方法
-- 优化 调整字号大小,美化日历界面
-- 修复 因国际化导致的 placeholder 失效的Bug
-## 2.1.1(2021-08-24)
-- 新增 支持国际化
-- 优化 范围选择器在 pc 端过宽的问题
-## 2.1.0(2021-08-09)
-- 新增 适配 vue3
-## 2.0.19(2021-08-09)
-- 新增 支持作为 uni-forms 子组件相关功能
-- 修复 在 uni-forms 中使用时,选择时间报 NAN 错误的Bug
-## 2.0.18(2021-08-05)
-- 修复 type 属性动态赋值无效的Bug
-- 修复 ‘确认’按钮被 tabbar 遮盖 bug
-- 修复 组件未赋值时范围选左、右日历相同的Bug
-## 2.0.17(2021-08-04)
-- 修复 范围选未正确显示当前值的Bug
-- 修复 h5 平台(移动端)报错 'cale' of undefined 的Bug
-## 2.0.16(2021-07-21)
-- 新增 return-type 属性支持返回 date 日期对象
-## 2.0.15(2021-07-14)
-- 修复 单选日期类型,初始赋值后不在当前日历的Bug
-- 新增 clearIcon 属性,显示框的清空按钮可配置显示隐藏(仅 pc 有效)
-- 优化 移动端移除显示框的清空按钮,无实际用途
-## 2.0.14(2021-07-14)
-- 修复 组件赋值为空,界面未更新的Bug
-- 修复 start 和 end 不能动态赋值的Bug
-- 修复 范围选类型,用户选择后再次选择右侧日历(结束日期)显示不正确的Bug
-## 2.0.13(2021-07-08)
-- 修复 范围选择不能动态赋值的Bug
-## 2.0.12(2021-07-08)
-- 修复 范围选择的初始时间在一个月内时,造成无法选择的bug
-## 2.0.11(2021-07-08)
-- 优化 弹出层在超出视窗边缘定位不准确的问题
-## 2.0.10(2021-07-08)
-- 修复 范围起始点样式的背景色与今日样式的字体前景色融合,导致日期字体看不清的Bug
-- 优化 弹出层在超出视窗边缘被遮盖的问题
-## 2.0.9(2021-07-07)
-- 新增 maskClick 事件
-- 修复 特殊情况日历 rpx 布局错误的Bug,rpx -> px
-- 修复 范围选择时清空返回值不合理的bug,['', ''] -> []
-## 2.0.8(2021-07-07)
-- 新增 日期时间显示框支持插槽
-## 2.0.7(2021-07-01)
-- 优化 添加 uni-icons 依赖
-## 2.0.6(2021-05-22)
-- 修复 图标在小程序上不显示的Bug
-- 优化 重命名引用组件,避免潜在组件命名冲突
-## 2.0.5(2021-05-20)
-- 优化 代码目录扁平化
-## 2.0.4(2021-05-12)
-- 新增 组件示例地址
-## 2.0.3(2021-05-10)
-- 修复 ios 下不识别 '-' 日期格式的Bug
-- 优化 pc 下弹出层添加边框和阴影
-## 2.0.2(2021-05-08)
-- 修复 在 admin 中获取弹出层定位错误的bug
-## 2.0.1(2021-05-08)
-- 修复 type 属性向下兼容,默认值从 date 变更为 datetime
-## 2.0.0(2021-04-30)
-- 支持日历形式的日期+时间的范围选择
- > 注意:此版本不向后兼容,不再支持单独时间选择(type=time)及相关的 hide-second 属性(时间选可使用内置组件 picker)
-## 1.0.6(2021-03-18)
-- 新增 hide-second 属性,时间支持仅选择时、分
-- 修复 选择跟显示的日期不一样的Bug
-- 修复 chang事件触发2次的Bug
-- 修复 分、秒 end 范围错误的Bug
-- 优化 更好的 nvue 适配
diff --git a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue b/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue
deleted file mode 100644
index dba9887..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue
+++ /dev/null
@@ -1,177 +0,0 @@
-<template>
- <view class="uni-calendar-item__weeks-box" :class="{
- 'uni-calendar-item--disable':weeks.disable,
- 'uni-calendar-item--before-checked-x':weeks.beforeMultiple,
- 'uni-calendar-item--multiple': weeks.multiple,
- 'uni-calendar-item--after-checked-x':weeks.afterMultiple,
- }" @click="choiceDate(weeks)" @mouseenter="handleMousemove(weeks)">
- <view class="uni-calendar-item__weeks-box-item" :class="{
- 'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && (calendar.userChecked || !checkHover),
- 'uni-calendar-item--checked-range-text': checkHover,
- 'uni-calendar-item--before-checked':weeks.beforeMultiple,
- 'uni-calendar-item--multiple': weeks.multiple,
- 'uni-calendar-item--after-checked':weeks.afterMultiple,
- 'uni-calendar-item--disable':weeks.disable,
- }">
- <text v-if="selected && weeks.extraInfo" class="uni-calendar-item__weeks-box-circle"></text>
- <text class="uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text">{{weeks.date}}</text>
- </view>
- <view :class="{'uni-calendar-item--today': weeks.isToday}"></view>
- </view>
-</template>
-
-<script>
- export default {
- props: {
- weeks: {
- type: Object,
- default () {
- return {}
- }
- },
- calendar: {
- type: Object,
- default: () => {
- return {}
- }
- },
- selected: {
- type: Array,
- default: () => {
- return []
- }
- },
- checkHover: {
- type: Boolean,
- default: false
- }
- },
- methods: {
- choiceDate(weeks) {
- this.$emit('change', weeks)
- },
- handleMousemove(weeks) {
- this.$emit('handleMouse', weeks)
- }
- }
- }
-</script>
-
-<style lang="scss" >
- $uni-primary: #007aff !default;
-
- .uni-calendar-item__weeks-box {
- flex: 1;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: column;
- justify-content: center;
- align-items: center;
- margin: 1px 0;
- position: relative;
- }
-
- .uni-calendar-item__weeks-box-text {
- font-size: 14px;
- // font-family: Lato-Bold, Lato;
- font-weight: bold;
- color: darken($color: $uni-primary, $amount: 40%);
- }
-
- .uni-calendar-item__weeks-box-item {
- position: relative;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: column;
- justify-content: center;
- align-items: center;
- width: 40px;
- height: 40px;
- /* #ifdef H5 */
- cursor: pointer;
- /* #endif */
- }
-
-
- .uni-calendar-item__weeks-box-circle {
- position: absolute;
- top: 5px;
- right: 5px;
- width: 8px;
- height: 8px;
- border-radius: 8px;
- background-color: #dd524d;
-
- }
-
- .uni-calendar-item__weeks-box .uni-calendar-item--disable {
- cursor: default;
- }
-
- .uni-calendar-item--disable .uni-calendar-item__weeks-box-text-disable {
- color: #D1D1D1;
- }
-
- .uni-calendar-item--today {
- position: absolute;
- top: 10px;
- right: 17%;
- background-color: #dd524d;
- width:6px;
- height: 6px;
- border-radius: 50%;
- }
-
- .uni-calendar-item--extra {
- color: #dd524d;
- opacity: 0.8;
- }
-
- .uni-calendar-item__weeks-box .uni-calendar-item--checked {
- background-color: $uni-primary;
- border-radius: 50%;
- box-sizing: border-box;
- border: 3px solid #fff;
- }
-
- .uni-calendar-item--checked .uni-calendar-item--checked-text {
- color: #fff;
- }
-
- .uni-calendar-item--multiple .uni-calendar-item--checked-range-text {
- color: #333;
- }
-
- .uni-calendar-item--multiple {
- background-color: #F6F7FC;
- // color: #fff;
- }
-
- .uni-calendar-item--multiple .uni-calendar-item--before-checked,
- .uni-calendar-item--multiple .uni-calendar-item--after-checked {
- background-color: $uni-primary;
- border-radius: 50%;
- box-sizing: border-box;
- border: 3px solid #F6F7FC;
- }
-
- .uni-calendar-item--before-checked .uni-calendar-item--checked-text,
- .uni-calendar-item--after-checked .uni-calendar-item--checked-text {
- color: #fff;
- }
-
- .uni-calendar-item--before-checked-x {
- border-top-left-radius: 50px;
- border-bottom-left-radius: 50px;
- box-sizing: border-box;
- background-color: #F6F7FC;
- }
-
- .uni-calendar-item--after-checked-x {
- border-top-right-radius: 50px;
- border-bottom-right-radius: 50px;
- background-color: #F6F7FC;
- }
-</style>
diff --git a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/calendar.vue b/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/calendar.vue
deleted file mode 100644
index d6d12bd..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/calendar.vue
+++ /dev/null
@@ -1,939 +0,0 @@
-<template>
- <view class="uni-calendar" @mouseleave="leaveCale">
-
- <view v-if="!insert && show" class="uni-calendar__mask" :class="{'uni-calendar--mask-show':aniMaskShow}"
- @click="maskClick"></view>
-
- <view v-if="insert || show" class="uni-calendar__content"
- :class="{'uni-calendar--fixed':!insert,'uni-calendar--ani-show':aniMaskShow, 'uni-calendar__content-mobile': aniMaskShow}">
- <view class="uni-calendar__header" :class="{'uni-calendar__header-mobile' :!insert}">
-
- <view class="uni-calendar__header-btn-box" @click.stop="changeMonth('pre')">
- <view class="uni-calendar__header-btn uni-calendar--left"></view>
- </view>
-
- <picker mode="date" :value="date" fields="month" @change="bindDateChange">
- <text
- class="uni-calendar__header-text">{{ (nowDate.year||'') + yearText + ( nowDate.month||'') + monthText}}</text>
- </picker>
-
- <view class="uni-calendar__header-btn-box" @click.stop="changeMonth('next')">
- <view class="uni-calendar__header-btn uni-calendar--right"></view>
- </view>
-
- <view v-if="!insert" class="dialog-close" @click="close">
- <view class="dialog-close-plus" data-id="close"></view>
- <view class="dialog-close-plus dialog-close-rotate" data-id="close"></view>
- </view>
- </view>
- <view class="uni-calendar__box">
-
- <view v-if="showMonth" class="uni-calendar__box-bg">
- <text class="uni-calendar__box-bg-text">{{nowDate.month}}</text>
- </view>
-
- <view class="uni-calendar__weeks" style="padding-bottom: 7px;">
- <view class="uni-calendar__weeks-day">
- <text class="uni-calendar__weeks-day-text">{{SUNText}}</text>
- </view>
- <view class="uni-calendar__weeks-day">
- <text class="uni-calendar__weeks-day-text">{{MONText}}</text>
- </view>
- <view class="uni-calendar__weeks-day">
- <text class="uni-calendar__weeks-day-text">{{TUEText}}</text>
- </view>
- <view class="uni-calendar__weeks-day">
- <text class="uni-calendar__weeks-day-text">{{WEDText}}</text>
- </view>
- <view class="uni-calendar__weeks-day">
- <text class="uni-calendar__weeks-day-text">{{THUText}}</text>
- </view>
- <view class="uni-calendar__weeks-day">
- <text class="uni-calendar__weeks-day-text">{{FRIText}}</text>
- </view>
- <view class="uni-calendar__weeks-day">
- <text class="uni-calendar__weeks-day-text">{{SATText}}</text>
- </view>
- </view>
-
- <view class="uni-calendar__weeks" v-for="(item,weekIndex) in weeks" :key="weekIndex">
- <view class="uni-calendar__weeks-item" v-for="(weeks,weeksIndex) in item" :key="weeksIndex">
- <calendar-item class="uni-calendar-item--hook" :weeks="weeks" :calendar="calendar"
- :selected="selected" :checkHover="range" @change="choiceDate"
- @handleMouse="handleMouse">
- </calendar-item>
- </view>
- </view>
- </view>
-
- <view v-if="!insert && !range && hasTime" class="uni-date-changed uni-calendar--fixed-top"
- style="padding: 0 80px;">
- <view class="uni-date-changed--time-date">{{tempSingleDate ? tempSingleDate : selectDateText}}</view>
- <time-picker type="time" :start="timepickerStartTime" :end="timepickerEndTime" v-model="time"
- :disabled="!tempSingleDate" :border="false" :hide-second="hideSecond" class="time-picker-style">
- </time-picker>
- </view>
-
- <view v-if="!insert && range && hasTime" class="uni-date-changed uni-calendar--fixed-top">
- <view class="uni-date-changed--time-start">
- <view class="uni-date-changed--time-date">{{tempRange.before ? tempRange.before : startDateText}}
- </view>
- <time-picker type="time" :start="timepickerStartTime" v-model="timeRange.startTime" :border="false"
- :hide-second="hideSecond" :disabled="!tempRange.before" class="time-picker-style">
- </time-picker>
- </view>
- <view style="line-height: 50px;">
- <uni-icons type="arrowthinright" color="#999"></uni-icons>
- </view>
- <view class="uni-date-changed--time-end">
- <view class="uni-date-changed--time-date">{{tempRange.after ? tempRange.after : endDateText}}</view>
- <time-picker type="time" :end="timepickerEndTime" v-model="timeRange.endTime" :border="false"
- :hide-second="hideSecond" :disabled="!tempRange.after" class="time-picker-style">
- </time-picker>
- </view>
- </view>
-
- <view v-if="!insert" class="uni-date-changed uni-date-btn--ok">
- <view class="uni-datetime-picker--btn" @click="confirm">{{confirmText}}</view>
- </view>
- </view>
- </view>
-</template>
-
-<script>
- import { Calendar, getDate, getTime } from './util.js';
- import calendarItem from './calendar-item.vue'
- import timePicker from './time-picker.vue'
- import uniIcons from "../../../uni-icons/components/uni-icons/uni-icons.vue"
- import { initVueI18n } from '@dcloudio/uni-i18n'
- import i18nMessages from './i18n/index.js'
- const { t } = initVueI18n(i18nMessages)
-
- /**
- * Calendar 日历
- * @description 日历组件可以查看日期,选择任意范围内的日期,打点操作。常用场景如:酒店日期预订、火车机票选择购买日期、上下班打卡等
- * @tutorial https://ext.dcloud.net.cn/plugin?id=56
- * @property {String} date 自定义当前时间,默认为今天
- * @property {String} startDate 日期选择范围-开始日期
- * @property {String} endDate 日期选择范围-结束日期
- * @property {Boolean} range 范围选择
- * @property {Boolean} insert = [true|false] 插入模式,默认为false
- * @value true 弹窗模式
- * @value false 插入模式
- * @property {Boolean} clearDate = [true|false] 弹窗模式是否清空上次选择内容
- * @property {Array} selected 打点,期待格式[{date: '2019-06-27', info: '签到', data: { custom: '自定义信息', name: '自定义消息头',xxx:xxx... }}]
- * @property {Boolean} showMonth 是否选择月份为背景
- * @property {[String} defaultValue 选择器打开时默认显示的时间
- * @event {Function} change 日期改变,`insert :ture` 时生效
- * @event {Function} confirm 确认选择`insert :false` 时生效
- * @event {Function} monthSwitch 切换月份时触发
- * @example <uni-calendar :insert="true" :start-date="'2019-3-2'":end-date="'2019-5-20'"@change="change" />
- */
- export default {
- components: {
- calendarItem,
- timePicker,
- uniIcons
- },
- props: {
- date: {
- type: String,
- default: ''
- },
- defTime: {
- type: [String, Object],
- default: ''
- },
- selectableTimes: {
- type: [Object],
- default () {
- return {}
- }
- },
- selected: {
- type: Array,
- default () {
- return []
- }
- },
- startDate: {
- type: String,
- default: ''
- },
- endDate: {
- type: String,
- default: ''
- },
- startPlaceholder: {
- type: String,
- default: ''
- },
- endPlaceholder: {
- type: String,
- default: ''
- },
- range: {
- type: Boolean,
- default: false
- },
- hasTime: {
- type: Boolean,
- default: false
- },
- insert: {
- type: Boolean,
- default: true
- },
- showMonth: {
- type: Boolean,
- default: true
- },
- clearDate: {
- type: Boolean,
- default: true
- },
- checkHover: {
- type: Boolean,
- default: true
- },
- hideSecond: {
- type: [Boolean],
- default: false
- },
- pleStatus: {
- type: Object,
- default () {
- return {
- before: '',
- after: '',
- data: [],
- fulldate: ''
- }
- }
- },
- defaultValue: {
- type: [String, Object, Array],
- default: ''
- }
- },
- data() {
- return {
- show: false,
- weeks: [],
- calendar: {},
- nowDate: {},
- aniMaskShow: false,
- firstEnter: true,
- time: '',
- timeRange: {
- startTime: '',
- endTime: ''
- },
- tempSingleDate: '',
- tempRange: {
- before: '',
- after: ''
- },
- isPhone: false
- }
- },
- watch: {
- date: {
- immediate: true,
- handler(newVal) {
- if (!this.range) {
- this.tempSingleDate = newVal
- setTimeout(() => {
- this.init(newVal)
- }, 100)
- }
- }
- },
- defTime: {
- immediate: true,
- handler(newVal) {
- if (!this.range) {
- this.time = newVal
- } else {
- this.timeRange.startTime = newVal.start
- this.timeRange.endTime = newVal.end
- }
- }
- },
- startDate(val) {
- // 字节小程序 watch 早于 created
- if(!this.cale){
- return
- }
- this.cale.setStartDate(val)
- this.cale.setDate(this.nowDate.fullDate)
- this.weeks = this.cale.weeks
- },
- endDate(val) {
- // 字节小程序 watch 早于 created
- if(!this.cale){
- return
- }
- this.cale.setEndDate(val)
- this.cale.setDate(this.nowDate.fullDate)
- this.weeks = this.cale.weeks
- },
- selected(newVal) {
- // 字节小程序 watch 早于 created
- if(!this.cale){
- return
- }
- this.cale.setSelectInfo(this.nowDate.fullDate, newVal)
- this.weeks = this.cale.weeks
- },
- pleStatus: {
- immediate: true,
- handler(newVal) {
- const {
- before,
- after,
- fulldate,
- which
- } = newVal
- this.tempRange.before = before
- this.tempRange.after = after
- setTimeout(() => {
- if (fulldate) {
- this.cale.setHoverMultiple(fulldate)
- if (before && after) {
- this.cale.lastHover = true
- if (this.rangeWithinMonth(after, before)) return
- this.setDate(before)
- } else {
- this.cale.setMultiple(fulldate)
- this.setDate(this.nowDate.fullDate)
- this.calendar.fullDate = ''
- this.cale.lastHover = false
- }
- } else {
- // 字节小程序 watch 早于 created
- if(!this.cale){
- return
- }
-
- this.cale.setDefaultMultiple(before, after)
- if (which === 'left' && before) {
- this.setDate(before)
- this.weeks = this.cale.weeks
- } else if(after) {
- this.setDate(after)
- this.weeks = this.cale.weeks
- }
- this.cale.lastHover = true
- }
- }, 16)
- }
- }
- },
- computed: {
- timepickerStartTime() {
- const activeDate = this.range ? this.tempRange.before : this.calendar.fullDate
- return activeDate === this.startDate ? this.selectableTimes.start : ''
- },
- timepickerEndTime() {
- const activeDate = this.range ? this.tempRange.after : this.calendar.fullDate
- return activeDate === this.endDate ? this.selectableTimes.end : ''
- },
- /**
- * for i18n
- */
- selectDateText() {
- return t("uni-datetime-picker.selectDate")
- },
- startDateText() {
- return this.startPlaceholder || t("uni-datetime-picker.startDate")
- },
- endDateText() {
- return this.endPlaceholder || t("uni-datetime-picker.endDate")
- },
- okText() {
- return t("uni-datetime-picker.ok")
- },
- yearText() {
- return t("uni-datetime-picker.year")
- },
- monthText() {
- return t("uni-datetime-picker.month")
- },
- MONText() {
- return t("uni-calender.MON")
- },
- TUEText() {
- return t("uni-calender.TUE")
- },
- WEDText() {
- return t("uni-calender.WED")
- },
- THUText() {
- return t("uni-calender.THU")
- },
- FRIText() {
- return t("uni-calender.FRI")
- },
- SATText() {
- return t("uni-calender.SAT")
- },
- SUNText() {
- return t("uni-calender.SUN")
- },
- confirmText() {
- return t("uni-calender.confirm")
- },
- },
- created() {
- // 获取日历方法实例
- this.cale = new Calendar({
- selected: this.selected,
- startDate: this.startDate,
- endDate: this.endDate,
- range: this.range,
- })
- // 选中某一天
- this.init(this.date)
- },
- mounted(){
- if(typeof navigator !== "undefined"){
- this.isPhone = navigator.userAgent.toLowerCase().indexOf('mobile') !== -1
- return
- }
- const { windowWidth } = uni.getSystemInfoSync()
- this.isPhone = windowWidth <= 500
- },
- methods: {
- leaveCale() {
- this.firstEnter = true
- },
- handleMouse(weeks) {
- if (weeks.disable) return
- if (this.cale.lastHover) return
- let {
- before,
- after
- } = this.cale.multipleStatus
- if (!before) return
- this.calendar = weeks
- // 设置范围选
- this.cale.setHoverMultiple(this.calendar.fullDate)
- this.weeks = this.cale.weeks
- // hover时,进入一个日历,更新另一个
- if (this.firstEnter) {
- this.$emit('firstEnterCale', this.cale.multipleStatus)
- this.firstEnter = false
- }
- },
- rangeWithinMonth(A, B) {
- const [yearA, monthA] = A.split('-')
- const [yearB, monthB] = B.split('-')
- return yearA === yearB && monthA === monthB
- },
- // 蒙版点击事件
- maskClick() {
- this.close()
- this.$emit('maskClose')
- },
-
- clearCalender() {
- if (this.range) {
- this.timeRange.startTime = ''
- this.timeRange.endTime = ''
- this.tempRange.before = ''
- this.tempRange.after = ''
- this.cale.multipleStatus.before = ''
- this.cale.multipleStatus.after = ''
- this.cale.multipleStatus.data = []
- this.cale.lastHover = false
- } else {
- this.time = ''
- this.tempSingleDate = ''
- }
- this.calendar.fullDate = ''
- this.setDate(new Date())
- },
-
- bindDateChange(e) {
- const value = e.detail.value + '-1'
- this.setDate(value)
- },
- /**
- * 初始化日期显示
- * @param {Object} date
- */
- init(date) {
- // 字节小程序 watch 早于 created
- if(!this.cale){
- return
- }
- this.cale.setDate(date || new Date())
- this.weeks = this.cale.weeks
- this.nowDate = this.cale.getInfo(date)
- this.calendar = {...this.nowDate}
- if(!date){
- // 优化date为空默认不选中今天
- this.calendar.fullDate = ''
- if(this.defaultValue && !this.range){
- // 暂时只支持移动端非范围选择
- const defaultDate = new Date(this.defaultValue)
- const fullDate = getDate(defaultDate)
- const year = defaultDate.getFullYear()
- const month = defaultDate.getMonth()+1
- const date = defaultDate.getDate()
- const day = defaultDate.getDay()
- this.calendar = {
- fullDate,
- year,
- month,
- date,
- day
- },
- this.tempSingleDate = fullDate
- this.time = getTime(defaultDate, this.hideSecond)
- }
- }
- },
- /**
- * 打开日历弹窗
- */
- open() {
- // 弹窗模式并且清理数据
- if (this.clearDate && !this.insert) {
- this.cale.cleanMultipleStatus()
- this.init(this.date)
- }
- this.show = true
- this.$nextTick(() => {
- setTimeout(() => {
- this.aniMaskShow = true
- }, 50)
- })
- },
- /**
- * 关闭日历弹窗
- */
- close() {
- this.aniMaskShow = false
- this.$nextTick(() => {
- setTimeout(() => {
- this.show = false
- this.$emit('close')
- }, 300)
- })
- },
- /**
- * 确认按钮
- */
- confirm() {
- this.setEmit('confirm')
- this.close()
- },
- /**
- * 变化触发
- */
- change() {
- if (!this.insert) return
- this.setEmit('change')
- },
- /**
- * 选择月份触发
- */
- monthSwitch() {
- let {
- year,
- month
- } = this.nowDate
- this.$emit('monthSwitch', {
- year,
- month: Number(month)
- })
- },
- /**
- * 派发事件
- * @param {Object} name
- */
- setEmit(name) {
- if(!this.range){
- if(!this.calendar.fullDate){
- this.calendar = this.cale.getInfo(new Date())
- this.tempSingleDate = this.calendar.fullDate
- }
- if(this.hasTime && !this.time) {
- this.time = getTime(new Date(), this.hideSecond)
- }
- }
- let {
- year,
- month,
- date,
- fullDate,
- extraInfo
- } = this.calendar
- this.$emit(name, {
- range: this.cale.multipleStatus,
- year,
- month,
- date,
- time: this.time,
- timeRange: this.timeRange,
- fulldate: fullDate,
- extraInfo: extraInfo || {}
- })
- },
- /**
- * 选择天触发
- * @param {Object} weeks
- */
- choiceDate(weeks) {
- if (weeks.disable) return
- this.calendar = weeks
- this.calendar.userChecked = true
- // 设置多选
- this.cale.setMultiple(this.calendar.fullDate, true)
- this.weeks = this.cale.weeks
- this.tempSingleDate = this.calendar.fullDate
- const beforeDate = new Date(this.cale.multipleStatus.before).getTime()
- const afterDate = new Date(this.cale.multipleStatus.after).getTime()
- // 这里返回的 before after 为什么要做替换?导致PC端如果开始结束日期都是今天,第一次选择开始日期早于今天,开始日期不更新
- if (beforeDate > afterDate && afterDate && !this.isPhone) {
- this.tempRange.before = this.cale.multipleStatus.after
- this.tempRange.after = this.cale.multipleStatus.before
- } else {
- this.tempRange.before = this.cale.multipleStatus.before
- this.tempRange.after = this.cale.multipleStatus.after
- }
- this.change()
- },
- changeMonth(type) {
- let newDate
- if(type === 'pre') {
- newDate = this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate
- } else if(type === 'next') {
- newDate = this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate
- }
-
- this.setDate(newDate)
- this.monthSwitch()
- },
- /**
- * 设置日期
- * @param {Object} date
- */
- setDate(date) {
- this.cale.setDate(date)
- this.weeks = this.cale.weeks
- this.nowDate = this.cale.getInfo(date)
- }
- }
- }
-</script>
-
-<style lang="scss" >
- $uni-primary: #007aff !default;
-
- .uni-calendar {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: column;
- }
-
- .uni-calendar__mask {
- position: fixed;
- bottom: 0;
- top: 0;
- left: 0;
- right: 0;
- background-color: rgba(0, 0, 0, 0.4);
- transition-property: opacity;
- transition-duration: 0.3s;
- opacity: 0;
- /* #ifndef APP-NVUE */
- z-index: 99;
- /* #endif */
- }
-
- .uni-calendar--mask-show {
- opacity: 1
- }
-
- .uni-calendar--fixed {
- position: fixed;
- bottom: calc(var(--window-bottom));
- left: 0;
- right: 0;
- transition-property: transform;
- transition-duration: 0.3s;
- transform: translateY(460px);
- /* #ifndef APP-NVUE */
- z-index: 99;
- /* #endif */
- }
-
- .uni-calendar--ani-show {
- transform: translateY(0);
- }
-
- .uni-calendar__content {
- background-color: #fff;
- }
-
- .uni-calendar__content-mobile {
- border-top-left-radius: 10px;
- border-top-right-radius: 10px;
- box-shadow: 0px 0px 5px 3px rgba(0, 0, 0, 0.1);
- }
-
- .uni-calendar__header {
- position: relative;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- justify-content: center;
- align-items: center;
- height: 50px;
- }
-
- .uni-calendar__header-mobile {
- padding: 10px;
- padding-bottom: 0;
- }
-
- .uni-calendar--fixed-top {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- justify-content: space-between;
- border-top-color: rgba(0, 0, 0, 0.4);
- border-top-style: solid;
- border-top-width: 1px;
- }
-
- .uni-calendar--fixed-width {
- width: 50px;
- }
-
- .uni-calendar__backtoday {
- position: absolute;
- right: 0;
- top: 25rpx;
- padding: 0 5px;
- padding-left: 10px;
- height: 25px;
- line-height: 25px;
- font-size: 12px;
- border-top-left-radius: 25px;
- border-bottom-left-radius: 25px;
- color: #fff;
- background-color: #f1f1f1;
- }
-
- .uni-calendar__header-text {
- text-align: center;
- width: 100px;
- font-size: 15px;
- color: #666;
- }
-
- .uni-calendar__button-text {
- text-align: center;
- width: 100px;
- font-size: 14px;
- color: $uni-primary;
- /* #ifndef APP-NVUE */
- letter-spacing: 3px;
- /* #endif */
- }
-
- .uni-calendar__header-btn-box {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- align-items: center;
- justify-content: center;
- width: 50px;
- height: 50px;
- }
-
- .uni-calendar__header-btn {
- width: 9px;
- height: 9px;
- border-left-color: #808080;
- border-left-style: solid;
- border-left-width: 1px;
- border-top-color: #555555;
- border-top-style: solid;
- border-top-width: 1px;
- }
-
- .uni-calendar--left {
- transform: rotate(-45deg);
- }
-
- .uni-calendar--right {
- transform: rotate(135deg);
- }
-
-
- .uni-calendar__weeks {
- position: relative;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- }
-
- .uni-calendar__weeks-item {
- flex: 1;
- }
-
- .uni-calendar__weeks-day {
- flex: 1;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: column;
- justify-content: center;
- align-items: center;
- height: 40px;
- border-bottom-color: #F5F5F5;
- border-bottom-style: solid;
- border-bottom-width: 1px;
- }
-
- .uni-calendar__weeks-day-text {
- font-size: 12px;
- color: #B2B2B2;
- }
-
- .uni-calendar__box {
- position: relative;
- // padding: 0 10px;
- padding-bottom: 7px;
- }
-
- .uni-calendar__box-bg {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- justify-content: center;
- align-items: center;
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- }
-
- .uni-calendar__box-bg-text {
- font-size: 200px;
- font-weight: bold;
- color: #999;
- opacity: 0.1;
- text-align: center;
- /* #ifndef APP-NVUE */
- line-height: 1;
- /* #endif */
- }
-
- .uni-date-changed {
- padding: 0 10px;
- // line-height: 50px;
- text-align: center;
- color: #333;
- border-top-color: #DCDCDC;
- ;
- border-top-style: solid;
- border-top-width: 1px;
- flex: 1;
- }
-
- .uni-date-btn--ok {
- padding: 20px 15px;
- }
-
- .uni-date-changed--time-start {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- align-items: center;
- }
-
- .uni-date-changed--time-end {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- align-items: center;
- }
-
- .uni-date-changed--time-date {
- color: #999;
- line-height: 50px;
- /* #ifdef MP-TOUTIAO */
- font-size: 16px;
- /* #endif */
- margin-right: 5px;
- // opacity: 0.6;
- }
-
- .time-picker-style {
- // width: 62px;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- justify-content: center;
- align-items: center
- }
-
- .mr-10 {
- margin-right: 10px;
- }
-
- .dialog-close {
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- align-items: center;
- padding: 0 25px;
- margin-top: 10px;
- }
-
- .dialog-close-plus {
- width: 16px;
- height: 2px;
- background-color: #737987;
- border-radius: 2px;
- transform: rotate(45deg);
- }
-
- .dialog-close-rotate {
- position: absolute;
- transform: rotate(-45deg);
- }
-
- .uni-datetime-picker--btn {
- border-radius: 100px;
- height: 40px;
- line-height: 40px;
- background-color: $uni-primary;
- color: #fff;
- font-size: 16px;
- letter-spacing: 2px;
- }
-
- /* #ifndef APP-NVUE */
- .uni-datetime-picker--btn:active {
- opacity: 0.7;
- }
- /* #endif */
-</style>
diff --git a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json b/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json
deleted file mode 100644
index 024f22f..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "uni-datetime-picker.selectDate": "select date",
- "uni-datetime-picker.selectTime": "select time",
- "uni-datetime-picker.selectDateTime": "select date and time",
- "uni-datetime-picker.startDate": "start date",
- "uni-datetime-picker.endDate": "end date",
- "uni-datetime-picker.startTime": "start time",
- "uni-datetime-picker.endTime": "end time",
- "uni-datetime-picker.ok": "ok",
- "uni-datetime-picker.clear": "clear",
- "uni-datetime-picker.cancel": "cancel",
- "uni-datetime-picker.year": "-",
- "uni-datetime-picker.month": "",
- "uni-calender.MON": "MON",
- "uni-calender.TUE": "TUE",
- "uni-calender.WED": "WED",
- "uni-calender.THU": "THU",
- "uni-calender.FRI": "FRI",
- "uni-calender.SAT": "SAT",
- "uni-calender.SUN": "SUN",
- "uni-calender.confirm": "confirm"
-}
diff --git a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js b/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js
deleted file mode 100644
index de7509c..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js
+++ /dev/null
@@ -1,8 +0,0 @@
-import en from './en.json'
-import zhHans from './zh-Hans.json'
-import zhHant from './zh-Hant.json'
-export default {
- en,
- 'zh-Hans': zhHans,
- 'zh-Hant': zhHant
-}
diff --git a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hans.json b/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hans.json
deleted file mode 100644
index d2df5e7..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hans.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "uni-datetime-picker.selectDate": "选择日期",
- "uni-datetime-picker.selectTime": "选择时间",
- "uni-datetime-picker.selectDateTime": "选择日期时间",
- "uni-datetime-picker.startDate": "开始日期",
- "uni-datetime-picker.endDate": "结束日期",
- "uni-datetime-picker.startTime": "开始时间",
- "uni-datetime-picker.endTime": "结束时间",
- "uni-datetime-picker.ok": "确定",
- "uni-datetime-picker.clear": "清除",
- "uni-datetime-picker.cancel": "取消",
- "uni-datetime-picker.year": "年",
- "uni-datetime-picker.month": "月",
- "uni-calender.SUN": "日",
- "uni-calender.MON": "一",
- "uni-calender.TUE": "二",
- "uni-calender.WED": "三",
- "uni-calender.THU": "四",
- "uni-calender.FRI": "五",
- "uni-calender.SAT": "六",
- "uni-calender.confirm": "确认"
-}
\ No newline at end of file
diff --git a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hant.json b/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hant.json
deleted file mode 100644
index d23fa3c..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hant.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "uni-datetime-picker.selectDate": "選擇日期",
- "uni-datetime-picker.selectTime": "選擇時間",
- "uni-datetime-picker.selectDateTime": "選擇日期時間",
- "uni-datetime-picker.startDate": "開始日期",
- "uni-datetime-picker.endDate": "結束日期",
- "uni-datetime-picker.startTime": "開始时间",
- "uni-datetime-picker.endTime": "結束时间",
- "uni-datetime-picker.ok": "確定",
- "uni-datetime-picker.clear": "清除",
- "uni-datetime-picker.cancel": "取消",
- "uni-datetime-picker.year": "年",
- "uni-datetime-picker.month": "月",
- "uni-calender.SUN": "日",
- "uni-calender.MON": "一",
- "uni-calender.TUE": "二",
- "uni-calender.WED": "三",
- "uni-calender.THU": "四",
- "uni-calender.FRI": "五",
- "uni-calender.SAT": "六",
- "uni-calender.confirm": "確認"
-}
\ No newline at end of file
diff --git a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue b/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue
deleted file mode 100644
index 81a042a..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue
+++ /dev/null
@@ -1,934 +0,0 @@
-<template>
- <view class="uni-datetime-picker">
- <view @click="initTimePicker">
- <slot>
- <view class="uni-datetime-picker-timebox-pointer"
- :class="{'uni-datetime-picker-disabled': disabled, 'uni-datetime-picker-timebox': border}">
- <text class="uni-datetime-picker-text">{{time}}</text>
- <view v-if="!time" class="uni-datetime-picker-time">
- <text class="uni-datetime-picker-text">{{selectTimeText}}</text>
- </view>
- </view>
- </slot>
- </view>
- <view v-if="visible" id="mask" class="uni-datetime-picker-mask" @click="tiggerTimePicker"></view>
- <view v-if="visible" class="uni-datetime-picker-popup" :class="[dateShow && timeShow ? '' : 'fix-nvue-height']"
- :style="fixNvueBug">
- <view class="uni-title">
- <text class="uni-datetime-picker-text">{{selectTimeText}}</text>
- </view>
- <view v-if="dateShow" class="uni-datetime-picker__container-box">
- <picker-view class="uni-datetime-picker-view" :indicator-style="indicatorStyle" :value="ymd"
- @change="bindDateChange">
- <picker-view-column>
- <view class="uni-datetime-picker-item" v-for="(item,index) in years" :key="index">
- <text class="uni-datetime-picker-item">{{lessThanTen(item)}}</text>
- </view>
- </picker-view-column>
- <picker-view-column>
- <view class="uni-datetime-picker-item" v-for="(item,index) in months" :key="index">
- <text class="uni-datetime-picker-item">{{lessThanTen(item)}}</text>
- </view>
- </picker-view-column>
- <picker-view-column>
- <view class="uni-datetime-picker-item" v-for="(item,index) in days" :key="index">
- <text class="uni-datetime-picker-item">{{lessThanTen(item)}}</text>
- </view>
- </picker-view-column>
- </picker-view>
- <!-- 兼容 nvue 不支持伪类 -->
- <text class="uni-datetime-picker-sign sign-left">-</text>
- <text class="uni-datetime-picker-sign sign-right">-</text>
- </view>
- <view v-if="timeShow" class="uni-datetime-picker__container-box">
- <picker-view class="uni-datetime-picker-view" :class="[hideSecond ? 'time-hide-second' : '']"
- :indicator-style="indicatorStyle" :value="hms" @change="bindTimeChange">
- <picker-view-column>
- <view class="uni-datetime-picker-item" v-for="(item,index) in hours" :key="index">
- <text class="uni-datetime-picker-item">{{lessThanTen(item)}}</text>
- </view>
- </picker-view-column>
- <picker-view-column>
- <view class="uni-datetime-picker-item" v-for="(item,index) in minutes" :key="index">
- <text class="uni-datetime-picker-item">{{lessThanTen(item)}}</text>
- </view>
- </picker-view-column>
- <picker-view-column v-if="!hideSecond">
- <view class="uni-datetime-picker-item" v-for="(item,index) in seconds" :key="index">
- <text class="uni-datetime-picker-item">{{lessThanTen(item)}}</text>
- </view>
- </picker-view-column>
- </picker-view>
- <!-- 兼容 nvue 不支持伪类 -->
- <text class="uni-datetime-picker-sign" :class="[hideSecond ? 'sign-center' : 'sign-left']">:</text>
- <text v-if="!hideSecond" class="uni-datetime-picker-sign sign-right">:</text>
- </view>
- <view class="uni-datetime-picker-btn">
- <view @click="clearTime">
- <text class="uni-datetime-picker-btn-text">{{clearText}}</text>
- </view>
- <view class="uni-datetime-picker-btn-group">
- <view class="uni-datetime-picker-cancel" @click="tiggerTimePicker">
- <text class="uni-datetime-picker-btn-text">{{cancelText}}</text>
- </view>
- <view @click="setTime">
- <text class="uni-datetime-picker-btn-text">{{okText}}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
-</template>
-
-<script>
- import { initVueI18n } from '@dcloudio/uni-i18n'
- import i18nMessages from './i18n/index.js'
- const { t } = initVueI18n(i18nMessages)
- import { fixIosDateFormat } from './util'
-
- /**
- * DatetimePicker 时间选择器
- * @description 可以同时选择日期和时间的选择器
- * @tutorial https://ext.dcloud.net.cn/plugin?id=xxx
- * @property {String} type = [datetime | date | time] 显示模式
- * @property {Boolean} multiple = [true|false] 是否多选
- * @property {String|Number} value 默认值
- * @property {String|Number} start 起始日期或时间
- * @property {String|Number} end 起始日期或时间
- * @property {String} return-type = [timestamp | string]
- * @event {Function} change 选中发生变化触发
- */
-
- export default {
- name: 'UniDatetimePicker',
- data() {
- return {
- indicatorStyle: `height: 50px;`,
- visible: false,
- fixNvueBug: {},
- dateShow: true,
- timeShow: true,
- title: '日期和时间',
- // 输入框当前时间
- time: '',
- // 当前的年月日时分秒
- year: 1920,
- month: 0,
- day: 0,
- hour: 0,
- minute: 0,
- second: 0,
- // 起始时间
- startYear: 1920,
- startMonth: 1,
- startDay: 1,
- startHour: 0,
- startMinute: 0,
- startSecond: 0,
- // 结束时间
- endYear: 2120,
- endMonth: 12,
- endDay: 31,
- endHour: 23,
- endMinute: 59,
- endSecond: 59,
- }
- },
- props: {
- type: {
- type: String,
- default: 'datetime'
- },
- value: {
- type: [String, Number],
- default: ''
- },
- modelValue: {
- type: [String, Number],
- default: ''
- },
- start: {
- type: [Number, String],
- default: ''
- },
- end: {
- type: [Number, String],
- default: ''
- },
- returnType: {
- type: String,
- default: 'string'
- },
- disabled: {
- type: [Boolean, String],
- default: false
- },
- border: {
- type: [Boolean, String],
- default: true
- },
- hideSecond: {
- type: [Boolean, String],
- default: false
- }
- },
- watch: {
- // #ifndef VUE3
- value: {
- handler(newVal) {
- if (newVal) {
- this.parseValue(fixIosDateFormat(newVal))
- this.initTime(false)
- } else {
- this.time = ''
- this.parseValue(Date.now())
- }
- },
- immediate: true
- },
- // #endif
- // #ifdef VUE3
- modelValue: {
- handler(newVal) {
- if (newVal) {
- this.parseValue(fixIosDateFormat(newVal))
- this.initTime(false)
- } else {
- this.time = ''
- this.parseValue(Date.now())
- }
- },
- immediate: true
- },
- // #endif
- type: {
- handler(newValue) {
- if (newValue === 'date') {
- this.dateShow = true
- this.timeShow = false
- this.title = '日期'
- } else if (newValue === 'time') {
- this.dateShow = false
- this.timeShow = true
- this.title = '时间'
- } else {
- this.dateShow = true
- this.timeShow = true
- this.title = '日期和时间'
- }
- },
- immediate: true
- },
- start: {
- handler(newVal) {
- this.parseDatetimeRange(fixIosDateFormat(newVal), 'start')
- },
- immediate: true
- },
- end: {
- handler(newVal) {
- this.parseDatetimeRange(fixIosDateFormat(newVal), 'end')
- },
- immediate: true
- },
-
- // 月、日、时、分、秒可选范围变化后,检查当前值是否在范围内,不在则当前值重置为可选范围第一项
- months(newVal) {
- this.checkValue('month', this.month, newVal)
- },
- days(newVal) {
- this.checkValue('day', this.day, newVal)
- },
- hours(newVal) {
- this.checkValue('hour', this.hour, newVal)
- },
- minutes(newVal) {
- this.checkValue('minute', this.minute, newVal)
- },
- seconds(newVal) {
- this.checkValue('second', this.second, newVal)
- }
- },
- computed: {
- // 当前年、月、日、时、分、秒选择范围
- years() {
- return this.getCurrentRange('year')
- },
-
- months() {
- return this.getCurrentRange('month')
- },
-
- days() {
- return this.getCurrentRange('day')
- },
-
- hours() {
- return this.getCurrentRange('hour')
- },
-
- minutes() {
- return this.getCurrentRange('minute')
- },
-
- seconds() {
- return this.getCurrentRange('second')
- },
-
- // picker 当前值数组
- ymd() {
- return [this.year - this.minYear, this.month - this.minMonth, this.day - this.minDay]
- },
- hms() {
- return [this.hour - this.minHour, this.minute - this.minMinute, this.second - this.minSecond]
- },
-
- // 当前 date 是 start
- currentDateIsStart() {
- return this.year === this.startYear && this.month === this.startMonth && this.day === this.startDay
- },
-
- // 当前 date 是 end
- currentDateIsEnd() {
- return this.year === this.endYear && this.month === this.endMonth && this.day === this.endDay
- },
-
- // 当前年、月、日、时、分、秒的最小值和最大值
- minYear() {
- return this.startYear
- },
- maxYear() {
- return this.endYear
- },
- minMonth() {
- if (this.year === this.startYear) {
- return this.startMonth
- } else {
- return 1
- }
- },
- maxMonth() {
- if (this.year === this.endYear) {
- return this.endMonth
- } else {
- return 12
- }
- },
- minDay() {
- if (this.year === this.startYear && this.month === this.startMonth) {
- return this.startDay
- } else {
- return 1
- }
- },
- maxDay() {
- if (this.year === this.endYear && this.month === this.endMonth) {
- return this.endDay
- } else {
- return this.daysInMonth(this.year, this.month)
- }
- },
- minHour() {
- if (this.type === 'datetime') {
- if (this.currentDateIsStart) {
- return this.startHour
- } else {
- return 0
- }
- }
- if (this.type === 'time') {
- return this.startHour
- }
- },
- maxHour() {
- if (this.type === 'datetime') {
- if (this.currentDateIsEnd) {
- return this.endHour
- } else {
- return 23
- }
- }
- if (this.type === 'time') {
- return this.endHour
- }
- },
- minMinute() {
- if (this.type === 'datetime') {
- if (this.currentDateIsStart && this.hour === this.startHour) {
- return this.startMinute
- } else {
- return 0
- }
- }
- if (this.type === 'time') {
- if (this.hour === this.startHour) {
- return this.startMinute
- } else {
- return 0
- }
- }
- },
- maxMinute() {
- if (this.type === 'datetime') {
- if (this.currentDateIsEnd && this.hour === this.endHour) {
- return this.endMinute
- } else {
- return 59
- }
- }
- if (this.type === 'time') {
- if (this.hour === this.endHour) {
- return this.endMinute
- } else {
- return 59
- }
- }
- },
- minSecond() {
- if (this.type === 'datetime') {
- if (this.currentDateIsStart && this.hour === this.startHour && this.minute === this.startMinute) {
- return this.startSecond
- } else {
- return 0
- }
- }
- if (this.type === 'time') {
- if (this.hour === this.startHour && this.minute === this.startMinute) {
- return this.startSecond
- } else {
- return 0
- }
- }
- },
- maxSecond() {
- if (this.type === 'datetime') {
- if (this.currentDateIsEnd && this.hour === this.endHour && this.minute === this.endMinute) {
- return this.endSecond
- } else {
- return 59
- }
- }
- if (this.type === 'time') {
- if (this.hour === this.endHour && this.minute === this.endMinute) {
- return this.endSecond
- } else {
- return 59
- }
- }
- },
-
- /**
- * for i18n
- */
- selectTimeText() {
- return t("uni-datetime-picker.selectTime")
- },
- okText() {
- return t("uni-datetime-picker.ok")
- },
- clearText() {
- return t("uni-datetime-picker.clear")
- },
- cancelText() {
- return t("uni-datetime-picker.cancel")
- }
- },
-
- mounted() {
- // #ifdef APP-NVUE
- const res = uni.getSystemInfoSync();
- this.fixNvueBug = {
- top: res.windowHeight / 2,
- left: res.windowWidth / 2
- }
- // #endif
- },
-
- methods: {
- /**
- * @param {Object} item
- * 小于 10 在前面加个 0
- */
-
- lessThanTen(item) {
- return item < 10 ? '0' + item : item
- },
-
- /**
- * 解析时分秒字符串,例如:00:00:00
- * @param {String} timeString
- */
- parseTimeType(timeString) {
- if (timeString) {
- let timeArr = timeString.split(':')
- this.hour = Number(timeArr[0])
- this.minute = Number(timeArr[1])
- this.second = Number(timeArr[2])
- }
- },
-
- /**
- * 解析选择器初始值,类型可以是字符串、时间戳,例如:2000-10-02、'08:30:00'、 1610695109000
- * @param {String | Number} datetime
- */
- initPickerValue(datetime) {
- let defaultValue = null
- if (datetime) {
- defaultValue = this.compareValueWithStartAndEnd(datetime, this.start, this.end)
- } else {
- defaultValue = Date.now()
- defaultValue = this.compareValueWithStartAndEnd(defaultValue, this.start, this.end)
- }
- this.parseValue(defaultValue)
- },
-
- /**
- * 初始值规则:
- * - 用户设置初始值 value
- * - 设置了起始时间 start、终止时间 end,并 start < value < end,初始值为 value, 否则初始值为 start
- * - 只设置了起始时间 start,并 start < value,初始值为 value,否则初始值为 start
- * - 只设置了终止时间 end,并 value < end,初始值为 value,否则初始值为 end
- * - 无起始终止时间,则初始值为 value
- * - 无初始值 value,则初始值为当前本地时间 Date.now()
- * @param {Object} value
- * @param {Object} dateBase
- */
- compareValueWithStartAndEnd(value, start, end) {
- let winner = null
- value = this.superTimeStamp(value)
- start = this.superTimeStamp(start)
- end = this.superTimeStamp(end)
-
- if (start && end) {
- if (value < start) {
- winner = new Date(start)
- } else if (value > end) {
- winner = new Date(end)
- } else {
- winner = new Date(value)
- }
- } else if (start && !end) {
- winner = start <= value ? new Date(value) : new Date(start)
- } else if (!start && end) {
- winner = value <= end ? new Date(value) : new Date(end)
- } else {
- winner = new Date(value)
- }
-
- return winner
- },
-
- /**
- * 转换为可比较的时间戳,接受日期、时分秒、时间戳
- * @param {Object} value
- */
- superTimeStamp(value) {
- let dateBase = ''
- if (this.type === 'time' && value && typeof value === 'string') {
- const now = new Date()
- const year = now.getFullYear()
- const month = now.getMonth() + 1
- const day = now.getDate()
- dateBase = year + '/' + month + '/' + day + ' '
- }
- if (Number(value)) {
- value = parseInt(value)
- dateBase = 0
- }
- return this.createTimeStamp(dateBase + value)
- },
-
- /**
- * 解析默认值 value,字符串、时间戳
- * @param {Object} defaultTime
- */
- parseValue(value) {
- if (!value) {
- return
- }
- if (this.type === 'time' && typeof value === "string") {
- this.parseTimeType(value)
- } else {
- let defaultDate = null
- defaultDate = new Date(value)
- if (this.type !== 'time') {
- this.year = defaultDate.getFullYear()
- this.month = defaultDate.getMonth() + 1
- this.day = defaultDate.getDate()
- }
- if (this.type !== 'date') {
- this.hour = defaultDate.getHours()
- this.minute = defaultDate.getMinutes()
- this.second = defaultDate.getSeconds()
- }
- }
- if (this.hideSecond) {
- this.second = 0
- }
- },
-
- /**
- * 解析可选择时间范围 start、end,年月日字符串、时间戳
- * @param {Object} defaultTime
- */
- parseDatetimeRange(point, pointType) {
- // 时间为空,则重置为初始值
- if (!point) {
- if (pointType === 'start') {
- this.startYear = 1920
- this.startMonth = 1
- this.startDay = 1
- this.startHour = 0
- this.startMinute = 0
- this.startSecond = 0
- }
- if (pointType === 'end') {
- this.endYear = 2120
- this.endMonth = 12
- this.endDay = 31
- this.endHour = 23
- this.endMinute = 59
- this.endSecond = 59
- }
- return
- }
- if (this.type === 'time') {
- const pointArr = point.split(':')
- this[pointType + 'Hour'] = Number(pointArr[0])
- this[pointType + 'Minute'] = Number(pointArr[1])
- this[pointType + 'Second'] = Number(pointArr[2])
- } else {
- if (!point) {
- pointType === 'start' ? this.startYear = this.year - 60 : this.endYear = this.year + 60
- return
- }
- if (Number(point)) {
- point = parseInt(point)
- }
- // datetime 的 end 没有时分秒, 则不限制
- const hasTime = /[0-9]:[0-9]/
- if (this.type === 'datetime' && pointType === 'end' && typeof point === 'string' && !hasTime.test(
- point)) {
- point = point + ' 23:59:59'
- }
- const pointDate = new Date(point)
- this[pointType + 'Year'] = pointDate.getFullYear()
- this[pointType + 'Month'] = pointDate.getMonth() + 1
- this[pointType + 'Day'] = pointDate.getDate()
- if (this.type === 'datetime') {
- this[pointType + 'Hour'] = pointDate.getHours()
- this[pointType + 'Minute'] = pointDate.getMinutes()
- this[pointType + 'Second'] = pointDate.getSeconds()
- }
- }
- },
-
- // 获取 年、月、日、时、分、秒 当前可选范围
- getCurrentRange(value) {
- const range = []
- for (let i = this['min' + this.capitalize(value)]; i <= this['max' + this.capitalize(value)]; i++) {
- range.push(i)
- }
- return range
- },
-
- // 字符串首字母大写
- capitalize(str) {
- return str.charAt(0).toUpperCase() + str.slice(1)
- },
-
- // 检查当前值是否在范围内,不在则当前值重置为可选范围第一项
- checkValue(name, value, values) {
- if (values.indexOf(value) === -1) {
- this[name] = values[0]
- }
- },
-
- // 每个月的实际天数
- daysInMonth(year, month) { // Use 1 for January, 2 for February, etc.
- return new Date(year, month, 0).getDate();
- },
-
- //兼容 iOS、safari 日期格式
- fixIosDateFormat(value) {
- if (typeof value === 'string') {
- value = value.replace(/-/g, '/')
- }
- return value
- },
-
- /**
- * 生成时间戳
- * @param {Object} time
- */
- createTimeStamp(time) {
- if (!time) return
- if (typeof time === "number") {
- return time
- } else {
- time = time.replace(/-/g, '/')
- if (this.type === 'date') {
- time = time + ' ' + '00:00:00'
- }
- return Date.parse(time)
- }
- },
-
- /**
- * 生成日期或时间的字符串
- */
- createDomSting() {
- const yymmdd = this.year +
- '-' +
- this.lessThanTen(this.month) +
- '-' +
- this.lessThanTen(this.day)
-
- let hhmmss = this.lessThanTen(this.hour) +
- ':' +
- this.lessThanTen(this.minute)
-
- if (!this.hideSecond) {
- hhmmss = hhmmss + ':' + this.lessThanTen(this.second)
- }
-
- if (this.type === 'date') {
- return yymmdd
- } else if (this.type === 'time') {
- return hhmmss
- } else {
- return yymmdd + ' ' + hhmmss
- }
- },
-
- /**
- * 初始化返回值,并抛出 change 事件
- */
- initTime(emit = true) {
- this.time = this.createDomSting()
- if (!emit) return
- if (this.returnType === 'timestamp' && this.type !== 'time') {
- this.$emit('change', this.createTimeStamp(this.time))
- this.$emit('input', this.createTimeStamp(this.time))
- this.$emit('update:modelValue', this.createTimeStamp(this.time))
- } else {
- this.$emit('change', this.time)
- this.$emit('input', this.time)
- this.$emit('update:modelValue', this.time)
- }
- },
-
- /**
- * 用户选择日期或时间更新 data
- * @param {Object} e
- */
- bindDateChange(e) {
- const val = e.detail.value
- this.year = this.years[val[0]]
- this.month = this.months[val[1]]
- this.day = this.days[val[2]]
- },
- bindTimeChange(e) {
- const val = e.detail.value
- this.hour = this.hours[val[0]]
- this.minute = this.minutes[val[1]]
- this.second = this.seconds[val[2]]
- },
-
- /**
- * 初始化弹出层
- */
- initTimePicker() {
- if (this.disabled) return
- const value = fixIosDateFormat(this.time)
- this.initPickerValue(value)
- this.visible = !this.visible
- },
-
- /**
- * 触发或关闭弹框
- */
- tiggerTimePicker(e) {
- this.visible = !this.visible
- },
-
- /**
- * 用户点击“清空”按钮,清空当前值
- */
- clearTime() {
- this.time = ''
- this.$emit('change', this.time)
- this.$emit('input', this.time)
- this.$emit('update:modelValue', this.time)
- this.tiggerTimePicker()
- },
-
- /**
- * 用户点击“确定”按钮
- */
- setTime() {
- this.initTime()
- this.tiggerTimePicker()
- }
- }
- }
-</script>
-
-<style lang="scss">
- $uni-primary: #007aff !default;
-
- .uni-datetime-picker {
- /* #ifndef APP-NVUE */
- /* width: 100%; */
- /* #endif */
- }
-
- .uni-datetime-picker-view {
- height: 130px;
- width: 270px;
- /* #ifndef APP-NVUE */
- cursor: pointer;
- /* #endif */
- }
-
- .uni-datetime-picker-item {
- height: 50px;
- line-height: 50px;
- text-align: center;
- font-size: 14px;
- }
-
- .uni-datetime-picker-btn {
- margin-top: 60px;
- /* #ifndef APP-NVUE */
- display: flex;
- cursor: pointer;
- /* #endif */
- flex-direction: row;
- justify-content: space-between;
- }
-
- .uni-datetime-picker-btn-text {
- font-size: 14px;
- color: $uni-primary;
- }
-
- .uni-datetime-picker-btn-group {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- }
-
- .uni-datetime-picker-cancel {
- margin-right: 30px;
- }
-
- .uni-datetime-picker-mask {
- position: fixed;
- bottom: 0px;
- top: 0px;
- left: 0px;
- right: 0px;
- background-color: rgba(0, 0, 0, 0.4);
- transition-duration: 0.3s;
- z-index: 998;
- }
-
- .uni-datetime-picker-popup {
- border-radius: 8px;
- padding: 30px;
- width: 270px;
- /* #ifdef APP-NVUE */
- height: 500px;
- /* #endif */
- /* #ifdef APP-NVUE */
- width: 330px;
- /* #endif */
- background-color: #fff;
- position: fixed;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- transition-duration: 0.3s;
- z-index: 999;
- }
-
- .fix-nvue-height {
- /* #ifdef APP-NVUE */
- height: 330px;
- /* #endif */
- }
-
- .uni-datetime-picker-time {
- color: grey;
- }
-
- .uni-datetime-picker-column {
- height: 50px;
- }
-
- .uni-datetime-picker-timebox {
-
- border: 1px solid #E5E5E5;
- border-radius: 5px;
- padding: 7px 10px;
- /* #ifndef APP-NVUE */
- box-sizing: border-box;
- cursor: pointer;
- /* #endif */
- }
-
- .uni-datetime-picker-timebox-pointer {
- /* #ifndef APP-NVUE */
- cursor: pointer;
- /* #endif */
- }
-
-
- .uni-datetime-picker-disabled {
- opacity: 0.4;
- /* #ifdef H5 */
- cursor: not-allowed !important;
- /* #endif */
- }
-
- .uni-datetime-picker-text {
- font-size: 14px;
- line-height: 50px
- }
-
- .uni-datetime-picker-sign {
- position: absolute;
- top: 53px;
- /* 减掉 10px 的元素高度,兼容nvue */
- color: #999;
- /* #ifdef APP-NVUE */
- font-size: 16px;
- /* #endif */
- }
-
- .sign-left {
- left: 86px;
- }
-
- .sign-right {
- right: 86px;
- }
-
- .sign-center {
- left: 135px;
- }
-
- .uni-datetime-picker__container-box {
- position: relative;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-top: 40px;
- }
-
- .time-hide-second {
- width: 180px;
- }
-</style>
diff --git a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue b/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue
deleted file mode 100644
index 83008e4..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue
+++ /dev/null
@@ -1,1051 +0,0 @@
-<template>
- <view class="uni-date">
- <view class="uni-date-editor" @click="show">
- <slot>
- <view class="uni-date-editor--x"
- :class="{'uni-date-editor--x__disabled': disabled,'uni-date-x--border': border}">
- <view v-if="!isRange" class="uni-date-x uni-date-single">
- <uni-icons class="icon-calendar" type="calendar" color="#c0c4cc" size="22"></uni-icons>
- <view class="uni-date__x-input">{{ displayValue || singlePlaceholderText }}</view>
- </view>
-
- <view v-else class="uni-date-x uni-date-range">
- <uni-icons class="icon-calendar" type="calendar" color="#c0c4cc" size="22"></uni-icons>
- <view class="uni-date__x-input text-center">
- {{ displayRangeValue.startDate || startPlaceholderText }}</view>
-
- <view class="range-separator">{{rangeSeparator}}</view>
-
- <view class="uni-date__x-input text-center">
- {{ displayRangeValue.endDate || endPlaceholderText }}</view>
- </view>
-
- <view v-if="showClearIcon" class="uni-date__icon-clear" @click.stop="clear">
- <uni-icons type="clear" color="#c0c4cc" size="22"></uni-icons>
- </view>
- </view>
- </slot>
- </view>
-
- <view v-show="pickerVisible" class="uni-date-mask--pc" @click="close"></view>
-
- <view v-if="!isPhone" v-show="pickerVisible" ref="datePicker" class="uni-date-picker__container">
- <view v-if="!isRange" class="uni-date-single--x" :style="pickerPositionStyle">
- <view class="uni-popper__arrow"></view>
-
- <view v-if="hasTime" class="uni-date-changed popup-x-header">
- <input class="uni-date__input text-center" type="text" v-model="inputDate"
- :placeholder="selectDateText" />
-
- <time-picker type="time" v-model="pickerTime" :border="false" :disabled="!inputDate"
- :start="timepickerStartTime" :end="timepickerEndTime" :hideSecond="hideSecond"
- style="width: 100%;">
- <input class="uni-date__input text-center" type="text" v-model="pickerTime"
- :placeholder="selectTimeText" :disabled="!inputDate" />
- </time-picker>
- </view>
-
- <Calendar ref="pcSingle" :showMonth="false" :start-date="calendarRange.startDate"
- :end-date="calendarRange.endDate" :date="calendarDate" @change="singleChange"
- :default-value="defaultValue" style="padding: 0 8px;" />
-
- <view v-if="hasTime" class="popup-x-footer">
- <text class="confirm-text" @click="confirmSingleChange">{{okText}}</text>
- </view>
- </view>
-
- <view v-else class="uni-date-range--x" :style="pickerPositionStyle">
- <view class="uni-popper__arrow"></view>
- <view v-if="hasTime" class="popup-x-header uni-date-changed">
- <view class="popup-x-header--datetime">
- <input class="uni-date__input uni-date-range__input" type="text" v-model="tempRange.startDate"
- :placeholder="startDateText" />
-
- <time-picker type="time" v-model="tempRange.startTime" :start="timepickerStartTime"
- :border="false" :disabled="!tempRange.startDate" :hideSecond="hideSecond">
- <input class="uni-date__input uni-date-range__input" type="text"
- v-model="tempRange.startTime" :placeholder="startTimeText"
- :disabled="!tempRange.startDate" />
- </time-picker>
- </view>
-
- <uni-icons type="arrowthinright" color="#999" style="line-height: 40px;"></uni-icons>
-
- <view class="popup-x-header--datetime">
- <input class="uni-date__input uni-date-range__input" type="text" v-model="tempRange.endDate"
- :placeholder="endDateText" />
-
- <time-picker type="time" v-model="tempRange.endTime" :end="timepickerEndTime" :border="false"
- :disabled="!tempRange.endDate" :hideSecond="hideSecond">
- <input class="uni-date__input uni-date-range__input" type="text" v-model="tempRange.endTime"
- :placeholder="endTimeText" :disabled="!tempRange.endDate" />
- </time-picker>
- </view>
- </view>
-
- <view class="popup-x-body">
- <Calendar ref="left" :showMonth="false" :start-date="calendarRange.startDate"
- :end-date="calendarRange.endDate" :range="true" :pleStatus="endMultipleStatus"
- @change="leftChange" @firstEnterCale="updateRightCale" style="padding: 0 8px;" />
- <Calendar ref="right" :showMonth="false" :start-date="calendarRange.startDate"
- :end-date="calendarRange.endDate" :range="true" @change="rightChange"
- :pleStatus="startMultipleStatus" @firstEnterCale="updateLeftCale"
- style="padding: 0 8px;border-left: 1px solid #F1F1F1;" />
- </view>
-
- <view v-if="hasTime" class="popup-x-footer">
- <text @click="clear">{{clearText}}</text>
- <text class="confirm-text" @click="confirmRangeChange">{{okText}}</text>
- </view>
- </view>
- </view>
-
- <Calendar v-if="isPhone" ref="mobile" :clearDate="false" :date="calendarDate" :defTime="mobileCalendarTime"
- :start-date="calendarRange.startDate" :end-date="calendarRange.endDate" :selectableTimes="mobSelectableTime"
- :startPlaceholder="startPlaceholder" :endPlaceholder="endPlaceholder" :default-value="defaultValue"
- :pleStatus="endMultipleStatus" :showMonth="false" :range="isRange" :hasTime="hasTime" :insert="false"
- :hideSecond="hideSecond" @confirm="mobileChange" @maskClose="close" />
- </view>
-</template>
-<script>
- import uniIcons from "../../../uni-icons/components/uni-icons/uni-icons.vue"
- /**
- * DatetimePicker 时间选择器
- * @description 同时支持 PC 和移动端使用日历选择日期和日期范围
- * @tutorial https://ext.dcloud.net.cn/plugin?id=3962
- * @property {String} type 选择器类型
- * @property {String|Number|Array|Date} value 绑定值
- * @property {String} placeholder 单选择时的占位内容
- * @property {String} start 起始时间
- * @property {String} end 终止时间
- * @property {String} start-placeholder 范围选择时开始日期的占位内容
- * @property {String} end-placeholder 范围选择时结束日期的占位内容
- * @property {String} range-separator 选择范围时的分隔符
- * @property {Boolean} border = [true|false] 是否有边框
- * @property {Boolean} disabled = [true|false] 是否禁用
- * @property {Boolean} clearIcon = [true|false] 是否显示清除按钮(仅PC端适用)
- * @property {[String} defaultValue 选择器打开时默认显示的时间
- * @event {Function} change 确定日期时触发的事件
- * @event {Function} maskClick 点击遮罩层触发的事件
- * @event {Function} show 打开弹出层
- * @event {Function} close 关闭弹出层
- * @event {Function} clear 清除上次选中的状态和值
- **/
- import Calendar from './calendar.vue'
- import TimePicker from './time-picker.vue'
- import {
- initVueI18n
- } from '@dcloudio/uni-i18n'
- import i18nMessages from './i18n/index.js'
- import {
- getDateTime,
- getDate,
- getTime,
- getDefaultSecond,
- dateCompare,
- checkDate,
- fixIosDateFormat
- } from './util'
-
- export default {
- name: 'UniDatetimePicker',
- options: {
- virtualHost: true
- },
- components: {
- Calendar,
- TimePicker,
- uniIcons
- },
- data() {
- return {
- isRange: false,
- hasTime: false,
- displayValue: '',
- inputDate: '',
- calendarDate: '',
- pickerTime: '',
- calendarRange: {
- startDate: '',
- startTime: '',
- endDate: '',
- endTime: ''
- },
- displayRangeValue: {
- startDate: '',
- endDate: '',
- },
- tempRange: {
- startDate: '',
- startTime: '',
- endDate: '',
- endTime: ''
- },
- // 左右日历同步数据
- startMultipleStatus: {
- before: '',
- after: '',
- data: [],
- fulldate: ''
- },
- endMultipleStatus: {
- before: '',
- after: '',
- data: [],
- fulldate: ''
- },
- pickerVisible: false,
- pickerPositionStyle: null,
- isEmitValue: false,
- isPhone: false,
- isFirstShow: true,
- i18nT: () => {}
- }
- },
- props: {
- type: {
- type: String,
- default: 'datetime'
- },
- value: {
- type: [String, Number, Array, Date],
- default: ''
- },
- modelValue: {
- type: [String, Number, Array, Date],
- default: ''
- },
- start: {
- type: [Number, String],
- default: ''
- },
- end: {
- type: [Number, String],
- default: ''
- },
- returnType: {
- type: String,
- default: 'string'
- },
- placeholder: {
- type: String,
- default: ''
- },
- startPlaceholder: {
- type: String,
- default: ''
- },
- endPlaceholder: {
- type: String,
- default: ''
- },
- rangeSeparator: {
- type: String,
- default: '-'
- },
- border: {
- type: [Boolean],
- default: true
- },
- disabled: {
- type: [Boolean],
- default: false
- },
- clearIcon: {
- type: [Boolean],
- default: true
- },
- hideSecond: {
- type: [Boolean],
- default: false
- },
- defaultValue: {
- type: [String, Object, Array],
- default: ''
- }
- },
- watch: {
- type: {
- immediate: true,
- handler(newVal) {
- this.hasTime = newVal.indexOf('time') !== -1
- this.isRange = newVal.indexOf('range') !== -1
- }
- },
- // #ifndef VUE3
- value: {
- immediate: true,
- handler(newVal) {
- if (this.isEmitValue) {
- this.isEmitValue = false
- return
- }
- this.initPicker(newVal)
- }
- },
- // #endif
- // #ifdef VUE3
- modelValue: {
- immediate: true,
- handler(newVal) {
- if (this.isEmitValue) {
- this.isEmitValue = false
- return
- }
- this.initPicker(newVal)
- }
- },
- // #endif
- start: {
- immediate: true,
- handler(newVal) {
- if (!newVal) return
- this.calendarRange.startDate = getDate(newVal)
- if (this.hasTime) {
- this.calendarRange.startTime = getTime(newVal)
- }
- }
- },
- end: {
- immediate: true,
- handler(newVal) {
- if (!newVal) return
- this.calendarRange.endDate = getDate(newVal)
- if (this.hasTime) {
- this.calendarRange.endTime = getTime(newVal, this.hideSecond)
- }
- }
- },
- },
- computed: {
- timepickerStartTime() {
- const activeDate = this.isRange ? this.tempRange.startDate : this.inputDate
- return activeDate === this.calendarRange.startDate ? this.calendarRange.startTime : ''
- },
- timepickerEndTime() {
- const activeDate = this.isRange ? this.tempRange.endDate : this.inputDate
- return activeDate === this.calendarRange.endDate ? this.calendarRange.endTime : ''
- },
- mobileCalendarTime() {
- const timeRange = {
- start: this.tempRange.startTime,
- end: this.tempRange.endTime
- }
- return this.isRange ? timeRange : this.pickerTime
- },
- mobSelectableTime() {
- return {
- start: this.calendarRange.startTime,
- end: this.calendarRange.endTime
- }
- },
- datePopupWidth() {
- // todo
- return this.isRange ? 653 : 301
- },
-
- /**
- * for i18n
- */
- singlePlaceholderText() {
- return this.placeholder || (this.type === 'date' ? this.selectDateText : this.selectDateTimeText)
- },
- startPlaceholderText() {
- return this.startPlaceholder || this.startDateText
- },
- endPlaceholderText() {
- return this.endPlaceholder || this.endDateText
- },
- selectDateText() {
- return this.i18nT("uni-datetime-picker.selectDate")
- },
- selectDateTimeText() {
- return this.i18nT("uni-datetime-picker.selectDateTime")
- },
- selectTimeText() {
- return this.i18nT("uni-datetime-picker.selectTime")
- },
- startDateText() {
- return this.startPlaceholder || this.i18nT("uni-datetime-picker.startDate")
- },
- startTimeText() {
- return this.i18nT("uni-datetime-picker.startTime")
- },
- endDateText() {
- return this.endPlaceholder || this.i18nT("uni-datetime-picker.endDate")
- },
- endTimeText() {
- return this.i18nT("uni-datetime-picker.endTime")
- },
- okText() {
- return this.i18nT("uni-datetime-picker.ok")
- },
- clearText() {
- return this.i18nT("uni-datetime-picker.clear")
- },
- showClearIcon() {
- return this.clearIcon && !this.disabled && (this.displayValue || (this.displayRangeValue.startDate && this
- .displayRangeValue.endDate))
- }
- },
- created() {
- this.initI18nT()
- this.platform()
- },
- methods: {
- initI18nT() {
- const vueI18n = initVueI18n(i18nMessages)
- this.i18nT = vueI18n.t
- },
- initPicker(newVal) {
- if ((!newVal && !this.defaultValue) || Array.isArray(newVal) && !newVal.length) {
- this.$nextTick(() => {
- this.clear(false)
- })
- return
- }
-
- if (!Array.isArray(newVal) && !this.isRange) {
- if (newVal) {
- this.displayValue = this.inputDate = this.calendarDate = getDate(newVal)
- if (this.hasTime) {
- this.pickerTime = getTime(newVal, this.hideSecond)
- this.displayValue = `${this.displayValue} ${this.pickerTime}`
- }
- } else if (this.defaultValue) {
- this.inputDate = this.calendarDate = getDate(this.defaultValue)
- if (this.hasTime) {
- this.pickerTime = getTime(this.defaultValue, this.hideSecond)
- }
- }
- } else {
- const [before, after] = newVal
- if (!before && !after) return
- const beforeDate = getDate(before)
- const beforeTime = getTime(before, this.hideSecond)
-
- const afterDate = getDate(after)
- const afterTime = getTime(after, this.hideSecond)
- const startDate = beforeDate
- const endDate = afterDate
- this.displayRangeValue.startDate = this.tempRange.startDate = startDate
- this.displayRangeValue.endDate = this.tempRange.endDate = endDate
-
- if (this.hasTime) {
- this.displayRangeValue.startDate = `${beforeDate} ${beforeTime}`
- this.displayRangeValue.endDate = `${afterDate} ${afterTime}`
- this.tempRange.startTime = beforeTime
- this.tempRange.endTime = afterTime
- }
- const defaultRange = {
- before: beforeDate,
- after: afterDate
- }
- this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, defaultRange, {
- which: 'right'
- })
- this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, defaultRange, {
- which: 'left'
- })
- }
- },
- updateLeftCale(e) {
- const left = this.$refs.left
- // 设置范围选
- left.cale.setHoverMultiple(e.after)
- left.setDate(this.$refs.left.nowDate.fullDate)
- },
- updateRightCale(e) {
- const right = this.$refs.right
- // 设置范围选
- right.cale.setHoverMultiple(e.after)
- right.setDate(this.$refs.right.nowDate.fullDate)
- },
- platform() {
- if (typeof navigator !== "undefined") {
- this.isPhone = navigator.userAgent.toLowerCase().indexOf('mobile') !== -1
- return
- }
- const {
- windowWidth
- } = uni.getSystemInfoSync()
- this.isPhone = windowWidth <= 500
- this.windowWidth = windowWidth
- },
- show() {
- if (this.disabled) {
- return
- }
- this.platform()
- if (this.isPhone) {
- setTimeout(() => {
- this.$refs.mobile.open()
- }, 0);
- return
- }
- this.pickerPositionStyle = {
- top: '10px'
- }
- const dateEditor = uni.createSelectorQuery().in(this).select(".uni-date-editor")
- dateEditor.boundingClientRect(rect => {
- if (this.windowWidth - rect.left < this.datePopupWidth) {
- this.pickerPositionStyle.right = 0
- }
- }).exec()
- setTimeout(() => {
- this.pickerVisible = !this.pickerVisible
- if (!this.isPhone && this.isRange && this.isFirstShow) {
- this.isFirstShow = false
- const {
- startDate,
- endDate
- } = this.calendarRange
- if (startDate && endDate) {
- if (this.diffDate(startDate, endDate) < 30) {
- this.$refs.right.changeMonth('pre')
- }
- } else {
- this.$refs.right.changeMonth('next')
- this.$refs.right.cale.lastHover = false
- }
- }
-
- }, 50)
- },
- close() {
- setTimeout(() => {
- this.pickerVisible = false
- this.$emit('maskClick', this.value)
- this.$refs.mobile && this.$refs.mobile.close()
- }, 20)
- },
- setEmit(value) {
- if (this.returnType === "timestamp" || this.returnType === "date") {
- if (!Array.isArray(value)) {
- if (!this.hasTime) {
- value = value + ' ' + '00:00:00'
- }
- value = this.createTimestamp(value)
- if (this.returnType === "date") {
- value = new Date(value)
- }
- } else {
- if (!this.hasTime) {
- value[0] = value[0] + ' ' + '00:00:00'
- value[1] = value[1] + ' ' + '00:00:00'
- }
- value[0] = this.createTimestamp(value[0])
- value[1] = this.createTimestamp(value[1])
- if (this.returnType === "date") {
- value[0] = new Date(value[0])
- value[1] = new Date(value[1])
- }
- }
- }
-
- this.$emit('update:modelValue', value)
- this.$emit('input', value)
- this.$emit('change', value)
- this.isEmitValue = true
- },
- createTimestamp(date) {
- date = fixIosDateFormat(date)
- return Date.parse(new Date(date))
- },
- singleChange(e) {
- this.calendarDate = this.inputDate = e.fulldate
- if (this.hasTime) return
- this.confirmSingleChange()
- },
- confirmSingleChange() {
- if (!checkDate(this.inputDate)) {
- const now = new Date()
- this.calendarDate = this.inputDate = getDate(now)
- this.pickerTime = getTime(now, this.hideSecond)
- }
-
- let startLaterInputDate = false
- let startDate, startTime
- if (this.start) {
- let startString = this.start
- if (typeof this.start === 'number') {
- startString = getDateTime(this.start, this.hideSecond)
- }
- [startDate, startTime] = startString.split(' ')
- if (this.start && !dateCompare(startDate, this.inputDate)) {
- startLaterInputDate = true
- this.inputDate = startDate
- }
- }
-
- let endEarlierInputDate = false
- let endDate, endTime
- if (this.end) {
- let endString = this.end
- if (typeof this.end === 'number') {
- endString = getDateTime(this.end, this.hideSecond)
- }
- [endDate, endTime] = endString.split(' ')
- if (this.end && !dateCompare(this.inputDate, endDate)) {
- endEarlierInputDate = true
- this.inputDate = endDate
- }
- }
- if (this.hasTime) {
- if (startLaterInputDate) {
- this.pickerTime = startTime || getDefaultSecond(this.hideSecond)
- }
- if (endEarlierInputDate) {
- this.pickerTime = endTime || getDefaultSecond(this.hideSecond)
- }
- if (!this.pickerTime) {
- this.pickerTime = getTime(Date.now(), this.hideSecond)
- }
- this.displayValue = `${this.inputDate} ${this.pickerTime}`
- } else {
- this.displayValue = this.inputDate
- }
- this.setEmit(this.displayValue)
- this.pickerVisible = false
- },
- leftChange(e) {
- const {
- before,
- after
- } = e.range
- this.rangeChange(before, after)
- const obj = {
- before: e.range.before,
- after: e.range.after,
- data: e.range.data,
- fulldate: e.fulldate
- }
- this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, obj)
- },
- rightChange(e) {
- const {
- before,
- after
- } = e.range
- this.rangeChange(before, after)
- const obj = {
- before: e.range.before,
- after: e.range.after,
- data: e.range.data,
- fulldate: e.fulldate
- }
- this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, obj)
- },
- mobileChange(e) {
- if (this.isRange) {
- const {
- before,
- after
- } = e.range
-
- if (!before || !after) {
- return
- }
-
- this.handleStartAndEnd(before, after, true)
- if (this.hasTime) {
- const {
- startTime,
- endTime
- } = e.timeRange
- this.tempRange.startTime = startTime
- this.tempRange.endTime = endTime
- }
- this.confirmRangeChange()
- } else {
- if (this.hasTime) {
- this.displayValue = e.fulldate + ' ' + e.time
- } else {
- this.displayValue = e.fulldate
- }
- this.setEmit(this.displayValue)
- }
- this.$refs.mobile.close()
- },
- rangeChange(before, after) {
- if (!(before && after)) return
- this.handleStartAndEnd(before, after, true)
- if (this.hasTime) return
- this.confirmRangeChange()
- },
- confirmRangeChange() {
- if (!this.tempRange.startDate || !this.tempRange.endDate) {
- this.pickerVisible = false
- return
- }
- if (!checkDate(this.tempRange.startDate)) {
- this.tempRange.startDate = getDate(Date.now())
- }
- if (!checkDate(this.tempRange.endDate)) {
- this.tempRange.endDate = getDate(Date.now())
- }
-
- let start, end
-
- let startDateLaterRangeStartDate = false
- let startDateLaterRangeEndDate = false
- let startDate, startTime
- if (this.start) {
- let startString = this.start
- if (typeof this.start === 'number') {
- startString = getDateTime(this.start, this.hideSecond)
- }
- [startDate, startTime] = startString.split(' ')
- if (this.start && !dateCompare(this.start, this.tempRange.startDate)) {
- startDateLaterRangeStartDate = true
- this.tempRange.startDate = startDate
- }
- if (this.start && !dateCompare(this.start, this.tempRange.endDate)) {
- startDateLaterRangeEndDate = true
- this.tempRange.endDate = startDate
- }
- }
- let endDateEarlierRangeStartDate = false
- let endDateEarlierRangeEndDate = false
- let endDate, endTime
- if (this.end) {
- let endString = this.end
- if (typeof this.end === 'number') {
- endString = getDateTime(this.end, this.hideSecond)
- }
- [endDate, endTime] = endString.split(' ')
-
- if (this.end && !dateCompare(this.tempRange.startDate, this.end)) {
- endDateEarlierRangeStartDate = true
- this.tempRange.startDate = endDate
- }
- if (this.end && !dateCompare(this.tempRange.endDate, this.end)) {
- endDateEarlierRangeEndDate = true
- this.tempRange.endDate = endDate
- }
- }
- if (!this.hasTime) {
- start = this.displayRangeValue.startDate = this.tempRange.startDate
- end = this.displayRangeValue.endDate = this.tempRange.endDate
- } else {
- if (startDateLaterRangeStartDate) {
- this.tempRange.startTime = startTime || getDefaultSecond(this.hideSecond)
- } else if (endDateEarlierRangeStartDate) {
- this.tempRange.startTime = endTime || getDefaultSecond(this.hideSecond)
- }
- if (!this.tempRange.startTime) {
- this.tempRange.startTime = getTime(Date.now(), this.hideSecond)
- }
-
- if (startDateLaterRangeEndDate) {
- this.tempRange.endTime = startTime || getDefaultSecond(this.hideSecond)
- } else if (endDateEarlierRangeEndDate) {
- this.tempRange.endTime = endTime || getDefaultSecond(this.hideSecond)
- }
- if (!this.tempRange.endTime) {
- this.tempRange.endTime = getTime(Date.now(), this.hideSecond)
- }
- start = this.displayRangeValue.startDate = `${this.tempRange.startDate} ${this.tempRange.startTime}`
- end = this.displayRangeValue.endDate = `${this.tempRange.endDate} ${this.tempRange.endTime}`
- }
- if (!dateCompare(start, end)) {
- [start, end] = [end, start]
- }
- this.displayRangeValue.startDate = start
- this.displayRangeValue.endDate = end
- const displayRange = [start, end]
- this.setEmit(displayRange)
- this.pickerVisible = false
- },
- handleStartAndEnd(before, after, temp = false) {
- if (!(before && after)) return
-
- const type = temp ? 'tempRange' : 'range'
- const isStartEarlierEnd = dateCompare(before, after)
- this[type].startDate = isStartEarlierEnd ? before : after
- this[type].endDate = isStartEarlierEnd ? after : before
- },
- /**
- * 比较时间大小
- */
- dateCompare(startDate, endDate) {
- // 计算截止时间
- startDate = new Date(startDate.replace('-', '/').replace('-', '/'))
- // 计算详细项的截止时间
- endDate = new Date(endDate.replace('-', '/').replace('-', '/'))
- return startDate <= endDate
- },
-
- /**
- * 比较时间差
- */
- diffDate(startDate, endDate) {
- // 计算截止时间
- startDate = new Date(startDate.replace('-', '/').replace('-', '/'))
- // 计算详细项的截止时间
- endDate = new Date(endDate.replace('-', '/').replace('-', '/'))
- const diff = (endDate - startDate) / (24 * 60 * 60 * 1000)
- return Math.abs(diff)
- },
-
- clear(needEmit = true) {
- if (!this.isRange) {
- this.displayValue = ''
- this.inputDate = ''
- this.pickerTime = ''
- if (this.isPhone) {
- this.$refs.mobile && this.$refs.mobile.clearCalender()
- } else {
- this.$refs.pcSingle && this.$refs.pcSingle.clearCalender()
- }
- if (needEmit) {
- this.$emit('change', '')
- this.$emit('input', '')
- this.$emit('update:modelValue', '')
- }
- } else {
- this.displayRangeValue.startDate = ''
- this.displayRangeValue.endDate = ''
- this.tempRange.startDate = ''
- this.tempRange.startTime = ''
- this.tempRange.endDate = ''
- this.tempRange.endTime = ''
- if (this.isPhone) {
- this.$refs.mobile && this.$refs.mobile.clearCalender()
- } else {
- this.$refs.left && this.$refs.left.clearCalender()
- this.$refs.right && this.$refs.right.clearCalender()
- this.$refs.right && this.$refs.right.changeMonth('next')
- }
- if (needEmit) {
- this.$emit('change', [])
- this.$emit('input', [])
- this.$emit('update:modelValue', [])
- }
- }
- }
- }
- }
-</script>
-
-<style lang="scss">
- $uni-primary: #007aff !default;
-
- .uni-date {
- width: 100%;
- flex: 1;
- }
-
- .uni-date-x {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- border-radius: 4px;
- background-color: #fff;
- color: #666;
- font-size: 14px;
- flex: 1;
-
- .icon-calendar {
- padding-left: 3px;
- }
-
- .range-separator {
- height: 35px;
- /* #ifndef MP */
- padding: 0 2px;
- /* #endif */
- line-height: 35px;
- }
- }
-
- .uni-date-x--border {
- box-sizing: border-box;
- border-radius: 4px;
- border: 1px solid #e5e5e5;
- }
-
- .uni-date-editor--x {
- display: flex;
- align-items: center;
- position: relative;
- }
-
- .uni-date-editor--x .uni-date__icon-clear {
- padding-right: 3px;
- display: flex;
- align-items: center;
- /* #ifdef H5 */
- cursor: pointer;
- /* #endif */
- }
-
- .uni-date__x-input {
- width: auto;
- height: 35px;
- /* #ifndef MP */
- padding-left: 5px;
- /* #endif */
- position: relative;
- flex: 1;
- line-height: 35px;
- font-size: 14px;
- overflow: hidden;
- }
-
- .text-center {
- text-align: center;
- }
-
- .uni-date__input {
- height: 40px;
- width: 100%;
- line-height: 40px;
- font-size: 14px;
- }
-
- .uni-date-range__input {
- text-align: center;
- max-width: 142px;
- }
-
- .uni-date-picker__container {
- position: relative;
- }
-
- .uni-date-mask--pc {
- position: fixed;
- bottom: 0px;
- top: 0px;
- left: 0px;
- right: 0px;
- background-color: rgba(0, 0, 0, 0);
- transition-duration: 0.3s;
- z-index: 996;
- }
-
- .uni-date-single--x {
- background-color: #fff;
- position: absolute;
- top: 0;
- z-index: 999;
- border: 1px solid #EBEEF5;
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
- border-radius: 4px;
- }
-
- .uni-date-range--x {
- background-color: #fff;
- position: absolute;
- top: 0;
- z-index: 999;
- border: 1px solid #EBEEF5;
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
- border-radius: 4px;
- }
-
- .uni-date-editor--x__disabled {
- opacity: 0.4;
- cursor: default;
- }
-
- .uni-date-editor--logo {
- width: 16px;
- height: 16px;
- vertical-align: middle;
- }
-
- /* 添加时间 */
- .popup-x-header {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- }
-
- .popup-x-header--datetime {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- flex: 1;
- }
-
- .popup-x-body {
- display: flex;
- }
-
- .popup-x-footer {
- padding: 0 15px;
- border-top-color: #F1F1F1;
- border-top-style: solid;
- border-top-width: 1px;
- line-height: 40px;
- text-align: right;
- color: #666;
- }
-
- .popup-x-footer text:hover {
- color: $uni-primary;
- cursor: pointer;
- opacity: 0.8;
- }
-
- .popup-x-footer .confirm-text {
- margin-left: 20px;
- color: $uni-primary;
- }
-
- .uni-date-changed {
- text-align: center;
- color: #333;
- border-bottom-color: #F1F1F1;
- border-bottom-style: solid;
- border-bottom-width: 1px;
- }
-
- .uni-date-changed--time text {
- height: 50px;
- line-height: 50px;
- }
-
- .uni-date-changed .uni-date-changed--time {
- flex: 1;
- }
-
- .uni-date-changed--time-date {
- color: #333;
- opacity: 0.6;
- }
-
- .mr-50 {
- margin-right: 50px;
- }
-
- /* picker 弹出层通用的指示小三角, todo:扩展至上下左右方向定位 */
- .uni-popper__arrow,
- .uni-popper__arrow::after {
- position: absolute;
- display: block;
- width: 0;
- height: 0;
- border: 6px solid transparent;
- border-top-width: 0;
- }
-
- .uni-popper__arrow {
- filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
- top: -6px;
- left: 10%;
- margin-right: 3px;
- border-bottom-color: #EBEEF5;
- }
-
- .uni-popper__arrow::after {
- content: " ";
- top: 1px;
- margin-left: -6px;
- border-bottom-color: #fff;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/util.js b/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/util.js
deleted file mode 100644
index ab40b23..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/util.js
+++ /dev/null
@@ -1,403 +0,0 @@
-class Calendar {
- constructor({
- selected,
- startDate,
- endDate,
- range,
- } = {}) {
- // 当前日期
- this.date = this.getDateObj(new Date()) // 当前初入日期
- // 打点信息
- this.selected = selected || [];
- // 起始时间
- this.startDate = startDate
- // 终止时间
- this.endDate = endDate
- // 是否范围选择
- this.range = range
- // 多选状态
- this.cleanMultipleStatus()
- // 每周日期
- this.weeks = {}
- this.lastHover = false
- }
- /**
- * 设置日期
- * @param {Object} date
- */
- setDate(date) {
- const selectDate = this.getDateObj(date)
- this.getWeeks(selectDate.fullDate)
- }
-
- /**
- * 清理多选状态
- */
- cleanMultipleStatus() {
- this.multipleStatus = {
- before: '',
- after: '',
- data: []
- }
- }
-
- setStartDate(startDate) {
- this.startDate = startDate
- }
-
- setEndDate(endDate) {
- this.endDate = endDate
- }
-
- getPreMonthObj(date){
- date = fixIosDateFormat(date)
- date = new Date(date)
-
- const oldMonth = date.getMonth()
- date.setMonth(oldMonth - 1)
- const newMonth = date.getMonth()
- if(oldMonth !== 0 && newMonth - oldMonth === 0){
- date.setMonth(newMonth - 1)
- }
- return this.getDateObj(date)
- }
- getNextMonthObj(date){
- date = fixIosDateFormat(date)
- date = new Date(date)
-
- const oldMonth = date.getMonth()
- date.setMonth(oldMonth + 1)
- const newMonth = date.getMonth()
- if(newMonth - oldMonth > 1){
- date.setMonth(newMonth - 1)
- }
- return this.getDateObj(date)
- }
-
- /**
- * 获取指定格式Date对象
- */
- getDateObj(date) {
- date = fixIosDateFormat(date)
- date = new Date(date)
-
- return {
- fullDate: getDate(date),
- year: date.getFullYear(),
- month: addZero(date.getMonth() + 1),
- date: addZero(date.getDate()),
- day: date.getDay()
- }
- }
-
- /**
- * 获取上一个月日期集合
- */
- getPreMonthDays(amount, dateObj) {
- const result = []
- for (let i = amount - 1; i >= 0; i--) {
- const month = dateObj.month - 1
- result.push({
- date: new Date(dateObj.year, month, -i).getDate(),
- month,
- disable: true
- })
- }
- return result
- }
- /**
- * 获取本月日期集合
- */
- getCurrentMonthDays(amount, dateObj) {
- const result = []
- const fullDate = this.date.fullDate
- for (let i = 1; i <= amount; i++) {
- const currentDate = `${dateObj.year}-${dateObj.month}-${addZero(i)}`
- const isToday = fullDate === currentDate
- // 获取打点信息
- const info = this.selected && this.selected.find((item) => {
- if (this.dateEqual(currentDate, item.date)) {
- return item
- }
- })
-
- // 日期禁用
- let disableBefore = true
- let disableAfter = true
- if (this.startDate) {
- disableBefore = dateCompare(this.startDate, currentDate)
- }
-
- if (this.endDate) {
- disableAfter = dateCompare(currentDate, this.endDate)
- }
-
- let multiples = this.multipleStatus.data
- let multiplesStatus = -1
- if (this.range && multiples) {
- multiplesStatus = multiples.findIndex((item) => {
- return this.dateEqual(item, currentDate)
- })
- }
- const checked = multiplesStatus !== -1
-
- result.push({
- fullDate: currentDate,
- year: dateObj.year,
- date: i,
- multiple: this.range ? checked : false,
- beforeMultiple: this.isLogicBefore(currentDate, this.multipleStatus.before, this.multipleStatus.after),
- afterMultiple: this.isLogicAfter(currentDate, this.multipleStatus.before, this.multipleStatus.after),
- month: dateObj.month,
- disable: (this.startDate && !dateCompare(this.startDate, currentDate)) || (this.endDate && !dateCompare(currentDate,this.endDate)),
- isToday,
- userChecked: false,
- extraInfo: info
- })
- }
- return result
- }
- /**
- * 获取下一个月日期集合
- */
- _getNextMonthDays(amount, dateObj) {
- const result = []
- const month = dateObj.month + 1
- for (let i = 1; i <= amount; i++) {
- result.push({
- date: i,
- month,
- disable: true
- })
- }
- return result
- }
-
- /**
- * 获取当前日期详情
- * @param {Object} date
- */
- getInfo(date) {
- if (!date) {
- date = new Date()
- }
-
- return this.calendar.find(item => item.fullDate === this.getDateObj(date).fullDate)
- }
-
- /**
- * 比较时间是否相等
- */
- dateEqual(before, after) {
- before = new Date(fixIosDateFormat(before))
- after = new Date(fixIosDateFormat(after))
- return before.valueOf() === after.valueOf()
- }
-
- /**
- * 比较真实起始日期
- */
-
- isLogicBefore(currentDate, before, after) {
- let logicBefore = before
- if (before && after) {
- logicBefore = dateCompare(before, after) ? before : after
- }
- return this.dateEqual(logicBefore, currentDate)
- }
-
- isLogicAfter(currentDate, before, after) {
- let logicAfter = after
- if (before && after) {
- logicAfter = dateCompare(before, after) ? after : before
- }
- return this.dateEqual(logicAfter, currentDate)
- }
-
- /**
- * 获取日期范围内所有日期
- * @param {Object} begin
- * @param {Object} end
- */
- geDateAll(begin, end) {
- var arr = []
- var ab = begin.split('-')
- var ae = end.split('-')
- var db = new Date()
- db.setFullYear(ab[0], ab[1] - 1, ab[2])
- var de = new Date()
- de.setFullYear(ae[0], ae[1] - 1, ae[2])
- var unixDb = db.getTime() - 24 * 60 * 60 * 1000
- var unixDe = de.getTime() - 24 * 60 * 60 * 1000
- for (var k = unixDb; k <= unixDe;) {
- k = k + 24 * 60 * 60 * 1000
- arr.push(this.getDateObj(new Date(parseInt(k))).fullDate)
- }
- return arr
- }
-
- /**
- * 获取多选状态
- */
- setMultiple(fullDate) {
- if (!this.range) return
-
- let {
- before,
- after
- } = this.multipleStatus
- if (before && after) {
- if (!this.lastHover) {
- this.lastHover = true
- return
- }
- this.multipleStatus.before = fullDate
- this.multipleStatus.after = ''
- this.multipleStatus.data = []
- this.multipleStatus.fulldate = ''
- this.lastHover = false
- } else {
- if (!before) {
- this.multipleStatus.before = fullDate
- this.lastHover = false
- } else {
- this.multipleStatus.after = fullDate
- if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
- this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus
- .after);
- } else {
- this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus
- .before);
- }
- this.lastHover = true
- }
- }
- this.getWeeks(fullDate)
- }
-
- /**
- * 鼠标 hover 更新多选状态
- */
- setHoverMultiple(fullDate) {
- if (!this.range || this.lastHover) return
-
- const { before } = this.multipleStatus
-
- if (!before) {
- this.multipleStatus.before = fullDate
- } else {
- this.multipleStatus.after = fullDate
- if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
- this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
- } else {
- this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
- }
- }
- this.getWeeks(fullDate)
- }
-
- /**
- * 更新默认值多选状态
- */
- setDefaultMultiple(before, after) {
- this.multipleStatus.before = before
- this.multipleStatus.after = after
- if (before && after) {
- if (dateCompare(before, after)) {
- this.multipleStatus.data = this.geDateAll(before, after);
- this.getWeeks(after)
- } else {
- this.multipleStatus.data = this.geDateAll(after, before);
- this.getWeeks(before)
- }
- }
- }
-
- /**
- * 获取每周数据
- * @param {Object} dateData
- */
- getWeeks(dateData) {
- const {
- year,
- month,
- } = this.getDateObj(dateData)
-
- const preMonthDayAmount = new Date(year, month - 1, 1).getDay()
- const preMonthDays = this.getPreMonthDays(preMonthDayAmount, this.getDateObj(dateData))
-
- const currentMonthDayAmount = new Date(year, month, 0).getDate()
- const currentMonthDays = this.getCurrentMonthDays(currentMonthDayAmount, this.getDateObj(dateData))
-
- const nextMonthDayAmount = 42 - preMonthDayAmount - currentMonthDayAmount
- const nextMonthDays = this._getNextMonthDays(nextMonthDayAmount, this.getDateObj(dateData))
-
- const calendarDays = [...preMonthDays, ...currentMonthDays, ...nextMonthDays]
-
- const weeks = new Array(6)
- for (let i = 0; i < calendarDays.length; i++) {
- const index = Math.floor(i / 7)
- if(!weeks[index]){
- weeks[index] = new Array(7)
- }
- weeks[index][i % 7] = calendarDays[i]
- }
-
- this.calendar = calendarDays
- this.weeks = weeks
- }
-}
-
-function getDateTime(date, hideSecond){
- return `${getDate(date)} ${getTime(date, hideSecond)}`
-}
-
-function getDate(date) {
- date = fixIosDateFormat(date)
- date = new Date(date)
- const year = date.getFullYear()
- const month = date.getMonth()+1
- const day = date.getDate()
- return `${year}-${addZero(month)}-${addZero(day)}`
-}
-
-function getTime(date, hideSecond){
- date = fixIosDateFormat(date)
- date = new Date(date)
- const hour = date.getHours()
- const minute = date.getMinutes()
- const second = date.getSeconds()
- return hideSecond ? `${addZero(hour)}:${addZero(minute)}` : `${addZero(hour)}:${addZero(minute)}:${addZero(second)}`
-}
-
-function addZero(num) {
- if(num < 10){
- num = `0${num}`
- }
- return num
-}
-
-function getDefaultSecond(hideSecond) {
- return hideSecond ? '00:00' : '00:00:00'
-}
-
-function dateCompare(startDate, endDate) {
- startDate = new Date(fixIosDateFormat(startDate))
- endDate = new Date(fixIosDateFormat(endDate))
- return startDate <= endDate
-}
-
-function checkDate(date){
- const dateReg = /((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g
- return date.match(dateReg)
-}
-
-const dateTimeReg = /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])( [0-5]?[0-9]:[0-5]?[0-9]:[0-5]?[0-9])?$/
-function fixIosDateFormat(value) {
- if (typeof value === 'string' && dateTimeReg.test(value)) {
- value = value.replace(/-/g, '/')
- }
- return value
-}
-
-export {Calendar, getDateTime, getDate, getTime, addZero, getDefaultSecond, dateCompare, checkDate, fixIosDateFormat}
\ No newline at end of file
diff --git a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/package.json b/subPackage/dbSafety/components/uni-components/uni-datetime-picker/package.json
deleted file mode 100644
index bc2378f..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/package.json
+++ /dev/null
@@ -1,87 +0,0 @@
-{
- "id": "uni-datetime-picker",
- "displayName": "uni-datetime-picker 日期选择器",
- "version": "2.2.23",
- "description": "uni-datetime-picker 日期时间选择器,支持日历,支持范围选择",
- "keywords": [
- "uni-datetime-picker",
- "uni-ui",
- "uniui",
- "日期时间选择器",
- "日期时间"
-],
- "repository": "https://github.com/dcloudio/uni-ui",
- "engines": {
- "HBuilderX": ""
- },
- "directories": {
- "example": "../../temps/example_temps"
- },
-"dcloudext": {
- "sale": {
- "regular": {
- "price": "0.00"
- },
- "sourcecode": {
- "price": "0.00"
- }
- },
- "contact": {
- "qq": ""
- },
- "declaration": {
- "ads": "无",
- "data": "无",
- "permissions": "无"
- },
- "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
- "type": "component-vue"
- },
- "uni_modules": {
- "dependencies": [
- "uni-scss",
- "uni-icons"
- ],
- "encrypt": [],
- "platforms": {
- "cloud": {
- "tcb": "y",
- "aliyun": "y"
- },
- "client": {
- "App": {
- "app-vue": "y",
- "app-nvue": "n"
- },
- "H5-mobile": {
- "Safari": "y",
- "Android Browser": "y",
- "微信浏览器(Android)": "y",
- "QQ浏览器(Android)": "y"
- },
- "H5-pc": {
- "Chrome": "y",
- "IE": "y",
- "Edge": "y",
- "Firefox": "y",
- "Safari": "y"
- },
- "小程序": {
- "微信": "y",
- "阿里": "y",
- "百度": "y",
- "字节跳动": "y",
- "QQ": "y"
- },
- "快应用": {
- "华为": "u",
- "联盟": "u"
- },
- "Vue": {
- "vue2": "y",
- "vue3": "y"
- }
- }
- }
- }
-}
diff --git a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/readme.md b/subPackage/dbSafety/components/uni-components/uni-datetime-picker/readme.md
deleted file mode 100644
index 162fbef..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-datetime-picker/readme.md
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-> `重要通知:组件升级更新 2.0.0 后,支持日期+时间范围选择,组件 ui 将使用日历选择日期,ui 变化较大,同时支持 PC 和 移动端。此版本不向后兼容,不再支持单独的时间选择(type=time)及相关的 hide-second 属性(时间选可使用内置组件 picker)。若仍需使用旧版本,可在插件市场下载*非uni_modules版本*,旧版本将不再维护`
-
-## DatetimePicker 时间选择器
-
-> **组件名:uni-datetime-picker**
-> 代码块: `uDatetimePicker`
-
-
-该组件的优势是,支持**时间戳**输入和输出(起始时间、终止时间也支持时间戳),可**同时选择**日期和时间。
-
-若只是需要单独选择日期和时间,不需要时间戳输入和输出,可使用原生的 picker 组件。
-
-**_点击 picker 默认值规则:_**
-
-- 若设置初始值 value, 会显示在 picker 显示框中
-- 若无初始值 value,则初始值 value 为当前本地时间 Date.now(), 但不会显示在 picker 显示框中
-
-### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker)
-#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
diff --git a/subPackage/dbSafety/components/uni-components/uni-icons/changelog.md b/subPackage/dbSafety/components/uni-components/uni-icons/changelog.md
deleted file mode 100644
index 6449885..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-icons/changelog.md
+++ /dev/null
@@ -1,22 +0,0 @@
-## 1.3.5(2022-01-24)
-- 优化 size 属性可以传入不带单位的字符串数值
-## 1.3.4(2022-01-24)
-- 优化 size 支持其他单位
-## 1.3.3(2022-01-17)
-- 修复 nvue 有些图标不显示的bug,兼容老版本图标
-## 1.3.2(2021-12-01)
-- 优化 示例可复制图标名称
-## 1.3.1(2021-11-23)
-- 优化 兼容旧组件 type 值
-## 1.3.0(2021-11-19)
-- 新增 更多图标
-- 优化 自定义图标使用方式
-- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
-- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons)
-## 1.1.7(2021-11-08)
-## 1.2.0(2021-07-30)
-- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
-## 1.1.5(2021-05-12)
-- 新增 组件示例地址
-## 1.1.4(2021-02-05)
-- 调整为uni_modules目录规范
diff --git a/subPackage/dbSafety/components/uni-components/uni-icons/components/uni-icons/icons.js b/subPackage/dbSafety/components/uni-components/uni-icons/components/uni-icons/icons.js
deleted file mode 100644
index 7889936..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-icons/components/uni-icons/icons.js
+++ /dev/null
@@ -1,1169 +0,0 @@
-export default {
- "id": "2852637",
- "name": "uniui图标库",
- "font_family": "uniicons",
- "css_prefix_text": "uniui-",
- "description": "",
- "glyphs": [
- {
- "icon_id": "25027049",
- "name": "yanse",
- "font_class": "color",
- "unicode": "e6cf",
- "unicode_decimal": 59087
- },
- {
- "icon_id": "25027048",
- "name": "wallet",
- "font_class": "wallet",
- "unicode": "e6b1",
- "unicode_decimal": 59057
- },
- {
- "icon_id": "25015720",
- "name": "settings-filled",
- "font_class": "settings-filled",
- "unicode": "e6ce",
- "unicode_decimal": 59086
- },
- {
- "icon_id": "25015434",
- "name": "shimingrenzheng-filled",
- "font_class": "auth-filled",
- "unicode": "e6cc",
- "unicode_decimal": 59084
- },
- {
- "icon_id": "24934246",
- "name": "shop-filled",
- "font_class": "shop-filled",
- "unicode": "e6cd",
- "unicode_decimal": 59085
- },
- {
- "icon_id": "24934159",
- "name": "staff-filled-01",
- "font_class": "staff-filled",
- "unicode": "e6cb",
- "unicode_decimal": 59083
- },
- {
- "icon_id": "24932461",
- "name": "VIP-filled",
- "font_class": "vip-filled",
- "unicode": "e6c6",
- "unicode_decimal": 59078
- },
- {
- "icon_id": "24932462",
- "name": "plus_circle_fill",
- "font_class": "plus-filled",
- "unicode": "e6c7",
- "unicode_decimal": 59079
- },
- {
- "icon_id": "24932463",
- "name": "folder_add-filled",
- "font_class": "folder-add-filled",
- "unicode": "e6c8",
- "unicode_decimal": 59080
- },
- {
- "icon_id": "24932464",
- "name": "yanse-filled",
- "font_class": "color-filled",
- "unicode": "e6c9",
- "unicode_decimal": 59081
- },
- {
- "icon_id": "24932465",
- "name": "tune-filled",
- "font_class": "tune-filled",
- "unicode": "e6ca",
- "unicode_decimal": 59082
- },
- {
- "icon_id": "24932455",
- "name": "a-rilidaka-filled",
- "font_class": "calendar-filled",
- "unicode": "e6c0",
- "unicode_decimal": 59072
- },
- {
- "icon_id": "24932456",
- "name": "notification-filled",
- "font_class": "notification-filled",
- "unicode": "e6c1",
- "unicode_decimal": 59073
- },
- {
- "icon_id": "24932457",
- "name": "wallet-filled",
- "font_class": "wallet-filled",
- "unicode": "e6c2",
- "unicode_decimal": 59074
- },
- {
- "icon_id": "24932458",
- "name": "paihangbang-filled",
- "font_class": "medal-filled",
- "unicode": "e6c3",
- "unicode_decimal": 59075
- },
- {
- "icon_id": "24932459",
- "name": "gift-filled",
- "font_class": "gift-filled",
- "unicode": "e6c4",
- "unicode_decimal": 59076
- },
- {
- "icon_id": "24932460",
- "name": "fire-filled",
- "font_class": "fire-filled",
- "unicode": "e6c5",
- "unicode_decimal": 59077
- },
- {
- "icon_id": "24928001",
- "name": "refreshempty",
- "font_class": "refreshempty",
- "unicode": "e6bf",
- "unicode_decimal": 59071
- },
- {
- "icon_id": "24926853",
- "name": "location-ellipse",
- "font_class": "location-filled",
- "unicode": "e6af",
- "unicode_decimal": 59055
- },
- {
- "icon_id": "24926735",
- "name": "person-filled",
- "font_class": "person-filled",
- "unicode": "e69d",
- "unicode_decimal": 59037
- },
- {
- "icon_id": "24926703",
- "name": "personadd-filled",
- "font_class": "personadd-filled",
- "unicode": "e698",
- "unicode_decimal": 59032
- },
- {
- "icon_id": "24923351",
- "name": "back",
- "font_class": "back",
- "unicode": "e6b9",
- "unicode_decimal": 59065
- },
- {
- "icon_id": "24923352",
- "name": "forward",
- "font_class": "forward",
- "unicode": "e6ba",
- "unicode_decimal": 59066
- },
- {
- "icon_id": "24923353",
- "name": "arrowthinright",
- "font_class": "arrow-right",
- "unicode": "e6bb",
- "unicode_decimal": 59067
- },
- {
- "icon_id": "24923353",
- "name": "arrowthinright",
- "font_class": "arrowthinright",
- "unicode": "e6bb",
- "unicode_decimal": 59067
- },
- {
- "icon_id": "24923354",
- "name": "arrowthinleft",
- "font_class": "arrow-left",
- "unicode": "e6bc",
- "unicode_decimal": 59068
- },
- {
- "icon_id": "24923354",
- "name": "arrowthinleft",
- "font_class": "arrowthinleft",
- "unicode": "e6bc",
- "unicode_decimal": 59068
- },
- {
- "icon_id": "24923355",
- "name": "arrowthinup",
- "font_class": "arrow-up",
- "unicode": "e6bd",
- "unicode_decimal": 59069
- },
- {
- "icon_id": "24923355",
- "name": "arrowthinup",
- "font_class": "arrowthinup",
- "unicode": "e6bd",
- "unicode_decimal": 59069
- },
- {
- "icon_id": "24923356",
- "name": "arrowthindown",
- "font_class": "arrow-down",
- "unicode": "e6be",
- "unicode_decimal": 59070
- },{
- "icon_id": "24923356",
- "name": "arrowthindown",
- "font_class": "arrowthindown",
- "unicode": "e6be",
- "unicode_decimal": 59070
- },
- {
- "icon_id": "24923349",
- "name": "arrowdown",
- "font_class": "bottom",
- "unicode": "e6b8",
- "unicode_decimal": 59064
- },{
- "icon_id": "24923349",
- "name": "arrowdown",
- "font_class": "arrowdown",
- "unicode": "e6b8",
- "unicode_decimal": 59064
- },
- {
- "icon_id": "24923346",
- "name": "arrowright",
- "font_class": "right",
- "unicode": "e6b5",
- "unicode_decimal": 59061
- },
- {
- "icon_id": "24923346",
- "name": "arrowright",
- "font_class": "arrowright",
- "unicode": "e6b5",
- "unicode_decimal": 59061
- },
- {
- "icon_id": "24923347",
- "name": "arrowup",
- "font_class": "top",
- "unicode": "e6b6",
- "unicode_decimal": 59062
- },
- {
- "icon_id": "24923347",
- "name": "arrowup",
- "font_class": "arrowup",
- "unicode": "e6b6",
- "unicode_decimal": 59062
- },
- {
- "icon_id": "24923348",
- "name": "arrowleft",
- "font_class": "left",
- "unicode": "e6b7",
- "unicode_decimal": 59063
- },
- {
- "icon_id": "24923348",
- "name": "arrowleft",
- "font_class": "arrowleft",
- "unicode": "e6b7",
- "unicode_decimal": 59063
- },
- {
- "icon_id": "24923334",
- "name": "eye",
- "font_class": "eye",
- "unicode": "e651",
- "unicode_decimal": 58961
- },
- {
- "icon_id": "24923335",
- "name": "eye-filled",
- "font_class": "eye-filled",
- "unicode": "e66a",
- "unicode_decimal": 58986
- },
- {
- "icon_id": "24923336",
- "name": "eye-slash",
- "font_class": "eye-slash",
- "unicode": "e6b3",
- "unicode_decimal": 59059
- },
- {
- "icon_id": "24923337",
- "name": "eye-slash-filled",
- "font_class": "eye-slash-filled",
- "unicode": "e6b4",
- "unicode_decimal": 59060
- },
- {
- "icon_id": "24923305",
- "name": "info-filled",
- "font_class": "info-filled",
- "unicode": "e649",
- "unicode_decimal": 58953
- },
- {
- "icon_id": "24923299",
- "name": "reload-01",
- "font_class": "reload",
- "unicode": "e6b2",
- "unicode_decimal": 59058
- },
- {
- "icon_id": "24923195",
- "name": "mic_slash_fill",
- "font_class": "micoff-filled",
- "unicode": "e6b0",
- "unicode_decimal": 59056
- },
- {
- "icon_id": "24923165",
- "name": "map-pin-ellipse",
- "font_class": "map-pin-ellipse",
- "unicode": "e6ac",
- "unicode_decimal": 59052
- },
- {
- "icon_id": "24923166",
- "name": "map-pin",
- "font_class": "map-pin",
- "unicode": "e6ad",
- "unicode_decimal": 59053
- },
- {
- "icon_id": "24923167",
- "name": "location",
- "font_class": "location",
- "unicode": "e6ae",
- "unicode_decimal": 59054
- },
- {
- "icon_id": "24923064",
- "name": "starhalf",
- "font_class": "starhalf",
- "unicode": "e683",
- "unicode_decimal": 59011
- },
- {
- "icon_id": "24923065",
- "name": "star",
- "font_class": "star",
- "unicode": "e688",
- "unicode_decimal": 59016
- },
- {
- "icon_id": "24923066",
- "name": "star-filled",
- "font_class": "star-filled",
- "unicode": "e68f",
- "unicode_decimal": 59023
- },
- {
- "icon_id": "24899646",
- "name": "a-rilidaka",
- "font_class": "calendar",
- "unicode": "e6a0",
- "unicode_decimal": 59040
- },
- {
- "icon_id": "24899647",
- "name": "fire",
- "font_class": "fire",
- "unicode": "e6a1",
- "unicode_decimal": 59041
- },
- {
- "icon_id": "24899648",
- "name": "paihangbang",
- "font_class": "medal",
- "unicode": "e6a2",
- "unicode_decimal": 59042
- },
- {
- "icon_id": "24899649",
- "name": "font",
- "font_class": "font",
- "unicode": "e6a3",
- "unicode_decimal": 59043
- },
- {
- "icon_id": "24899650",
- "name": "gift",
- "font_class": "gift",
- "unicode": "e6a4",
- "unicode_decimal": 59044
- },
- {
- "icon_id": "24899651",
- "name": "link",
- "font_class": "link",
- "unicode": "e6a5",
- "unicode_decimal": 59045
- },
- {
- "icon_id": "24899652",
- "name": "notification",
- "font_class": "notification",
- "unicode": "e6a6",
- "unicode_decimal": 59046
- },
- {
- "icon_id": "24899653",
- "name": "staff",
- "font_class": "staff",
- "unicode": "e6a7",
- "unicode_decimal": 59047
- },
- {
- "icon_id": "24899654",
- "name": "VIP",
- "font_class": "vip",
- "unicode": "e6a8",
- "unicode_decimal": 59048
- },
- {
- "icon_id": "24899655",
- "name": "folder_add",
- "font_class": "folder-add",
- "unicode": "e6a9",
- "unicode_decimal": 59049
- },
- {
- "icon_id": "24899656",
- "name": "tune",
- "font_class": "tune",
- "unicode": "e6aa",
- "unicode_decimal": 59050
- },
- {
- "icon_id": "24899657",
- "name": "shimingrenzheng",
- "font_class": "auth",
- "unicode": "e6ab",
- "unicode_decimal": 59051
- },
- {
- "icon_id": "24899565",
- "name": "person",
- "font_class": "person",
- "unicode": "e699",
- "unicode_decimal": 59033
- },
- {
- "icon_id": "24899566",
- "name": "email-filled",
- "font_class": "email-filled",
- "unicode": "e69a",
- "unicode_decimal": 59034
- },
- {
- "icon_id": "24899567",
- "name": "phone-filled",
- "font_class": "phone-filled",
- "unicode": "e69b",
- "unicode_decimal": 59035
- },
- {
- "icon_id": "24899568",
- "name": "phone",
- "font_class": "phone",
- "unicode": "e69c",
- "unicode_decimal": 59036
- },
- {
- "icon_id": "24899570",
- "name": "email",
- "font_class": "email",
- "unicode": "e69e",
- "unicode_decimal": 59038
- },
- {
- "icon_id": "24899571",
- "name": "personadd",
- "font_class": "personadd",
- "unicode": "e69f",
- "unicode_decimal": 59039
- },
- {
- "icon_id": "24899558",
- "name": "chatboxes-filled",
- "font_class": "chatboxes-filled",
- "unicode": "e692",
- "unicode_decimal": 59026
- },
- {
- "icon_id": "24899559",
- "name": "contact",
- "font_class": "contact",
- "unicode": "e693",
- "unicode_decimal": 59027
- },
- {
- "icon_id": "24899560",
- "name": "chatbubble-filled",
- "font_class": "chatbubble-filled",
- "unicode": "e694",
- "unicode_decimal": 59028
- },
- {
- "icon_id": "24899561",
- "name": "contact-filled",
- "font_class": "contact-filled",
- "unicode": "e695",
- "unicode_decimal": 59029
- },
- {
- "icon_id": "24899562",
- "name": "chatboxes",
- "font_class": "chatboxes",
- "unicode": "e696",
- "unicode_decimal": 59030
- },
- {
- "icon_id": "24899563",
- "name": "chatbubble",
- "font_class": "chatbubble",
- "unicode": "e697",
- "unicode_decimal": 59031
- },
- {
- "icon_id": "24881290",
- "name": "upload-filled",
- "font_class": "upload-filled",
- "unicode": "e68e",
- "unicode_decimal": 59022
- },
- {
- "icon_id": "24881292",
- "name": "upload",
- "font_class": "upload",
- "unicode": "e690",
- "unicode_decimal": 59024
- },
- {
- "icon_id": "24881293",
- "name": "weixin",
- "font_class": "weixin",
- "unicode": "e691",
- "unicode_decimal": 59025
- },
- {
- "icon_id": "24881274",
- "name": "compose",
- "font_class": "compose",
- "unicode": "e67f",
- "unicode_decimal": 59007
- },
- {
- "icon_id": "24881275",
- "name": "qq",
- "font_class": "qq",
- "unicode": "e680",
- "unicode_decimal": 59008
- },
- {
- "icon_id": "24881276",
- "name": "download-filled",
- "font_class": "download-filled",
- "unicode": "e681",
- "unicode_decimal": 59009
- },
- {
- "icon_id": "24881277",
- "name": "pengyouquan",
- "font_class": "pyq",
- "unicode": "e682",
- "unicode_decimal": 59010
- },
- {
- "icon_id": "24881279",
- "name": "sound",
- "font_class": "sound",
- "unicode": "e684",
- "unicode_decimal": 59012
- },
- {
- "icon_id": "24881280",
- "name": "trash-filled",
- "font_class": "trash-filled",
- "unicode": "e685",
- "unicode_decimal": 59013
- },
- {
- "icon_id": "24881281",
- "name": "sound-filled",
- "font_class": "sound-filled",
- "unicode": "e686",
- "unicode_decimal": 59014
- },
- {
- "icon_id": "24881282",
- "name": "trash",
- "font_class": "trash",
- "unicode": "e687",
- "unicode_decimal": 59015
- },
- {
- "icon_id": "24881284",
- "name": "videocam-filled",
- "font_class": "videocam-filled",
- "unicode": "e689",
- "unicode_decimal": 59017
- },
- {
- "icon_id": "24881285",
- "name": "spinner-cycle",
- "font_class": "spinner-cycle",
- "unicode": "e68a",
- "unicode_decimal": 59018
- },
- {
- "icon_id": "24881286",
- "name": "weibo",
- "font_class": "weibo",
- "unicode": "e68b",
- "unicode_decimal": 59019
- },
- {
- "icon_id": "24881288",
- "name": "videocam",
- "font_class": "videocam",
- "unicode": "e68c",
- "unicode_decimal": 59020
- },
- {
- "icon_id": "24881289",
- "name": "download",
- "font_class": "download",
- "unicode": "e68d",
- "unicode_decimal": 59021
- },
- {
- "icon_id": "24879601",
- "name": "help",
- "font_class": "help",
- "unicode": "e679",
- "unicode_decimal": 59001
- },
- {
- "icon_id": "24879602",
- "name": "navigate-filled",
- "font_class": "navigate-filled",
- "unicode": "e67a",
- "unicode_decimal": 59002
- },
- {
- "icon_id": "24879603",
- "name": "plusempty",
- "font_class": "plusempty",
- "unicode": "e67b",
- "unicode_decimal": 59003
- },
- {
- "icon_id": "24879604",
- "name": "smallcircle",
- "font_class": "smallcircle",
- "unicode": "e67c",
- "unicode_decimal": 59004
- },
- {
- "icon_id": "24879605",
- "name": "minus-filled",
- "font_class": "minus-filled",
- "unicode": "e67d",
- "unicode_decimal": 59005
- },
- {
- "icon_id": "24879606",
- "name": "micoff",
- "font_class": "micoff",
- "unicode": "e67e",
- "unicode_decimal": 59006
- },
- {
- "icon_id": "24879588",
- "name": "closeempty",
- "font_class": "closeempty",
- "unicode": "e66c",
- "unicode_decimal": 58988
- },
- {
- "icon_id": "24879589",
- "name": "clear",
- "font_class": "clear",
- "unicode": "e66d",
- "unicode_decimal": 58989
- },
- {
- "icon_id": "24879590",
- "name": "navigate",
- "font_class": "navigate",
- "unicode": "e66e",
- "unicode_decimal": 58990
- },
- {
- "icon_id": "24879591",
- "name": "minus",
- "font_class": "minus",
- "unicode": "e66f",
- "unicode_decimal": 58991
- },
- {
- "icon_id": "24879592",
- "name": "image",
- "font_class": "image",
- "unicode": "e670",
- "unicode_decimal": 58992
- },
- {
- "icon_id": "24879593",
- "name": "mic",
- "font_class": "mic",
- "unicode": "e671",
- "unicode_decimal": 58993
- },
- {
- "icon_id": "24879594",
- "name": "paperplane",
- "font_class": "paperplane",
- "unicode": "e672",
- "unicode_decimal": 58994
- },
- {
- "icon_id": "24879595",
- "name": "close",
- "font_class": "close",
- "unicode": "e673",
- "unicode_decimal": 58995
- },
- {
- "icon_id": "24879596",
- "name": "help-filled",
- "font_class": "help-filled",
- "unicode": "e674",
- "unicode_decimal": 58996
- },
- {
- "icon_id": "24879597",
- "name": "plus-filled",
- "font_class": "paperplane-filled",
- "unicode": "e675",
- "unicode_decimal": 58997
- },
- {
- "icon_id": "24879598",
- "name": "plus",
- "font_class": "plus",
- "unicode": "e676",
- "unicode_decimal": 58998
- },
- {
- "icon_id": "24879599",
- "name": "mic-filled",
- "font_class": "mic-filled",
- "unicode": "e677",
- "unicode_decimal": 58999
- },
- {
- "icon_id": "24879600",
- "name": "image-filled",
- "font_class": "image-filled",
- "unicode": "e678",
- "unicode_decimal": 59000
- },
- {
- "icon_id": "24855900",
- "name": "locked-filled",
- "font_class": "locked-filled",
- "unicode": "e668",
- "unicode_decimal": 58984
- },
- {
- "icon_id": "24855901",
- "name": "info",
- "font_class": "info",
- "unicode": "e669",
- "unicode_decimal": 58985
- },
- {
- "icon_id": "24855903",
- "name": "locked",
- "font_class": "locked",
- "unicode": "e66b",
- "unicode_decimal": 58987
- },
- {
- "icon_id": "24855884",
- "name": "camera-filled",
- "font_class": "camera-filled",
- "unicode": "e658",
- "unicode_decimal": 58968
- },
- {
- "icon_id": "24855885",
- "name": "chat-filled",
- "font_class": "chat-filled",
- "unicode": "e659",
- "unicode_decimal": 58969
- },
- {
- "icon_id": "24855886",
- "name": "camera",
- "font_class": "camera",
- "unicode": "e65a",
- "unicode_decimal": 58970
- },
- {
- "icon_id": "24855887",
- "name": "circle",
- "font_class": "circle",
- "unicode": "e65b",
- "unicode_decimal": 58971
- },
- {
- "icon_id": "24855888",
- "name": "checkmarkempty",
- "font_class": "checkmarkempty",
- "unicode": "e65c",
- "unicode_decimal": 58972
- },
- {
- "icon_id": "24855889",
- "name": "chat",
- "font_class": "chat",
- "unicode": "e65d",
- "unicode_decimal": 58973
- },
- {
- "icon_id": "24855890",
- "name": "circle-filled",
- "font_class": "circle-filled",
- "unicode": "e65e",
- "unicode_decimal": 58974
- },
- {
- "icon_id": "24855891",
- "name": "flag",
- "font_class": "flag",
- "unicode": "e65f",
- "unicode_decimal": 58975
- },
- {
- "icon_id": "24855892",
- "name": "flag-filled",
- "font_class": "flag-filled",
- "unicode": "e660",
- "unicode_decimal": 58976
- },
- {
- "icon_id": "24855893",
- "name": "gear-filled",
- "font_class": "gear-filled",
- "unicode": "e661",
- "unicode_decimal": 58977
- },
- {
- "icon_id": "24855894",
- "name": "home",
- "font_class": "home",
- "unicode": "e662",
- "unicode_decimal": 58978
- },
- {
- "icon_id": "24855895",
- "name": "home-filled",
- "font_class": "home-filled",
- "unicode": "e663",
- "unicode_decimal": 58979
- },
- {
- "icon_id": "24855896",
- "name": "gear",
- "font_class": "gear",
- "unicode": "e664",
- "unicode_decimal": 58980
- },
- {
- "icon_id": "24855897",
- "name": "smallcircle-filled",
- "font_class": "smallcircle-filled",
- "unicode": "e665",
- "unicode_decimal": 58981
- },
- {
- "icon_id": "24855898",
- "name": "map-filled",
- "font_class": "map-filled",
- "unicode": "e666",
- "unicode_decimal": 58982
- },
- {
- "icon_id": "24855899",
- "name": "map",
- "font_class": "map",
- "unicode": "e667",
- "unicode_decimal": 58983
- },
- {
- "icon_id": "24855825",
- "name": "refresh-filled",
- "font_class": "refresh-filled",
- "unicode": "e656",
- "unicode_decimal": 58966
- },
- {
- "icon_id": "24855826",
- "name": "refresh",
- "font_class": "refresh",
- "unicode": "e657",
- "unicode_decimal": 58967
- },
- {
- "icon_id": "24855808",
- "name": "cloud-upload",
- "font_class": "cloud-upload",
- "unicode": "e645",
- "unicode_decimal": 58949
- },
- {
- "icon_id": "24855809",
- "name": "cloud-download-filled",
- "font_class": "cloud-download-filled",
- "unicode": "e646",
- "unicode_decimal": 58950
- },
- {
- "icon_id": "24855810",
- "name": "cloud-download",
- "font_class": "cloud-download",
- "unicode": "e647",
- "unicode_decimal": 58951
- },
- {
- "icon_id": "24855811",
- "name": "cloud-upload-filled",
- "font_class": "cloud-upload-filled",
- "unicode": "e648",
- "unicode_decimal": 58952
- },
- {
- "icon_id": "24855813",
- "name": "redo",
- "font_class": "redo",
- "unicode": "e64a",
- "unicode_decimal": 58954
- },
- {
- "icon_id": "24855814",
- "name": "images-filled",
- "font_class": "images-filled",
- "unicode": "e64b",
- "unicode_decimal": 58955
- },
- {
- "icon_id": "24855815",
- "name": "undo-filled",
- "font_class": "undo-filled",
- "unicode": "e64c",
- "unicode_decimal": 58956
- },
- {
- "icon_id": "24855816",
- "name": "more",
- "font_class": "more",
- "unicode": "e64d",
- "unicode_decimal": 58957
- },
- {
- "icon_id": "24855817",
- "name": "more-filled",
- "font_class": "more-filled",
- "unicode": "e64e",
- "unicode_decimal": 58958
- },
- {
- "icon_id": "24855818",
- "name": "undo",
- "font_class": "undo",
- "unicode": "e64f",
- "unicode_decimal": 58959
- },
- {
- "icon_id": "24855819",
- "name": "images",
- "font_class": "images",
- "unicode": "e650",
- "unicode_decimal": 58960
- },
- {
- "icon_id": "24855821",
- "name": "paperclip",
- "font_class": "paperclip",
- "unicode": "e652",
- "unicode_decimal": 58962
- },
- {
- "icon_id": "24855822",
- "name": "settings",
- "font_class": "settings",
- "unicode": "e653",
- "unicode_decimal": 58963
- },
- {
- "icon_id": "24855823",
- "name": "search",
- "font_class": "search",
- "unicode": "e654",
- "unicode_decimal": 58964
- },
- {
- "icon_id": "24855824",
- "name": "redo-filled",
- "font_class": "redo-filled",
- "unicode": "e655",
- "unicode_decimal": 58965
- },
- {
- "icon_id": "24841702",
- "name": "list",
- "font_class": "list",
- "unicode": "e644",
- "unicode_decimal": 58948
- },
- {
- "icon_id": "24841489",
- "name": "mail-open-filled",
- "font_class": "mail-open-filled",
- "unicode": "e63a",
- "unicode_decimal": 58938
- },
- {
- "icon_id": "24841491",
- "name": "hand-thumbsdown-filled",
- "font_class": "hand-down-filled",
- "unicode": "e63c",
- "unicode_decimal": 58940
- },
- {
- "icon_id": "24841492",
- "name": "hand-thumbsdown",
- "font_class": "hand-down",
- "unicode": "e63d",
- "unicode_decimal": 58941
- },
- {
- "icon_id": "24841493",
- "name": "hand-thumbsup-filled",
- "font_class": "hand-up-filled",
- "unicode": "e63e",
- "unicode_decimal": 58942
- },
- {
- "icon_id": "24841494",
- "name": "hand-thumbsup",
- "font_class": "hand-up",
- "unicode": "e63f",
- "unicode_decimal": 58943
- },
- {
- "icon_id": "24841496",
- "name": "heart-filled",
- "font_class": "heart-filled",
- "unicode": "e641",
- "unicode_decimal": 58945
- },
- {
- "icon_id": "24841498",
- "name": "mail-open",
- "font_class": "mail-open",
- "unicode": "e643",
- "unicode_decimal": 58947
- },
- {
- "icon_id": "24841488",
- "name": "heart",
- "font_class": "heart",
- "unicode": "e639",
- "unicode_decimal": 58937
- },
- {
- "icon_id": "24839963",
- "name": "loop",
- "font_class": "loop",
- "unicode": "e633",
- "unicode_decimal": 58931
- },
- {
- "icon_id": "24839866",
- "name": "pulldown",
- "font_class": "pulldown",
- "unicode": "e632",
- "unicode_decimal": 58930
- },
- {
- "icon_id": "24813798",
- "name": "scan",
- "font_class": "scan",
- "unicode": "e62a",
- "unicode_decimal": 58922
- },
- {
- "icon_id": "24813786",
- "name": "bars",
- "font_class": "bars",
- "unicode": "e627",
- "unicode_decimal": 58919
- },
- {
- "icon_id": "24813788",
- "name": "cart-filled",
- "font_class": "cart-filled",
- "unicode": "e629",
- "unicode_decimal": 58921
- },
- {
- "icon_id": "24813790",
- "name": "checkbox",
- "font_class": "checkbox",
- "unicode": "e62b",
- "unicode_decimal": 58923
- },
- {
- "icon_id": "24813791",
- "name": "checkbox-filled",
- "font_class": "checkbox-filled",
- "unicode": "e62c",
- "unicode_decimal": 58924
- },
- {
- "icon_id": "24813794",
- "name": "shop",
- "font_class": "shop",
- "unicode": "e62f",
- "unicode_decimal": 58927
- },
- {
- "icon_id": "24813795",
- "name": "headphones",
- "font_class": "headphones",
- "unicode": "e630",
- "unicode_decimal": 58928
- },
- {
- "icon_id": "24813796",
- "name": "cart",
- "font_class": "cart",
- "unicode": "e631",
- "unicode_decimal": 58929
- }
- ]
-}
diff --git a/subPackage/dbSafety/components/uni-components/uni-icons/components/uni-icons/uni-icons.vue b/subPackage/dbSafety/components/uni-components/uni-icons/components/uni-icons/uni-icons.vue
deleted file mode 100644
index 86e7444..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-icons/components/uni-icons/uni-icons.vue
+++ /dev/null
@@ -1,96 +0,0 @@
-<template>
- <!-- #ifdef APP-NVUE -->
- <text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" @click="_onClick">{{unicode}}</text>
- <!-- #endif -->
- <!-- #ifndef APP-NVUE -->
- <text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick"></text>
- <!-- #endif -->
-</template>
-
-<script>
- import icons from './icons.js';
- const getVal = (val) => {
- const reg = /^[0-9]*$/g
- return (typeof val === 'number' || reg.test(val) )? val + 'px' : val;
- }
- // #ifdef APP-NVUE
- var domModule = weex.requireModule('dom');
- import iconUrl from './uniicons.ttf'
- domModule.addRule('fontFace', {
- 'fontFamily': "uniicons",
- 'src': "url('"+iconUrl+"')"
- });
- // #endif
-
- /**
- * Icons 图标
- * @description 用于展示 icons 图标
- * @tutorial https://ext.dcloud.net.cn/plugin?id=28
- * @property {Number} size 图标大小
- * @property {String} type 图标图案,参考示例
- * @property {String} color 图标颜色
- * @property {String} customPrefix 自定义图标
- * @event {Function} click 点击 Icon 触发事件
- */
- export default {
- name: 'UniIcons',
- emits:['click'],
- props: {
- type: {
- type: String,
- default: ''
- },
- color: {
- type: String,
- default: '#333333'
- },
- size: {
- type: [Number, String],
- default: 16
- },
- customPrefix:{
- type: String,
- default: ''
- }
- },
- data() {
- return {
- icons: icons.glyphs
- }
- },
- computed:{
- unicode(){
- let code = this.icons.find(v=>v.font_class === this.type)
- if(code){
- return unescape(`%u${code.unicode}`)
- }
- return ''
- },
- iconSize(){
- return getVal(this.size)
- }
- },
- methods: {
- _onClick() {
- this.$emit('click')
- }
- }
- }
-</script>
-
-<style lang="scss">
- /* #ifndef APP-NVUE */
- @import './uniicons.css';
- @font-face {
- font-family: uniicons;
- src: url('./uniicons.ttf') format('truetype');
- }
-
- /* #endif */
- .uni-icons {
- font-family: uniicons;
- text-decoration: none;
- text-align: center;
- }
-
-</style>
diff --git a/subPackage/dbSafety/components/uni-components/uni-icons/components/uni-icons/uniicons.css b/subPackage/dbSafety/components/uni-components/uni-icons/components/uni-icons/uniicons.css
deleted file mode 100644
index 2f56eab..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-icons/components/uni-icons/uniicons.css
+++ /dev/null
@@ -1,663 +0,0 @@
-.uniui-color:before {
- content: "\e6cf";
-}
-
-.uniui-wallet:before {
- content: "\e6b1";
-}
-
-.uniui-settings-filled:before {
- content: "\e6ce";
-}
-
-.uniui-auth-filled:before {
- content: "\e6cc";
-}
-
-.uniui-shop-filled:before {
- content: "\e6cd";
-}
-
-.uniui-staff-filled:before {
- content: "\e6cb";
-}
-
-.uniui-vip-filled:before {
- content: "\e6c6";
-}
-
-.uniui-plus-filled:before {
- content: "\e6c7";
-}
-
-.uniui-folder-add-filled:before {
- content: "\e6c8";
-}
-
-.uniui-color-filled:before {
- content: "\e6c9";
-}
-
-.uniui-tune-filled:before {
- content: "\e6ca";
-}
-
-.uniui-calendar-filled:before {
- content: "\e6c0";
-}
-
-.uniui-notification-filled:before {
- content: "\e6c1";
-}
-
-.uniui-wallet-filled:before {
- content: "\e6c2";
-}
-
-.uniui-medal-filled:before {
- content: "\e6c3";
-}
-
-.uniui-gift-filled:before {
- content: "\e6c4";
-}
-
-.uniui-fire-filled:before {
- content: "\e6c5";
-}
-
-.uniui-refreshempty:before {
- content: "\e6bf";
-}
-
-.uniui-location-filled:before {
- content: "\e6af";
-}
-
-.uniui-person-filled:before {
- content: "\e69d";
-}
-
-.uniui-personadd-filled:before {
- content: "\e698";
-}
-
-.uniui-back:before {
- content: "\e6b9";
-}
-
-.uniui-forward:before {
- content: "\e6ba";
-}
-
-.uniui-arrow-right:before {
- content: "\e6bb";
-}
-
-.uniui-arrowthinright:before {
- content: "\e6bb";
-}
-
-.uniui-arrow-left:before {
- content: "\e6bc";
-}
-
-.uniui-arrowthinleft:before {
- content: "\e6bc";
-}
-
-.uniui-arrow-up:before {
- content: "\e6bd";
-}
-
-.uniui-arrowthinup:before {
- content: "\e6bd";
-}
-
-.uniui-arrow-down:before {
- content: "\e6be";
-}
-
-.uniui-arrowthindown:before {
- content: "\e6be";
-}
-
-.uniui-bottom:before {
- content: "\e6b8";
-}
-
-.uniui-arrowdown:before {
- content: "\e6b8";
-}
-
-.uniui-right:before {
- content: "\e6b5";
-}
-
-.uniui-arrowright:before {
- content: "\e6b5";
-}
-
-.uniui-top:before {
- content: "\e6b6";
-}
-
-.uniui-arrowup:before {
- content: "\e6b6";
-}
-
-.uniui-left:before {
- content: "\e6b7";
-}
-
-.uniui-arrowleft:before {
- content: "\e6b7";
-}
-
-.uniui-eye:before {
- content: "\e651";
-}
-
-.uniui-eye-filled:before {
- content: "\e66a";
-}
-
-.uniui-eye-slash:before {
- content: "\e6b3";
-}
-
-.uniui-eye-slash-filled:before {
- content: "\e6b4";
-}
-
-.uniui-info-filled:before {
- content: "\e649";
-}
-
-.uniui-reload:before {
- content: "\e6b2";
-}
-
-.uniui-micoff-filled:before {
- content: "\e6b0";
-}
-
-.uniui-map-pin-ellipse:before {
- content: "\e6ac";
-}
-
-.uniui-map-pin:before {
- content: "\e6ad";
-}
-
-.uniui-location:before {
- content: "\e6ae";
-}
-
-.uniui-starhalf:before {
- content: "\e683";
-}
-
-.uniui-star:before {
- content: "\e688";
-}
-
-.uniui-star-filled:before {
- content: "\e68f";
-}
-
-.uniui-calendar:before {
- content: "\e6a0";
-}
-
-.uniui-fire:before {
- content: "\e6a1";
-}
-
-.uniui-medal:before {
- content: "\e6a2";
-}
-
-.uniui-font:before {
- content: "\e6a3";
-}
-
-.uniui-gift:before {
- content: "\e6a4";
-}
-
-.uniui-link:before {
- content: "\e6a5";
-}
-
-.uniui-notification:before {
- content: "\e6a6";
-}
-
-.uniui-staff:before {
- content: "\e6a7";
-}
-
-.uniui-vip:before {
- content: "\e6a8";
-}
-
-.uniui-folder-add:before {
- content: "\e6a9";
-}
-
-.uniui-tune:before {
- content: "\e6aa";
-}
-
-.uniui-auth:before {
- content: "\e6ab";
-}
-
-.uniui-person:before {
- content: "\e699";
-}
-
-.uniui-email-filled:before {
- content: "\e69a";
-}
-
-.uniui-phone-filled:before {
- content: "\e69b";
-}
-
-.uniui-phone:before {
- content: "\e69c";
-}
-
-.uniui-email:before {
- content: "\e69e";
-}
-
-.uniui-personadd:before {
- content: "\e69f";
-}
-
-.uniui-chatboxes-filled:before {
- content: "\e692";
-}
-
-.uniui-contact:before {
- content: "\e693";
-}
-
-.uniui-chatbubble-filled:before {
- content: "\e694";
-}
-
-.uniui-contact-filled:before {
- content: "\e695";
-}
-
-.uniui-chatboxes:before {
- content: "\e696";
-}
-
-.uniui-chatbubble:before {
- content: "\e697";
-}
-
-.uniui-upload-filled:before {
- content: "\e68e";
-}
-
-.uniui-upload:before {
- content: "\e690";
-}
-
-.uniui-weixin:before {
- content: "\e691";
-}
-
-.uniui-compose:before {
- content: "\e67f";
-}
-
-.uniui-qq:before {
- content: "\e680";
-}
-
-.uniui-download-filled:before {
- content: "\e681";
-}
-
-.uniui-pyq:before {
- content: "\e682";
-}
-
-.uniui-sound:before {
- content: "\e684";
-}
-
-.uniui-trash-filled:before {
- content: "\e685";
-}
-
-.uniui-sound-filled:before {
- content: "\e686";
-}
-
-.uniui-trash:before {
- content: "\e687";
-}
-
-.uniui-videocam-filled:before {
- content: "\e689";
-}
-
-.uniui-spinner-cycle:before {
- content: "\e68a";
-}
-
-.uniui-weibo:before {
- content: "\e68b";
-}
-
-.uniui-videocam:before {
- content: "\e68c";
-}
-
-.uniui-download:before {
- content: "\e68d";
-}
-
-.uniui-help:before {
- content: "\e679";
-}
-
-.uniui-navigate-filled:before {
- content: "\e67a";
-}
-
-.uniui-plusempty:before {
- content: "\e67b";
-}
-
-.uniui-smallcircle:before {
- content: "\e67c";
-}
-
-.uniui-minus-filled:before {
- content: "\e67d";
-}
-
-.uniui-micoff:before {
- content: "\e67e";
-}
-
-.uniui-closeempty:before {
- content: "\e66c";
-}
-
-.uniui-clear:before {
- content: "\e66d";
-}
-
-.uniui-navigate:before {
- content: "\e66e";
-}
-
-.uniui-minus:before {
- content: "\e66f";
-}
-
-.uniui-image:before {
- content: "\e670";
-}
-
-.uniui-mic:before {
- content: "\e671";
-}
-
-.uniui-paperplane:before {
- content: "\e672";
-}
-
-.uniui-close:before {
- content: "\e673";
-}
-
-.uniui-help-filled:before {
- content: "\e674";
-}
-
-.uniui-paperplane-filled:before {
- content: "\e675";
-}
-
-.uniui-plus:before {
- content: "\e676";
-}
-
-.uniui-mic-filled:before {
- content: "\e677";
-}
-
-.uniui-image-filled:before {
- content: "\e678";
-}
-
-.uniui-locked-filled:before {
- content: "\e668";
-}
-
-.uniui-info:before {
- content: "\e669";
-}
-
-.uniui-locked:before {
- content: "\e66b";
-}
-
-.uniui-camera-filled:before {
- content: "\e658";
-}
-
-.uniui-chat-filled:before {
- content: "\e659";
-}
-
-.uniui-camera:before {
- content: "\e65a";
-}
-
-.uniui-circle:before {
- content: "\e65b";
-}
-
-.uniui-checkmarkempty:before {
- content: "\e65c";
-}
-
-.uniui-chat:before {
- content: "\e65d";
-}
-
-.uniui-circle-filled:before {
- content: "\e65e";
-}
-
-.uniui-flag:before {
- content: "\e65f";
-}
-
-.uniui-flag-filled:before {
- content: "\e660";
-}
-
-.uniui-gear-filled:before {
- content: "\e661";
-}
-
-.uniui-home:before {
- content: "\e662";
-}
-
-.uniui-home-filled:before {
- content: "\e663";
-}
-
-.uniui-gear:before {
- content: "\e664";
-}
-
-.uniui-smallcircle-filled:before {
- content: "\e665";
-}
-
-.uniui-map-filled:before {
- content: "\e666";
-}
-
-.uniui-map:before {
- content: "\e667";
-}
-
-.uniui-refresh-filled:before {
- content: "\e656";
-}
-
-.uniui-refresh:before {
- content: "\e657";
-}
-
-.uniui-cloud-upload:before {
- content: "\e645";
-}
-
-.uniui-cloud-download-filled:before {
- content: "\e646";
-}
-
-.uniui-cloud-download:before {
- content: "\e647";
-}
-
-.uniui-cloud-upload-filled:before {
- content: "\e648";
-}
-
-.uniui-redo:before {
- content: "\e64a";
-}
-
-.uniui-images-filled:before {
- content: "\e64b";
-}
-
-.uniui-undo-filled:before {
- content: "\e64c";
-}
-
-.uniui-more:before {
- content: "\e64d";
-}
-
-.uniui-more-filled:before {
- content: "\e64e";
-}
-
-.uniui-undo:before {
- content: "\e64f";
-}
-
-.uniui-images:before {
- content: "\e650";
-}
-
-.uniui-paperclip:before {
- content: "\e652";
-}
-
-.uniui-settings:before {
- content: "\e653";
-}
-
-.uniui-search:before {
- content: "\e654";
-}
-
-.uniui-redo-filled:before {
- content: "\e655";
-}
-
-.uniui-list:before {
- content: "\e644";
-}
-
-.uniui-mail-open-filled:before {
- content: "\e63a";
-}
-
-.uniui-hand-down-filled:before {
- content: "\e63c";
-}
-
-.uniui-hand-down:before {
- content: "\e63d";
-}
-
-.uniui-hand-up-filled:before {
- content: "\e63e";
-}
-
-.uniui-hand-up:before {
- content: "\e63f";
-}
-
-.uniui-heart-filled:before {
- content: "\e641";
-}
-
-.uniui-mail-open:before {
- content: "\e643";
-}
-
-.uniui-heart:before {
- content: "\e639";
-}
-
-.uniui-loop:before {
- content: "\e633";
-}
-
-.uniui-pulldown:before {
- content: "\e632";
-}
-
-.uniui-scan:before {
- content: "\e62a";
-}
-
-.uniui-bars:before {
- content: "\e627";
-}
-
-.uniui-cart-filled:before {
- content: "\e629";
-}
-
-.uniui-checkbox:before {
- content: "\e62b";
-}
-
-.uniui-checkbox-filled:before {
- content: "\e62c";
-}
-
-.uniui-shop:before {
- content: "\e62f";
-}
-
-.uniui-headphones:before {
- content: "\e630";
-}
-
-.uniui-cart:before {
- content: "\e631";
-}
diff --git a/subPackage/dbSafety/components/uni-components/uni-icons/components/uni-icons/uniicons.ttf b/subPackage/dbSafety/components/uni-components/uni-icons/components/uni-icons/uniicons.ttf
deleted file mode 100644
index 835f33b..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-icons/components/uni-icons/uniicons.ttf
+++ /dev/null
Binary files differ
diff --git a/subPackage/dbSafety/components/uni-components/uni-icons/package.json b/subPackage/dbSafety/components/uni-components/uni-icons/package.json
deleted file mode 100644
index d1c4e77..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-icons/package.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "id": "uni-icons",
- "displayName": "uni-icons 图标",
- "version": "1.3.5",
- "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
- "keywords": [
- "uni-ui",
- "uniui",
- "icon",
- "图标"
-],
- "repository": "https://github.com/dcloudio/uni-ui",
- "engines": {
- "HBuilderX": "^3.2.14"
- },
- "directories": {
- "example": "../../temps/example_temps"
- },
- "dcloudext": {
- "category": [
- "前端组件",
- "通用组件"
- ],
- "sale": {
- "regular": {
- "price": "0.00"
- },
- "sourcecode": {
- "price": "0.00"
- }
- },
- "contact": {
- "qq": ""
- },
- "declaration": {
- "ads": "无",
- "data": "无",
- "permissions": "无"
- },
- "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
- },
- "uni_modules": {
- "dependencies": ["uni-scss"],
- "encrypt": [],
- "platforms": {
- "cloud": {
- "tcb": "y",
- "aliyun": "y"
- },
- "client": {
- "App": {
- "app-vue": "y",
- "app-nvue": "y"
- },
- "H5-mobile": {
- "Safari": "y",
- "Android Browser": "y",
- "微信浏览器(Android)": "y",
- "QQ浏览器(Android)": "y"
- },
- "H5-pc": {
- "Chrome": "y",
- "IE": "y",
- "Edge": "y",
- "Firefox": "y",
- "Safari": "y"
- },
- "小程序": {
- "微信": "y",
- "阿里": "y",
- "百度": "y",
- "字节跳动": "y",
- "QQ": "y"
- },
- "快应用": {
- "华为": "u",
- "联盟": "u"
- },
- "Vue": {
- "vue2": "y",
- "vue3": "y"
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/subPackage/dbSafety/components/uni-components/uni-icons/readme.md b/subPackage/dbSafety/components/uni-components/uni-icons/readme.md
deleted file mode 100644
index 86234ba..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-icons/readme.md
+++ /dev/null
@@ -1,8 +0,0 @@
-## Icons 图标
-> **组件名:uni-icons**
-> 代码块: `uIcons`
-
-用于展示 icons 图标 。
-
-### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons)
-#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
diff --git a/subPackage/dbSafety/components/uni-components/uni-load-more/changelog.md b/subPackage/dbSafety/components/uni-components/uni-load-more/changelog.md
deleted file mode 100644
index 8f03f1d..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-load-more/changelog.md
+++ /dev/null
@@ -1,19 +0,0 @@
-## 1.3.3(2022-01-20)
-- 新增 showText属性 ,是否显示文本
-## 1.3.2(2022-01-19)
-- 修复 nvue 平台下不显示文本的bug
-## 1.3.1(2022-01-19)
-- 修复 微信小程序平台样式选择器报警告的问题
-## 1.3.0(2021-11-19)
-- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
-- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-load-more](https://uniapp.dcloud.io/component/uniui/uni-load-more)
-## 1.2.1(2021-08-24)
-- 新增 支持国际化
-## 1.2.0(2021-07-30)
-- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
-## 1.1.8(2021-05-12)
-- 新增 组件示例地址
-## 1.1.7(2021-03-30)
-- 修复 uni-load-more 在首页使用时,h5 平台报 'uni is not defined' 的 bug
-## 1.1.6(2021-02-05)
-- 调整为uni_modules目录规范
diff --git a/subPackage/dbSafety/components/uni-components/uni-load-more/components/uni-load-more/i18n/en.json b/subPackage/dbSafety/components/uni-components/uni-load-more/components/uni-load-more/i18n/en.json
deleted file mode 100644
index a4f14a5..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-load-more/components/uni-load-more/i18n/en.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "uni-load-more.contentdown": "Pull up to show more",
- "uni-load-more.contentrefresh": "loading...",
- "uni-load-more.contentnomore": "No more data"
-}
diff --git a/subPackage/dbSafety/components/uni-components/uni-load-more/components/uni-load-more/i18n/index.js b/subPackage/dbSafety/components/uni-components/uni-load-more/components/uni-load-more/i18n/index.js
deleted file mode 100644
index de7509c..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-load-more/components/uni-load-more/i18n/index.js
+++ /dev/null
@@ -1,8 +0,0 @@
-import en from './en.json'
-import zhHans from './zh-Hans.json'
-import zhHant from './zh-Hant.json'
-export default {
- en,
- 'zh-Hans': zhHans,
- 'zh-Hant': zhHant
-}
diff --git a/subPackage/dbSafety/components/uni-components/uni-load-more/components/uni-load-more/i18n/zh-Hans.json b/subPackage/dbSafety/components/uni-components/uni-load-more/components/uni-load-more/i18n/zh-Hans.json
deleted file mode 100644
index f15d510..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-load-more/components/uni-load-more/i18n/zh-Hans.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "uni-load-more.contentdown": "上拉显示更多",
- "uni-load-more.contentrefresh": "正在加载...",
- "uni-load-more.contentnomore": "没有更多数据了"
-}
diff --git a/subPackage/dbSafety/components/uni-components/uni-load-more/components/uni-load-more/i18n/zh-Hant.json b/subPackage/dbSafety/components/uni-components/uni-load-more/components/uni-load-more/i18n/zh-Hant.json
deleted file mode 100644
index a255c6d..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-load-more/components/uni-load-more/i18n/zh-Hant.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "uni-load-more.contentdown": "上拉顯示更多",
- "uni-load-more.contentrefresh": "正在加載...",
- "uni-load-more.contentnomore": "沒有更多數據了"
-}
diff --git a/subPackage/dbSafety/components/uni-components/uni-load-more/components/uni-load-more/uni-load-more.vue b/subPackage/dbSafety/components/uni-components/uni-load-more/components/uni-load-more/uni-load-more.vue
deleted file mode 100644
index e5eff4d..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-load-more/components/uni-load-more/uni-load-more.vue
+++ /dev/null
@@ -1,399 +0,0 @@
-<template>
- <view class="uni-load-more" @click="onClick">
- <!-- #ifdef APP-NVUE -->
- <loading-indicator v-if="!webviewHide && status === 'loading' && showIcon"
- :style="{color: color,width:iconSize+'px',height:iconSize+'px'}" :animating="true"
- class="uni-load-more__img uni-load-more__img--nvue"></loading-indicator>
- <!-- #endif -->
- <!-- #ifdef H5 -->
- <svg width="24" height="24" viewBox="25 25 50 50"
- v-if="!webviewHide && (iconType==='circle' || iconType==='auto' && platform === 'android') && status === 'loading' && showIcon"
- :style="{width:iconSize+'px',height:iconSize+'px'}"
- class="uni-load-more__img uni-load-more__img--android-H5">
- <circle cx="50" cy="50" r="20" fill="none" :style="{color:color}" :stroke-width="3"></circle>
- </svg>
- <!-- #endif -->
- <!-- #ifndef APP-NVUE || H5 -->
- <view
- v-if="!webviewHide && (iconType==='circle' || iconType==='auto' && platform === 'android') && status === 'loading' && showIcon"
- :style="{width:iconSize+'px',height:iconSize+'px'}"
- class="uni-load-more__img uni-load-more__img--android-MP">
- <view class="uni-load-more__img-icon" :style="{borderTopColor:color,borderTopWidth:iconSize/12}"></view>
- <view class="uni-load-more__img-icon" :style="{borderTopColor:color,borderTopWidth:iconSize/12}"></view>
- <view class="uni-load-more__img-icon" :style="{borderTopColor:color,borderTopWidth:iconSize/12}"></view>
- </view>
- <!-- #endif -->
- <!-- #ifndef APP-NVUE -->
- <view v-else-if="!webviewHide && status === 'loading' && showIcon"
- :style="{width:iconSize+'px',height:iconSize+'px'}" class="uni-load-more__img uni-load-more__img--ios-H5">
- <image :src="imgBase64" mode="widthFix"></image>
- </view>
- <!-- #endif -->
- <text v-if="showText" class="uni-load-more__text"
- :style="{color: color}">{{ status === 'more' ? contentdownText : status === 'loading' ? contentrefreshText : contentnomoreText }}</text>
- </view>
-</template>
-
-<script>
- let platform
- setTimeout(() => {
- platform = uni.getSystemInfoSync().platform
- }, 16)
-
- import {
- initVueI18n
- } from '@dcloudio/uni-i18n'
- import messages from './i18n/index.js'
- const {
- t
- } = initVueI18n(messages)
-
- /**
- * LoadMore 加载更多
- * @description 用于列表中,做滚动加载使用,展示 loading 的各种状态
- * @tutorial https://ext.dcloud.net.cn/plugin?id=29
- * @property {String} status = [more|loading|noMore] loading 的状态
- * @value more loading前
- * @value loading loading中
- * @value noMore 没有更多了
- * @property {Number} iconSize 指定图标大小
- * @property {Boolean} iconSize = [true|false] 是否显示 loading 图标
- * @property {String} iconType = [snow|circle|auto] 指定图标样式
- * @value snow ios雪花加载样式
- * @value circle 安卓唤醒加载样式
- * @value auto 根据平台自动选择加载样式
- * @property {String} color 图标和文字颜色
- * @property {Object} contentText 各状态文字说明,值为:{contentdown: "上拉显示更多",contentrefresh: "正在加载...",contentnomore: "没有更多数据了"}
- * @event {Function} clickLoadMore 点击加载更多时触发
- */
- export default {
- name: 'UniLoadMore',
- emits: ['clickLoadMore'],
- props: {
- status: {
- // 上拉的状态:more-loading前;loading-loading中;noMore-没有更多了
- type: String,
- default: 'more'
- },
- showIcon: {
- type: Boolean,
- default: true
- },
- iconType: {
- type: String,
- default: 'auto'
- },
- iconSize: {
- type: Number,
- default: 24
- },
- color: {
- type: String,
- default: '#777777'
- },
- contentText: {
- type: Object,
- default () {
- return {
- contentdown: '',
- contentrefresh: '',
- contentnomore: ''
- }
- }
- },
- showText: {
- type: Boolean,
- default: true
- }
- },
- data() {
- return {
- webviewHide: false,
- platform: platform,
- imgBase64: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzlBMzU3OTlEOUM0MTFFOUI0NTZDNERBQURBQzI4RkUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzlBMzU3OUFEOUM0MTFFOUI0NTZDNERBQURBQzI4RkUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDOUEzNTc5N0Q5QzQxMUU5QjQ1NkM0REFBREFDMjhGRSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDOUEzNTc5OEQ5QzQxMUU5QjQ1NkM0REFBREFDMjhGRSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pt+ALSwAAA6CSURBVHja1FsLkFZVHb98LM+F5bHL8khA1iSeiyQBCRM+YGqKUnnJTDLGI0BGZlKDIU2MMglUiDApEZvSsZnQtBRJtKwQNKQMFYeRDR10WOLd8ljYXdh+v8v5fR3Od+797t1dnOnO/Ofce77z+J//+b/P+ZqtXbs2sJ9MJhNUV1cHJ06cCJo3bx7EPc2aNcvpy7pWrVoF+/fvDyoqKoI2bdoE9fX1F7TjN8a+EXBn/fkfvw942Tf+wYMHg9mzZwfjxo0LDhw4EPa1x2MbFw/fOGfPng1qa2tzcCkILsLDydq2bRsunpOTMM7TD/W/tZDZhPdeKD+yGxHhdu3aBV27dg3OnDlzMVANMheLAO3btw8KCwuDmpoaX5OxbgUIMEq7K8IcPnw4KCsrC/r37x8cP378/4cAXAB3vqSkJMuiDhTkw+XcuXNhOWbMmKBly5YhUT8xArhyFvP0BfwRsAuwxJZJsm/nzp2DTp06he/OU+cZ64K6o0ePBkOHDg2GDx8e6gEbJ5Q/NHNuAJQ1hgBeHUDlR7nVTkY8rQAvAi4z34vR/mPs1FoRsaCgIJThI0eOBC1atEiFGGV+5MiRoS45efJkqFjJFXV1dQuA012m2WcwTw98fy6CqBdsaiIO4CScrGPHjvk4odhavPquRtFWXEC25VgkREKOCh/qDSq+vn37htzD/mZTOmOc5U7zKzBPEedygWshcDyWvs30igAbU+6oyMgJBCFhwQE0fccxN60Ay9iebbjoDh06hMowjQxT4fXq1SskArmHZpkArvixp/kWzHdMeArExSJEaiXIjjRjRJ4DaAGWpibLzXN3Fm1vA5teBgh3j1Rv3bp1YgKwPdmf2p9zcyNYYgPKMfY0T5f5nNYdw158nJ8QawW4CLKwiOBSEgO/hok2eBydR+3dYH+PLxA5J8Vv0KBBwenTp0P2JWAx6+yFEBfs8lMY+y0SWMBNI9E4ThKi58VKTg3FQZS1RQF1cz27eC0QHMu+3E0SkUowjhVt5VdaWhp07949ZHv2Qd1EjDXM2cla1M0nl3GxAs3J9yREzyTdFVKVFOaE9qRA8GM0WebRuo9JGZKA7Mv2SeS/Z8+eoQ9BArMfFrLGo6jvxbhHbJZnKX2Rzz1O7QhJJ9Cs2ZMaWIyq/zhdeqPNfIoHd58clIQD+JSXl4dKlyIAuBdVXZwFVWKspSSoxE++h8x4k3uCnEhE4I5KwRiFWGOU0QWKiCYLbdoRMRKAu2kQ9vkfLU6dOhX06NEjlH+yMRZSinnuyWnYosVcji8CEA/6Cg2JF+IIUBqnGKUTCNwtwBN4f89RiK1R96DEgO2o0NDmtEdvVFdVVYV+P3UAPUEs6GFwV3PHmXkD4vh74iDFJysVI/MlaQhwKeBNTLYX5VuA8T4/gZxA4MRGFxDB6R7OmYPfyykGRJbyie+XnGYnQIC/coH9+vULiYrxrkL9ZA9+0ykaHIfEpM7ge8TiJ2CsHYwyMfafAF1yCGBHYIbCVDjDjKt7BeB51D+LgQa6OkG7IDYEEtvQ7lnXLKLtLdLuJBpE4gPUXcW2+PkZwOex+4cGDhwYDBkyRL7/HFcEwUGPo/8uWRUpYnfxGHco8HkewLHLyYmAawAPuIFZxhOpDfJQ8gbUv41yORAptMWBNr6oqMhWird5+u+iHmBb2nhjDV7HWBNQTgK8y11l5NetWzc5ULscAtSj7nbNI0skhWeUZCc0W4nyH/jO4Vz0u1IeYhbk4AiwM6tjxIWByHsoZ9qcIBPJd/y+DwPfBESOmCa/QF3WiZHucLlEDpNxcNhmheEOPgdQNx6/VZFQzFZ5TN08AHXQt2Ii3EdyFuUsPtTcGPhW5iMiCNELvz+Gdn9huG4HUJaW/w3g0wxV0XaG7arG2WeKiUWYM4Y7GO5ezshTARbbWGw/DvXkpp/ivVvE0JVoMxN4rpGzJMhE5Pl+xlATsDIqikP9F9D2z3h9nOksEUFhK+qO4rcPkoalMQ/HqJLIyb3F3JdjrCcw1yZ8joyJLR5gCo54etlag7qIoeNh1N1BRYj3DTFJ0elotxPlVzkGuYAmL0VSJVGAJA41c4Z6A3BzTLfn0HYwYKEI6CUAMzZEWvLsIcQOo1AmmyyM72nHJCfYsogflGV6jEk9vyQZXSuq6w4c16NsGcGZbwOPr+H1RkOk2LEzjNepxQkihHSCQ4ynAYNRx2zMKV92CQMWqj8J0BRE8EShxRFN6YrfCRhC0x3r/Zm4IbQCcmJoV0kMamllccR6FjHqUC5F2R/wS2dcymOlfAKOS4KmzQb5cpNC2MC7JhVn5wjXoJ44rYhLh8n0eXOCorJxa7POjbSlCGVczr34/RsAmrcvo9s+wGp3tzVhntxiXiJ4nvEYb4FJkf0O8HocAePmLvCxnL0AORraVekJk6TYjDabRVXfRE2lCN1h6ZQRN1+InUbsCpKwoBZHh0dODN9JBCUffItXxEavTQkUtnfTVAplCWL3JISz29h4NjotnuSsQKJCk8dF+kJR6RARjrqFVmfPnj3ZbK8cIJ0msd6jgHPGtfVTQ8VLmlvh4mct9sobRmPic0DyDQQnx/NlfYUgyz59+oScsH379pAwXABD32nTpoUHIToESeI5mnbE/UqDdyLcafEBf2MCqgC7NwxIbMREJQ0g4D4sfJwnD+AmRrII05cfMWJE+L1169bQr+fip06dGp4oJ83lmYd5wj/EmMa4TaHivo4EeCguYZBnkB5g2aWA69OIEnUHOaGysjIYMGBAMGnSpODYsWPZwCpFmm4lNq+4gSLQA7jcX8DwtjEyRC8wjabnXEx9kfWnTJkSJkAo90xpJVV+FmcVNeYAF5zWngS4C4O91MBxmAv8blLEpbjI5sz9MTdAhcgkCT1RO8mZkAjfiYpTEvStAS53Uw1vAiUGgZ3GpuQEYvoiBqlIan7kSDHnTwJQFNiPu0+5VxCVYhcZIjNrdXUDdp+Eq5AZ3Gkg8QAyVZRZIk4Tl4QAbF9cXJxNYZMAtAokgs4BrNxEpCtteXg7DDTMDKYNSuQdKsnJBek7HxewvxaosWxLYXtw+cJp18217wql4aKCfBNoEu0O5VU+PhctJ0YeXD4C6JQpyrlpSLTojpGGGN5YwNziChdIZLk4lvLcFJ9jMX3QdiImY9bmGQU+TRUL5CHITTRlgF8D9ouD1MfmLoEPl5xokIumZ2cfgMpHt47IW9N64Hsh7wQYYjyIugWuF5fCqYncXRd5vPMWyizzvhi/32+nvG0dZc9vR6fZOu0md5e+uC408FvKSIOZwXlGvxPv95izA2Vtvg1xKFWARI+vMX66HUhpQQb643uW1bSjuTWyw2SBvDrBvjFic1eGGlz5esq3ko9uSIlBRqPuFcCv8F4WIcN12nVaBd0SaYwI6PDDImR11JkqgHcPmQssjxIn6bUshygDFJUTxPMpHk+jfjPgupgdnYV2R/g7xSjtpah8RJBewhwf0gGK6XI92u4wXFEU40afJ4DN4h5LcAd+40HI3JgJecuT0c062W0i2hQJUTcxan3/CMW1PF2K6bbA+Daz4xRs1D3Br1Cm0OihKCqizW78/nXAF/G5TXrEcVzaNMH6CyMswqsAHqDyDLEyou8lwOXnKF8DjI6KjV3KzMBiXkDH8ij/H214J5A596ekrZ3F0zXlWeL7+P5eUrNo3/QwC15uxthuzidy7DzKRwEDaAViiDgKbTbz7CJnzo0bN7pIfIiid8SuPwn25o3QCmpnyjlZkyxPP8EomCJzrGb7GJMx7tNsq4MT2xMUYaiErZOluTzKsnz3gwCeCZyVRZJfYplNEokEjwrPtxlxjeYAk+F1F74VAzPxQRNYYdtpOUvWs8J1sGhBJMNsb7igN8plJs1eSmLIhLKE4rvaCX27gOhLpLOsIzJ7qn/i+wZzcvSOZ23/du8TZjwV8zHIXoP4R3ifBxiFz1dcVpa3aPntPE+c6TmIWE9EtcMmAcPdWAhYhAXxcLOQi9L1WhD1Sc8p1d2oL7XGiRKp8F4A2i8K/nfI+y/gsTDJ/YC/8+AD5Uh04KHiGl+cIFPnBDDrPMjwRGkLXyxO4VGbfQWnDH2v0bVWE3C9QOXlepbgjEfIJQI6XDG3z5ahD9cw2pS78ipB85wyScNTvsVzlzzhL8/jRrnmVjfFJK/m3m4nj9vbgQTguT8XZTjsm672R5uJKEaQmBI/c58gyus8ZDagLpEVSJBIyHp4jn++xqPV71OgQgJYEWOtZ/haxRtKmWOBu8xdBLftWltsY84zE6WIEy/eIOWL+BaayMx+KHtL7EAkqdNDLiEXmEMUHniedtJqg9HmZtfvt26vNi0BdG3Ft3g8ZOf7PAu59TxtzivLNIekyi+wD1i8CuUiD9FXAa8C+/xS3JPmZnomyc7H+fb4/Se0bk41Fel621r4cgVxbq91V4jVqwB7HTe2M7jgB+QWHavZkDRPmZcASoZEmBx6i75bGjPcMdL4/VKGFAGWZkGzPG0XAbdL9A81G5LOmUnC9hHKJeO7dcUMjblSl12867ElFTtaGl20xvvLGPdVz/8TVuU7y0x1PG7vtNg24oz9Uo/Z412++VFWI7Fcog9tu9Lm6gvRmIPv9x1xmQAu6RDkXtbOtlGEmpgD5Nvnyc0dcv0EE6cfdi1HmhMf9wDF3k3gtRvEedhxjpgfqPb9PU9iEJHnyOUA7bQUXh6kq/D7l2iTjWv7XOD530BDr8jIrus+srXjt4MzumJMHuTsBa63YKE1+RR5lBjEikCCnWKWiHdzOgKO+nRIBAF88za/IFmJ3eMZov4CYxGBabcpGL8EYx+SeMXJeRwHNsV/h+vdxeuhEpN3ZyNY78Gm2fknJxVGhyjixPiQvVkNzT1elD9Py/aTAL64Hb9vcYmC9zfdXdT/C1LeGbg4rnBaAihDFJH12W5ulfNCNe/xTsP3bp8ikzJs5BF+5PNfAQYAPaseTdsEcaYAAAAASUVORK5CYII='
- }
- },
- computed: {
- iconSnowWidth() {
- return (Math.floor(this.iconSize / 24) || 1) * 2
- },
- contentdownText() {
- return this.contentText.contentdown || t("uni-load-more.contentdown")
- },
- contentrefreshText() {
- return this.contentText.contentrefresh || t("uni-load-more.contentrefresh")
- },
- contentnomoreText() {
- return this.contentText.contentnomore || t("uni-load-more.contentnomore")
- }
- },
- mounted() {
- // #ifdef APP-PLUS
- var pages = getCurrentPages();
- var page = pages[pages.length - 1];
- var currentWebview = page.$getAppWebview();
- currentWebview.addEventListener('hide', () => {
- this.webviewHide = true
- })
- currentWebview.addEventListener('show', () => {
- this.webviewHide = false
- })
- // #endif
- },
- methods: {
- onClick() {
- this.$emit('clickLoadMore', {
- detail: {
- status: this.status,
- }
- })
- }
- }
- }
-</script>
-
-<style lang="scss" >
- .uni-load-more {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- height: 40px;
- align-items: center;
- justify-content: center;
- }
-
- .uni-load-more__text {
- font-size: 14px;
- margin-left: 8px;
- }
-
- .uni-load-more__img {
- width: 24px;
- height: 24px;
- // margin-right: 8px;
- }
-
- .uni-load-more__img--nvue {
- color: #666666;
- }
-
- .uni-load-more__img--android,
- .uni-load-more__img--ios {
- width: 24px;
- height: 24px;
- transform: rotate(0deg);
- }
-
- /* #ifndef APP-NVUE */
- .uni-load-more__img--android {
- animation: loading-ios 1s 0s linear infinite;
- }
-
- @keyframes loading-android {
- 0% {
- transform: rotate(0deg);
- }
-
- 100% {
- transform: rotate(360deg);
- }
- }
-
- .uni-load-more__img--ios-H5 {
- position: relative;
- animation: loading-ios-H5 1s 0s step-end infinite;
- }
-
- .uni-load-more__img--ios-H5 image {
- position: absolute;
- width: 100%;
- height: 100%;
- left: 0;
- top: 0;
- }
-
- @keyframes loading-ios-H5 {
- 0% {
- transform: rotate(0deg);
- }
-
- 8% {
- transform: rotate(30deg);
- }
-
- 16% {
- transform: rotate(60deg);
- }
-
- 24% {
- transform: rotate(90deg);
- }
-
- 32% {
- transform: rotate(120deg);
- }
-
- 40% {
- transform: rotate(150deg);
- }
-
- 48% {
- transform: rotate(180deg);
- }
-
- 56% {
- transform: rotate(210deg);
- }
-
- 64% {
- transform: rotate(240deg);
- }
-
- 73% {
- transform: rotate(270deg);
- }
-
- 82% {
- transform: rotate(300deg);
- }
-
- 91% {
- transform: rotate(330deg);
- }
-
- 100% {
- transform: rotate(360deg);
- }
- }
-
- /* #endif */
-
- /* #ifdef H5 */
- .uni-load-more__img--android-H5 {
- animation: loading-android-H5-rotate 2s linear infinite;
- transform-origin: center center;
- }
-
- .uni-load-more__img--android-H5 circle {
- display: inline-block;
- animation: loading-android-H5-dash 1.5s ease-in-out infinite;
- stroke: currentColor;
- stroke-linecap: round;
- }
-
- @keyframes loading-android-H5-rotate {
- 0% {
- transform: rotate(0deg);
- }
-
- 100% {
- transform: rotate(360deg);
- }
- }
-
- @keyframes loading-android-H5-dash {
- 0% {
- stroke-dasharray: 1, 200;
- stroke-dashoffset: 0;
- }
-
- 50% {
- stroke-dasharray: 90, 150;
- stroke-dashoffset: -40;
- }
-
- 100% {
- stroke-dasharray: 90, 150;
- stroke-dashoffset: -120;
- }
- }
-
- /* #endif */
-
- /* #ifndef APP-NVUE || H5 */
- .uni-load-more__img--android-MP {
- position: relative;
- width: 24px;
- height: 24px;
- transform: rotate(0deg);
- animation: loading-ios 1s 0s ease infinite;
- }
-
- .uni-load-more__img--android-MP .uni-load-more__img-icon {
- position: absolute;
- box-sizing: border-box;
- width: 100%;
- height: 100%;
- border-radius: 50%;
- border: solid 2px transparent;
- border-top: solid 2px #777777;
- transform-origin: center;
- }
-
- .uni-load-more__img--android-MP .uni-load-more__img-icon:nth-child(1) {
- animation: loading-android-MP-1 1s 0s linear infinite;
- }
-
- .uni-load-more__img--android-MP .uni-load-more__img-icon:nth-child(2) {
- animation: loading-android-MP-2 1s 0s linear infinite;
- }
-
- .uni-load-more__img--android-MP .uni-load-more__img-icon:nth-child(3) {
- animation: loading-android-MP-3 1s 0s linear infinite;
- }
-
- @keyframes loading-android {
- 0% {
- transform: rotate(0deg);
- }
-
- 100% {
- transform: rotate(360deg);
- }
- }
-
- @keyframes loading-android-MP-1 {
- 0% {
- transform: rotate(0deg);
- }
-
- 50% {
- transform: rotate(90deg);
- }
-
- 100% {
- transform: rotate(360deg);
- }
- }
-
- @keyframes loading-android-MP-2 {
- 0% {
- transform: rotate(0deg);
- }
-
- 50% {
- transform: rotate(180deg);
- }
-
- 100% {
- transform: rotate(360deg);
- }
- }
-
- @keyframes loading-android-MP-3 {
- 0% {
- transform: rotate(0deg);
- }
-
- 50% {
- transform: rotate(270deg);
- }
-
- 100% {
- transform: rotate(360deg);
- }
- }
-
- /* #endif */
-</style>
diff --git a/subPackage/dbSafety/components/uni-components/uni-load-more/package.json b/subPackage/dbSafety/components/uni-components/uni-load-more/package.json
deleted file mode 100644
index 2fa6f04..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-load-more/package.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "id": "uni-load-more",
- "displayName": "uni-load-more 加载更多",
- "version": "1.3.3",
- "description": "LoadMore 组件,常用在列表里面,做滚动加载使用。",
- "keywords": [
- "uni-ui",
- "uniui",
- "加载更多",
- "load-more"
-],
- "repository": "https://github.com/dcloudio/uni-ui",
- "engines": {
- "HBuilderX": ""
- },
- "directories": {
- "example": "../../temps/example_temps"
- },
- "dcloudext": {
- "category": [
- "前端组件",
- "通用组件"
- ],
- "sale": {
- "regular": {
- "price": "0.00"
- },
- "sourcecode": {
- "price": "0.00"
- }
- },
- "contact": {
- "qq": ""
- },
- "declaration": {
- "ads": "无",
- "data": "无",
- "permissions": "无"
- },
- "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
- },
- "uni_modules": {
- "dependencies": ["uni-scss"],
- "encrypt": [],
- "platforms": {
- "cloud": {
- "tcb": "y",
- "aliyun": "y"
- },
- "client": {
- "App": {
- "app-vue": "y",
- "app-nvue": "y"
- },
- "H5-mobile": {
- "Safari": "y",
- "Android Browser": "y",
- "微信浏览器(Android)": "y",
- "QQ浏览器(Android)": "y"
- },
- "H5-pc": {
- "Chrome": "y",
- "IE": "y",
- "Edge": "y",
- "Firefox": "y",
- "Safari": "y"
- },
- "小程序": {
- "微信": "y",
- "阿里": "y",
- "百度": "y",
- "字节跳动": "y",
- "QQ": "y"
- },
- "快应用": {
- "华为": "u",
- "联盟": "u"
- },
- "Vue": {
- "vue2": "y",
- "vue3": "y"
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/subPackage/dbSafety/components/uni-components/uni-load-more/readme.md b/subPackage/dbSafety/components/uni-components/uni-load-more/readme.md
deleted file mode 100644
index 54dc1fa..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-load-more/readme.md
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-### LoadMore 加载更多
-> **组件名:uni-load-more**
-> 代码块: `uLoadMore`
-
-
-用于列表中,做滚动加载使用,展示 loading 的各种状态。
-
-
-### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-load-more)
-#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
-
-
diff --git a/subPackage/dbSafety/components/uni-components/uni-scss/changelog.md b/subPackage/dbSafety/components/uni-components/uni-scss/changelog.md
deleted file mode 100644
index b863bb0..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-scss/changelog.md
+++ /dev/null
@@ -1,8 +0,0 @@
-## 1.0.3(2022-01-21)
-- 优化 组件示例
-## 1.0.2(2021-11-22)
-- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题
-## 1.0.1(2021-11-22)
-- 修复 vue3中scss语法兼容问题
-## 1.0.0(2021-11-18)
-- init
diff --git a/subPackage/dbSafety/components/uni-components/uni-scss/index.scss b/subPackage/dbSafety/components/uni-components/uni-scss/index.scss
deleted file mode 100644
index 1744a5f..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-scss/index.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import './styles/index.scss';
diff --git a/subPackage/dbSafety/components/uni-components/uni-scss/package.json b/subPackage/dbSafety/components/uni-components/uni-scss/package.json
deleted file mode 100644
index 7cc0ccb..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-scss/package.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
- "id": "uni-scss",
- "displayName": "uni-scss 辅助样式",
- "version": "1.0.3",
- "description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。",
- "keywords": [
- "uni-scss",
- "uni-ui",
- "辅助样式"
-],
- "repository": "https://github.com/dcloudio/uni-ui",
- "engines": {
- "HBuilderX": "^3.1.0"
- },
- "dcloudext": {
- "category": [
- "JS SDK",
- "通用 SDK"
- ],
- "sale": {
- "regular": {
- "price": "0.00"
- },
- "sourcecode": {
- "price": "0.00"
- }
- },
- "contact": {
- "qq": ""
- },
- "declaration": {
- "ads": "无",
- "data": "无",
- "permissions": "无"
- },
- "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
- },
- "uni_modules": {
- "dependencies": [],
- "encrypt": [],
- "platforms": {
- "cloud": {
- "tcb": "y",
- "aliyun": "y"
- },
- "client": {
- "App": {
- "app-vue": "y",
- "app-nvue": "u"
- },
- "H5-mobile": {
- "Safari": "y",
- "Android Browser": "y",
- "微信浏览器(Android)": "y",
- "QQ浏览器(Android)": "y"
- },
- "H5-pc": {
- "Chrome": "y",
- "IE": "y",
- "Edge": "y",
- "Firefox": "y",
- "Safari": "y"
- },
- "小程序": {
- "微信": "y",
- "阿里": "y",
- "百度": "y",
- "字节跳动": "y",
- "QQ": "y"
- },
- "快应用": {
- "华为": "n",
- "联盟": "n"
- },
- "Vue": {
- "vue2": "y",
- "vue3": "y"
- }
- }
- }
- }
-}
diff --git a/subPackage/dbSafety/components/uni-components/uni-scss/readme.md b/subPackage/dbSafety/components/uni-components/uni-scss/readme.md
deleted file mode 100644
index b7d1c25..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-scss/readme.md
+++ /dev/null
@@ -1,4 +0,0 @@
-`uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。
-
-### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass)
-#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
diff --git a/subPackage/dbSafety/components/uni-components/uni-scss/styles/index.scss b/subPackage/dbSafety/components/uni-components/uni-scss/styles/index.scss
deleted file mode 100644
index ffac4fe..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-scss/styles/index.scss
+++ /dev/null
@@ -1,7 +0,0 @@
-@import './setting/_variables.scss';
-@import './setting/_border.scss';
-@import './setting/_color.scss';
-@import './setting/_space.scss';
-@import './setting/_radius.scss';
-@import './setting/_text.scss';
-@import './setting/_styles.scss';
diff --git a/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_border.scss b/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_border.scss
deleted file mode 100644
index 12a11c3..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_border.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-.uni-border {
- border: 1px $uni-border-1 solid;
-}
\ No newline at end of file
diff --git a/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_color.scss b/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_color.scss
deleted file mode 100644
index 1ededd9..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_color.scss
+++ /dev/null
@@ -1,66 +0,0 @@
-
-// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐
-// @mixin get-styles($k,$c) {
-// @if $k == size or $k == weight{
-// font-#{$k}:#{$c}
-// }@else{
-// #{$k}:#{$c}
-// }
-// }
-$uni-ui-color:(
- // 主色
- primary: $uni-primary,
- primary-disable: $uni-primary-disable,
- primary-light: $uni-primary-light,
- // 辅助色
- success: $uni-success,
- success-disable: $uni-success-disable,
- success-light: $uni-success-light,
- warning: $uni-warning,
- warning-disable: $uni-warning-disable,
- warning-light: $uni-warning-light,
- error: $uni-error,
- error-disable: $uni-error-disable,
- error-light: $uni-error-light,
- info: $uni-info,
- info-disable: $uni-info-disable,
- info-light: $uni-info-light,
- // 中性色
- main-color: $uni-main-color,
- base-color: $uni-base-color,
- secondary-color: $uni-secondary-color,
- extra-color: $uni-extra-color,
- // 背景色
- bg-color: $uni-bg-color,
- // 边框颜色
- border-1: $uni-border-1,
- border-2: $uni-border-2,
- border-3: $uni-border-3,
- border-4: $uni-border-4,
- // 黑色
- black:$uni-black,
- // 白色
- white:$uni-white,
- // 透明
- transparent:$uni-transparent
-) !default;
-@each $key, $child in $uni-ui-color {
- .uni-#{"" + $key} {
- color: $child;
- }
- .uni-#{"" + $key}-bg {
- background-color: $child;
- }
-}
-.uni-shadow-sm {
- box-shadow: $uni-shadow-sm;
-}
-.uni-shadow-base {
- box-shadow: $uni-shadow-base;
-}
-.uni-shadow-lg {
- box-shadow: $uni-shadow-lg;
-}
-.uni-mask {
- background-color:$uni-mask;
-}
diff --git a/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_radius.scss b/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_radius.scss
deleted file mode 100644
index 9a0428b..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_radius.scss
+++ /dev/null
@@ -1,55 +0,0 @@
-@mixin radius($r,$d:null ,$important: false){
- $radius-value:map-get($uni-radius, $r) if($important, !important, null);
- // Key exists within the $uni-radius variable
- @if (map-has-key($uni-radius, $r) and $d){
- @if $d == t {
- border-top-left-radius:$radius-value;
- border-top-right-radius:$radius-value;
- }@else if $d == r {
- border-top-right-radius:$radius-value;
- border-bottom-right-radius:$radius-value;
- }@else if $d == b {
- border-bottom-left-radius:$radius-value;
- border-bottom-right-radius:$radius-value;
- }@else if $d == l {
- border-top-left-radius:$radius-value;
- border-bottom-left-radius:$radius-value;
- }@else if $d == tl {
- border-top-left-radius:$radius-value;
- }@else if $d == tr {
- border-top-right-radius:$radius-value;
- }@else if $d == br {
- border-bottom-right-radius:$radius-value;
- }@else if $d == bl {
- border-bottom-left-radius:$radius-value;
- }
- }@else{
- border-radius:$radius-value;
- }
-}
-
-@each $key, $child in $uni-radius {
- @if($key){
- .uni-radius-#{"" + $key} {
- @include radius($key)
- }
- }@else{
- .uni-radius {
- @include radius($key)
- }
- }
-}
-
-@each $direction in t, r, b, l,tl, tr, br, bl {
- @each $key, $child in $uni-radius {
- @if($key){
- .uni-radius-#{"" + $direction}-#{"" + $key} {
- @include radius($key,$direction,false)
- }
- }@else{
- .uni-radius-#{$direction} {
- @include radius($key,$direction,false)
- }
- }
- }
-}
diff --git a/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_space.scss b/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_space.scss
deleted file mode 100644
index 3c89528..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_space.scss
+++ /dev/null
@@ -1,56 +0,0 @@
-
-@mixin fn($space,$direction,$size,$n) {
- @if $n {
- #{$space}-#{$direction}: #{$size*$uni-space-root}px
- } @else {
- #{$space}-#{$direction}: #{-$size*$uni-space-root}px
- }
-}
-@mixin get-styles($direction,$i,$space,$n){
- @if $direction == t {
- @include fn($space, top,$i,$n);
- }
- @if $direction == r {
- @include fn($space, right,$i,$n);
- }
- @if $direction == b {
- @include fn($space, bottom,$i,$n);
- }
- @if $direction == l {
- @include fn($space, left,$i,$n);
- }
- @if $direction == x {
- @include fn($space, left,$i,$n);
- @include fn($space, right,$i,$n);
- }
- @if $direction == y {
- @include fn($space, top,$i,$n);
- @include fn($space, bottom,$i,$n);
- }
- @if $direction == a {
- @if $n {
- #{$space}:#{$i*$uni-space-root}px;
- } @else {
- #{$space}:#{-$i*$uni-space-root}px;
- }
- }
-}
-
-@each $orientation in m,p {
- $space: margin;
- @if $orientation == m {
- $space: margin;
- } @else {
- $space: padding;
- }
- @for $i from 0 through 16 {
- @each $direction in t, r, b, l, x, y, a {
- .uni-#{$orientation}#{$direction}-#{$i} {
- @include get-styles($direction,$i,$space,true);
- }
- .uni-#{$orientation}#{$direction}-n#{$i} {
- @include get-styles($direction,$i,$space,false);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_styles.scss b/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_styles.scss
deleted file mode 100644
index 689afec..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_styles.scss
+++ /dev/null
@@ -1,167 +0,0 @@
-/* #ifndef APP-NVUE */
-
-$-color-white:#fff;
-$-color-black:#000;
-@mixin base-style($color) {
- color: #fff;
- background-color: $color;
- border-color: mix($-color-black, $color, 8%);
- &:not([hover-class]):active {
- background: mix($-color-black, $color, 10%);
- border-color: mix($-color-black, $color, 20%);
- color: $-color-white;
- outline: none;
- }
-}
-@mixin is-color($color) {
- @include base-style($color);
- &[loading] {
- @include base-style($color);
- &::before {
- margin-right:5px;
- }
- }
- &[disabled] {
- &,
- &[loading],
- &:not([hover-class]):active {
- color: $-color-white;
- border-color: mix(darken($color,10%), $-color-white);
- background-color: mix($color, $-color-white);
- }
- }
-
-}
-@mixin base-plain-style($color) {
- color:$color;
- background-color: mix($-color-white, $color, 90%);
- border-color: mix($-color-white, $color, 70%);
- &:not([hover-class]):active {
- background: mix($-color-white, $color, 80%);
- color: $color;
- outline: none;
- border-color: mix($-color-white, $color, 50%);
- }
-}
-@mixin is-plain($color){
- &[plain] {
- @include base-plain-style($color);
- &[loading] {
- @include base-plain-style($color);
- &::before {
- margin-right:5px;
- }
- }
- &[disabled] {
- &,
- &:active {
- color: mix($-color-white, $color, 40%);
- background-color: mix($-color-white, $color, 90%);
- border-color: mix($-color-white, $color, 80%);
- }
- }
- }
-}
-
-
-.uni-btn {
- margin: 5px;
- color: #393939;
- border:1px solid #ccc;
- font-size: 16px;
- font-weight: 200;
- background-color: #F9F9F9;
- // TODO 暂时处理边框隐藏一边的问题
- overflow: visible;
- &::after{
- border: none;
- }
-
- &:not([type]),&[type=default] {
- color: #999;
- &[loading] {
- background: none;
- &::before {
- margin-right:5px;
- }
- }
-
-
-
- &[disabled]{
- color: mix($-color-white, #999, 60%);
- &,
- &[loading],
- &:active {
- color: mix($-color-white, #999, 60%);
- background-color: mix($-color-white,$-color-black , 98%);
- border-color: mix($-color-white, #999, 85%);
- }
- }
-
- &[plain] {
- color: #999;
- background: none;
- border-color: $uni-border-1;
- &:not([hover-class]):active {
- background: none;
- color: mix($-color-white, $-color-black, 80%);
- border-color: mix($-color-white, $-color-black, 90%);
- outline: none;
- }
- &[disabled]{
- &,
- &[loading],
- &:active {
- background: none;
- color: mix($-color-white, #999, 60%);
- border-color: mix($-color-white, #999, 85%);
- }
- }
- }
- }
-
- &:not([hover-class]):active {
- color: mix($-color-white, $-color-black, 50%);
- }
-
- &[size=mini] {
- font-size: 16px;
- font-weight: 200;
- border-radius: 8px;
- }
-
-
-
- &.uni-btn-small {
- font-size: 14px;
- }
- &.uni-btn-mini {
- font-size: 12px;
- }
-
- &.uni-btn-radius {
- border-radius: 999px;
- }
- &[type=primary] {
- @include is-color($uni-primary);
- @include is-plain($uni-primary)
- }
- &[type=success] {
- @include is-color($uni-success);
- @include is-plain($uni-success)
- }
- &[type=error] {
- @include is-color($uni-error);
- @include is-plain($uni-error)
- }
- &[type=warning] {
- @include is-color($uni-warning);
- @include is-plain($uni-warning)
- }
- &[type=info] {
- @include is-color($uni-info);
- @include is-plain($uni-info)
- }
-}
-/* #endif */
diff --git a/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_text.scss b/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_text.scss
deleted file mode 100644
index a34d08f..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_text.scss
+++ /dev/null
@@ -1,24 +0,0 @@
-@mixin get-styles($k,$c) {
- @if $k == size or $k == weight{
- font-#{$k}:#{$c}
- }@else{
- #{$k}:#{$c}
- }
-}
-
-@each $key, $child in $uni-headings {
- /* #ifndef APP-NVUE */
- .uni-#{$key} {
- @each $k, $c in $child {
- @include get-styles($k,$c)
- }
- }
- /* #endif */
- /* #ifdef APP-NVUE */
- .container .uni-#{$key} {
- @each $k, $c in $child {
- @include get-styles($k,$c)
- }
- }
- /* #endif */
-}
diff --git a/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_variables.scss b/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_variables.scss
deleted file mode 100644
index 557d3d7..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-scss/styles/setting/_variables.scss
+++ /dev/null
@@ -1,146 +0,0 @@
-// @use "sass:math";
-@import '../tools/functions.scss';
-// 间距基础倍数
-$uni-space-root: 2 !default;
-// 边框半径默认值
-$uni-radius-root:5px !default;
-$uni-radius: () !default;
-// 边框半径断点
-$uni-radius: map-deep-merge(
- (
- 0: 0,
- // TODO 当前版本暂时不支持 sm 属性
- // 'sm': math.div($uni-radius-root, 2),
- null: $uni-radius-root,
- 'lg': $uni-radius-root * 2,
- 'xl': $uni-radius-root * 6,
- 'pill': 9999px,
- 'circle': 50%
- ),
- $uni-radius
-);
-// 字体家族
-$body-font-family: 'Roboto', sans-serif !default;
-// 文本
-$heading-font-family: $body-font-family !default;
-$uni-headings: () !default;
-$letterSpacing: -0.01562em;
-$uni-headings: map-deep-merge(
- (
- 'h1': (
- size: 32px,
- weight: 300,
- line-height: 50px,
- // letter-spacing:-0.01562em
- ),
- 'h2': (
- size: 28px,
- weight: 300,
- line-height: 40px,
- // letter-spacing: -0.00833em
- ),
- 'h3': (
- size: 24px,
- weight: 400,
- line-height: 32px,
- // letter-spacing: normal
- ),
- 'h4': (
- size: 20px,
- weight: 400,
- line-height: 30px,
- // letter-spacing: 0.00735em
- ),
- 'h5': (
- size: 16px,
- weight: 400,
- line-height: 24px,
- // letter-spacing: normal
- ),
- 'h6': (
- size: 14px,
- weight: 500,
- line-height: 18px,
- // letter-spacing: 0.0125em
- ),
- 'subtitle': (
- size: 12px,
- weight: 400,
- line-height: 20px,
- // letter-spacing: 0.00937em
- ),
- 'body': (
- font-size: 14px,
- font-weight: 400,
- line-height: 22px,
- // letter-spacing: 0.03125em
- ),
- 'caption': (
- 'size': 12px,
- 'weight': 400,
- 'line-height': 20px,
- // 'letter-spacing': 0.03333em,
- // 'text-transform': false
- )
- ),
- $uni-headings
-);
-
-
-
-// 主色
-$uni-primary: #2979ff !default;
-$uni-primary-disable:lighten($uni-primary,20%) !default;
-$uni-primary-light: lighten($uni-primary,25%) !default;
-
-// 辅助色
-// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
-$uni-success: #18bc37 !default;
-$uni-success-disable:lighten($uni-success,20%) !default;
-$uni-success-light: lighten($uni-success,25%) !default;
-
-$uni-warning: #f3a73f !default;
-$uni-warning-disable:lighten($uni-warning,20%) !default;
-$uni-warning-light: lighten($uni-warning,25%) !default;
-
-$uni-error: #e43d33 !default;
-$uni-error-disable:lighten($uni-error,20%) !default;
-$uni-error-light: lighten($uni-error,25%) !default;
-
-$uni-info: #8f939c !default;
-$uni-info-disable:lighten($uni-info,20%) !default;
-$uni-info-light: lighten($uni-info,25%) !default;
-
-// 中性色
-// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
-$uni-main-color: #3a3a3a !default; // 主要文字
-$uni-base-color: #6a6a6a !default; // 常规文字
-$uni-secondary-color: #909399 !default; // 次要文字
-$uni-extra-color: #c7c7c7 !default; // 辅助说明
-
-// 边框颜色
-$uni-border-1: #F0F0F0 !default;
-$uni-border-2: #EDEDED !default;
-$uni-border-3: #DCDCDC !default;
-$uni-border-4: #B9B9B9 !default;
-
-// 常规色
-$uni-black: #000000 !default;
-$uni-white: #ffffff !default;
-$uni-transparent: rgba($color: #000000, $alpha: 0) !default;
-
-// 背景色
-$uni-bg-color: #f7f7f7 !default;
-
-/* 水平间距 */
-$uni-spacing-sm: 8px !default;
-$uni-spacing-base: 15px !default;
-$uni-spacing-lg: 30px !default;
-
-// 阴影
-$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default;
-$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default;
-$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default;
-
-// 蒙版
-$uni-mask: rgba($color: #000000, $alpha: 0.4) !default;
diff --git a/subPackage/dbSafety/components/uni-components/uni-scss/styles/tools/functions.scss b/subPackage/dbSafety/components/uni-components/uni-scss/styles/tools/functions.scss
deleted file mode 100644
index ac6f63e..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-scss/styles/tools/functions.scss
+++ /dev/null
@@ -1,19 +0,0 @@
-// 合并 map
-@function map-deep-merge($parent-map, $child-map){
- $result: $parent-map;
- @each $key, $child in $child-map {
- $parent-has-key: map-has-key($result, $key);
- $parent-value: map-get($result, $key);
- $parent-type: type-of($parent-value);
- $child-type: type-of($child);
- $parent-is-map: $parent-type == map;
- $child-is-map: $child-type == map;
-
- @if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){
- $result: map-merge($result, ( $key: $child ));
- }@else {
- $result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) ));
- }
- }
- @return $result;
-};
diff --git a/subPackage/dbSafety/components/uni-components/uni-scss/theme.scss b/subPackage/dbSafety/components/uni-components/uni-scss/theme.scss
deleted file mode 100644
index 80ee62f..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-scss/theme.scss
+++ /dev/null
@@ -1,31 +0,0 @@
-// 间距基础倍数
-$uni-space-root: 2;
-// 边框半径默认值
-$uni-radius-root:5px;
-// 主色
-$uni-primary: #2979ff;
-// 辅助色
-$uni-success: #4cd964;
-// 警告色
-$uni-warning: #f0ad4e;
-// 错误色
-$uni-error: #dd524d;
-// 描述色
-$uni-info: #909399;
-// 中性色
-$uni-main-color: #303133;
-$uni-base-color: #606266;
-$uni-secondary-color: #909399;
-$uni-extra-color: #C0C4CC;
-// 背景色
-$uni-bg-color: #f5f5f5;
-// 边框颜色
-$uni-border-1: #DCDFE6;
-$uni-border-2: #E4E7ED;
-$uni-border-3: #EBEEF5;
-$uni-border-4: #F2F6FC;
-
-// 常规色
-$uni-black: #000000;
-$uni-white: #ffffff;
-$uni-transparent: rgba($color: #000000, $alpha: 0);
diff --git a/subPackage/dbSafety/components/uni-components/uni-scss/variables.scss b/subPackage/dbSafety/components/uni-components/uni-scss/variables.scss
deleted file mode 100644
index 1c062d4..0000000
--- a/subPackage/dbSafety/components/uni-components/uni-scss/variables.scss
+++ /dev/null
@@ -1,62 +0,0 @@
-@import './styles/setting/_variables.scss';
-// 间距基础倍数
-$uni-space-root: 2;
-// 边框半径默认值
-$uni-radius-root:5px;
-
-// 主色
-$uni-primary: #2979ff;
-$uni-primary-disable:mix(#fff,$uni-primary,50%);
-$uni-primary-light: mix(#fff,$uni-primary,80%);
-
-// 辅助色
-// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
-$uni-success: #18bc37;
-$uni-success-disable:mix(#fff,$uni-success,50%);
-$uni-success-light: mix(#fff,$uni-success,80%);
-
-$uni-warning: #f3a73f;
-$uni-warning-disable:mix(#fff,$uni-warning,50%);
-$uni-warning-light: mix(#fff,$uni-warning,80%);
-
-$uni-error: #e43d33;
-$uni-error-disable:mix(#fff,$uni-error,50%);
-$uni-error-light: mix(#fff,$uni-error,80%);
-
-$uni-info: #8f939c;
-$uni-info-disable:mix(#fff,$uni-info,50%);
-$uni-info-light: mix(#fff,$uni-info,80%);
-
-// 中性色
-// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
-$uni-main-color: #3a3a3a; // 主要文字
-$uni-base-color: #6a6a6a; // 常规文字
-$uni-secondary-color: #909399; // 次要文字
-$uni-extra-color: #c7c7c7; // 辅助说明
-
-// 边框颜色
-$uni-border-1: #F0F0F0;
-$uni-border-2: #EDEDED;
-$uni-border-3: #DCDCDC;
-$uni-border-4: #B9B9B9;
-
-// 常规色
-$uni-black: #000000;
-$uni-white: #ffffff;
-$uni-transparent: rgba($color: #000000, $alpha: 0);
-
-// 背景色
-$uni-bg-color: #f7f7f7;
-
-/* 水平间距 */
-$uni-spacing-sm: 8px;
-$uni-spacing-base: 15px;
-$uni-spacing-lg: 30px;
-
-// 阴影
-$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5);
-$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2);
-$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5);
-
-// 蒙版
-$uni-mask: rgba($color: #000000, $alpha: 0.4);
diff --git a/subPackage/dbSafety/components/wy.vue b/subPackage/dbSafety/components/wy.vue
deleted file mode 100644
index 0426d2b..0000000
--- a/subPackage/dbSafety/components/wy.vue
+++ /dev/null
@@ -1,352 +0,0 @@
-<template>
- <view>
- <!-- <view class="place"></view> -->
- <view class="main">
- <view class="itme-box">
- <view class="h-table">
- <view class="h-tr h-tr-7 h-thead ">
- <view class="h-td column-0">序号</view>
- <view class="h-td column-1">水库</view>
- <view class="h-td column-2">测点</view>
- <view class="h-td column-3">时间</view>
- <view class="h-td column-4">上下游方向(mm)</view>
- <view class="h-td column-5">左右岸方向(mm)</view>
- <view class="h-td column-6">垂直位移(mm)</view>
- </view>
- <scroll-view scroll-y style="height: 74vh;width: 100%;" @scrolltolower="scrolltolower">
- <view class="h-tr h-tr-7" v-for="(item,index) in tableList" :key="index">
- <view class="h_box h-tr h-tr-7">
- <view class="h-td column-0">{{index+1}}</view>
- <view class="h-td column-1 name ">
- <view @click.stop="goReservoirDetail(item)"> {{item.res_nm}}</view>
- </view>
- <view class="h-td column-2">{{item.cd}}</view>
- <view class="h-td column-3">{{item.tm}}</view>
- <view class="h-td column-4">{{item.de}}</view>
- <view class="h-td column-5">{{item.dn}}</view>
- <view class="h-td column-6">{{item.du}}</view>
- </view>
- </view>
- </scroll-view>
- </view>
- </view>
- <u-loading-icon text="加载中" textSize="18" :show="showLoading"></u-loading-icon>
- </view>
- <u-loading-page :loading="pageLoading"></u-loading-page>
- </view>
-</template>
-
-<script>
- import {
- dateFormat
- } from "@/utils/date"
- import {
- getWyList
- } from "@/api/dataCenter/dbSafety/dbSafety"
- export default {
- props: {
- res_nm: {
- type: String,
- default: "",
- },
- },
- data() {
- return {
- noticeText: "总测站数95个,超堰顶测站95个",
- searchForm: {},
- tableList: [],
- isShow: false,
- region: {},
- pages: {
- pageNo: 1,
- pageSize: 25
- },
- showLoading: false,
- pageLoading: false,
- }
- },
- mounted() {
- this.getWyListData()
- },
- options: {
- styleIsolation: 'shared'
- },
- methods: {
- showCity() {
- this.isShow = !this.isShow
- },
- getWyListData() {
- let regionData = uni.getStorageSync("adCodeBase")
- if (!regionData) return
- let params = {
- pageSize: this.pages.pageSize,
- pageNo: this.pages.pageNo,
- res_nm: this.res_nm
- }
- if (!this.region.label && !this.region.value) {
- if (regionData.adGrad == 1) {
- params.province_cd = regionData.adCode
- } else if (regionData.adGrad == 2) {
- params.city_cd = regionData.adCode
- } else if (regionData.adGrad == 3) {
- params.county_cd = regionData.adCode
- }
- params.bas_guid = this.region.name
- } else {
- params[this.region.label] = this.region.value
- //husq 写的
- params.bas_guid = this.region.name
-
- }
- this.getWyList(params)
-
-
- },
-
- // 位移列表
- getWyList(params) {
- this.pageLoading = true
- getWyList(params).then(res => {
- this.tableList = res.data.data
- this.tableList.forEach(e => {
- let tm = new Date(e.tm)
- let formatter = dateFormat(tm, 'MM-dd hh:mm')
- e.tm = formatter
- })
- this.pageLoading = false
- uni.stopPullDownRefresh()
- })
- },
- //上拉加载
- scrolltolower() {
- this.showLoading = true
- this.pages.pageNo += 1
- let params = {
- pageSize: this.pages.pageSize,
- pageNo: this.pages.pageNo,
- res_nm: this.res_nm
- }
- params[this.region.label] = this.region.value
- getWyList(params).then(res => {
- let data = res.resultList
- data.forEach(e => {
- let tm = new Date(e.tm)
- let formatter = dateFormat(tm, 'MM-dd hh:mm')
- e.tm = formatter
- })
- this.tableList = this.tableList.concat(data)
- this.showLoading = false
- })
- },
-
- // 搜索
- search() {
- this.pages.pageNo = 1
- this.getWyListData()
- },
-
- /**
- * 跳转到水库详情页
- * @param {Object} item 当前行数据
- */
- goReservoirDetail(item) {
- let data = {
- id: item.res_cd,
- name: item.res_nm
- }
- let dataStr = JSON.stringify(data)
- let url = "/subPackage/realtimeMonitor/reservoir/detail?item=" + dataStr
- this.$u.func.globalNavigator(url, "navTo")
- },
- }
- }
-</script>
-
-<style scoped lang="scss">
- /* 引入表格样式表 */
- @import "@/subPackage/rainWaterCondition/static/style/helang-table.scss";
-
- ::v-deep .u-notice__content__text[data-v-4661e472] {
- animation-play-state: paused !important;
- padding: 0 !important;
- }
-
- ::v-deep .h-table .h-tr {
- flex-wrap: wrap;
- }
-
- .head {
- position: fixed;
- z-index: 5;
- background-color: #ffffff;
- margin-top: 15rpx;
- width: 100%;
- box-sizing: border-box;
-
- .query {
- display: flex;
- flex-direction: column;
- align-items: center;
-
- .query-form {
- ::v-deep .u-input__content__field-wrapper__field {
- width: 214rpx;
- height: 18rpx;
- font-size: 24rpx !important;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- }
-
- .item {
- display: flex;
- align-items: center;
- margin-bottom: 10rpx;
-
- .label {
- width: 120rpx;
- height: 24rpx;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- line-height: 28rpx;
- }
-
- .value {
- ::v-deep .u-input {
- width: 578rpx;
- height: 58rpx;
- background: #FFFFFF;
- border: 2rpx solid #BBBBBB;
- border-radius: 10rpx;
- }
- }
-
- }
- }
-
- .query-button {
- margin: 10rpx;
- width: 524rpx;
- height: 60rpx;
- background: linear-gradient(90deg, #51A4FA 0%, #5B70F7 100%);
- border-radius: 10rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
-
- .text {
- width: 49rpx;
- font-size: 23rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #FFFFFF;
- }
- }
- }
-
- .notice-bar {
- display: flex;
- align-items: center;
- background-color: #f9f9f9;
- height: 60rpx;
- padding-left: 26rpx;
-
- .img-icon {
- width: 28rpx;
- height: 28rpx;
- }
-
- .text {
- width: 344rpx;
- height: 26rpx;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #4593F2;
- line-height: 28rpx;
- flex: 1;
- margin-left: 20rpx;
- }
- }
- }
-
- .place {
- height: 200rpx;
- }
-
-
- .h-table {
- .h-thead {
- color: #51A4FA;
- background-color: #E1F3FF;
- }
-
- .h-td {
- border-right-width: 0;
- font-size: 25rpx;
- }
-
- .show_city {
- width: 100% !important;
- display: flex;
- align-items: center;
- justify-content: flex-end;
- padding: 0 26rpx;
- background: #f5f5f5;
- transition: width 150ms ease-in;
- }
-
- .h_box {
- display: flex;
- align-items: center;
- justify-content: space-between;
- width: 100%;
- }
-
- .h-tr {
- border-width: 0;
- text-align: center;
-
- .column-0 {
- width: 9%;
- }
-
- .column-1 {
- width: 18%;
- }
-
- .column-2 {
- width: 9%;
- }
-
- .column-3 {
- width: 20%;
- }
-
- .column-4 {
- width: 15%;
- }
-
- .column-5 {
- width: 15%;
- }
-
- .column-6 {
- width: 14%;
- }
- }
-
- .name {
- color: #3c9cff;
- }
-
- .differ {
- color: #ff0000;
- }
-
-
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/dbSafety/const/dropDownData.js b/subPackage/dbSafety/const/dropDownData.js
deleted file mode 100644
index 8799279..0000000
--- a/subPackage/dbSafety/const/dropDownData.js
+++ /dev/null
@@ -1,117 +0,0 @@
-export const dropDownData = [{
- label: "排序",
- prop: "order_syf",
- type: "line",
- children: [{
- label: "水库注册码降序",
- value: "res_reg_cd"
- },
- {
- label: "与库水位差值降序",
- value: "cd_max_diff_rz"
- },
- {
- label: "管水位涨幅降序",
- value: "max_diff_spprwl"
- }
-
- ]
- },
- {
- label: "筛选",
- prop: "filter",
- type: "check",
- children: [{
- label: "是否有数据",
- type: "radio",
- prop: "is_has_data",
- option: [{
- label: "全部",
- value: ""
- },
- {
- label: "有数据",
- value: "y"
- },
- {
- label: "无数据",
- value: "n"
- },
- ],
- },
- {
- label: "工程规模",
- type: "radio",
- prop: "eng_scal",
- option: [{
- label: "全部",
- value: ""
- },
- {
- label: "大(1)型",
- value: "大(1)型",
- },
- {
- label: "大(2)型",
- value: "大(2)型"
- },
- {
- label: "中型",
- value: "中型"
- },
- {
- label: "小(1)型",
- value: "小(1)型"
- },
- {
- label: "小(2)型",
- value: "小(2)型"
- },
- ]
- },
- {
- label: "是否病险",
- type: "radio",
- prop: "danger_stat",
- option: [{
- label: "全部",
- value: ""
- },
- {
- label: "非病险水库",
- value: "非病险水库",
- },
- {
- label: "正在除险加固",
- value: "正在除险加固"
- },
- {
- label: "待除险加固",
- value: "待除险加固"
- }
- ]
- },
- {
- label: "标签",
- type: "checkbox",
- prop: "label_str",
- option: []
- },
-
- ]
- },
- {
- label: '是否收藏',
- type: 'line',
- prop: "collect",
- children: [{
- label: "全部",
- value: ""
- },
- {
- label: "收藏",
- value: "1"
- }
- ]
- },
-]
\ No newline at end of file
diff --git a/subPackage/dbSafety/daba.vue b/subPackage/dbSafety/daba.vue
deleted file mode 100644
index 92b5a96..0000000
--- a/subPackage/dbSafety/daba.vue
+++ /dev/null
@@ -1,2792 +0,0 @@
-<template>
- <view class="container">
-
- <!--过程线图-->
- <view class="card-view">
- <card>
- <view class="card-head" slot="insideHead">
- <view class="title">
- <u-button :customStyle="picValue=='gcxt'?btnCustomStyle:''" @click="picBtnClick('gcxt')"
- size="small" text="过程线图"></u-button>
- </view>
- <view v-if="type == 'sy'" class="title">
- <u-button :customStyle="picValue=='jrxt'?btnCustomStyle:''" @click="picBtnClick('jrxt')"
- size="small" text="浸润线图"></u-button>
- </view>
- </view>
- <view v-if="picValue == 'gcxt'" class="card-content" slot="content">
- <view class="card_box j-c-s-a h" style="padding: 20rpx 0;">
- <view class="date" style="background-color: #eaf2fc;">
- <uni-datetime-picker :disabled="btnSelectValue != 2" @change="dateChange"
- :clear-icon="false" :end="endDateTime" v-model="dateRange" type="daterange"
- rangeSeparator="至">
- </uni-datetime-picker>
- </view>
-
- <view class="card_box h df" style="background-color: #eaf2fc;padding: 0 10rpx;"
- @click="predictVisible=true">
- <view class="title">{{predictOption[predictIndex].name}}</view>
- <u-icon name="arrow-down-fill" size="12"></u-icon>
- </view>
-
-
- </view>
-
- <view class="card-box j-c-s-a h btn-group df">
- <u-button :customStyle="btnSelectValue==0?btnCustomStyle:''" @click="btnClick(0)" size="small"
- text="近一月"></u-button>
- <u-button :customStyle="btnSelectValue==1?btnCustomStyle:''" @click="btnClick(1)" size="small"
- text="近一年"></u-button>
- <u-button :customStyle="btnSelectValue==2?btnCustomStyle:''" @click="btnClick(2)" size="small"
- text="自定义"></u-button>
- </view>
-
- <view v-if="type == 'bx'" style="justify-content: space-between;"
- class="card-box j-c-s-a h btn-group df">
-
- <view class="df">
- <u-button v-if="displacementType=='水平位移'" :customStyle="direction=='上下游'?btnCustomStyle:''"
- @click="directionClick('上下游')" size="small" text="上下游"></u-button>
- <u-button v-if="displacementType=='水平位移'" :customStyle="direction=='左右岸'?btnCustomStyle:''"
- @click="directionClick('左右岸')" size="small" text="左右岸"></u-button>
- </view>
-
- <view class="df">
- <u-button :customStyle="displacementType=='水平位移'?btnCustomStyle:''"
- @click="directionClick('水平位移')" size="small" text="水平位移"></u-button>
- <u-button :customStyle="displacementType=='垂直位移'?btnCustomStyle:''"
- @click="directionClick('垂直位移')" size="small" text="垂直位移"></u-button>
- </view>
-
-
- </view>
-
-
-
-
- <echart v-if="!echartsLoading" initId="gcxt" :option="option"></echart>
- <view v-else style="height: 500rpx;display: flex; justify-content: center;">
- <u-loading-icon mode="semicircle" :show="echartsLoading" size="36"></u-loading-icon>
- </view>
-
- </view>
-
-
- <view v-if="picValue == 'jrxt'" class="card-content" slot="content">
- <view class="card_box j-c-s-a h" style="padding: 20rpx 0;">
- <view class="date" style="background-color: #eaf2fc;">
- <uni-datetime-picker @change="dateJrxtChange" :clear-icon="false" :end="endDateTime"
- v-model="dateJrxtRange" type="daterange" rangeSeparator="至">
- </uni-datetime-picker>
- </view>
-
- <view class="card_box h df" style="background-color: #eaf2fc;padding: 0 10rpx;"
- @click="flagVisible=true">
- <view v-if="flagOption.length>0" class="title">{{flagOption[flagIndex].name}}</view>
- <u-icon name="arrow-down-fill" size="12"></u-icon>
- </view>
- </view>
-
- <!-- <view class="play">
- <u-button v-if="!playFlag" icon="play-right" class="custom-style" size="small"
- @click="playBtn"></u-button>
- <u-button v-else icon="pause" class="custom-style" size="small" @click="playBtn"></u-button>
- </view> -->
-
- <echart v-if="!echartsLoading" ref="jrxtEchart" initId="jrxt">
- </echart>
- <view v-else style="height: 500rpx;display: flex; justify-content: center;">
- <u-loading-icon mode="semicircle" :show="echartsLoading" size="36"></u-loading-icon>
- </view>
-
- </view>
-
-
- </card>
- </view>
-
-
- <my-select v-if="predictVisible" :show="predictVisible" type="radio" v-model="predictValue" popupTitle="请选择"
- :dataLists="predictOption" @cancel="predictVisible=false" @submit="predictSelectSubmit">
- </my-select>
-
- <my-select v-if="flagVisible" :show="flagVisible" type="radio" v-model="flagValue" popupTitle="请选择"
- :dataLists="flagOption" @cancel="flagVisible=false" @submit="flagSelectSubmit">
- </my-select>
-
-
- </view>
-</template>
-
-<script>
- import * as echarts from 'echarts'
- import echart from "@/components/echart/echart.vue"
- import mySelect from "@/components/my-components/my-select.vue"
- import card from "@/components/my-components/card.vue"
- import {
- getDbFutureData,
- getSYBaseDetails,
- getDsmSpgSpprmpList,
- getBXBaseDetails
- } from "@/api/dataCenter/dbSafety/dbSafety"
- import uniDatetimePicker from "@/subPackage/dbSafety/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue"
- import {
- convertTimestampToDate,
- } from "@/utils/date"
- export default {
- components: {
- card,
- echart,
- mySelect,
- uniDatetimePicker
- },
- data() {
- return {
- //过程线图配置项
- option: {},
- //浸润线图配置项
- jrxtOption: {},
- echartData: [],
- stationData: [],
- //预报数据
- futureData: [],
- res_cd: "42011640018",
-
- tableHeader: [],
- showStation: "",
-
- type: "sy",
- dateRange: [],
- dateJrxtRange: [],
- //日期最大选取时间
- endDateTime: convertTimestampToDate(new Date()),
-
- query: {},
- jrxtQuery: {},
-
- predictVisible: false,
- predictValue: "",
- predictIndex: 0,
- predictOption: [{
- name: "预测模型",
- value: "",
- index: 0
- },
- {
- name: "Arima预测",
- value: "Arima",
- index: 1
- },
- {
- name: "Hst预测",
- value: "Hst",
- index: 2
- },
- ],
-
- flagValue: "",
- flagIndex: 0,
- flagVisible: false,
- flagOption: [],
-
- btnSelectValue: 0,
-
- btnCustomStyle: {
- backgroundColor: '#eaf2fc',
- color: '#666666'
- },
-
- picValue: "gcxt",
-
- pointList: [],
-
- echartsLoading: false,
-
- //浸润线
- currentIndex: 0,
- playFlag: false,
- //定时器
- interval: null,
-
- item: {},
-
- //图类型。1、过程线图;2、分布图
- bxType: 1,
- dimensionality: 1,
- direction: "上下游",
- displacementType: "水平位移",
-
- }
- },
- created() {},
- mounted() {
-
- },
- onLoad(option) {
- this.initDateTime()
- this.item = JSON.parse(option.data)
- this.type = option.type
- console.log("项:", this.item)
- console.log("类型:", this.type)
- this.res_cd = this.item.reservoir.res_cd
-
- if (this.type == 'sy') {
- this.getData(this.query)
- } else {
- this.query.bx_wd = this.bxType
- this.getBXBase(this.query)
- }
- },
- onShow() {
-
- },
-
- watch: {
- echartData: {
- handler(newData, oldData) {
- if (newData.length > 0 && JSON.stringify(newData) != JSON.stringify(oldData)) {
- const echartsData = this.getAY(newData)
-
- console.log(echartsData, "----")
-
- this.$nextTick(() => {
- this.initOption(echartsData)
- })
- }
- },
- immediate: true
- },
-
- picValue: {
- handler(newVal, oldVal) {
- if (newVal == "gcxt") {
- this.getData(this.query)
- } else {
- this.getDsmSpgSpprmpList(this.jrxtQuery, true)
- }
- }
- },
-
- direction: {
- handler(newData) {
- if (this.echartData.length > 0) {
- const echartsData = this.getAY(this.echartData)
-
- this.$nextTick(() => {
- this.initOption(echartsData)
- })
- }
- },
- },
-
- displacementType: {
- handler(newData) {
- if (this.echartData.length > 0) {
- const echartsData = this.getAY(this.echartData)
-
- this.$nextTick(() => {
- this.initOption(echartsData)
- })
- }
- },
- }
-
- },
-
- methods: {
-
- directionClick(str) {
- if (str == "上下游" || str == "左右岸") {
- this.direction = str
- } else {
- this.displacementType = str
- }
- },
-
- //获取变形数据
- async getBXBase(params) {
- const that = this
-
- if (that.resCode == '') return
-
- this.loading = true
-
- this.tableData = []
- this.echartData = []
- this.extremeData = []
- this.tableHeader = []
- this.stationData = []
-
- let dtObj = {}
- let getParams = {}
-
- if (this.bxType == 1) {
- //判断两日期是否超过一年
- dtObj = this.isTwoDateOverYear(params.start_tm, params.end_tm)
- dtObj['dim_type'] = 'cd'
- getParams.start_tm = params.start_tm
- getParams.end_tm = params.end_tm
- } else {
- let dateStr = params.multiDate.map(item => dayjs(item).format('YYYY-MM-DD')).join(',')
-
- if (that.multiDateType == 'months') {
- dtObj.dt_flag = 'month'
- } else if (that.multiDateType == 'years') {
- dtObj.dt_flag = 'year'
- }
-
- getParams['tm_list'] = dateStr
- }
-
- const {
- data: baseResData
- } = await getBXBaseDetails({
- res_cd: that.res_cd,
- ...getParams,
- ...dtObj
- })
-
- console.log("变形数据", baseResData)
- baseResData.wy.forEach(item => {
- item.de_value = item.de_value.toFixed(2)
- item.dn_value = item.dn_value.toFixed(2)
- item.du_value = item.du_value.toFixed(2)
-
- let stationFlag = that.stationData.some(i => i == item.cd)
-
- if (stationFlag != true) {
- that.stationData.push(item.cd)
-
- that.tableHeader.push({
- cd: item.cd,
- label: 'GN' + item.cd,
- alt: String(item.alt),
- x: 'station' + item.cd + 'x',
- y: 'station' + item.cd + 'y',
- u: 'station' + item.cd + 'u',
- })
- }
- })
-
- let echartArr = []
-
- baseResData.dt_list.forEach(item => {
- let obj = {}
-
- if (params.bx_wd == 1) {
- obj.tm = dtObj.dt_flag == "month" ? item.substr(0, 7) : item
- } else {
- if (that.multiDateType == 'dates') {
- obj.tm = item
- } else if (that.multiDateType == 'months') {
- obj.tm = item.substr(0, 7)
- } else if (that.multiDateType == 'years') {
- obj.tm = item.substr(0, 4)
- }
- }
-
- that.stationData.forEach(it => {
- let wayData = baseResData.wy.find(i => i.dt == item && i.cd == it)
-
- if (wayData && wayData != undefined) {
- obj['station' + it + 'x'] = wayData.de_value
- obj['station' + it + 'y'] = wayData.dn_value
- obj['station' + it + 'u'] = wayData.du_value
- } else {
- obj['station' + it + 'x'] = ''
- obj['station' + it + 'y'] = ''
- obj['station' + it + 'u'] = ''
- }
- })
-
- let rz = {}
-
- let curRz = baseResData.rz.find(it => item == it.dt)
-
- that.tableData.push({
- ...obj
- })
-
- if (curRz && curRz != undefined) {
- rz.rz = curRz.rz
-
- echartArr.push({
- ...obj,
- ...rz
- })
- } else {
- rz.rz = ''
-
- echartArr.push({
- ...obj,
- ...rz
- })
- }
-
- })
-
- that.futureData = []
- that.dimensionality = params.bx_wd
- if (that.predictValue != "") {
-
- const res = await getDbFutureData({
- resCd: that.res_cd,
- type: 3, //变形
- predictFlag: that.predictValue
- })
- console.log("预测数据:", res)
-
- if (params.bx_wd == 1) {
- if (that.predictValue == 'Arima') {
- //预报数据处理
-
- if (res.code != 200) return
- //删除当天的时间数据
- echartArr.splice(echartArr.length - 1, 1)
- const lastData = echartArr[echartArr.length - 1]
- res.data.forEach(v => {
- const preList = []
- v.predicts = v.predicts.map(v => {
- v = JSON.parse(v)
- v[1] = v[1].toFixed(2)
-
- return v
- })
- //根据时间处理数据
- v.predicts.reduce((prev, current) => {
- //判断当前是否为空数组 是空数组直接添加比较项
- if (prev.length > 0) {
- //判断当前和第二个日期是否相等
- const flag = prev[0].substring(0, 10) == current[0].substring(
- 0, 10)
- if (flag) {
- const index = preList.findIndex(v => v[0].substring(0,
- 10) == current[0].substring(0, 10))
- preList[index] = current
- } else {
- preList.push(current)
- }
- return current
- } else {
- preList.push(current)
- }
- return current
- }, [])
- v.predicts = preList.map(v => {
- v[0] = v[0].substring(0, 10)
- return v
- }).filter(itm => {
- const itmDate = new Date(itm[0])
- const yesterday = new Date()
- yesterday.setDate(yesterday.getDate() - 1)
- return itmDate > yesterday
- })
- })
- let list = res.data.map(v => {
- return {
- pointId: v.pointId,
- predicts: v.predicts,
- type: v.type
- }
- })
- const xList = []
- const yList = []
- const uList = []
- if (list.length > 0) {
- Object.keys(lastData).forEach(v => {
- if (v.includes("x")) {
- xList.push({
- type: 3,
- predicts: [
- [lastData['tm'], lastData[v]]
- ],
- pointId: `${v.substring(7, 9)}`
- })
- }
- if (v.includes("y")) {
- yList.push({
- type: 4,
- predicts: [
- [lastData['tm'], lastData[v]]
- ],
- pointId: `${v.substring(7, 9)}`
- })
- }
- if (v.includes("u")) {
- uList.push({
- type: 5,
- predicts: [
- [lastData['tm'], lastData[v]]
- ],
- pointId: `${v.substring(7, 9)}`
- })
- }
- })
- list = [...list, ...xList, ...yList, ...uList]
- const {
- integraList: expectList,
- tm
- } = that.BXexpectData(list)
- that.futureData = expectList
- echartArr.push(...(tm.map(v => {
- return {
- tm: v
- }
- })))
- }
- } else {
- let tmList = []
- const {
- data: res
- } = future
- if (res.code != 200) return
- //删除当天的时间数据
- echartArr.splice(echartArr.length - 1, 1)
- const lastData = echartArr[echartArr.length - 1]
- let predicts = res.data.map(v => {
- v.preWaterList = JSON.parse(v.preWaterList)
- v.predictList = JSON.parse(v.predictList)
- const tm = [...new Set(v.preWaterList.map(v => v.time))]
- for (let i = 0; i < v.preWaterList.length; i++) {
- for (let j = i + 1; j < v.preWaterList.length; j++) {
- if (v.preWaterList[j].time == v.preWaterList[i].time) {
- v.preWaterList.splice(i, 1)
- v.predictList.splice(i, 1)
- }
- }
- }
- v.predicts = v.predictList.map((cl, index) => {
- let clVlue = cl.toFixed(2)
- return {
- label: `GN${v.pointId}`,
- data: [
- [tm[index], clVlue]
- ]
- }
- })
- tmList = tm
- return {
- type: v.type,
- list: v.predicts,
- }
- })
- const xList = []
- const yList = []
- const uList = []
- if (predicts.length > 0) {
- Object.keys(lastData).forEach(v => {
- if (v.includes("x")) {
- xList.push({
- type: '3',
- list: [{
- label: `GN${v.substring(7, 9)}`,
- data: [
- [lastData['tm'], lastData[v]]
- ]
- }],
- })
- }
- if (v.includes("y")) {
- yList.push({
- type: '4',
- list: [{
- label: `GN${v.substring(7, 9)}`,
- data: [
- [lastData['tm'], lastData[v]]
- ]
- }],
- })
- }
- if (v.includes("u")) {
- uList.push({
- type: '5',
- list: [{
- label: `GN${v.substring(7, 9)}`,
- data: [
- [lastData['tm'], lastData[v]]
- ]
- }],
- })
- }
- })
- that.futureData = []
- predicts = [...predicts, ...xList, ...yList, ...uList]
- that.futureData = that.BXhstPredictsDeal(predicts)
- echartArr.push(...(tmList.map(v => {
- return {
- tm: v
- }
- })))
- }
- }
- }
- }
-
- that.echartData = echartArr
- console.log("最终数据", that.echartData)
-
- },
-
- //预报方法处理
- BXexpectData(list) {
- const deepList = JSON.parse(JSON.stringify(list))
- const integraList = []
- for (let key of deepList) {
- const item = integraList.find(e => e.type == key.type)
- if (item) {
- item.list.push({
- label: `GN${key.pointId}`,
- data: key.predicts
- })
- } else {
- integraList.push({
- type: key.type,
- list: [{
- label: `GN${key.pointId}`,
- data: key.predicts
- }]
- })
- }
- }
- for (let j = 0; j < integraList.length; j++) {
- const inteItem = integraList[j]
- const maxNum = inteItem.list.length
- const expectList = []
- for (let i = 0; i < maxNum; i++) {
- const index = expectList.findIndex(v => v.label == inteItem.list[i].label)
- if (index > -1) {
- //把合并后的时间添加到已经有的label的data里面的第一项
- expectList[index].data.unshift(...inteItem.list[i].data.map(v => v))
- } else {
- expectList.push({
- label: inteItem.list[i].label,
- data: inteItem.list[i].data
- })
- }
- }
- inteItem.list = expectList
- }
- //拿到处理好的数据第一项的时间 时间都是一样的
- let tm = integraList[0].list[0].data.map(v => v[0])
- tm.splice(0, 1)
- return {
- integraList,
- tm
- }
- },
-
- //hst预报方法处理
- BXhstPredictsDeal(list) {
- let deepList = JSON.parse(JSON.stringify(list))
- /*
- 处理deepList里的list的label相同的项合一
- */
- const maxNum = Math.max(...deepList.map(v => v.list.length))
- for (let j = 0; j < deepList.length; j++) {
- const item = deepList[j]
- item.list.reduce((prev, next, index) => {
- if (next.label == prev.label) {
- prev.data.push(...next.data.map(v => v))
- item.list.splice(index, 1)
- } else {
- return next
- }
- return prev
- }, {
- label: "",
- data: []
- })
- }
- for (let i = 0; i < maxNum; i++) {
- deepList.reduce((prev, next, index) => {
- if (prev.type == next.type) {
- prev.list.push(...next.list.map(v => v))
- deepList.splice(index, 1)
- return prev
- } else return next
- }, {
- type: "",
- list: []
- })
- }
- /*
- 把deepList type相同的项合并
- */
- for (let i = 0; i < deepList.length; i++) {
- for (let j = i + 1; j < deepList.length; j++) {
- if (deepList[i].type == deepList[j].type) {
- deepList[i].list.push(...deepList[j].list.map(v => v))
- deepList[j].list = []
- }
- }
- }
- deepList = deepList.filter(v => v.list.length > 0)
- for (let idx = 0; idx < deepList.length; idx++) {
- const integraList = []
- const item = deepList[idx].list
- item.forEach(itx => {
- const inItem = integraList.find(v => v.label == itx.label)
- if (inItem) {
- inItem.data.unshift(...itx.data.map(v => v))
- } else {
- integraList.push({
- label: itx.label,
- data: itx.data
- })
- }
- })
- deepList[idx].list = integraList
- const listLength = Math.max(...deepList[idx].list.map(v => v.data.length))
- deepList[idx].list.forEach(v => {
- if (v.data.length < listLength) {
- for (let i = v.data.length; i < listLength; i++) {
- v.data.push(['', null])
- }
- }
- })
- }
- return deepList
- },
-
- //播放、暂停方法
- playBtn() {
- this.playFlag = !this.playFlag
- // this.interval = null;
- if (this.playFlag === true) {
- if (this.currentIndex == this.tableData.length - 1) {
- this.currentIndex = 0
- }
- this.interval = setInterval(() => {
- if (this.currentIndex < this.tableData.length - 1) {
- this.currentIndex++
-
- this.updateOptions(...this.updataEchartsData(this.tableData[this.currentIndex]))
- } else {
- clearInterval(this.interval)
- this.playFlag = !this.playFlag
- }
- }, 100)
- } else {
- if (this.interval) {
- clearInterval(this.interval)
- }
- }
- },
-
- // 更新echarts中options的数据
- updateOptions(data, chartdata, damX, damY, damWidth, waterWidth, checkWaterWidth) {
- const that = this
-
- let polyPoints = []
-
- let piezometer_fracture = []
- let pressureData = []
-
- let pressLocation = [
- [92, 86.6],
- [112, 82.2],
- [130, 78.8],
- [150, 72],
- ]
-
- data.forEach((item, index) => {
- pressureData.push(item.spprwl)
-
- piezometer_fracture.push([
- pressLocation[index][0] - 0.5,
- item.tbbtel - 2 < chartdata.damBotoomHeight ? chartdata.damBotoomHeight : item
- .tbbtel - 2,
- pressLocation[index][0] + 0.5,
- pressLocation[index][1],
- ])
- })
-
- this.jrxtOption.series[2] = {
- name: "当前水位",
- type: "custom",
- renderItem: function(params, api) {
- polyPoints.push(api.coord([api.value(0), api.value(1)]))
- var start = api.coord([0, chartdata.waterLevel])
-
- return {
- type: 'group',
- children: [{
- type: 'polygon',
- shape: {
- points: echarts.graphic.clipPointsByRect(polyPoints, {
- x: params.coordSys.x,
- y: params.coordSys.y,
- width: params.coordSys.width,
- height: params.coordSys.height
- })
- },
- style: api.style({
- fill: "rgb(58,138,122)",
- stroke: 'transparent'
- })
- }, {
- type: 'text',
- style: {
- text: '实测水位 ' + chartdata.waterLevel + "m▼",
- x: start[0] + 10,
- y: start[1] - 14,
- fill: '#368AE6'
- }
- }]
- }
- },
- data: [
- [0, chartdata.damBotoomHeight],
- [waterWidth, chartdata.waterLevel],
- [0, chartdata.waterLevel],
- ],
- z: 10
- }
-
- // 测压管渗压水位
- this.jrxtOption.series[4].data = piezometer_fracture.map((item, index) => {
- return [item[0], item[1], item[2], pressureData[index]]
- }).filter((item, index) => pressureData[index] != '')
-
- // 浸润线
- this.jrxtOption.series[5].data = [
- [waterWidth, chartdata.waterLevel],
- [(damX[6] - damX[5]) / 2.4 + damX[5] - 1.6, chartdata.waterLevel],
- ...piezometer_fracture.map((item, index) => {
- return [item[0], pressureData[index]]
- }).filter((item, index) => pressureData[index] != ''),
- [damX[damX.length - 1], chartdata.damBotoomHeight],
- ]
-
- this.$nextTick(async () => {
- const chart = await this.$refs.jrxtEchart.$refs.chart.init(echarts)
- chart.setOption(this.jrxtOption, {
- notMerge: true,
- })
- })
- },
-
- //获取断面下拉数据
- getDsmSpgSpprmpList(params, flag = false) {
- this.echartsLoading = true
-
- if (flag == true) {
- getDsmSpgSpprmpList({
- res_cd: this.res_cd
- }).then(res => {
-
- console.log("断面数据:", res)
-
- if (res.resultList.length == 0) {
-
- this.$message({
- message: '该水库暂无数据',
- type: 'warning'
- })
-
- return
- }
-
- if (flag == true) {
- let ind = 0
-
- this.flagOption = res.resultList.reduce((pre, cur) => {
- let flag = pre.some(item => cur.ch == item.value)
-
- if (flag == true) {
- return pre
- } else {
- pre.push({
- name: cur.ch,
- value: cur.ch,
- index: ind
- })
-
- ind += 1
-
- return pre
- }
- }, [])
-
-
- this.$nextTick(() => {
- if (this.resCode == '42011640018') {
- this.flagValue = this.flagOption[1].value
- this.flagIndex = this.flagOption[1].index
- } else {
- this.flagValue = this.flagOption[0].value
- this.flagIndex = this.flagOption[0].index
- }
-
- params.flag = this.flagValue
-
- this.getDsmSpgSpprmpList(params)
- })
-
- return
- }
-
- this.getDataAll(params)
- })
- } else {
- this.getDataAll(params)
- }
-
-
- },
-
- async getDataAll(params) {
- const that = this
-
- let start_tm = params.start_tm
- let end_tm = params.end_tm
-
- const {
- resultList: baseAll
- } = await getDsmSpgSpprmpList({
- res_cd: that.res_cd
- })
-
- const {
- data: pressAll
- } = await getSYBaseDetails({
- res_cd: that.res_cd,
- start_tm: start_tm,
- end_tm: end_tm
- })
-
- console.log(pressAll, "-------------")
-
- let pressValArray = baseAll.filter(item => item.ch == params.flag).map(item => item.mpcd).sort((a,
- b) => a - b)
-
- pressValArray = pressAll.press.reduce((pre, cur) => {
- let flagOne = pressValArray.some(item => item == cur.cd)
- let flagTwo = pre.some(item => item == cur.cd)
-
- if (flagOne && !flagTwo) {
- pre.push(cur.cd)
- }
-
- return pre
- }, [])
-
- let list = pressAll.dt_list.map(item => {
- let curRz = pressAll.rz.find(i => i.dt == item)
- let water
-
- if (curRz) {
- water = curRz.rz
- } else {
- water = ''
- }
-
- return {
- tm: item,
- water,
- pressData: []
- }
- })
-
- pressAll.press.forEach(item => {
- let flag = pressValArray.some(i => i == item.cd)
-
- if (flag) {
- list.forEach(listItem => {
- if (listItem.tm == item.dt) {
- let curPress = baseAll.find(i => i.mpcd == item.cd)
-
- if (item.press_val == null) {
- item.press_val = ''
- }
-
- listItem.pressData.push({
- ...curPress,
- spprwl: Math.abs(item.press_val) > 0 ? item.press_val
- .toFixed(2) : item.press_val,
- rz: listItem.water
- })
-
- listItem['UPD' + item.cd] = Math.abs(item.press_val) > 0 ? item
- .press_val.toFixed(2) : item.press_val
- listItem['setUpd'] = true
- } else {
- return
- }
- })
- }
- })
-
- that.tableData = list.filter(item => {
- let arr = []
-
- pressValArray.forEach(j => {
- let allCur = baseAll.find(i => j == i.mpcd)
- let itemCur = item.pressData.find(i => j == i.mpcd)
-
- if (itemCur) {
- arr.push(itemCur)
- } else {
- item['UPD' + j] = ''
-
- arr.push({
- ...allCur,
- spprwl: '',
- rz: item.water
- })
- }
- })
-
- item.pressData = arr
-
- return 'setUpd' in item
- })
-
- that.pointList = baseAll.filter(item => item.ch == params.flag).sort((a, b) => a.mpcd -
- b.mpcd).map((item, index) => {
- let x
- if (index == 0) {
- x = 950
- } else if (index == 1) {
- x = 1086
- } else if (index == 2) {
- x = 1294
- }
-
- return {
- ptcd: 'UPD' + item.mpcd,
- unit: 'm',
- x
- }
- })
-
- console.log("数据:", that.tableData)
- that.echartsInit(...that.updataEchartsData(that.tableData[that.tableData.length - 1]))
-
-
- },
-
- echartsInit(data, chartdata, damX, damY, damWidth, waterWidth, checkWaterWidth) {
-
- const that = this
- //柱形图
-
- let polyPoints = []
- let piezometer_fracture = []
-
- let pressureName = []
- let pressureData = []
-
- let pressLocation = [
- [92, that.calculateAngleTwoBLength(damY[6] - damY[7], 15, damX[7] - 92, damY[7]) + 0.4],
- [112, damY[7] + 0.4],
- [130, that.calculateAngleTwoBLength(damY[8] - damY[9], 15, damX[9] - 130, damY[9]) + 0.4],
- [150, 72],
- ]
-
- data.forEach((item, index) => {
- pressureName.push('UPD' + item.mpcd)
- pressureData.push(item.spprwl == '' ? item.tbbtel : item.spprwl)
-
- piezometer_fracture.push([
- pressLocation[index][0] - 0.5,
- item.tbbtel - 2 < chartdata.damBotoomHeight ? chartdata.damBotoomHeight : item
- .tbbtel - 2,
- pressLocation[index][0] + 0.5,
- pressLocation[index][1],
- ])
- })
-
-
-
- this.jrxtOption = {
- grid: {
- left: '2%',
- top: '10%',
- right: '6%',
- bottom: '4%',
- containLabel: true,
- },
- toolbox: {
- show: false
- },
- calculable: false,
- xAxis: [{
- type: 'value',
- axisLabel: {
- show: true
- },
- axisTick: {
- show: false
- },
- splitLine: {
- show: false
- },
- min: 0,
- max: damWidth
- }],
- yAxis: [{
- name: '断面高(m)',
- type: 'value',
- min: chartdata.damBotoomHeight,
- scale: true,
- max: chartdata.damTopHeight + 10,
- axisLabel: {
- formatter: function(value, index) {
- return value.toFixed(0)
- }
- },
- splitLine: {
- show: false
- },
- splitNumber: 5,
- interval: (chartdata.damTopHeight + 10 - chartdata.damBotoomHeight) / 5
- }],
- series: [{
- name: "均质坝",
- type: 'line',
- symbol: "none",
- data: [
- [damX[0], damY[0]],
- [damX[1], damY[1]],
- [damX[2], damY[2]],
-
- [damX[3], damY[3]],
- [damX[4], damY[4]],
- [damX[5], damY[5]],
-
- [damX[6], damY[6]],
- [damX[7], damY[7]],
- [damX[8], damY[8]],
-
- [damX[9], damY[9]],
- [damX[10], damY[10]],
- [damX[11], damY[11]],
- [damX[12], damY[12]],
- ],
- areaStyle: {
- normal: {
- color: {
- type: 'linear',
- x: 0,
- y: 0,
- x2: 0,
- y2: 1,
- colorStops: [{
- offset: 0,
- color: 'rgba(154,130,120, 1)',
-
- }, {
- offset: 1,
- color: 'rgba(154,130,120, 1)',
-
- }],
-
- globalCoord: false // 缺省为 false
- },
- }
- },
- lineStyle: {
- color: "rgb(214,214,214)",
- width: 4
- },
- },
- {
- name: "心墙坝",
- type: 'line',
- symbol: "none",
- data: [
- [damX[5], damY[0]],
- [(damX[6] - damX[5]) / 2.4 + damX[5], (damY[6] - data[0].chec_fl_stag) / 2 +
- data[0].chec_fl_stag
- ],
- [damX[6] - (damX[6] - damX[5]) / 2.4, (damY[6] - data[0].chec_fl_stag) / 2 +
- data[0].chec_fl_stag
- ],
- [damX[6], damY[0]]
- ],
- areaStyle: {
- normal: {
- color: {
- type: 'linear',
- x: 0,
- y: 0,
- x2: 0,
- y2: 1,
- colorStops: [{
- offset: 0,
- color: 'rgba(206,145,120, 1)',
-
- }, {
- offset: 1,
- color: 'rgba(206,145,120, 1)',
-
- }],
-
- globalCoord: false // 缺省为 false
- },
- }
- },
- lineStyle: {
- color: "rgb(214,214,214)",
- width: 2
- },
- },
- {
- name: "当前水位",
- type: "custom",
- renderItem: function(params, api) {
- polyPoints.push(api.coord([api.value(0), api.value(1)]))
- var start = api.coord([0, chartdata.waterLevel])
-
- return {
- type: 'group',
- children: [{
- type: 'polygon',
- shape: {
- points: echarts.graphic.clipPointsByRect(
- polyPoints, {
- x: params.coordSys.x,
- y: params.coordSys.y,
- width: params.coordSys.width,
- height: params.coordSys.height
- })
- },
- style: api.style({
- fill: "rgb(58,138,122)",
- stroke: 'transparent'
- })
- }, {
- type: 'text',
- style: {
- text: '实测水位 ' + chartdata.waterLevel + "m▼",
- x: start[0] + 10,
- y: start[1] - 14,
- fill: '#368AE6'
- }
- }]
- }
- },
- data: [
- [0, chartdata.damBotoomHeight],
- [waterWidth, chartdata.waterLevel],
- [0, chartdata.waterLevel],
- ],
- z: 10
- },
- {
- name: "测压管轮廓",
- type: "custom",
- renderItem: function(params, api) {
- // var categoryIndex = api.value(0);
- var start = api.coord([api.value(0), api.value(1)])
- var end = api.coord([api.value(2), api.value(3)])
- var height = api.size([0, 1])[1] * (api.value(3) - api.value(1))
-
- var rectShape = echarts.graphic.clipRectByRect({
- x: start[0],
- y: end[1],
- width: end[0] - start[0],
- height: height
- }, {
- x: params.coordSys.x,
- y: params.coordSys.y,
- width: params.coordSys.width,
- height: params.coordSys.height
- })
-
- return {
- type: 'group',
- children: [{
- type: 'rect',
- shape: rectShape,
- style: api.style({
- fill: 'transparent',
- stroke: '#928E85'
- })
- }, {
- type: 'text',
- style: {
- text: pressureName[params.dataIndex],
- fontSize: 16,
- x: end[0] - 18,
- y: end[1] - 18
- }
- }]
- }
- },
- encode: {
- x: [1, 3], // 表示维度 3、1 映射到 x 轴。
- y: [2, 4] // 表示维度 2、4 映射到 y 轴。
- },
- data: piezometer_fracture,
- z: 12
- },
- {
- name: "渗压",
- type: "custom",
- renderItem: function(params, api) {
- // var categoryIndex = api.value(0);
- var start = api.coord([api.value(0), api.value(1)])
- var end = api.coord([api.value(2), api.value(3)])
- var height = api.size([0, 1])[1] * (api.value(3) - api.value(1))
-
- var rectShape = echarts.graphic.clipRectByRect({
- x: start[0],
- y: end[1],
- width: end[0] - start[0],
- height: height
- }, {
- x: params.coordSys.x,
- y: params.coordSys.y,
- width: params.coordSys.width,
- height: params.coordSys.height
- })
-
- return {
- type: 'group',
- children: [{
- type: 'rect',
- shape: rectShape,
- style: api.style({
- fill: "rgb(37,183,239)",
- stroke: 'transparent'
- })
- }, {
- type: 'text',
- style: {
- text: api.value(3) + 'm',
- fontSize: 16,
- x: start[0] + 16,
- y: end[1] - 14
- }
- }]
- }
- },
- encode: {
- x: [1, 3], // 表示维度 3、1 映射到 x 轴。
- y: [2, 4] // 表示维度 2、4 映射到 y 轴。
- },
- data: piezometer_fracture.map((item, index) => {
- return [item[0], item[1], item[2], pressureData[index]]
- }).filter((item, index) => pressureData[index] != ''),
- z: 13
- },
- {
- name: "浸润线",
- type: 'line',
- symbol: "none",
- smooth: 0.2,
- connectNulls: true,
- data: [
- [waterWidth, chartdata.waterLevel],
- [(damX[6] - damX[5]) / 2.4 + damX[5] - 1.6, chartdata.waterLevel],
- ...piezometer_fracture.map((item, index) => {
- return [item[0], pressureData[index]]
- }).filter((item, index) => pressureData[index] != ''),
- [damX[damX.length - 1], chartdata.damBotoomHeight],
- ],
- lineStyle: {
- color: "rgb(9,127,254)",
- type: "solid",
- // type: 'smooth',
- z: 14
- },
- },
- {
- name: '校核洪水位one',
- type: 'line',
- symbol: 'arrow',
- data: [
- [0, data[0].chec_fl_stag],
- [checkWaterWidth / 2, data[0].chec_fl_stag],
- [checkWaterWidth, data[0].chec_fl_stag],
- ],
- label: {
- show: true,
- position: 'top',
- fontSize: 16,
- formatter(params) {
- if (params.dataIndex == 1) {
- return `校核洪水位 ${data[0].chec_fl_stag}m▼`
- } else {
- return ''
- }
- }
- },
- lineStyle: {
- type: 'dashed'
- },
- itemStyle: {
- normal: {
- color: 'red',
- }
- }
- },
- {
- name: "校核洪水位",
- type: 'line',
- symbol: "none",
- smooth: 0,
- data: [
- [checkWaterWidth, data[0].chec_fl_stag],
- [(damX[6] - damX[5]) / 2.4 + damX[5], data[0].chec_fl_stag],
- [damX[damX.length - 1], chartdata.damBotoomHeight],
- ],
- lineStyle: {
- color: "rgb(250, 0, 0)",
- type: "solid"
- },
- z: 14,
- }
- ]
- }
-
- this.echartsLoading = false
- this.$nextTick(() => {
- this.$refs.jrxtEchart.initOption(this.jrxtOption)
- })
-
-
- },
-
- // 更新传入echarts的数据
- updataEchartsData(introductionData) {
- const that = this
-
- let echartToLoad = introductionData.pressData.sort((a, b) => a.ofax - b.ofax)
-
- // const baseHeight = echartToLoad[0].tb_dam_top_elevation - Math.min(...echartToLoad.map(item => item
- // .tbbtel), echartToLoad[0].dam_height)
-
- const baseHeight = Math.min(...echartToLoad.map(item => item.tbbtel - 4), (echartToLoad[0]
- .tb_dam_top_elevation - echartToLoad[0].dam_height))
-
- return [
- echartToLoad,
- {
- damTopHeight: Math.ceil(echartToLoad[0].tb_dam_top_elevation),
- damBotoomHeight: baseHeight,
- waterLevel: echartToLoad[0].rz,
- },
- [0, 15, 30, 45, 60, 75, 90, 105, 120, 135, 150, 165, 180, ],
- [
- baseHeight,
- Math.ceil(echartToLoad[0].tb_dam_top_elevation) - ((Math.ceil(echartToLoad[0]
- .tb_dam_top_elevation) - baseHeight) / 5 * 4),
- Math.ceil(echartToLoad[0].tb_dam_top_elevation) - ((Math.ceil(echartToLoad[0]
- .tb_dam_top_elevation) - baseHeight) / 5 * 3),
- Math.ceil(echartToLoad[0].tb_dam_top_elevation) - ((Math.ceil(echartToLoad[0]
- .tb_dam_top_elevation) - baseHeight) / 5 * 2),
- Math.ceil(echartToLoad[0].tb_dam_top_elevation) - ((Math.ceil(echartToLoad[0]
- .tb_dam_top_elevation) - baseHeight) / 5 * 1),
- Math.ceil(echartToLoad[0].tb_dam_top_elevation),
- Math.ceil(echartToLoad[0].tb_dam_top_elevation),
- Math.ceil(echartToLoad[0].tb_dam_top_elevation) - ((Math.ceil(echartToLoad[0]
- .tb_dam_top_elevation) - baseHeight) / 5 * 1),
- Math.ceil(echartToLoad[0].tb_dam_top_elevation) - ((Math.ceil(echartToLoad[0]
- .tb_dam_top_elevation) - baseHeight) / 5 * 1),
- Math.ceil(echartToLoad[0].tb_dam_top_elevation) - ((Math.ceil(echartToLoad[0]
- .tb_dam_top_elevation) - baseHeight) / 5 * 2),
- Math.ceil(echartToLoad[0].tb_dam_top_elevation) - ((Math.ceil(echartToLoad[0]
- .tb_dam_top_elevation) - baseHeight) / 5 * 3),
- Math.ceil(echartToLoad[0].tb_dam_top_elevation) - ((Math.ceil(echartToLoad[0]
- .tb_dam_top_elevation) - baseHeight) / 5 * 4),
- baseHeight
- ],
- 180,
- that.calculableRightAngle((echartToLoad[0].rz - baseHeight), that.calculatingAngle(75,
- echartToLoad[0].tb_dam_top_elevation - baseHeight)),
- that.calculableRightAngle((echartToLoad[0].chec_fl_stag - baseHeight), that.calculatingAngle(75,
- echartToLoad[0].tb_dam_top_elevation - baseHeight))
- ]
- },
-
- // 已知a角b边,求a边
- calculableRightAngle(Blength, angle) {
- let b_float = parseFloat(Blength)
-
- let a_angle_float = parseFloat(angle)
-
- let Alength = b_float * Math.tan(a_angle_float * Math.PI / 180)
-
- return Alength
- },
-
- calculatingAngle(a, b) {
- var a2 = Math.pow(a, 2)
- var b2 = Math.pow(b, 2)
-
- let c_float = Math.sqrt(a2 + b2)
-
- return Math.asin(a / c_float) * 180 / Math.PI
- },
-
- // 已知角A, a边b边, 角b, b边, 求 角b的a边
- calculateAngleTwoBLength(AngleOneA, AngleOneB, AngleTwoB, BHeight) {
- const AngleOneA2 = Math.pow(AngleOneA, 2)
- const AngleOneB2 = Math.pow(AngleOneB, 2)
-
- let c_float = Math.sqrt(AngleOneA2 + AngleOneB2)
-
- const AngleOnea = Math.asin(AngleOneA / c_float) * 180 / Math.PI
-
- const AngleTwoA = AngleTwoB * Math.tan(AngleOnea * Math.PI / 180)
-
- return AngleTwoA + BHeight
- },
-
- //按钮点击
- btnClick(index) {
- this.btnSelectValue = index
-
- if (index == 0) {
- this.initDateTime()
- this.getData(this.query)
- } else if (index == 1) {
- let startTimestamp = new Date().getTime() - 1000 * 60 * 60 * 24 * 365
-
- let startTime = convertTimestampToDate(new Date().setTime(startTimestamp), "yyyy-MM-dd")
- let endTime = convertTimestampToDate(new Date(), "yyyy-MM-dd")
- this.dateRange = [startTime, endTime]
- this.query.start_tm = startTime
- this.query.end_tm = endTime
- this.getData(this.query)
- }
-
- },
-
- //图类型选择
- picBtnClick(value) {
- this.picValue = value
- },
-
- //断面选择
- flagSelectSubmit(value) {
- console.log(value)
- this.flagIndex = value.index
- this.flagValue = value.value
- this.flagVisible = !this.flagVisible
-
- this.jrxtQuery.flag = this.flagValue
-
- this.getDsmSpgSpprmpList(this.jrxtQuery)
-
- },
-
- //预测模型选择
- predictSelectSubmit(value) {
- this.predictIndex = value.index
- this.predictValue = value.value
- this.predictVisible = !this.predictVisible
- this.getData(this.query)
- },
-
- //选择日期范围
- dateChange(value) {
- this.query.start_tm = value[0]
- this.query.end_tm = value[1]
- this.getData(this.query)
- },
-
- dateJrxtChange(value) {
- this.jrxtQuery.start_tm = value[0]
- this.jrxtQuery.end_tm = value[1]
- this.getDsmSpgSpprmpList(this.jrxtQuery)
- },
-
- //初始化日期数据
- initDateTime() {
- let startTimestamp = new Date().getTime() - 1000 * 60 * 60 * 24 * 30
- let startTime1Stamp = new Date().getTime() - 1000 * 60 * 60 * 24 * 3 * 30
-
- let startTime = convertTimestampToDate(new Date().setTime(startTimestamp), "yyyy-MM-dd")
- let startTime1 = convertTimestampToDate(new Date().setTime(startTime1Stamp), "yyyy-MM-dd")
- let endTime = convertTimestampToDate(new Date(), "yyyy-MM-dd")
-
-
-
- this.dateRange = [startTime, endTime]
- this.dateJrxtRange = [startTime1, endTime]
-
- this.query.start_tm = startTime
- this.query.end_tm = endTime
-
- this.jrxtQuery.start_tm = startTime1
- this.jrxtQuery.end_tm = endTime
- },
-
- //初始化option
- initOption(echartsData) {
- this.option = {
- color: echartsData.color,
- tooltip: { //提示框组件
- trigger: "axis",
- backgroundColor: '#fff',
- confine: true,
-
- textStyle: {
- color: '#000',
- fontStyle: 'normal',
- fontFamily: '微软雅黑',
- fontSize: 16
- }
- },
- grid: echartsData.grid,
- dataZoom: echartsData.dataZoom,
- legend: {
- data: echartsData.legendData,
- selected: echartsData.selectedData ? echartsData.selectedData : {},
- ...echartsData.lengthPosition
- },
- xAxis: {
- data: echartsData.xAxisData,
- axisLabel: {
- show: true,
- textStyle: {
- // color: 'white', //X轴文字颜色
- fontSize: 16
- },
- // interval: 0,
- rotate: 0,
- offset: 30,
- formatter: echartsData.xFormatter
- },
- onZero: false,
- },
- yAxis: echartsData.yAxisData,
- series: echartsData.seriesData,
- }
-
- this.echartsLoading = false
-
- },
-
- //获取展示数据
- async getData(params) {
- this.echartsLoading = true
-
- const that = this
-
- this.stationData = []
- this.echartData = []
-
- //判断两日期是否超过一年
- const dtObj = this.isTwoDateOverYear(params.start_tm, params.end_tm)
-
- const {
- data: baseResData
- } = await getSYBaseDetails({
- res_cd: that.res_cd,
- ...params,
- ...dtObj
- })
-
-
- console.log("中台数据:", baseResData)
-
- const cdSourceData = {}
-
- //处理中台数据
- baseResData.press.forEach(item => {
-
- if (!cdSourceData[item.cd]) {
- cdSourceData[item.cd] = item.cd_nm
- }
- //控制两位小数
- if (item.press_val != null) item.press_val = item.press_val.toFixed(2)
-
- let stationFlag = that.stationData.some(i => i == item.cd_nm)
-
- if (stationFlag != true) {
- that.stationData.push(item.cd_nm)
-
- that.tableHeader.push({
- cd: item.cd_nm,
- label: item.cd_nm,
- val: 'station' + item.cd_nm,
- })
- }
- })
-
- let echartArr = []
-
- baseResData.dt_list.forEach(item => {
- let obj = {}
-
- obj.tm = dtObj.dt_flag == "month" ? item.substr(0, 7) : item
-
- let curRz = baseResData.rz.find(it => item == it.dt)
-
- if (curRz && curRz != undefined) {
- obj.rz = curRz.rz
- } else {
- obj.rz = ''
- }
-
- let curRain = baseResData.rain.find(it => item == it.dt)
-
- if (curRain && curRain != undefined) {
- obj.drp = curRain.drp
- } else {
- obj.drp = ''
- }
-
- that.stationData.forEach(it => {
- let wayData = baseResData.press.find(i => i.dt == item && i.cd_nm == it)
-
- if (wayData && wayData != undefined) {
- obj['station' + it] = wayData.press_val
- } else {
- obj['station' + it] = ''
- }
- })
-
- echartArr.push({
- ...obj
- })
- })
-
- //处理预测数据
- that.futureData = []
- //是否选择预测
- if (that.predictValue != "") {
-
-
- const res = await getDbFutureData({
- resCd: that.res_cd,
- type: 1,
- predictFlag: that.predictValue
- })
- console.log("预测数据:", res)
-
-
- //Arima预报数据处理
- if (that.predictValue == 'Arima') {
-
- if (res.code != 200) return
- //删除当天的时间数据
- echartArr.splice(echartArr.length - 1, 1)
- const lastData = echartArr[echartArr.length - 1]
- res.data.forEach(v => {
- const preList = []
- v.predicts = v.predicts.map(v => JSON.parse(v))
- //根据时间处理数据
- v.predicts.reduce((prev, current) => {
- //判断当前是否为空数组 是空数组直接添加比较项
- if (prev.length > 0) {
- //判断当前和第二个日期是否相等
- const flag = prev[0].substring(0, 10) == current[0].substring(0,
- 10)
- if (flag) {
- const index = preList.findIndex(v => v[0].substring(0, 10) ==
- current[0].substring(0, 10))
- preList[index] = current
- } else {
- preList.push(current)
- }
- return current
- } else {
- preList.push(current)
- }
- return current
- }, [])
- v.predicts = preList.map(v => {
- v[0] = v[0].substring(0, 10)
- return v
- }).filter(itm => {
- const itmDate = new Date(itm[0])
- const yesterday = new Date()
- yesterday.setDate(yesterday.getDate() - 1)
- return itmDate > yesterday
- })
- })
- const list = res.data.map(v => {
- return {
- pointId: v.pointId,
- predicts: v.predicts
- }
- })
- const expectList = that.expectData(list, cdSourceData)
- that.futureData = []
- expectList.forEach(v => {
- const obj = {}
- Object.keys(v).forEach(k => {
- if (k != 'tm') {
- obj[k] = v[k]
- }
- })
- that.futureData.push(obj)
- })
- const obj = {}
- Object.keys(lastData).forEach(v => {
- if (v.includes("station")) {
- obj[v] = lastData[v]
- }
- })
- const lastTimeList = [{}]
- Object.keys(obj).forEach(v => {
- const cdNum = v.replace("station", "")
- lastTimeList[0][cdNum] = obj[v]
- })
- that.futureData = [...lastTimeList, ...that.futureData]
- echartArr.push(...(expectList.map(v => {
- return {
- tm: v.tm
- }
- })))
- } else {
- if (res.code != 200) return
- //删除当天的时间数据
- echartArr.splice(echartArr.length - 1, 1)
- const lastData = echartArr[echartArr.length - 1]
- res.data.forEach(v => {
-
- v.preWaterList = JSON.parse(v.preWaterList)
- v.predictList = JSON.parse(v.predictList)
- })
- const expectList = that.hstExpectData(res.data, cdSourceData)
- that.futureData = []
- expectList.forEach(v => {
- const obj = {}
- Object.keys(v).forEach(k => {
- if (k != 'tm') {
- obj[k] = v[k]
- }
- })
- that.futureData.push(obj)
- })
- const obj = {}
- Object.keys(lastData).forEach(v => {
- if (v.includes("station")) {
- obj[v] = lastData[v]
- }
- })
- const lastTimeList = [{}]
- Object.keys(obj).forEach(v => {
- const cdNum = v.replace("station", "")
- lastTimeList[0][cdNum] = obj[v]
- })
- that.futureData = [...lastTimeList, ...that.futureData]
- echartArr.push(...(expectList.map(v => {
- return {
- tm: v.tm
- }
- })))
- }
- }
-
- console.log("echart数据:", echartArr)
- that.echartData = echartArr
-
- },
-
- //判断两日期是否相隔超过一年
- isTwoDateOverYear(startTime, endTime) {
-
- let dtObj = {}
- var begin = new Date(startTime).getTime();
- var end = new Date(endTime).getTime();
- var day = (end - begin) / (24 * 60 * 60 * 1000);
-
- if (day >= 365) {
- //超过一年,返回月数据
- dtObj.dt_flag = "month"
-
- return dtObj;
- } else {
- return dtObj;
- }
- },
-
- //Arima预报方法处理
- expectData(list, cdSourceData) {
- const deepList = JSON.parse(JSON.stringify(list))
- const expectList = []
- // 找到最大的预测数量
- const maxPredicts = Math.max(...deepList.map(item => item.predicts.length))
- // 遍历预测的数量
- for (let i = 0; i < maxPredicts; i++) {
- const predictItem = {}
-
- // 遍历原始数组
- for (let j = 0; j < deepList.length; j++) {
- const point = deepList[j]
- const predict = point.predicts[i]
-
- if (predict) {
- const stationKey = `${cdSourceData[point.pointId]}`
- const tmKey = `tm`
-
- // 添加预测值和日期到新的对象中
- predictItem[stationKey] = predict[1]
- predictItem[tmKey] = predict[0]
- }
- }
-
- // 将新的对象添加到期望的数组中
- expectList.push(predictItem)
- }
- return expectList
- },
- //Hst预报数据处理
- hstExpectData(data, cdSourceData) {
- const deepList = JSON.parse(JSON.stringify(data))
- const expectList = []
- let list = []
- deepList.forEach(v => {
- const tm = v.preWaterList.map(v => v.time)
- const predictList = v.predictList.map((cl, index) => {
- let clVlue = cl.toFixed(2)
- return {
- tm: tm[index],
- value: clVlue
- }
- })
- const obj = {
- label: cdSourceData[v.pointId],
- predictList
- }
- expectList.push(obj)
- })
- const max = Math.max(...(expectList.map(v => v.predictList.length)))
- for (let i = 0; i < max; i++) {
- const predictItem = {}
-
- // 遍历处理完数据数组
- for (let j = 0; j < expectList.length; j++) {
- const point = expectList[j]
- const predict = point.predictList[i]
- if (predict) {
- const stationKey = point.label
- const tmKey = `tm`
- // 添加预测值和日期到新的对象中
- predictItem[stationKey] = predict.value
- predictItem[tmKey] = predict.tm
- }
- }
-
- // 将新的对象添加到期望的数组中
- list.push(predictItem)
- }
- list.reduce((prev, next, index) => {
- if (prev.tm == next.tm) {
- prev.tm = ""
- return next
- }
- return next
- }, {
- tm: ""
- })
- list = list.filter(v => v.tm)
- return list
- },
-
- getAY(data, yMinValue, yMaxValue) {
- const that = this
-
- let color, legendData, xAxisData, yAxisData, seriesData, selectedData, dataZoom = [{
- type: 'slider',
- show: true,
- height: 20,
- bottom: '0%',
- start: 0,
- end: 100,
- },
- {
- type: 'inside',
- },
- ],
- xFormatter = (e) => e,
- grid = {
- top: '25%',
- left: '8%',
- right: '6%',
- bottom: '6%',
- containLabel: true,
- },
- lengthPosition = {
- top: 10,
- left: 88
- }
-
- if (this.type == 'sl') {
- color = ['#F49923', '#74A5D6', '#99E12A']
-
- legendData = ['库水位']
- selectedData = {
- '库水位': true,
- }
-
- xAxisData = data.map(item => item.tm)
-
- let rzMax = Math.max(...data.map(item => item.rz).filter(item => item != '' && item != null))
- let rzMin = Math.min(...data.map(item => item.rz).filter(item => item != '' && item != null))
-
- yAxisData = [{
- type: 'value',
- name: '渗流量(L/s)',
- splitLine: {
- show: true,
- lineStyle: {
- type: 'dashed'
- }
- },
- axisTick: {
- show: true,
- },
- axisLine: {
- show: true,
- }
- },
- {
- type: 'value',
- name: '库水位(m)',
- min: Math.floor(rzMin - (rzMax - rzMin) / 10),
- splitLine: {
- show: true,
- lineStyle: {
- type: 'dashed'
- }
- },
- axisTick: {
- show: true,
- },
- axisLine: {
- show: true,
- }
- }
- ]
-
- seriesData = [{
- name: '库水位',
- type: 'line',
- smooth: true,
- symbol: 'none',
- barWidth: '30%',
- connectNulls: true,
- data: data.map(item => item.rz),
- yAxisIndex: 1,
- }]
-
-
- that.tableHeader.forEach(item => {
- if (item.val in data[0]) {
- legendData.push(item.label)
- if (that.showStation == "") {
- selectedData[item.label] = true
- } else {
- if (item.label == '测点' + that.showStation) {
- selectedData[item.label] = true
- } else {
- selectedData[item.label] = false
- }
- }
- seriesData.push({
- name: item.label,
- type: 'line',
- smooth: true,
- symbol: 'none',
- barWidth: '30%',
- connectNulls: true,
- data: data.map(it => it[item.val]),
- })
- }
- })
- } else if (this.type == 'sy') {
- color = ['#02A6EF', '#FF1A00', '#74A5D6', '#99E12A', '#27FF7C', '#1A86FF', '#D6FF1C', '#582CFF',
- '#9D21FF', '#F04605', '#FFE3A2', '#A0EAFF', '#FF8E8E'
- ]
-
- legendData = ['雨量', '库水位']
- selectedData = {
- '雨量': true,
- '库水位': true,
- }
-
- let drpMax = data.concat([]).sort((a, b) => b.drp - a.drp)[0].drp * 2
-
- xAxisData = data.map(item => item.tm)
-
- let rzMinArray = data.map(item => item.rz)
-
- that.tableHeader.forEach(item => {
- if (item.val in data[0]) {
- rzMinArray.push(...data.map(it => it[item.val]))
- }
- })
-
- if (this.futureData.length > 0) {
- const expectList = Object.keys(this.futureData[0]).map(key => {
- const nullData = []
- //data长度-预测数据长度就是 不包含预测数据的长度
- for (let i = 0; i < data.length - this.futureData.length; i++) {
- nullData.unshift(null)
- }
- return {
- label: key,
- data: [...nullData, ...this.futureData.map((item) => item[key])],
- }
- })
- expectList.forEach(item => {
- rzMinArray.push(...item.data)
- })
- }
-
- let rzMax = Math.max(...rzMinArray.filter(item => item != '' && item != null))
- let rzMin = Math.min(...rzMinArray.filter(item => item != '' && item != null))
-
- yAxisData = [{
- type: 'value',
- name: '水位(m)',
- min: Math.floor(rzMin - (rzMax - rzMin) / 10),
- splitLine: {
- show: true,
- lineStyle: {
- type: 'dashed'
- }
- },
- axisTick: {
- show: true,
- },
- axisLine: {
- show: true,
- }
- },
- {
- type: 'value',
- name: '雨量(mm)',
- splitLine: {
- show: true,
- lineStyle: {
- type: 'dashed'
- }
- },
- nameLocation: 'start',
- inverse: true,
- max: drpMax,
- axisTick: {
- show: true,
- },
- axisLine: {
- show: true,
- }
- }
- ]
-
- seriesData = [{
- name: '雨量',
- type: 'bar',
- barWidth: '30%',
- data: data.map(item => item.drp),
- barMaxWidth: 2,
- yAxisIndex: 1,
- },
- {
- name: '库水位',
- type: 'line',
- smooth: true,
- symbol: 'none',
- barWidth: '30%',
- connectNulls: true,
- data: data.map(item => item.rz),
- }
- ]
-
- that.tableHeader.forEach(item => {
- if (item.val in data[0]) {
- legendData.push(item.label)
- if (that.showStation == "") {
- selectedData[item.label] = true
- } else {
- if (item.label == 'UPD' + that.showStation) {
- selectedData[item.label] = true
- } else {
- selectedData[item.label] = false
- }
- }
- seriesData.push({
- name: item.label,
- type: 'line',
- smooth: true,
- symbol: 'none',
- barWidth: '30%',
- connectNulls: true,
- data: data.map(it => it[item.val]),
- })
- }
- })
-
- if (this.futureData.length > 0) {
- const expectList = Object.keys(this.futureData[0]).map(key => {
- const nullData = []
- //data长度-预测数据长度就是 不包含预测数据的长度
- for (let i = 0; i < data.length - this.futureData.length; i++) {
- nullData.unshift(null)
- }
- return {
- label: key,
- data: [...nullData, ...this.futureData.map((item) => item[key])],
- }
- })
- expectList.forEach(item => {
- const index = seriesData.findIndex(v => v.name == item.label)
- const label = `预测${item.label}`
- legendData.push(label)
- if (that.showStation == "") {
- selectedData[label] = true
- } else {
- if (label == '预测UPD' + that.showStation) {
- selectedData[label] = true
- } else {
- selectedData[label] = false
- }
- }
- seriesData.push({
- name: label,
- type: 'line',
- smooth: true,
- symbol: 'none',
- barWidth: '30%',
- data: item.data,
- connectNulls: true,
- lineStyle: {
- normal: {
- color: color[index],
- width: 2,
- type: "dashed"
- }
- },
- itemStyle: {
- color: color[index]
- }
- })
- })
- }
-
- } else if (this.type == 'bx') {
- color = ['#F49923', '#74A5D6', '#99E12A', '#27FF7C', '#1A86FF', '#D6FF1C', '#582CFF', '#9D21FF',
- '#F04605', '#FFE3A2', '#A0EAFF', '#FF8E8E'
- ]
-
- if (that.dimensionality == 1) {
- legendData = ['库水位']
- selectedData = {
- '库水位': true
- }
-
- xAxisData = data.map(item => item.tm)
-
- let rzMax = Math.max(...data.map(item => item.rz).filter(item => item != '' && item != null))
- let rzMin = Math.min(...data.map(item => item.rz).filter(item => item != '' && item != null))
-
- yAxisData = [{
- type: 'value',
- name: that.displacementType == '水平位移' ? that.direction + '水平位移(mm)' : '垂直位移(mm)',
- splitLine: {
- show: true,
- lineStyle: {
- type: 'dashed'
- }
- },
- axisTick: {
- show: true,
- },
- axisLine: {
- show: true,
- }
- },
- {
- type: 'value',
- name: '库水位(m)',
- min: Math.floor(rzMin - (rzMax - rzMin) / 10),
- splitLine: {
- show: true,
- lineStyle: {
- type: 'dashed'
- }
- },
- axisTick: {
- show: true,
- },
- axisLine: {
- show: true,
- }
- }
- ]
-
- seriesData = [{
- name: '库水位',
- type: 'line',
- smooth: true,
- symbol: 'none',
- barWidth: '30%',
- connectNulls: true,
- data: data.map(item => item.rz),
- yAxisIndex: 1,
- }]
-
- if (that.displacementType == '水平位移') {
- if (that.direction == '上下游') {
- that.tableHeader.forEach(item => {
- if (data[0][item.x] || data[0][item.x] === 0) {
- legendData.push(item.label)
-
- if (that.showStation == "") {
- selectedData[item.label] = true
- } else {
- if (item.label == 'GN' + that.showStation) {
- selectedData[item.label] = true
- } else {
- selectedData[item.label] = false
- }
- }
- seriesData.push({
- name: item.label,
- type: 'line',
- smooth: true,
- symbol: 'none',
- barWidth: '30%',
- connectNulls: true,
- data: data.map(it => it[item.x]),
- })
- }
- })
- const xList = this.futureData.filter(v => v.type == '3')
- if (xList.length > 0) {
- xList[0].list.forEach(item => {
- const index = seriesData.findIndex(v => v.name == item.label)
- const label = `预测${item.label}`
- const xData = item.data.map(v => v[1])
- const length = data.length - xData.length
- legendData.push(label)
- if (that.showStation == "") {
- selectedData[label] = true
- } else {
- if (label == '预测UPD' + that.showStation) {
- selectedData[label] = true
- } else {
- selectedData[label] = false
- }
- }
- for (var i = 0; i < length; i++) {
- xData.unshift(null)
- }
- seriesData.push({
- name: label,
- type: 'line',
- smooth: true,
- symbol: 'none',
- barWidth: '30%',
- data: xData,
- color: color[index],
- connectNulls: true,
- lineStyle: {
- normal: {
- color: color[index],
- width: 2,
- type: "dashed"
- }
- },
- })
- })
- }
- } else {
- that.tableHeader.forEach(item => {
- if (data[0][item.y] || data[0][item.y] === 0) {
- legendData.push(item.label)
- if (that.showStation == "") {
- selectedData[item.label] = true
- } else {
- if (item.label == 'GN' + that.showStation) {
- selectedData[item.label] = true
- } else {
- selectedData[item.label] = false
- }
- }
- seriesData.push({
- name: item.label,
- type: 'line',
- smooth: true,
- symbol: 'none',
- barWidth: '30%',
- connectNulls: true,
- data: data.map(it => it[item.y]),
- })
- }
- })
- const yList = this.futureData.filter(v => v.type == '4')
- if (yList.length > 0) {
- yList[0].list.forEach(item => {
- const index = seriesData.findIndex(v => v.name == item.label)
- const xData = item.data.map(v => v[1])
- const length = data.length - xData.length
- for (var i = 0; i < length; i++) {
- xData.unshift(null)
- }
- seriesData.push({
- name: `预测${item.label}`,
- type: 'line',
- smooth: true,
- symbol: 'none',
- barWidth: '30%',
- data: xData,
- color: color[index],
- connectNulls: true,
- lineStyle: {
- normal: {
- color: color[index],
- width: 2,
- type: "dashed"
- }
- },
- })
- })
- }
- }
- } else {
- that.tableHeader.forEach(item => {
- if (data[0][item.u] || data[0][item.u] === 0) {
- legendData.push(item.label)
- if (that.showStation == "") {
- selectedData[item.label] = true
- } else {
- if (item.label == 'GN' + that.showStation) {
- selectedData[item.label] = true
- } else {
- selectedData[item.label] = false
- }
- }
- seriesData.push({
- name: item.label,
- type: 'line',
- smooth: true,
- symbol: 'none',
- barWidth: '30%',
- connectNulls: true,
- data: data.map(it => it[item.u]),
- })
- }
- })
- const zList = this.futureData.filter(v => v.type == '5')
- if (zList.length > 0) {
- zList[0].list.forEach(item => {
- const index = seriesData.findIndex(v => v.name == item.label)
- const xData = item.data.map(v => v[1])
- const length = data.length - xData.length
- for (var i = 0; i < length; i++) {
- xData.unshift(null)
- }
- seriesData.push({
- name: `预测${item.label}`,
- type: 'line',
- smooth: true,
- symbol: 'none',
- barWidth: '30%',
- data: xData,
- color: color[index],
- connectNulls: true,
- lineStyle: {
- normal: {
- color: color[index],
- width: 2,
- type: "dashed"
- }
- },
- })
- })
- }
- }
- } else {
- legendData = []
-
- xAxisData = that.tableHeader.map(item => item.label)
-
- yAxisData = [{
- type: 'value',
- name: that.displacementType == '水平位移' ? that.direction + '水平位移(mm)' : '垂直位移(mm)',
- splitLine: {
- show: true,
- lineStyle: {
- type: 'dashed'
- }
- },
- axisTick: {
- show: true,
- },
- axisLine: {
- show: true,
- }
- }]
-
- seriesData = []
-
- if (that.displacementType == '水平位移') {
- if (that.direction == '上下游') {
- data.forEach(item => {
- legendData.push(item.tm)
-
- let arr = []
- that.tableHeader.forEach(i => {
- arr.push(item[i.x])
- })
-
- seriesData.push({
- name: item.tm,
- type: 'line',
- smooth: true,
- symbol: 'none',
- barWidth: '30%',
- connectNulls: true,
- data: arr,
- })
- })
- } else {
- data.forEach(item => {
- legendData.push(item.tm)
-
- let arr = []
- that.tableHeader.forEach(i => {
- arr.push(item[i.y])
- })
-
- seriesData.push({
- name: item.tm,
- type: 'line',
- smooth: true,
- symbol: 'none',
- barWidth: '30%',
- connectNulls: true,
- data: arr,
- })
- })
- }
- } else {
- data.forEach(item => {
- legendData.push(item.tm)
-
- let arr = []
- that.tableHeader.forEach(i => {
- arr.push(item[i.u])
- })
-
- seriesData.push({
- name: item.tm,
- type: 'line',
- smooth: true,
- symbol: 'none',
- barWidth: '30%',
- connectNulls: true,
- data: arr,
- })
- })
- }
- }
- } else if (this.type == 'default') {
- color = ['#02A6EF', '#F49923', '#74A5D6', '#99E12A', '#27FF7C', '#1A86FF', '#D6FF1C', '#582CFF',
- '#9D21FF', '#F04605', '#FFE3A2', '#A0EAFF', '#FF8E8E'
- ]
-
- grid = {
- top: '12%',
- left: '2%',
- right: '5%',
- bottom: '2%',
- containLabel: true,
- }
-
- let drpMax = data.concat([]).sort((a, b) => b.drp - a.drp)[0].drp * 2
-
- legendData = ['雨量', '库水位']
- lengthPosition = {}
- selectedData = {
- '雨量': true,
- '库水位': true,
- }
-
- xAxisData = data.map(item => item.tm)
-
- yAxisData = [{
- type: 'value',
- name: '库水位(m)',
- splitLine: {
- show: true,
- lineStyle: {
- type: 'dashed'
- }
- },
- axisTick: {
- show: true,
- },
- axisLine: {
- show: true,
- },
- min: yMinValue,
- max: yMaxValue
- },
- {
- type: 'value',
- name: '雨量(mm)',
- splitLine: {
- show: false,
- lineStyle: {
- type: 'dashed'
- }
- },
- nameLocation: 'start',
- inverse: true,
- max: drpMax,
- axisTick: {
- show: true,
- },
- axisLine: {
- show: true,
- }
- }
- ]
-
- seriesData = [{
- name: '雨量',
- type: 'bar',
- barWidth: '30%',
- data: data.map(item => item.drp),
- barMaxWidth: 2,
- yAxisIndex: 1,
- },
- {
- name: '库水位',
- type: 'line',
- smooth: true,
- symbol: 'none',
- barWidth: '30%',
- connectNulls: true,
- data: data.map(item => item.rz),
- }
- ]
-
- dataZoom = [{
- type: 'slider',
- show: false,
- height: 20,
- bottom: '0%',
- start: 0,
- end: 100,
- },
- {
- type: 'inside',
- },
- ]
-
- xFormatter = (params) => {
- let arr = params.split(' ')
-
- if (arr.length > 1) {
- return arr[0] + '\n' + arr[1]
- } else {
- return arr[0]
- }
- }
- }
-
- return {
- color,
- grid,
- legendData,
- xAxisData,
- yAxisData,
- seriesData,
- dataZoom,
- selectedData,
- xFormatter
- }
- },
-
-
- }
- }
-</script>
-
-<style scoped lang="scss">
- .container {
-
- padding: 10rpx;
-
-
-
- .card-view {
- .card-head {
-
-
- display: flex;
-
- .title {
- width: 200rpx;
- }
- }
-
- .card-content {
- .card_box {
- display: flex;
- align-items: center;
- flex-shrink: 0;
-
- // margin: 0px 5px;
-
- .date {
- flex: 1;
-
- .data-item {
- display: flex;
- align-items: center;
- justify-content: space-between;
- min-height: 70rpx;
- font-size: 28rpx;
-
- >view {
- flex: 1;
- text-align: center;
- }
- }
-
- // width: 440rpx;
- }
-
- .title {
- font-size: 28rpx;
- }
- }
-
- .btn-group {}
- }
- }
-
- }
-
- .df {
- display: flex;
- }
-
- .h {
- min-height: 70rpx;
- }
-
- ::v-deep .uni-date-x--border {
- border: none !important;
- }
-
- /deep/ .uni-date-editor--x {
- border: none !important;
- }
-
- /deep/ .datetime-picker--uni-date-x {
- background-color: #eaf2fc !important;
- }
-
- /deep/ .uni-date-x {
- background-color: #eaf2fc !important;
- }
-
- /deep/ .uni-date-x .icon-calendar {
- display: none;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/dbSafety/index.vue b/subPackage/dbSafety/index.vue
deleted file mode 100644
index b62c2ff..0000000
--- a/subPackage/dbSafety/index.vue
+++ /dev/null
@@ -1,211 +0,0 @@
-<template>
- <view class="container">
- <!-- <view style="height: 88rpx;"></view> -->
- <view class="customizeBar">
- <u-navbar placeholder title="大坝安全监测" autoBack bgColor="#5887f9" titleStyle="color:#ffffff"
- leftIconColor="#ffffff" safeAreaInsetTop>
- </u-navbar>
- </view>
-
- <view class="tab">
- <u-tabs :itemStyle="{width: '160rpx' ,height: '88rpx' }" :activeStyle="{color: '#99bada' }" lineWidth="60"
- :current="currentIndex" :list="tabList" @click="tabClick">
- </u-tabs>
- <Search placeholder='请输入水库名称' style="width: 100%;" v-model="searchVal" @search="search">
- <template slot="prefix">
- <view class="prefix_wrap">
- <view class="text">
- <regionSelect :isTown="false" @regionChange="regionChange"></regionSelect>
- </view>
- <view class="icon">
- <u-icon name="arrow-down-fill" size="12"></u-icon>
- </view>
- </view>
- </template>
- <template slot='suffix'>
- <view class="prefix_wrap" style="margin-right: 20rpx;">
- <view class="text">
- <BasinSelect :code='code' @basinChange="basinChange"></BasinSelect>
- </view>
- <view class="icon">
- <u-icon name="arrow-down-fill" size="12"></u-icon>
- </view>
- </view>
- </template>
- </Search>
- </view>
-
-
- <view style="height: 180rpx;"></view>
-
- <view class="main">
- <Sy :res_nm="searchVal" :region='region' ref="Sy" v-if="currentIndex==0"></Sy>
- <Wy :res_nm="searchVal" :region='region' ref="Wy" v-if="currentIndex==1"></Wy>
- <Sl :res_nm="searchVal" :region='region' ref="Sl" v-if="currentIndex==2"></Sl>
- </view>
- <my-select v-if="visible" :show="visible" type="radio" v-model="value" popupTitle="请选择" :dataLists="selectList"
- @cancel="visible=false" @submit="selectSubmit">
- </my-select>
- </view>
-</template>
-
-<script>
- import Sy from "@/subPackage/dbSafety/components/sy.vue"
- import Wy from "@/subPackage/dbSafety/components/wy.vue"
- import Sl from "@/subPackage/dbSafety/components/sl.vue"
- import mySelect from "@/components/my-components/my-select.vue"
- import Search from "@/components/my-components/search.vue"
- import regionSelect from "@/components/my-components/regionSelect.vue"
- import BasinSelect from '@/components/my-components/basinSelect.vue'
- export default {
- components: {
- Sy,
- Wy,
- Search,
- mySelect,
- Sl,
- regionSelect,
- BasinSelect
- },
- data() {
- return {
- currentIndex: 0,
- visible: false,
- searchVal: "",
- code:"",
- tabList: [{
- name: "渗压监测"
- },
- {
- name: "变形监测"
- },
- {
- name: "渗流监测"
- },
- ],
- pages: {
- pageSize: 25,
- pageNo: 1
- },
- region: {},
- value: "0",
- title: "渗压",
- selectList: [{
- name: "渗压",
- value: "0"
- },
- {
- name: "位移",
- value: "1"
- },
- ],
- }
- },
- onPullDownRefresh() {
- if (this.currentIndex == 0) {
- this.$nextTick(() => {
- this.$refs.Sy.getSyListData(this.pages.pageSize, this.pages.pageNo)
- })
- } else if (this.currentIndex == 1) {
- this.$nextTick(() => {
- this.$refs.Wy.getWyListData(this.pages.pageSize, this.pages.pageNo)
- })
- } else if (this.currentIndex == 2) {
- this.$nextTick(() => {
- this.$refs.Sl.getSlListData(this.pages.pageSize, this.pages.pageNo)
- })
- }
- },
- methods: {
- tabClick(item) {
- this.currentIndex = item.index
- },
- search(e) {
- this.bindTable()
- },
- bindTable() {
- if (this.currentIndex == 0) {
- this.$refs.Sy.pages.pageNo = 1
- this.$refs.Sy.region = this.region
- } else if (this.currentIndex == 1) {
- this.$refs.Wy.pages.pageNo = 1
- this.$refs.Wy.region = this.region
- } else if (this.currentIndex == 2) {
- this.$refs.Sl.region = this.region
- this.$refs.Sl.pages.pageNo = 1
- }
- this.$refs.Sy && this.$refs.Sy.getSyListData()
- this.$refs.Wy && this.$refs.Wy.getWyListData()
- this.$refs.Sl && this.$refs.Sl.getSlListData()
- },
- selectSubmit(e) {
- this.title = e.name
- this.currentIndex = e.value
- this.visible = false
- },
- regionChange(region) {
- //数据处理
- const eumn = {
- 1: "province_cd",
- 2: "city_cd",
- 3: "county_cd",
- }
- this.region['label'] = eumn[region.adGrad]
- this.region['value'] = region.adCode
- this.code = region.adCode
- this.bindTable()
- },
- basinChange(basin) {
- this.basin = basin
- this.region.name = basin.name
- this.bindTable()
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- .container {
- // min-height: 100vh;
- overflow: hidden;
-
- // .customizeBar {
- // height: 160rpx;
- // }
-
- .tab {
- display: flex;
- flex-direction: column;
- justify-content: space-evenly;
- width: 100%;
- position: fixed;
- background-color: #ffffff;
- z-index: 2;
- align-items: center;
- padding-bottom: 20rpx;
- // padding: 20rpx 0;
-
- .prefix_wrap {
- display: flex;
- align-items: center;
- min-width: 120rpx;
- justify-content: center;
- flex-shrink: 0;
- // padding: 0 20rpx;
-
- .text {
- margin-left: 20rpx;
- color: #333333;
- font-family: PingFang-SC-Medium;
- font-size: 30rpx;
- }
-
- .img-icon {
- display: flex;
- width: 22rpx;
- height: 18rpx;
- }
- }
- }
- }
-</style>
\ No newline at end of file
diff --git "a/subPackage/dbSafety/slList - \345\211\257\346\234\254.vue" "b/subPackage/dbSafety/slList - \345\211\257\346\234\254.vue"
deleted file mode 100644
index cd344ca..0000000
--- "a/subPackage/dbSafety/slList - \345\211\257\346\234\254.vue"
+++ /dev/null
@@ -1,458 +0,0 @@
-<template>
- <view class="container">
- <!--顶部导航栏-->
- <view class="customizeBar">
- <u-navbar placeholder title="渗流监测" autoBack bgColor="#5887f9" titleStyle="color:#ffffff"
- leftIconColor="#ffffff" safeAreaInsetTop>
- </u-navbar>
- </view>
-
- <!--筛选栏-->
- <view class="top-bar">
- <mySearch v-if="mySearchShow" :defaultValue="adBase" :keyWord="query.res_nm" @getKey="getSearchKey"
- @regionChange="regionChange" @basinChange="basinChange">
- </mySearch>
- <uFilter :top="filterTop" :menuList="dropDownData" :defaultModel="defaultSelected" @submit='dropDownConfirm'
- @reset='resetDropDown'></uFilter>
- </view>
-
- <view class="data-list">
- <view class="data-item" v-for="(item,index) in dataList" :key="index">
- <dataItem :item="item" type="sy"></dataItem>
- </view>
-
-
- <u-loading-page :loading="loadingPage"></u-loading-page>
- <u-loading-icon text="加载中" textSize="18" :show="loadingIcon"></u-loading-icon>
-
- </view>
-
- </view>
-</template>
-
-<script>
- import uFilter from "@/subPackage/dbSafety/components/filterBar.vue"
- import mySearch from "@/subPackage/dbSafety/components/my-search.vue"
- import dataItem from "@/subPackage/dbSafety/components/dataItem.vue"
- import {
- bizDictionary
- } from "@/api/system/dict"
- import {
- dropDownData
- } from "@/subPackage/dbSafety/const/dropDownData.js"
- import {
- getLatestSySlData
- } from "@/api/dataCenter/dbSafety/dbSafety"
- import {
- reservoirList
- } from "@/api/dataCenter/reservoir/reservoir"
- export default {
- components: {
- mySearch,
- uFilter,
- dataItem
- },
-
- data() {
- return {
- //当用户没有行政区划时为false,隐藏搜索框
- mySearchShow: true,
- //当前登录用户的行政区划
- adBase: uni.getStorageSync("adCodeBase"),
- //查询参数
- query: {},
- //下拉选项
- dropDownData: dropDownData,
- //默认选中
- defaultSelected: {},
-
- //列表数据
- dataList: [],
-
- page: {
- pageSize: 48,
- pageNo: 1
- },
-
- loadingPage: false,
- loadingIcon: false,
- }
- },
- computed: {
- //自适应计算筛选栏高度
- filterTop() {
- const info = uni.getWindowInfo()
- const statusBar = info.statusBarHeight
- return 69 - (statusBar / 2)
- }
- },
- created() {
-
- },
- mounted() {
-
- },
- onLoad(option) {
- this.initDict()
- },
- onShow() {
-
- },
- onReachBottom() {
- this.page.pageNo += 1
- this.getDataList()
- },
- methods: {
- //初始化字典
- initDict() {
- bizDictionary({
- code: "RES_LABEL"
- }).then(res => {
- let data = res.data
- let obj = this.dropDownData[0].children.find(e => e.label == "标签")
- obj.option = []
-
- data.forEach(e => {
- obj.option.push({
- label: e.dictValue,
- value: `${e.dictKey}`
- })
- })
- this.initDefault()
- this.buildRegion(this.adBase)
- })
- },
-
- //初始化默认选择
- initDefault() {
- this.defaultSelected = {
- //排序
- is_order: "1",
- //是否有数据
- is_has_data: "y",
- //工程规模
- eng_scal: "",
- //是否病险
- danger_stat: "",
- //标签
- label_str: "",
- //收藏
- collect: "",
- }
-
- Object.assign(this.query, this.defaultSelected)
-
- },
-
- //获取输入框搜索条件
- getSearchKey(key) {
- this.query.res_nm = key
- this.reload()
- },
-
- //行政区划改变
- regionChange(region) {
- this.buildRegion(region)
- },
-
- //流域变更
- basinChange(basin) {
- console.log("流域:", basin)
- this.query.bas_guid = basin.name
- this.reload()
- },
-
- //下拉选择项
- dropDownConfirm(data) {
- console.log("下拉选择项:", data)
- this.page.pageNo = 1
-
- let objKey = Object.keys(data)
-
- objKey.forEach(key => {
- if (data["label_str"] && key == "label_str") {
- this.query[key] = data[key].join(",")
- } else {
- this.query[key] = data[key]
- }
- })
- console.log(this.query, "---------")
- this.getDataList()
- },
-
- //重置下拉选项
- resetDropDown() {
- this.initDefault()
- this.reload()
- },
-
- //重新加载
- reload() {
- this.page.pageNo = 1
- this.getDataList()
- },
-
- //获取列表数据
- async getDataList() {
-
- if (this.page.pageNo == 1) {
- this.dataList = []
- this.loadingPage = !this.loadingPage
- } else {
- this.loadingIcon = !this.loadingIcon
- }
-
- let params = {}
- Object.assign(params, this.query, this.page, this.getResIds())
-
- console.log("查询条件", Object.assign(params, this.query, this.page, this.getResIds()))
-
- const res = await getLatestSySlData(params)
- let data = res.data
- console.log(res, "-----")
-
- let arr = await this.buildArr(data)
- this.dataList = this.dataList.concat(arr)
-
- if (this.page.pageNo == 1) {
- this.loadingPage = !this.loadingPage
- } else {
- this.loadingIcon = !this.loadingIcon
- }
-
- console.log("最终数据", this.dataList)
- },
-
- getResIds() {
- if (this.query.collect == 1) {
- this.collectResIds = this.userInfo.detail.collect ? this.userInfo.detail.collect : 0
- this.collectResIds = this.collectResIds.split(",").map(e => `${e}`).join(",")
- } else {
- this.collectResIds = ""
- }
- return {
- res_str: this.collectResIds
- }
- },
-
- //构建arr
- async buildArr(data) {
- let resCds = []
- let arr = []
-
- //遍历sy列表
- data.sy.forEach((sy, index) => {
-
- //判断sl列表中是否有相同的res_cd
- const sl = data.sl.find(v => v.res_cd === sy.res_cd)
-
- //有则把sl数据添加进arr中
- if (sl) {
- arr.push({
- sy: sy,
- sl: sl
- })
- } else {
- arr.push({
- sy: sy,
- sl: {}
- })
- }
-
- resCds.push(sy.res_cd)
- })
-
- arr.forEach(item => {
- item.sy.children.sort((a, b) => a.cd - b.cd)
-
- item.sy.children.forEach(item => {
- if (item.trend == '1') {
- item.iconClass = 'icon-wendushangsheng'
- } else if (item.trend == '-1') {
- item.iconClass = 'icon-wenduxiajiang'
- } else if (item.trend == '0') {
- item.iconClass = 'icon-a-youjiantouzhixiangyoujiantou'
- }
- })
- })
-
- //遍历渗流数组
- data.sl.forEach((sl, index) => {
-
- //判断arr中是否已有相同的sl数据
- const sy = arr.find(v => {
-
- if (v.sl.res_cd) {
- return v.sl.res_cd === sl.res_cd
- } else {
- return false
- }
- })
- if (sy) {
-
- } else {
- arr.push({
- sy: {},
- sl: sl
- })
- }
- resCds.push(sl.res_cd)
- })
-
- console.log(arr, "------------")
- console.log(resCds, "/*/*/*")
- const res_cds = resCds.map(e => `'${e}'`).join(",")
- const res = await reservoirList(999, 1, {
- res_cds
- })
-
- let reservoirData = res.data.data
- //循环arr,从reservoirData中获取当前水位,昨日雨量
- arr.forEach(item => {
- reservoirData.forEach(reservoir => {
- if (item.sy.res_cd == reservoir.res_cd || item.sl.res_cd == reservoir.res_cd) {
-
-
- reservoir.current_site_image = ''
- reservoir.current_site_image_index = ''
- reservoir.imagesArray = []
-
- if (reservoir.station_image && reservoir.station_image.trim().length > 0) {
-
- let arr = []
-
- if (reservoir.station_image.indexOf(',') != -1) {
- arr = reservoir.station_image.split(',').map(arrItem => {
- if (arrItem.indexOf('~') != -1) {
- if (arrItem.split('~').length > 2) {
- arrItem = arrItem.split('~')
- } else {
- let cur = arrItem.split('~')
- cur.push(this.publicPath +
- 'img/emptyImg.514374af.png')
- arrItem = cur
- }
- }
-
- return arrItem
- })
- } else {
- if (reservoir.station_image.indexOf('~') != -1) {
- if (reservoir.station_image.split('~').length > 2) {
- arr = [reservoir.station_image.split('~')]
- } else {
- let cur = reservoir.station_image.split('~')
- cur.push(this.publicPath + 'img/emptyImg.514374af.png')
- arr = [cur]
- }
- }
- }
-
- if (arr && arr.length > 0) {
- arr.forEach(arrItem => {
-
- let urlStr = arrItem[2]
-
- if (urlStr.indexOf(
- 'http://183.95.190.143:9096/images') != -
- 1) {
- urlStr = urlStr.replace(
- 'http://183.95.190.143:9096/images',
- 'https://sk.hubeishuiyi.cn/imgWLW/images')
- }
-
- if (urlStr.indexOf(
- 'http://223.75.53.106:8891/skjgimages') != -
- 1) {
- urlStr = urlStr.replace(
- `http://223.75.53.106:8891/skjgimages`,
- `https://sk.hubeishuiyi.cn/imgLK/skjgimages`
- )
- }
-
- reservoir.imagesArray.push({
- title: arrItem[1],
- url: urlStr
- })
- })
- }
-
- reservoir.current_site_image = reservoir.imagesArray.length > 0 ?
- reservoir.imagesArray[0] :
- ''
- reservoir.current_site_image_index = reservoir.imagesArray.length > 0 ?
- 0 : ''
- reservoir.current_site_image.url = reservoir.current_site_image.url
- .replace(/\\/g, "/");
- }
-
-
-
-
-
-
- if (reservoir.rz && reservoir.rz_1h) {
- reservoir.powerIconShow = true
- if (reservoir.rz - reservoir.rz_1h > 0) {
- reservoir.iconClass = 'icon-wendushangsheng'
- } else if (reservoir.rz - reservoir.rz_1h < 0) {
- reservoir.iconClass = 'icon-wenduxiajiang'
- }
- } else {
- reservoir.powerIconShow = false
- }
- item.reservoir = reservoir
- }
- })
- })
- return arr
- },
-
- //对行政区划进行处理
- buildRegion(region) {
- delete this.query.city_cd
- delete this.query.county_cd
- delete this.query.town_cd
-
- if (region.adGrad == 4) {
- this.query.town_cd = region.adCode
- }
- //市
- if (region.adGrad == 2) {
- this.query.city_cd = region.adCode
- }
- //区
- if (region.adGrad == 3) {
- this.query.county_cd = region.adCode
- }
-
- this.adBase = region
-
- this.reload()
- }
-
- }
- }
-</script>
-
-<style scoped lang="scss">
- .container {
-
- .container {
- min-height: 100vh;
- }
-
- .top-bar {
- width: 100%;
- display: flex;
- justify-content: space-around;
- // position: fixed;
- // top: 200rpx;
- flex-direction: column;
- position: -webkit-sticky;
- position: sticky;
- top: calc(var(--status-bar-height) + 80rpx);
- // top: 80rpx;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/dbSafety/slList.vue b/subPackage/dbSafety/slList.vue
deleted file mode 100644
index 0466e1f..0000000
--- a/subPackage/dbSafety/slList.vue
+++ /dev/null
@@ -1,569 +0,0 @@
-<template>
- <view class="container">
- <!--顶部导航栏-->
- <view class="customizeBar">
- <u-navbar placeholder title="渗流监测" autoBack bgColor="#5887f9" titleStyle="color:#ffffff"
- leftIconColor="#ffffff" safeAreaInsetTop>
- </u-navbar>
- </view>
-
- <!--筛选栏-->
- <view class="top-bar">
- <mySearch v-if="mySearchShow" :defaultValue="adBase" :keyWord="query.res_nm" @getKey="getSearchKey"
- @regionChange="regionChange" @basinChange="basinChange">
- </mySearch>
- <uFilter :top="filterTop" :menuList="dropDownData" :defaultModel="defaultSelected" @submit='dropDownConfirm'
- @reset='resetDropDown'></uFilter>
- </view>
-
- <view class="data-list">
- <view class="data-item" v-for="(item,index) in pageList" :key="index">
- <dataItem :item="item" type="sy">
- <template slot="custom">
- <tabInfo v-if="item.sy.children" type="sy" :dataItem="item.sy" style="margin-top: 5px;">
- </tabInfo>
- <tabInfo v-if="item.sl.children" type="sl" :dataItem="item.sl">
- </tabInfo>
- </template>
- </dataItem>
- </view>
-
- <u-loading-page :loading="loadingPage"></u-loading-page>
- <u-loading-icon text="加载中" textSize="18" :show="loadingIcon"></u-loading-icon>
-
- </view>
-
- </view>
-</template>
-
-<script>
- import uFilter from "@/subPackage/dbSafety/components/filterBar.vue"
- import mySearch from "@/subPackage/dbSafety/components/my-search.vue"
- import dataItem from "@/subPackage/dbSafety/components/dataItem.vue"
- import tabInfo from "@/subPackage/dbSafety/components/tabInfo.vue"
- import {
- bizDictionary
- } from "@/api/system/dict"
- import {
- dropDownData
- } from "@/subPackage/dbSafety/const/dropDownData.js"
- import {
- getLatestSySlData
- } from "@/api/dataCenter/dbSafety/dbSafety"
- import {
- reservoirList
- } from "@/api/dataCenter/reservoir/reservoir"
- export default {
- components: {
- mySearch,
- uFilter,
- dataItem,
- tabInfo
- },
-
- data() {
- return {
- //当用户没有行政区划时为false,隐藏搜索框
- mySearchShow: true,
- //当前登录用户的行政区划
- adBase: uni.getStorageSync("adCodeBase"),
- //查询参数
- query: {},
- //下拉选项
- dropDownData: dropDownData,
- //默认选中
- defaultSelected: {},
-
- //列表数据
- dataList: [],
- pageList: [],
- page: {
- pageSize: 12,
- pageNo: 1
- },
-
- loadingPage: false,
- loadingIcon: false,
- }
- },
- computed: {
- //自适应计算筛选栏高度
- filterTop() {
- const info = uni.getWindowInfo()
- const statusBar = info.statusBarHeight
- return 69 - (statusBar / 2)
- }
- },
- created() {
-
- },
- mounted() {
-
- },
- onLoad(option) {
- this.initDict()
- },
- onShow() {
-
- },
- onReachBottom() {
- this.page.pageNo += 1
- this.pageData(this.dataList)
- },
- methods: {
- //初始化字典
- initDict() {
- bizDictionary({
- code: "RES_LABEL"
- }).then(res => {
- let data = res.data
- let obj = this.dropDownData[1].children.find(e => e.label == "标签")
- obj.option = []
-
- data.forEach(e => {
- obj.option.push({
- label: e.dictValue,
- value: `${e.dictKey}`
- })
- })
- this.initDefault()
- this.buildRegion(this.adBase)
- })
- },
-
- //初始化默认选择
- initDefault() {
- this.defaultSelected = {
- //排序
- order_syf: "cd_max_diff_rz",
- //是否有数据
- is_has_data: "y",
- //工程规模
- eng_scal: "",
- //是否病险
- danger_stat: "",
- //标签
- label_str: "",
- //收藏
- collect: "",
- }
-
- Object.assign(this.query, this.defaultSelected)
-
- },
-
- //获取输入框搜索条件
- getSearchKey(key) {
- this.query.res_nm = key
- this.reload()
- },
-
- //行政区划改变
- regionChange(region) {
- this.buildRegion(region)
- },
-
- //流域变更
- basinChange(basin) {
- this.query.bas_guid = basin.name
- this.reload()
- },
-
- //下拉选择项
- dropDownConfirm(data) {
- this.page.pageNo = 1
-
- let objKey = Object.keys(data)
-
- objKey.forEach(key => {
- if (data["label_str"] && key == "label_str") {
- this.query[key] = data[key].join(",")
- } else {
- this.query[key] = data[key]
- }
- })
- console.log(this.query, "---------")
- this.getDataList()
- },
-
- //重置下拉选项
- resetDropDown() {
- this.initDefault()
- this.reload()
- },
-
- //重新加载
- reload() {
- this.page.pageNo = 1
- this.getDataList()
- },
-
- //获取列表数据
- async getDataList() {
- if (this.page.pageNo == 1) {
- this.pageList = []
- this.loadingPage = !this.loadingPage
- } else {
- this.loadingIcon = !this.loadingIcon
- }
-
- let params = {}
- Object.assign(params, this.query, this.page, this.getResIds())
-
- console.log("查询条件", Object.assign(params, this.query, this.page, this.getResIds()))
-
- const res = await getLatestSySlData(params)
- let data = res.data
- const sy = this.classifyArrayGroupBySameFieldAlpha(data.sy, "res_cd")
- const sl = this.classifyArrayGroupBySameFieldAlpha(data.sl, "res_cd")
- let arr = await this.buildArr({
- sy,
- sl
- })
-
- this.dataList = arr
-
- this.pageData(this.dataList)
-
- if (this.page.pageNo == 1) {
- this.loadingPage = !this.loadingPage
- } else {
- this.loadingIcon = !this.loadingIcon
- }
- console.log("最终数据", this.pageList)
- },
-
- //前端分页
- pageData(dataList) {
- let pageObj = this.getTableData(this.page.pageNo, this.page.pageSize, dataList)
- this.pageList = this.pageList.concat(pageObj.data)
- },
-
- /**
- * @name getTableData
- * @desc 纯JS前端分页方法
- * @param {Number} page 当前页码,默认1
- * @param {Number} pageSize 每页最多显示条数,默认10
- * @param {Array} totalData 总的数据集,默认为空数组
- * @return {Object} {
- data, //当前页展示数据,数组
- page, //当前页码
- pageSize, //每页最多显示条数
- length, //总的数据条数
- }
- **/
- getTableData(page = 1, pageSize = 10, totalData = []) {
- const {
- length
- } = totalData;
- const tableData = {
- data: [],
- page,
- pageSize,
- length,
- };
- if (pageSize >= length) { //pageSize大于等于总数据长度,说明只有1页数据或没有数据
- tableData.data = totalData;
- tableData.page = 1; //直接取第一页
- } else { //pageSize小于总数据长度,数据多余1页
- const num = pageSize * (page - 1); //计算当前页(不含)之前的所有数据总条数
- if (num < length) { //如果当前页之前所有数据总条数小于(不能等于)总的数据集长度,则说明当前页码没有超出最大页码
- const startIndex = num; //当前页第一条数据在总数据集中的索引
- const endIndex = num + pageSize - 1; //当前页最后一条数据索引
- tableData.data = totalData.filter((_, index) => index >= startIndex && index <=
- endIndex); //当前页数据条数小于每页最大条数时,也按最大条数范围筛取数据
- } else { //当前页码超出最大页码,则计算实际最后一页的page,自动返回最后一页数据
- const size = parseInt(length / pageSize); //取商
- const rest = length % pageSize; //取余数
- if (rest > 0) { //余数大于0,说明实际最后一页数据不足pageSize,应该取size+1为最后一条的页码
- tableData.page = size + 1; //当前页码重置,取size+1
- tableData.data = totalData.filter((_, index) => index >= (pageSize * size) && index <= length);
- } else if (rest === 0) { //余数等于0,最后一页数据条数正好是pageSize
- tableData.page = size; //当前页码重置,取size
- tableData.data = totalData.filter((_, index) => index >= (pageSize * (size - 1)) && index <=
- length);
- } //注:余数不可能小于0
- }
- }
- return tableData;
- },
-
-
- getResIds() {
- if (this.query.collect == 1) {
- this.collectResIds = this.userInfo.detail.collect ? this.userInfo.detail.collect : 0
- this.collectResIds = this.collectResIds.split(",").map(e => `${e}`).join(",")
- } else {
- this.collectResIds = ""
- }
- return {
- res_str: this.collectResIds
- }
- },
-
- // arr 目标对象数组
- // filed 分组字段
- classifyArrayGroupBySameFieldAlpha(arr, filed) {
- let temObj = {}
- for (let i = 0; i < arr.length; i++) {
- let item = arr[i]
- if (!temObj[item[filed]]) {
- temObj[item[filed]] = [item]
- } else {
- temObj[item[filed]].push(item)
- }
- }
- let resArr = []
- Object.keys(temObj).forEach(key => {
- resArr.push({
- res_cd: key,
- children: temObj[key],
- })
- })
- return resArr
- },
-
- //构建arr
- async buildArr(data) {
- let resCds = []
- let arr = []
- //遍历sy列表
- data.sy.forEach((sy, index) => {
-
- //判断sl列表中是否有相同的res_cd
- const sl = data.sl.find(v => v.res_cd === sy.res_cd)
-
- //有则把sl数据添加进arr中
- if (sl) {
- arr.push({
- sy: sy,
- sl: sl
- })
- } else {
- arr.push({
- sy: sy,
- sl: {}
- })
- }
-
- resCds.push(sy.res_cd)
- })
-
- //遍历渗流数组
- data.sl.forEach((sl, index) => {
-
- //判断arr中是否已有相同的sl数据
- const sy = arr.find(v => {
-
- if (v.sl.res_cd) {
- return v.sl.res_cd === sl.res_cd
- } else {
- return false
- }
- })
- if (sy) {
-
- } else {
- arr.push({
- sy: {},
- sl: sl
- })
- }
- resCds.push(sl.res_cd)
- })
- arr.forEach(item => {
-
- if (item.sy.children && item.sy.children.length > 0) {
- item.sy.children.sort((a, b) => a.cd - b.cd)
-
- item.sy.children.forEach(item => {
- if (item.trend == '1') {
- item.iconClass = 'icon-wendushangsheng'
- } else if (item.trend == '-1') {
- item.iconClass = 'icon-wenduxiajiang'
- } else if (item.trend == '0') {
- item.iconClass = 'icon-a-xiangyoujiantou'
- }
- })
- }
- if (item.sl.children && item.sl.children.length > 0) {
- item.sl.children.sort((a, b) => a.cd - b.cd)
-
- item.sl.children.forEach(item => {
- if (item.trend == '1') {
- item.iconClass = 'icon-wendushangsheng'
- } else if (item.trend == '-1') {
- item.iconClass = 'icon-wenduxiajiang'
- } else if (item.trend == '0') {
- item.iconClass = 'icon-a-xiangyoujiantou'
- }
- })
- }
- })
-
-
-
- const res_cds = resCds.map(e => `'${e}'`).join(",")
- const res = await reservoirList(999, 1, {
- res_cds
- })
-
- let reservoirData = res.data.data
- //循环arr,从reservoirData中获取当前水位,昨日雨量
- arr.forEach(item => {
- reservoirData.forEach(reservoir => {
- if (item.sy.res_cd == reservoir.res_cd || item.sl.res_cd == reservoir.res_cd) {
-
- reservoir.current_site_image = ''
- reservoir.current_site_image_index = ''
- reservoir.imagesArray = []
-
- if (reservoir.station_image && reservoir.station_image.trim().length > 0) {
-
- let arr = []
-
- if (reservoir.station_image.indexOf(',') != -1) {
- arr = reservoir.station_image.split(',').map(arrItem => {
- if (arrItem.indexOf('~') != -1) {
- if (arrItem.split('~').length > 2) {
- arrItem = arrItem.split('~')
- } else {
- let cur = arrItem.split('~')
- cur.push(this.publicPath +
- 'img/emptyImg.514374af.png')
- arrItem = cur
- }
- }
-
- return arrItem
- })
- } else {
- if (reservoir.station_image.indexOf('~') != -1) {
- if (reservoir.station_image.split('~').length > 2) {
- arr = [reservoir.station_image.split('~')]
- } else {
- let cur = reservoir.station_image.split('~')
- cur.push(this.publicPath + 'img/emptyImg.514374af.png')
- arr = [cur]
- }
- }
- }
-
- if (arr && arr.length > 0) {
- arr.forEach(arrItem => {
-
- let urlStr = arrItem[2]
-
- if (urlStr.indexOf(
- 'http://183.95.190.143:9096/images') != -
- 1) {
- urlStr = urlStr.replace(
- 'http://183.95.190.143:9096/images',
- 'https://sk.hubeishuiyi.cn/imgWLW/images')
- }
-
- if (urlStr.indexOf(
- 'http://223.75.53.106:8891/skjgimages') != -
- 1) {
- urlStr = urlStr.replace(
- `http://223.75.53.106:8891/skjgimages`,
- `https://sk.hubeishuiyi.cn/imgLK/skjgimages`
- )
- }
-
- reservoir.imagesArray.push({
- title: arrItem[1],
- url: urlStr
- })
- })
- }
-
- reservoir.current_site_image = reservoir.imagesArray.length > 0 ?
- reservoir.imagesArray[0] :
- ''
- reservoir.current_site_image_index = reservoir.imagesArray.length > 0 ?
- 0 : ''
- reservoir.current_site_image.url = reservoir.current_site_image.url
- .replace(/\\/g, "/");
- }
-
- if (reservoir.rz && reservoir.rz_1h) {
- reservoir.powerIconShow = true
- if (reservoir.rz - reservoir.rz_1h > 0) {
- reservoir.iconClass = 'icon-wendushangsheng'
- } else if (reservoir.rz - reservoir.rz_1h < 0) {
- reservoir.iconClass = 'icon-wenduxiajiang'
- }
- } else {
- reservoir.powerIconShow = false
- }
- item.reservoir = reservoir
- }
-
- })
- })
-
- this.listInCollect(reservoirData)
-
- return arr
- },
-
- //判断当前集合是否在收藏里
- listInCollect(list) {
- let collectResIds = this.userInfo.detail.collect
- if (list.length > 0) {
- list.forEach(res => {
- res.isCollect = collectResIds.indexOf(res.res_cd) > -1 ? 1 : 2
- })
- }
- },
-
- //对行政区划进行处理
- buildRegion(region) {
- delete this.query.city_cd
- delete this.query.county_cd
- delete this.query.town_cd
-
- if (region.adGrad == 4) {
- this.query.town_cd = region.adCode
- }
- //市
- if (region.adGrad == 2) {
- this.query.city_cd = region.adCode
- }
- //区
- if (region.adGrad == 3) {
- this.query.county_cd = region.adCode
- }
-
- this.adBase = region
-
- this.reload()
- },
-
-
- }
- }
-</script>
-
-<style scoped lang="scss">
- .container {
-
- .container {
- min-height: 100vh;
- }
-
- .top-bar {
- width: 100%;
- display: flex;
- justify-content: space-around;
- // position: fixed;
- // top: 200rpx;
- flex-direction: column;
- position: -webkit-sticky;
- position: sticky;
- top: calc(var(--status-bar-height) + 80rpx);
- // top: 80rpx;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/jcsb/components/boxTitle.vue b/subPackage/jcsb/components/boxTitle.vue
deleted file mode 100644
index 38e4200..0000000
--- a/subPackage/jcsb/components/boxTitle.vue
+++ /dev/null
@@ -1,72 +0,0 @@
-<template>
- <div class="box-title-container flex j-c-s-b">
- <div class="title-name">
- {{ title }}
- </div>
-
- <div class="region-more">
- <div class="region">
- <slot name="region"></slot>
- </div>
- <div class="more">
- <slot name="more"></slot>
- </div>
- </div>
- </div>
-</template>
-
-<script>
- export default {
- name: 'BoxTitle',
- props: {
- title: {
- type: String,
- default: ''
- }
- }
- }
-</script>
-
-<style lang="scss" scoped>
- .box-title-container {
- height: 36px;
- line-height: 36px;
-
- .title-name {
- padding-left: 10px;
- position: relative;
- font-size: 20px;
- font-family: Microsoft YaHei-Bold, Microsoft YaHei;
- font-weight: bold;
- color: #333333;
-
- &::after {
- content: '';
- position: absolute;
- top: 50%;
- left: 0;
- width: 4px;
- height: 18px;
- background: #1890FF;
- border-radius: 2px 2px 2px 2px;
- opacity: 1;
- transform: translate(0, -50%);
- }
- }
-
- .region {
- font-size: 20px;
- font-family: Alibaba PuHuiTi-Bold, Alibaba PuHuiTi;
- font-weight: bold;
- color: #333333;
- }
-
- .more {
- font-size: 15px;
- font-family: Microsoft YaHei-Regular, Microsoft YaHei;
- font-weight: 400;
- color: #1890FF;
- cursor: pointer;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/jcsb/db/index.vue b/subPackage/jcsb/db/index.vue
deleted file mode 100644
index ebfdac5..0000000
--- a/subPackage/jcsb/db/index.vue
+++ /dev/null
@@ -1,475 +0,0 @@
-<template>
- <view class="container">
-
- <!--上报信息-->
- <card class="card">
- <view slot="insideHead">
- <boxTitle title="上报信息"></boxTitle>
- </view>
- <view class="content" slot="content">
- <u-form :model="form" :rules="rules" ref="form">
- <u-form-item :labelWidth="labelWidth" label="水库名称:" @click="disabled?skShow=false:skShow = true">
- <u--input border="bottom" v-model="resName" disabled disabledColor="#ffffff"
- placeholder="请选择水库">
- </u--input>
- <u-icon slot="right" name="arrow-right"></u-icon>
- </u-form-item>
-
- <u-form-item :labelWidth="labelWidth" label="类型:" required prop="type" @click="typeShow = true">
- <u--input border="bottom" v-model="typeName" disabled disabledColor="#ffffff"
- placeholder="请选择类型">
- </u--input>
- <u-icon slot="right" name="arrow-right"></u-icon>
- </u-form-item>
-
- <u-form-item :labelWidth="labelWidth" label="测点:" required @click="stationShow = true"
- prop="stationId">
- <u--input border="bottom" v-model="stationName" disabled disabledColor="#ffffff"
- placeholder="请选择测点">
- </u--input>
- <u-icon slot="right" name="arrow-right"></u-icon>
- </u-form-item>
-
- <u-form-item :labelWidth="labelWidth" label="记录时间:" @click="timeVisible = true" required
- prop="recordTime">
- <u--input border="bottom" v-model="form.recordTime" disabled disabledColor="#ffffff"
- placeholder="请选择记录时间">
- </u--input>
- </u-form-item>
-
- <u-form-item v-if="form.type !='wy' " :labelWidth="labelWidth" label="监测值:" required prop="val">
- <u--input border="bottom" v-model="form.val" placeholder="填写监测值">
- <u--text :text="unit" slot="suffix" margin="0 3px 0 0"></u--text>
- </u--input>
- </u-form-item>
-
-
- <u-form-item v-else :labelWidth="labelWidth" label="监测值:" required>
- <view>
- <u-form-item :labelWidth="85" label="水平位移X:" prop="x">
- <u--input border="bottom" v-model="form.x" placeholder="请输入监测值">
- <u--text :text="unit" slot="suffix" margin="0 3px 0 0"></u--text>
- </u--input>
- </u-form-item>
- <u-form-item :labelWidth="85" label="水平位移Y:" prop="y">
- <u--input border="bottom" v-model="form.y" placeholder="请输入监测值">
- <u--text :text="unit" slot="suffix" margin="0 3px 0 0"></u--text>
- </u--input>
- </u-form-item>
- <u-form-item :labelWidth="85" label="垂直位移:" prop="z">
- <u--input border="bottom" v-model="form.z" placeholder="请输入监测值">
- <u--text :text="unit" slot="suffix" margin="0 3px 0 0"></u--text>
- </u--input>
- </u-form-item>
- </view>
- </u-form-item>
-
-
-
- <u-form-item :labelWidth="labelWidth" label="描述:" prop="description">
- <u-textarea confirmType="done" v-model="form.description" placeholder="请填写描述">
- </u-textarea>
- </u-form-item>
-
-
- </u-form>
- </view>
- </card>
-
- <view class="page-footer">
- <u-button type="primary" text="提交" @click="submit"></u-button>
- </view>
-
- <!-- 水库下拉框 -->
- <my-select v-if="skShow" :show="skShow" v-model="form.reservoirId" type="radio" popupTitle="请选择水库"
- :dataLists="skSelectList" @cancel="skShow = false" @submit="skSelect">
- </my-select>
-
- <!-- 类型下拉框 -->
- <my-select v-if="typeShow" :show="typeShow" v-model="form.type" type="radio" popupTitle="请选择测站类型"
- :dataLists="typeSelectList" @cancel="typeShow = false" @submit="typeSelect">
- </my-select>
-
- <!-- 测点下拉框 -->
- <my-select v-if="stationShow" :show="stationShow" v-model="form.stationId" type="radio" popupTitle="请选择测点"
- :dataLists="stationSelectList" @cancel="stationShow = false" @submit="stationSelect">
- </my-select>
-
- <!--时间选择-->
- <u-datetime-picker :formatter="formatter" :show="timeVisible" mode="datetime" v-model="recordTime"
- @confirm="timeConfirm" @cancel="timeVisible = false">
- </u-datetime-picker>
-
- </view>
-</template>
-
-<script>
- import mySelect from "@/components/my-components/my-select.vue"
- import card from "@/components/my-components/card.vue"
- import boxTitle from "@/subPackage/jcsb/components/boxTitle.vue"
- import {
- convertTimestampToDate
- } from "@/utils/date"
- import {
- addDb,
- } from "@/api/jcsb/dangerReport/dangerReport.js"
- import {
- reservoirList
- } from "@/api/dataCenter/reservoir/reservoir.js"
- import {
- getStationList
- } from "@/api/dataCenter/dbSafety/dbSafety"
-
- function isNumber(val) {
- let reg = /^\d+(\.\d+)?$/
- if (reg.test(val)) {
- return true
- } else {
- return false
- }
- }
-
- export default {
- components: {
- mySelect,
- card,
- boxTitle
- },
- data() {
- return {
- labelWidth: 70,
-
- resName: '',
- typeName: "",
- stationName: "",
- recordTime: "",
-
- skShow: false,
- typeShow: false,
- timeVisible: false,
- stationShow: false,
- skSelectList: [],
- typeSelectList: [{
- value: "sy",
- name: "渗压站",
- },
- {
- value: "sl",
- name: "渗流站",
- },
- {
- value: "wy",
- name: "变形站",
- },
- ],
- stationSelectList: [],
-
- form: {
- reservoirId: "",
- type: "",
- stationId: "",
- val: "",
- recordTime: "",
- description: "",
- x: "",
- y: "",
- z: "",
- },
- handleForm: {
- toImages: [],
- toDesinfo: "",
- status: 1
- },
- rules: {
- 'type': {
- required: true,
- message: '请选择测站类型',
- trigger: ['blur', 'change']
- },
-
- 'stationId': {
- required: true,
- message: '请选择测点',
- trigger: ['blur', 'change']
- },
- 'recordTime': {
- required: true,
- message: '请选择上报时间',
- trigger: ['blur', 'change']
- },
- 'val': {
- required: true,
- message: '请输入监测值',
- trigger: ['blur', 'change'],
- // type: 'float',
- validator: (rule, value, callback) => {
- // 上面有说,返回true表示校验通过,返回false表示不通过
- return isNumber(value)
- },
- },
- 'x': {
- required: true,
- message: '请输入水平位移X监测值',
- trigger: ['blur', 'change'],
- // type: 'float',
- validator: (rule, value, callback) => {
- // 上面有说,返回true表示校验通过,返回false表示不通过
- return isNumber(value)
- },
- },
- 'y': {
- required: true,
- message: '请输入水平位移Y监测值',
- trigger: ['blur', 'change'],
- // type: 'float',
- validator: (rule, value, callback) => {
- // 上面有说,返回true表示校验通过,返回false表示不通过
- return isNumber(value)
- },
- },
- 'z': {
- required: true,
- message: '请输入垂直位移监测值',
- trigger: ['blur', 'change'],
- // type: 'float',
- validator: (rule, value, callback) => {
- // 上面有说,返回true表示校验通过,返回false表示不通过
- return isNumber(value)
- },
- }
-
- },
- disabled: false,
- unit: "",
- }
- },
- watch: {},
- onLoad(option) {
- this.init()
- this.getReservoirList()
- },
- mounted() {
-
- },
- methods: {
- clearValidate() {
- this.$refs.form.clearValidate()
- },
-
- async submit() {
- const that = this
- const res = await this.$refs.form.validate()
-
- if (res) {
-
- this.form.reservoirName = this.resName
-
- if (this.form.type == "wy") {
- let arr = [this.form.x, this.form.y, this.form.z]
- this.form.val = arr.join(",")
- }
-
- addDb(this.form).then(res => {
- uni.showToast({
- icon: 'success',
- title: '提交成功',
- success() {
- setTimeout(() => {
- that.$u.func.globalNavigator(
- "/pages/home/patrolIndex", "switchTab")
- }, 1000)
- }
- })
- })
- }
- },
-
- //获取测站数据
- getStation() {
-
- if (this.form.reservoirId == "" || this.form.type == "") {
- return
- }
-
- let params = {
- res_cd: this.form.reservoirId,
- cd_type: this.form.type
- }
-
- this.form.stationId = ""
- this.stationName = ""
-
- getStationList(params).then(res => {
- let data = res.data
- this.stationSelectList = []
-
- data.forEach(e => {
- this.stationSelectList.push({
- value: e.cd,
- name: e.cd_nm
- })
- })
-
- })
- },
-
- timeConfirm(data) {
- let timeStamp = data.value
- let time = convertTimestampToDate(timeStamp, "yyyy-MM-dd hh:mm:ss")
- this.form.recordTime = time
- this.timeVisible = false
- },
- //时间显示格式化
- formatter(type, value) {
- if (type === 'year') {
- return `${value}年`
- }
- if (type === 'month') {
- return `${value}月`
- }
- if (type === 'day') {
- return `${value}日`
- }
- if (type === 'hour') {
- return `${value}时`
- }
- if (type === 'minute') {
- return `${value}分`
- }
- return value
- },
-
- init() {
- this.initTime()
- let arr = this.userInfo.detail.resIds.split(",")
- var filterArr = arr.filter(function(item, index) {
- return arr.indexOf(item) === index; // 因为indexOf 只能查找到第一个
- });
- this.resIds = filterArr.join(",")
- },
-
- //初始化时间
- initTime() {
- this.recordTime = convertTimestampToDate(new Date)
- },
-
- // 水库下拉框数据
- async getReservoirList() {
- if (this.resIds == "") {
- return
- }
- let params = {
- res_cds: this.resIds.split(",").map(e => `'${e}'`).join(",")
- }
- reservoirList(100, 1, params).then(res => {
- let data = res.data.data
- for (let i = 0; i < data.length; i++) {
- if (i == 0) {
- this.resName = data[i].res_nm
- this.form.reservoirId = data[i].res_cd
- }
- let skRes = {
- value: data[i].res_cd,
- name: data[i].res_nm
- }
- this.skSelectList.push(skRes)
- }
- })
- },
-
- //水库选择
- skSelect(data) {
- this.form.reservoirId = data.value
- this.resName = data.name
- this.skShow = false
- this.getStation()
- },
-
- typeSelect(data) {
- this.form.type = data.value
- this.typeName = data.name
- this.typeShow = false
-
- if (data.value == "sy") {
- this.unit = '(m)'
- } else if (data.value == "sl") {
- this.unit = '(L/s)'
- } else if (data.value == "wy") {
- this.unit = '(mm)'
- }
-
- this.clearValidate()
- this.getStation()
- },
-
- stationSelect(data) {
- this.form.stationId = data.value
- this.stationName = data.name
- this.stationShow = false
- },
-
- /** 数组去重
- * 思路:利用数组的 indexOf 下标属性来查询
- * @param arr 需要去重的数组
- * @param t 根据 t 字段(指定)进行去重
- * @returns {*[]} 已去重后的数据
- */
- deduplicate(arr, t = "") {
- const newArr = [],
- assignList = []
- // 有指定字段
- if (t) {
- for (let i = 0; i < arr.length; i++) {
- if (assignList.indexOf(arr[i][t]) === -1) {
- assignList.push(arr[i][t])
- newArr.push(arr[i])
- }
- }
- }
- // 无指定字段
- else {
- for (let i = 0; i < arr.length; i++) {
- if (newArr.indexOf(arr[i]) === -1) newArr.push(arr[i])
- }
- }
- return newArr
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- .container {
- overflow: hidden;
- // padding: 0 14rpx;
-
- .page-footer {
- position: fixed;
- bottom: 0;
- width: 100%;
- }
- }
-
- .card {
- .content {
- padding: 0 30rpx;
- border: 5rpx solid #edf6ff;
-
- .item {
- display: flex;
- align-items: center;
-
- .label {
- width: 150rpx;
- }
-
- }
-
- }
-
- .image {
- width: 100rpx;
- height: 100rpx;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/jcsb/jcsb/index.vue b/subPackage/jcsb/jcsb/index.vue
deleted file mode 100644
index 7e6cd62..0000000
--- a/subPackage/jcsb/jcsb/index.vue
+++ /dev/null
@@ -1,462 +0,0 @@
-<template>
- <view class="container">
-
- <!--上报信息-->
- <card class="card">
- <view slot="insideHead">
- <boxTitle title="上报信息"></boxTitle>
- </view>
- <view class="content" slot="content">
- <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
- <u-form-item labelWidth="100" label="水库名称:" @click="disabled?skShow=false:skShow = true">
- <u--input border="bottom" v-model="resName" disabled disabledColor="#ffffff"
- placeholder="请选择水库">
- </u--input>
- <u-icon slot="right" name="arrow-right"></u-icon>
- </u-form-item>
-
- <u-form-item labelWidth="100" required label="情况说明:" prop="desinfo">
- <u-textarea confirmType="done" :disabled="disabled" v-model="form.desinfo"
- placeholder="请填写情况说明">
- </u-textarea>
- </u-form-item>
-
- <u-form-item labelWidth="100" required prop="images" label="现场图片:">
- <u-upload v-if="!disabled" :fileList="form.images"
- :previewFullImage="uploadConfig.previewFullImage" :accept="uploadConfig.acceptImg"
- :maxCount="uploadConfig.maxCount" :multiple="uploadConfig.multiple"
- :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
- </u-upload>
-
- <image v-if="disabled" @click="previewFullImage(img)" class="image"
- v-for="(img,index) in form.images" :key="index" :src="img.url"></image>
- </u-form-item>
-
- <u-form-item v-if="!disabled" labelWidth="100" required prop="toUser" label="处理人:"
- @click="selectShow.type = true">
- <u--input border="bottom" v-model="form.toUserText" disabled disabledColor="#ffffff"
- placeholder="请选择处理人">
- </u--input>
- <u-icon slot="right" name="arrow-right"></u-icon>
- </u-form-item>
- </u-form>
- </view>
- </card>
-
-
-
- <!--处理-->
- <card v-if="disabled" class="card">
- <view slot="insideHead">
- <boxTitle title="处理"></boxTitle>
- </view>
- <view class="content" slot="content">
- <u-form labelWidth="70" :model="handleForm" :rules="rules" ref="handleForm">
-
- <u-form-item labelWidth="100" required label="处理说明:" prop="toDesinfo">
- <u-textarea confirmType="done" v-model="handleForm.toDesinfo" placeholder="请填写处理说明">
- </u-textarea>
- </u-form-item>
-
- <u-form-item labelWidth="100" required prop="toImages" label="处理图片:">
- <u-upload :fileList="handleForm.toImages" :previewFullImage="uploadConfig.previewFullImage"
- :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
- :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
- @afterRead="afterReadHandleImg" @delete="deleteHandlePic">
- </u-upload>
- </u-form-item>
- </u-form>
- </view>
- </card>
- <view class="place" style="height: 100rpx;">
-
- </view>
-
- <view class="page-footer">
- <u-button type="primary" text="提交" @click="submit"></u-button>
- </view>
-
-
- <!-- 水库下拉框 -->
- <my-select v-if="skShow" :show="skShow" v-model="form.reservoirId" type="radio" popupTitle="请选择水库"
- :dataLists="skSelectList" @cancel="skShow = false" @submit="skSelect">
- </my-select>
- <!-- 处理人下拉框 -->
- <my-select v-if="selectShow.type" :show="selectShow.type" v-model="form.toUser" type="radio" popupTitle="请选择处理人"
- :dataLists="selectList" @cancel="selectShow.type = false" @submit="typeSelect">
- </my-select>
- </view>
-</template>
-
-<script>
- import mySelect from "@/components/my-components/my-select.vue"
- import card from "@/components/my-components/card.vue"
- import boxTitle from "@/subPackage/jcsb/components/boxTitle.vue"
- import {
- add,
- update
- } from "@/api/jcsb/dangerReport/dangerReport.js"
- import {
- findResManagePersonByResIdReturnSys
- } from "@/api/dataCenter/responsiblePerson/responsiblePerson.js"
- import {
- reservoirList
- } from "@/api/dataCenter/reservoir/reservoir.js"
- import {
- devUrl,
- clientId,
- clientSecret
- } from '@/common/setting'
- import {
- Base64
- } from '@/utils/base64.js';
- import {
- fileUrlConvert
- } from "@/subPackage/patrol/util/fileUtil.js"
- export default {
- components: {
- mySelect,
- card,
- boxTitle
- },
- data() {
- return {
- resName: '',
- skShow: false,
- selectShow: {
- type: false,
- },
- selectList: [],
- skSelectList: [],
- form: {
- toUser: "",
- images: [],
- type: "1",
- status: 2
- },
- handleForm: {
- toImages: [],
- toDesinfo: "",
- status: 1
- },
- rules: {
- 'desinfo': {
- required: true,
- message: '请输入说明',
- trigger: ['blur', 'change']
- },
- 'images': {
- type: 'array',
- required: true,
- message: '请上传图片',
- trigger: ['blur', 'change']
- },
- 'toUser': {
- required: true,
- message: '请选择处理人',
- trigger: ['change']
- },
-
- 'toDesinfo': {
- required: true,
- message: '请输入处理说明',
- trigger: ['blur', 'change']
- },
- 'toImages': {
- type: 'array',
- required: true,
- message: '请上传处理图片',
- trigger: ['blur', 'change']
- },
- },
- uploadConfig: {
- acceptImg: "image",
- acceptVideo: 'video',
- capture: ['album', 'camera'],
- multiple: true,
- maxCount: "5",
- previewFullImage: true,
- uploadText: "上传中",
- url: devUrl + "/api/blade-resource/oss/endpoint/put-file-attach",
- header: {},
- },
- disabled: false,
- }
- },
- watch: {},
- onLoad(option) {
- this.getHeader()
- if (option.dangerReport) {
- this.disabled = true
- let dangerReport = JSON.parse(option.dangerReport)
- //配置上报信息
- this.form.images = dangerReport.images
- this.resName = dangerReport.reservoirName
- this.form.desinfo = dangerReport.desinfo
- //配置处理form
- this.handleForm.id = dangerReport.id
- } else {
- this.init()
- this.getReservoirList()
- }
- },
- mounted() {
-
- },
- methods: {
- showLoading() {
- uni.showLoading({
- mask: true,
- title: '上传中'
- })
- },
- loadingClose() {
- uni.hideLoading()
- },
- init() {
- let arr = this.userInfo.detail.resIds.split(",")
- var filterArr = arr.filter(function(item, index) {
- return arr.indexOf(item) === index; // 因为indexOf 只能查找到第一个
- });
- this.resIds = filterArr.join(",")
- },
- // 水库下拉框数据
- async getReservoirList() {
- if (this.resIds == "") {
- return
- }
- let params = {
- res_cds: this.resIds.split(",").map(e => `'${e}'`).join(",")
- }
- reservoirList(100, 1, params).then(res => {
- let data = res.data.data
- for (let i = 0; i < data.length; i++) {
- if (i == 0) {
- this.resName = data[i].res_nm
- this.form.reservoirId = data[i].res_cd
- }
- let skRes = {
- value: data[i].res_cd,
- name: data[i].res_nm
- }
- this.skSelectList.push(skRes)
- }
- this.findResManagePersonByResId()
- })
- },
- // 处理人下拉框数据
- async findResManagePersonByResId() {
- findResManagePersonByResIdReturnSys({
- resGuid: this.form.reservoirId
- }).then(res => {
- let data = res.data
- //先过滤同一个人
- let noRepeat = this.deduplicate(data, 'value')
- //再过滤自己
- let filter = noRepeat.filter(person => person.value != this.userInfo.user_id)
- this.selectList = filter
- })
- },
- //获取头部
- getHeader() {
- let accessToken = uni.getStorageSync('accessToken');
- let myHeader = {}
- if (accessToken) {
- myHeader['Blade-Auth'] = 'bearer ' + accessToken;
- }
- // 客户端认证参数
- myHeader['Authorization'] = 'Basic ' + Base64.encode(clientId + ':' + clientSecret);
- this.header = myHeader
- this.uploadConfig.header = myHeader
- },
- //读取后的处理函数
- async afterReadImg(event) {
- this.showLoading()
- // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
- let lists = [].concat(event.file)
- let fileListLen = this.form.images.length
- lists.map((item) => {
- this.form.images.push({
- ...item,
- status: 'uploading',
- message: '上传中'
- })
- })
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url)
- let item = this.form.images[fileListLen]
- this.form.images.splice(fileListLen, 1, Object.assign({}, {
- url: fileUrlConvert(result.data.link)
- }))
- fileListLen++
- }
- this.loadingClose()
- },
-
- //读取后的处理函数
- async afterReadHandleImg(event) {
- this.showLoading()
- // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
- let lists = [].concat(event.file)
- let fileListLen = this.handleForm.toImages.length
- lists.map((item) => {
- this.handleForm.toImages.push({
- ...item,
- status: 'uploading',
- message: '上传中'
- })
- })
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url)
- let item = this.handleForm.toImages[fileListLen]
- this.handleForm.toImages.splice(fileListLen, 1, Object.assign({}, {
- url: fileUrlConvert(result.data.link)
- }))
- fileListLen++
- }
- this.loadingClose()
- },
-
- //上传方法
- uploadFilePromise(url) {
- return new Promise((resolve, reject) => {
- let a = uni.uploadFile({
- url: this.uploadConfig.url, //接口地址
- filePath: url,
- name: 'file',
- header: this.uploadConfig.header,
- success: (res) => {
- let data = JSON.parse(res.data)
- setTimeout(() => {
- resolve(data)
- }, 1000)
- }
- });
- })
- },
-
-
- //删除图片
- deletePic(event) {
- this.form.images.splice(event.index, 1)
- },
- //删除图片
- deleteHandlePic(event) {
- this.handleForm.toImages.splice(event.index, 1)
- },
-
- async submit() {
- const that = this
- if (this.disabled) {
- //处理
- this.$refs.handleForm.validate().then(res => {
- if (res) {
- update(this.handleForm).then(res => {
- uni.showToast({
- icon: 'success',
- title: '提交成功',
- success() {
- setTimeout(() => {
- that.$u.func.globalNavigator(
- "/pages/home/patrolIndex",
- "switchTab")
- }, 1000)
- }
- })
- })
- }
- })
- } else {
- const res = await this.$refs.form.validate()
- let that = this
- if (res) {
- this.form.createUser = uni.getStorageSync("userInfo").user_id
- add(this.form).then(res => {
- uni.showToast({
- icon: 'success',
- title: '提交成功',
- success() {
- setTimeout(() => {
- that.$u.func.globalNavigator(
- "/pages/home/patrolIndex", "switchTab")
- }, 1000)
- }
- })
- })
- }
- }
- },
- //责任人选择
- typeSelect(data) {
- this.form.toUser = data.value
- this.form.toUserText = data.name
- this.selectShow.type = false
- },
- //水库选择
- skSelect(data) {
- this.form.reservoirId = data.value
- this.resName = data.name
- this.skShow = false
- this.findResManagePersonByResId()
- },
- //图片预览
- previewFullImage(img) {
- uni.previewImage({
- // current: e, //预览图片的下标
- urls: [img.url] //预览图片的地址,必须要数组形式,如果不是数组形式就转换成数组形式就可以
- })
- },
- /** 数组去重
- * 思路:利用数组的 indexOf 下标属性来查询
- * @param arr 需要去重的数组
- * @param t 根据 t 字段(指定)进行去重
- * @returns {*[]} 已去重后的数据
- */
- deduplicate(arr, t = "") {
- const newArr = [],
- assignList = []
- // 有指定字段
- if (t) {
- for (let i = 0; i < arr.length; i++) {
- if (assignList.indexOf(arr[i][t]) === -1) {
- assignList.push(arr[i][t])
- newArr.push(arr[i])
- }
- }
- }
- // 无指定字段
- else {
- for (let i = 0; i < arr.length; i++) {
- if (newArr.indexOf(arr[i]) === -1) newArr.push(arr[i])
- }
- }
- return newArr
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- .container {
- overflow: hidden;
- // padding: 0 14rpx;
-
- .page-footer {
- position: fixed;
- bottom: 0;
- width: 100%;
- }
- }
-
- .card {
- .content {
- padding: 0 30rpx;
- border: 5rpx solid #edf6ff;
- }
-
- .image {
- width: 100rpx;
- height: 100rpx;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/jcsb/manageProtect/index.vue b/subPackage/jcsb/manageProtect/index.vue
deleted file mode 100644
index cc124f9..0000000
--- a/subPackage/jcsb/manageProtect/index.vue
+++ /dev/null
@@ -1,434 +0,0 @@
-<template>
- <view class="container">
-
- <!--上报信息-->
- <card class="card">
- <view slot="insideHead">
- <boxTitle title="上报信息"></boxTitle>
- </view>
- <view class="content" slot="content">
- <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
- <u-form-item labelWidth="100" label="水库名称:" @click="isDetail?skShow = false:skShow = true">
- <u--input border="bottom" v-model="resName" disabled disabledColor="#ffffff"
- placeholder="请选择水库">
- </u--input>
- <u-icon slot="right" name="arrow-right"></u-icon>
- </u-form-item>
-
- <u-form-item labelWidth="100" label="上报时间:"
- @click=" isDetail?timeVisible = false:timeVisible = true" required prop="reportTime">
- <u--input border="bottom" v-model="form.reportTime" disabled disabledColor="#ffffff"
- placeholder="请选择上报时间">
- </u--input>
- </u-form-item>
-
- <u-form-item labelWidth="100" label="管护类型:" @click="isDetail?typeShow = false: typeShow = true"
- required prop="type">
- <u--input border="bottom" v-model="form.typeLabel" disabled disabledColor="#ffffff"
- placeholder="请选择管护类型">
- </u--input>
- <u-icon slot="right" name="arrow-right"></u-icon>
- </u-form-item>
-
- <u-form-item labelWidth="100" label="情况说明:" required prop="content">
- <u-textarea :disabled="isDetail" confirmType="done" v-model="form.content"
- placeholder="请填写情况说明">
- </u-textarea>
- </u-form-item>
-
- <u-form-item labelWidth="100" label="现场图片:" required prop="images">
- <u-upload :disabled="isDetail" :fileList="form.images"
- :previewFullImage="uploadConfig.previewFullImage" :accept="uploadConfig.acceptImg"
- :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
- :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
- </u-upload>
- </u-form-item>
-
- <u-form-item labelWidth="100" label="现场视频:">
- <u-upload :disabled="isDetail" :fileList="form.videos"
- :previewFullImage="uploadConfig.previewFullImage" :accept="uploadConfig.acceptVideo"
- :multiple="false" :maxCount="1" :capture="uploadConfig.capture" @afterRead="afterReadVideo"
- @delete="deleteVideo">
- </u-upload>
- </u-form-item>
-
- </u-form>
- </view>
- </card>
-
-
-
-
- <view class="page-footer">
- <u-button v-if="!isDetail" type="primary" text="提交" @click="submit"></u-button>
- </view>
-
- <!-- 水库下拉框 -->
- <my-select v-if="skShow" :show="skShow" v-model="form.reservoirId" type="radio" popupTitle="请选择水库"
- :dataLists="skSelectList" @cancel="skShow = false" @submit="skSelect">
- </my-select>
-
- <!-- 管护类型下拉框 -->
- <my-select v-if="typeShow" :show="typeShow" v-model="form.type" type="radio" popupTitle="请选择管护类型"
- :dataLists="typeList" @cancel="typeShow = false" @submit="typeSelect">
- </my-select>
-
- <!--时间选择-->
- <u-datetime-picker :formatter="formatter" :show="timeVisible" mode="datetime" v-model="reportTime"
- @confirm="timeConfirm" @cancel="timeVisible = false">
- </u-datetime-picker>
- </view>
-</template>
-
-<script>
- import mySelect from "@/components/my-components/my-select.vue"
- import card from "@/components/my-components/card.vue"
- import boxTitle from "@/subPackage/jcsb/components/boxTitle.vue"
- import {
- add,
- } from "@/api/manageProtect/manageProtectRecord.js"
- import {
- reservoirList
- } from "@/api/dataCenter/reservoir/reservoir.js"
- import {
- devUrl,
- clientId,
- clientSecret
- } from '@/common/setting'
- import {
- Base64
- } from '@/utils/base64.js';
- import {
- fileUrlConvert
- } from "@/subPackage/patrol/util/fileUtil.js"
- import {
- convertTimestampToDate
- } from "@/utils/date"
- import {
- bizDictionary
- } from "@/api/system/dict"
- export default {
- components: {
- mySelect,
- card,
- boxTitle
- },
- data() {
- return {
- resName: '',
- skShow: false,
- typeShow: false,
- selectShow: {
- type: false,
- },
- selectList: [],
- skSelectList: [],
- typeList: [],
- timeVisible: false,
- form: {
- images: [],
- videos: [],
- type: "",
- typeLabel: "",
- reservoirId: "",
- content: "",
- reportTime: "",
- },
- reportTime: "",
- rules: {
- 'reportTime': {
- required: true,
- message: '请选择上报时间',
- trigger: ['blur', 'change']
- },
- 'type': {
- required: true,
- message: '请选择管护类型',
- trigger: ['blur', 'change']
- },
- 'content': {
- required: true,
- message: '请输入说明',
- trigger: ['blur', 'change']
- },
- 'images': {
- type: 'array',
- required: true,
- message: '请上传图片',
- trigger: ['blur', 'change']
- },
- },
- uploadConfig: {
- acceptImg: "image",
- acceptVideo: 'video',
- capture: ['album', 'camera'],
- multiple: true,
- maxCount: "5",
- previewFullImage: true,
- uploadText: "上传中",
- url: devUrl + "/api/blade-resource/oss/endpoint/put-file-attach",
- header: {},
- },
-
- isDetail: false
-
- }
- },
- watch: {},
- onLoad(option) {
- if (option.detail) {
- this.isDetail = true
- this.form = JSON.parse(option.detail)
- this.resName = this.form.reservoirName
- } else {
- this.isDetail = false
- this.getHeader()
- this.init()
- this.getReservoirList()
- }
-
- },
- mounted() {
-
- },
- methods: {
- timeConfirm(data) {
- let timeStamp = data.value
- let time = convertTimestampToDate(timeStamp, "yyyy-MM-dd hh:mm:ss")
- this.form.reportTime = time
- this.timeVisible = false
- },
- //时间显示格式化
- formatter(type, value) {
- if (type === 'year') {
- return `${value}年`
- }
- if (type === 'month') {
- return `${value}月`
- }
- if (type === 'day') {
- return `${value}日`
- }
- if (type === 'hour') {
- return `${value}时`
- }
- if (type === 'minute') {
- return `${value}分`
- }
- return value
- },
- init() {
- this.initTime()
- this.getTypeList()
- let arr = this.userInfo.detail.resIds.split(",")
- var filterArr = arr.filter(function(item, index) {
- return arr.indexOf(item) === index; // 因为indexOf 只能查找到第一个
- });
- this.resIds = filterArr.join(",")
- },
- //获取管护类型
- getTypeList() {
- bizDictionary({
- code: "MANAGE_PROTECT_TYPE"
- }).then(res => {
- this.typeList = []
- let data = res.data
- data.forEach(e => {
- this.typeList.push({
- name: e.dictValue,
- value: e.dictKey
- })
- })
- })
- },
- typeSelect(data) {
- console.log(data)
- this.form.type = data.value
- this.form.typeLabel = data.name
- this.typeShow = false
- },
- //初始化时间
- initTime() {
- this.reportTime = convertTimestampToDate(new Date)
- },
- // 水库下拉框数据
- async getReservoirList() {
- if (this.resIds == "") {
- return
- }
- let params = {
- res_cds: this.resIds.split(",").map(e => `'${e}'`).join(",")
- }
- reservoirList(100, 1, params).then(res => {
- let data = res.data.data
- for (let i = 0; i < data.length; i++) {
- if (i == 0) {
- this.resName = data[i].res_nm
- this.form.reservoirId = data[i].res_cd
- }
- let skRes = {
- value: data[i].res_cd,
- name: data[i].res_nm
- }
- this.skSelectList.push(skRes)
- }
- })
- },
- //获取头部
- getHeader() {
- let accessToken = uni.getStorageSync('accessToken');
- let myHeader = {}
- if (accessToken) {
- myHeader['Blade-Auth'] = 'bearer ' + accessToken;
- }
- // 客户端认证参数
- myHeader['Authorization'] = 'Basic ' + Base64.encode(clientId + ':' + clientSecret);
- this.header = myHeader
- this.uploadConfig.header = myHeader
- },
-
- //上传方法
- uploadFilePromise(url) {
- return new Promise((resolve, reject) => {
- let a = uni.uploadFile({
- url: this.uploadConfig.url, //接口地址
- filePath: url,
- name: 'file',
- header: this.uploadConfig.header,
- success: (res) => {
- let data = JSON.parse(res.data)
- setTimeout(() => {
- resolve(data)
- }, 1000)
- }
- });
- })
- },
-
- //读取后的处理函数
- async afterReadImg(event) {
- this.showLoading()
-
- // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
- let lists = [].concat(event.file)
- let fileListLen = this.form.images.length
- lists.map((item) => {
- this.form.images.push({
- ...item,
- status: 'uploading',
- message: '上传中'
- })
- })
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url)
- this.form.images.splice(fileListLen, 1, Object.assign({}, {
- url: fileUrlConvert(result.data.link)
- }))
- fileListLen++
- }
- this.loadingClose()
-
- },
- showLoading() {
- uni.showLoading({
- mask: true,
- title: '上传中'
- })
- },
- loadingClose() {
- uni.hideLoading()
- },
- //删除图片
- deletePic(event) {
- this.form.images.splice(event.index, 1)
- },
-
- //读取后的处理函数
- async afterReadVideo(event) {
- this.showLoading()
-
- // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
- let lists = [].concat(event.file)
- let fileListLen = this.form.videos.length
- lists.map((item) => {
- this.form.videos.push({
- ...item,
- status: 'uploading',
- message: '上传中'
- })
- })
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url)
- this.form.videos.splice(fileListLen, 1, Object.assign({}, {
- url: fileUrlConvert(result.data.link)
- }))
- fileListLen++
- }
- this.loadingClose()
-
- },
-
- //删除图片
- deleteVideo(event) {
- this.form.videos.splice(event.index, 1)
- },
-
- async submit() {
- const that = this
- const res = await this.$refs.form.validate()
-
- if (this.form.images.length == 0) {
- this.form.images = undefined
- }
- if (this.form.videos.length == 0) {
- this.form.videos = undefined
- }
- if (res) {
- add(this.form).then(res => {
- uni.showToast({
- icon: 'success',
- title: '提交成功',
- success() {
- setTimeout(() => {
- that.$u.func.globalNavigator(
- "/pages/home/patrolIndex", "switchTab")
- }, 1000)
- }
- })
- })
- }
- },
- //水库选择
- skSelect(data) {
- this.form.reservoirId = data.value
- this.resName = data.name
- this.skShow = false
- },
- }
- }
-</script>
-
-<style scoped lang="scss">
- .container {
- overflow: hidden;
- // padding: 0 14rpx;
-
- .page-footer {
- position: fixed;
- bottom: 0;
- width: 100%;
- }
- }
-
- .card {
- .content {
- padding: 0 30rpx;
- border: 5rpx solid #edf6ff;
- }
-
- .image {
- width: 100rpx;
- height: 100rpx;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/jcsb/modules/scheduling.vue b/subPackage/jcsb/modules/scheduling.vue
deleted file mode 100644
index afd1748..0000000
--- a/subPackage/jcsb/modules/scheduling.vue
+++ /dev/null
@@ -1,367 +0,0 @@
-<template>
- <view class="container">
-
- <!--上报信息-->
- <card class="card">
- <view slot="insideHead">
- <boxTitle title="上报信息"></boxTitle>
- </view>
- <view class="content" slot="content">
- <u-form labelWidth="70" :model="form" :rules="rules" ref="form">
- <u-form-item labelWidth="100" label="水库名称:" @click="isDetail?skShow = false: skShow = true">
- <u--input border="bottom" v-model="resName" disabled disabledColor="#ffffff"
- placeholder="请选择水库">
- </u--input>
- <u-icon slot="right" name="arrow-right"></u-icon>
- </u-form-item>
-
- <u-form-item v-if="is_gate.indexOf('有闸')>-1" labelWidth="80" required label="闸门状态:"
- prop="gateStatus">
- <view class="btn-group">
- <view class="value-item"
- :class="{'border-left-none':index==1||index==2,'active':item.value==form.gateStatus,'disabled':isDetail}"
- v-for="(item,index) in gateStatusOption" :key="item.value"
- @click="changeGateStatus(item)">
- {{item.text}}
- </view>
- </view>
- </u-form-item>
-
-
- <u-form-item labelWidth="100" label="情况说明:">
- <u-textarea :disabled="isDetail" confirmType="done" v-model="form.content"
- placeholder="请填写情况说明">
- </u-textarea>
- </u-form-item>
-
- <u-form-item labelWidth="100" label="现场图片:">
- <u-upload :disabled="isDetail" :fileList="form.images"
- :previewFullImage="uploadConfig.previewFullImage" :accept="uploadConfig.acceptImg"
- :multiple="uploadConfig.multiple" :maxCount="uploadConfig.maxCount"
- :capture="uploadConfig.capture" @afterRead="afterReadImg" @delete="deletePic">
- </u-upload>
- </u-form-item>
-
-
- </u-form>
- </view>
- </card>
-
- <view class="page-footer">
- <u-button v-if="!isDetail" type="primary" text="提交" @click="submit"></u-button>
- </view>
-
- <!-- 水库下拉框 -->
- <my-select v-if="skShow" :show="skShow" v-model="form.reservoirId" type="radio" popupTitle="请选择水库"
- :dataLists="skSelectList" @cancel="skShow = false" @submit="skSelect">
- </my-select>
-
- </view>
-</template>
-
-<script>
- import mySelect from "@/components/my-components/my-select.vue"
- import card from "@/components/my-components/card.vue"
- import boxTitle from "@/subPackage/jcsb/components/boxTitle.vue"
- import {
- add,
- } from "@/api/modules/modules.js"
- import {
- reservoirList
- } from "@/api/dataCenter/reservoir/reservoir.js"
- import {
- devUrl,
- clientId,
- clientSecret
- } from '@/common/setting'
- import {
- Base64
- } from '@/utils/base64.js';
- import {
- fileUrlConvert
- } from "@/subPackage/patrol/util/fileUtil.js"
- export default {
- components: {
- mySelect,
- card,
- boxTitle
- },
- data() {
- return {
- resName: '',
- skShow: false,
- typeShow: false,
- selectShow: {
- type: false,
- },
- selectList: [],
- skSelectList: [],
- typeList: [],
- timeVisible: false,
- form: {
- images: [],
- reservoirId: "",
- content: "",
- gateStatus: "2"
- },
- is_gate: "",
- gateStatusOption: [{
- text: "开启",
- value: "1"
- },
- {
- text: "关闭",
- value: "2"
- },
- ],
- rules: {
- 'gateStatus': {
- required: true,
- message: '请选择闸门状态',
- trigger: ['blur', 'change']
- }
- },
- uploadConfig: {
- acceptImg: "image",
- acceptVideo: 'video',
- capture: ['album', 'camera'],
- multiple: true,
- maxCount: "5",
- previewFullImage: true,
- uploadText: "上传中",
- url: devUrl + "/api/blade-resource/oss/endpoint/put-file-attach",
- header: {},
- },
- isDetail: false
- }
- },
- onLoad(option) {
-
- if (option.detail) {
- this.form = JSON.parse(option.detail)
- this.resName = this.form.reservoirName
-
- if (this.form.gateStatus) {
- this.is_gate = "有闸控制"
- }
-
- this.isDetail = true
- } else {
- this.isDetail = false
- this.getHeader()
-
- this.init()
- this.getReservoirList()
- }
-
- },
- mounted() {
-
- },
- methods: {
- //改变闸门关闭状态
- changeGateStatus(item) {
- if (this.isDetail) return
- if (this.form.gateStatus == item.value) return
- this.form.gateStatus = item.value
- },
-
- init() {
- let arr = this.userInfo.detail.resIds.split(",")
- var filterArr = arr.filter(function(item, index) {
- return arr.indexOf(item) === index; // 因为indexOf 只能查找到第一个
- });
- this.resIds = filterArr.join(",")
- },
- // 水库下拉框数据
- async getReservoirList() {
- if (this.resIds == "") {
- return
- }
- let params = {
- res_cds: this.resIds.split(",").map(e => `'${e}'`).join(",")
- }
- reservoirList(100, 1, params).then(res => {
- let data = res.data.data
- console.log(data, "------------")
- for (let i = 0; i < data.length; i++) {
- if (i == 0) {
- this.resName = data[i].res_nm
- this.form.reservoirId = data[i].res_cd
- this.is_gate = data[i].is_gate
- }
- let skRes = {
- value: data[i].res_cd,
- name: data[i].res_nm,
- is_gate: data[i].is_gate
- }
- this.skSelectList.push(skRes)
- }
- })
- },
- //获取头部
- getHeader() {
- let accessToken = uni.getStorageSync('accessToken');
- let myHeader = {}
- if (accessToken) {
- myHeader['Blade-Auth'] = 'bearer ' + accessToken;
- }
- // 客户端认证参数
- myHeader['Authorization'] = 'Basic ' + Base64.encode(clientId + ':' + clientSecret);
- this.header = myHeader
- this.uploadConfig.header = myHeader
- },
-
- //上传方法
- uploadFilePromise(url) {
- return new Promise((resolve, reject) => {
- let a = uni.uploadFile({
- url: this.uploadConfig.url, //接口地址
- filePath: url,
- name: 'file',
- header: this.uploadConfig.header,
- success: (res) => {
- let data = JSON.parse(res.data)
- setTimeout(() => {
- resolve(data)
- }, 1000)
- }
- });
- })
- },
- showLoading() {
- uni.showLoading({
- mask: true,
- title: '上传中'
- })
- },
- loadingClose() {
- uni.hideLoading()
- },
-
- //读取后的处理函数
- async afterReadImg(event) {
- this.showLoading()
- // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
- let lists = [].concat(event.file)
- let fileListLen = this.form.images.length
- lists.map((item) => {
- this.form.images.push({
- ...item,
- status: 'uploading',
- message: '上传中'
- })
- })
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url)
- this.form.images.splice(fileListLen, 1, Object.assign({}, {
- url: fileUrlConvert(result.data.link)
- }))
- fileListLen++
- }
- this.loadingClose()
- },
-
- //删除图片
- deletePic(event) {
- this.form.images.splice(event.index, 1)
- },
-
- async submit() {
- const that = this
- const res = await this.$refs.form.validate()
-
-
- if (res) {
- if (this.form.images.length == 0) {
- this.form.images = undefined
- }
- if (this.is_gate.indexOf('无闸') > -1) {
- this.form.gateStatus = ""
- }
- add(this.form).then(res => {
- uni.showToast({
- icon: 'success',
- title: '提交成功',
- success() {
- setTimeout(() => {
- that.$u.func.globalNavigator(
- "/pages/home/patrolIndex", "switchTab")
- }, 1000)
- }
- })
- })
- }
- },
- //水库选择
- skSelect(data) {
- this.form.reservoirId = data.value
- this.resName = data.name
- this.is_gate = data.is_gate
- this.skShow = false
- },
- }
- }
-</script>
-
-<style scoped lang="scss">
- .container {
- overflow: hidden;
- // padding: 0 14rpx;
-
- .page-footer {
- position: fixed;
- bottom: 0;
- width: 100%;
- }
- }
-
- .card {
- .content {
- padding: 0 30rpx;
- border: 5rpx solid #edf6ff;
- }
-
- .image {
- width: 100rpx;
- height: 100rpx;
- }
- }
-
- .btn-group {
- display: flex;
- margin-left: 40rpx;
-
- .value-item {
- padding: 10rpx 40rpx;
- background-color: #ffffff;
- border: 2rpx solid #333333;
- height: 70rpx;
- box-sizing: border-box;
- }
-
-
- .active {
- background-color: #1180ff !important;
- color: #ffffff !important;
- border: 2rpx solid #1180ff !important;
- }
-
- .border-left-none {
- border-left: 0;
- }
-
-
- .disabled {
- background-color: #dddddd;
- border: 2rpx solid #dddddd;
- color: #ffffff;
- }
-
- .sys-over {
- font-size: 50rpx;
- font-weight: 800;
- color: #ff8610;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/login/login-account.vue b/subPackage/login/login-account.vue
deleted file mode 100644
index e1ead06..0000000
--- a/subPackage/login/login-account.vue
+++ /dev/null
@@ -1,387 +0,0 @@
-<template>
- <view class="container">
- <view class="logo">
- <image src="https://sk.hubeishuiyi.cn/business/xcxImg/wxlogo.png" lazy-load show-menu-by-longpress
- style="width: 100rpx;height: 100rpx;"></image>
- <view class="title">荆楚水库</view>
- </view>
- <view class="content">
- <view class="top">
- <u--form labelPosition="top" labelWidth="60" :model="form" :rules="rules" ref="form">
- <view class="cell">
- <u-form-item label="账号:" borderBottom ref="phone">
- <u-input v-model="form.phone" border="none" placeholder="请输入登录账号"></u-input>
- </u-form-item>
- </view>
- <view class="cell">
- <u-form-item label="密码:" prop="password" borderBottom ref="password">
- <view style="display: flex; width: 100%;">
- <!-- #ifdef MP-WEIXIN -->
- <u-input v-if="passwordProps.passwordType == 'password'" type="password"
- v-model="form.password" border="none" placeholder="请输入密码">
- </u-input>
- <u-input v-else type="text" v-model="form.password" border="none" placeholder="请输入密码">
- </u-input>
- <u-icon @click="showPassword" :name="passwordProps.passwordIcon" color="#000000"
- size="25"></u-icon>
- <!-- #endif -->
- <!-- #ifdef APP-PLUS-->
- <u-input :type="passwordProps.passwordType" v-model="form.password" border="none"
- placeholder="请输入密码"></u-input>
- <u-icon @click="showPassword" :name="passwordProps.passwordIcon" color="#000000"
- size="25"></u-icon>
- <!-- #endif -->
- <!-- #ifdef H5-->
- <u-input v-if="passwordProps.passwordType == 'password'" type="password"
- v-model="form.password" border="none" placeholder="请输入密码">
- </u-input>
- <u-input v-else type="text" v-model="form.password" border="none" placeholder="请输入密码">
- </u-input>
- <u-icon @click="showPassword" :name="passwordProps.passwordIcon" color="#000000"
- size="25"></u-icon>
- <!-- #endif -->
- </view>
- </u-form-item>
- </view>
- </u--form>
- <view class="privacy-policy">
- <u-radio-group size="15" v-model="radioGroupValue" placement="column" @change="groupChange">
- <u-radio name="check" @change="radioChange">
- 查看并同意
- <navigator url="../user/privacyPolicy" hover-class="navigator-hover">
- 《隐私政策》
- </navigator>
- </u-radio>
- </u-radio-group>
- <view class="statement">
- 仅限湖北省水库管理人员使用
- </view>
- </view>
-
-
-
- <button class="submit" @click="submit" :disabled="disabled">登录</button>
- <view class="page-change">
- </view>
- </view>
- </view>
- </view>
-</template>
-
-<script>
- import md5 from '@/utils/md5.js'
- import loginMixin from './mixin/loginMixin'
- export default {
- onLoad(option) {
- const {
- redirect
- } = option
- if (redirect) this.redirect = redirect
- },
- mixins: [loginMixin],
- data() {
- return {
- tenantId: '000000',
- form: {
- phone: "",
- password: ""
- },
- rules: {
- 'phone': [{
- type: 'string',
- required: true,
- message: '请填写手机号',
- trigger: ['blur', 'change']
- },
- {
- validator: (rule, value, callback) => {
- return uni.$u.test.mobile(value);
- },
- message: '手机号码不正确',
- trigger: ['change', 'blur'],
- }
- ],
- 'password': {
- type: 'string',
- required: true,
- message: '请输入密码',
- trigger: ['blur', 'change']
- }
- },
- disabled: false,
- redirect: '',
- passwordProps: {
- passwordIcon: "eye-off",
- passwordType: "password"
- }
- }
- },
- methods: {
-
-
- submit() {
- const that = this
- this.$refs.form.validate().then(res => {
-
- if (!this.isPrivacyCheck()) {
- return
- }
-
-
- this.$u.api
- .token(this.tenantId, this.form.phone, md5(this.form.password))
- .then(data => {
- if (this.form.password == 'Zhsk@123456') {
- uni.showModal({
- title: "提示",
- content: "您正在使用初始密码登录请切换到微信授权登录或者手机号登录.并尽快修改密码!",
- showCancel: false,
- success(res) {
- that.$u.func.globalNavigator("", "navBack")
- }
- })
- return
- }
- this.$u.func.login(data)
- })
- .catch(err => {
- this.$u.func.showToast({
- title: err.data.error_description
- })
- })
- })
- },
- handleInputCheck() {
- this.disabled = false
- },
- showPassword() {
- this.passwordProps.passwordIcon == "eye-off" ? this.$set(this.passwordProps, "passwordIcon", "eye-fill") :
- this.$set(this.passwordProps, "passwordIcon", "eye-off")
- this.passwordProps.passwordType == "password" ? this.$set(this.passwordProps, "passwordType", "text") :
- this.$set(this.passwordProps, "passwordType", "password")
- }
- }
- }
-</script>
-
-<style lang="scss">
- .privacy-policy {
- width: 100%;
- padding: 40rpx 40rpx 0 80rpx;
- font-size: 28rpx;
- }
-
- .container {
- min-height: 100vh;
- overflow: hidden;
- background: url("https://sk.hubeishuiyi.cn/business/xcxImg/reservoirImg/default.jpg") no-repeat;
- background-size: 100% 100%;
-
- .set-icon {
- vertical-align: middle;
- width: 41rpx;
- height: auto;
- margin-right: 35rpx;
- }
- }
-
- .logo {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 200rpx 0;
-
- image {
- box-shadow: 4rpx 4rpx 20rpx #fafafa;
- }
-
- .title {
- margin-top: 40rpx;
- font-weight: 700;
- font-size: 32rpx;
- }
- }
-
- .content {
- display: flex;
- flex-direction: column;
- justify-content: space-around;
- align-items: center;
-
- // height: 90vh;
- width: 100%;
-
- .top {
- width: 100%;
- width: 100%;
- background: #fff;
- padding: 20px 0;
- position: fixed;
- bottom: 0px;
- }
-
- .logo {
- display: block;
- width: 281rpx;
- height: auto;
- margin: 0 auto 120rpx;
- }
-
- .cell {
- width: 100%;
- padding: 0 85rpx;
- box-sizing: border-box;
- margin-top: 36rpx;
-
- .name {
- font-size: 22rpx;
- font-family: Source Han Sans CN;
- font-weight: 400;
- color: #3e4a59;
- line-height: 30rpx;
- opacity: 0.72;
- }
-
- .input-box {
- padding: 30rpx 0;
- border-bottom: 2rpx solid #f6f6f6;
- display: flex;
- align-items: center;
-
- .code {
- font-size: 22rpx;
- font-family: Source Han Sans CN;
- font-weight: 400;
- color: #0d0d0d;
- line-height: 30rpx;
-
- text {
- color: #5f88ff;
- }
- }
-
- .ipt {
- flex: 1;
- font-size: 24rpx;
- }
-
- .hold {
- font-size: 26rpx;
- font-family: Source Han Sans CN;
- font-weight: 400;
- color: #3e4a59;
- line-height: 30px;
- opacity: 0.45;
- }
- }
- }
-
- .agree {
- margin: 27rpx 95rpx 0;
- font-size: 22rpx;
- font-family: Adobe Heiti Std;
- font-weight: normal;
- color: #cacaca;
- line-height: 34rpx;
-
- .a {
- color: #000000;
- }
- }
-
- .submit {
- margin: 60rpx 90rpx 0;
- border: none;
- width: 572rpx;
- height: 86rpx;
- line-height: 86rpx;
- box-sizing: border-box;
- border-radius: 15rpx;
- background-color: #5f88ff;
- color: #ffffff;
-
- &::after {
- content: none;
- }
-
- &::before {
- content: none;
- }
-
- &[disabled='true'] {
- background: #e4e4e4;
- font-size: 36rpx;
- font-family: Source Han Sans CN;
- font-weight: 500;
- color: #ffffff;
- }
- }
-
- .tip {
- margin-top: 30rpx;
- text-align: center;
- font-size: 22rpx;
- font-family: Adobe Heiti Std;
- font-weight: normal;
- color: #cacaca;
- line-height: 34rpx;
- }
-
- .change {
- margin-top: 20rpx;
- text-align: center;
- font-size: 22rpx;
- font-family: Adobe Heiti Std;
- font-weight: normal;
- color: #5f88ff;
- line-height: 34rpx;
- }
-
- .tag {
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 22rpx;
- font-family: Adobe Heiti Std;
- font-weight: normal;
- color: #9f9f9f;
- line-height: 34rpx;
-
- &::before {
- content: '';
- display: block;
- width: 160rpx;
- height: 1px;
- background: #d8d8d8;
- opacity: 0.86;
- }
-
- &::after {
- content: '';
- display: block;
- width: 160rpx;
- height: 1px;
- background: #d8d8d8;
- opacity: 0.86;
- }
- }
-
- .chat-arr {
- margin-top: 50rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
-
- .icon {
- width: 73rpx;
- height: 73rpx;
- }
- }
-
- .page-change {
- display: flex;
- justify-content: space-evenly;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/login/login-code.vue b/subPackage/login/login-code.vue
deleted file mode 100644
index b62949a..0000000
--- a/subPackage/login/login-code.vue
+++ /dev/null
@@ -1,369 +0,0 @@
-<template>
- <view class="container">
- <view class="logo">
- <image src="https://sk.hubeishuiyi.cn/business/xcxImg/wxlogo.png" lazy-load show-menu-by-longpress
- style="width: 100rpx;height: 100rpx;"></image>
- <view class="title">荆楚水库</view>
- </view>
- <view class="content">
- <view class="top">
- <u--form labelPosition="top" labelWidth="60" :model="form" :rules="rules" ref="form">
- <view class="cell">
- <u-form-item label="手机号:" prop="phone" borderBottom ref="phone">
- <u-input v-model="form.phone" border="none" placeholder="请输入手机号">
- <template slot="suffix">
- <u-code ref="uCode" @change="codeChange" seconds="60" changeText="x秒后重新获取"></u-code>
- <u-button @tap="getCodeBtn" :text="tips" type="success" size="mini"></u-button>
- </template>
- </u-input>
- </u-form-item>
- </view>
- <view class="cell">
- <u-form-item label="验证码:" prop="password" borderBottom ref="password">
- <u--input v-model="form.password" border="none" placeholder="请输入验证码">
- </u--input>
- </u-form-item>
- </view>
- </u--form>
- <view class="privacy-policy">
- <u-radio-group size="15" v-model="radioGroupValue" placement="column" @change="groupChange">
- <u-radio name="check" @change="radioChange">
- 查看并同意<navigator url="../user/privacyPolicy" hover-class="navigator-hover">
- 《隐私政策》
- </navigator>
- </u-radio>
- </u-radio-group>
- <view class="statement">
- 仅限湖北省水库管理人员使用
- </view>
- </view>
- <button class="submit" @click="submit" :disabled="disabled">登录</button>
- <view class="page-change">
- </view>
- </view>
- </view>
- </view>
-</template>
-
-<script>
- import md5 from '@/utils/md5.js'
- import {
- getCode,
- codeLogin
- } from "@/api/login"
- import loginMixin from './mixin/loginMixin'
- export default {
- onLoad(option) {
- const {
- redirect
- } = option
- if (redirect) this.redirect = redirect
- },
- mixins: [loginMixin],
- data() {
- return {
- tenantId: '000000',
- form: {
- phone: "",
- password: ""
- },
- rules: {
- 'phone': [{
- type: 'string',
- required: true,
- message: '请填写手机号',
- trigger: ['blur', 'change']
- },
- {
- validator: (rule, value, callback) => {
- return uni.$u.test.mobile(value);
- },
- message: '手机号码不正确',
- trigger: ['change', 'blur'],
- }
- ],
- 'password': {
- type: 'string',
- required: true,
- message: '请输入验证码',
- trigger: ['blur', 'change']
- }
- },
- disabled: false,
- redirect: '',
- tips: "",
- }
- },
- methods: {
- codeChange(e) {
- this.tips = e
- },
- async getCodeBtn() {
- const that = this
- const flag = uni.$u.test.mobile(this.form.phone.trim())
- if (!flag) return uni.$u.toast("手机号格式不正确")
- if (this.$refs.uCode.canGetCode) {
- // 模拟向后端请求验证码
- uni.showLoading({
- title: '正在获取验证码'
- })
- const obj = {
- userNumber: that.form.phone
- }
- const res = await getCode(obj)
- if (res.code != 200) {
- uni.hideLoading();
- return uni.$u.toast(res.msg);
- }
- uni.hideLoading();
- uni.$u.toast('验证码已发送');
- this.$refs.uCode.start();
- } else {
- uni.$u.toast('倒计时结束后再发送');
- }
- },
- submit() {
- const that = this
- this.$refs.form.validate().then(async res => {
-
- if (!this.isPrivacyCheck()) {
- return
- }
-
- const val = await codeLogin(this.tenantId, this.form.phone, this.form.password, "account")
- this.$u.func.login(val)
- }).catch(err => {
- this.$u.func.showToast({
- title: err.data.error_description
- })
- })
- },
- handleInputCheck() {
- this.disabled = false
- }
- }
- }
-</script>
-
-<style lang="scss">
- .privacy-policy {
- width: 100%;
- padding: 40rpx 40rpx 0 80rpx;
- font-size: 28rpx;
- }
-
-
- .container {
- min-height: 100vh;
- overflow: hidden;
- background: url("https://sk.hubeishuiyi.cn/business/xcxImg/reservoirImg/default.jpg") no-repeat;
- background-size: 100% 100%;
-
- .set-icon {
- vertical-align: middle;
- width: 41rpx;
- height: auto;
- margin-right: 35rpx;
- }
- }
-
- .logo {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 200rpx 0;
-
- image {
- box-shadow: 4rpx 4rpx 20rpx #fafafa;
- }
-
- .title {
- margin-top: 40rpx;
- font-weight: 700;
- font-size: 32rpx;
- }
- }
-
- .content {
- display: flex;
- flex-direction: column;
- justify-content: space-around;
- align-items: center;
-
- // height: 90vh;
- width: 100%;
-
- .top {
- width: 100%;
- background: #fff;
- padding: 20px 0;
- position: fixed;
- bottom: 0px;
-
- }
-
- .logo {
- display: block;
- width: 281rpx;
- height: auto;
- margin: 0 auto 120rpx;
- }
-
- .cell {
- width: 100%;
- padding: 0 85rpx;
- box-sizing: border-box;
- margin-top: 36rpx;
-
- .name {
- font-size: 22rpx;
- font-family: Source Han Sans CN;
- font-weight: 400;
- color: #3e4a59;
- line-height: 30rpx;
- opacity: 0.72;
- }
-
- .input-box {
- padding: 30rpx 0;
- border-bottom: 2rpx solid #f6f6f6;
- display: flex;
- align-items: center;
-
- .code {
- font-size: 22rpx;
- font-family: Source Han Sans CN;
- font-weight: 400;
- color: #0d0d0d;
- line-height: 30rpx;
-
- text {
- color: #5f88ff;
- }
- }
-
- .ipt {
- flex: 1;
- font-size: 24rpx;
- }
-
- .hold {
- font-size: 26rpx;
- font-family: Source Han Sans CN;
- font-weight: 400;
- color: #3e4a59;
- line-height: 30px;
- opacity: 0.45;
- }
- }
- }
-
- .agree {
- margin: 27rpx 95rpx 0;
- font-size: 22rpx;
- font-family: Adobe Heiti Std;
- font-weight: normal;
- color: #cacaca;
- line-height: 34rpx;
-
- .a {
- color: #000000;
- }
- }
-
- .submit {
- margin: 60rpx 90rpx 0;
- border: none;
- width: 572rpx;
- height: 86rpx;
- line-height: 86rpx;
- box-sizing: border-box;
- border-radius: 15rpx;
- background-color: #5f88ff;
- color: #ffffff;
-
- &::after {
- content: none;
- }
-
- &::before {
- content: none;
- }
-
- &[disabled='true'] {
- background: #e4e4e4;
- font-size: 36rpx;
- font-family: Source Han Sans CN;
- font-weight: 500;
- color: #ffffff;
- }
- }
-
- .tip {
- margin-top: 30rpx;
- text-align: center;
- font-size: 22rpx;
- font-family: Adobe Heiti Std;
- font-weight: normal;
- color: #cacaca;
- line-height: 34rpx;
- }
-
- .change {
- margin-top: 20rpx;
- text-align: center;
- font-size: 22rpx;
- font-family: Adobe Heiti Std;
- font-weight: normal;
- color: #5f88ff;
- line-height: 34rpx;
- }
-
- .tag {
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 22rpx;
- font-family: Adobe Heiti Std;
- font-weight: normal;
- color: #9f9f9f;
- line-height: 34rpx;
-
- &::before {
- content: '';
- display: block;
- width: 160rpx;
- height: 1px;
- background: #d8d8d8;
- opacity: 0.86;
- }
-
- &::after {
- content: '';
- display: block;
- width: 160rpx;
- height: 1px;
- background: #d8d8d8;
- opacity: 0.86;
- }
- }
-
- .chat-arr {
- margin-top: 50rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
-
- .icon {
- width: 73rpx;
- height: 73rpx;
- }
- }
-
- .page-change {
- display: flex;
- justify-content: space-evenly;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/login/mixin/loginMixin.js b/subPackage/login/mixin/loginMixin.js
deleted file mode 100644
index 3a6df83..0000000
--- a/subPackage/login/mixin/loginMixin.js
+++ /dev/null
@@ -1,43 +0,0 @@
-export default {
- data() {
- return {
- radioGroupValue: '', //当前 radioGroup 选中的值
- radioValue: '', // 当前 radio 的值
- num: 0, //用于区分是否是重复选中
- }
- },
- methods: {
- isPrivacyCheck() {
- if (this.radioValue != "check") {
- uni.showToast({
- title: "请先同意隐私政策",
- icon: "none",
- complete: () => {
- return false
- }
- })
- } else {
- return true
- }
- },
- groupChange(n) {
- if (n == this.radioValue && this.num == 0) {
- // 第一次相等即执行以下代码
- this.num++
- } else {
- // 第一次后相等即执行以下代码
- // 置空 radioGroupValue 即取消选中的值
- this.radioGroupValue = ''
- this.radioValue = ''
- // 初始化 num
- this.num = 0
- }
- },
- // 当切换其他选项的时候此方法才会执行
- radioChange(n) {
- this.radioValue = n
- // 切换选项后需要初始化 num
- this.num = 0
- },
- }
-}
\ No newline at end of file
diff --git a/subPackage/patrol/components/boxTitle.vue b/subPackage/patrol/components/boxTitle.vue
deleted file mode 100644
index 38e4200..0000000
--- a/subPackage/patrol/components/boxTitle.vue
+++ /dev/null
@@ -1,72 +0,0 @@
-<template>
- <div class="box-title-container flex j-c-s-b">
- <div class="title-name">
- {{ title }}
- </div>
-
- <div class="region-more">
- <div class="region">
- <slot name="region"></slot>
- </div>
- <div class="more">
- <slot name="more"></slot>
- </div>
- </div>
- </div>
-</template>
-
-<script>
- export default {
- name: 'BoxTitle',
- props: {
- title: {
- type: String,
- default: ''
- }
- }
- }
-</script>
-
-<style lang="scss" scoped>
- .box-title-container {
- height: 36px;
- line-height: 36px;
-
- .title-name {
- padding-left: 10px;
- position: relative;
- font-size: 20px;
- font-family: Microsoft YaHei-Bold, Microsoft YaHei;
- font-weight: bold;
- color: #333333;
-
- &::after {
- content: '';
- position: absolute;
- top: 50%;
- left: 0;
- width: 4px;
- height: 18px;
- background: #1890FF;
- border-radius: 2px 2px 2px 2px;
- opacity: 1;
- transform: translate(0, -50%);
- }
- }
-
- .region {
- font-size: 20px;
- font-family: Alibaba PuHuiTi-Bold, Alibaba PuHuiTi;
- font-weight: bold;
- color: #333333;
- }
-
- .more {
- font-size: 15px;
- font-family: Microsoft YaHei-Regular, Microsoft YaHei;
- font-weight: 400;
- color: #1890FF;
- cursor: pointer;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/patrol/components/patrolTaskList.vue b/subPackage/patrol/components/patrolTaskList.vue
deleted file mode 100644
index f4a5b90..0000000
--- a/subPackage/patrol/components/patrolTaskList.vue
+++ /dev/null
@@ -1,205 +0,0 @@
-<template>
- <view>
- <view class="tab">
- <u-tabs :itemStyle="{width: '160rpx' ,height: '88rpx' }" :activeStyle="{color: '#99bada' }" lineWidth="60"
- :current="currentIndex" :list="tabList" @click="tabClick">
- </u-tabs>
- </view>
- <view class="list">
-
- <scroll-view scroll-y style="height: 85vh;width: 100%;" @scrolltolower="scrolltolower">
- <card v-for="(item,index) in patrolTaskList" :key="index">
- <template slot="insideHead">
- <view class="head">
- <u-row>
- <u-col span="9">
- <u-text :text="item.title" />
- </u-col>
- <u-col span="1">
- </u-col>
- <u-col span="3">
- <u-text :text="item.patrolTypeName" />
- </u-col>
- </u-row>
- </view>
- </template>
- <template slot="content">
- <u-row>
- <u-col span="9">
- <view class="address">
- <u-text :text="'描述:'+ item.content" />
- </view>
- </u-col>
- <u-col span="1">
- </u-col>
- <u-col span="2">
- <view class="start-patrol-button">
- <u-button v-if="item.state !=3" type="primary" size="small"
- :disabled="item.state == 3" :text="item.state=='1'?'开始巡查':'继续巡查'"
- @click="startPatrol(item)" />
- <u-button v-if="item.state == 3" type="primary" size="small" text="巡查详情"
- @click="patrolDetail(item)" />
- </view>
- </u-col>
- </u-row>
- </template>
- </card>
- </scroll-view>
- </view>
- </view>
-</template>
-
-<script>
- import card from "@/components/my-components/card.vue"
- import {
- getPatrolTaskList,
- getPatrolTaskStatistic,
- updatePatrolTask
- } from "@/api/patrol/patrol"
- import {
- dateFormat
- } from "@/utils/date"
- export default {
- components: {
- card
- },
- data() {
- return {
- patrolCountList: [],
- patrolTaskList: [],
- searchKey: "",
- page: {
- pageSize: 20,
- currentPage: 1,
- total: 0
- },
- query: {},
- tabList: [{
- name: "未开始"
- },
- {
- name: "进行中"
- },
- {
- name: "已完成"
- },
- ],
- currentIndex: 0
- }
- },
- onShow() {},
- created() {
- this.init()
- },
- mounted() {},
- methods: {
- init() {
- this.currentIndex = 0
- this.getList(1)
- },
- //搜索
- search(searchValue) {
- this.query.title = searchValue
- this.getList()
- },
- //清空搜索
- clearSearch() {
- this.query = {}
- this.getList()
- },
- //开始巡查或继续巡查
- startPatrol(item) {
- if (item.state == "1") {
- item.state = "2"
- let date = new Date()
- let realStartTime = dateFormat(date)
- updatePatrolTask({
- id: item.id,
- state: item.state,
- realStartTime: realStartTime
- })
- }
-
- let url = "/subPackage/patrol/patrolReport?task=" + JSON.stringify(item)
- this.$u.func.globalNavigator(url, "navTo")
- },
-
- //获取任务列表
- getList(state) {
- // 获取任务列表
- // this.query.currentUserId = this.userInfo.user_id
- this.query.toUserId = this.userInfo.user_id
- this.query.state = state
- getPatrolTaskList(this.page.currentPage, this.page.pageSize, this.query).then(res => {
- const data = res.data;
- this.page.total = data.total;
- this.patrolTaskList = data.records
- })
- },
- //上拉加载更多
- scrolltolower() {
- this.page.currentPage += 1
- // 获取任务列表
- this.query.currentUserId = this.userInfo.user_id
- getPatrolTaskList(this.page.currentPage, this.page.pageSize, this.query).then(res => {
- const data = res.data;
- this.page.total = data.total;
- this.patrolTaskList = this.patrolTaskList.concat(data.records)
- })
- },
- //tab点击事件
- tabClick(item) {
- this.currentIndex = item.index
-
- if (this.currentIndex == 0) {
- this.page.currentPage = 1
- this.getList(1)
- } else if (this.currentIndex == 1) {
- this.page.currentPage = 1
- this.getList(2)
- } else if (this.currentIndex == 2) {
- this.page.currentPage = 1
- this.getList(3)
- }
-
- },
- //巡查详情
- patrolDetail(task) {
- let url = "/subPackage/patrol/patrolDetail?task=" + JSON.stringify(task)
- this.$u.func.globalNavigator(url, "navTo")
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- .tab {
- display: flex;
- align-items: center;
- justify-content: space-around;
- }
-
- .search {
- margin: 20rpx 0;
- }
-
- .content {
- display: flex;
- }
-
- .footer {
- display: flex;
- justify-content: space-between;
- }
-
- .footer .icon {
- display: flex;
-
- }
-
- .grid-text {
- font-size: 2rpx;
- color: #ada8a8;
- margin: 20rpx 0;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/patrol/components/uni-collapse/changelog.md b/subPackage/patrol/components/uni-collapse/changelog.md
deleted file mode 100644
index 292e4c7..0000000
--- a/subPackage/patrol/components/uni-collapse/changelog.md
+++ /dev/null
@@ -1,36 +0,0 @@
-## 1.4.3(2022-01-25)
-- 修复 初始化的时候 ,open 属性失效的bug
-## 1.4.2(2022-01-21)
-- 修复 微信小程序resize后组件收起的bug
-## 1.4.1(2021-11-22)
-- 修复 vue3中个别scss变量无法找到的问题
-## 1.4.0(2021-11-19)
-- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
-- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-collapse](https://uniapp.dcloud.io/component/uniui/uni-collapse)
-## 1.3.3(2021-08-17)
-- 优化 show-arrow 属性默认为true
-## 1.3.2(2021-08-17)
-- 新增 show-arrow 属性,控制是否显示右侧箭头
-## 1.3.1(2021-07-30)
-- 优化 vue3下小程序事件警告的问题
-## 1.3.0(2021-07-30)
-- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
-## 1.2.2(2021-07-21)
-- 修复 由1.2.0版本引起的 change 事件返回 undefined 的Bug
-## 1.2.1(2021-07-21)
-- 优化 组件示例
-## 1.2.0(2021-07-21)
-- 新增 组件折叠动画
-- 新增 value\v-model 属性 ,动态修改面板折叠状态
-- 新增 title 插槽 ,可定义面板标题
-- 新增 border 属性 ,显示隐藏面板内容分隔线
-- 新增 title-border 属性 ,显示隐藏面板标题分隔线
-- 修复 resize 方法失效的Bug
-- 修复 change 事件返回参数不正确的Bug
-- 优化 H5、App 平台自动更具内容更新高度,无需调用 reszie() 方法
-## 1.1.7(2021-05-12)
-- 新增 组件示例地址
-## 1.1.6(2021-02-05)
-- 优化 组件引用关系,通过uni_modules引用组件
-## 1.1.5(2021-02-05)
-- 调整为uni_modules目录规范
\ No newline at end of file
diff --git a/subPackage/patrol/components/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue b/subPackage/patrol/components/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue
deleted file mode 100644
index 26b208d..0000000
--- a/subPackage/patrol/components/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue
+++ /dev/null
@@ -1,406 +0,0 @@
-<template>
- <view class="uni-collapse-item">
- <!-- onClick(!isOpen) -->
- <view @click="onClick(!isOpen)" class="uni-collapse-item__title"
- :class="{'is-open':isOpen &&titleBorder === 'auto' ,'uni-collapse-item-border':titleBorder !== 'none'}">
- <view class="uni-collapse-item__title-wrap">
- <slot name="title">
- <view class="uni-collapse-item__title-box" :class="{'is-disabled':disabled}">
- <image v-if="thumb" :src="thumb" class="uni-collapse-item__title-img" />
- <text class="uni-collapse-item__title-text">{{ title }}</text>
- </view>
- </slot>
- </view>
- <view v-if="showArrow"
- :class="{ 'uni-collapse-item__title-arrow-active': isOpen, 'uni-collapse-item--animation': showAnimation === true }"
- class="uni-collapse-item__title-arrow">
- <uni-icons :color="disabled?'#ddd':'#bbb'" size="14" type="bottom" />
- </view>
- </view>
- <view class="uni-collapse-item__wrap" :class="{'is--transition':showAnimation}"
- :style="{height: (isOpen?height:0) +'px'}">
- <view :id="elId" ref="collapse--hook" class="uni-collapse-item__wrap-content"
- :class="{open:isheight,'uni-collapse-item--border':border&&isOpen}">
- <slot></slot>
- </view>
- </view>
-
- </view>
-</template>
-
-<script>
- // #ifdef APP-NVUE
- const dom = weex.requireModule('dom')
- // #endif
- /**
- * CollapseItem 折叠面板子组件
- * @description 折叠面板子组件
- * @property {String} title 标题文字
- * @property {String} thumb 标题左侧缩略图
- * @property {String} name 唯一标志符
- * @property {Boolean} open = [true|false] 是否展开组件
- * @property {Boolean} titleBorder = [true|false] 是否显示标题分隔线
- * @property {Boolean} border = [true|false] 是否显示分隔线
- * @property {Boolean} disabled = [true|false] 是否展开面板
- * @property {Boolean} showAnimation = [true|false] 开启动画
- * @property {Boolean} showArrow = [true|false] 是否显示右侧箭头
- */
- import uniIcons from "@/subPackage/patrol/components/uni-icons/components/uni-icons/uni-icons.vue"
- export default {
- components: {
- uniIcons
- },
- name: 'uniCollapseItem',
- props: {
- // 列表标题
- title: {
- type: String,
- default: ''
- },
- name: {
- type: [Number, String],
- default: ''
- },
- // 是否禁用
- disabled: {
- type: Boolean,
- default: false
- },
- // #ifdef APP-PLUS
- // 是否显示动画,app 端默认不开启动画,卡顿严重
- showAnimation: {
- type: Boolean,
- default: false
- },
- // #endif
- // #ifndef APP-PLUS
- // 是否显示动画
- showAnimation: {
- type: Boolean,
- default: true
- },
- // #endif
- // 是否展开
- open: {
- type: Boolean,
- default: false
- },
- // 缩略图
- thumb: {
- type: String,
- default: ''
- },
- // 标题分隔线显示类型
- titleBorder: {
- type: String,
- default: 'auto'
- },
- border: {
- type: Boolean,
- default: true
- },
- showArrow: {
- type: Boolean,
- default: true
- }
- },
- data() {
- // TODO 随机生生元素ID,解决百度小程序获取同一个元素位置信息的bug
- const elId = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`
- return {
- isOpen: false,
- isheight: null,
- height: 0,
- elId,
- nameSync: 0
- }
- },
- watch: {
- open(val) {
- this.isOpen = val
- this.onClick(val, 'init')
- }
- },
- updated(e) {
- this.$nextTick(() => {
- this.init(true)
- })
- },
- created() {
- this.collapse = this.getCollapse()
- this.oldHeight = 0
- this.onClick(this.open, 'init')
- },
- // #ifndef VUE3
- // TODO vue2
- destroyed() {
- if (this.__isUnmounted) return
- this.uninstall()
- },
- // #endif
- // #ifdef VUE3
- // TODO vue3
- unmounted() {
- this.__isUnmounted = true
- this.uninstall()
- },
- // #endif
- mounted() {
- if (!this.collapse) return
- if (this.name !== '') {
- this.nameSync = this.name
- } else {
- this.nameSync = this.collapse.childrens.length + ''
- }
- if (this.collapse.names.indexOf(this.nameSync) === -1) {
- this.collapse.names.push(this.nameSync)
- } else {
- console.warn(`name 值 ${this.nameSync} 重复`);
- }
- if (this.collapse.childrens.indexOf(this) === -1) {
- this.collapse.childrens.push(this)
- }
- this.init()
- },
- methods: {
- init(type) {
- // #ifndef APP-NVUE
- this.getCollapseHeight(type)
- // #endif
- // #ifdef APP-NVUE
- this.getNvueHwight(type)
- // #endif
- },
- uninstall() {
- if (this.collapse) {
- this.collapse.childrens.forEach((item, index) => {
- if (item === this) {
- this.collapse.childrens.splice(index, 1)
- }
- })
- this.collapse.names.forEach((item, index) => {
- if (item === this.nameSync) {
- this.collapse.names.splice(index, 1)
- }
- })
- }
- },
- onClick(isOpen, type) {
- if (this.disabled) return
- this.isOpen = isOpen
- if (this.isOpen && this.collapse) {
- this.collapse.setAccordion(this)
- }
- if (type !== 'init') {
- this.collapse.onChange(isOpen, this)
- }
- },
- getCollapseHeight(type, index = 0) {
- const views = uni.createSelectorQuery().in(this)
- views
- .select(`#${this.elId}`)
- .fields({
- size: true
- }, data => {
- // TODO 百度中可能获取不到节点信息 ,需要循环获取
- if (index >= 10) return
- if (!data) {
- index++
- this.getCollapseHeight(false, index)
- return
- }
- // #ifdef APP-NVUE
- this.height = data.height + 1
- // #endif
- // #ifndef APP-NVUE
- this.height = data.height
- // #endif
- this.isheight = true
- if (type) return
- this.onClick(this.isOpen, 'init')
- })
- .exec()
- },
- getNvueHwight(type) {
- const result = dom.getComponentRect(this.$refs['collapse--hook'], option => {
- if (option && option.result && option.size) {
- // #ifdef APP-NVUE
- this.height = option.size.height + 1
- // #endif
- // #ifndef APP-NVUE
- this.height = option.size.height
- // #endif
- this.isheight = true
- if (type) return
- this.onClick(this.open, 'init')
- }
- })
- },
- /**
- * 获取父元素实例
- */
- getCollapse(name = 'uniCollapse') {
- let parent = this.$parent;
- let parentName = parent.$options.name;
- while (parentName !== name) {
- parent = parent.$parent;
- if (!parent) return false;
- parentName = parent.$options.name;
- }
- return parent;
- }
- }
- }
-</script>
-
-<style lang="scss">
- .uni-collapse-item {
- /* #ifndef APP-NVUE */
- box-sizing: border-box;
-
- /* #endif */
- &__title {
- /* #ifndef APP-NVUE */
- display: flex;
- width: 100%;
- box-sizing: border-box;
- /* #endif */
- flex-direction: row;
- align-items: center;
- transition: border-bottom-color .3s;
-
- // transition-property: border-bottom-color;
- // transition-duration: 5s;
- &-wrap {
- width: 100%;
- flex: 1;
-
- }
-
- &-box {
- padding: 0 15px;
- /* #ifndef APP-NVUE */
- display: flex;
- width: 100%;
- box-sizing: border-box;
- /* #endif */
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- height: 48px;
- line-height: 48px;
- background-color: #fff;
- color: #303133;
- font-size: 13px;
- font-weight: 500;
- /* #ifdef H5 */
- cursor: pointer;
- outline: none;
-
- /* #endif */
- &.is-disabled {
- .uni-collapse-item__title-text {
- color: #999;
- }
- }
-
- }
-
- &.uni-collapse-item-border {
- border-bottom: 1px solid #ebeef5;
- }
-
- &.is-open {
- border-bottom-color: transparent;
- }
-
- &-img {
- height: 22px;
- width: 22px;
- margin-right: 10px;
- }
-
- &-text {
- flex: 1;
- font-size: 14px;
- /* #ifndef APP-NVUE */
- white-space: nowrap;
- color: inherit;
- /* #endif */
- /* #ifdef APP-NVUE */
- lines: 1;
- /* #endif */
- overflow: hidden;
- text-overflow: ellipsis;
- }
-
- &-arrow {
- /* #ifndef APP-NVUE */
- display: flex;
- box-sizing: border-box;
- /* #endif */
- align-items: center;
- justify-content: center;
- width: 20px;
- height: 20px;
- margin-right: 10px;
- transform: rotate(0deg);
-
- &-active {
- transform: rotate(-180deg);
- }
- }
-
-
- }
-
- &__wrap {
- /* #ifndef APP-NVUE */
- will-change: height;
- box-sizing: border-box;
- /* #endif */
- background-color: #fff;
- overflow: hidden;
- position: relative;
- height: 0;
-
- &.is--transition {
- // transition: all 0.3s;
- transition-property: height, border-bottom-width;
- transition-duration: 0.3s;
- /* #ifndef APP-NVUE */
- will-change: height;
- /* #endif */
- }
-
-
-
- &-content {
- position: absolute;
- font-size: 13px;
- color: #303133;
- // transition: height 0.3s;
- border-bottom-color: transparent;
- border-bottom-style: solid;
- border-bottom-width: 0;
-
- &.uni-collapse-item--border {
- border-bottom-width: 1px;
- border-bottom-color: red;
- border-bottom-color: #ebeef5;
- }
-
- &.open {
- position: relative;
- }
- }
- }
-
- &--animation {
- transition-property: transform;
- transition-duration: 0.3s;
- transition-timing-function: ease;
- }
-
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/patrol/components/uni-collapse/components/uni-collapse/uni-collapse.vue b/subPackage/patrol/components/uni-collapse/components/uni-collapse/uni-collapse.vue
deleted file mode 100644
index 384c39a..0000000
--- a/subPackage/patrol/components/uni-collapse/components/uni-collapse/uni-collapse.vue
+++ /dev/null
@@ -1,147 +0,0 @@
-<template>
- <view class="uni-collapse">
- <slot />
- </view>
-</template>
-<script>
- /**
- * Collapse 折叠面板
- * @description 展示可以折叠 / 展开的内容区域
- * @tutorial https://ext.dcloud.net.cn/plugin?id=23
- * @property {String|Array} value 当前激活面板改变时触发(如果是手风琴模式,参数类型为string,否则为array)
- * @property {Boolean} accordion = [true|false] 是否开启手风琴效果是否开启手风琴效果
- * @event {Function} change 切换面板时触发,如果是手风琴模式,返回类型为string,否则为array
- */
- export default {
- name: 'uniCollapse',
- emits:['change','activeItem','input','update:modelValue'],
- props: {
- value: {
- type: [String, Array],
- default: ''
- },
- modelValue: {
- type: [String, Array],
- default: ''
- },
- accordion: {
- // 是否开启手风琴效果
- type: [Boolean, String],
- default: false
- },
- },
- data() {
- return {}
- },
- computed: {
- // TODO 兼容 vue2 和 vue3
- dataValue() {
- let value = (typeof this.value === 'string' && this.value === '') ||
- (Array.isArray(this.value) && this.value.length === 0)
- let modelValue = (typeof this.modelValue === 'string' && this.modelValue === '') ||
- (Array.isArray(this.modelValue) && this.modelValue.length === 0)
- if (value) {
- return this.modelValue
- }
- if (modelValue) {
- return this.value
- }
-
- return this.value
- }
- },
- watch: {
- dataValue(val) {
- this.setOpen(val)
- }
- },
- created() {
- this.childrens = []
- this.names = []
- },
- mounted() {
- this.$nextTick(()=>{
- this.setOpen(this.dataValue)
- })
- },
- methods: {
- setOpen(val) {
- let str = typeof val === 'string'
- let arr = Array.isArray(val)
- this.childrens.forEach((vm, index) => {
- if (str) {
- if (val === vm.nameSync) {
- if (!this.accordion) {
- console.warn('accordion 属性为 false ,v-model 类型应该为 array')
- return
- }
- vm.isOpen = true
- }
- }
- if (arr) {
- val.forEach(v => {
- if (v === vm.nameSync) {
- if (this.accordion) {
- console.warn('accordion 属性为 true ,v-model 类型应该为 string')
- return
- }
- vm.isOpen = true
- }
- })
- }
- })
- this.emit(val)
- },
- setAccordion(self) {
- if (!this.accordion) return
- this.childrens.forEach((vm, index) => {
- if (self !== vm) {
- vm.isOpen = false
- }
- })
- },
- resize() {
- this.childrens.forEach((vm, index) => {
- // #ifndef APP-NVUE
- vm.getCollapseHeight()
- // #endif
- // #ifdef APP-NVUE
- vm.getNvueHwight()
- // #endif
- })
- },
- onChange(isOpen, self) {
- let activeItem = []
-
- if (this.accordion) {
- activeItem = isOpen ? self.nameSync : ''
- } else {
- this.childrens.forEach((vm, index) => {
- if (vm.isOpen) {
- activeItem.push(vm.nameSync)
- }
- })
- }
- this.$emit('change', activeItem)
- this.emit(activeItem)
- },
- emit(val){
- this.$emit('input', val)
- this.$emit('update:modelValue', val)
- }
- }
- }
-</script>
-<style lang="scss" >
- .uni-collapse {
- /* #ifndef APP-NVUE */
- width: 100%;
- display: flex;
- /* #endif */
- /* #ifdef APP-NVUE */
- flex: 1;
- /* #endif */
- flex-direction: column;
- background-color: #fff;
- }
-</style>
diff --git a/subPackage/patrol/components/uni-collapse/package.json b/subPackage/patrol/components/uni-collapse/package.json
deleted file mode 100644
index 65349cf..0000000
--- a/subPackage/patrol/components/uni-collapse/package.json
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- "id": "uni-collapse",
- "displayName": "uni-collapse 折叠面板",
- "version": "1.4.3",
- "description": "Collapse 组件,可以折叠 / 展开的内容区域。",
- "keywords": [
- "uni-ui",
- "折叠",
- "折叠面板",
- "手风琴"
-],
- "repository": "https://github.com/dcloudio/uni-ui",
- "engines": {
- "HBuilderX": ""
- },
- "directories": {
- "example": "../../temps/example_temps"
- },
- "dcloudext": {
- "category": [
- "前端组件",
- "通用组件"
- ],
- "sale": {
- "regular": {
- "price": "0.00"
- },
- "sourcecode": {
- "price": "0.00"
- }
- },
- "contact": {
- "qq": ""
- },
- "declaration": {
- "ads": "无",
- "data": "无",
- "permissions": "无"
- },
- "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
- },
- "uni_modules": {
- "dependencies": [
- "uni-scss",
- "uni-icons"
- ],
- "encrypt": [],
- "platforms": {
- "cloud": {
- "tcb": "y",
- "aliyun": "y"
- },
- "client": {
- "App": {
- "app-vue": "y",
- "app-nvue": "y"
- },
- "H5-mobile": {
- "Safari": "y",
- "Android Browser": "y",
- "微信浏览器(Android)": "y",
- "QQ浏览器(Android)": "y"
- },
- "H5-pc": {
- "Chrome": "y",
- "IE": "y",
- "Edge": "y",
- "Firefox": "y",
- "Safari": "y"
- },
- "小程序": {
- "微信": "y",
- "阿里": "y",
- "百度": "y",
- "字节跳动": "y",
- "QQ": "y"
- },
- "快应用": {
- "华为": "u",
- "联盟": "u"
- },
- "Vue": {
- "vue2": "y",
- "vue3": "y"
- }
- }
- }
- }
-}
diff --git a/subPackage/patrol/components/uni-collapse/readme.md b/subPackage/patrol/components/uni-collapse/readme.md
deleted file mode 100644
index bc758eb..0000000
--- a/subPackage/patrol/components/uni-collapse/readme.md
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-## Collapse 折叠面板
-> **组件名:uni-collapse**
-> 代码块: `uCollapse`
-> 关联组件:`uni-collapse-item`、`uni-icons`。
-
-
-折叠面板用来折叠/显示过长的内容或者是列表。通常是在多内容分类项使用,折叠不重要的内容,显示重要内容。点击可以展开折叠部分。
-
-### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-collapse)
-#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
diff --git a/subPackage/patrol/components/uni-icons/changelog.md b/subPackage/patrol/components/uni-icons/changelog.md
deleted file mode 100644
index 6449885..0000000
--- a/subPackage/patrol/components/uni-icons/changelog.md
+++ /dev/null
@@ -1,22 +0,0 @@
-## 1.3.5(2022-01-24)
-- 优化 size 属性可以传入不带单位的字符串数值
-## 1.3.4(2022-01-24)
-- 优化 size 支持其他单位
-## 1.3.3(2022-01-17)
-- 修复 nvue 有些图标不显示的bug,兼容老版本图标
-## 1.3.2(2021-12-01)
-- 优化 示例可复制图标名称
-## 1.3.1(2021-11-23)
-- 优化 兼容旧组件 type 值
-## 1.3.0(2021-11-19)
-- 新增 更多图标
-- 优化 自定义图标使用方式
-- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
-- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons)
-## 1.1.7(2021-11-08)
-## 1.2.0(2021-07-30)
-- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
-## 1.1.5(2021-05-12)
-- 新增 组件示例地址
-## 1.1.4(2021-02-05)
-- 调整为uni_modules目录规范
diff --git a/subPackage/patrol/components/uni-icons/components/uni-icons/icons.js b/subPackage/patrol/components/uni-icons/components/uni-icons/icons.js
deleted file mode 100644
index 7889936..0000000
--- a/subPackage/patrol/components/uni-icons/components/uni-icons/icons.js
+++ /dev/null
@@ -1,1169 +0,0 @@
-export default {
- "id": "2852637",
- "name": "uniui图标库",
- "font_family": "uniicons",
- "css_prefix_text": "uniui-",
- "description": "",
- "glyphs": [
- {
- "icon_id": "25027049",
- "name": "yanse",
- "font_class": "color",
- "unicode": "e6cf",
- "unicode_decimal": 59087
- },
- {
- "icon_id": "25027048",
- "name": "wallet",
- "font_class": "wallet",
- "unicode": "e6b1",
- "unicode_decimal": 59057
- },
- {
- "icon_id": "25015720",
- "name": "settings-filled",
- "font_class": "settings-filled",
- "unicode": "e6ce",
- "unicode_decimal": 59086
- },
- {
- "icon_id": "25015434",
- "name": "shimingrenzheng-filled",
- "font_class": "auth-filled",
- "unicode": "e6cc",
- "unicode_decimal": 59084
- },
- {
- "icon_id": "24934246",
- "name": "shop-filled",
- "font_class": "shop-filled",
- "unicode": "e6cd",
- "unicode_decimal": 59085
- },
- {
- "icon_id": "24934159",
- "name": "staff-filled-01",
- "font_class": "staff-filled",
- "unicode": "e6cb",
- "unicode_decimal": 59083
- },
- {
- "icon_id": "24932461",
- "name": "VIP-filled",
- "font_class": "vip-filled",
- "unicode": "e6c6",
- "unicode_decimal": 59078
- },
- {
- "icon_id": "24932462",
- "name": "plus_circle_fill",
- "font_class": "plus-filled",
- "unicode": "e6c7",
- "unicode_decimal": 59079
- },
- {
- "icon_id": "24932463",
- "name": "folder_add-filled",
- "font_class": "folder-add-filled",
- "unicode": "e6c8",
- "unicode_decimal": 59080
- },
- {
- "icon_id": "24932464",
- "name": "yanse-filled",
- "font_class": "color-filled",
- "unicode": "e6c9",
- "unicode_decimal": 59081
- },
- {
- "icon_id": "24932465",
- "name": "tune-filled",
- "font_class": "tune-filled",
- "unicode": "e6ca",
- "unicode_decimal": 59082
- },
- {
- "icon_id": "24932455",
- "name": "a-rilidaka-filled",
- "font_class": "calendar-filled",
- "unicode": "e6c0",
- "unicode_decimal": 59072
- },
- {
- "icon_id": "24932456",
- "name": "notification-filled",
- "font_class": "notification-filled",
- "unicode": "e6c1",
- "unicode_decimal": 59073
- },
- {
- "icon_id": "24932457",
- "name": "wallet-filled",
- "font_class": "wallet-filled",
- "unicode": "e6c2",
- "unicode_decimal": 59074
- },
- {
- "icon_id": "24932458",
- "name": "paihangbang-filled",
- "font_class": "medal-filled",
- "unicode": "e6c3",
- "unicode_decimal": 59075
- },
- {
- "icon_id": "24932459",
- "name": "gift-filled",
- "font_class": "gift-filled",
- "unicode": "e6c4",
- "unicode_decimal": 59076
- },
- {
- "icon_id": "24932460",
- "name": "fire-filled",
- "font_class": "fire-filled",
- "unicode": "e6c5",
- "unicode_decimal": 59077
- },
- {
- "icon_id": "24928001",
- "name": "refreshempty",
- "font_class": "refreshempty",
- "unicode": "e6bf",
- "unicode_decimal": 59071
- },
- {
- "icon_id": "24926853",
- "name": "location-ellipse",
- "font_class": "location-filled",
- "unicode": "e6af",
- "unicode_decimal": 59055
- },
- {
- "icon_id": "24926735",
- "name": "person-filled",
- "font_class": "person-filled",
- "unicode": "e69d",
- "unicode_decimal": 59037
- },
- {
- "icon_id": "24926703",
- "name": "personadd-filled",
- "font_class": "personadd-filled",
- "unicode": "e698",
- "unicode_decimal": 59032
- },
- {
- "icon_id": "24923351",
- "name": "back",
- "font_class": "back",
- "unicode": "e6b9",
- "unicode_decimal": 59065
- },
- {
- "icon_id": "24923352",
- "name": "forward",
- "font_class": "forward",
- "unicode": "e6ba",
- "unicode_decimal": 59066
- },
- {
- "icon_id": "24923353",
- "name": "arrowthinright",
- "font_class": "arrow-right",
- "unicode": "e6bb",
- "unicode_decimal": 59067
- },
- {
- "icon_id": "24923353",
- "name": "arrowthinright",
- "font_class": "arrowthinright",
- "unicode": "e6bb",
- "unicode_decimal": 59067
- },
- {
- "icon_id": "24923354",
- "name": "arrowthinleft",
- "font_class": "arrow-left",
- "unicode": "e6bc",
- "unicode_decimal": 59068
- },
- {
- "icon_id": "24923354",
- "name": "arrowthinleft",
- "font_class": "arrowthinleft",
- "unicode": "e6bc",
- "unicode_decimal": 59068
- },
- {
- "icon_id": "24923355",
- "name": "arrowthinup",
- "font_class": "arrow-up",
- "unicode": "e6bd",
- "unicode_decimal": 59069
- },
- {
- "icon_id": "24923355",
- "name": "arrowthinup",
- "font_class": "arrowthinup",
- "unicode": "e6bd",
- "unicode_decimal": 59069
- },
- {
- "icon_id": "24923356",
- "name": "arrowthindown",
- "font_class": "arrow-down",
- "unicode": "e6be",
- "unicode_decimal": 59070
- },{
- "icon_id": "24923356",
- "name": "arrowthindown",
- "font_class": "arrowthindown",
- "unicode": "e6be",
- "unicode_decimal": 59070
- },
- {
- "icon_id": "24923349",
- "name": "arrowdown",
- "font_class": "bottom",
- "unicode": "e6b8",
- "unicode_decimal": 59064
- },{
- "icon_id": "24923349",
- "name": "arrowdown",
- "font_class": "arrowdown",
- "unicode": "e6b8",
- "unicode_decimal": 59064
- },
- {
- "icon_id": "24923346",
- "name": "arrowright",
- "font_class": "right",
- "unicode": "e6b5",
- "unicode_decimal": 59061
- },
- {
- "icon_id": "24923346",
- "name": "arrowright",
- "font_class": "arrowright",
- "unicode": "e6b5",
- "unicode_decimal": 59061
- },
- {
- "icon_id": "24923347",
- "name": "arrowup",
- "font_class": "top",
- "unicode": "e6b6",
- "unicode_decimal": 59062
- },
- {
- "icon_id": "24923347",
- "name": "arrowup",
- "font_class": "arrowup",
- "unicode": "e6b6",
- "unicode_decimal": 59062
- },
- {
- "icon_id": "24923348",
- "name": "arrowleft",
- "font_class": "left",
- "unicode": "e6b7",
- "unicode_decimal": 59063
- },
- {
- "icon_id": "24923348",
- "name": "arrowleft",
- "font_class": "arrowleft",
- "unicode": "e6b7",
- "unicode_decimal": 59063
- },
- {
- "icon_id": "24923334",
- "name": "eye",
- "font_class": "eye",
- "unicode": "e651",
- "unicode_decimal": 58961
- },
- {
- "icon_id": "24923335",
- "name": "eye-filled",
- "font_class": "eye-filled",
- "unicode": "e66a",
- "unicode_decimal": 58986
- },
- {
- "icon_id": "24923336",
- "name": "eye-slash",
- "font_class": "eye-slash",
- "unicode": "e6b3",
- "unicode_decimal": 59059
- },
- {
- "icon_id": "24923337",
- "name": "eye-slash-filled",
- "font_class": "eye-slash-filled",
- "unicode": "e6b4",
- "unicode_decimal": 59060
- },
- {
- "icon_id": "24923305",
- "name": "info-filled",
- "font_class": "info-filled",
- "unicode": "e649",
- "unicode_decimal": 58953
- },
- {
- "icon_id": "24923299",
- "name": "reload-01",
- "font_class": "reload",
- "unicode": "e6b2",
- "unicode_decimal": 59058
- },
- {
- "icon_id": "24923195",
- "name": "mic_slash_fill",
- "font_class": "micoff-filled",
- "unicode": "e6b0",
- "unicode_decimal": 59056
- },
- {
- "icon_id": "24923165",
- "name": "map-pin-ellipse",
- "font_class": "map-pin-ellipse",
- "unicode": "e6ac",
- "unicode_decimal": 59052
- },
- {
- "icon_id": "24923166",
- "name": "map-pin",
- "font_class": "map-pin",
- "unicode": "e6ad",
- "unicode_decimal": 59053
- },
- {
- "icon_id": "24923167",
- "name": "location",
- "font_class": "location",
- "unicode": "e6ae",
- "unicode_decimal": 59054
- },
- {
- "icon_id": "24923064",
- "name": "starhalf",
- "font_class": "starhalf",
- "unicode": "e683",
- "unicode_decimal": 59011
- },
- {
- "icon_id": "24923065",
- "name": "star",
- "font_class": "star",
- "unicode": "e688",
- "unicode_decimal": 59016
- },
- {
- "icon_id": "24923066",
- "name": "star-filled",
- "font_class": "star-filled",
- "unicode": "e68f",
- "unicode_decimal": 59023
- },
- {
- "icon_id": "24899646",
- "name": "a-rilidaka",
- "font_class": "calendar",
- "unicode": "e6a0",
- "unicode_decimal": 59040
- },
- {
- "icon_id": "24899647",
- "name": "fire",
- "font_class": "fire",
- "unicode": "e6a1",
- "unicode_decimal": 59041
- },
- {
- "icon_id": "24899648",
- "name": "paihangbang",
- "font_class": "medal",
- "unicode": "e6a2",
- "unicode_decimal": 59042
- },
- {
- "icon_id": "24899649",
- "name": "font",
- "font_class": "font",
- "unicode": "e6a3",
- "unicode_decimal": 59043
- },
- {
- "icon_id": "24899650",
- "name": "gift",
- "font_class": "gift",
- "unicode": "e6a4",
- "unicode_decimal": 59044
- },
- {
- "icon_id": "24899651",
- "name": "link",
- "font_class": "link",
- "unicode": "e6a5",
- "unicode_decimal": 59045
- },
- {
- "icon_id": "24899652",
- "name": "notification",
- "font_class": "notification",
- "unicode": "e6a6",
- "unicode_decimal": 59046
- },
- {
- "icon_id": "24899653",
- "name": "staff",
- "font_class": "staff",
- "unicode": "e6a7",
- "unicode_decimal": 59047
- },
- {
- "icon_id": "24899654",
- "name": "VIP",
- "font_class": "vip",
- "unicode": "e6a8",
- "unicode_decimal": 59048
- },
- {
- "icon_id": "24899655",
- "name": "folder_add",
- "font_class": "folder-add",
- "unicode": "e6a9",
- "unicode_decimal": 59049
- },
- {
- "icon_id": "24899656",
- "name": "tune",
- "font_class": "tune",
- "unicode": "e6aa",
- "unicode_decimal": 59050
- },
- {
- "icon_id": "24899657",
- "name": "shimingrenzheng",
- "font_class": "auth",
- "unicode": "e6ab",
- "unicode_decimal": 59051
- },
- {
- "icon_id": "24899565",
- "name": "person",
- "font_class": "person",
- "unicode": "e699",
- "unicode_decimal": 59033
- },
- {
- "icon_id": "24899566",
- "name": "email-filled",
- "font_class": "email-filled",
- "unicode": "e69a",
- "unicode_decimal": 59034
- },
- {
- "icon_id": "24899567",
- "name": "phone-filled",
- "font_class": "phone-filled",
- "unicode": "e69b",
- "unicode_decimal": 59035
- },
- {
- "icon_id": "24899568",
- "name": "phone",
- "font_class": "phone",
- "unicode": "e69c",
- "unicode_decimal": 59036
- },
- {
- "icon_id": "24899570",
- "name": "email",
- "font_class": "email",
- "unicode": "e69e",
- "unicode_decimal": 59038
- },
- {
- "icon_id": "24899571",
- "name": "personadd",
- "font_class": "personadd",
- "unicode": "e69f",
- "unicode_decimal": 59039
- },
- {
- "icon_id": "24899558",
- "name": "chatboxes-filled",
- "font_class": "chatboxes-filled",
- "unicode": "e692",
- "unicode_decimal": 59026
- },
- {
- "icon_id": "24899559",
- "name": "contact",
- "font_class": "contact",
- "unicode": "e693",
- "unicode_decimal": 59027
- },
- {
- "icon_id": "24899560",
- "name": "chatbubble-filled",
- "font_class": "chatbubble-filled",
- "unicode": "e694",
- "unicode_decimal": 59028
- },
- {
- "icon_id": "24899561",
- "name": "contact-filled",
- "font_class": "contact-filled",
- "unicode": "e695",
- "unicode_decimal": 59029
- },
- {
- "icon_id": "24899562",
- "name": "chatboxes",
- "font_class": "chatboxes",
- "unicode": "e696",
- "unicode_decimal": 59030
- },
- {
- "icon_id": "24899563",
- "name": "chatbubble",
- "font_class": "chatbubble",
- "unicode": "e697",
- "unicode_decimal": 59031
- },
- {
- "icon_id": "24881290",
- "name": "upload-filled",
- "font_class": "upload-filled",
- "unicode": "e68e",
- "unicode_decimal": 59022
- },
- {
- "icon_id": "24881292",
- "name": "upload",
- "font_class": "upload",
- "unicode": "e690",
- "unicode_decimal": 59024
- },
- {
- "icon_id": "24881293",
- "name": "weixin",
- "font_class": "weixin",
- "unicode": "e691",
- "unicode_decimal": 59025
- },
- {
- "icon_id": "24881274",
- "name": "compose",
- "font_class": "compose",
- "unicode": "e67f",
- "unicode_decimal": 59007
- },
- {
- "icon_id": "24881275",
- "name": "qq",
- "font_class": "qq",
- "unicode": "e680",
- "unicode_decimal": 59008
- },
- {
- "icon_id": "24881276",
- "name": "download-filled",
- "font_class": "download-filled",
- "unicode": "e681",
- "unicode_decimal": 59009
- },
- {
- "icon_id": "24881277",
- "name": "pengyouquan",
- "font_class": "pyq",
- "unicode": "e682",
- "unicode_decimal": 59010
- },
- {
- "icon_id": "24881279",
- "name": "sound",
- "font_class": "sound",
- "unicode": "e684",
- "unicode_decimal": 59012
- },
- {
- "icon_id": "24881280",
- "name": "trash-filled",
- "font_class": "trash-filled",
- "unicode": "e685",
- "unicode_decimal": 59013
- },
- {
- "icon_id": "24881281",
- "name": "sound-filled",
- "font_class": "sound-filled",
- "unicode": "e686",
- "unicode_decimal": 59014
- },
- {
- "icon_id": "24881282",
- "name": "trash",
- "font_class": "trash",
- "unicode": "e687",
- "unicode_decimal": 59015
- },
- {
- "icon_id": "24881284",
- "name": "videocam-filled",
- "font_class": "videocam-filled",
- "unicode": "e689",
- "unicode_decimal": 59017
- },
- {
- "icon_id": "24881285",
- "name": "spinner-cycle",
- "font_class": "spinner-cycle",
- "unicode": "e68a",
- "unicode_decimal": 59018
- },
- {
- "icon_id": "24881286",
- "name": "weibo",
- "font_class": "weibo",
- "unicode": "e68b",
- "unicode_decimal": 59019
- },
- {
- "icon_id": "24881288",
- "name": "videocam",
- "font_class": "videocam",
- "unicode": "e68c",
- "unicode_decimal": 59020
- },
- {
- "icon_id": "24881289",
- "name": "download",
- "font_class": "download",
- "unicode": "e68d",
- "unicode_decimal": 59021
- },
- {
- "icon_id": "24879601",
- "name": "help",
- "font_class": "help",
- "unicode": "e679",
- "unicode_decimal": 59001
- },
- {
- "icon_id": "24879602",
- "name": "navigate-filled",
- "font_class": "navigate-filled",
- "unicode": "e67a",
- "unicode_decimal": 59002
- },
- {
- "icon_id": "24879603",
- "name": "plusempty",
- "font_class": "plusempty",
- "unicode": "e67b",
- "unicode_decimal": 59003
- },
- {
- "icon_id": "24879604",
- "name": "smallcircle",
- "font_class": "smallcircle",
- "unicode": "e67c",
- "unicode_decimal": 59004
- },
- {
- "icon_id": "24879605",
- "name": "minus-filled",
- "font_class": "minus-filled",
- "unicode": "e67d",
- "unicode_decimal": 59005
- },
- {
- "icon_id": "24879606",
- "name": "micoff",
- "font_class": "micoff",
- "unicode": "e67e",
- "unicode_decimal": 59006
- },
- {
- "icon_id": "24879588",
- "name": "closeempty",
- "font_class": "closeempty",
- "unicode": "e66c",
- "unicode_decimal": 58988
- },
- {
- "icon_id": "24879589",
- "name": "clear",
- "font_class": "clear",
- "unicode": "e66d",
- "unicode_decimal": 58989
- },
- {
- "icon_id": "24879590",
- "name": "navigate",
- "font_class": "navigate",
- "unicode": "e66e",
- "unicode_decimal": 58990
- },
- {
- "icon_id": "24879591",
- "name": "minus",
- "font_class": "minus",
- "unicode": "e66f",
- "unicode_decimal": 58991
- },
- {
- "icon_id": "24879592",
- "name": "image",
- "font_class": "image",
- "unicode": "e670",
- "unicode_decimal": 58992
- },
- {
- "icon_id": "24879593",
- "name": "mic",
- "font_class": "mic",
- "unicode": "e671",
- "unicode_decimal": 58993
- },
- {
- "icon_id": "24879594",
- "name": "paperplane",
- "font_class": "paperplane",
- "unicode": "e672",
- "unicode_decimal": 58994
- },
- {
- "icon_id": "24879595",
- "name": "close",
- "font_class": "close",
- "unicode": "e673",
- "unicode_decimal": 58995
- },
- {
- "icon_id": "24879596",
- "name": "help-filled",
- "font_class": "help-filled",
- "unicode": "e674",
- "unicode_decimal": 58996
- },
- {
- "icon_id": "24879597",
- "name": "plus-filled",
- "font_class": "paperplane-filled",
- "unicode": "e675",
- "unicode_decimal": 58997
- },
- {
- "icon_id": "24879598",
- "name": "plus",
- "font_class": "plus",
- "unicode": "e676",
- "unicode_decimal": 58998
- },
- {
- "icon_id": "24879599",
- "name": "mic-filled",
- "font_class": "mic-filled",
- "unicode": "e677",
- "unicode_decimal": 58999
- },
- {
- "icon_id": "24879600",
- "name": "image-filled",
- "font_class": "image-filled",
- "unicode": "e678",
- "unicode_decimal": 59000
- },
- {
- "icon_id": "24855900",
- "name": "locked-filled",
- "font_class": "locked-filled",
- "unicode": "e668",
- "unicode_decimal": 58984
- },
- {
- "icon_id": "24855901",
- "name": "info",
- "font_class": "info",
- "unicode": "e669",
- "unicode_decimal": 58985
- },
- {
- "icon_id": "24855903",
- "name": "locked",
- "font_class": "locked",
- "unicode": "e66b",
- "unicode_decimal": 58987
- },
- {
- "icon_id": "24855884",
- "name": "camera-filled",
- "font_class": "camera-filled",
- "unicode": "e658",
- "unicode_decimal": 58968
- },
- {
- "icon_id": "24855885",
- "name": "chat-filled",
- "font_class": "chat-filled",
- "unicode": "e659",
- "unicode_decimal": 58969
- },
- {
- "icon_id": "24855886",
- "name": "camera",
- "font_class": "camera",
- "unicode": "e65a",
- "unicode_decimal": 58970
- },
- {
- "icon_id": "24855887",
- "name": "circle",
- "font_class": "circle",
- "unicode": "e65b",
- "unicode_decimal": 58971
- },
- {
- "icon_id": "24855888",
- "name": "checkmarkempty",
- "font_class": "checkmarkempty",
- "unicode": "e65c",
- "unicode_decimal": 58972
- },
- {
- "icon_id": "24855889",
- "name": "chat",
- "font_class": "chat",
- "unicode": "e65d",
- "unicode_decimal": 58973
- },
- {
- "icon_id": "24855890",
- "name": "circle-filled",
- "font_class": "circle-filled",
- "unicode": "e65e",
- "unicode_decimal": 58974
- },
- {
- "icon_id": "24855891",
- "name": "flag",
- "font_class": "flag",
- "unicode": "e65f",
- "unicode_decimal": 58975
- },
- {
- "icon_id": "24855892",
- "name": "flag-filled",
- "font_class": "flag-filled",
- "unicode": "e660",
- "unicode_decimal": 58976
- },
- {
- "icon_id": "24855893",
- "name": "gear-filled",
- "font_class": "gear-filled",
- "unicode": "e661",
- "unicode_decimal": 58977
- },
- {
- "icon_id": "24855894",
- "name": "home",
- "font_class": "home",
- "unicode": "e662",
- "unicode_decimal": 58978
- },
- {
- "icon_id": "24855895",
- "name": "home-filled",
- "font_class": "home-filled",
- "unicode": "e663",
- "unicode_decimal": 58979
- },
- {
- "icon_id": "24855896",
- "name": "gear",
- "font_class": "gear",
- "unicode": "e664",
- "unicode_decimal": 58980
- },
- {
- "icon_id": "24855897",
- "name": "smallcircle-filled",
- "font_class": "smallcircle-filled",
- "unicode": "e665",
- "unicode_decimal": 58981
- },
- {
- "icon_id": "24855898",
- "name": "map-filled",
- "font_class": "map-filled",
- "unicode": "e666",
- "unicode_decimal": 58982
- },
- {
- "icon_id": "24855899",
- "name": "map",
- "font_class": "map",
- "unicode": "e667",
- "unicode_decimal": 58983
- },
- {
- "icon_id": "24855825",
- "name": "refresh-filled",
- "font_class": "refresh-filled",
- "unicode": "e656",
- "unicode_decimal": 58966
- },
- {
- "icon_id": "24855826",
- "name": "refresh",
- "font_class": "refresh",
- "unicode": "e657",
- "unicode_decimal": 58967
- },
- {
- "icon_id": "24855808",
- "name": "cloud-upload",
- "font_class": "cloud-upload",
- "unicode": "e645",
- "unicode_decimal": 58949
- },
- {
- "icon_id": "24855809",
- "name": "cloud-download-filled",
- "font_class": "cloud-download-filled",
- "unicode": "e646",
- "unicode_decimal": 58950
- },
- {
- "icon_id": "24855810",
- "name": "cloud-download",
- "font_class": "cloud-download",
- "unicode": "e647",
- "unicode_decimal": 58951
- },
- {
- "icon_id": "24855811",
- "name": "cloud-upload-filled",
- "font_class": "cloud-upload-filled",
- "unicode": "e648",
- "unicode_decimal": 58952
- },
- {
- "icon_id": "24855813",
- "name": "redo",
- "font_class": "redo",
- "unicode": "e64a",
- "unicode_decimal": 58954
- },
- {
- "icon_id": "24855814",
- "name": "images-filled",
- "font_class": "images-filled",
- "unicode": "e64b",
- "unicode_decimal": 58955
- },
- {
- "icon_id": "24855815",
- "name": "undo-filled",
- "font_class": "undo-filled",
- "unicode": "e64c",
- "unicode_decimal": 58956
- },
- {
- "icon_id": "24855816",
- "name": "more",
- "font_class": "more",
- "unicode": "e64d",
- "unicode_decimal": 58957
- },
- {
- "icon_id": "24855817",
- "name": "more-filled",
- "font_class": "more-filled",
- "unicode": "e64e",
- "unicode_decimal": 58958
- },
- {
- "icon_id": "24855818",
- "name": "undo",
- "font_class": "undo",
- "unicode": "e64f",
- "unicode_decimal": 58959
- },
- {
- "icon_id": "24855819",
- "name": "images",
- "font_class": "images",
- "unicode": "e650",
- "unicode_decimal": 58960
- },
- {
- "icon_id": "24855821",
- "name": "paperclip",
- "font_class": "paperclip",
- "unicode": "e652",
- "unicode_decimal": 58962
- },
- {
- "icon_id": "24855822",
- "name": "settings",
- "font_class": "settings",
- "unicode": "e653",
- "unicode_decimal": 58963
- },
- {
- "icon_id": "24855823",
- "name": "search",
- "font_class": "search",
- "unicode": "e654",
- "unicode_decimal": 58964
- },
- {
- "icon_id": "24855824",
- "name": "redo-filled",
- "font_class": "redo-filled",
- "unicode": "e655",
- "unicode_decimal": 58965
- },
- {
- "icon_id": "24841702",
- "name": "list",
- "font_class": "list",
- "unicode": "e644",
- "unicode_decimal": 58948
- },
- {
- "icon_id": "24841489",
- "name": "mail-open-filled",
- "font_class": "mail-open-filled",
- "unicode": "e63a",
- "unicode_decimal": 58938
- },
- {
- "icon_id": "24841491",
- "name": "hand-thumbsdown-filled",
- "font_class": "hand-down-filled",
- "unicode": "e63c",
- "unicode_decimal": 58940
- },
- {
- "icon_id": "24841492",
- "name": "hand-thumbsdown",
- "font_class": "hand-down",
- "unicode": "e63d",
- "unicode_decimal": 58941
- },
- {
- "icon_id": "24841493",
- "name": "hand-thumbsup-filled",
- "font_class": "hand-up-filled",
- "unicode": "e63e",
- "unicode_decimal": 58942
- },
- {
- "icon_id": "24841494",
- "name": "hand-thumbsup",
- "font_class": "hand-up",
- "unicode": "e63f",
- "unicode_decimal": 58943
- },
- {
- "icon_id": "24841496",
- "name": "heart-filled",
- "font_class": "heart-filled",
- "unicode": "e641",
- "unicode_decimal": 58945
- },
- {
- "icon_id": "24841498",
- "name": "mail-open",
- "font_class": "mail-open",
- "unicode": "e643",
- "unicode_decimal": 58947
- },
- {
- "icon_id": "24841488",
- "name": "heart",
- "font_class": "heart",
- "unicode": "e639",
- "unicode_decimal": 58937
- },
- {
- "icon_id": "24839963",
- "name": "loop",
- "font_class": "loop",
- "unicode": "e633",
- "unicode_decimal": 58931
- },
- {
- "icon_id": "24839866",
- "name": "pulldown",
- "font_class": "pulldown",
- "unicode": "e632",
- "unicode_decimal": 58930
- },
- {
- "icon_id": "24813798",
- "name": "scan",
- "font_class": "scan",
- "unicode": "e62a",
- "unicode_decimal": 58922
- },
- {
- "icon_id": "24813786",
- "name": "bars",
- "font_class": "bars",
- "unicode": "e627",
- "unicode_decimal": 58919
- },
- {
- "icon_id": "24813788",
- "name": "cart-filled",
- "font_class": "cart-filled",
- "unicode": "e629",
- "unicode_decimal": 58921
- },
- {
- "icon_id": "24813790",
- "name": "checkbox",
- "font_class": "checkbox",
- "unicode": "e62b",
- "unicode_decimal": 58923
- },
- {
- "icon_id": "24813791",
- "name": "checkbox-filled",
- "font_class": "checkbox-filled",
- "unicode": "e62c",
- "unicode_decimal": 58924
- },
- {
- "icon_id": "24813794",
- "name": "shop",
- "font_class": "shop",
- "unicode": "e62f",
- "unicode_decimal": 58927
- },
- {
- "icon_id": "24813795",
- "name": "headphones",
- "font_class": "headphones",
- "unicode": "e630",
- "unicode_decimal": 58928
- },
- {
- "icon_id": "24813796",
- "name": "cart",
- "font_class": "cart",
- "unicode": "e631",
- "unicode_decimal": 58929
- }
- ]
-}
diff --git a/subPackage/patrol/components/uni-icons/components/uni-icons/uni-icons.vue b/subPackage/patrol/components/uni-icons/components/uni-icons/uni-icons.vue
deleted file mode 100644
index 86e7444..0000000
--- a/subPackage/patrol/components/uni-icons/components/uni-icons/uni-icons.vue
+++ /dev/null
@@ -1,96 +0,0 @@
-<template>
- <!-- #ifdef APP-NVUE -->
- <text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" @click="_onClick">{{unicode}}</text>
- <!-- #endif -->
- <!-- #ifndef APP-NVUE -->
- <text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick"></text>
- <!-- #endif -->
-</template>
-
-<script>
- import icons from './icons.js';
- const getVal = (val) => {
- const reg = /^[0-9]*$/g
- return (typeof val === 'number' || reg.test(val) )? val + 'px' : val;
- }
- // #ifdef APP-NVUE
- var domModule = weex.requireModule('dom');
- import iconUrl from './uniicons.ttf'
- domModule.addRule('fontFace', {
- 'fontFamily': "uniicons",
- 'src': "url('"+iconUrl+"')"
- });
- // #endif
-
- /**
- * Icons 图标
- * @description 用于展示 icons 图标
- * @tutorial https://ext.dcloud.net.cn/plugin?id=28
- * @property {Number} size 图标大小
- * @property {String} type 图标图案,参考示例
- * @property {String} color 图标颜色
- * @property {String} customPrefix 自定义图标
- * @event {Function} click 点击 Icon 触发事件
- */
- export default {
- name: 'UniIcons',
- emits:['click'],
- props: {
- type: {
- type: String,
- default: ''
- },
- color: {
- type: String,
- default: '#333333'
- },
- size: {
- type: [Number, String],
- default: 16
- },
- customPrefix:{
- type: String,
- default: ''
- }
- },
- data() {
- return {
- icons: icons.glyphs
- }
- },
- computed:{
- unicode(){
- let code = this.icons.find(v=>v.font_class === this.type)
- if(code){
- return unescape(`%u${code.unicode}`)
- }
- return ''
- },
- iconSize(){
- return getVal(this.size)
- }
- },
- methods: {
- _onClick() {
- this.$emit('click')
- }
- }
- }
-</script>
-
-<style lang="scss">
- /* #ifndef APP-NVUE */
- @import './uniicons.css';
- @font-face {
- font-family: uniicons;
- src: url('./uniicons.ttf') format('truetype');
- }
-
- /* #endif */
- .uni-icons {
- font-family: uniicons;
- text-decoration: none;
- text-align: center;
- }
-
-</style>
diff --git a/subPackage/patrol/components/uni-icons/components/uni-icons/uni.ttf b/subPackage/patrol/components/uni-icons/components/uni-icons/uni.ttf
deleted file mode 100644
index 60a1968..0000000
--- a/subPackage/patrol/components/uni-icons/components/uni-icons/uni.ttf
+++ /dev/null
Binary files differ
diff --git a/subPackage/patrol/components/uni-icons/components/uni-icons/uniicons.css b/subPackage/patrol/components/uni-icons/components/uni-icons/uniicons.css
deleted file mode 100644
index 2f56eab..0000000
--- a/subPackage/patrol/components/uni-icons/components/uni-icons/uniicons.css
+++ /dev/null
@@ -1,663 +0,0 @@
-.uniui-color:before {
- content: "\e6cf";
-}
-
-.uniui-wallet:before {
- content: "\e6b1";
-}
-
-.uniui-settings-filled:before {
- content: "\e6ce";
-}
-
-.uniui-auth-filled:before {
- content: "\e6cc";
-}
-
-.uniui-shop-filled:before {
- content: "\e6cd";
-}
-
-.uniui-staff-filled:before {
- content: "\e6cb";
-}
-
-.uniui-vip-filled:before {
- content: "\e6c6";
-}
-
-.uniui-plus-filled:before {
- content: "\e6c7";
-}
-
-.uniui-folder-add-filled:before {
- content: "\e6c8";
-}
-
-.uniui-color-filled:before {
- content: "\e6c9";
-}
-
-.uniui-tune-filled:before {
- content: "\e6ca";
-}
-
-.uniui-calendar-filled:before {
- content: "\e6c0";
-}
-
-.uniui-notification-filled:before {
- content: "\e6c1";
-}
-
-.uniui-wallet-filled:before {
- content: "\e6c2";
-}
-
-.uniui-medal-filled:before {
- content: "\e6c3";
-}
-
-.uniui-gift-filled:before {
- content: "\e6c4";
-}
-
-.uniui-fire-filled:before {
- content: "\e6c5";
-}
-
-.uniui-refreshempty:before {
- content: "\e6bf";
-}
-
-.uniui-location-filled:before {
- content: "\e6af";
-}
-
-.uniui-person-filled:before {
- content: "\e69d";
-}
-
-.uniui-personadd-filled:before {
- content: "\e698";
-}
-
-.uniui-back:before {
- content: "\e6b9";
-}
-
-.uniui-forward:before {
- content: "\e6ba";
-}
-
-.uniui-arrow-right:before {
- content: "\e6bb";
-}
-
-.uniui-arrowthinright:before {
- content: "\e6bb";
-}
-
-.uniui-arrow-left:before {
- content: "\e6bc";
-}
-
-.uniui-arrowthinleft:before {
- content: "\e6bc";
-}
-
-.uniui-arrow-up:before {
- content: "\e6bd";
-}
-
-.uniui-arrowthinup:before {
- content: "\e6bd";
-}
-
-.uniui-arrow-down:before {
- content: "\e6be";
-}
-
-.uniui-arrowthindown:before {
- content: "\e6be";
-}
-
-.uniui-bottom:before {
- content: "\e6b8";
-}
-
-.uniui-arrowdown:before {
- content: "\e6b8";
-}
-
-.uniui-right:before {
- content: "\e6b5";
-}
-
-.uniui-arrowright:before {
- content: "\e6b5";
-}
-
-.uniui-top:before {
- content: "\e6b6";
-}
-
-.uniui-arrowup:before {
- content: "\e6b6";
-}
-
-.uniui-left:before {
- content: "\e6b7";
-}
-
-.uniui-arrowleft:before {
- content: "\e6b7";
-}
-
-.uniui-eye:before {
- content: "\e651";
-}
-
-.uniui-eye-filled:before {
- content: "\e66a";
-}
-
-.uniui-eye-slash:before {
- content: "\e6b3";
-}
-
-.uniui-eye-slash-filled:before {
- content: "\e6b4";
-}
-
-.uniui-info-filled:before {
- content: "\e649";
-}
-
-.uniui-reload:before {
- content: "\e6b2";
-}
-
-.uniui-micoff-filled:before {
- content: "\e6b0";
-}
-
-.uniui-map-pin-ellipse:before {
- content: "\e6ac";
-}
-
-.uniui-map-pin:before {
- content: "\e6ad";
-}
-
-.uniui-location:before {
- content: "\e6ae";
-}
-
-.uniui-starhalf:before {
- content: "\e683";
-}
-
-.uniui-star:before {
- content: "\e688";
-}
-
-.uniui-star-filled:before {
- content: "\e68f";
-}
-
-.uniui-calendar:before {
- content: "\e6a0";
-}
-
-.uniui-fire:before {
- content: "\e6a1";
-}
-
-.uniui-medal:before {
- content: "\e6a2";
-}
-
-.uniui-font:before {
- content: "\e6a3";
-}
-
-.uniui-gift:before {
- content: "\e6a4";
-}
-
-.uniui-link:before {
- content: "\e6a5";
-}
-
-.uniui-notification:before {
- content: "\e6a6";
-}
-
-.uniui-staff:before {
- content: "\e6a7";
-}
-
-.uniui-vip:before {
- content: "\e6a8";
-}
-
-.uniui-folder-add:before {
- content: "\e6a9";
-}
-
-.uniui-tune:before {
- content: "\e6aa";
-}
-
-.uniui-auth:before {
- content: "\e6ab";
-}
-
-.uniui-person:before {
- content: "\e699";
-}
-
-.uniui-email-filled:before {
- content: "\e69a";
-}
-
-.uniui-phone-filled:before {
- content: "\e69b";
-}
-
-.uniui-phone:before {
- content: "\e69c";
-}
-
-.uniui-email:before {
- content: "\e69e";
-}
-
-.uniui-personadd:before {
- content: "\e69f";
-}
-
-.uniui-chatboxes-filled:before {
- content: "\e692";
-}
-
-.uniui-contact:before {
- content: "\e693";
-}
-
-.uniui-chatbubble-filled:before {
- content: "\e694";
-}
-
-.uniui-contact-filled:before {
- content: "\e695";
-}
-
-.uniui-chatboxes:before {
- content: "\e696";
-}
-
-.uniui-chatbubble:before {
- content: "\e697";
-}
-
-.uniui-upload-filled:before {
- content: "\e68e";
-}
-
-.uniui-upload:before {
- content: "\e690";
-}
-
-.uniui-weixin:before {
- content: "\e691";
-}
-
-.uniui-compose:before {
- content: "\e67f";
-}
-
-.uniui-qq:before {
- content: "\e680";
-}
-
-.uniui-download-filled:before {
- content: "\e681";
-}
-
-.uniui-pyq:before {
- content: "\e682";
-}
-
-.uniui-sound:before {
- content: "\e684";
-}
-
-.uniui-trash-filled:before {
- content: "\e685";
-}
-
-.uniui-sound-filled:before {
- content: "\e686";
-}
-
-.uniui-trash:before {
- content: "\e687";
-}
-
-.uniui-videocam-filled:before {
- content: "\e689";
-}
-
-.uniui-spinner-cycle:before {
- content: "\e68a";
-}
-
-.uniui-weibo:before {
- content: "\e68b";
-}
-
-.uniui-videocam:before {
- content: "\e68c";
-}
-
-.uniui-download:before {
- content: "\e68d";
-}
-
-.uniui-help:before {
- content: "\e679";
-}
-
-.uniui-navigate-filled:before {
- content: "\e67a";
-}
-
-.uniui-plusempty:before {
- content: "\e67b";
-}
-
-.uniui-smallcircle:before {
- content: "\e67c";
-}
-
-.uniui-minus-filled:before {
- content: "\e67d";
-}
-
-.uniui-micoff:before {
- content: "\e67e";
-}
-
-.uniui-closeempty:before {
- content: "\e66c";
-}
-
-.uniui-clear:before {
- content: "\e66d";
-}
-
-.uniui-navigate:before {
- content: "\e66e";
-}
-
-.uniui-minus:before {
- content: "\e66f";
-}
-
-.uniui-image:before {
- content: "\e670";
-}
-
-.uniui-mic:before {
- content: "\e671";
-}
-
-.uniui-paperplane:before {
- content: "\e672";
-}
-
-.uniui-close:before {
- content: "\e673";
-}
-
-.uniui-help-filled:before {
- content: "\e674";
-}
-
-.uniui-paperplane-filled:before {
- content: "\e675";
-}
-
-.uniui-plus:before {
- content: "\e676";
-}
-
-.uniui-mic-filled:before {
- content: "\e677";
-}
-
-.uniui-image-filled:before {
- content: "\e678";
-}
-
-.uniui-locked-filled:before {
- content: "\e668";
-}
-
-.uniui-info:before {
- content: "\e669";
-}
-
-.uniui-locked:before {
- content: "\e66b";
-}
-
-.uniui-camera-filled:before {
- content: "\e658";
-}
-
-.uniui-chat-filled:before {
- content: "\e659";
-}
-
-.uniui-camera:before {
- content: "\e65a";
-}
-
-.uniui-circle:before {
- content: "\e65b";
-}
-
-.uniui-checkmarkempty:before {
- content: "\e65c";
-}
-
-.uniui-chat:before {
- content: "\e65d";
-}
-
-.uniui-circle-filled:before {
- content: "\e65e";
-}
-
-.uniui-flag:before {
- content: "\e65f";
-}
-
-.uniui-flag-filled:before {
- content: "\e660";
-}
-
-.uniui-gear-filled:before {
- content: "\e661";
-}
-
-.uniui-home:before {
- content: "\e662";
-}
-
-.uniui-home-filled:before {
- content: "\e663";
-}
-
-.uniui-gear:before {
- content: "\e664";
-}
-
-.uniui-smallcircle-filled:before {
- content: "\e665";
-}
-
-.uniui-map-filled:before {
- content: "\e666";
-}
-
-.uniui-map:before {
- content: "\e667";
-}
-
-.uniui-refresh-filled:before {
- content: "\e656";
-}
-
-.uniui-refresh:before {
- content: "\e657";
-}
-
-.uniui-cloud-upload:before {
- content: "\e645";
-}
-
-.uniui-cloud-download-filled:before {
- content: "\e646";
-}
-
-.uniui-cloud-download:before {
- content: "\e647";
-}
-
-.uniui-cloud-upload-filled:before {
- content: "\e648";
-}
-
-.uniui-redo:before {
- content: "\e64a";
-}
-
-.uniui-images-filled:before {
- content: "\e64b";
-}
-
-.uniui-undo-filled:before {
- content: "\e64c";
-}
-
-.uniui-more:before {
- content: "\e64d";
-}
-
-.uniui-more-filled:before {
- content: "\e64e";
-}
-
-.uniui-undo:before {
- content: "\e64f";
-}
-
-.uniui-images:before {
- content: "\e650";
-}
-
-.uniui-paperclip:before {
- content: "\e652";
-}
-
-.uniui-settings:before {
- content: "\e653";
-}
-
-.uniui-search:before {
- content: "\e654";
-}
-
-.uniui-redo-filled:before {
- content: "\e655";
-}
-
-.uniui-list:before {
- content: "\e644";
-}
-
-.uniui-mail-open-filled:before {
- content: "\e63a";
-}
-
-.uniui-hand-down-filled:before {
- content: "\e63c";
-}
-
-.uniui-hand-down:before {
- content: "\e63d";
-}
-
-.uniui-hand-up-filled:before {
- content: "\e63e";
-}
-
-.uniui-hand-up:before {
- content: "\e63f";
-}
-
-.uniui-heart-filled:before {
- content: "\e641";
-}
-
-.uniui-mail-open:before {
- content: "\e643";
-}
-
-.uniui-heart:before {
- content: "\e639";
-}
-
-.uniui-loop:before {
- content: "\e633";
-}
-
-.uniui-pulldown:before {
- content: "\e632";
-}
-
-.uniui-scan:before {
- content: "\e62a";
-}
-
-.uniui-bars:before {
- content: "\e627";
-}
-
-.uniui-cart-filled:before {
- content: "\e629";
-}
-
-.uniui-checkbox:before {
- content: "\e62b";
-}
-
-.uniui-checkbox-filled:before {
- content: "\e62c";
-}
-
-.uniui-shop:before {
- content: "\e62f";
-}
-
-.uniui-headphones:before {
- content: "\e630";
-}
-
-.uniui-cart:before {
- content: "\e631";
-}
diff --git a/subPackage/patrol/components/uni-icons/components/uni-icons/uniicons.ttf b/subPackage/patrol/components/uni-icons/components/uni-icons/uniicons.ttf
deleted file mode 100644
index 835f33b..0000000
--- a/subPackage/patrol/components/uni-icons/components/uni-icons/uniicons.ttf
+++ /dev/null
Binary files differ
diff --git a/subPackage/patrol/components/uni-icons/package.json b/subPackage/patrol/components/uni-icons/package.json
deleted file mode 100644
index d1c4e77..0000000
--- a/subPackage/patrol/components/uni-icons/package.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "id": "uni-icons",
- "displayName": "uni-icons 图标",
- "version": "1.3.5",
- "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
- "keywords": [
- "uni-ui",
- "uniui",
- "icon",
- "图标"
-],
- "repository": "https://github.com/dcloudio/uni-ui",
- "engines": {
- "HBuilderX": "^3.2.14"
- },
- "directories": {
- "example": "../../temps/example_temps"
- },
- "dcloudext": {
- "category": [
- "前端组件",
- "通用组件"
- ],
- "sale": {
- "regular": {
- "price": "0.00"
- },
- "sourcecode": {
- "price": "0.00"
- }
- },
- "contact": {
- "qq": ""
- },
- "declaration": {
- "ads": "无",
- "data": "无",
- "permissions": "无"
- },
- "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
- },
- "uni_modules": {
- "dependencies": ["uni-scss"],
- "encrypt": [],
- "platforms": {
- "cloud": {
- "tcb": "y",
- "aliyun": "y"
- },
- "client": {
- "App": {
- "app-vue": "y",
- "app-nvue": "y"
- },
- "H5-mobile": {
- "Safari": "y",
- "Android Browser": "y",
- "微信浏览器(Android)": "y",
- "QQ浏览器(Android)": "y"
- },
- "H5-pc": {
- "Chrome": "y",
- "IE": "y",
- "Edge": "y",
- "Firefox": "y",
- "Safari": "y"
- },
- "小程序": {
- "微信": "y",
- "阿里": "y",
- "百度": "y",
- "字节跳动": "y",
- "QQ": "y"
- },
- "快应用": {
- "华为": "u",
- "联盟": "u"
- },
- "Vue": {
- "vue2": "y",
- "vue3": "y"
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/subPackage/patrol/components/uni-icons/readme.md b/subPackage/patrol/components/uni-icons/readme.md
deleted file mode 100644
index 86234ba..0000000
--- a/subPackage/patrol/components/uni-icons/readme.md
+++ /dev/null
@@ -1,8 +0,0 @@
-## Icons 图标
-> **组件名:uni-icons**
-> 代码块: `uIcons`
-
-用于展示 icons 图标 。
-
-### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons)
-#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
diff --git a/subPackage/patrol/components/uni-list/changelog.md b/subPackage/patrol/components/uni-list/changelog.md
deleted file mode 100644
index 6aa6e4e..0000000
--- a/subPackage/patrol/components/uni-list/changelog.md
+++ /dev/null
@@ -1,20 +0,0 @@
-## 1.2.1(2022-03-30)
-- 删除无用文件
-## 1.2.0(2021-11-23)
-- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
-- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-list](https://uniapp.dcloud.io/component/uniui/uni-list)
-## 1.1.3(2021-08-30)
-- 修复 在vue3中to属性在发行应用的时候报错的bug
-## 1.1.2(2021-07-30)
-- 优化 vue3下事件警告的问题
-## 1.1.1(2021-07-21)
-- 修复 与其他组件嵌套使用时,点击失效的Bug
-## 1.1.0(2021-07-13)
-- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
-## 1.0.17(2021-05-12)
-- 新增 组件示例地址
-## 1.0.16(2021-02-05)
-- 优化 组件引用关系,通过uni_modules引用组件
-## 1.0.15(2021-02-05)
-- 调整为uni_modules目录规范
-- 修复 uni-list-chat 角标显示不正常的问题
diff --git a/subPackage/patrol/components/uni-list/components/uni-list-ad/uni-list-ad.vue b/subPackage/patrol/components/uni-list/components/uni-list-ad/uni-list-ad.vue
deleted file mode 100644
index b9349c2..0000000
--- a/subPackage/patrol/components/uni-list/components/uni-list-ad/uni-list-ad.vue
+++ /dev/null
@@ -1,107 +0,0 @@
-<template>
- <!-- #ifdef APP-NVUE -->
- <cell>
- <!-- #endif -->
- <view class="uni-list-ad">
- <view v-if="borderShow" :class="{'uni-list--border':border,'uni-list-item--first':isFirstChild}"></view>
- <ad style="width: 200px;height: 300px;border-width: 1px;border-color: red;border-style: solid;" adpid="1111111111"
- unit-id="" appid="" apid="" type="feed" @error="aderror" @close="closeAd"></ad>
- </view>
- <!-- #ifdef APP-NVUE -->
- </cell>
- <!-- #endif -->
-
-</template>
-
-<script>
- // #ifdef APP-NVUE
- const dom = uni.requireNativePlugin('dom');
- // #endif
- export default {
- name: 'UniListAd',
- props: {
- title: {
- type: String,
- default: '',
-
- }
- },
- // inject: ['list'],
- data() {
- return {
- isFirstChild: false,
- border: false,
- borderShow: true,
- }
- },
-
- mounted() {
- this.list = this.getForm()
- if (this.list) {
- if (!this.list.firstChildAppend) {
- this.list.firstChildAppend = true
- this.isFirstChild = true
- }
- this.border = this.list.border
- }
- },
- methods: {
- /**
- * 获取父元素实例
- */
- getForm(name = 'uniList') {
- let parent = this.$parent;
- let parentName = parent.$options.name;
- while (parentName !== name) {
- parent = parent.$parent;
- if (!parent) return false
- parentName = parent.$options.name;
- }
- return parent;
- },
- aderror(e) {
- console.log("aderror: " + JSON.stringify(e.detail));
- },
- closeAd(e) {
- this.borderShow = false
- }
- }
- }
-</script>
-
-<style lang="scss" >
- .uni-list-ad {
- position: relative;
- border: 1px red solid;
- }
-
- .uni-list--border {
- position: relative;
- padding-bottom: 1px;
- /* #ifdef APP-PLUS */
- border-top-color: $uni-border-color;
- border-top-style: solid;
- border-top-width: 0.5px;
- /* #endif */
- margin-left: $uni-spacing-row-lg;
- }
-
- /* #ifndef APP-NVUE */
- .uni-list--border:after {
- position: absolute;
- top: 0;
- right: 0;
- left: 0;
- height: 1px;
- content: '';
- -webkit-transform: scaleY(.5);
- transform: scaleY(.5);
- background-color: $uni-border-color;
- }
-
- .uni-list-item--first:after {
- height: 0px;
- }
-
- /* #endif */
-</style>
diff --git a/subPackage/patrol/components/uni-list/components/uni-list-chat/uni-list-chat.scss b/subPackage/patrol/components/uni-list/components/uni-list-chat/uni-list-chat.scss
deleted file mode 100644
index 311f8d9..0000000
--- a/subPackage/patrol/components/uni-list/components/uni-list-chat/uni-list-chat.scss
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * 这里是 uni-list 组件内置的常用样式变量
- * 如果需要覆盖样式,这里提供了基本的组件样式变量,您可以尝试修改这里的变量,去完成样式替换,而不用去修改源码
- *
- */
-
-// 背景色
-$background-color : #fff;
-// 分割线颜色
-$divide-line-color : #e5e5e5;
-
-// 默认头像大小,如需要修改此值,注意同步修改 js 中的值 const avatarWidth = xx ,目前只支持方形头像
-// nvue 页面不支持修改头像大小
-$avatar-width : 45px ;
-
-// 头像边框
-$avatar-border-radius: 5px;
-$avatar-border-color: #eee;
-$avatar-border-width: 1px;
-
-// 标题文字样式
-$title-size : 16px;
-$title-color : #3b4144;
-$title-weight : normal;
-
-// 描述文字样式
-$note-size : 12px;
-$note-color : #999;
-$note-weight : normal;
-
-// 右侧额外内容默认样式
-$right-text-size : 12px;
-$right-text-color : #999;
-$right-text-weight : normal;
-
-// 角标样式
-// nvue 页面不支持修改圆点位置以及大小
-// 角标在左侧时,角标的位置,默认为 0 ,负数左/下移动,正数右/上移动
-$badge-left: 0px;
-$badge-top: 0px;
-
-// 显示圆点时,圆点大小
-$dot-width: 10px;
-$dot-height: 10px;
-
-// 显示角标时,角标大小和字体大小
-$badge-size : 18px;
-$badge-font : 12px;
-// 显示角标时,角标前景色
-$badge-color : #fff;
-// 显示角标时,角标背景色
-$badge-background-color : #ff5a5f;
-// 显示角标时,角标左右间距
-$badge-space : 6px;
-
-// 状态样式
-// 选中颜色
-$hover : #f5f5f5;
diff --git a/subPackage/patrol/components/uni-list/components/uni-list-chat/uni-list-chat.vue b/subPackage/patrol/components/uni-list/components/uni-list-chat/uni-list-chat.vue
deleted file mode 100644
index 2b31008..0000000
--- a/subPackage/patrol/components/uni-list/components/uni-list-chat/uni-list-chat.vue
+++ /dev/null
@@ -1,538 +0,0 @@
-<template>
- <!-- #ifdef APP-NVUE -->
- <cell>
- <!-- #endif -->
- <view :hover-class="!clickable && !link ? '' : 'uni-list-chat--hover'" class="uni-list-chat" @click.stop="onClick">
- <view :class="{ 'uni-list--border': border, 'uni-list-chat--first': isFirstChild }"></view>
- <view class="uni-list-chat__container">
- <view class="uni-list-chat__header-warp">
- <view v-if="avatarCircle || avatarList.length === 0" class="uni-list-chat__header" :class="{ 'header--circle': avatarCircle }">
- <image class="uni-list-chat__header-image" :class="{ 'header--circle': avatarCircle }" :src="avatar" mode="aspectFill"></image>
- </view>
- <!-- 头像组 -->
- <view v-else class="uni-list-chat__header">
- <view v-for="(item, index) in avatarList" :key="index" class="uni-list-chat__header-box" :class="computedAvatar"
- :style="{ width: imageWidth + 'px', height: imageWidth + 'px' }">
- <image class="uni-list-chat__header-image" :style="{ width: imageWidth + 'px', height: imageWidth + 'px' }" :src="item.url"
- mode="aspectFill"></image>
- </view>
- </view>
- </view>
- <view v-if="badgeText && badgePositon === 'left'" class="uni-list-chat__badge uni-list-chat__badge-pos" :class="[isSingle]">
- <text class="uni-list-chat__badge-text">{{ badgeText === 'dot' ? '' : badgeText }}</text>
- </view>
- <view class="uni-list-chat__content">
- <view class="uni-list-chat__content-main">
- <text class="uni-list-chat__content-title uni-ellipsis">{{ title }}</text>
- <text class="uni-list-chat__content-note uni-ellipsis">{{ note }}</text>
- </view>
- <view class="uni-list-chat__content-extra">
- <slot>
- <text class="uni-list-chat__content-extra-text">{{ time }}</text>
- <view v-if="badgeText && badgePositon === 'right'" class="uni-list-chat__badge" :class="[isSingle, badgePositon === 'right' ? 'uni-list-chat--right' : '']">
- <text class="uni-list-chat__badge-text">{{ badgeText === 'dot' ? '' : badgeText }}</text>
- </view>
- </slot>
- </view>
- </view>
- </view>
- </view>
- <!-- #ifdef APP-NVUE -->
- </cell>
- <!-- #endif -->
-</template>
-
-<script>
- // 头像大小
- const avatarWidth = 45;
-
- /**
- * ListChat 聊天列表
- * @description 聊天列表,用于创建聊天类列表
- * @tutorial https://ext.dcloud.net.cn/plugin?id=24
- * @property {String} title 标题
- * @property {String} note 描述
- * @property {Boolean} clickable = [true|false] 是否开启点击反馈,默认为false
- * @property {String} badgeText 数字角标内容
- * @property {String} badgePositon = [left|right] 角标位置,默认为 right
- * @property {String} link = [false|navigateTo|redirectTo|reLaunch|switchTab] 是否展示右侧箭头并开启点击反馈,默认为false
- * @value false 不开启
- * @value navigateTo 同 uni.navigateTo()
- * @value redirectTo 同 uni.redirectTo()
- * @value reLaunch 同 uni.reLaunch()
- * @value switchTab 同 uni.switchTab()
- * @property {String | PageURIString} to 跳转目标页面
- * @property {String} time 右侧时间显示
- * @property {Boolean} avatarCircle = [true|false] 是否显示圆形头像,默认为false
- * @property {String} avatar 头像地址,avatarCircle 不填时生效
- * @property {Array} avatarList 头像组,格式为 [{url:''}]
- * @event {Function} click 点击 uniListChat 触发事件
- */
- export default {
- name: 'UniListChat',
- emits:['click'],
- props: {
- title: {
- type: String,
- default: ''
- },
- note: {
- type: String,
- default: ''
- },
- clickable: {
- type: Boolean,
- default: false
- },
- link: {
- type: [Boolean, String],
- default: false
- },
- to: {
- type: String,
- default: ''
- },
- badgeText: {
- type: [String, Number],
- default: ''
- },
- badgePositon: {
- type: String,
- default: 'right'
- },
- time: {
- type: String,
- default: ''
- },
- avatarCircle: {
- type: Boolean,
- default: false
- },
- avatar: {
- type: String,
- default: ''
- },
- avatarList: {
- type: Array,
- default () {
- return [];
- }
- }
- },
- // inject: ['list'],
- computed: {
- isSingle() {
- if (this.badgeText === 'dot') {
- return 'uni-badge--dot';
- } else {
- const badgeText = this.badgeText.toString();
- if (badgeText.length > 1) {
- return 'uni-badge--complex';
- } else {
- return 'uni-badge--single';
- }
- }
- },
- computedAvatar() {
- if (this.avatarList.length > 4) {
- this.imageWidth = avatarWidth * 0.31;
- return 'avatarItem--3';
- } else if (this.avatarList.length > 1) {
- this.imageWidth = avatarWidth * 0.47;
- return 'avatarItem--2';
- } else {
- this.imageWidth = avatarWidth;
- return 'avatarItem--1';
- }
- }
- },
- data() {
- return {
- isFirstChild: false,
- border: true,
- // avatarList: 3,
- imageWidth: 50
- };
- },
- mounted() {
- this.list = this.getForm()
- if (this.list) {
- if (!this.list.firstChildAppend) {
- this.list.firstChildAppend = true;
- this.isFirstChild = true;
- }
- this.border = this.list.border;
- }
- },
- methods: {
- /**
- * 获取父元素实例
- */
- getForm(name = 'uniList') {
- let parent = this.$parent;
- let parentName = parent.$options.name;
- while (parentName !== name) {
- parent = parent.$parent;
- if (!parent) return false
- parentName = parent.$options.name;
- }
- return parent;
- },
- onClick() {
- if (this.to !== '') {
- this.openPage();
- return;
- }
-
- if (this.clickable || this.link) {
- this.$emit('click', {
- data: {}
- });
- }
- },
- openPage() {
- if (['navigateTo', 'redirectTo', 'reLaunch', 'switchTab'].indexOf(this.link) !== -1) {
- this.pageApi(this.link);
- } else {
- this.pageApi('navigateTo');
- }
- },
- pageApi(api) {
- uni[api]({
- url: this.to,
- success: res => {
- this.$emit('click', {
- data: res
- });
- },
- fail: err => {
- this.$emit('click', {
- data: err
- });
- console.error(err.errMsg);
- }
- });
- }
- }
- };
-</script>
-
-<style lang="scss" >
- $uni-font-size-lg:16px;
- $uni-spacing-row-sm: 5px;
- $uni-spacing-row-base: 10px;
- $uni-spacing-row-lg: 15px;
- $background-color: #fff;
- $divide-line-color: #e5e5e5;
- $avatar-width: 45px;
- $avatar-border-radius: 5px;
- $avatar-border-color: #eee;
- $avatar-border-width: 1px;
- $title-size: 16px;
- $title-color: #3b4144;
- $title-weight: normal;
- $note-size: 12px;
- $note-color: #999;
- $note-weight: normal;
- $right-text-size: 12px;
- $right-text-color: #999;
- $right-text-weight: normal;
- $badge-left: 0px;
- $badge-top: 0px;
- $dot-width: 10px;
- $dot-height: 10px;
- $badge-size: 18px;
- $badge-font: 12px;
- $badge-color: #fff;
- $badge-background-color: #ff5a5f;
- $badge-space: 6px;
- $hover: #f5f5f5;
-
- .uni-list-chat {
- font-size: $uni-font-size-lg;
- position: relative;
- flex-direction: column;
- justify-content: space-between;
- background-color: $background-color;
- }
-
- // .uni-list-chat--disabled {
- // opacity: 0.3;
- // }
-
- .uni-list-chat--hover {
- background-color: $hover;
- }
-
- .uni-list--border {
- position: relative;
- margin-left: $uni-spacing-row-lg;
- /* #ifdef APP-PLUS */
- border-top-color: $divide-line-color;
- border-top-style: solid;
- border-top-width: 0.5px;
- /* #endif */
- }
-
- /* #ifndef APP-NVUE */
- .uni-list--border:after {
- position: absolute;
- top: 0;
- right: 0;
- left: 0;
- height: 1px;
- content: '';
- -webkit-transform: scaleY(0.5);
- transform: scaleY(0.5);
- background-color: $divide-line-color;
- }
-
- .uni-list-item--first:after {
- height: 0px;
- }
-
- /* #endif */
-
- .uni-list-chat--first {
- border-top-width: 0px;
- }
-
- .uni-ellipsis {
- /* #ifndef APP-NVUE */
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- /* #endif */
- /* #ifdef APP-NVUE */
- lines: 1;
- /* #endif */
- }
-
- .uni-ellipsis-2 {
- /* #ifndef APP-NVUE */
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- /* #endif */
-
- /* #ifdef APP-NVUE */
- lines: 2;
- /* #endif */
- }
-
- .uni-list-chat__container {
- position: relative;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- flex: 1;
- padding: $uni-spacing-row-base $uni-spacing-row-lg;
- position: relative;
- overflow: hidden;
- }
-
- .uni-list-chat__header-warp {
- position: relative;
- }
-
- .uni-list-chat__header {
- /* #ifndef APP-NVUE */
- display: flex;
- align-content: center;
- /* #endif */
- flex-direction: row;
- justify-content: center;
- align-items: center;
- flex-wrap: wrap-reverse;
- /* #ifdef APP-NVUE */
- width: 50px;
- height: 50px;
- /* #endif */
- /* #ifndef APP-NVUE */
- width: $avatar-width;
- height: $avatar-width;
- /* #endif */
-
- border-radius: $avatar-border-radius;
- border-color: $avatar-border-color;
- border-width: $avatar-border-width;
- border-style: solid;
- overflow: hidden;
- }
-
- .uni-list-chat__header-box {
- /* #ifndef APP-PLUS */
- box-sizing: border-box;
- display: flex;
- width: $avatar-width;
- height: $avatar-width;
- /* #endif */
- /* #ifdef APP-NVUE */
- width: 50px;
- height: 50px;
- /* #endif */
- overflow: hidden;
- border-radius: 2px;
- }
-
- .uni-list-chat__header-image {
- margin: 1px;
- /* #ifdef APP-NVUE */
- width: 50px;
- height: 50px;
- /* #endif */
- /* #ifndef APP-NVUE */
- width: $avatar-width;
- height: $avatar-width;
- /* #endif */
- }
-
- /* #ifndef APP-NVUE */
- .uni-list-chat__header-image {
- display: block;
- width: 100%;
- height: 100%;
- }
-
- .avatarItem--1 {
- width: 100%;
- height: 100%;
- }
-
- .avatarItem--2 {
- width: 47%;
- height: 47%;
- }
-
- .avatarItem--3 {
- width: 32%;
- height: 32%;
- }
-
- /* #endif */
- .header--circle {
- border-radius: 50%;
- }
-
- .uni-list-chat__content {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- flex: 1;
- overflow: hidden;
- padding: 2px 0;
- }
-
- .uni-list-chat__content-main {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: column;
- justify-content: space-between;
- padding-left: $uni-spacing-row-base;
- flex: 1;
- overflow: hidden;
- }
-
- .uni-list-chat__content-title {
- font-size: $title-size;
- color: $title-color;
- font-weight: $title-weight;
- overflow: hidden;
- }
-
- .uni-list-chat__content-note {
- margin-top: 3px;
- color: $note-color;
- font-size: $note-size;
- font-weight: $title-weight;
- overflow: hidden;
- }
-
- .uni-list-chat__content-extra {
- /* #ifndef APP-NVUE */
- flex-shrink: 0;
- display: flex;
- /* #endif */
- flex-direction: column;
- justify-content: space-between;
- align-items: flex-end;
- margin-left: 5px;
- }
-
- .uni-list-chat__content-extra-text {
- color: $right-text-color;
- font-size: $right-text-size;
- font-weight: $right-text-weight;
- overflow: hidden;
- }
-
- .uni-list-chat__badge-pos {
- position: absolute;
- /* #ifdef APP-NVUE */
- left: 55px;
- top: 3px;
- /* #endif */
- /* #ifndef APP-NVUE */
- left: calc(#{$avatar-width} + 10px - #{$badge-space} + #{$badge-left});
- top: calc(#{$uni-spacing-row-base}/ 2 + 1px + #{$badge-top});
- /* #endif */
- }
-
- .uni-list-chat__badge {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- justify-content: center;
- align-items: center;
- border-radius: 100px;
- background-color: $badge-background-color;
- }
-
- .uni-list-chat__badge-text {
- color: $badge-color;
- font-size: $badge-font;
- }
-
- .uni-badge--single {
- /* #ifndef APP-NVUE */
- // left: calc(#{$avatar-width} + 7px + #{$badge-left});
- /* #endif */
- width: $badge-size;
- height: $badge-size;
- }
-
- .uni-badge--complex {
- /* #ifdef APP-NVUE */
- left: 50px;
- /* #endif */
- /* #ifndef APP-NVUE */
- width: auto;
- /* #endif */
- height: $badge-size;
- padding: 0 $badge-space;
- }
-
- .uni-badge--dot {
- /* #ifdef APP-NVUE */
- left: 60px;
- top: 6px;
- /* #endif */
- /* #ifndef APP-NVUE */
- left: calc(#{$avatar-width} + 15px - #{$dot-width}/ 2 + 1px + #{$badge-left});
- /* #endif */
- width: $dot-width;
- height: $dot-height;
- padding: 0;
- }
-
- .uni-list-chat--right {
- /* #ifdef APP-NVUE */
- left: 0;
- /* #endif */
- }
-</style>
diff --git a/subPackage/patrol/components/uni-list/components/uni-list-item/uni-list-item.vue b/subPackage/patrol/components/uni-list/components/uni-list-item/uni-list-item.vue
deleted file mode 100644
index 2c7d9ea..0000000
--- a/subPackage/patrol/components/uni-list/components/uni-list-item/uni-list-item.vue
+++ /dev/null
@@ -1,454 +0,0 @@
-<template>
- <!-- #ifdef APP-NVUE -->
- <cell>
- <!-- #endif -->
-
- <view :class="{ 'uni-list-item--disabled': disabled }"
- :hover-class="(!clickable && !link) || disabled || showSwitch ? '' : 'uni-list-item--hover'"
- class="uni-list-item" @click="onClick">
- <view v-if="!isFirstChild" class="border--left" :class="{ 'uni-list--border': border }"></view>
- <view class="uni-list-item__container"
- :class="{ 'container--right': showArrow || link, 'flex--direction': direction === 'column' }">
- <slot name="header">
- <view class="uni-list-item__header">
- <view v-if="thumb" class="uni-list-item__icon">
- <image :src="thumb" class="uni-list-item__icon-img" :class="['uni-list--' + thumbSize]" />
- </view>
- <view v-else-if="showExtraIcon" class="uni-list-item__icon">
- <uni-icons :color="extraIcon.color" :size="extraIcon.size" :type="extraIcon.type" />
- </view>
- </view>
- </slot>
- <slot name="body">
- <view class="uni-list-item__content"
- :class="{ 'uni-list-item__content--center': thumb || showExtraIcon || showBadge || showSwitch }">
- <text v-if="title" class="uni-list-item__content-title"
- :class="[ellipsis !== 0 && ellipsis <= 2 ? 'uni-ellipsis-' + ellipsis : '']">{{ title }}</text>
- <text v-if="note" class="uni-list-item__content-note">{{ note }}</text>
- </view>
- </slot>
- <slot name="footer">
- <view v-if="rightText || showBadge || showSwitch" class="uni-list-item__extra"
- :class="{ 'flex--justify': direction === 'column' }">
- <text v-if="rightText" class="uni-list-item__extra-text">{{ rightText }}</text>
- <uni-badge v-if="showBadge" :type="badgeType" :text="badgeText" :custom-style="badgeStyle" />
- <switch v-if="showSwitch" :disabled="disabled" :checked="switchChecked"
- @change="onSwitchChange" />
- </view>
- </slot>
- </view>
- <uni-icons v-if="showArrow || link" :size="16" class="uni-icon-wrapper" color="#bbb" type="arrowright" />
- </view>
- <!-- #ifdef APP-NVUE -->
- </cell>
- <!-- #endif -->
-</template>
-
-<script>
- /**
- * ListItem 列表子组件
- * @description 列表子组件
- * @tutorial https://ext.dcloud.net.cn/plugin?id=24
- * @property {String} title 标题
- * @property {String} note 描述
- * @property {String} thumb 左侧缩略图,若thumb有值,则不会显示扩展图标
- * @property {String} thumbSize = [lg|base|sm] 略缩图大小
- * @value lg 大图
- * @value base 一般
- * @value sm 小图
- * @property {String} badgeText 数字角标内容
- * @property {String} badgeType 数字角标类型,参考[uni-icons](https://ext.dcloud.net.cn/plugin?id=21)
- * @property {Object} badgeStyle 数字角标样式
- * @property {String} rightText 右侧文字内容
- * @property {Boolean} disabled = [true|false] 是否禁用
- * @property {Boolean} clickable = [true|false] 是否开启点击反馈
- * @property {String} link = [navigateTo|redirectTo|reLaunch|switchTab] 是否展示右侧箭头并开启点击反馈
- * @value navigateTo 同 uni.navigateTo()
- * @value redirectTo 同 uni.redirectTo()
- * @value reLaunch 同 uni.reLaunch()
- * @value switchTab 同 uni.switchTab()
- * @property {String | PageURIString} to 跳转目标页面
- * @property {Boolean} showBadge = [true|false] 是否显示数字角标
- * @property {Boolean} showSwitch = [true|false] 是否显示Switch
- * @property {Boolean} switchChecked = [true|false] Switch是否被选中
- * @property {Boolean} showExtraIcon = [true|false] 左侧是否显示扩展图标
- * @property {Object} extraIcon 扩展图标参数,格式为 {color: '#4cd964',size: '22',type: 'spinner'}
- * @property {String} direction = [row|column] 排版方向
- * @value row 水平排列
- * @value column 垂直排列
- * @event {Function} click 点击 uniListItem 触发事件
- * @event {Function} switchChange 点击切换 Switch 时触发
- */
- export default {
- name: 'UniListItem',
- emits: ['click', 'switchChange'],
- props: {
- direction: {
- type: String,
- default: 'row'
- },
- title: {
- type: String,
- default: ''
- },
- note: {
- type: String,
- default: ''
- },
- ellipsis: {
- type: [Number,String],
- default: 0
- },
- disabled: {
- type: [Boolean, String],
- default: false
- },
- clickable: {
- type: Boolean,
- default: false
- },
- showArrow: {
- type: [Boolean, String],
- default: false
- },
- link: {
- type: [Boolean, String],
- default: false
- },
- to: {
- type: String,
- default: ''
- },
- showBadge: {
- type: [Boolean, String],
- default: false
- },
- showSwitch: {
- type: [Boolean, String],
- default: false
- },
- switchChecked: {
- type: [Boolean, String],
- default: false
- },
- badgeText: {
- type: String,
- default: ''
- },
- badgeType: {
- type: String,
- default: 'success'
- },
- badgeStyle:{
- type: Object,
- default () {
- return {}
- }
- },
- rightText: {
- type: String,
- default: ''
- },
- thumb: {
- type: String,
- default: ''
- },
- thumbSize: {
- type: String,
- default: 'base'
- },
- showExtraIcon: {
- type: [Boolean, String],
- default: false
- },
- extraIcon: {
- type: Object,
- default () {
- return {
- type: '',
- color: '#000000',
- size: 20
- };
- }
- },
- border: {
- type: Boolean,
- default: true
- }
- },
- // inject: ['list'],
- data() {
- return {
- isFirstChild: false
- };
- },
- mounted() {
- this.list = this.getForm()
- // 判断是否存在 uni-list 组件
- if (this.list) {
- if (!this.list.firstChildAppend) {
- this.list.firstChildAppend = true;
- this.isFirstChild = true;
- }
- }
- },
- methods: {
- /**
- * 获取父元素实例
- */
- getForm(name = 'uniList') {
- let parent = this.$parent;
- let parentName = parent.$options.name;
- while (parentName !== name) {
- parent = parent.$parent;
- if (!parent) return false
- parentName = parent.$options.name;
- }
- return parent;
- },
- onClick() {
- if (this.to !== '') {
- this.openPage();
- return;
- }
- if (this.clickable || this.link) {
- this.$emit('click', {
- data: {}
- });
- }
- },
- onSwitchChange(e) {
- this.$emit('switchChange', e.detail);
- },
- openPage() {
- if (['navigateTo', 'redirectTo', 'reLaunch', 'switchTab'].indexOf(this.link) !== -1) {
- this.pageApi(this.link);
- } else {
- this.pageApi('navigateTo');
- }
- },
- pageApi(api) {
- let callback = {
- url: this.to,
- success: res => {
- this.$emit('click', {
- data: res
- });
- },
- fail: err => {
- this.$emit('click', {
- data: err
- });
- }
- }
- switch (api) {
- case 'navigateTo':
- uni.navigateTo(callback)
- break
- case 'redirectTo':
- uni.redirectTo(callback)
- break
- case 'reLaunch':
- uni.reLaunch(callback)
- break
- case 'switchTab':
- uni.switchTab(callback)
- break
- default:
- uni.navigateTo(callback)
- }
- }
- }
- };
-</script>
-
-<style lang="scss">
- $uni-font-size-sm:12px;
- $uni-font-size-base:14px;
- $uni-font-size-lg:16px;
- $uni-spacing-col-lg: 12px;
- $uni-spacing-row-lg: 15px;
- $uni-img-size-sm:20px;
- $uni-img-size-base:26px;
- $uni-img-size-lg:40px;
- $uni-border-color:#e5e5e5;
- $uni-bg-color-hover:#f1f1f1;
- $uni-text-color-grey:#999;
- $list-item-pd: $uni-spacing-col-lg $uni-spacing-row-lg;
- .uni-list-item {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- font-size: $uni-font-size-lg;
- position: relative;
- justify-content: space-between;
- align-items: center;
- background-color: #fff;
- flex-direction: row;
- /* #ifdef H5 */
- cursor: pointer;
- /* #endif */
- }
- .uni-list-item--disabled {
- opacity: 0.3;
- }
- .uni-list-item--hover {
- background-color: $uni-bg-color-hover;
- }
- .uni-list-item__container {
- position: relative;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- padding: $list-item-pd;
- padding-left: $uni-spacing-row-lg;
- flex: 1;
- overflow: hidden;
- // align-items: center;
- }
- .container--right {
- padding-right: 0;
- }
- // .border--left {
- // margin-left: $uni-spacing-row-lg;
- // }
- .uni-list--border {
- position: absolute;
- top: 0;
- right: 0;
- left: 0;
- /* #ifdef APP-NVUE */
- border-top-color: $uni-border-color;
- border-top-style: solid;
- border-top-width: 0.5px;
- /* #endif */
- }
- /* #ifndef APP-NVUE */
- .uni-list--border:after {
- position: absolute;
- top: 0;
- right: 0;
- left: 0;
- height: 1px;
- content: '';
- -webkit-transform: scaleY(0.5);
- transform: scaleY(0.5);
- background-color: $uni-border-color;
- }
- /* #endif */
- .uni-list-item__content {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- padding-right: 8px;
- flex: 1;
- color: #3b4144;
- // overflow: hidden;
- flex-direction: column;
- justify-content: space-between;
- overflow: hidden;
- }
- .uni-list-item__content--center {
- justify-content: center;
- }
- .uni-list-item__content-title {
- font-size: $uni-font-size-base;
- color: #3b4144;
- overflow: hidden;
- }
- .uni-list-item__content-note {
- margin-top: 6rpx;
- color: $uni-text-color-grey;
- font-size: $uni-font-size-sm;
- overflow: hidden;
- }
- .uni-list-item__extra {
- // width: 25%;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- justify-content: flex-end;
- align-items: center;
- }
- .uni-list-item__header {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- align-items: center;
- }
- .uni-list-item__icon {
- margin-right: 18rpx;
- flex-direction: row;
- justify-content: center;
- align-items: center;
- }
- .uni-list-item__icon-img {
- /* #ifndef APP-NVUE */
- display: block;
- /* #endif */
- height: $uni-img-size-base;
- width: $uni-img-size-base;
- margin-right: 10px;
- }
- .uni-icon-wrapper {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- align-items: center;
- padding: 0 10px;
- }
- .flex--direction {
- flex-direction: column;
- /* #ifndef APP-NVUE */
- align-items: initial;
- /* #endif */
- }
- .flex--justify {
- /* #ifndef APP-NVUE */
- justify-content: initial;
- /* #endif */
- }
- .uni-list--lg {
- height: $uni-img-size-lg;
- width: $uni-img-size-lg;
- }
- .uni-list--base {
- height: $uni-img-size-base;
- width: $uni-img-size-base;
- }
- .uni-list--sm {
- height: $uni-img-size-sm;
- width: $uni-img-size-sm;
- }
- .uni-list-item__extra-text {
- color: $uni-text-color-grey;
- font-size: $uni-font-size-sm;
- }
- .uni-ellipsis-1 {
- /* #ifndef APP-NVUE */
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- /* #endif */
- /* #ifdef APP-NVUE */
- lines: 1;
- text-overflow:ellipsis;
- /* #endif */
- }
- .uni-ellipsis-2 {
- /* #ifndef APP-NVUE */
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- /* #endif */
- /* #ifdef APP-NVUE */
- lines: 2;
- text-overflow:ellipsis;
- /* #endif */
- }
-</style>
diff --git "a/subPackage/patrol/components/uni-list/components/uni-list/uni-list - \345\211\257\346\234\254.vue" "b/subPackage/patrol/components/uni-list/components/uni-list/uni-list - \345\211\257\346\234\254.vue"
deleted file mode 100644
index 1c85003..0000000
--- "a/subPackage/patrol/components/uni-list/components/uni-list/uni-list - \345\211\257\346\234\254.vue"
+++ /dev/null
@@ -1,106 +0,0 @@
-<template>
- <!-- #ifndef APP-NVUE -->
- <view class="uni-list uni-border-top-bottom">
- <view v-if="border" class="uni-list--border-top"></view>
- <slot />
- <view v-if="border" class="uni-list--border-bottom"></view>
- </view>
- <!-- #endif -->
- <!-- #ifdef APP-NVUE -->
- <list class="uni-list" :class="{ 'uni-list--border': border }" :enableBackToTop="enableBackToTop" loadmoreoffset="15"><slot /></list>
- <!-- #endif -->
-</template>
-
-<script>
-/**
- * List 列表
- * @description 列表组件
- * @tutorial https://ext.dcloud.net.cn/plugin?id=24
- * @property {String} border = [true|false] 标题
- */
-export default {
- name: 'uniList',
- 'mp-weixin': {
- options: {
- multipleSlots: false
- }
- },
- props: {
- enableBackToTop: {
- type: [Boolean, String],
- default: false
- },
- scrollY: {
- type: [Boolean, String],
- default: false
- },
- border: {
- type: Boolean,
- default: true
- }
- },
- // provide() {
- // return {
- // list: this
- // };
- // },
- created() {
- this.firstChildAppend = false;
- },
- methods: {
- loadMore(e) {
- this.$emit('scrolltolower');
- }
- }
-};
-</script>
-<style lang="scss" scoped>
-.uni-list {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- background-color: $uni-bg-color;
- position: relative;
- flex-direction: column;
-}
-
-.uni-list--border {
- position: relative;
- /* #ifdef APP-NVUE */
- border-top-color: $uni-border-color;
- border-top-style: solid;
- border-top-width: 0.5px;
- border-bottom-color: $uni-border-color;
- border-bottom-style: solid;
- border-bottom-width: 0.5px;
- /* #endif */
- z-index: -1;
-}
-
-/* #ifndef APP-NVUE */
-
-.uni-list--border-top {
- position: absolute;
- top: 0;
- right: 0;
- left: 0;
- height: 1px;
- -webkit-transform: scaleY(0.5);
- transform: scaleY(0.5);
- background-color: $uni-border-color;
- z-index: 1;
-}
-
-.uni-list--border-bottom {
- position: absolute;
- bottom: 0;
- right: 0;
- left: 0;
- height: 1px;
- -webkit-transform: scaleY(0.5);
- transform: scaleY(0.5);
- background-color: $uni-border-color;
-}
-
-/* #endif */
-</style>
diff --git a/subPackage/patrol/components/uni-list/components/uni-list/uni-list.vue b/subPackage/patrol/components/uni-list/components/uni-list/uni-list.vue
deleted file mode 100644
index ecda676..0000000
--- a/subPackage/patrol/components/uni-list/components/uni-list/uni-list.vue
+++ /dev/null
@@ -1,108 +0,0 @@
-<template>
- <!-- #ifndef APP-NVUE -->
- <view class="uni-list uni-border-top-bottom">
- <view v-if="border" class="uni-list--border-top"></view>
- <slot />
- <view v-if="border" class="uni-list--border-bottom"></view>
- </view>
- <!-- #endif -->
- <!-- #ifdef APP-NVUE -->
- <list class="uni-list" :class="{ 'uni-list--border': border }" :enableBackToTop="enableBackToTop" loadmoreoffset="15"><slot /></list>
- <!-- #endif -->
-</template>
-
-<script>
-/**
- * List 列表
- * @description 列表组件
- * @tutorial https://ext.dcloud.net.cn/plugin?id=24
- * @property {String} border = [true|false] 标题
- */
-export default {
- name: 'uniList',
- 'mp-weixin': {
- options: {
- multipleSlots: false
- }
- },
- props: {
- enableBackToTop: {
- type: [Boolean, String],
- default: false
- },
- scrollY: {
- type: [Boolean, String],
- default: false
- },
- border: {
- type: Boolean,
- default: true
- }
- },
- // provide() {
- // return {
- // list: this
- // };
- // },
- created() {
- this.firstChildAppend = false;
- },
- methods: {
- loadMore(e) {
- this.$emit('scrolltolower');
- }
- }
-};
-</script>
-<style lang="scss" >
-$uni-bg-color:#ffffff;
-$uni-border-color:#e5e5e5;
-.uni-list {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- background-color: $uni-bg-color;
- position: relative;
- flex-direction: column;
-}
-
-.uni-list--border {
- position: relative;
- /* #ifdef APP-NVUE */
- border-top-color: $uni-border-color;
- border-top-style: solid;
- border-top-width: 0.5px;
- border-bottom-color: $uni-border-color;
- border-bottom-style: solid;
- border-bottom-width: 0.5px;
- /* #endif */
- z-index: -1;
-}
-
-/* #ifndef APP-NVUE */
-
-.uni-list--border-top {
- position: absolute;
- top: 0;
- right: 0;
- left: 0;
- height: 1px;
- -webkit-transform: scaleY(0.5);
- transform: scaleY(0.5);
- background-color: $uni-border-color;
- z-index: 1;
-}
-
-.uni-list--border-bottom {
- position: absolute;
- bottom: 0;
- right: 0;
- left: 0;
- height: 1px;
- -webkit-transform: scaleY(0.5);
- transform: scaleY(0.5);
- background-color: $uni-border-color;
-}
-
-/* #endif */
-</style>
diff --git a/subPackage/patrol/components/uni-list/components/uni-list/uni-refresh.vue b/subPackage/patrol/components/uni-list/components/uni-list/uni-refresh.vue
deleted file mode 100644
index 3b4c5a2..0000000
--- a/subPackage/patrol/components/uni-list/components/uni-list/uni-refresh.vue
+++ /dev/null
@@ -1,65 +0,0 @@
-<template>
- <!-- #ifdef APP-NVUE -->
- <refresh :display="display" @refresh="onrefresh" @pullingdown="onpullingdown">
- <slot />
- </refresh>
- <!-- #endif -->
- <!-- #ifndef APP-NVUE -->
- <view ref="uni-refresh" class="uni-refresh" v-show="isShow">
- <slot />
- </view>
- <!-- #endif -->
-</template>
-
-<script>
- export default {
- name: 'UniRefresh',
- props: {
- display: {
- type: [String],
- default: "hide"
- }
- },
- data() {
- return {
- pulling: false
- }
- },
- computed: {
- isShow() {
- if (this.display === "show" || this.pulling === true) {
- return true;
- }
- return false;
- }
- },
- created() {},
- methods: {
- onchange(value) {
- this.pulling = value;
- },
- onrefresh(e) {
- this.$emit("refresh", e);
- },
- onpullingdown(e) {
- // #ifdef APP-NVUE
- this.$emit("pullingdown", e);
- // #endif
- // #ifndef APP-NVUE
- var detail = {
- viewHeight: 90,
- pullingDistance: e.height
- }
- this.$emit("pullingdown", detail);
- // #endif
- }
- }
- }
-</script>
-
-<style>
- .uni-refresh {
- height: 0;
- overflow: hidden;
- }
-</style>
diff --git a/subPackage/patrol/components/uni-list/components/uni-list/uni-refresh.wxs b/subPackage/patrol/components/uni-list/components/uni-list/uni-refresh.wxs
deleted file mode 100644
index 818a6b7..0000000
--- a/subPackage/patrol/components/uni-list/components/uni-list/uni-refresh.wxs
+++ /dev/null
@@ -1,87 +0,0 @@
-var pullDown = {
- threshold: 95,
- maxHeight: 200,
- callRefresh: 'onrefresh',
- callPullingDown: 'onpullingdown',
- refreshSelector: '.uni-refresh'
-};
-
-function ready(newValue, oldValue, ownerInstance, instance) {
- var state = instance.getState()
- state.canPullDown = newValue;
- // console.log(newValue);
-}
-
-function touchStart(e, instance) {
- var state = instance.getState();
- state.refreshInstance = instance.selectComponent(pullDown.refreshSelector);
- state.canPullDown = (state.refreshInstance != null && state.refreshInstance != undefined);
- if (!state.canPullDown) {
- return
- }
-
- // console.log("touchStart");
-
- state.height = 0;
- state.touchStartY = e.touches[0].pageY || e.changedTouches[0].pageY;
- state.refreshInstance.setStyle({
- 'height': 0
- });
- state.refreshInstance.callMethod("onchange", true);
-}
-
-function touchMove(e, ownerInstance) {
- var instance = e.instance;
- var state = instance.getState();
- if (!state.canPullDown) {
- return
- }
-
- var oldHeight = state.height;
- var endY = e.touches[0].pageY || e.changedTouches[0].pageY;
- var height = endY - state.touchStartY;
- if (height > pullDown.maxHeight) {
- return;
- }
-
- var refreshInstance = state.refreshInstance;
- refreshInstance.setStyle({
- 'height': height + 'px'
- });
-
- height = height < pullDown.maxHeight ? height : pullDown.maxHeight;
- state.height = height;
- refreshInstance.callMethod(pullDown.callPullingDown, {
- height: height
- });
-}
-
-function touchEnd(e, ownerInstance) {
- var state = e.instance.getState();
- if (!state.canPullDown) {
- return
- }
-
- state.refreshInstance.callMethod("onchange", false);
-
- var refreshInstance = state.refreshInstance;
- if (state.height > pullDown.threshold) {
- refreshInstance.callMethod(pullDown.callRefresh);
- return;
- }
-
- refreshInstance.setStyle({
- 'height': 0
- });
-}
-
-function propObserver(newValue, oldValue, instance) {
- pullDown = newValue;
-}
-
-module.exports = {
- touchmove: touchMove,
- touchstart: touchStart,
- touchend: touchEnd,
- propObserver: propObserver
-}
diff --git a/subPackage/patrol/components/uni-list/package.json b/subPackage/patrol/components/uni-list/package.json
deleted file mode 100644
index 66e8bef..0000000
--- a/subPackage/patrol/components/uni-list/package.json
+++ /dev/null
@@ -1,91 +0,0 @@
-{
- "id": "uni-list",
- "displayName": "uni-list 列表",
- "version": "1.2.1",
- "description": "List 组件 ,帮助使用者快速构建列表。",
- "keywords": [
- "",
- "uni-ui",
- "uniui",
- "列表",
- "",
- "list"
-],
- "repository": "https://github.com/dcloudio/uni-ui",
- "engines": {
- "HBuilderX": ""
- },
- "directories": {
- "example": "../../temps/example_temps"
- },
- "dcloudext": {
- "category": [
- "前端组件",
- "通用组件"
- ],
- "sale": {
- "regular": {
- "price": "0.00"
- },
- "sourcecode": {
- "price": "0.00"
- }
- },
- "contact": {
- "qq": ""
- },
- "declaration": {
- "ads": "无",
- "data": "无",
- "permissions": "无"
- },
- "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
- },
- "uni_modules": {
- "dependencies": [
- "uni-badge",
- "uni-icons"
- ],
- "encrypt": [],
- "platforms": {
- "cloud": {
- "tcb": "y",
- "aliyun": "y"
- },
- "client": {
- "App": {
- "app-vue": "y",
- "app-nvue": "y"
- },
- "H5-mobile": {
- "Safari": "y",
- "Android Browser": "y",
- "微信浏览器(Android)": "y",
- "QQ浏览器(Android)": "y"
- },
- "H5-pc": {
- "Chrome": "y",
- "IE": "y",
- "Edge": "y",
- "Firefox": "y",
- "Safari": "y"
- },
- "小程序": {
- "微信": "y",
- "阿里": "y",
- "百度": "y",
- "字节跳动": "y",
- "QQ": "y"
- },
- "快应用": {
- "华为": "u",
- "联盟": "u"
- },
- "Vue": {
- "vue2": "y",
- "vue3": "y"
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/subPackage/patrol/components/uni-list/readme.md b/subPackage/patrol/components/uni-list/readme.md
deleted file mode 100644
index 32c2865..0000000
--- a/subPackage/patrol/components/uni-list/readme.md
+++ /dev/null
@@ -1,346 +0,0 @@
-## List 列表
-> **组件名:uni-list**
-> 代码块: `uList`、`uListItem`
-> 关联组件:`uni-list-item`、`uni-badge`、`uni-icons`、`uni-list-chat`、`uni-list-ad`
-
-
-List 列表组件,包含基本列表样式、可扩展插槽机制、长列表性能优化、多端兼容。
-
-在vue页面里,它默认使用页面级滚动。在app-nvue页面里,它默认使用原生list组件滚动。这样的长列表,在滚动出屏幕外后,系统会回收不可见区域的渲染内存资源,不会造成滚动越长手机越卡的问题。
-
-uni-list组件是父容器,里面的核心是uni-list-item子组件,它代表列表中的一个可重复行,子组件可以无限循环。
-
-uni-list-item有很多风格,uni-list-item组件通过内置的属性,满足一些常用的场景。当内置属性不满足需求时,可以通过扩展插槽来自定义列表内容。
-
-内置属性可以覆盖的场景包括:导航列表、设置列表、小图标列表、通信录列表、聊天记录列表。
-
-涉及很多大图或丰富内容的列表,比如类今日头条的新闻列表、类淘宝的电商列表,需要通过扩展插槽实现。
-
-下文均有样例给出。
-
-uni-list不包含下拉刷新和上拉翻页。上拉翻页另见组件:[uni-load-more](https://ext.dcloud.net.cn/plugin?id=29)
-
-
-### 安装方式
-
-本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`components`。
-
-如需通过`npm`方式使用`uni-ui`组件,另见文档:[https://ext.dcloud.net.cn/plugin?id=55](https://ext.dcloud.net.cn/plugin?id=55)
-
-> **注意事项**
-> 为了避免错误使用,给大家带来不好的开发体验,请在使用组件前仔细阅读下面的注意事项,可以帮你避免一些错误。
-> - 组件需要依赖 `sass` 插件 ,请自行手动安装
-> - 组件内部依赖 `'uni-icons'` 、`uni-badge` 组件
-> - `uni-list` 和 `uni-list-item` 需要配套使用,暂不支持单独使用 `uni-list-item`
-> - 只有开启点击反馈后,会有点击选中效果
-> - 使用插槽时,可以完全自定义内容
-> - note 、rightText 属性暂时没做限制,不支持文字溢出隐藏,使用时应该控制长度显示或通过默认插槽自行扩展
-> - 支付宝小程序平台需要在支付宝小程序开发者工具里开启 component2 编译模式,开启方式: 详情 --> 项目配置 --> 启用 component2 编译
-> - 如果需要修改 `switch`、`badge` 样式,请使用插槽自定义
-> - 在 `HBuilderX` 低版本中,可能会出现组件显示 `undefined` 的问题,请升级最新的 `HBuilderX` 或者 `cli`
-> - 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
-
-
-### 基本用法
-
-- 设置 `title` 属性,可以显示列表标题
-- 设置 `disabled` 属性,可以禁用当前项
-
-```html
-<uni-list>
- <uni-list-item title="列表文字" ></uni-list-item>
- <uni-list-item :disabled="true" title="列表禁用状态" ></uni-list-item>
-</uni-list>
-
-```
-
-### 多行内容显示
-
-- 设置 `note` 属性 ,可以在第二行显示描述文本信息
-
-```html
-<uni-list>
- <uni-list-item title="列表文字" note="列表描述信息"></uni-list-item>
- <uni-list-item :disabled="true" title="列表文字" note="列表禁用状态"></uni-list-item>
-</uni-list>
-
-```
-
-### 右侧显示角标、switch
-
-- 设置 `show-badge` 属性 ,可以显示角标内容
-- 设置 `show-switch` 属性,可以显示 switch 开关
-
-```html
-<uni-list>
- <uni-list-item title="列表右侧显示角标" :show-badge="true" badge-text="12" ></uni-list-item>
- <uni-list-item title="列表右侧显示 switch" :show-switch="true" @switchChange="switchChange" ></uni-list-item>
-</uni-list>
-
-```
-
-### 左侧显示略缩图、图标
-
-- 设置 `thumb` 属性 ,可以在列表左侧显示略缩图
-- 设置 `show-extra-icon` 属性,并指定 `extra-icon` 可以在左侧显示图标
-
-```html
- <uni-list>
- <uni-list-item title="列表左侧带略缩图" note="列表描述信息" thumb="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png"
- thumb-size="lg" rightText="右侧文字"></uni-list-item>
- <uni-list-item :show-extra-icon="true" :extra-icon="extraIcon1" title="列表左侧带扩展图标" ></uni-list-item>
-</uni-list>
-```
-
-### 开启点击反馈和右侧箭头
-- 设置 `clickable` 为 `true` ,则表示这是一个可点击的列表,会默认给一个点击效果,并可以监听 `click` 事件
-- 设置 `link` 属性,会自动开启点击反馈,并给列表右侧添加一个箭头
-- 设置 `to` 属性,可以跳转页面,`link` 的值表示跳转方式,如果不指定,默认为 `navigateTo`
-
-```html
-
-<uni-list>
- <uni-list-item title="开启点击反馈" clickable @click="onClick" ></uni-list-item>
- <uni-list-item title="默认 navigateTo 方式跳转页面" link to="/pages/vue/index/index" @click="onClick($event,1)" ></uni-list-item>
- <uni-list-item title="reLaunch 方式跳转页面" link="reLaunch" to="/pages/vue/index/index" @click="onClick($event,1)" ></uni-list-item>
-</uni-list>
-
-```
-
-
-### 聊天列表示例
-- 设置 `clickable` 为 `true` ,则表示这是一个可点击的列表,会默认给一个点击效果,并可以监听 `click` 事件
-- 设置 `link` 属性,会自动开启点击反馈,`link` 的值表示跳转方式,如果不指定,默认为 `navigateTo`
-- 设置 `to` 属性,可以跳转页面
-- `time` 属性,通常会设置成时间显示,但是这个属性不仅仅可以设置时间,你可以传入任何文本,注意文本长度可能会影响显示
-- `avatar` 和 `avatarList` 属性同时只会有一个生效,同时设置的话,`avatarList` 属性的长度大于1 ,`avatar` 属性将失效
-- 可以通过默认插槽自定义列表右侧内容
-
-```html
-
-<uni-list>
- <uni-list :border="true">
- <!-- 显示圆形头像 -->
- <uni-list-chat :avatar-circle="true" title="uni-app" avatar="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png" note="您收到一条新的消息" time="2020-02-02 20:20" ></uni-list-chat>
- <!-- 右侧带角标 -->
- <uni-list-chat title="uni-app" avatar="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png" note="您收到一条新的消息" time="2020-02-02 20:20" badge-text="12" :badge-style="{backgroundColor:'#FF80AB'}"></uni-list-chat>
- <!-- 头像显示圆点 -->
- <uni-list-chat title="uni-app" avatar="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png" note="您收到一条新的消息" time="2020-02-02 20:20" badge-positon="left" badge-text="dot"></uni-list-chat>
- <!-- 头像显示角标 -->
- <uni-list-chat title="uni-app" avatar="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png" note="您收到一条新的消息" time="2020-02-02 20:20" badge-positon="left" badge-text="99"></uni-list-chat>
- <!-- 显示多头像 -->
- <uni-list-chat title="uni-app" :avatar-list="avatarList" note="您收到一条新的消息" time="2020-02-02 20:20" badge-positon="left" badge-text="dot"></uni-list-chat>
- <!-- 自定义右侧内容 -->
- <uni-list-chat title="uni-app" :avatar-list="avatarList" note="您收到一条新的消息" time="2020-02-02 20:20" badge-positon="left" badge-text="dot">
- <view class="chat-custom-right">
- <text class="chat-custom-text">刚刚</text>
- <!-- 需要使用 uni-icons 请自行引入 -->
- <uni-icons type="star-filled" color="#999" size="18"></uni-icons>
- </view>
- </uni-list-chat>
- </uni-list>
-</uni-list>
-
-```
-
-```javascript
-
-export default {
- components: {},
- data() {
- return {
- avatarList: [{
- url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png'
- }, {
- url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png'
- }, {
- url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/460d46d0-4fcc-11eb-8ff1-d5dcf8779628.png'
- }]
- }
- }
-}
-
-```
-
-
-```css
-
-.chat-custom-right {
- flex: 1;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: column;
- justify-content: space-between;
- align-items: flex-end;
-}
-
-.chat-custom-text {
- font-size: 12px;
- color: #999;
-}
-
-```
-
-## API
-
-### List Props
-
-属性名 |类型 |默认值 | 说明
-:-: |:-: |:-: | :-:
-border |Boolean |true | 是否显示边框
-
-
-### ListItem Props
-
-属性名 |类型 |默认值 | 说明
-:-: |:-: |:-: | :-:
-title |String |- | 标题
-note |String |- | 描述
-ellipsis |Number |0 | title 是否溢出隐藏,可选值,0:默认; 1:显示一行; 2:显示两行;【nvue 暂不支持】
-thumb |String |- | 左侧缩略图,若thumb有值,则不会显示扩展图标
-thumbSize |String |medium | 略缩图尺寸,可选值,lg:大图; medium:一般; sm:小图;
-showBadge |Boolean |false | 是否显示数字角标
-badgeText |String |- | 数字角标内容
-badgeType |String |- | 数字角标类型,参考[uni-icons](https://ext.dcloud.net.cn/plugin?id=21)
-badgeStyle |Object |- | 数字角标样式,使用uni-badge的custom-style参数
-rightText |String |- | 右侧文字内容
-disabled |Boolean |false | 是否禁用
-showArrow |Boolean |true | 是否显示箭头图标
-link |String |navigateTo | 新页面跳转方式,可选值见下表
-to |String |- | 新页面跳转地址,如填写此属性,click 会返回页面是否跳转成功
-clickable |Boolean |false | 是否开启点击反馈
-showSwitch |Boolean |false | 是否显示Switch
-switchChecked |Boolean |false | Switch是否被选中
-showExtraIcon |Boolean |false | 左侧是否显示扩展图标
-extraIcon |Object |- | 扩展图标参数,格式为 ``{color: '#4cd964',size: '22',type: 'spinner'}``,参考 [uni-icons](https://ext.dcloud.net.cn/plugin?id=28)
-direction | String |row | 排版方向,可选值,row:水平排列; column:垂直排列; 3个插槽是水平排还是垂直排,也受此属性控制
-
-
-#### Link Options
-
-属性名 | 说明
-:-: | :-:
-navigateTo | 同 uni.navigateTo()
-redirectTo | 同 uni.reLaunch()
-reLaunch | 同 uni.reLaunch()
-switchTab | 同 uni.switchTab()
-
-### ListItem Events
-
-事件称名 |说明 |返回参数
-:-: |:-: |:-:
-click |点击 uniListItem 触发事件,需开启点击反馈 |-
-switchChange |点击切换 Switch 时触发,需显示 switch |e={value:checked}
-
-
-
-### ListItem Slots
-
-名称 | 说明
-:-: | :-:
-header | 左/上内容插槽,可完全自定义默认显示
-body | 中间内容插槽,可完全自定义中间内容
-footer | 右/下内容插槽,可完全自定义右侧内容
-
-
-> **通过插槽扩展**
-> 需要注意的是当使用插槽时,内置样式将会失效,只保留排版样式,此时的样式需要开发者自己实现
-> 如果 `uni-list-item` 组件内置属性样式无法满足需求,可以使用插槽来自定义uni-list-item里的内容。
-> uni-list-item提供了3个可扩展的插槽:`header`、`body`、`footer`
-> - 当 `direction` 属性为 `row` 时表示水平排列,此时 `header` 表示列表的左边部分,`body` 表示列表的中间部分,`footer` 表示列表的右边部分
-> - 当 `direction` 属性为 `column` 时表示垂直排列,此时 `header` 表示列表的上边部分,`body` 表示列表的中间部分,`footer` 表示列表的下边部分
-> 开发者可以只用1个插槽,也可以3个一起使用。在插槽中可自主编写view标签,实现自己所需的效果。
-
-
-**示例**
-
-```html
-<uni-list>
- <uni-list-item title="自定义右侧插槽" note="列表描述信息" link>
- <template slot="header">
- <image class="slot-image" src="/static/logo.png" mode="widthFix"></image>
- </template>
- </uni-list-item>
- <uni-list-item>
- <!-- 自定义 header -->
- <view slot="header" class="slot-box"><image class="slot-image" src="/static/logo.png" mode="widthFix"></image></view>
- <!-- 自定义 body -->
- <text slot="body" class="slot-box slot-text">自定义插槽</text>
- <!-- 自定义 footer-->
- <template slot="footer">
- <image class="slot-image" src="/static/logo.png" mode="widthFix"></image>
- </template>
- </uni-list-item>
-</uni-list>
-```
-
-
-
-
-
-### ListItemChat Props
-
-属性名 |类型 |默认值 | 说明
-:-: |:-: |:-: | :-:
-title |String |- | 标题
-note |String |- | 描述
-clickable |Boolean |false | 是否开启点击反馈
-badgeText |String |- | 数字角标内容,设置为 `dot` 将显示圆点
-badgePositon |String |right | 角标位置
-link |String |navigateTo | 是否展示右侧箭头并开启点击反馈,可选值见下表
-clickable |Boolean |false | 是否开启点击反馈
-to |String |- | 跳转页面地址,如填写此属性,click 会返回页面是否跳转成功
-time |String |- | 右侧时间显示
-avatarCircle |Boolean |false | 是否显示圆形头像
-avatar |String |- | 头像地址,avatarCircle 不填时生效
-avatarList |Array |- | 头像组,格式为 [{url:''}]
-
-#### Link Options
-
-属性名 | 说明
-:-: | :-:
-navigateTo | 同 uni.navigateTo()
-redirectTo | 同 uni.reLaunch()
-reLaunch | 同 uni.reLaunch()
-switchTab | 同 uni.switchTab()
-
-### ListItemChat Slots
-
-名称 | 说明
-:- | :-
-default | 自定义列表右侧内容(包括时间和角标显示)
-
-### ListItemChat Events
-事件称名 | 说明 | 返回参数
-:-: | :-: | :-:
-@click | 点击 uniListChat 触发事件 | {data:{}} ,如有 to 属性,会返回页面跳转信息
-
-
-
-
-
-
-## 基于uni-list扩展的页面模板
-
-通过扩展插槽,可实现多种常见样式的列表
-
-**新闻列表类**
-
-1. 云端一体混合布局:[https://ext.dcloud.net.cn/plugin?id=2546](https://ext.dcloud.net.cn/plugin?id=2546)
-2. 云端一体垂直布局,大图模式:[https://ext.dcloud.net.cn/plugin?id=2583](https://ext.dcloud.net.cn/plugin?id=2583)
-3. 云端一体垂直布局,多行图文混排:[https://ext.dcloud.net.cn/plugin?id=2584](https://ext.dcloud.net.cn/plugin?id=2584)
-4. 云端一体垂直布局,多图模式:[https://ext.dcloud.net.cn/plugin?id=2585](https://ext.dcloud.net.cn/plugin?id=2585)
-5. 云端一体水平布局,左图右文:[https://ext.dcloud.net.cn/plugin?id=2586](https://ext.dcloud.net.cn/plugin?id=2586)
-6. 云端一体水平布局,左文右图:[https://ext.dcloud.net.cn/plugin?id=2587](https://ext.dcloud.net.cn/plugin?id=2587)
-7. 云端一体垂直布局,无图模式,主标题+副标题:[https://ext.dcloud.net.cn/plugin?id=2588](https://ext.dcloud.net.cn/plugin?id=2588)
-
-**商品列表类**
-
-1. 云端一体列表/宫格视图互切:[https://ext.dcloud.net.cn/plugin?id=2651](https://ext.dcloud.net.cn/plugin?id=2651)
-2. 云端一体列表(宫格模式):[https://ext.dcloud.net.cn/plugin?id=2671](https://ext.dcloud.net.cn/plugin?id=2671)
-3. 云端一体列表(列表模式):[https://ext.dcloud.net.cn/plugin?id=2672](https://ext.dcloud.net.cn/plugin?id=2672)
-
-## 组件示例
-
-点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/list/list](https://hellouniapp.dcloud.net.cn/pages/extUI/list/list)
\ No newline at end of file
diff --git a/subPackage/patrol/itemDetail.vue b/subPackage/patrol/itemDetail.vue
deleted file mode 100644
index 6b77915..0000000
--- a/subPackage/patrol/itemDetail.vue
+++ /dev/null
@@ -1,80 +0,0 @@
-<template>
- <view>
- <view class="form">
- <u-form labelWidth="70" labelPosition="left" :model="record" ref="form">
- <u-form-item label="图片:">
- <view>
- <image @click="previewImage(img)" class="image" v-for="(img,index) in record.images"
- :src="img.url" :key="index"></image>
- </view>
- </u-form-item>
- <u-form-item v-if="record.videos.length>0" label="视频:">
- <view>
- <video class="video" v-for="(video,index) in record.videos" :src="video.url"
- :key="index"></video>
- </view>
- </u-form-item>
- <u-form-item label="内容:">
- <view class="text">
- {{record.content}}
- </view>
- </u-form-item>
-
- </u-form>
- </view>
-
- </view>
-</template>
-
-<script>
- export default {
- name: "itemDetail",
- data() {
- return {
- record: {},
- }
- },
- created() {
-
- },
- mounted() {
-
- },
- onLoad(option) {
- if (option.record) {
- this.record = JSON.parse(option.record)
- uni.setNavigationBarTitle({
- title: this.record.itemsName
- })
- }
- },
- onShow() {
-
- },
- methods: {
- previewImage(img) {
- uni.previewImage({
- // current: e, //预览图片的下标
- urls: [img.url] //预览图片的地址,必须要数组形式,如果不是数组形式就转换成数组形式就可以
- })
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- .form {
- padding: 0 20rpx;
- }
-
- .image {
- width: 200rpx;
- height: 200rpx;
- margin-left: 3rpx;
- }
-
- .video {
- width: 400rpx;
- height: 200rpx;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/patrol/itemRecord.vue b/subPackage/patrol/itemRecord.vue
deleted file mode 100644
index 75f0597..0000000
--- a/subPackage/patrol/itemRecord.vue
+++ /dev/null
@@ -1,400 +0,0 @@
-<template>
- <view class="container">
- <card v-for="(item,index) in itemList" :key="index">
- <template slot="insideHead">{{item.itemsName}}</template>
- <template slot="content">
- <u-form labelWidth="70" :model="formList[index]" :rules="rules" ref="form">
- <u-form-item required label="状态" prop="status" :ref="index">
- <u-button class="unclick" :class="formList[index].status==1 ? 'btnActive' : ''" text="正常"
- @click="changeStatus(formList[index],1,index)">
- </u-button>
- <u-button class="unclick" :class="formList[index].status==2 ? 'btnActive' : ''" text="异常"
- @click="changeStatus(formList[index],2,index)">
- </u-button>
- </u-form-item>
-
- <view v-if="formList[index].status == 2">
- <u-form-item required prop="images" label="现场图片">
- <u-upload :fileList="formList[index].images" :maxCount="uploadConfig.maxCount"
- :previewFullImage="uploadConfig.previewFullImage" :accept="uploadConfig.acceptImg"
- :multiple="uploadConfig.multiple" :capture="uploadConfig.capture"
- @afterRead="afterReadImg($event,index)" @delete="deletePic($event,index)">
- </u-upload>
- </u-form-item>
-
- <u-form-item prop="videos" label="现场视频">
- <u-upload :fileList="formList[index].videos"
- :previewFullImage="uploadConfig.previewFullImage" :accept="uploadConfig.acceptVideo"
- :multiple="false" :capture="uploadConfig.capture" :maxCount="1"
- @afterRead="afterReadVideo($event,index)" @delete="deleteVideo($event,index)">
- </u-upload>
- </u-form-item>
-
- <u-form-item required prop="content" label="巡查描述">
- <u-textarea confirmType="done" v-model="formList[index].content" placeholder="请输入巡查描述">
- </u-textarea>
- </u-form-item>
-
- <u-form-item required label="处理" prop="solution" :ref="index">
- <u-button class="unclick" :class="formList[index].solution==1 ? 'btnActive' : ''" text="已解决"
- @click="changeSolution(formList[index],1,index)">
- </u-button>
- <u-button class="unclick" :class="formList[index].solution==2 ? 'btnActive' : ''" text="未解决"
- @click="changeSolution(formList[index],2,index)">
- </u-button>
- </u-form-item>
- </view>
- </u-form>
- </template>
- </card>
- <view class="form-container">
- <u-button type="primary" text="确定" @click="submit"></u-button>
- </view>
- </view>
-</template>
-
-<script>
- import card from "@/components/my-components/card.vue"
- import {
- getAllPatrolGroupItemByGroupId
- } from '@/api/patrol/patrol'
- import {
- add,
- getByTaskIdAndGroupId,
- update,
- } from "@/api/patrol/patrolRecord.js"
- import {
- devUrl,
- clientId,
- clientSecret
- } from '@/common/setting'
- import {
- Base64
- } from '@/utils/base64.js';
- export default {
- components: {
- card
- },
- data() {
- return {
- formList: [],
- itemList: [],
- rules: {
- 'status': {
- type: 'number',
- required: true,
- message: '请选择状态',
- trigger: ['blur', 'change'],
- },
- 'images': {
- type: 'array',
- required: true,
- message: '请上传图片',
- trigger: ['blur', 'change']
- },
- // 'videos': {
- // type: 'array',
- // required: true,
- // message: '请上传图片',
- // trigger: ['blur', 'change']
- // },
- 'content': {
- type: 'string',
- required: true,
- message: '请输入内容',
- trigger: ['blur', 'change']
- },
- 'solution': {
- type: 'number',
- required: true,
- message: '请选择是否解决',
- trigger: ['blur', 'change']
- },
- },
- fileList: [],
- uploadConfig: {
- acceptImg: "image",
- acceptVideo: 'video',
- capture: ['album', 'camera'],
- multiple: true,
- maxCount: "5",
- previewFullImage: true,
- uploadText: "上传中",
- url: devUrl + "/api/blade-resource/oss/endpoint/put-file-attach",
- header: {},
- },
- taskId: "",
- groupId: "",
- patrolType: "",
- selectBtn: "",
- //用于表单验证
- validateList: []
- }
- },
- created() {
-
- },
- mounted() {
-
- },
- onLoad(option) {
- if (option.groupId) {
- this.groupId = option.groupId
- }
- if (option.taskId) {
- this.taskId = option.taskId
- }
- this.init()
- },
- onShow() {
-
- },
- methods: {
- init() {
- this.getHeader()
- this.getItemList()
- },
- //获取巡查项集合
- getItemList() {
- //根据任务和组id获取记录表中已记录的数据
- getByTaskIdAndGroupId(this.groupId, this.taskId).then(res => {
- this.itemList = res.data
-
- if (this.itemList.length == 0) {
- //获取巡检项
- getAllPatrolGroupItemByGroupId({
- groupId: this.groupId
- }).then(res => {
- this.itemList = res.data
- for (let i = 0; i < this.itemList.length; i++) {
- let form = {
- status: "",
- solution: "",
- images: [],
- videos: [],
- content: "",
- itemId: this.itemList[i].id,
- taskId: this.taskId,
- patrolType: this.patrolType
- }
- this.formList.push(form)
- }
- })
- } else {
- console.log(this.itemList)
- for (let i = 0; i < this.itemList.length; i++) {
- this.formList.push(this.itemList[i])
- }
- }
- })
- },
-
- //获取头部
- getHeader() {
- let accessToken = uni.getStorageSync('accessToken');
- let myHeader = {}
- if (accessToken) {
- myHeader['Blade-Auth'] = 'bearer ' + accessToken;
- }
- // 客户端认证参数
- myHeader['Authorization'] = 'Basic ' + Base64.encode(clientId + ':' + clientSecret);
- this.header = myHeader
- this.uploadConfig.header = myHeader
- },
-
-
- //正常异常状态改变
- changeStatus(form, status, index) {
- this.selectBtn = index
- form.status = status
- },
- //正常异常状态改变
- changeSolution(form, solution, index) {
- this.selectBtn = index
- form.solution = solution
- },
-
- //表单验证
- validate() {
- //存储表单验证的值
- this.validateList = []
- return new Promise((resolve, reject) => {
- this.$refs.form.forEach(form => {
- let commit = -1
- form.validate().then(res => {
- commit = 1
- this.validateList.push(1)
- resolve(commit)
- }).catch(err => {
- this.validateList.push(-1)
- commit = -1
- resolve(commit)
- })
- })
- })
- },
-
- // url地址转换
- fileUrlConvert(url) {
- let convertUrl = ""
- if (url.indexOf('http://10.42.6.251:8082') != -1) {
- convertUrl = url.replace('http://10.42.6.251:8082',
- 'https://sk.hubeishuiyi.cn/gminio')
- } else if (e.url.indexOf('http://10.10.2.251:8082') != -1) {
- convertUrl = url.replace('http://10.10.2.251:8082',
- 'https://sk.hubeishuiyi.cn/gminio')
- } else {
- convertUrl = url
- }
- console.log(convertUrl, "+++")
- return convertUrl
- },
-
- //表单提交
- async submit() {
- const res = await this.validate()
- if (this.validateList.some(e => e == -1)) return
- for (var i = 0; i < this.formList.length; i++) {
- let form = this.formList[i]
- if (form.videos.length == 0) {
- form.videos = undefined
- } else {
- form.videos.forEach(e => {
- e.url = this.fileUrlConvert(e.url)
- })
- }
- if (form.images.length == 0) {
- form.images = undefined
- } else {
- form.images.forEach(e => {
- e.url = this.fileUrlConvert(e.url)
- })
- }
-
- //状态正常则清空业务数据
- if (form.status == 1) {
- form.solution = ""
- form.images = undefined
- form.videos = undefined
- form.content = ""
- }
-
-
- if (form.id) {
- update(form).then(res => {})
- } else {
- add(form).then(res => {})
- }
- }
- let that = this
- uni.showToast({
- icon: 'success',
- title: '提交成功',
- success() {
- setTimeout(() => {
- that.$u.func.globalNavigator("", "navBack")
- }, 1000)
- }
- })
- },
- showLoading() {
- uni.showLoading({
- mask: true,
- title: '上传中'
- })
- },
- loadingClose() {
- uni.hideLoading()
- },
-
- //读取后的处理函数
- async afterReadImg(event, index) {
- this.showLoading()
- // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
- let lists = [].concat(event.file)
- let fileListLen = this.formList[index].images.length
- lists.map((item) => {
- this.formList[index].images.push({
- ...item,
- status: 'uploading',
- message: '上传中'
- })
- })
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url)
- let item = this.formList[index].images[fileListLen]
- this.formList[index].images.splice(fileListLen, 1, Object.assign({}, {
- url: result.data.link
- }))
- fileListLen++
- }
- this.loadingClose()
- },
-
- //读取后的处理函数
- async afterReadVideo(event, index) {
- this.showLoading()
- // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
- let lists = [].concat(event.file)
- let fileListLen = this.formList[index].videos.length
- lists.map((item) => {
- this.formList[index].videos.push({
- ...item,
- status: 'uploading',
- message: '上传中'
- })
- })
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url)
- let item = this.formList[index].videos[fileListLen]
- this.formList[index].videos.splice(fileListLen, 1, Object.assign({}, {
- url: result.data.link
- }))
- fileListLen++
- }
- this.loadingClose()
- },
-
- //上传方法
- uploadFilePromise(url) {
- return new Promise((resolve, reject) => {
- let a = uni.uploadFile({
- url: this.uploadConfig.url, //接口地址
- filePath: url,
- name: 'file',
- header: this.uploadConfig.header,
- success: (res) => {
- let data = JSON.parse(res.data)
- setTimeout(() => {
- resolve(data)
- }, 1000)
- }
- });
- })
- },
-
- //删除图片
- deletePic(event, index) {
- this.formList[index].images.splice(event.index, 1)
- },
-
- //删除视频
- deleteVideo(event, index) {
- this.formList[index].videos.splice(event.index, 1)
- },
-
- }
- }
-</script>
-
-<style scoped lang="scss">
- .container {
- // min-height: 100vh;
- overflow: hidden;
- padding: 0 20rpx;
- }
-
- .btnActive {
- background-color: #3c9cff;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/patrol/patrol.vue b/subPackage/patrol/patrol.vue
deleted file mode 100644
index 37cb69e..0000000
--- a/subPackage/patrol/patrol.vue
+++ /dev/null
@@ -1,137 +0,0 @@
-<template>
- <view class="container">
- <patrolTaskList></patrolTaskList>
- </view>
-</template>
-
-<script>
- import patrolTaskList from "@/subPackage/patrol/components/patrolTaskList.vue"
- import {
- getPatrolTaskList,
- getPatrolTaskStatistic,
- updatePatrolTask
- } from "@/api/patrol/patrol"
- import {
- dateFormat
- } from "@/utils/date"
- export default {
- components: {
- patrolTaskList
- },
- data() {
- return {
- patrolCountList: [],
- patrolTaskList: [],
- searchKey: "",
- page: {
- pageSize: 20,
- currentPage: 1,
- total: 0
- },
- query: {},
- tabList: [{
- name: "未开始"
- },
- {
- name: "进行中"
- },
- {
- name: "已完成"
- },
- ],
- currentIndex: 0
- }
- },
- onShow() {},
- created() {
- this.init()
- },
- mounted() {},
- methods: {
- init() {
- this.currentIndex = 0
- this.getList(1)
- },
- //搜索
- search(searchValue) {
- this.query.title = searchValue
- this.getList()
- },
- //清空搜索
- clearSearch() {
- this.query = {}
- this.getList()
- },
- //开始巡查或继续巡查
- startPatrol(item) {
- if (item.state == "1") {
- item.state = "2"
- let date = new Date()
- let realStartTime = dateFormat(date)
- updatePatrolTask({
- id: item.id,
- state: item.state,
- realStartTime: realStartTime
- })
- }
-
- let url = "/subPackage/patrol/patrolReport?task=" + JSON.stringify(item)
- this.$u.func.globalNavigator(url, "navTo")
- },
-
- //获取任务列表
- getList(state) {
- // 获取任务列表
- // this.query.currentUserId = this.userInfo.user_id
- this.query.toUserId = this.userInfo.user_id
- this.query.state = state
- getPatrolTaskList(this.page.currentPage, this.page.pageSize, this.query).then(res => {
- const data = res.data;
- this.page.total = data.total;
- this.patrolTaskList = data.records
- })
- },
- //上拉加载更多
- scrolltolower() {
- this.page.currentPage += 1
- // 获取任务列表
- this.query.currentUserId = this.userInfo.user_id
- getPatrolTaskList(this.page.currentPage, this.page.pageSize, this.query).then(res => {
- const data = res.data;
- this.page.total = data.total;
- this.patrolTaskList = this.patrolTaskList.concat(data.records)
- })
- },
- //tab点击事件
- tabClick(item) {
- this.currentIndex = item.index
-
- if (this.currentIndex == 0) {
- this.page.currentPage = 1
- this.getList(1)
- } else if (this.currentIndex == 1) {
- this.page.currentPage = 1
- this.getList(2)
- } else if (this.currentIndex == 2) {
- this.page.currentPage = 1
- this.getList(3)
- }
-
- },
- //巡查详情
- patrolDetail(task) {
- let url = "/subPackage/patrol/patrolDetail?task=" + JSON.stringify(task)
- this.$u.func.globalNavigator(url, "navTo")
- }
- }
- }
-</script>
-
-<style lang="scss">
- .container {
- // min-height: 100vh;
- overflow: hidden;
- padding: 0 14rpx;
-
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/patrol/patrolDetail.vue b/subPackage/patrol/patrolDetail.vue
deleted file mode 100644
index f5571b3..0000000
--- a/subPackage/patrol/patrolDetail.vue
+++ /dev/null
@@ -1,149 +0,0 @@
-<template>
- <view>
- <uni-collapse accordion ref="collapse" v-model="activeGroupValue" @change="groupCollapseChange">
- <uni-collapse-item v-for="(group,groupIndex) in groupList" :title="group.name" :key="groupIndex">
- <view class="record-list">
-
- <view v-for="(record,recordIndex) in selectRecordList" :key="record.id">
- <uni-list>
- <uni-list-item :title="record.itemsName">
- <template v-slot:body>
- <card style="width: 100%;" @click.native="navigatorItemDetail(record)">
- <view class="card-head" slot="insideHead">
- <view class="left">
- <view class="text">
- <text>{{record.itemsName}}</text>
- <text v-if="record.status==1">(正常)</text>
- <text v-if="record.status==2">(异常)</text>
- </view>
- </view>
- <view class="right">
- <view class="text solution">
- <text class="solution-resolve"
- v-if="record.solution == 1">已解决</text>
- <text class="solution-unResolve"
- v-if="record.solution == 2">未解决</text>
- </view>
- </view>
- </view>
- </card>
- </template>
- </uni-list-item>
- </uni-list>
- </view>
-
- </view>
- </uni-collapse-item>
- </uni-collapse>
- </view>
-</template>
-
-<script>
- import card from "@/components/my-components/card.vue"
- import uniCollapse from "@/subPackage/patrol/components/uni-collapse/components/uni-collapse/uni-collapse.vue"
- import uniCollapseItem from "@/subPackage/patrol/components/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue"
- import uniList from "@/subPackage/patrol/components/uni-list/components/uni-list/uni-list.vue"
- import uniListItem from "@/subPackage/patrol/components/uni-list/components/uni-list-item/uni-list-item.vue"
- import {
- getAllPatrolGroup
- } from "@/api/patrol/patrol"
- import {
- getByTaskIdAndGroupId
- } from "@/api/patrol/patrolRecord"
- export default {
- components: {
- uniCollapse,
- uniCollapseItem,
- uniList,
- uniListItem,
- card
- },
- data() {
- return {
- task: {},
- activeGroupValue: "",
- groupList: [],
- currentGroup: {},
-
- activeRecordValue: "",
- recordList: [],
- selectRecordList: []
- }
- },
- created() {
-
- },
- mounted() {
-
- },
- onLoad(option) {
- if (option.task) {
- this.task = JSON.parse(option.task)
- uni.setNavigationBarTitle({
- title: this.task.title
- })
- }
- this.getGroupList()
- this.getRecordList("", this.task.id)
- },
- onShow() {
-
- },
- methods: {
- groupCollapseChange(value) {
- if (value) {
- this.currentGroup = this.groupList[value]
- this.selectRecordList = this.recordList.filter(record => {
- return record.groupId == this.currentGroup.id
- })
- }
- },
- recordCollapseChange(value) {},
-
- async getGroupList() {
- const res = await getAllPatrolGroup()
- const {
- data
- } = res
- this.groupList = data
- },
- async getRecordList(groupId, taskId) {
- const res = await getByTaskIdAndGroupId(groupId, taskId)
- const {
- data
- } = res
- this.recordList = data
- },
- navigatorItemDetail(record) {
- if (record.status == 2) {
- let url = "/subPackage/patrol/itemDetail?record=" + JSON.stringify(record)
- this.$u.func.globalNavigator(url, "navTo")
- }
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- .record-list {
- padding: 0px 20rpx;
- }
-
- .card-head {
- display: flex;
- justify-content: space-between;
- width: 100%;
- }
-
- .text {
- font-size: 28rpx;
- }
-
- .solution-resolve {
- color: #00aa00;
- }
-
- .solution-unResolve {
- color: #ff0000;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/patrol/patrolHandle.vue b/subPackage/patrol/patrolHandle.vue
deleted file mode 100644
index ceb38e6..0000000
--- a/subPackage/patrol/patrolHandle.vue
+++ /dev/null
@@ -1,665 +0,0 @@
-<template>
- <view class="container">
- <uni-collapse accordion ref="collapse" v-model="collapseValue" @change="collapseChange">
- <uni-collapse-item :show-animation="showAnimation" v-for="(group,gIndex) in groupList" :key="gIndex"
- ref="collapseItem">
-
- <view class="uni-collapse-item-title" slot="title">
- <view class="title">{{group.name}}</view>
- <view class="tip">{{getCount(group)}}项待处理</view>
- </view>
-
- <card class="report-card" v-for="(item,index) in group.patrolRecordVOList" :key="item.itemId">
- <view class="card-inside-head" slot="insideHead">{{item.itemsName}}</view>
- <view class="content" slot="content">
- <view class="report">
- <view class="title">上报信息</view>
- <view class="content">
- <view class="item">
- <view class="lable">内容:</view>
- <view class="value">{{item.content}}</view>
- </view>
- <view class="item">
- <view class="lable">图片:</view>
- <view class="value">
- <image @click="previewFullImg(item.images)" class="image"
- v-for="(img,imgIndex) in item.images" :key="img.url" :src="img.url">
- </image>
- </view>
- </view>
- <view v-if="item.videos.length>0" class="item">
- <view class="lable">视频:</view>
- <view class="value">
- <video class="image" v-for="(video,videoIndex) in item.videos" :key="video.url"
- :src="video.url">
- </video>
- </view>
- </view>
- </view>
- </view>
- <view class="handle">
- <view class="title">处理内容</view>
- <view class="content">
- <u-form labelWidth="70" :model="formList[item.index]" ref="form">
-
- <u-form-item prop="images" label="处理图片:">
- <u-upload :fileList="formList[item.index].images"
- :previewFullImage="uploadConfig.previewFullImage"
- :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
- :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
- @afterRead="afterReadImg($event,item.index)"
- @delete="deletePic($event,item.index)">
- </u-upload>
- </u-form-item>
-
- <u-form-item prop="videos" label="处理视频:">
- <u-upload :fileList="formList[item.index].videos"
- :previewFullImage="uploadConfig.previewFullImage"
- :accept="uploadConfig.acceptVideo" :multiple="false" :maxCount="1"
- :capture="uploadConfig.capture"
- @afterRead="afterReadVideo($event,item.index)"
- @delete="deleteVideo($event,item.index)">
- </u-upload>
- </u-form-item>
-
- <u-form-item prop="content" label="处理内容:">
- <u-textarea confirmType="done" v-model="formList[item.index].content"
- placeholder="请输入处理内容">
- </u-textarea>
- </u-form-item>
- </u-form>
- </view>
- </view>
- </view>
- </card>
-
-
- </uni-collapse-item>
- </uni-collapse>
-
- <view class="page-footer">
- <u-button type="primary" text="处理完成" @click="submit"></u-button>
- </view>
-
- <!-- 责任人选择 -->
- <my-select v-if="showSelect" :show="showSelect" v-model="chosePerson" type="radio" popupTitle="请选择责任人"
- :dataLists="personList" @cancel="showSelect = false" @submit="personSelect">
- </my-select>
-
-
- </view>
-</template>
-
-<script>
- import {
- devUrl,
- clientId,
- clientSecret
- } from '@/common/setting'
- import mySelect from "@/components/my-components/my-select.vue"
- import {
- Base64
- } from '@/utils/base64.js';
- import uniCollapse from "@/subPackage/patrol/components/uni-collapse/components/uni-collapse/uni-collapse.vue"
- import uniCollapseItem from "@/subPackage/patrol/components/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue"
- import card from "@/components/my-components/card.vue"
- import {
- getPatrolGroupDTO,
- updatePatrolTask
- } from '@/api/patrol/patrol'
- import {
- fileUrlConvert
- } from "@/subPackage/patrol/util/fileUtil.js"
- import {
- findResManagePersonByResIdReturnSys
- } from '@/api/dataCenter/responsiblePerson/responsiblePerson';
- import {
- customizeGetList
- } from '@/api/user';
- import {
- chargerCompleteTask
- } from '@/api/patrol/patrolTask';
- import {
- updateThenSaveBatch
- } from '@/api/patrol/patrolRecord';
- export default {
- components: {
- card,
- uniCollapse,
- uniCollapseItem,
- mySelect
- },
- data() {
- return {
- task: {},
- groupList: [],
- collapseValue: "",
- showAnimation: false,
- //多表单
- formList: [],
- //按钮样式,小程序不支持直接对组件进行样式调整
- btnCustomStyle: {
- backgroundColor: '#3c9cff',
- color: "#ffffff"
- },
- uploadConfig: {
- acceptImg: "image",
- acceptVideo: 'video',
- capture: ['album', 'camera'],
- multiple: true,
- maxCount: "5",
- previewFullImage: true,
- uploadText: "上传中",
- url: devUrl + "/api/blade-resource/oss/endpoint/put-file-attach",
- header: {},
- },
- showSelect: false,
- chosePerson: "",
- personList: [],
- }
- },
- created() {
-
- },
- mounted() {
-
- },
- computed: {
- getCount() {
- return (group => {
- let filterArr = this.formList.filter(form => {
- return form.groupName == group.name
- })
- let count = filterArr.length
- filterArr.forEach(e => {
- if (e.content) {
- count--
- }
- })
- return count
- })
- }
- },
- watch: {
- formList: {
- handler(val) {
- if (val.length > 0) {
- this.saveStorage()
- }
- },
- immediate: true,
- deep: true
- }
- },
- onLoad(option) {
- this.getHeader()
- this.task = JSON.parse(option.task)
- this.getGroup()
- this.getPerson()
- },
- onShow() {
-
- },
- methods: {
- async getDeptUser(adCode) {
- const res = await customizeGetList(adCode)
- const {
- data
- } = res.data
- return data
- },
- async getPerson() {
- let roleName = this.userInfo.role_name
- let adCode = this.userInfo.detail.adCodeBase ? this.userInfo.detail.adCodeBase.adCode : ""
- const res = await findResManagePersonByResIdReturnSys({
- resGuid: this.task.projectId
- })
- let data = res.data
- //person_type人员类型:
- //1.政府行政责任人,2.主管部门责任人,3.管理单位责任人,4.技术责任人,5.巡查责任人,6.行政责任人
- this.personList = []
- if (roleName.indexOf("jszrr") > -1) {
- //技术责任人 =>主管部门责任人/区县管理员
- this.personList = data.filter(person => {
- person.name = "主管部门责任人/" + person.name
- return person.type == "2"
- })
- let deptUserData = await this.getDeptUser(adCode)
- if (deptUserData) {
- deptUserData.forEach(user => {
- this.personList.push({
- name: "区县管理员/" + user.realName,
- value: user.id,
- type: "10"
- })
- })
- }
- } else if (roleName.indexOf("zgbmzrr") > -1) {
- //主管部门责任人=>行政责任人
- this.personList = data.filter(person => {
- person.name = "行政责任人/" + person.name
- return person.type == "1"
- })
-
-
- } else if (roleName.indexOf("xzzrr") > -1) {
- //行政责任人=>技术责任人/主管部门责任人
- data.forEach(person => {
- if (person.type == 3) {
- this.personList.push({
- name: "技术责任人/" + person.name,
- value: person.value,
- type: "4"
- })
- } else if (person.type == 2) {
- this.personList.push({
- name: "主管部门责任人/" + person.name,
- value: person.value,
- type: "2"
- })
- }
- })
- }
-
- //区县管理员=>直接完成任务
-
-
-
- },
- async submit() {
- let count = 0
- this.formList.forEach(form => {
- if (!form.content) {
- count++
- }
- })
- uni.showModal({
- title: '提示',
- content: '当前还有' + count + "项未处理,是否完成处理?",
- success: res => {
- if (res.confirm) {
-
- if (this.userInfo.role_name.indexOf("qxgly") > -1) {
- if (count == 0) {
- let taskForm = {
- taskId: this.task.flow.taskId,
- processInstanceId: this.task.flow.processInstanceId,
- toDept: false,
- toTech: false,
- }
- this.finishHandle(taskForm)
- } else {
- this.$u.func.showToast("请完成未处理问题")
- }
- } else {
- if (count == 0) {
- let taskForm = {
- taskId: this.task.flow.taskId,
- processInstanceId: this.task.flow.processInstanceId,
- toDept: false,
- toTech: false,
- }
- this.finishHandle(taskForm)
- } else {
- this.showSelect = true
- }
- }
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- // }
-
-
- },
- showLoading() {
- uni.showLoading({
- mask: true,
- title: '上传中'
- })
- },
- loadingClose() {
- uni.hideLoading()
- },
- personSelect(value) {
-
- let taskForm = {
- taskUser: value.value,
- taskId: this.task.flow.taskId,
- processInstanceId: this.task.flow.processInstanceId,
- toDept: false,
- toTech: false,
- }
- switch (value.type) {
- case "4":
- taskForm.toTech = true
- break;
- case "10":
- taskForm.toDept = true
- break;
- default:
- break;
- }
- uni.showModal({
- title: '提示',
- content: "是否上报给" + value.name,
- success: res => {
- if (res.confirm) {
- this.showSelect = false
- this.finishHandle(taskForm)
-
- } else if (res.cancel) {
- console.log('用户点击取消');
- }
- }
- });
- },
- finishHandle(taskForm) {
- let count = this.formList.length
- let batch = {
- updateList: [],
- addList: [],
- }
- this.formList.forEach(form => {
- if (form.images && form.images.length == 0) {
- form.images = undefined
- }
- if (form.videos && form.videos.length == 0) {
- form.videos = undefined
- }
- if (form.content) {
- form.status = 1
- form.solution = 1
- form.recordType = 2
- count--
- batch.addList.push(form)
- batch.updateList.push({
- id: form.recordId,
- state: 1
- })
- }
- })
- //向记录表中添加数据,
- updateThenSaveBatch(batch).then(res => {
- const that = this
- let form = {
- id: this.task.id,
- problemCount: count
- }
-
- //再完成任务
- updatePatrolTask(form).then(res => {
- chargerCompleteTask(taskForm).then(res => {
- let that = this
- uni.showToast({
- icon: 'success',
- title: '提交成功',
- success() {
- //清除缓存
- uni.removeStorageSync(that.taskPrefix())
- setTimeout(() => {
- that.$u.func.globalNavigator(
- "/pages/home/patrolIndex",
- "switchTab")
- }, 1000)
- }
- })
- })
- })
- })
- },
- //表单验证
- validate() {
- return new Promise((resolve, reject) => {
- for (var i = 0; i < this.formList.length; i++) {
- let e = this.formList[i]
-
- if (e.images.length == 0) {
- this.$u.func.showToast({
- title: e.groupName + e.itemsName + "图片未上传",
- })
-
- return resolve(false)
- }
-
- if (e.content == "") {
- this.$u.func.showToast({
- title: e.groupName + e.itemsName + "巡查描述未填写",
- })
- return resolve(false)
- }
-
- if (e.solution == "") {
- this.$u.func.showToast({
- title: e.groupName + e.itemsName + "请选择解决情况",
- })
- return resolve(false)
- }
- }
- return resolve(true)
- })
-
- },
- //获取头部
- getHeader() {
- let accessToken = uni.getStorageSync('accessToken');
- let myHeader = {}
- if (accessToken) {
- myHeader['Blade-Auth'] = 'bearer ' + accessToken;
- }
- // 客户端认证参数
- myHeader['Authorization'] = 'Basic ' + Base64.encode(clientId + ':' + clientSecret);
- this.header = myHeader
- this.uploadConfig.header = myHeader
- },
- //获取巡查组
- getGroup() {
- getPatrolGroupDTO(this.task.id).then(res => {
- let data = res.data
- this.groupList = data
- this.initHandleForm(this.groupList)
- })
- },
- initHandleForm(groupList) {
- if (groupList.length > 0) {
- let index = 0
- let formList = uni.getStorageSync(this.taskPrefix())
- groupList.forEach(group => {
- group.patrolRecordVOList.forEach(record => {
- if (formList.length != 0) {
- this.formList = formList
- } else {
- this.formList.push({
- images: [],
- videos: [],
- content: "",
- index: index,
- itemsName: record.itemsName,
- groupName: group.name,
- recordId: record.id,
- flowTaskId: this.task.flow.taskId,
- itemId: record.itemId,
- taskId: record.taskId
- })
- }
- record.index = index
- index++
- })
- })
- }
-
- },
- collapseChange(value) {
-
- if (value) {
-
- }
-
-
- },
- previewFullImg(imgArr) {
- let urls = []
- imgArr.forEach(e => {
- urls.push(e.url)
- })
- uni.previewImage({
- // current: e, //预览图片的下标
- urls: urls //预览图片的地址,必须要数组形式,如果不是数组形式就转换成数组形式就可以
- })
- },
- //读取后的处理函数
- async afterReadImg(event, index) {
- this.showLoading()
-
-
- // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
- let lists = [].concat(event.file)
- let fileListLen = this.formList[index].images.length
- lists.map((item) => {
- this.formList[index].images.push({
- ...item,
- status: 'uploading',
- message: '上传中'
- })
- })
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url)
- this.formList[index].images.splice(fileListLen, 1, Object.assign({}, {
- url: fileUrlConvert(result.data.link)
- }))
- fileListLen++
- }
-
- this.loadingClose()
- },
-
- //读取后的处理函数
- async afterReadVideo(event, index) {
- this.showLoading()
- // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
- let lists = [].concat(event.file)
- let fileListLen = this.formList[index].videos.length
- lists.map((item) => {
- this.formList[index].videos.push({
- ...item,
- status: 'uploading',
- message: '上传中'
- })
- })
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url)
- this.formList[index].videos.splice(fileListLen, 1, Object.assign({}, {
- url: fileUrlConvert(result.data.link)
- }))
- fileListLen++
- }
- this.loadingClose()
- },
-
- //上传方法
- uploadFilePromise(url) {
- return new Promise((resolve, reject) => {
- let a = uni.uploadFile({
- url: this.uploadConfig.url, //接口地址
- filePath: url,
- name: 'file',
- header: this.uploadConfig.header,
- success: (res) => {
- let data = JSON.parse(res.data)
- setTimeout(() => {
- resolve(data)
- }, 1000)
- }
- });
- })
- },
-
- //删除图片
- deletePic(event, index) {
- this.formList[index].images.splice(event.index, 1)
- },
-
- //删除视频
- deleteVideo(event, index) {
- this.formList[index].videos.splice(event.index, 1)
- },
- taskPrefix() {
- return "handleTask_" + this.task.id
- },
- saveStorage() {
- uni.setStorageSync(this.taskPrefix(), this.formList)
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- .container {
-
-
- .report-card {
- padding: 0 30rpx;
-
- .card-inside-head {
- font-size: 36rpx;
- // border: 2rpx solid black;
- }
-
- .content {
-
- .report {
- // border: 2rpx solid black;
- margin-bottom: 10rpx;
- }
-
- .handle {
- // border: 1px solid black;
- }
-
- .title {
- // border-bottom: 2rpx solid black;
- font-size: 40rpx;
- }
-
-
-
- .content {
-
- .item {
- font-size: 30rpx;
- display: flex;
- align-items: center;
- margin: 20rpx 0rpx;
-
- .image {
- width: 180rpx;
- height: 180rpx;
- }
- }
- }
- }
- }
-
- .page-footer {
- position: fixed;
- bottom: 0;
- width: 100%;
- }
- }
-
-
- .uni-collapse-item-title {
- display: flex;
- justify-content: space-between;
- padding: 20rpx;
- font-size: 44rpx;
-
- .tip {
- font-size: 15px;
- display: flex;
- align-items: center;
- color: #ff0000;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/patrol/patrolReport.vue b/subPackage/patrol/patrolReport.vue
deleted file mode 100644
index e25c7da..0000000
--- a/subPackage/patrol/patrolReport.vue
+++ /dev/null
@@ -1,1054 +0,0 @@
-<template>
- <view class="container">
- <uni-collapse accordion ref="collapse" v-model="collapseValue" @change="collapseChange" v-if="reservoir.res_nm">
-
- <uni-collapse-item :open="true" :show-animation="showAnimation">
- <view class="uni-collapse-item-title" slot="title">
- <view class="title">报汛</view>
- <view class="icon">
- <u-icon v-if="model.personWatch" name="checkbox-mark" color="#2979ff" size="28"></u-icon>
- </view>
- </view>
- <view class="form">
- <view class="item">
- <view class="label">水库名称:</view>
- <view class="value">{{reservoir.res_nm}}</view>
- </view>
-
- <view v-if="wlw.rz" class="item">
- <view class="label">新站水位:</view>
- <view class="value">{{wlw.rz}}m</view>
- <view class="tip" v-if="wlw.overWeirTopElev>0">
- (超溢洪道{{wlw.overWeirTopElev}}米)</view>
- <view class="tip" v-else>(低于溢洪道{{-wlw.overWeirTopElev}}米)</view>
- </view>
- <view v-if="lk.rz" class="item">
- <view class="label">老站水位:</view>
- <view class="value">{{lk.rz}}m</view>
- <view class="tip" v-if="lk.overWeirTopElev>0">
- (超溢洪道{{lk.overWeirTopElev}}米)</view>
- <view class="tip" v-else>(低于溢洪道{{-lk.overWeirTopElev}}米)</view>
- </view>
-
-
- <u--form :model="model" :rules="rules" ref="floodForm">
- <u-form-item labelWidth="150" required label="水位是否超溢洪道:" prop="isOver">
- <view class="btn-group">
- <view class="value-item"
- :class="{'border-left-none':index==1||index==2,'active':item.value==model.isOver}"
- v-for="(item,index) in isOverOption" :key="item.value" @click="changeIsOver(item)">
- {{item.text}}
- </view>
- </view>
- </u-form-item>
- <u-form-item labelWidth="1" label=" " prop="personOverZ">
- <view style="display: flex;flex-direction: row;align-items: center;">
- <text v-if="model.isOver == 1">
- 人工观测水位超溢洪道堰顶约
- </text>
- <text v-if="model.isOver == 2">
- 人工观测水位低于溢洪道堰顶约
- </text>
- <view class="input">
- <u--input type="digit" border="bottom" v-model="model.personOverZ"
- @blur="inputBlur"></u--input>
- </view>
- <text>米</text>
- </view>
- </u-form-item>
- <u-form-item labelWidth="80" label="闸门状态:" prop="gateStatus">
- <view class="btn-group">
- <view class="value-item"
- :class="{'border-left-none':index==1||index==2,'active':item.value==model.gateStatus}"
- v-for="(item,index) in gateStatusOption" :key="item.value"
- @click="changeGateStatus(item)">
- {{item.text}}
- </view>
- </view>
- </u-form-item>
- <u-form-item labelWidth="80" label="是否异常:" prop="status">
- <view class="btn-group" style="padding-bottom: 32rpx;">
- <view class="value-item"
- :class="{'border-left-none':index==1||index==2,'active':item.value==model.status}"
- v-for="(item,index) in statusOption" :key="item.value"
- @click="changeFloodStatus(item)">
- {{item.text}}
- </view>
- </view>
-
- </u-form-item>
- <view v-if="model.status == 2">
-
- <u-form-item labelWidth="100" required label="异常情况说明:" prop="content">
- <u-textarea confirmType="done" v-model="model.content" placeholder="请填写异常情况说明">
- </u-textarea>
- </u-form-item>
-
- <u-form-item labelWidth="100" prop="images" label="核查图片">
- <u-upload :fileList="model.images" :previewFullImage="uploadConfig.previewFullImage"
- :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
- :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
- @afterRead="afterReadFloodImg" @delete="deleteFloodPic">
- </u-upload>
- </u-form-item>
-
- <u-form-item labelWidth="100" prop="videos" label="核查视频">
- <u-upload :fileList="model.videos" :previewFullImage="uploadConfig.previewFullImage"
- :accept="uploadConfig.acceptVideo" :multiple="false" :maxCount="1"
- :capture="uploadConfig.capture" @afterRead="afterReadFloodVideo"
- @delete="deleteFloodVideo">
- </u-upload>
- </u-form-item>
- </view>
- </u--form>
- </view>
-
- </uni-collapse-item>
-
-
- <uni-collapse-item :show-animation="showAnimation" v-for="(group,gIndex) in groupList" :key="gIndex"
- ref="collapseItem">
-
- <view class="uni-collapse-item-title" slot="title">
- <view class="title">{{group.name}}</view>
- <view class="tip">{{getCount(group)}}项未填写</view>
- </view>
-
-
- <card class="item-card" v-for="(item,index) in itemList" :key="item.itemId">
- <view class="card-inside-head" slot="insideHead">{{item.itemsName}}</view>
- <view class="content" slot="content">
- <u-form labelWidth="70" :model="formList[item.index]" ref="form">
- <u-form-item required label="状态" prop="status">
- <view class="btn-group">
- <u-button class="unclick"
- :customStyle="formList[item.index].status==1?btnCustomStyle:''" text="正常"
- @click="changeStatus(formList[item.index],1)">
- </u-button>
- <u-button class="unclick"
- :customStyle="formList[item.index].status==2?btnCustomStyle:''" text="异常"
- @click="changeStatus(formList[item.index],2)">
- </u-button>
- </view>
- </u-form-item>
-
- <view v-if="formList[item.index].status == 2">
- <u-form-item required prop="images" label="现场图片">
- <u-upload :fileList="formList[item.index].images"
- :previewFullImage="uploadConfig.previewFullImage"
- :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
- :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
- @afterRead="afterReadImg($event,item.index)"
- @delete="deletePic($event,item.index)">
- </u-upload>
- </u-form-item>
-
- <u-form-item prop="videos" label="现场视频">
- <u-upload :fileList="formList[item.index].videos"
- :previewFullImage="uploadConfig.previewFullImage"
- :accept="uploadConfig.acceptVideo" :multiple="false" :maxCount="1"
- :capture="uploadConfig.capture" @afterRead="afterReadVideo($event,item.index)"
- @delete="deleteVideo($event,item.index)">
- </u-upload>
- </u-form-item>
-
- <u-form-item required prop="content" label="巡查描述">
- <u-textarea confirmType="done" v-model="formList[item.index].content"
- placeholder="请输入巡查描述">
- </u-textarea>
- </u-form-item>
-
- <u-form-item required label="处理" prop="solution">
- <view class="btn-group">
- <u-button class="unclick"
- :customStyle="formList[item.index].solution==1?btnCustomStyle:''" text="已解决"
- @click="changeSolution(formList[item.index],1)">
- </u-button>
- <u-button class="unclick"
- :customStyle="formList[item.index].solution==2?btnCustomStyle:''" text="未解决"
- @click="changeSolution(formList[item.index],2)">
- </u-button>
- </view>
- </u-form-item>
- </view>
- </u-form>
- </view>
- </card>
- </uni-collapse-item>
- </uni-collapse>
-
- <view class="place" style="height: 100rpx;">
-
- </view>
-
- <view class="page-footer">
- <u-button type="primary" text="结束巡查" @click="finishPatrolTask"></u-button>
- </view>
-
- <u-loading-page :loading="loading"></u-loading-page>
-
-
- </view>
-</template>
-
-<script>
- import boxTitle from "@/subPackage/patrol/components/boxTitle.vue"
- import card from "@/components/my-components/card.vue"
- import uniCollapse from "@/subPackage/patrol/components/uni-collapse/components/uni-collapse/uni-collapse.vue"
- import uniCollapseItem from "@/subPackage/patrol/components/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue"
- import {
- getAllPatrolGroupByTaskId,
- getAllPatrolGroupItemByGroupId,
- patrolCompleteTask
- } from '@/api/patrol/patrol'
- import {
- dateFormat
- } from "@/utils/date"
- import {
- findResManagePersonByResId
- } from '@/api/dataCenter/responsiblePerson/responsiblePerson'
- import {
- devUrl,
- clientId,
- clientSecret
- } from '@/common/setting'
- import {
- Base64
- } from '@/utils/base64.js';
- import {
- add
- } from "@/api/reportFlood/reportFloodRecord.js"
- import {
- fileUrlConvert
- } from "@/subPackage/patrol/util/fileUtil.js"
- import locationWatcher from '@/subPackage/patrol/util/location.js'
- import {
- floatSub
- } from "../realtimeMonitor/utils"
- import {
- getSKResZLastChildApi
- } from "@/api/dataCenter/rainWaterCondition/rainWaterCondition"
- export default {
- components: {
- boxTitle,
- card,
- uniCollapse,
- uniCollapseItem
- },
- data() {
- return {
- loading: false,
- tabCurrent: "0",
- tabList: [{
- name: "填写报告"
- },
- {
- name: "报告列表"
- }
- ],
- task: {},
- reservoir: {},
- groupList: [],
- showAnimation: false,
- notFilledNum: 0,
- filledNum: 0,
- problemCount: 0,
- techPerson: {},
- collapseValue: "",
- formList: uni.getStorageSync("patrolRecord") || [],
- model: uni.getStorageSync("reportFlood") || {
- isOver: "1",
- gateStatus: "1",
- status: 1,
- images: [],
- videos: [],
- isAudit: "10",
- },
- rules: {
- 'personOverZ': {
- type: 'string',
- required: true,
- message: '请输入差值',
- trigger: ['blur', 'change']
- },
- 'content': {
- type: 'string',
- required: true,
- message: '请输入异常情况说明',
- trigger: ['blur', 'change']
- },
- },
- isOverOption: [{
- text: "是",
- value: "1"
- },
- {
- text: "否",
- value: "2"
- },
- ],
- gateStatusOption: [{
- text: "开启",
- value: "1"
- },
- {
- text: "关闭",
- value: "2"
- },
- ],
- statusOption: [{
- text: "有异常",
- value: 2
- },
- {
- text: "无异常",
- value: 1
- },
- ],
-
- itemList: [],
- uploadConfig: {
- acceptImg: "image",
- acceptVideo: 'video',
- capture: ['album', 'camera'],
- multiple: true,
- maxCount: "5",
- previewFullImage: true,
- uploadText: "上传中",
- url: devUrl + "/api/blade-resource/oss/endpoint/put-file-attach",
- header: {},
- },
- btnCustomStyle: {
- backgroundColor: '#3c9cff',
- color: "#ffffff"
- },
- locationWatcherId: uni.getStorageSync("locationWatcherId"), //监听器id
- maximumAge: 3 * 60 * 1000, //间隔时间3min
- g_wakelock: null,
-
- lk: {},
- wlw: {}
- }
- },
- computed: {
- getCount() {
- return (group => {
- let filter = this.formList.filter(e => {
- return e.groupId == group.id
- })
- let count = filter.length
- filter.forEach(e => {
- if (e.status == 1) {
- count--
- } else {
- if (e.images.length > 0 && e.content && e.solution) {
- count--
- }
- }
- })
- return count
- })
- }
- },
- created() {
- this.getHeader()
- // this.mapNotice()
- if (this.formList.length == 0) {
- this.getItemList()
- }
- },
- mounted() {
- this.getReservoirInfo()
- // #ifdef APP-PLUS
- this.open()
- // #endif
- },
- onLoad(option) {
- if (option.task) {
- this.task = JSON.parse(option.task)
- this.getTechPerson(this.task.projectId)
- uni.setNavigationBarTitle({
- title: this.task.title
- })
- }
- },
- onShow() {
- this.getGroupList()
- },
- options: {
- styleIsolation: 'shared'
- },
- methods: {
- //提示地图轨迹收集
- mapNotice() {
- uni.showModal({
- title: "提示",
- content: "该功能正在收集你的巡查轨迹",
- showCancel: false,
- })
- },
-
- //开启定位功能
- open() {
- locationWatcher.startLocationService(e => {
- let {
- latitude,
- longitude
- } = e.position
- if (!this.locationWatcherId) {
- this.locationWatcherId = e.locationWatcherId //举例保存到data,实际可以缓存到全局
- uni.setStorageSync("locationWatcherId", this.locationWatcherId)
- } else {
- //最终格式 'LINESTRING(113.41057299965496 29.585444414178678,113.42215533885124 29.585262015136227,113.42215533885124 29.58526201513622)'
- let patrolRoute = uni.getStorageSync("patrolRoute")
- if (patrolRoute) {
- uni.setStorageSync("patrolRoute", patrolRoute + "," + longitude + ' ' + latitude)
- } else {
- uni.setStorageSync("patrolRoute", longitude + ' ' + latitude)
- }
-
- let count = uni.getStorageSync("count")
- if (count) {
- count = count + 1
- uni.setStorageSync("count", count)
- } else {
- count = 1
- uni.setStorageSync("count", count)
- }
- }
- }, (e) => {
- console.log(e, '定位失败')
- }, this.maximumAge)
- },
- //关闭定位
- close() {
-
- if (this.locationWatcherId) {
- this.locationWatcherId && locationWatcher.closeLocationService(this.locationWatcherId)
- this.locationWatcherId = ""
- uni.removeStorageSync("locationWatcherId")
- uni.removeStorageSync('patrolRoute')
- }
- uni.removeStorageSync('patrolRecord')
- uni.removeStorageSync('reportFlood')
- },
-
- inputBlur() {
- this.save()
- },
- //将数据存入本地
- save() {
- uni.setStorageSync('patrolRecord', this.formList)
- uni.setStorageSync('reportFlood', this.model)
- },
-
- //获取技术负责人
- getTechPerson(resGuid) {
- findResManagePersonByResId({
- resGuid: resGuid
- }).then(res => {
- let data = res.data
- this.techPerson = data.filter(e => {
- return e.type == 4
- })[0]
- })
- },
-
- //获取头部
- getHeader() {
- let accessToken = uni.getStorageSync('accessToken');
- let myHeader = {}
- if (accessToken) {
- myHeader['Blade-Auth'] = 'bearer ' + accessToken;
- }
- // 客户端认证参数
- myHeader['Authorization'] = 'Basic ' + Base64.encode(clientId + ':' + clientSecret);
- this.header = myHeader
- this.uploadConfig.header = myHeader
- },
-
- /**
- * 获取组列表
- */
- getGroupList() {
- getAllPatrolGroupByTaskId(this.task.id).then(res => {
- //获取组
- this.groupList = res.data
- //获取未填写项目数量
- this.notFilledNum = this.groupList.length - this.groupList.filter(e => {
- return e.isSelect == 1
- }).length
- //获取已填写项目数量
- this.filledNum = this.groupList.length - this.notFilledNum
- //获取问题数量
- this.problemCount = 0
- this.groupList.forEach(e => {
- this.problemCount += e.problemCount
- })
- })
- },
-
- //表单验证
- validate() {
- return new Promise((resolve, reject) => {
- this.$refs.floodForm.validate().then(res => {
- if (res) {
- for (var i = 0; i < this.formList.length; i++) {
- let e = this.formList[i]
- if (e.status == "") {
- this.$u.func.showToast({
- title: e.itemsName + "未填写状态",
- })
- return resolve(false)
- } else if (e.status == 2) {
- if (e.images.length == 0) {
- this.$u.func.showToast({
- title: e.itemsName + "图片未上传",
- })
-
- return resolve(false)
- }
-
- if (e.content == "") {
- this.$u.func.showToast({
- title: e.itemsName + "巡查描述未填写",
- })
- return resolve(false)
- }
-
- if (e.solution == "") {
- this.$u.func.showToast({
- title: e.itemsName + "请选择解决情况",
- })
- return resolve(false)
- }
- }
- }
- return resolve(true)
- }
- }).catch(err => {
- if (err.length > 0) {
- this.$u.func.showToast({
- title: "报汛存在未填写内容",
- })
- return resolve(false)
- }
- })
- })
-
- },
-
- //获取问题数量
- getProblemCount() {
- let count = 0
- this.formList.forEach(e => {
- //异常且未解决的算为问题数量
- if (e.status == 2 && e.solution == "2") {
- count++
- }
- })
- this.problemCount = count
- },
-
- //结束巡查任务
- async finishPatrolTask() {
- const res = await this.validate()
- if (res) {
- this.getProblemCount()
- this.handleFormListFile()
- this.task.state = 3
- let date = new Date()
- let realEndtTime = dateFormat(date)
- let patrolRoute = uni.getStorageSync("patrolRoute")
- if (patrolRoute) {
- this.task.patrolRoute = "'LINESTRING(" + patrolRoute + ")'"
- } else {
- this.task.patrolRoute = ""
- }
- let params = {
- id: this.task.id,
- state: this.task.state,
- realEndTime: realEndtTime,
- problemCount: this.problemCount,
- reportProblemCount: this.problemCount,
- processDefinitionId: this.task.flow.processDefinitionId,
- processInstanceId: this.task.flow.processInstanceId,
- currentUserId: this.userInfo.user_id,
- //需要根据phone拿id
- taskUser: this.techPerson.userPhone,
- //记录集合
- patrolRecordList: this.formList,
- patrolRoute: this.task.patrolRoute
- }
- //当问题数量大于0,进行上报
- if (this.problemCount > 0) {
- params.report = true
- } else {
- params.report = false
- }
- //保存报汛内容
- this.handleFloodData()
- add(this.model).then(res => {
- //完成巡查任务
- patrolCompleteTask(params).then(res => {
- let that = this
- this.close()
- uni.showToast({
- icon: 'success',
- title: '提交成功',
- success() {
- setTimeout(() => {
- that.$u.func.globalNavigator(
- "/pages/home/patrolIndex", "switchTab")
- }, 1000)
- }
- })
- })
- })
- }
- },
-
- handleFormListFile() {
- this.formList.forEach(e => {
- //处理文件
- if (e.images && e.images.length == 0) {
- e.images = undefined
- }
-
- if (e.videos && e.videos.length == 0) {
- e.videos = undefined
- }
-
- e.groupId = ""
- e.itemsName = ""
- })
- },
-
- handleFloodData() {
- //保存任务id
- this.model.taskId = this.task.id
- //保存水库id
- this.model.reservoirId = this.task.projectId
- if (this.wlw) {
- this.model.wlwRz = this.wlw.rz
- this.model.wlwOverZ = this.wlw.overWeirTopElev
- }
-
- if (this.lk) {
- this.model.lkRz = this.lk.rz
- this.model.lkOverZ = this.lk.overWeirTopElev
- }
-
- this.model.adCode = this.reservoir.county_cd
-
- if (this.model.isOver == 1) {
- //超溢洪道
- this.model.personRz = (this.reservoir.weir_top_elev + (this.model.personOverZ - 0))
- .toFixed(2)
- } else {
- //低于溢洪道
- this.model.personRz = (this.reservoir.weir_top_elev - (this.model.personOverZ - 0))
- .toFixed(2)
- }
-
- //处理文件
- if (this.model.images && this.model.images.length == 0) {
- this.model.images = undefined
- }
-
- if (this.model.videos && this.model.videos.length == 0) {
- this.model.videos = undefined
- }
-
- },
-
- collapseChange(value) {
- if (value) {
- let selectGroup = this.groupList[value - 1]
- this.itemList = this.formList.filter(e => e.groupId == selectGroup.id)
- }
- },
-
- getItemList() {
- getAllPatrolGroupItemByGroupId().then(res => {
- this.formList = []
- let data = res.data
- let index = 0
- data.forEach(item => {
- let form = {
- index: index++,
- status: "",
- solution: "",
- images: [],
- videos: [],
- content: "",
- itemId: item.id,
- taskId: this.task.id,
- groupId: item.groupId,
- itemsName: item.itemsName,
- flowTaskId: this.task.flow.taskId,
- recordType: 1
- }
- this.formList.push(form)
- })
- this.save()
- })
- },
-
- //正常异常状态改变
- changeStatus(form, status) {
- form.status = status
- this.$nextTick(() => {
- this.$refs.collapse.resize()
- })
- //状态正常保存到本地
- if (status == 1) {
- this.save()
- }
- },
- //已解决未解决状态改变
- changeSolution(form, solution) {
- form.solution = solution
- this.save()
- },
-
- //读取后的处理函数
- async afterReadImg(event, index) {
- this.showLoading()
-
-
- // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
- let lists = [].concat(event.file)
- let fileListLen = this.formList[index].images.length
- lists.map((item) => {
- this.formList[index].images.push({
- ...item,
- status: 'uploading',
- message: '上传中'
- })
- })
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url)
- this.formList[index].images.splice(fileListLen, 1, Object.assign({}, {
- url: fileUrlConvert(result.data.link)
- }))
- fileListLen++
- }
-
- this.loadingClose()
- },
-
- //读取后的处理函数
- async afterReadVideo(event, index) {
- this.showLoading()
- // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
- let lists = [].concat(event.file)
- let fileListLen = this.formList[index].videos.length
- lists.map((item) => {
- this.formList[index].videos.push({
- ...item,
- status: 'uploading',
- message: '上传中'
- })
- })
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url)
- this.formList[index].videos.splice(fileListLen, 1, Object.assign({}, {
- url: fileUrlConvert(result.data.link)
- }))
- fileListLen++
- }
- this.loadingClose()
- },
-
- //上传方法
- uploadFilePromise(url) {
- return new Promise((resolve, reject) => {
- let a = uni.uploadFile({
- url: this.uploadConfig.url, //接口地址
- filePath: url,
- name: 'file',
- header: this.uploadConfig.header,
- success: (res) => {
- let data = JSON.parse(res.data)
- setTimeout(() => {
- resolve(data)
- }, 1000)
- }
- });
- })
- },
-
- //删除图片
- deletePic(event, index) {
- this.formList[index].images.splice(event.index, 1)
- },
-
- //删除视频
- deleteVideo(event, index) {
- this.formList[index].videos.splice(event.index, 1)
- },
-
- //获取水库新老站实时水位
- async getReservoirInfo() {
- this.loading = true
- let params = {
- res_cd: this.task.projectId
- }
- const res = await getSKResZLastChildApi(params)
- let data = res.data.data
-
-
- this.reservoir.res_nm = data[0].res_nm
- this.reservoir.weir_top_elev = data[0].weir_top_elev
- this.reservoir.county_cd = data[0].county_cd
-
- data.forEach(e => {
- if (e.resource_flag == "物联网") {
- this.wlw = e
- this.wlw.overWeirTopElev = floatSub(this.wlw.rz, this.wlw.weir_top_elev)
- } else if (e.resource_flag == "老库") {
- this.lk = e
- this.lk.overWeirTopElev = floatSub(this.lk.rz, this.lk.weir_top_elev)
- }
- })
- this.loading = false
-
- },
-
- //改变超汛限状态
- changeIsOver(item) {
- if (this.model.isOver == item.value) return
- this.model.isOver = item.value
- },
- //改变闸门关闭状态
- changeGateStatus(item) {
- if (this.model.gateStatus == item.value) return
- this.model.gateStatus = item.value
- },
- //改变状态
- changeFloodStatus(item) {
- if (this.model.status == item.value) return
- this.model.status = item.value
- this.$nextTick(() => {
- this.$refs.collapse.resize()
- })
- },
-
- //读取后的处理函数
- async afterReadFloodImg(event, index) {
- this.showLoading()
- // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
- let lists = [].concat(event.file)
- let fileListLen = this.model.images.length
- lists.map((item) => {
- this.model.images.push({
- ...item,
- status: 'uploading',
- message: '上传中'
- })
- })
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url)
- this.model.images.splice(fileListLen, 1, Object.assign({}, {
- url: fileUrlConvert(result.data.link)
- }))
- fileListLen++
- }
- this.loadingClose()
- },
-
- //读取后的处理函数
- async afterReadFloodVideo(event, index) {
- this.showLoading()
- // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
- let lists = [].concat(event.file)
- let fileListLen = this.model.videos.length
- lists.map((item) => {
- this.model.videos.push({
- ...item,
- status: 'uploading',
- message: '上传中'
- })
- })
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url)
- this.model.videos.splice(fileListLen, 1, Object.assign({}, {
- url: fileUrlConvert(result.data.link)
- }))
- fileListLen++
- }
- this.loadingClose()
- },
-
- //删除图片
- deleteFloodPic(event) {
- this.model.images.splice(event.index, 1)
- },
-
- //删除视频
- deleteFloodVideo(event) {
- this.model.videos.splice(event.index, 1)
- },
- showLoading() {
- uni.showLoading({
- mask: true,
- title: '上传中'
- })
- },
- loadingClose() {
- uni.hideLoading()
- },
-
- }
- }
-</script>
-
-<style scoped lang="scss">
- .container {
- // min-height: 100vh;
- overflow: hidden;
- }
-
- .basic-info {
- .item {
- width: 100%;
- display: flex;
- font-size: 30rpx;
-
- .label {
- width: 25%;
- }
-
- .val {
- display: flex;
- }
-
- .over {
- width: 40%;
- }
-
- .value {
- display: flex;
- justify-content: space-between;
-
- .tip-over {
- color: #ff8610;
- }
-
- .tip-less {
- color: #00aa00;
- }
- }
- }
- }
-
- .form {
- padding: 0 30rpx;
- }
-
- .item {
- width: 100%;
- display: flex;
- font-size: 30rpx;
-
- .label {
- width: 25%;
- }
-
- .val {
- display: flex;
- }
-
- .over {
- width: 40%;
- }
-
- .value {
- display: flex;
- justify-content: space-between;
-
- .tip-over {
- color: #ff8610;
- }
-
- .tip-less {
- color: #00aa00;
- }
- }
- }
-
- .value-item {
- padding: 0 40rpx;
- background-color: #ffffff;
- border: 2rpx solid #333333;
- height: 70rpx;
- line-height: 70rpx;
- box-sizing: border-box;
- }
-
- .btn-group {
- display: flex;
-
- .active {
- background-color: #1180ff;
- color: #ffffff;
- border: 2rpx solid #1180ff;
- }
-
- .border-left-none {
- border-left: 0;
- }
-
- .sys-over {
- font-size: 50rpx;
- font-weight: 800;
- color: #ff8610;
- }
- }
-
-
-
- .input {
- width: 220rpx;
- }
-
-
- .tab {
- display: flex;
- justify-content: space-around;
- }
-
- .item-card {
- padding: 0 30rpx;
-
- .card-inside-head {
- font-size: 36rpx;
- }
-
- .btn-group {
- display: flex;
- }
-
- }
-
- .uni-collapse-item-title {
- display: flex;
- justify-content: space-between;
- padding: 20rpx;
- font-size: 44rpx;
-
- .tip {
- font-size: 15px;
- display: flex;
- align-items: center;
- color: #ff0000;
- }
- }
-
- .page-footer {
- position: fixed;
- bottom: 0;
- width: 100%;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/patrol/util/fileUtil.js b/subPackage/patrol/util/fileUtil.js
deleted file mode 100644
index 9d153e4..0000000
--- a/subPackage/patrol/util/fileUtil.js
+++ /dev/null
@@ -1,17 +0,0 @@
-/**
- * 转换文件域名
- * @param {Object} url 地址
- */
-export function fileUrlConvert(url) {
- let convertUrl = ""
- if (url.indexOf('http://10.42.6.251:8082') != -1) {
- convertUrl = url.replace('http://10.42.6.251:8082',
- 'https://sk.hubeishuiyi.cn/gminio')
- } else if (url.indexOf('http://10.10.2.251:8082') != -1) {
- convertUrl = url.replace('http://10.10.2.251:8082',
- 'https://sk.hubeishuiyi.cn/gminio')
- } else {
- convertUrl = url
- }
- return convertUrl
-}
\ No newline at end of file
diff --git a/subPackage/patrol/util/location.js b/subPackage/patrol/util/location.js
deleted file mode 100644
index 89a6045..0000000
--- a/subPackage/patrol/util/location.js
+++ /dev/null
@@ -1,86 +0,0 @@
-export default {
- //检测是否开启系统定位权限
- hasLocationPermission() {
- let system = uni.getSystemInfoSync();
- if (system.platform === 'android') { //安卓
- let context = plus.android.importClass("android.content.Context");
- let locationManager = plus.android.importClass("android.location.LocationManager");
- let main = plus.android.runtimeMainActivity();
- let service = main.getSystemService(context.LOCATION_SERVICE);
- //已开启系统定位服务功能
- if (service.isProviderEnabled(locationManager.GPS_PROVIDER)) {
- // uni.showModal({
- // content: "定位功能已开启,请勿离开应用或熄屏",
- // showCancel: false
- // })
- return true;
- } else { //未开启引导开启
- uni.showModal({
- title: '友情提示',
- content: '请开启位置服务功能',
- success: e => {
- if (e.confirm) {
- //打开手机系统gps定位设置页面
- let Intent = plus.android.importClass('android.content.Intent');
- let Settings = plus.android.importClass('android.provider.Settings');
- let intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
- main.startActivity(intent);
- }
- }
- })
- }
- } else if (system.platform === 'ios') { //ios
- let cllocationManger = plus.ios.import("CLLocationManager");
- let enable = cllocationManger.locationServicesEnabled();
- let status = cllocationManger.authorizationStatus();
- plus.ios.deleteObject(cllocationManger);
- if (enable && status != 2) return true; //已开启定位功能
- else {
- uni.showModal({
- title: '友情提示',
- content: '请前往设置-定位服务打开定位服务功能',
- success: e => {
- if (e.confirm) {
- let UIApplication = plus.ios.import("UIApplication");
- let application = UIApplication.sharedApplication();
- let NSURL = plus.ios.import("NSURL");
- let setting = NSURL.URLWithString("app-settings:");
- application.openURL(setting);
- plus.ios.deleteObject(setting);
- plus.ios.deleteObject(NSURL);
- plus.ios.deleteObject(application);
- }
- }
- });
- }
- }
- return false;
- },
- /**开启后台持续获取定位功能
- * successCallBack:成功回调函数
- *failCallBack:失败回调函数
- *maximumAge:获取定位间隔时间
- */
- startLocationService(successCallBack = () => {}, failCallBack = () => {}, maximumAge = 60 * 1000) {
- if (this.hasLocationPermission()) { //有定位权限
- let locationWatcherId = plus.geolocation.watchPosition((position) => {
- successCallBack({
- locationWatcherId,
- position: position.coords
- })
- }, function(e) {
- console.log(e, '定位失败');
- failCallBack(e)
- }, {
- maximumAge, //获取位置间隔时间
- });
-
- }
-
-
- },
- //关闭定位功能
- closeLocationService(locationWatcherId) { //locationWatcherId:开启步骤生成的监听器id
- plus.geolocation.clearWatch(locationWatcherId)
- },
-}
\ No newline at end of file
diff --git a/subPackage/rainWaterCondition/components/filterBar.vue b/subPackage/rainWaterCondition/components/filterBar.vue
deleted file mode 100644
index 15073e3..0000000
--- a/subPackage/rainWaterCondition/components/filterBar.vue
+++ /dev/null
@@ -1,519 +0,0 @@
-<template>
- <view class="filterBar">
- <view class="wrap flex f-a-i" :style="{'--top':`${top}rpx`}">
- <view class="wrap-item flex f-a-i f-d-c" v-for="(item,index) in menu" :key="index"
- :class="[item.selected?'active':'']">
- <view class="wrap-item-box flex f-a-i" @click='select(item,index)'>
- <view class="label">
- {{item.label}}
- </view>
- <view class="item-icon" :class="[item.selected?'selected-item-icon':'']">
- <u-icon color='' size='10' name="arrow-down-fill"></u-icon>
- </view>
- </view>
- <view :class="[item.selected?'wrap-item-box-child':'']" :style="{top:calcTop}"
- class="wrap-item-box-child-default">
- <scroll-view scroll-y="true" class="scroll-Y">
- <view class="type-line" v-if="item.type=='line'">
- <view class="type-line-item flex f-a-i" v-for="(cItem,cIndex) in item.children"
- :key="cIndex" @click='lineSelect(item,cItem,index,cIndex)'>
- <view :class="[cItem.selected?'active':'']" class="type-label">{{cItem.label}}
- </view>
- <u-icon v-if="cItem.selected" color='#1180ff' size='16' name="checkbox-mark"></u-icon>
- </view>
- </view>
- <view class="type-check" v-if="item.type=='check'">
- <view class="type-check-item" v-for="(cItem,cIndex) in item.children" :key="cIndex">
- <!-- 单选 -->
- <view class="radio" v-if="cItem.type =='radio'">
- <view class="radio-label">{{cItem.label}}</view>
- <view class="option flex f-a-i">
- <view class="option-item" v-for="(c_clItem,c_clIndex) in cItem.option"
- :key="c_clIndex" :class="{'check_active':c_clItem.selected}"
- @click='radioSelect(cItem,c_clItem)'>{{c_clItem.label}}</view>
-
- </view>
- </view>
- <!-- 多选 -->
- <view class="type-label radio" v-else>
- <view class="radio-label">{{cItem.label}}</view>
- <view class="option flex f-a-i">
- <view class="option-item" :class="{'check_active':c_clItem.selected}"
- v-for="(c_clItem,c_clIndex) in cItem.option" :key="c_clIndex"
- @click='radioCheckSelect(cItem,c_clItem)'>{{c_clItem.label}}</view>
- </view>
- </view>
- </view>
- </view>
- </scroll-view>
- <view class="btn-box flex f-a-i" v-if="item.type=='check'">
- <view class="reset" @click="resetFilterData(index)">重置</view>
- <view class="submit" @click="setFilterData(item)">确定</view>
- </view>
- </view>
- </view>
- </view>
- <view :class="[showOver?'show':'']" :style="{top:calcShadow}" @click="hideOverLay"></view>
- </view>
-</template>
-
-<script>
- export default {
- name: "uFilter",
- props: {
- menuList: {
- type: Array,
- required: true,
- default: () => []
- },
- defaultModel: {
- type: Object,
- required: true,
- default: () => {}
- },
- top: {
- type: Number,
- default: 0
- },
- shadowTip: {
- type: Number,
- default: 36
- }
- },
- data() {
- return {
- //显示遮罩层
- showOver: false,
- //数据值
- model: {},
- lineLabel: "",
- menu: [],
- }
- },
- computed: {
- calcTop() {
- const info = uni.getWindowInfo()
- const windowTop = info.windowTop
- const safeToTop = info.safeAreaInsets.top
- const top = (windowTop + safeToTop + 36 - 8 + (this.top * 2)) + "rpx"
- // return {
- return top
- // }
- },
- calcShadow() {
- const info = uni.getWindowInfo()
- const windowTop = info.windowTop
- const safeToTop = info.safeAreaInsets.top
- const top = (windowTop + safeToTop + 36 + 300 + (this.shadowTip * 2)) + "rpx"
- return top
- }
- },
- watch: {
- menuList: {
- handler(newVal) {
- if (newVal) {
- this.menu = JSON.parse(JSON.stringify(newVal))
- this.init()
- }
- },
- immediate: true,
- deep: true
- },
-
- defaultModel: {
- handler(newVal) {
- if (newVal) {
- this.model = JSON.parse(JSON.stringify(newVal))
- this.defaultSelect()
- this.$forceUpdate();
- }
- },
- immediate: true,
- deep: true
- },
- },
- methods: {
- //初始化数据父级、子集selected
- init() {
- try {
- this.menu.forEach(v => {
- if (!v.hasOwnProperty('selected')) {
- this.$set(v, "selected", false)
- }
- if (v.type == 'line') {
- v.children.forEach(clV => {
- if (!clV.hasOwnProperty('selected')) {
- this.$set(clV, "selected", false)
- }
- })
- } else if (v.type == 'check') {
- v.children.forEach(clV => {
- clV.option.forEach(pv => {
- if (!pv.hasOwnProperty('selected')) {
- this.$set(pv, "selected", false)
- }
- })
- })
- }
- })
- } catch (e) {
- console.log(e, "eeee")
- }
- },
- //初始选中第一项
- // defaultVal(data) {
- // if (data.type == 'line') {
- // this.model[data.prop] = data.children[0].value
- // } else if (data.type == 'check') {
- // data.children.forEach(v => this.model[v.prop] = v.option[0].value)
- // }
- // },
- //根据初始值渲染第几项选中
- defaultSelect() {
- this.menu.forEach(v => {
- if (v.type == 'line') {
- const index = v.children.findIndex(cl => {
- if (cl.value == this.model[v.prop]) {
- return cl.value == this.model[v.prop]
- }
- })
- //初始化所有选择项
- v.children.forEach(l => l.selected = false)
- if (index >= 0) {
- v.children[index].selected = true
- v.label = v.children[index].label
- // this.lineLabel = v.children[index].label
- this.$forceUpdate();
- }
- } else if (v.type == 'check') {
- v.children.forEach(cl => {
- if (cl.type == 'radio') {
- const index = cl.option.findIndex(clO => {
- if (clO.value == this.model[cl.prop]) {
- return clO.value == this.model[cl.prop]
- }
- })
- //初始化所有选择项
- cl.option.forEach(cvo => cvo.selected = false)
- if (index >= 0) {
- cl.option[index].selected = true
- this.$forceUpdate();
- }
- } else if (cl.type == 'checkbox') {
- cl.option.forEach(cvo => cvo.selected = false)
- if (this.model[cl.prop]) {
- this.model[cl.prop].forEach(p => {
- const index = cl.option.findIndex(clO => {
- if (clO.value == p) {
- return clO.value == p
- }
- })
- if (index >= 0) {
- cl.option[index].selected = true
- this.$forceUpdate();
- }
- })
- }
-
- }
- })
- }
- })
- this.$forceUpdate();
- },
- //菜单栏选中
- select(item, index) {
- //重置所有的菜单选择状态
- this.menu.forEach((v, vIndex) => {
- if (vIndex != index) {
- v.selected = false
- } else {
- v.selected = !v.selected
- }
- })
- if (!item.selected) return this.showOver = false
- this.showOver = true
- this.$forceUpdate();
- },
- //行菜单子集选中
- lineSelect(item, cItem, index, cIndex) {
- this.menu[index].children.forEach((v, vIndex) => {
- v.selected = false
- })
- cItem.selected = true
- this.model[item.prop] = cItem.value
- item.label = cItem.label
- this.setFilterData()
- },
- //单选方法
- radioSelect(item, clItem) {
- if (clItem.selected) return
- item.option.forEach(v => v.selected = false)
- this.$set(clItem, 'selected', true)
- // clItem.selected = true
- this.model[item.prop] = clItem.value
- this.$forceUpdate()
- },
- //多选方法
- radioCheckSelect(item, clItem) {
- if (!this.model[item.prop]) {
- this.model[item.prop] = []
- }
- clItem.selected = !clItem.selected
- if (clItem.selected) {
- this.model[item.prop].push(clItem.value)
- } else {
- const index = this.model[item.prop].findIndex(v => v == clItem.value)
- this.model[item.prop].splice(index, 1)
- }
- this.$forceUpdate()
- },
- //重置
- resetFilterData(index) {
- this.redioReset(index)
- this.$emit("reset", this.model)
- this.hideOverLay()
- this.$forceUpdate()
- },
- //单选/多选重置
- redioReset(index) {
- const props = this.menu.filter(v => v.type == 'line').map(m => m.prop)
- this.menu[index].children.forEach(v => {
- //判断是否有type为line的状态栏 取出props
- if (props.length > 0) {
- props.forEach(p => {
- // !this.defaultModel[v.prop]
- if (p != v.prop && !this.defaultModel.hasOwnProperty(v.prop)) {
- delete this.model[v.prop]
- } else if (p != v.prop && this.defaultModel.hasOwnProperty(v.prop)) {
- this.model[v.prop] = this.defaultModel[v.prop]
- }
- })
- } else {
- if (!this.defaultModel.hasOwnProperty(v.prop)) {
- delete this.model[v.prop]
- } else if (this.defaultModel.hasOwnProperty(v.prop)) {
- this.model[v.prop] = this.defaultModel[v.prop]
- }
- }
- v.option.forEach(op => op.selected = false)
- if (v.type == 'radio') {
- const index = v.option.findIndex(clO => {
- return clO.value == this.model[v.prop]
- })
- v.option.forEach(cvo => cvo.selected = false)
- if (index >= 0) {
- v.option[index].selected = true
- }
- } else if (v.type == 'checkbox') {
- v.option.forEach(cvo => cvo.selected = false)
- if (this.model[v.prop]) {
- this.model[v.prop].forEach(p => {
- const index = v.option.findIndex(clO => {
- return clO.value == p
- })
- if (index >= 0) {
- v.option[index].selected = true
- }
- })
- }
- }
- })
- },
- //确定
- setFilterData(item) {
- this.$emit("submit", this.model)
- this.hideOverLay()
- this.$forceUpdate()
- },
- hideOverLay() {
- this.menu.forEach(v => {
- v.selected = false
- })
- this.showOver = false
- this.$forceUpdate()
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- .filterBar {
- width: 100%;
- background-color: #fff;
-
- .flex {
- display: flex;
- }
-
- .f-d-c {
- flex-direction: column;
- }
-
- .f-a-i {
- align-items: center;
- }
-
- .active {
- color: #1180ff !important;
- }
-
- .check_active {
- color: #fff !important;
- background-color: #1180ff !important;
- border: none !important;
- }
-
- .wrap {
- z-index: 3;
- width: 100%;
- font-size: 32rpx;
- border-bottom: 2rpx solid #e8e8e8;
- justify-content: space-around;
- // padding-bottom: 20rpx;
- height: 72rpx;
- box-sizing: border-box;
-
-
-
- &-item {
- color: #333333;
- text-align: center;
- transition: color .3s ease;
-
- .label {
- margin-right: 8rpx;
- font-size: 28rpx;
- }
-
- .item-icon {
- color: #333333;
- transition: transform .3s linear;
- transform: rotate(0);
- }
-
- .selected-item-icon {
- color: #1180ff;
- transform: rotate(180deg);
- }
-
- &-box-child {
- // top: 72rpx !important;
- width: 100% !important;
- opacity: 1 !important;
- z-index: 999 !important;
- visibility: visible !important;
- }
-
- &-box-child-default {
- position: absolute;
- // top: 16rpx;
- top: 0;
- left: 0;
- right: 0;
- opacity: 0;
- background: #fff;
- transition: opacity .1s linear;
- z-index: -999;
- visibility: hidden;
-
- .scroll-Y {
- height: 600rpx;
- }
-
- .btn-box {
- justify-content: space-between;
- height: 120rpx;
- flex-direction: row !important;
- align-items: center;
- padding: 0 24rpx;
- // position: fixed;
- background: #fff;
- width: 100%;
- box-sizing: border-box;
-
- >view {
- width: 240rpx;
- height: 60rpx;
- border-radius: 80rpx;
- border: solid 1rpx #5887f9;
- align-items: center;
- justify-content: center;
- box-sizing: border-box;
- line-height: 56rpx;
- font-size: 36rpx;
- }
-
- .reset {
- color: #1180ff;
- }
-
- .submit {
- color: #fff;
- background-color: #1180ff;
- }
- }
-
- .type-line {
- padding-bottom: 40rpx;
- font-size: 28rpx;
-
- .type-line-item {
- color: #333333;
- justify-content: space-between;
- padding: 20rpx;
- border-bottom: 2rpx solid #e8e8e8;
- }
- }
-
- .type-check {
-
- .type-check-item {
- width: 100%;
- text-align: left;
- color: #333333;
- font-size: 28rpx;
- padding-bottom: 20rpx;
-
- .radio {
- padding: 0 24rpx;
-
- .radio-label {
- padding: 10rpx 0;
- }
-
- .option {
- flex-wrap: wrap;
-
- &-item {
- min-width: 120rpx;
- text-align: center;
- box-sizing: border-box;
- padding: 5rpx 40rpx;
- height: 60rpx;
- line-height: 46rpx;
- background-color: #fff;
- color: #333333;
- border: 2rpx solid #e8e8e8;
- margin-top: 16rpx;
- margin-right: 32rpx;
- }
- }
- }
- }
- }
- }
- }
- }
-
- .show {
- background-color: rgba(0, 0, 0, .5);
- z-index: 2;
- position: fixed;
- top: calc(44px + env(safe-area-inset-top) + 72rpx);
- bottom: 0;
- left: 0;
- right: 0;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/rainWaterCondition/components/rainCondition.vue b/subPackage/rainWaterCondition/components/rainCondition.vue
deleted file mode 100644
index 025aed0..0000000
--- a/subPackage/rainWaterCondition/components/rainCondition.vue
+++ /dev/null
@@ -1,432 +0,0 @@
-<template>
- <view>
- <view class="main">
- <view class="itme-box">
- <view class="h-table">
- <view class="h-tr h-tr-6 h-thead ">
- <view class="h-td column-0">序号</view>
- <view class="h-td column-1">水库名称</view>
- <view class="h-td column-2">行政区划</view>
- <view class="h-td column-3">时间</view>
- <view class="h-td column-4">时段雨量(mm)</view>
- <view class="h-td column-5">今日降雨(mm)</view>
- </view>
- <scroll-view scroll-y style="height: 67vh;width: 100%;" @scrolltolower="scrolltolower">
- <view class="h-tr h-tr-6" v-for="(item,index) in tableList" @click.stop="fold(item)"
- :key="index">
- <view class="h_box h-tr h-tr-6">
- <view class="h-td column-0">{{index+1}}</view>
- <view class="h-td column-1 name ">
- <view @click.stop="goReservoirDetail(item)">{{item.res_nm}}</view>
- </view>
- <view class="h-td column-2">{{isNull(item)}}</view>
- <view class="h-td column-3">{{item.dt}}</view>
- <view class="h-td column-4">{{isNullDrp(item.drp)}}</view>
- <view class="h-td column-5">{{isNullDrp(item.cur_drp)}}</view>
- </view>
- </view>
- </scroll-view>
- </view>
- </view>
- <u-loading-icon text="加载中" textSize="18" :show="showLoading"></u-loading-icon>
- </view>
- <u-loading-page :loading="pageLoading"></u-loading-page>
- </view>
-</template>
-
-<script>
- import {
- convertTimestampToDate,
- } from "@/utils/date"
- import mySelect from "@/components/my-components/my-select.vue"
- import {
- realTimeRainfallCondition
- } from "@/api/dataCenter/rainWaterCondition/rainWaterCondition"
- export default {
- components: {
- mySelect
- },
- props: {
- res_nm: {
- type: String,
- default: "",
- },
- region: {
- type: Object,
- default: () => {}
- },
- dropDownCondition: {
- type: Object,
- default: () => {}
- },
- basin: {
- type: Object,
- default: () => {},
- }
- },
- data() {
- return {
- //表格数据
- tableList: [],
- //分页
- pages: {
- pageNo: 1,
- pageSize: 25
- },
- showLoading: false,
- pageLoading: false,
- order: {
- orderCondition: "drp_1"
- },
- query: {},
- timeValue: "1",
- }
- },
- computed: {
- isNull() {
- return (item => {
- let region = []
- if (item.county_nm) {
- region.push(item.county_nm)
- } else {
- region.push(item.city_nm)
- }
- if (item.town_nm) {
- region.push(item.town_nm)
- }
- return region.join("-")
- })
- },
- isNullDrp() {
- return (item => {
- if (item == null) {
- return "--"
- } else {
- return item
- }
- })
- }
- },
- created() {
- let isAd = this.getAdParams(this.region)
- if (isAd) {
- this.getTableList(this.pages.pageSize, this.pages.pageNo)
- }
- },
- watch: {
- dropDownCondition: {
- handler(val) {
- if (val) {
- this.pages.pageNo = 1
-
- if (val.order.orderCondition == "drp") {
- this.order.orderCondition = "drp_" + val.query.drp
- } else {
- this.order.orderCondition = val.order.orderCondition
- }
- this.timeValue = val.query.drp
- this.getTableList(this.pages.pageSize, this.pages.pageNo)
- }
-
- }
- },
- region: {
- handler(val) {
- if (val) {
- this.getAdParams(val)
- this.pages.pageNo = 1
- this.getTableList(this.pages.pageSize, this.pages.pageNo)
- }
- }
- },
- basin: {
- handler(val) {
- if (val) {
- this.query = {
- ...this.query,
- bas_guid: `${val.name}`
- }
- this.getTableList(this.pages.pageSize, this.pages.pageNo, this.query)
- }
- }
- }
- },
- options: {
- styleIsolation: 'shared'
- },
- methods: {
- /**
- * 获取表格数据
- * @param {Number} pageSize 每页数量
- * @param {Number} pageNo 当前页
- * @param {Object} params 查询参数
- */
- getTableList(pageSize, pageNo, params = {}) {
- this.pageLoading = true
- params.res_nm = this.res_nm
- realTimeRainfallCondition(pageSize, pageNo, Object.assign(params, this.query, this.order)).then(res => {
- const drpString = this.drpStringBack()
- this.tableList = res.data.data
- this.tableList.forEach(e => {
- e.drp = e[drpString]
- if (e.drp == "") e.drp = 0
- if (e.cur_drp == "") e.cur_drp = 0
- e.dt = convertTimestampToDate(e.dt, 'MM-dd')
- })
- this.pages.pageNo = pageNo
- this.pageLoading = false
- uni.stopPullDownRefresh()
-
- })
- },
-
- /**
- * 前端过滤时段
- */
- drpStringBack() {
- return 'drp_' + this.timeValue
- },
- /**
- * 上拉加载数据
- */
- scrolltolower() {
- this.showLoading = true
- this.pages.pageNo += 1
- let params = {}
- params.res_nm = this.res_nm
- realTimeRainfallCondition(this.pages.pageSize, this.pages.pageNo, Object.assign(params, this.query, this
- .order)).then(res => {
- const drpString = this.drpStringBack()
- res.data.data.forEach(e => {
- e.drp = e[drpString]
- if (e.drp == "") e.drp = 0
- if (e.cur_drp == "") e.cur_drp = 0
- e.dt = convertTimestampToDate(e.dt, 'MM-dd')
- })
- this.showLoading = false
- this.tableList = this.tableList.concat(res.data.data)
- })
- },
- /**
- * 跳转到水库详情页
- * @param {Object} item 当前行数据
- */
- goReservoirDetail(item) {
- let data = {
- id: item.res_cd,
- name: item.res_nm
- }
- let dataStr = JSON.stringify(data)
- let url = "/subPackage/realtimeMonitor/reservoir/detail?item=" + dataStr
- this.$u.func.globalNavigator(url, "navTo")
- },
-
- // 根据行政区划返回对应行政区参数
- getAdParams(regionData) {
- let region = {}
- if (JSON.stringify(regionData) != '{}') {
- region = regionData
- } else {
- region = uni.getStorageSync("adCodeBase")
- }
- if (!region) {
- return false
- }
-
- if (region.adGrad == 1) {
- this.query.city_cd = ""
- this.query.county_cd = ""
- this.query.town_cd = ""
- } else if (region.adGrad == 2) {
- this.query.city_cd = region.adCode
- this.query.county_cd = ""
- this.query.town_cd = ""
- } else if (region.adGrad == 3) {
- this.query.county_cd = region.adCode
-
- this.query.city_cd = ""
- this.query.town_cd = ""
- } else if (region.adGrad == 4) {
- this.query.town_cd = region.adCode
-
- this.query.city_cd = ""
- this.query.county_cd = ""
- }
- return true
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- /* 引入表格样式表 */
- @import "@/subPackage/rainWaterCondition/static/style/helang-table.scss";
-
- .top {
- position: fixed;
- z-index: 5;
- background-color: #ffffff;
- margin-top: 15rpx;
- // padding: 20rpx;
- width: 100%;
-
- .query {
- display: flex;
- flex-direction: column;
- align-items: center;
-
- .query-form {
- ::v-deep .u-input__content__field-wrapper__field {
- width: 214rpx;
- height: 18rpx;
- font-size: 24rpx !important;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- }
-
- .item {
- display: flex;
- align-items: center;
- margin-bottom: 10rpx;
-
- .label {
- width: 148rpx;
- height: 22rpx;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- line-height: 28rpx;
- }
-
- .time-input {
- ::v-deep .u-input {
- width: 238rpx;
- height: 54rpx;
- background: #FFFFFF;
- border: 2rpx solid #BBBBBB;
- border-radius: 10rpx;
-
- }
- }
-
- .value {
- ::v-deep .u-input {
- width: 526rpx;
- height: 29px;
- background: #FFFFFF;
- border: 1px solid #BBBBBB;
- border-radius: 5px;
- }
- }
-
- }
- }
-
- .query-button {
- margin: 10rpx;
- width: 524rpx;
- height: 60rpx;
- background: linear-gradient(90deg, #51A4FA 0%, #5B70F7 100%);
- border-radius: 10rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
-
- .text {
- width: 49rpx;
- font-size: 23rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #FFFFFF;
- }
- }
- }
-
- }
-
- .place {
- height: 100rpx;
- }
-
- .h-table {
- .h-thead {
- color: #51A4FA;
- background-color: #E1F3FF;
- }
-
- .h-td {
- border-right-width: 0;
- font-size: 25rpx;
- }
-
- .h_box {
- display: flex;
- align-items: center;
- justify-content: space-between;
- width: 100%;
- // padding: 0 20rpx;
- }
-
- .h-tr {
- border-width: 0;
- text-align: center;
- width: 100%;
- flex-wrap: wrap;
-
- .column-0 {
- width: 10%;
- }
-
- .column-1 {
- width: 18%;
- }
-
- .column-2 {
- width: 24%;
- }
-
- .column-3 {
- width: 16%;
- }
-
- .column-4 {
- width: 16%;
- }
-
- .column-5 {
- width: 16%;
- }
-
- // .column-1 {
- // width: 20%;
- // }
-
- // .column-2 {
- // width: 25%;
- // }
-
- // .column-3 {
- // width: 15%;
- // }
-
- // .column-4 {
- // width: 18%;
- // }
-
- // .column-5 {
- // width: 22%;
- // }
- }
-
- .name {
- color: #3c9cff;
- }
-
- .differ {
- color: #ff0000
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/rainWaterCondition/components/waterCondition.vue b/subPackage/rainWaterCondition/components/waterCondition.vue
deleted file mode 100644
index 3334e99..0000000
--- a/subPackage/rainWaterCondition/components/waterCondition.vue
+++ /dev/null
@@ -1,450 +0,0 @@
-<template>
- <view>
- <view class="main">
- <view class="itme-box">
- <view class="h-table">
- <view class="h-tr h-tr-7 h-thead">
- <view class="h-td column-0">序号</view>
- <view class="h-td column-1">水库名称</view>
- <view class="h-td column-2">行政区划</view>
- <view class="h-td column-3">时间</view>
- <view class="h-td column-4">水位</view>
- <view class="h-td column-5">汛限(m)</view>
- <view class="h-td column-6">比汛限(m)</view>
- <!-- <view class="h-td" @click="showCity">行政区 <u-icon name="arrow-down" color="#2979ff" size="8">
- </u-icon>
- </view> -->
- </view>
- <scroll-view scroll-y style="height: 67vh;width: 100%;" @scrolltolower="scrolltolower">
- <view class="h-tr h-tr-7" v-for="(item,index) in tableList" :key="index">
- <view class="h_box h-tr h-tr-7">
- <view class="h-td column-0">{{index+1}}</view>
- <view class="h-td column-1 name ">
- <view @click.stop="goReservoirDetail(item)">{{item.res_nm}}</view>
- </view>
- <view class="h-td column-2">{{isNull(item)}}</view>
- <view class="h-td column-3">{{item.tm}}</view>
- <view class="h-td column-4">{{item.rz }}</view>
- <view class="h-td column-5">{{item.flse_lim_stag}}</view>
- <view class="h-td column-6" :class="item.over_z>0?'differ':''">{{item.over_z}}</view>
- </view>
- </view>
- </scroll-view>
- </view>
- </view>
- <u-loading-icon text="加载中" textSize="18" :show="showLoading"></u-loading-icon>
- </view>
- <u-loading-page :loading="pageLoading"></u-loading-page>
- </view>
-</template>
-
-<script>
- import {
- dateFormat
- } from "@/utils/date"
- import {
- realTimeWaterCondition
- } from "@/api/dataCenter/rainWaterCondition/rainWaterCondition"
- export default {
- props: {
- res_nm: {
- type: String,
- default: "",
- },
- region: {
- type: Object,
- default: () => {}
- },
- dropDownCondition: {
- type: Object,
- default: () => {}
- },
- basin: {
- type: Object,
- default: () => {},
- }
- },
- data() {
- return {
- noticeText: "总测站数95个,超堰顶测站95个",
- searchForm: {},
- tableList: [],
- isShow: false,
- pages: {
- pageNo: 1,
- pageSize: 25
- },
- showLoading: false,
- pageLoading: false,
-
- query: {},
- }
- },
- created() {
- let isAd = this.getAdParams(this.region)
- if (isAd) {
- this.getTableList(this.pages.pageSize, this.pages.pageNo)
- }
- },
- options: {
- styleIsolation: 'shared'
- },
- computed: {
- isNull() {
- return (item => {
- let region = []
- if (item.county_nm) {
- region.push(item.county_nm)
- } else {
- region.push(item.city_nm)
- }
- if (item.town_nm) {
- region.push(item.town_nm)
- }
- return region.join("-")
- })
- }
- },
- watch: {
- dropDownCondition: {
- handler(val) {
- if (val) {
- this.query = {}
- this.pages.pageNo = 1
- Object.assign(this.query, val.query)
- this.getTableList(this.pages.pageSize, this.pages.pageNo)
- }
- }
- },
- region: {
- handler(val) {
- if (val) {
- this.getAdParams(val)
- this.pages.pageNo = 1
- this.getTableList(this.pages.pageSize, this.pages.pageNo)
- }
- }
- },
- basin: {
- handler(val) {
- if (val) {
- this.query = {
- ...this.query,
- bas_cd: `${val.code}`
- }
- this.getTableList(this.pages.pageSize, this.pages.pageNo, this.query)
- }
- }
- }
- },
-
- methods: {
- showCity() {
- this.isShow = !this.isShow
- },
-
- //获取表格数据
- getTableList(pageSize, pageNo, params = {}) {
- this.pageLoading = true
- params.res_nm = this.res_nm
- realTimeWaterCondition(pageSize, pageNo, Object.assign(params, this.query)).then(res => {
- this.tableList = res.data.data
- this.tableList.forEach(e => {
- let tm = new Date(e.tm)
- let formatter = dateFormat(tm, 'MM-dd hh:mm')
- e.tm = formatter
- })
- this.pages.pageNo = pageNo
- this.pageLoading = false
- uni.stopPullDownRefresh()
- })
- },
- //上拉加载
- scrolltolower() {
- this.pages.pageNo += 1
- this.showLoading = true
- let params = {}
- params.res_nm = this.res_nm
- realTimeWaterCondition(this.pages.pageSize, this.pages.pageNo, Object.assign(params, this.query)).then(
- res => {
- let data = res.data.data
- data.forEach(e => {
- let tm = new Date(e.tm)
- let formatter = dateFormat(tm, 'MM-dd hh:mm')
- e.tm = formatter
- })
- this.showLoading = false
- this.tableList = this.tableList.concat(data)
- })
- },
-
- //跳转到水库详情页
- goReservoirDetail(item) {
- let data = {
- id: item.res_cd,
- name: item.res_nm
- }
- let dataStr = JSON.stringify(data)
- let url = "/subPackage/realtimeMonitor/reservoir/detail?item=" + dataStr
- this.$u.func.globalNavigator(url, "navTo")
- },
-
- // 根据行政区划返回对应行政区参数
- getAdParams(regionData) {
- let region = {}
-
- if (JSON.stringify(regionData) != '{}') {
- region = regionData
- } else {
- region = uni.getStorageSync("adCodeBase")
- }
- if (!region) {
- return false
- }
-
- if (region.adGrad == 1) {
- this.query.city_cd = ""
- this.query.county_cd = ""
- this.query.town_cd = ""
- } else if (region.adGrad == 2) {
- this.query.city_cd = region.adCode
- this.query.county_cd = ""
- this.query.town_cd = ""
- } else if (region.adGrad == 3) {
- this.query.county_cd = region.adCode
-
- this.query.city_cd = ""
- this.query.town_cd = ""
- } else if (region.adGrad == 4) {
- this.query.town_cd = region.adCode
-
- this.query.city_cd = ""
- this.query.county_cd = ""
- }
- return true
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- /* 引入表格样式表 */
- @import "@/subPackage/rainWaterCondition/static/style/helang-table.scss";
-
- ::v-deep .u-notice__content__text[data-v-4661e472] {
- animation-play-state: paused !important;
- // animation: null !important;
- padding: 0 !important;
- }
-
- ::v-deep .h-table .h-tr {
- flex-wrap: wrap;
- }
-
- .head {
- position: fixed;
- z-index: 5;
- background-color: #ffffff;
- margin-top: 15rpx;
- width: 100%;
- box-sizing: border-box;
-
- .query {
- display: flex;
- flex-direction: column;
- align-items: center;
-
- .query-form {
- ::v-deep .u-input__content__field-wrapper__field {
- width: 214rpx;
- height: 18rpx;
- font-size: 24rpx !important;
- font-family: PingFang SC;
- font-weight: 500;
- color: #333333;
- }
-
- .item {
- display: flex;
- align-items: center;
- margin-bottom: 10rpx;
-
- .label {
- width: 120rpx;
- height: 24rpx;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #666666;
- line-height: 28rpx;
- }
-
- .value {
- ::v-deep .u-input {
- width: 578rpx;
- height: 58rpx;
- background: #FFFFFF;
- border: 2rpx solid #BBBBBB;
- border-radius: 10rpx;
- }
- }
-
- }
- }
-
- .query-button {
- margin: 10rpx;
- width: 524rpx;
- height: 60rpx;
- background: linear-gradient(90deg, #51A4FA 0%, #5B70F7 100%);
- border-radius: 10rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
-
- .text {
- width: 49rpx;
- font-size: 23rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #FFFFFF;
- }
- }
- }
-
- .notice-bar {
- display: flex;
- align-items: center;
- background-color: #f9f9f9;
- height: 60rpx;
- padding-left: 26rpx;
-
- .img-icon {
- width: 28rpx;
- height: 28rpx;
- }
-
- .text {
- width: 344rpx;
- height: 26rpx;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #4593F2;
- line-height: 28rpx;
- flex: 1;
- margin-left: 20rpx;
- }
- }
- }
-
- .place {
- height: 100rpx;
- }
-
-
- .h-table {
- .h-thead {
- color: #51A4FA;
- background-color: #E1F3FF;
- }
-
- .h-td {
- border-right-width: 0;
- font-size: 25rpx;
- }
-
- .show_city {
- width: 100% !important;
- display: flex;
- align-items: center;
- justify-content: flex-end;
- padding: 0 26rpx;
- background: #f5f5f5;
- transition: width 150ms ease-in;
- }
-
- // .hide_city {
- // width: 0% !important;
- // background: #f5f5f5;
- // transition: width 150ms ease-in;
- // }
-
- .h_box {
- display: flex;
- align-items: center;
- justify-content: space-between;
- width: 100%;
- // padding: 0 20rpx;
- }
-
- .h-tr {
- border-width: 0;
- text-align: center;
-
- .column-0 {
- width: 10%;
- }
-
-
- .column-1 {
- width: 18%;
- }
-
- .column-2 {
- width: 15%;
- }
-
- .column-3 {
- width: 20%;
- }
-
- .column-4 {
- width: 12%;
- }
-
- .column-5 {
- width: 12%;
- }
-
- .column-6 {
- width: 13%;
- }
-
- // .column-1 {
- // width: 18%;
- // }
-
- // .column-2 {
- // width: 18%;
- // }
-
- // .column-3 {
- // width: 20%;
- // }
-
- // .column-4 {
- // width: 12%;
- // }
-
- // .column-5 {
- // width: 14%;
- // }
-
- // .column-6 {
- // width: 18%;
- // }
- }
-
- .name {
- color: #3c9cff;
- }
-
- .differ {
- color: #ff0000
- }
-
-
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/rainWaterCondition/rainWaterCondition.vue b/subPackage/rainWaterCondition/rainWaterCondition.vue
deleted file mode 100644
index 06ccb24..0000000
--- a/subPackage/rainWaterCondition/rainWaterCondition.vue
+++ /dev/null
@@ -1,568 +0,0 @@
-<template>
- <view class="container">
- <view class="customizeBar">
- <u-navbar title="雨水情监测" autoBack bgColor="#5887f9" titleStyle="color:#ffffff" leftIconColor="#ffffff"
- safeAreaInsetTop placeholder>
- </u-navbar>
- </view>
-
- <view class="tab">
- <u-tabs :itemStyle="{width: '160rpx' ,height: '88rpx' }" :activeStyle="{color: '#99bada' }" lineWidth="60"
- :current="currentIndex" :list="tabList" @click="tabClick">
- </u-tabs>
- <view class="search-place">
- <Search style="width: 100%;" placeholder='请输入水库名称' v-model="searchVal" @search="search">
- <template slot="prefix">
- <view class="prefix_wrap">
- <view class="text">
- <regionSelect :isTown="true" @regionChange="regionChange"></regionSelect>
- </view>
- <view class="icon">
- <u-icon name="arrow-down-fill" size="12"></u-icon>
- </view>
- </view>
- </template>
- <template slot='suffix'>
- <view class="prefix_wrap" style="margin-right: 20rpx;">
- <view class="text">
- <BasinSelect :code='code' @basinChange="basinChange"></BasinSelect>
- </view>
- <view class="icon">
- <u-icon name="arrow-down-fill" size="12"></u-icon>
- </view>
- </view>
- </template>
- </Search>
- </view>
- <view style="width: 100%;margin-top: 10rpx;">
- <!--水情筛选-->
- <uFilter ref="waterFilter" v-if="currentIndex==0" :top="filterTop" :menuList="waterDropDownData"
- :defaultModel="waterDefaultSelected" @submit='waterDropDownConfirm' @reset="waterResetDropDown">
- </uFilter>
-
- <!--雨情筛选-->
- <uFilter ref="rainFilter" v-if="currentIndex==1" :top="filterTop" :menuList="rainDropDownData"
- :defaultModel="rainDefaultSelected" @submit='rainDropDownConfirm' @reset="rainResetDropDown">
- </uFilter>
-
- </view>
- </view>
-
- <view style="height: 260rpx;"></view>
- <view class="main">
- <waterCondition :res_nm='searchVal' :basin='basin' :region="region"
- :dropDownCondition="waterDropDownCondtion" ref="waterCondition" v-if="currentIndex==0">
- </waterCondition>
- <rainCondition :timeValue="timeValue" :basin='basin' :region="region" :res_nm='searchVal'
- :dropDownCondition="rainDropDownCondtion" ref="rainCondition" v-if="currentIndex==1">
- </rainCondition>
- </view>
-
- <my-select v-if="timeVisible" :show="timeVisible" type="radio" v-model="timeValueCopy" popupTitle="请选择统计时段"
- :dataLists="selectTimeList" @cancel="timeVisible=false" @submit="timeSelect">
- </my-select>
- </view>
-</template>
-
-<script>
- import uFilter from "@/subPackage/rainWaterCondition/components/filterBar.vue"
- import regionSelect from "@/components/my-components/regionSelect.vue"
- import rainCondition from "@/subPackage/rainWaterCondition/components/rainCondition.vue"
- import waterCondition from "@/subPackage/rainWaterCondition/components/waterCondition.vue"
- import Search from "@/components/my-components/search.vue"
- import mySelect from "@/components/my-components/my-select.vue"
- import BasinSelect from '@/components/my-components/basinSelect.vue'
- import {
- bizDictionary
- } from "@/api/system/dict"
- export default {
- components: {
- rainCondition,
- waterCondition,
- Search,
- mySelect,
- regionSelect,
- uFilter,
- BasinSelect
- },
- data() {
- return {
- currentIndex: 0,
- tabList: [{
- name: "水情信息"
- },
- {
- name: "雨情信息"
- },
- ],
- title: "水情",
- timeTitle: "1小时",
- pages: {
- pageSize: 25,
- pageNo: 1
- },
- timeVisible: false,
- timeValue: "1",
- timeValueCopy: "1",
- selectTimeList: [{
- name: "1小时",
- value: "1"
- },
- {
- name: "3小时",
- value: "3"
- },
- {
- name: "6小时",
- value: "6"
- },
- {
- name: "12小时",
- value: "12"
- },
- {
- name: "24小时",
- value: "24"
- }
- ],
- visible: false,
- value: "0",
- searchVal: "",
- selectList: [{
- name: "水情",
- value: "0"
- },
- {
- name: "雨情",
- value: "1"
- },
- ],
- region: {},
- adCodeBase: uni.getStorageSync("adCodeBase"),
- code: '',
- waterDropDownCondtion: {},
- waterDropDownData: [{
- label: '排序',
- type: 'line',
- prop: "sort",
- children: [{
- label: "比汛限降序",
- value: "比汛限降序"
- }]
- },
- {
- label: '筛选',
- type: 'check',
- prop: "filter",
- children: [{
- label: "溢洪道是否有闸",
- type: "radio",
- prop: "gate",
- option: [{
- label: "全部",
- value: ''
- },
- {
- label: "有闸",
- value: '1'
- },
- {
- label: "无闸",
- value: '2'
- },
- {
- label: "其他",
- value: '0'
- }
- ],
- },
- {
- label: "是否病险",
- type: "radio",
- prop: "is_danger",
- option: [{
- label: "全部",
- value: ""
- },
- {
- label: "是",
- value: "true",
- },
- {
- label: "否",
- value: "false"
- },
- ]
- },
- {
- label: "是否视频",
- type: "radio",
- prop: "is_video",
- option: [{
- label: "全部",
- value: ""
- },
- {
- label: "有",
- value: "1",
- },
- {
- label: "无",
- value: "0"
- },
- ]
- },
- {
- label: "测站类型",
- type: "radio",
- prop: "flag",
- option: [{
- label: "全部",
- value: ''
- },
- {
- label: "物联网",
- value: '物联网'
- },
- {
- label: "老库",
- value: '老库'
- },
- {
- label: "水文",
- value: '水文'
- }
- ]
- },
- {
- label: "工程规模",
- type: "checkbox",
- prop: "eng_scal",
- option: [{
- label: "大(1)型",
- value: "'大(1)型'",
- },
- {
- label: "大(2)型",
- value: "'大(2)型'"
- },
- {
- label: "中型",
- value: "'中型'"
- },
- {
- label: "小(1)型",
- value: "'小(1)型'"
- },
- {
- label: "小(2)型",
- value: "'小(2)型'"
- },
- ]
- },
- {
- label: "标签",
- type: "checkbox",
- prop: "label",
- option: []
- },
- {
- label: "水位状态",
- type: "checkbox",
- prop: "riverStatus",
- option: [{
- label: "超汛限水位",
- value: 'is_over_z'
- },
- {
- label: "低于死水位",
- value: 'is_over_dead'
- },
- {
- label: "超校核水位",
- value: 'is_over_chec'
- },
- {
- label: "超设计水位",
- value: 'is_over_des'
- },
- {
- label: "低于校核水位",
- value: 'is_low_chec'
- },
- {
- label: "低于设计水位",
- value: 'is_low_des'
- }
- ],
- }
- ]
- },
-
- ],
- waterDefaultSelected: {},
-
- rainDropDownCondtion: {},
-
- rainDropDownData: [{
- label: "排序",
- prop: "drpSort",
- type: "line",
- children: [{
- label: "按今日雨量降序",
- value: "cur_drp"
- },
- {
- label: "按时段雨量降序",
- value: "drp"
- },
- ]
- },
- {
- label: "筛选",
- prop: "drp",
- type: "line",
- children: [{
- label: "1小时",
- value: "1"
- },
- {
- label: "3小时",
- value: "3",
- },
- {
- label: "6小时",
- value: "6"
- },
- {
- label: "12小时",
- value: "12"
- },
- {
- label: "24小时",
- value: "24"
- },
- ]
- }
- ],
-
- rainDefaultSelected: {
- drpSort: "drp",
- drp: "1"
- },
- basin: {},
-
-
- }
- },
- onPullDownRefresh() {
- //雨情
- if (this.currentIndex == 1) {
- this.$nextTick(() => {
- this.$refs.rainCondition.getTableList(this.pages.pageSize, this.pages.pageNo)
- })
- } else {
- //水情
- this.$nextTick(() => {
- this.$refs.waterCondition.getTableList(this.pages.pageSize, this.pages.pageNo)
- })
- }
- },
- computed: {
- filterTop() {
- const info = uni.getWindowInfo()
- const statusBar = info.statusBarHeight
- return 108 - (statusBar / 2)
- }
- },
- created() {
- if (this.adCodeBase.adGrad == 1) {
- this.code = ''
- } else {
- this.code = this.adCodeBase.adCode
- }
- },
- mounted() {
- this.initDict()
- },
- methods: {
- initDefault() {
- this.waterDefaultSelected = {
- gate: "",
- is_danger: "",
- is_video: "",
- flag: "",
- sort: "比汛限降序",
- }
- },
- initDict() {
- bizDictionary({
- code: "RES_LABEL"
- }).then(res => {
- this.initDefault()
- let data = res.data
- let obj = this.waterDropDownData[1].children.find(e => e.label == "标签")
- data.forEach(e => {
- obj.option.push({
- label: e.dictValue,
- value: `'${e.dictKey}'`
- })
- })
- })
-
- },
-
- waterDropDownConfirm(data) {
- this.waterDropDownCondtion = {}
-
- let params = {}
- let typeArr = ['is_over_z', 'is_over_dead', 'is_over_chec', 'is_over_des', 'is_low_chec',
- 'is_low_des'
- ]
- for (let key in data) {
- if (data[key] instanceof Array && data[key].length > 0) {
- if (key != 'riverStatus') {
- params[key] = data[key].join(",")
- } else {
- typeArr.forEach(item => {
- let flag = data[key].some(i => item == i)
- if (flag) {
- params[item] = 1
- }
- // else {
- // if (item in data) delete params[item]
- // }
- })
- // delete data['riverStatus']
- }
- } else if (!(data[key] instanceof Array)) {
- params[key] = data[key]
- }
- }
- this.waterDropDownCondtion = {
- query: {
- ...params
- },
- }
- },
- waterResetDropDown() {
- this.waterDefaultSelected = {
- gate: "",
- is_danger: "",
- is_video: "",
- flag: "",
- sort: "比汛限降序",
- }
- this.waterDropDownCondtion = {
- query: {
- ...this.waterDefaultSelected
- }
- }
- },
- rainDropDownConfirm(data) {
- this.rainDropDownCondtion = {
- query: {
- drp: data.drp
- },
- order: {
- orderCondition: data.drpSort
- }
- }
- },
- rainResetDropDown() {
-
- },
- tabClick(item) {
- this.currentIndex = item.index
- if (this.currentIndex == 0) {
- this.$refs.waterFilter.hideOverLay()
- } else {
- this.$refs.rainFilter.hideOverLay()
- }
-
- },
- timeSelect(item) {
- this.timeTitle = item.name
- this.timeValue = item.value
- this.timeVisible = false
- },
- search(e) {
- this.bindTable()
- },
- bindTable() {
- this.pages = {
- pageSize: 25,
- pageNo: 1
- }
- this.$refs.waterCondition && this.$refs.waterCondition.getTableList(this.pages.pageSize, this.pages.pageNo)
- this.$refs.rainCondition && this.$refs.rainCondition.getTableList(this.pages.pageSize, this.pages.pageNo)
- },
- selectSubmit(e) {
- this.title = e.name
- this.currentIndex = e.value
- this.visible = false
- },
- regionChange(region) {
- this.region = region
- this.code = region.adCode
- console.log(this.region, 'region')
- },
- basinChange(basin) {
- this.basin = basin
- console.log(basin, '===')
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- .container {
- // min-height: 100vh;
- overflow: hidden;
-
- // .customizeBar {
- // height: 88rpx;
- // }
-
- .tab {
- display: flex;
- flex-direction: column;
- justify-content: space-evenly;
- width: 100%;
- position: fixed;
- background-color: #ffffff;
- z-index: 2;
- align-items: center;
- padding-bottom: 20rpx;
-
- .search-place {
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-
- .prefix_wrap {
- display: flex;
- align-items: center;
- min-width: 120rpx;
- justify-content: center;
- flex-shrink: 0;
- // padding: 0 20rpx;
-
- .text {
- margin-left: 20rpx;
- color: #333333;
- font-family: PingFang-SC-Medium;
- font-size: 30rpx;
- }
-
- .img-icon {
- display: flex;
- width: 22rpx;
- height: 18rpx;
- }
- }
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/rainWaterCondition/static/style/helang-table.scss b/subPackage/rainWaterCondition/static/style/helang-table.scss
deleted file mode 100644
index bd737cb..0000000
--- a/subPackage/rainWaterCondition/static/style/helang-table.scss
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * uni-app 表格样式表
-*/
-
-.h-table{
- /* 行 */
- .h-tr{
- box-sizing: border-box;
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- justify-content: flex-start;
- align-items: stretch;
- align-content: center;
-
- border-color: #ccc;
- border-style: solid;
- border-width: 0;
- border-top-width: 1px;
- border-left-width: 1px;
- border-bottom-width: 1px;
- color: #333;
-
- /* 等比分列,1-6列 */
- @for $i from 1 through 6
- {
- &-#{$i}{
- >.h-td{
- width:(100% / $i);
- }
- }
- }
-
- + .h-tr{
- border-top-style: none;
- }
- }
- /* 单元格 */
- .h-td{
- box-sizing: border-box;
- padding: 3px;
- word-break:break-all;
- border-color: #ccc;
- border-style: solid;
- border-width: 0;
- border-right-width: 1px;
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- justify-content: center;
- align-items: center;
- align-content: center;
- min-height: 64rpx;
-
- /* 跨列 */
- &-colspan{
- flex-grow: 1;
- width:0;
- }
-
- &-rowspan{
- // border: none;
- border-right-width: 0;
- padding: 0 !important;
- flex-wrap: wrap !important;
-
- >.h-tr{
- width: 100%;
- border-width: 0;
-
- .h-td{
- border-right-width: 1px;
- }
-
- & + .h-tr{
- border-top-width: 1px;
- border-top-style: solid;
- }
- }
- }
-
- /* 内容顶部对齐 */
- &-top{
- align-items: flex-start;
- align-content:flex-start;
- }
- /* 内容底部对齐 */
- &-bottom{
- align-items: flex-end;
- align-content:flex-end;
- }
- /* 内容左边对齐 */
- &-left{
- justify-content: flex-start;
- }
- /* 内容右边对齐 */
- &-right{
- justify-content: flex-end;
- }
- }
- /* 表头 */
- .h-thead{
- background-color: #e6e6e6;
- }
-
- /* 表格虚线 */
- &-dashed{
- .h-tr{
- border-top-style: dashed;
- border-left-style: dashed;
- border-bottom-style: dashed;
- }
- .h-td{
- border-right-style: dashed;
- }
-
- .h-td-rowspan{
- .h-tr + .h-tr{
- border-top-style: dashed;
- }
- }
- }
-
- /* 表格主题 Map,颜色摘自 Bootstrap */
- $theme-table:(
- primary:(
- color:#fff,
- bgColor:#337ab7,
- border:#2e6da4
- ),
- success:(
- color:#fff,
- bgColor:#5cb85c,
- border:#4cae4c
- ),
- info:(
- color:#fff,
- bgColor:#5bc0de,
- border:#46b8da
- ),
- warning:(
- color:#fff,
- bgColor:#f0ad4e,
- border:#eea236
- ),
- danger:(
- color:#fff,
- bgColor:#d9534f,
- border:#d43f3a
- )
- );
-
- /* 生成主题代码 */
- $theme-table-keys:map-keys($theme-table);
- @each $k in $theme-table-keys {
- $item:map-get($theme-table,$k);
- &-#{$k}{
- .h-tr{
- border-top-color: map-get($item,border);
- border-left-color: map-get($item,border);
- border-bottom-color: map-get($item,border);
- color: map-get($item,bgColor);
- }
- .h-td{
- border-right-color: map-get($item,border);
-
- }
- .h-thead{
- background-color: map-get($item,bgColor);
- color: map-get($item,color);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/basicInfo.vue b/subPackage/realtimeMonitor/components/basicInfo.vue
deleted file mode 100644
index efdb128..0000000
--- a/subPackage/realtimeMonitor/components/basicInfo.vue
+++ /dev/null
@@ -1,673 +0,0 @@
-<template>
- <view>
- <view class="tab">
- <u-tabs :itemStyle="{width: '200rpx' ,height: '88rpx' }" :activeStyle="{color: '#99bada' }" lineWidth="60"
- :current="currentIndex" :list="tabList" @click="tabClick">
- </u-tabs>
- </view>
- <view class="main">
- <view class="jbzl" v-if="currentIndex == 0">
- <view class="basic-infomation">
- <u-row>
- <u-col span="12">
- <view class="item text_area">
- <view class="text_area_title">
- 行政区划:<text class="text">{{currentReservoir.region}}</text>
- </view>
- <view class="text_icon">
- <u-icon name="map" color="#2979ff" size="28"></u-icon>
- </view>
- </view>
- </u-col>
- </u-row>
- <u-row justify='space-evenly'>
- <u-col span="5.9" textAlign="center">
- <view class="item">
- <view class="left">
- <view class="up">
- <text class="text">工程规模:</text>
- </view>
- <view class="down">
- <text class="text">{{currentReservoir.scale || '--'}}</text>
- </view>
- </view>
- <view class="right">
- <image :src="imgList.gcgm" class="img-icon"></image>
- </view>
- </view>
- </u-col>
-
- <u-col span="5.9" textAlign="center">
- <view class="item">
- <view class="left">
- <view class="up">
- <text class="text">集雨面积:</text>
- </view>
- <view class="down">
- <text class="text">{{currentReservoir.rainArea || '--'}}km²</text>
- </view>
- </view>
- <view class="right">
- <image :src="imgList.jymj" class="img-icon"></image>
- </view>
- </view>
- </u-col>
- </u-row>
-
- <u-row justify='space-evenly'>
- <u-col span="5.9">
-
- <view class="item">
- <view class="left">
- <view class="up">
- <text class="text">死水位:</text>
- </view>
- <view class="down">
- <text class="text">{{currentReservoir.deadSw || '--'}}m</text>
- </view>
- </view>
- <view class="right">
- <image :src="imgList.ssw" class="img-icon"></image>
- </view>
- </view>
-
-
- </u-col>
- <u-col span="5.9">
-
- <view class="item">
- <view class="left">
- <view class="up">
- <text class="text">正常蓄水位:</text>
- </view>
- <view class="down">
- <text class="text">{{currentReservoir.normalSw || '--'}}m</text>
- </view>
- </view>
- <view class="right">
- <image :src="imgList.zcxsw" class="img-icon"></image>
- </view>
- </view>
-
-
- </u-col>
- </u-row>
- <u-row justify='space-evenly'>
- <u-col span="5.9">
-
- <view class="item">
- <view class="left">
- <view class="up">
- <text class="text">设计洪水位:</text>
- </view>
- <view class="down">
- <text class="text">{{currentReservoir.designSw || '--'}}m</text>
- </view>
- </view>
- <view class="right">
- <image :src="imgList.sjhsw" class="img-icon"></image>
- </view>
- </view>
-
-
-
- </u-col>
- <u-col span="5.9">
-
- <view class="item">
- <view class="left">
- <view class="up">
- <text class="text">校核洪水位:</text>
- </view>
- <view class="down">
- <text class="text">{{currentReservoir.verifySw || '--'}}m</text>
- </view>
- </view>
- <view class="right">
- <image :src="imgList.jhhsw" class="img-icon"></image>
- </view>
- </view>
-
- </u-col>
- </u-row>
- <u-row justify='space-evenly'>
- <u-col span="5.9">
-
- <view class="item">
- <view class="left">
- <view class="up">
- <text class="text">总库容:</text>
- </view>
- <view class="down">
- <text class="text">{{currentReservoir.sumKr || '--'}}万m³</text>
- </view>
- </view>
- <view class="right">
- <image :src="imgList.zkr" class="img-icon"></image>
- </view>
- </view>
-
-
- </u-col>
- <u-col span="5.9">
-
- <view class="item">
- <view class="left">
- <view class="up">
- <text class="text">调洪库容:</text>
- </view>
- <view class="down">
- <text class="text">{{currentReservoir.floodRegulationKr || '--'}}万m³</text>
- </view>
- </view>
- <view class="right">
- <image :src="imgList.dhkr" class="img-icon"></image>
- </view>
- </view>
-
- </u-col>
- </u-row>
- <u-row justify='space-evenly'>
- <u-col span="5.9">
-
- <view class="item">
- <view class="left">
- <view class="up">
- <text class="text">防洪库容:</text>
- </view>
- <view class="down">
- <text class="text">{{currentReservoir.againstKr || '--'}}万m³</text>
- </view>
- </view>
- <view class="right">
- <image :src="imgList.fhkr" class="img-icon"></image>
- </view>
- </view>
-
-
- </u-col>
- <u-col span="5.9">
-
- <view class="item">
- <view class="left">
- <view class="up">
- <text class="text">兴利库容:</text>
- </view>
- <view class="down">
- <text class="text">{{currentReservoir.workKr || '--'}}万m³</text>
- </view>
- </view>
- <view class="right">
- <image :src="imgList.xlkr" class="img-icon"></image>
- </view>
- </view>
-
-
- </u-col>
- </u-row>
- <u-row justify='space-evenly'>
- <u-col span="5.9">
- <view class="item">
- <view class="left">
- <view class="up">
- <text class="text">死库容:</text>
- </view>
- <view class="down">
- <text class="text">{{currentReservoir.deadKr || '--'}}万m³</text>
- </view>
- </view>
- <view class="right">
- <image :src="imgList.skr" class="img-icon"></image>
- </view>
- </view>
- </u-col>
- <u-col span="5.9">
- <view class="item">
- <view class="left">
- <view class="up">
- <text class="text">汛限水位:</text>
- </view>
- <view class="down">
- <text class="text">{{currentReservoir.mid_flood_flse_stag || '--'}}m</text>
- </view>
- </view>
- <view class="right">
- <image :src="imgList.xxsw" class="img-icon"></image>
- </view>
- </view>
- </u-col>
- </u-row>
- <u-row justify='space-evenly'>
- <u-col span="5.9">
- <view class="item">
- <view class="left">
- <view class="up">
- <text class="text">防洪高水位:</text>
- </view>
- <view class="down">
- <text class="text">{{currentReservoir.tb_flpr_high_stag || '--'}}m</text>
- </view>
- </view>
- <view class="right">
- <image :src="imgList.fhgsw" class="img-icon"></image>
- </view>
- </view>
- </u-col>
- <u-col span="5.9">
- <view class="item">
- <view class="left">
- <view class="up">
- <text class="text">坝顶高程:</text>
- </view>
- <view class="down">
- <text class="text">{{currentReservoir.tb_dam_top_elevation || '--'}}m</text>
- </view>
- </view>
- <view class="right">
- <image :src="imgList.bdgc" class="img-icon"></image>
- </view>
- </view>
- </u-col>
- </u-row>
- <u-row justify='space-evenly'>
- <u-col span="5.9">
- <view class="item">
- <view class="left">
- <view class="up">
- <text class="text">控制运行水位:</text>
- </view>
- <view class="down">
- <text class="text">{{currentReservoir.tb_control_z || '--'}}m</text>
- </view>
- </view>
- <view class="right">
- <image :src="imgList.kzyxsw" class="img-icon"></image>
- </view>
- </view>
- </u-col>
- <u-col span="5.9">
-
- </u-col>
- </u-row>
- </view>
- <!-- <view class="select">
- <view class="db" @click="navigatorDbDetail"><span class="text">大坝</span> </view>
- <view class="yhd" @click="navigatorYhdDetail">溢洪道</view>
- </view> -->
- </view>
-
- <view v-if="currentIndex == 1">
- <!-- </u-empty> -->
- <u-empty v-if='!currentReservoir.summary' textSize='24rpx' textColor='#BBBBBB' text="暂无工程概况"
- :icon="imgList.gcgk">
- </u-empty>
- <view v-else class="gcgk_text">
- {{currentReservoir.summary}}
- </view>
- <!-- 暂无工程概况 -->
- </view>
-
- <view class="swkrqx" v-if="currentIndex == 2">
- <echart initId="kr" :option="krOption"></echart>
- <view class="list">
- <view class="itme-box">
- <view class="h-table">
- <view class="h-tr h-tr-2 h-thead ">
- <view class="h-td">水位(m)</view>
- <view class="h-td">库容(万m³)</view>
- <!-- <view class="h-td">面积(km²)</view> -->
- </view>
-
- <view class="h-tr h-tr-2" v-for="(item,index) in tableList" :key="index">
- <view class="h-td">{{item.sw ===0?0:(item.sw?item.sw:'--')}}</view>
- <view class="h-td">{{item.kr ===0?0:(item.kr?item.kr:'--')}}</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
-
- </view>
-</template>
-
-<script>
- import {
- getReservoirSwKrLine,
- reservoirDetail,
- getReservoirBasicInfo
- } from "@/api/dataCenter/reservoir/reservoir.js"
- import echart from "@/components/echart/echart.vue"
- export default {
- components: {
- echart
- },
- props: ['reservoirId'],
- data() {
- return {
- imgList: {
- gcgm: require("../static/img/reservoirImg/gcgm.png"),
- jymj: require("../static/img/reservoirImg/jymj.png"),
- ssw: require("../static/img/reservoirImg/ssw.png"),
- zkr: require("../static/img/reservoirImg/zkr.png"),
- zcxsw: require("../static/img/reservoirImg/zcxsw.png"),
- sjhsw: require("../static/img/reservoirImg/sjhsw.png"),
- jhhsw: require("../static/img/reservoirImg/jhhsw.png"),
- dhkr: require("../static/img/reservoirImg/dhkr.png"),
- fhkr: require("../static/img/reservoirImg/fhkr.png"),
- xlkr: require("../static/img/reservoirImg/xlkr.png"),
- skr: require("../static/img/reservoirImg/skr.png"),
- xxsw: require("../static/img/reservoirImg/xxsw.png"),
- fhgsw: require("../static/img/reservoirImg/fhgsw.png"),
- bdgc: require("../static/img/reservoirImg/bdgc.png"),
- kzyxsw: require("../static/img/reservoirImg/kzyxsw.png"),
-
- gcgk: require("../static/img/reservoirImg/gcgk.png"),
- },
- currentIndex: 0,
- textSize: "14",
- tabList: [{
- name: "基本资料"
- },
- {
- name: "工程概况"
- },
- {
- name: "水位库容曲线"
- }
- ],
- currentReservoir: {},
- krOption: {},
- krData: {},
- tableList: [],
- }
- },
- created() {
- this.getReservoirInfomation()
- this.loadKrData()
- },
- methods: {
- tabClick(item) {
- this.currentIndex = item.index
- },
-
- async getReservoirInfomation() {
- const res = await reservoirDetail({
- res_cd: this.reservoirId
- })
- let data = res.resultList[0]
- this.currentReservoir = {
- region: data.res_loc.split("-").join(""),
- scale: data.eng_scal,
- rainArea: "",
- deadSw: "",
- normalSw: "",
- designSw: "",
- verifySw: "",
- sumKr: "",
- floodRegulationKr: "",
- againstKr: "",
- workKr: "",
- deadKr: "",
- summary: data.summary
- }
-
- const res1 = await getReservoirBasicInfo({
- res_cd: this.reservoirId
- })
- let info = res1.data[0]
- this.currentReservoir.deadSw = info.tb_dead_stag
- this.currentReservoir.normalSw = info.tb_norm_pool_stag
- this.currentReservoir.designSw = info.tb_des_fl_stag
- this.currentReservoir.verifySw = info.tb_chec_fl_stag
- this.currentReservoir.sumKr = info.tot_cap
- this.currentReservoir.floodRegulationKr = "--"
- this.currentReservoir.againstKr = info.flco_cap
- this.currentReservoir.workKr = info.ben_res_cap
- this.currentReservoir.deadKr = info.dead_cap
- this.currentReservoir.mid_flood_flse_stag = info.mid_flood_flse_stag
- this.currentReservoir.tb_flpr_high_stag = info.tb_flpr_high_stag
- this.currentReservoir.tb_dam_top_elevation = info.tb_dam_top_elevation
- this.currentReservoir.tb_control_z = info.tb_control_z
- },
- async loadKrData() {
- const res = await getReservoirSwKrLine({
- res_guid: this.reservoirId
- })
- let data = res.data
- this.krData = {
- sw: [],
- kr: []
- }
- this.tableList = []
- data.sort((a, b) => a.stag - b.stag)
- data.forEach(e => {
- this.krData.sw.push(e.stag)
- this.krData.kr.push(e.cap)
- this.tableList.push({
- sw: e.stag,
- kr: e.cap
- })
- })
- this.initKrOption(this.krData)
- },
- initKrOption(data) {
- this.krOption = {
- // tooltip: {
- // trigger: 'axis',
- // axisPointer: {
- // type: 'cross',
- // crossStyle: {
- // color: '#999'
- // }
- // },
- // formatter: function(params) {
- // console.log(params, "paramsssss")
- // var result = '水位:' + params[0].name + '(m)\n库容:' + params[0].value + '(10⁴m³)'
- // return result
- // }
- // },
- xAxis: [{
- type: 'value',
- name: '库容(10⁴m³)',
- boundaryGap: false,
- axisPointer: {
- type: 'shadow',
- },
- minInterval: 20,
- }],
- yAxis: [{
- type: 'category',
- name: '水位(m)',
- nameTextStyle: {
- fontSize: 14,
- vertivalAlign: "middle",
- padding: [0, 26, 0, 0]
- },
- min: (val) => {
- return val.min
- },
- max: (val) => {
- return val.max
- },
- axisLine: {
- show: true
- },
- data: data.sw
- }],
- series: [{
- name: '水位',
- type: 'line',
- smooth: true,
- symbol: 'none',
- itemStyle: {
- color: "#aecf89",
- },
- data: data.kr,
- }],
- grid: {
- right: "25%",
- bottom: "10%",
- left: "15%"
- }
- }
- },
- navigatorDbDetail() {
- let itemStr = JSON.stringify(this.currentReservoir)
- let url = "/subPackage/realtimeMonitor/reservoir/dbDetail?item=" + itemStr
- this.$u.func.globalNavigator(url, "navTo")
-
- },
- navigatorYhdDetail() {
- let itemStr = JSON.stringify(this.currentReservoir)
- let url = "/subPackage/realtimeMonitor/reservoir/yhdDetail?item=" + itemStr
- this.$u.func.globalNavigator(url, "navTo")
- }
- }
- }
-</script>
-
-<style lang="scss" scoped>
- ::v-deep .u-row {
- padding: 4rpx 0;
- }
-
- /* 引入表格样式表 */
- @import "@/subPackage/rainWaterCondition/static/style/helang-table.scss";
-
- .main {
- // background-color: #f9f9fa;
- padding: 0 !important;
- margin: 0 !important;
-
- .gcgk {
- padding: 132rpx 0;
- }
-
- .gcgk_text {
- background: #fff;
- padding: 40rpx 0;
- text-indent: 1em;
- }
-
- .h-table {
- .h-tr {
- border: 0 !important;
- }
-
- .h-td {
- font-size: 26rpx;
-
- border: 0 !important;
- }
-
- .h-thead {
- background-color: #E1F3FF;
- color: #51A4FA;
- font-size: 26rpx;
- font-weight: 700;
- }
- }
-
- }
-
- .jbzl {
- .basic-infomation {
- background-color: #fbfbfb;
- margin-bottom: 50rpx;
-
- .text_area {
- height: 100rpx !important;
- background-color: red;
- padding: 4rpx 0;
- display: flex;
- align-items: center;
- margin: 0 !important;
- width: 100% !important;
-
- .text_area_title {
- color: #BBBBBB;
- flex: 3;
- text-align: center;
- font-size: 30rpx;
-
- .text {
- color: #333333;
- }
- }
-
- .text_icon {
- flex: 1;
- display: flex;
- justify-content: center;
- }
- }
-
- .item {
- height: 166rpx;
- // width: 340rpx;
- display: flex;
- background-color: #ffffff;
- margin: 1rpx 0 1rpx 1rpx;
-
- .left {
- flex: 2;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
-
- .down {
- padding-top: 12rpx;
- }
- }
-
- .right {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: center;
-
- .img-icon {
- width: 60rpx;
- height: 54rpx;
- }
- }
- }
- }
-
- .select {
- display: flex;
- align-items: center;
- justify-content: space-evenly;
-
- .db {
- width: 354rpx;
- height: 200rpx;
- color: #1E8B83;
- font-weight: 700;
- background: url("../static/img/reservoirImg/db.png") no-repeat;
- background-position: 100% 100%;
- background-size: contain;
- }
-
- .yhd {
- width: 354rpx;
- height: 200rpx;
- color: #648ABB;
- font-weight: 700;
- background: url("../static/img/reservoirImg/yhd.png") no-repeat;
- background-position: 100% 100%;
- background-size: contain;
- }
-
- .text {
- padding: 30rpx 0 0 28rpx;
- }
- }
-
-
-
-
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/boxTitle.vue b/subPackage/realtimeMonitor/components/boxTitle.vue
deleted file mode 100644
index 38e4200..0000000
--- a/subPackage/realtimeMonitor/components/boxTitle.vue
+++ /dev/null
@@ -1,72 +0,0 @@
-<template>
- <div class="box-title-container flex j-c-s-b">
- <div class="title-name">
- {{ title }}
- </div>
-
- <div class="region-more">
- <div class="region">
- <slot name="region"></slot>
- </div>
- <div class="more">
- <slot name="more"></slot>
- </div>
- </div>
- </div>
-</template>
-
-<script>
- export default {
- name: 'BoxTitle',
- props: {
- title: {
- type: String,
- default: ''
- }
- }
- }
-</script>
-
-<style lang="scss" scoped>
- .box-title-container {
- height: 36px;
- line-height: 36px;
-
- .title-name {
- padding-left: 10px;
- position: relative;
- font-size: 20px;
- font-family: Microsoft YaHei-Bold, Microsoft YaHei;
- font-weight: bold;
- color: #333333;
-
- &::after {
- content: '';
- position: absolute;
- top: 50%;
- left: 0;
- width: 4px;
- height: 18px;
- background: #1890FF;
- border-radius: 2px 2px 2px 2px;
- opacity: 1;
- transform: translate(0, -50%);
- }
- }
-
- .region {
- font-size: 20px;
- font-family: Alibaba PuHuiTi-Bold, Alibaba PuHuiTi;
- font-weight: bold;
- color: #333333;
- }
-
- .more {
- font-size: 15px;
- font-family: Microsoft YaHei-Regular, Microsoft YaHei;
- font-weight: 400;
- color: #1890FF;
- cursor: pointer;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/filterBar.vue b/subPackage/realtimeMonitor/components/filterBar.vue
deleted file mode 100644
index 15073e3..0000000
--- a/subPackage/realtimeMonitor/components/filterBar.vue
+++ /dev/null
@@ -1,519 +0,0 @@
-<template>
- <view class="filterBar">
- <view class="wrap flex f-a-i" :style="{'--top':`${top}rpx`}">
- <view class="wrap-item flex f-a-i f-d-c" v-for="(item,index) in menu" :key="index"
- :class="[item.selected?'active':'']">
- <view class="wrap-item-box flex f-a-i" @click='select(item,index)'>
- <view class="label">
- {{item.label}}
- </view>
- <view class="item-icon" :class="[item.selected?'selected-item-icon':'']">
- <u-icon color='' size='10' name="arrow-down-fill"></u-icon>
- </view>
- </view>
- <view :class="[item.selected?'wrap-item-box-child':'']" :style="{top:calcTop}"
- class="wrap-item-box-child-default">
- <scroll-view scroll-y="true" class="scroll-Y">
- <view class="type-line" v-if="item.type=='line'">
- <view class="type-line-item flex f-a-i" v-for="(cItem,cIndex) in item.children"
- :key="cIndex" @click='lineSelect(item,cItem,index,cIndex)'>
- <view :class="[cItem.selected?'active':'']" class="type-label">{{cItem.label}}
- </view>
- <u-icon v-if="cItem.selected" color='#1180ff' size='16' name="checkbox-mark"></u-icon>
- </view>
- </view>
- <view class="type-check" v-if="item.type=='check'">
- <view class="type-check-item" v-for="(cItem,cIndex) in item.children" :key="cIndex">
- <!-- 单选 -->
- <view class="radio" v-if="cItem.type =='radio'">
- <view class="radio-label">{{cItem.label}}</view>
- <view class="option flex f-a-i">
- <view class="option-item" v-for="(c_clItem,c_clIndex) in cItem.option"
- :key="c_clIndex" :class="{'check_active':c_clItem.selected}"
- @click='radioSelect(cItem,c_clItem)'>{{c_clItem.label}}</view>
-
- </view>
- </view>
- <!-- 多选 -->
- <view class="type-label radio" v-else>
- <view class="radio-label">{{cItem.label}}</view>
- <view class="option flex f-a-i">
- <view class="option-item" :class="{'check_active':c_clItem.selected}"
- v-for="(c_clItem,c_clIndex) in cItem.option" :key="c_clIndex"
- @click='radioCheckSelect(cItem,c_clItem)'>{{c_clItem.label}}</view>
- </view>
- </view>
- </view>
- </view>
- </scroll-view>
- <view class="btn-box flex f-a-i" v-if="item.type=='check'">
- <view class="reset" @click="resetFilterData(index)">重置</view>
- <view class="submit" @click="setFilterData(item)">确定</view>
- </view>
- </view>
- </view>
- </view>
- <view :class="[showOver?'show':'']" :style="{top:calcShadow}" @click="hideOverLay"></view>
- </view>
-</template>
-
-<script>
- export default {
- name: "uFilter",
- props: {
- menuList: {
- type: Array,
- required: true,
- default: () => []
- },
- defaultModel: {
- type: Object,
- required: true,
- default: () => {}
- },
- top: {
- type: Number,
- default: 0
- },
- shadowTip: {
- type: Number,
- default: 36
- }
- },
- data() {
- return {
- //显示遮罩层
- showOver: false,
- //数据值
- model: {},
- lineLabel: "",
- menu: [],
- }
- },
- computed: {
- calcTop() {
- const info = uni.getWindowInfo()
- const windowTop = info.windowTop
- const safeToTop = info.safeAreaInsets.top
- const top = (windowTop + safeToTop + 36 - 8 + (this.top * 2)) + "rpx"
- // return {
- return top
- // }
- },
- calcShadow() {
- const info = uni.getWindowInfo()
- const windowTop = info.windowTop
- const safeToTop = info.safeAreaInsets.top
- const top = (windowTop + safeToTop + 36 + 300 + (this.shadowTip * 2)) + "rpx"
- return top
- }
- },
- watch: {
- menuList: {
- handler(newVal) {
- if (newVal) {
- this.menu = JSON.parse(JSON.stringify(newVal))
- this.init()
- }
- },
- immediate: true,
- deep: true
- },
-
- defaultModel: {
- handler(newVal) {
- if (newVal) {
- this.model = JSON.parse(JSON.stringify(newVal))
- this.defaultSelect()
- this.$forceUpdate();
- }
- },
- immediate: true,
- deep: true
- },
- },
- methods: {
- //初始化数据父级、子集selected
- init() {
- try {
- this.menu.forEach(v => {
- if (!v.hasOwnProperty('selected')) {
- this.$set(v, "selected", false)
- }
- if (v.type == 'line') {
- v.children.forEach(clV => {
- if (!clV.hasOwnProperty('selected')) {
- this.$set(clV, "selected", false)
- }
- })
- } else if (v.type == 'check') {
- v.children.forEach(clV => {
- clV.option.forEach(pv => {
- if (!pv.hasOwnProperty('selected')) {
- this.$set(pv, "selected", false)
- }
- })
- })
- }
- })
- } catch (e) {
- console.log(e, "eeee")
- }
- },
- //初始选中第一项
- // defaultVal(data) {
- // if (data.type == 'line') {
- // this.model[data.prop] = data.children[0].value
- // } else if (data.type == 'check') {
- // data.children.forEach(v => this.model[v.prop] = v.option[0].value)
- // }
- // },
- //根据初始值渲染第几项选中
- defaultSelect() {
- this.menu.forEach(v => {
- if (v.type == 'line') {
- const index = v.children.findIndex(cl => {
- if (cl.value == this.model[v.prop]) {
- return cl.value == this.model[v.prop]
- }
- })
- //初始化所有选择项
- v.children.forEach(l => l.selected = false)
- if (index >= 0) {
- v.children[index].selected = true
- v.label = v.children[index].label
- // this.lineLabel = v.children[index].label
- this.$forceUpdate();
- }
- } else if (v.type == 'check') {
- v.children.forEach(cl => {
- if (cl.type == 'radio') {
- const index = cl.option.findIndex(clO => {
- if (clO.value == this.model[cl.prop]) {
- return clO.value == this.model[cl.prop]
- }
- })
- //初始化所有选择项
- cl.option.forEach(cvo => cvo.selected = false)
- if (index >= 0) {
- cl.option[index].selected = true
- this.$forceUpdate();
- }
- } else if (cl.type == 'checkbox') {
- cl.option.forEach(cvo => cvo.selected = false)
- if (this.model[cl.prop]) {
- this.model[cl.prop].forEach(p => {
- const index = cl.option.findIndex(clO => {
- if (clO.value == p) {
- return clO.value == p
- }
- })
- if (index >= 0) {
- cl.option[index].selected = true
- this.$forceUpdate();
- }
- })
- }
-
- }
- })
- }
- })
- this.$forceUpdate();
- },
- //菜单栏选中
- select(item, index) {
- //重置所有的菜单选择状态
- this.menu.forEach((v, vIndex) => {
- if (vIndex != index) {
- v.selected = false
- } else {
- v.selected = !v.selected
- }
- })
- if (!item.selected) return this.showOver = false
- this.showOver = true
- this.$forceUpdate();
- },
- //行菜单子集选中
- lineSelect(item, cItem, index, cIndex) {
- this.menu[index].children.forEach((v, vIndex) => {
- v.selected = false
- })
- cItem.selected = true
- this.model[item.prop] = cItem.value
- item.label = cItem.label
- this.setFilterData()
- },
- //单选方法
- radioSelect(item, clItem) {
- if (clItem.selected) return
- item.option.forEach(v => v.selected = false)
- this.$set(clItem, 'selected', true)
- // clItem.selected = true
- this.model[item.prop] = clItem.value
- this.$forceUpdate()
- },
- //多选方法
- radioCheckSelect(item, clItem) {
- if (!this.model[item.prop]) {
- this.model[item.prop] = []
- }
- clItem.selected = !clItem.selected
- if (clItem.selected) {
- this.model[item.prop].push(clItem.value)
- } else {
- const index = this.model[item.prop].findIndex(v => v == clItem.value)
- this.model[item.prop].splice(index, 1)
- }
- this.$forceUpdate()
- },
- //重置
- resetFilterData(index) {
- this.redioReset(index)
- this.$emit("reset", this.model)
- this.hideOverLay()
- this.$forceUpdate()
- },
- //单选/多选重置
- redioReset(index) {
- const props = this.menu.filter(v => v.type == 'line').map(m => m.prop)
- this.menu[index].children.forEach(v => {
- //判断是否有type为line的状态栏 取出props
- if (props.length > 0) {
- props.forEach(p => {
- // !this.defaultModel[v.prop]
- if (p != v.prop && !this.defaultModel.hasOwnProperty(v.prop)) {
- delete this.model[v.prop]
- } else if (p != v.prop && this.defaultModel.hasOwnProperty(v.prop)) {
- this.model[v.prop] = this.defaultModel[v.prop]
- }
- })
- } else {
- if (!this.defaultModel.hasOwnProperty(v.prop)) {
- delete this.model[v.prop]
- } else if (this.defaultModel.hasOwnProperty(v.prop)) {
- this.model[v.prop] = this.defaultModel[v.prop]
- }
- }
- v.option.forEach(op => op.selected = false)
- if (v.type == 'radio') {
- const index = v.option.findIndex(clO => {
- return clO.value == this.model[v.prop]
- })
- v.option.forEach(cvo => cvo.selected = false)
- if (index >= 0) {
- v.option[index].selected = true
- }
- } else if (v.type == 'checkbox') {
- v.option.forEach(cvo => cvo.selected = false)
- if (this.model[v.prop]) {
- this.model[v.prop].forEach(p => {
- const index = v.option.findIndex(clO => {
- return clO.value == p
- })
- if (index >= 0) {
- v.option[index].selected = true
- }
- })
- }
- }
- })
- },
- //确定
- setFilterData(item) {
- this.$emit("submit", this.model)
- this.hideOverLay()
- this.$forceUpdate()
- },
- hideOverLay() {
- this.menu.forEach(v => {
- v.selected = false
- })
- this.showOver = false
- this.$forceUpdate()
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- .filterBar {
- width: 100%;
- background-color: #fff;
-
- .flex {
- display: flex;
- }
-
- .f-d-c {
- flex-direction: column;
- }
-
- .f-a-i {
- align-items: center;
- }
-
- .active {
- color: #1180ff !important;
- }
-
- .check_active {
- color: #fff !important;
- background-color: #1180ff !important;
- border: none !important;
- }
-
- .wrap {
- z-index: 3;
- width: 100%;
- font-size: 32rpx;
- border-bottom: 2rpx solid #e8e8e8;
- justify-content: space-around;
- // padding-bottom: 20rpx;
- height: 72rpx;
- box-sizing: border-box;
-
-
-
- &-item {
- color: #333333;
- text-align: center;
- transition: color .3s ease;
-
- .label {
- margin-right: 8rpx;
- font-size: 28rpx;
- }
-
- .item-icon {
- color: #333333;
- transition: transform .3s linear;
- transform: rotate(0);
- }
-
- .selected-item-icon {
- color: #1180ff;
- transform: rotate(180deg);
- }
-
- &-box-child {
- // top: 72rpx !important;
- width: 100% !important;
- opacity: 1 !important;
- z-index: 999 !important;
- visibility: visible !important;
- }
-
- &-box-child-default {
- position: absolute;
- // top: 16rpx;
- top: 0;
- left: 0;
- right: 0;
- opacity: 0;
- background: #fff;
- transition: opacity .1s linear;
- z-index: -999;
- visibility: hidden;
-
- .scroll-Y {
- height: 600rpx;
- }
-
- .btn-box {
- justify-content: space-between;
- height: 120rpx;
- flex-direction: row !important;
- align-items: center;
- padding: 0 24rpx;
- // position: fixed;
- background: #fff;
- width: 100%;
- box-sizing: border-box;
-
- >view {
- width: 240rpx;
- height: 60rpx;
- border-radius: 80rpx;
- border: solid 1rpx #5887f9;
- align-items: center;
- justify-content: center;
- box-sizing: border-box;
- line-height: 56rpx;
- font-size: 36rpx;
- }
-
- .reset {
- color: #1180ff;
- }
-
- .submit {
- color: #fff;
- background-color: #1180ff;
- }
- }
-
- .type-line {
- padding-bottom: 40rpx;
- font-size: 28rpx;
-
- .type-line-item {
- color: #333333;
- justify-content: space-between;
- padding: 20rpx;
- border-bottom: 2rpx solid #e8e8e8;
- }
- }
-
- .type-check {
-
- .type-check-item {
- width: 100%;
- text-align: left;
- color: #333333;
- font-size: 28rpx;
- padding-bottom: 20rpx;
-
- .radio {
- padding: 0 24rpx;
-
- .radio-label {
- padding: 10rpx 0;
- }
-
- .option {
- flex-wrap: wrap;
-
- &-item {
- min-width: 120rpx;
- text-align: center;
- box-sizing: border-box;
- padding: 5rpx 40rpx;
- height: 60rpx;
- line-height: 46rpx;
- background-color: #fff;
- color: #333333;
- border: 2rpx solid #e8e8e8;
- margin-top: 16rpx;
- margin-right: 32rpx;
- }
- }
- }
- }
- }
- }
- }
- }
-
- .show {
- background-color: rgba(0, 0, 0, .5);
- z-index: 2;
- position: fixed;
- top: calc(44px + env(safe-area-inset-top) + 72rpx);
- bottom: 0;
- left: 0;
- right: 0;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/my-search.vue b/subPackage/realtimeMonitor/components/my-search.vue
deleted file mode 100644
index 264ff2e..0000000
--- a/subPackage/realtimeMonitor/components/my-search.vue
+++ /dev/null
@@ -1,265 +0,0 @@
-<template>
- <view class="select-group">
- <view class="condition">
- <view class="region-text" @click="regionPopup">
- <view class="area-box">
- <view class="text">
- <regionSelect :isTown="true" :defaultValue="defaultRegion" @regionChange="regionChange">
- </regionSelect>
- </view>
- <view class="icon">
- <image class="img-icon" :src="imageList.iconDownBlack"></image>
- </view>
- </view>
- <u--input v-model="searchKey" placeholder="搜索水库" border="none" prefixIcon="search"
- prefixIconStyle="font-size: 22px;color: #909399" @confirm="sendSearchKey">
- </u--input>
-
- <view class="basin-box" style="margin-right: 20rpx;">
- <view class="text">
- <BasinSelect :code="basCode" @basinChange="basinChange"></BasinSelect>
- </view>
- <view class="icon">
- <u-icon name="arrow-down-fill" size="12"></u-icon>
- </view>
- </view>
-
- </view>
- </view>
-
- </view>
-</template>
-
-<script>
- import regionSelect from "@/components/my-components/regionSelect.vue"
- import BasinSelect from '@/components/my-components/basinSelect.vue'
- export default {
- props: ['flag', "videoType", 'status', 'camera', 'keyWord', 'defaultValue'],
- components: {
- regionSelect,
- BasinSelect
- },
- data() {
- return {
- imageList: {
- iconDownBlack: "https://sk.hubeishuiyi.cn/business/xcxImg/realtimeMonitiorImg/downBlack.png",
- search: "https://sk.hubeishuiyi.cn/business/xcxImg/realtimeMonitiorImg/search.png",
- more: "https://sk.hubeishuiyi.cn/business/xcxImg/realtimeMonitiorImg/more.png"
- },
- tabList: [{
- name: "全部"
- },
- // {
- // name: "收藏"
- // }
- ],
- inactiveStyle: {
- fontSize: "32rpx",
- },
- activeStyle: {
- fontSize: "32rpx",
- color: "#4593F2"
- },
- searchKey: "",
- popUpVisible: false,
- filterList: [],
- defaultRegion: {},
- basCode: ""
- }
- },
- watch: {
-
- },
- created() {
- this.init()
- },
- mounted() {
-
- },
- onLoad(option) {
-
- },
- onShow() {
-
- },
- methods: {
- init() {
- this.defaultRegion = this.defaultValue
- if (this.keyWord) {
- this.searchKey = this.keyWord
- }
-
- if (this.videoType) {
- let arr = this.videoTypeList.filter(e => {
- return e.value == this.videoType
- })
- this.query.videoType = arr[0].value
- this.query.videoTypeLabel = arr[0].name
- }
-
- if (this.status) {
- let arr = this.statusList.filter(e => {
- return e.value == this.status
- })
- this.query.status = arr[0].value
- this.query.statusLabel = arr[0].name
- }
-
- if (this.camera) {
- let arr = this.cameraList.filter(e => {
- return e.value == this.camera
- })
- this.query.camera = arr[0].value
- this.query.cameraLabel = arr[0].name
- }
- },
- tabClick() {
-
- },
- cancelSearch() {
-
- },
- /**
- * 区域弹出层
- */
- regionPopup() {
- this.popUpVisible = !this.popUpVisible
- },
- closePopup(data) {
- this.region = data
- this.popUpVisible = false
- },
- radioChange(n) {
- this.$emit("radioChange", n)
- },
- videoTypeChange(item) {
- this.query.videoType = item.value
- },
- statusChange(item) {
- this.query.status = item.value
- },
- cameraChange(item) {
- this.query.camera = item.value
- },
- /**
- * 重置
- */
- reset() {
- this.query = {
- videoTypeLabel: "全部",
- videoType: "1",
- statusLabel: "全部",
- status: "1",
- cameraLabel: "全部",
- camera: "1"
- }
- },
- submit() {
- this.$emit("radioChange", this.query)
- },
- regionChange(region) {
- this.basCode = region.adCode
-
- this.$emit("regionChange", region)
- },
- basinChange(basin) {
- console.log(basin)
- this.$emit("basinChange", basin)
- },
- sendSearchKey() {
- this.$emit("getKey", this.searchKey)
- }
- }
- }
-</script>
-
-<style lang="scss" scoped>
- .select-group {
- display: flex;
- // margin: 10rpx 0;
- height: 100%;
- // margin: 0 30rpx;
- // width: 670rpx;
- // box-shadow: 0px 0px 20rpx #e2e2e2;
- border-radius: 10rpx;
- background-color: #ffffff;
- padding: 15rpx;
-
- .item {
- display: flex;
- align-items: center;
- flex: 1;
- margin-right: -150rpx;
- }
-
- .condition {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: space-around;
-
- .region-text {
- width: 95%;
- height: 66rpx;
- background-color: #F5F5F5;
- display: flex;
- align-items: center;
- border-radius: 8rpx;
-
- .area-box {
- display: flex;
- align-items: center;
- }
-
- .basin-box {
- display: flex;
- align-items: center;
- }
-
- .text {
- margin-left: 20rpx;
- color: #333333;
- font-family: PingFang-SC-Medium;
- font-size: 30rpx;
- }
-
- .img-icon {
- display: flex;
- width: 22rpx;
- height: 18rpx;
- }
- }
-
- .img-icon {
- width: 40rpx;
- height: 40rpx;
- padding: 0 20rpx;
- }
-
- }
- }
-
- .order {
- width: 500rpx;
-
- padding: 30rpx;
-
- .title {
- margin-bottom: 50rpx;
- }
- }
-
- .query {
- width: 500rpx;
-
- padding: 30rpx;
-
- .title {
- margin-bottom: 50rpx;
- }
-
- .btn-group {
- display: flex;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/popup-group.vue b/subPackage/realtimeMonitor/components/popup-group.vue
deleted file mode 100644
index 484affc..0000000
--- a/subPackage/realtimeMonitor/components/popup-group.vue
+++ /dev/null
@@ -1,184 +0,0 @@
-<template>
- <view @click.self="close" :class="[filterPopVisible?'popup':'hide_popup']">
- <view class="popup_item" :class="[filterPopVisible ? 'active_popup' : 'hide_popup']">
- <view class="content">
- <view class="order" v-for="(item,index) in list" :key="item.label">
- <view class="title">
- <text>{{item.label}}</text>
- </view>
- <view class="radio">
- <u-radio-group shape="circle" v-model="option[item.filId]" placement="column">
- <u-radio :customStyle="{marginBottom: '16rpx'}" v-for="(cl, clIndex) in item.children"
- :key="clIndex" :label="cl.name" :name="cl.value" @change="radioChange(cl,item)">
- </u-radio>
- </u-radio-group>
- </view>
- <view class="line" v-if="list.length-1!=index"></view>
- </view>
- <view class="btn">
- <view class="btn_bas reset" @click="reset"><text class="reset_text">重置</text> </view>
- <view class="btn_bas confirm" @click="confirm"> <text class="confitm_text">确定</text></view>
- </view>
- </view>
- </view>
-
- </view>
-</template>
-
-<script>
- export default {
- props: {
- filterPopVisible: {
- type: Boolean,
- },
- list: {
- /*
- list的格式
- list:[
- {label:"标题名字",children:[{name:"单选框名字",value:"单选框值"}],value:"后端需要的字段名字"}
- ]
- */
- type: Array,
- default: () => []
- }
- },
- data() {
- return {
- query: {
- videoTypeLabel: "全部",
- videoType: "1",
- statusLabel: "全部",
- status: "1",
- cameraLabel: "全部",
- camera: "1"
- },
- option: {},
- orderBy: "",
- }
- },
- methods: {
- close() {
- this.$emit('filterPopClose')
- },
- radioChange(data, item) {
- this.option[item.filId] = data.value
- },
- reset() {
- this.option = {}
- },
- confirm() {
- this.$emit("confirm", {
- data: this.option
- })
- this.close()
- }
- }
- }
-</script>
-
-<style lang="scss" scoped>
- .popup {
- position: fixed;
- width: 100%;
- top: 0;
- bottom: 0;
- background-color: rgba(0, 0, 0, .3);
- transition-property: width;
- // transition-duration: 150ms;
- transition-timing-function: linear;
- z-index: 99;
- }
-
-
- .popup_item {
- position: absolute;
- top: 0;
- bottom: 0;
- right: 0;
- background: #fff;
-
- .content {
- .order:first-child {
- padding-top: 54rpx;
- }
-
- .order {
- padding: 0 13PX;
-
- .title {
- padding-bottom: 40rpx;
- font-size: 34rpx;
- font-weight: 700;
- }
-
- .line {
- margin: 30rpx 0;
- width: 336rpx;
- height: 2rpx;
- background: #F5F5F5;
- border: 2rpx solid #F5F5F5;
- }
- }
-
- .btn {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 40rpx 20rpx;
-
- .btn_bas {
- width: 166rpx;
- height: 60rpx;
- border-radius: 6rpx;
- display: flex;
- align-items: center;
- justify-content: center;
-
- }
-
- .reset {
- background: #FE9C48;
-
- .reset_text {
- width: 52rpx;
- height: 22rpx;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #FFFFFF;
- line-height: 22rpx;
- }
- }
-
- .confirm {
-
- background: #4593F2;
-
- .confitm_text {
- width: 52rpx;
- height: 22rpx;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #FFFFFF;
- line-height: 22rpx;
- }
- }
- }
- }
- }
-
- .active_popup {
- width: 50%;
- transition-property: width;
- transition-duration: 100ms;
- transition-timing-function: linear;
- }
-
- .hide_popup {
- width: 0%;
- // transition-property: width;
- // transition-duration: 150ms;
- // transition-timing-function: linear;
- }
-</style>
diff --git a/subPackage/realtimeMonitor/components/realtimeInfo.vue b/subPackage/realtimeMonitor/components/realtimeInfo.vue
deleted file mode 100644
index 8fd5244..0000000
--- a/subPackage/realtimeMonitor/components/realtimeInfo.vue
+++ /dev/null
@@ -1,1684 +0,0 @@
-<template>
- <view style="padding: 20rpx;">
- <view class="img">
- <u-swiper :loading="swiperLoading" keyName="image_url" showTitle :list="imgList" imgMode="heightFix"
- height="500rpx" @change="change" @click="previewImg" autoplay>
- <view slot="indicator" class="indicator-num">
- <text v-if="imgList.length >0"
- class="indicator-num__text">{{ current + 1 }}/{{ imgList.length }}</text>
- </view>
- </u-swiper>
- </view>
- <view class="tabSkName">
- <view class="tab_item_station" @click="bindPickerChange(item,index)" :class="{'active':index==stationIndex}"
- v-for="(item,index) in stationList" :key="item.value">
- {{item.label}}
- </view>
- </view>
- <view class="info">
- <view class="wrap">
- <view class="wrap_item">
- <view class="title">行政区划:<span class="text">{{currentReservoir.region}}</span></view>
- <view v-if="currentReservoir.res_lon" class="right_icon" @click="locationNav">
- <u-icon name="map" color="#2979ff" size="22"></u-icon>
- </view>
- </view>
- <view class="wrap_item">
- <view class="title">更新时间:<span class="text">{{currentReservoir.updateTime}}</span></view>
- </view>
- </view>
- </view>
-
- <view class="basic-info">
- <view class="top">
- <view class="left_box">
- <view class="box_item">
- <view class="item">
- <view class="value">
- {{currentReservoir.sw}}米
- </view>
- <view class="label">
- 水位
- </view>
- </view>
- <view class="item">
- <view class="value" style="text-align: center;">
- <!-- {{currentReservoir.kr}}万方 --> --
- </view>
- <view class="label">
- 蓄水量
- </view>
- </view>
- </view>
- </view>
- <view class="line"></view>
- <view class="right_item_icon">
- <u-button v-if="userInfo.role_name.indexOf('gly')> -1 || userInfo.role_name.indexOf('admin') > -1"
- @click="navigatorReportFlood()" style="width: 40rpx" type="primary" text="报汛"
- size="small"></u-button>
- <u-icon v-else name="bookmark" color="#b7ded8" size="28"></u-icon>
- </view>
- </view>
- <view class="bottom">
- <view class="up">
- <view class="left">
- <text>堰顶高程:{{currentReservoir.ydHeight ? currentReservoir.ydHeight:'--'}}米</text>
- </view>
- <view class="right">
- <text>汛限水位:{{currentReservoir.limitSw ? currentReservoir.limitSw :'--'}}米</text>
- </view>
- <view class="right">
- <text>总库容:{{currentReservoir.kr?currentReservoir.kr:'--'}}万m³</text>
- </view>
- </view>
- </view>
- </view>
-
- <view class="basic-info rain-info">
- <view class="top">
- <view class="left_box">
- <view class="box_item">
- <view class="item">
- <view class="value">
- {{currentReservoir.nowRainfall}}毫米
- </view>
- <view class="label">
- 今日降雨
- </view>
- </view>
- <view class="item">
- <view class="value">
- {{currentReservoir._24Rainfall}}毫米
- </view>
- <view class="label">
- 昨日降雨
- </view>
- </view>
- </view>
- </view>
- <view class="line"></view>
- <view class="right_item_icon">
- <image class="img-icon" src="../static/img/realtimeMonitiorImg/rain.png"></image>
- </view>
- </view>
- </view>
-
- <view class="sw-info">
- <view class="top">
- <view class="left_box">
- <view class="box_item">
- <view v-if="JSON.stringify(wlw) != '{}'" class="item w45">
- <view class="label">
- 新站水位:
- </view>
- <view class="value">
- {{wlw.rz || '--'}}米
- </view>
- </view>
- <view v-if="JSON.stringify(wlw) != '{}'" class="item w45">
- <view class="label">
- 时间:
- </view>
- <view class="value">
- {{wlw.time?wlw.time: "--"}}
- </view>
- </view>
-
- <view v-if="JSON.stringify(lk) != '{}'" class="item w45">
- <view class="label">
- 老站水位:
- </view>
- <view class="value">
- {{lk.rz || '--'}}米
- </view>
- </view>
- <view v-if="JSON.stringify(lk) != '{}'" class="item w45">
- <view class="label">
- 时间:
- </view>
- <view class="value">
- {{lk.time?lk.time: "--"}}
- </view>
- </view>
-
- <view v-if="JSON.stringify(shuiwen) != '{}'" class="item w45">
- <view class="label">
- 水文水位:
- </view>
- <view class="value">
- {{shuiwen.rz || '--'}}米
- </view>
- </view>
- <view v-if="JSON.stringify(shuiwen) != '{}'" class="item w45">
- <view class="label">
- 时间:
- </view>
- <view class="value">
- {{shuiwen.time?shuiwen.time: "--"}}
- </view>
- </view>
-
- <view class="item w45">
- <view class="label">
- 人工上报:
- </view>
- <view class="value">
- {{reportFloodRecord.personRz}}米
- </view>
- </view>
- <view class="item w45">
- <view class="label">
- 时间:
- </view>
- <view class="value">
- {{reportFloodRecord.updateTime}}
- </view>
- </view>
- <!-- <view class="item w45">
- <view class="label">
- 图片识别:
- </view>
- <view class="value">
- {{"--"}}
- </view>
- </view>
- <view class="item w45">
- <view class="label">
- 时间:
- </view>
- <view class="value">
- {{"--"}}
- </view>
- </view> -->
- </view>
- </view>
- </view>
- </view>
-
- <!--水位过程线-->
- <view class="card-view">
- <card>
- <view class="card-head" slot="insideHead">
- <view>
- <u--text size="20" bold text="水位过程线"></u--text>
- </view>
- </view>
- <view class="card-content" slot="content">
- <view class="card_box j-c-s-a h" style="padding: 20rpx 0;">
- <view class="date" style="background-color: #eaf2fc;">
- <uni-datetime-picker @change="czSqChange" :clear-icon="false" :end="endDateTime"
- v-model="sqDatetimerange" type="datetimerange" rangeSeparator="至">
- <view class='data-item'>
- <view>
- {{converTime(sqDatetimerange[0])}}
- </view>
- 至
- <view>
- {{converTime(sqDatetimerange[1])}}
- </view>
- </view>
- </uni-datetime-picker>
- </view>
- <view class="card_box h" style="background-color: #eaf2fc;padding: 0 10rpx;"
- @click="flagVisible=true">
- <view class="title">{{flagOption[flagIndex].name}}</view>
- <u-icon name="arrow-down-fill" size="12"></u-icon>
- </view>
- <view v-if="userInRole" class="card_box h" style="background-color: #eaf2fc;padding: 0 10rpx; "
- @click="sqVisible=true">
- <view class="title">{{czOptionList[sqIndex].name}}</view>
- <u-icon name="arrow-down-fill" size="12"></u-icon>
- </view>
- </view>
- <echart v-if="!sqEchartLoading" ref="swgcx" initId="swgcx" :option="swgcxOption"></echart>
- <view v-else style="height: 500rpx;display: flex; justify-content: center;">
- <u-loading-icon mode="semicircle" :show="sqEchartLoading" size="36"></u-loading-icon>
- </view>
- </view>
- </card>
- </view>
-
- <!--雨量直方图-->
- <view class="card-view">
- <card>
- <view class="card-head" slot="insideHead">
- <view>
- <u--text size="20" bold text="雨量直方图"></u--text>
- </view>
- </view>
- <view class="card-content" slot="content">
- <view class="card_box j-c-s-a h" style="padding: 20rpx 0;">
- <view class="date" style="background-color: #eaf2fc;">
- <uni-datetime-picker @change="czYqChange" :clear-icon="false" v-model="yqDatetimerange"
- :end="endDateTime" type="datetimerange" rangeSeparator="至">
-
- <view class='data-item'>
- <view>
- {{converTime(yqDatetimerange[0])}}
- </view>
- 至
- <view>
- {{converTime(yqDatetimerange[1])}}
- </view>
- </view>
-
- </uni-datetime-picker>
- </view>
- <view class="card_box h" style="background-color: #eaf2fc;padding: 0 10rpx;"
- @click="intvVisible=true">
- <view class="title">{{intvOption[intvIndex].name}}</view>
- <u-icon name="arrow-down-fill" size="12"></u-icon>
- </view>
-
- <view v-if="userInRole" class="card_box h" style="background-color: #eaf2fc;padding: 0 10rpx;"
- @click="yqVisible=true">
- <view class="title">{{czOptionList[yqIndex].name}}</view>
- <u-icon name="arrow-down-fill" size="12"></u-icon>
- </view>
-
- </view>
-
- <echart v-if="!yqEchartLoading" ref="ylzft" initId="ylzft" :option="ylzftOption"></echart>
- <view v-else style="height: 500rpx;display: flex; justify-content: center;">
- <u-loading-icon mode="semicircle" :show="yqEchartLoading" size="36"></u-loading-icon>
- </view>
-
- </view>
- </card>
- </view>
-
- <my-select v-if="flagVisible" :show="flagVisible" type="radio" v-model="flagValue" popupTitle="请选择"
- :dataLists="flagOption" @cancel="flagVisible=false" @submit="flagSelectSubmit">
- </my-select>
-
- <my-select v-if="intvVisible" :show="intvVisible" type="radio" v-model="intvValue" popupTitle="请选择"
- :dataLists="intvOption" @cancel="intvVisible=false" @submit="intvSelectSubmit">
- </my-select>
-
- <my-select v-if="sqVisible" :show="sqVisible" type="radio" v-model="sqValue" popupTitle="请选择"
- :dataLists="czOptionList" @cancel="sqVisible=false" @submit="sqSelectSubmit">
- </my-select>
- <my-select v-if="yqVisible" :show="yqVisible" type="radio" v-model="yqValue" popupTitle="请选择"
- :dataLists="czOptionList" @cancel="yqVisible=false" @submit="yqSelectSubmit">
- </my-select>
-
- </view>
-</template>
-
-<script>
- import {
- convertTimestampToDate,
- getTimeBefore,
- timestampToMinute,
- timestampToTime
- } from "@/utils/date"
- import card from "@/components/my-components/card.vue"
- import echart from "@/components/echart/echart.vue"
- import mySelect from "@/components/my-components/my-select.vue"
- import uniDataSelect from "./uni-components/uni-data-select/components/uni-data-select/uni-data-select.vue"
- import uniDatetimePicker from "./uni-components/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue"
- import {
- reservoirRealtimeSw,
- reservoirList,
- getReservoirImage,
- getReservoirBasicInfo,
- getStation
- } from "@/api/dataCenter/reservoir/reservoir.js"
- import {
- ylzftData,
- getSKResZLastChildApi,
- getYqStation,
- getStation as getStationList,
- } from "@/api/dataCenter/rainWaterCondition/rainWaterCondition.js"
- import {
- getLatestRecord
- } from "@/api/reportFlood/reportFloodRecord"
- import {
- isInRole
- } from "../utils"
- import {
- hsybData
- } from "@/api/hsyb"
- export default {
- components: {
- card,
- echart,
- mySelect,
- uniDataSelect,
- uniDatetimePicker,
- },
- props: {
- reservoirId: {
- type: String,
- required: true
- }
- },
- computed: {
- converTime() {
- return time => {
- return convertTimestampToDate(time, "MM-dd hh")
- }
- }
- },
- data() {
- return {
- endDateTime: convertTimestampToDate(new Date()),
- lk: {},
- wlw: {},
- shuiwen: {},
- current: 0,
- imgList: [],
- currentReservoir: {
- region: "",
- updateTime: "",
- sw: "",
- limitSw: "",
- nowRainfall: "",
- _24Rainfall: "",
- bdHeight: 0,
- ydHeight: "",
- kr: "",
- st_cd_rain: "",
- },
- reservoirBasicInfo: {},
- //判断数据来源
- flag: "",
- swiperLoading: false,
-
- //水情测站显示
- sqVisible: false,
- sqValue: "",
- sqResource: "",
- sqIndex: 0,
- //雨情测站显示
- yqIndex: 0,
- yqValue: "",
- yqResource: "",
- yqVisible: false,
-
- //获取测站数据
- czOptionList: [{
- name: "老站",
- index: 0
- }],
- //预测时间列表
- pridictionTmList: [],
- //预测数据列表
- pridictionDaList: [],
- sqEchartLoading: true,
- swgcxOption: {
- color: ["#FF8B07", "#1180ff", "#f800e8", "#08dca9", "green", "black", "brown", "red", "#FF8B07"],
- tooltip: {
- trigger: 'axis',
- },
- xAxis: {
- type: 'category',
- data: [],
- axisLabel: { //x轴文字的配置
- color: "#999999", //x轴内容文字颜色
- },
- axisTick: {
- alignWithLabel: true,
- // interval: 0
- }
- },
- yAxis: [{
- name: "水位(m)",
- type: 'value',
- }, ],
- series: [{
- name: "水位",
- // yAxisIndex: 0,
- data: [],
- type: 'line',
- smooth: 'true',
- showSymbol: false
- },
- {
- type: "line",
- name: "汛限水位",
- markLine: {
- symbol: 'none',
- data: [{
- lineStyle: {
- type: "dashed"
- },
- label: {
- position: "middle",
- fontWeight: 'bold',
- color: "#1180ff",
- formatter(params) {
- return `汛限水位 ${params.value}m`
- }
- },
- yAxis: ""
- }, ]
- }
- },
- {
- type: "line",
- name: "死水位",
- markLine: {
- symbol: 'none',
- data: [{
- lineStyle: {
- type: "dashed"
- },
- label: {
- position: "insideStartTop",
- distance: 5,
- fontWeight: 'bold',
- formatter(params) {
- return `死水位 ${params.value}m`
- }
- },
- yAxis: ""
- }, ]
- }
- },
- {
- type: "line",
- name: "正常水位",
- markLine: {
- symbol: 'none',
- data: [{
- lineStyle: {
- type: "dashed"
- },
- label: {
- position: "insideStartBottom",
- fontWeight: 'bold',
- formatter(params) {
- return `正常水位 ${params.value}m`
- }
- },
- yAxis: ""
- }, ]
- }
- },
- {
- type: "line",
- name: "设计水位",
- markLine: {
- symbol: 'none',
- data: [{
- lineStyle: {
- type: "dashed"
- },
- label: {
- position: "insideMiddleTop",
- fontWeight: 'bold',
- formatter(params) {
- return `设计水位 ${params.value}m`
- }
- },
- yAxis: ""
- }, ]
- }
- },
- {
- type: "line",
- name: "校核水位",
- markLine: {
- symbol: 'none',
- data: [{
- lineStyle: {
- type: "dashed"
- },
- label: {
- position: "insideEndTop",
- fontWeight: 'bold',
- formatter(params) {
- return `校核水位 ${params.value}m`
- }
- },
- yAxis: ""
- }, ]
- }
- },
- {
- type: "line",
- name: "坝顶高程",
- markLine: {
- symbol: 'none',
- data: [{
- lineStyle: {
- type: "dashed"
- },
- label: {
- position: "insideEndBottom",
- fontWeight: 'bold',
- formatter(params) {
- return `坝顶高程 ${params.value}m`
- }
- },
- yAxis: ""
- }, ]
- }
- },
- {
- type: "line",
- name: "堰顶高程",
- markLine: {
- symbol: 'none',
- data: [{
- lineStyle: {
- type: "dashed"
- },
- label: {
- position: "insideStartBottom",
- fontWeight: 'bold',
- formatter(params) {
- return `堰顶高程 ${params.value}m`
- }
- },
- yAxis: ""
- }, ]
- }
- },
- {
- name: '预报水位(m)',
- type: 'line',
- data: [],
- // min: 0,
- // max: 200,
- lineStyle: {
- normal: {
- type: "dotted"
- }
- },
- smooth: true,
- showSymbol: false
- },
- ],
- // dataZoom: {
- // show: true,
- // realtime: true,
- // start: 75,
- // end: 100,
- // },
- grid: {
- top: "30%",
- left: '15%',
- bottom: "11%",
- right: '5%',
- // containLabel: true
- },
- legend: {
- selected: {
- "水位": true,
- "汛限水位": true,
- "堰顶高程": false,
- "坝顶高程": false,
- "校核水位": false,
- "设计水位": false,
- "正常水位": false,
- "死水位": false,
- },
- // left: "100",
- align: "right",
- data: ["水位", "汛限水位", "坝顶高程", "堰顶高程", "校核水位", "设计水位", "正常水位", "死水位"],
- // '入库流量',
- padding: [20, 0, 0, 0],
- textStyle: {
- fontSize: 10
- },
- },
- },
- swgcxData: {
- xTime: [],
- yLineSw: [],
- yLineKr: [],
- },
- sqDatetimerange: getTimeBefore(24),
- //时段类型相关数据
- flagOption: [{
- name: "实时",
- value: "1",
- index: 0,
- },
- {
- name: "整点",
- value: "2",
- index: 1,
- },
- {
- name: "八时",
- value: "3",
- index: 2,
- },
- ],
- flagIndex: 0,
- flagValue: "1",
- flagVisible: false,
- sqQuery: {
- flag: 1
- },
- yqDatetimerange: getTimeBefore(24),
-
- yqQuery: {
- intv: 1
- },
- //小时类型
- intvOption: [{
- name: "1小时",
- value: 1,
- index: 0
- },
- {
- name: "3小时",
- value: 3,
- index: 1
- },
- {
- name: "6小时",
- value: 6,
- index: 2
- },
- {
- name: "12小时",
- value: 12,
- index: 3
- },
- {
- name: "24小时",
- value: 24,
- index: 4
- },
- ],
- intvVisible: false,
- intvIndex: 0,
- intvValue: 1,
-
- yqEchartLoading: false,
- ylzftOption: {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- animation: false,
- label: {
- backgroundColor: '#505765'
- }
- }
- },
- xAxis: {
- type: 'category',
- data: [],
- axisTick: {
- alignWithLabel: true,
- // interval: 0
- },
- axisLabel: {
- formatter: value => {
- if (value.indexOf("-") > -1) {
- //日期换行
- let arr = value.split(" ")
- let temp = arr[1] + "\n" + arr[0]
- return temp
- } else {
- return value
- }
- }
- },
- },
- // dataZoom: {
- // show: true,
- // realtime: true,
- // start: 75,
- // end: 100
- // },
- yAxis: [{
- name: "雨量(mm)",
- type: 'value'
- }, ],
- series: [{
- name: "雨量",
- data: [],
- type: 'bar',
- barWidth: 10,
- }],
- grid: {
- top: '10%',
- left: '14%',
- bottom: '14%',
- right: '5%',
- // containLabel: true
- },
- legend: {
- selected: {},
- align: "right",
- data: [],
- padding: [5, 0, 0, 0],
- textStyle: {
- fontSize: 10
- },
- },
- },
- ylzftData: {
- xTime: [],
- yBarValue: [],
- },
- stationList: [],
- stationIndex: 0,
- //人工报汛
- reportFloodRecord: {},
- //水位站
- waterStation: "",
- waterStationList: [],
- //雨量站
- rainStation: "",
- rainStationList: [],
- userInRole: false,
-
- sqLoadingStop: true
- }
- },
- created() {
- this.userInRole = isInRole()
- },
- mounted() {
- this.initGetStation()
- this.getReportFlood()
- this.getReservoirDetail()
- this.getTxStation()
- },
- onLoad(option) {},
- onShow() {
- this.getReportFlood()
- },
- options: {
- styleIsolation: 'shared'
- },
- watch: {
- flag: {
- handler(val) {
- if (val) {
- this.getSwData()
- this.getRainData()
- }
- }
- }
- },
- methods: {
- timeFormatter(tm, flag) {
- let time = ""
- let tmArr = tm.split(" ")
- if (flag == "sq") {
- if (tm.indexOf("00:00") > -1) {
- //0点显示日期
- return tm
- } else {
- time = tmArr[1]
- return time
- }
- } else if (flag == "yq") {
- if (tm.indexOf("00:00") > -1) {
- //0点显示日期
- return tm
- } else {
- time = tmArr[1]
- return time
- }
- }
- },
-
- //获取报汛记录数据
- getReportFlood() {
- getLatestRecord(this.reservoirId).then(res => {
- let data = res.data
- if (JSON.stringify(data) != '{}') {
- this.reportFloodRecord = res.data
- this.reportFloodRecord.updateTime = convertTimestampToDate(this.reportFloodRecord
- .updateTime,
- "MM-dd hh:mm")
- } else {
- this.reportFloodRecord.personRz = "--"
- this.reportFloodRecord.updateTime = "--"
- }
- })
- },
- //报汛页面跳转
- navigatorReportFlood() {
- let url = "/subPackage/realtimeMonitor/reservoir/reportFlood?reservoirId=" + this.reservoirId
- this.$u.func.globalNavigator(url, "navTo")
- },
- //uni自带定位
- locationNav() {
- uni.openLocation({
- latitude: this.currentReservoir.res_lat,
- longitude: this.currentReservoir.res_lon,
- scale: 15
- });
- },
- //获取雨量数据
- getRainData() {
- getYqStation({
- res_cd: this.reservoirId
- }).then(res => {
- let data = res.resultList
- this.rainStation = data.filter(e => e.guid == this.flag)[0]
-
- if (this.rainStation) {
- this.yqValue = this.rainStation.guid
- this.yqResource = this.rainStation.sys_resource
- this.yqIndex = this.czOptionList.findIndex(e => e.value == this.flag)
- this.getYqDataListByList()
- }
- })
- },
- //获取雨情数据
- getYqDataListByList(param = {}) {
- this.yqEchartLoading = true
- const that = this
- const [start_tm, end_tm] = this.yqDatetimerange
- let params = {
- res_cd: this.currentReservoir.id,
- start_tm: start_tm,
- end_tm: end_tm,
- st_cd: this.yqValue,
- resource_flag: this.yqResource
- }
- Object.assign(params, param)
- ylzftData(1, 100000, Object.assign(params, that.yqQuery)).then(res => {
- let data = res.data.data
- let value = []
- let tm = []
- let val = {}
- if (data) {
- data.sort((a, b) => new Date(a.tm) - new Date(b.tm))
- data = data.filter(e => {
- return (convertTimestampToDate(e.tm)) != params.end_tm
- })
- data.forEach(e => {
- e.tm = this.timeFormatter(convertTimestampToDate(e.tm, "MM-dd hh:mm"), "yq")
- tm.push(e.tm)
- value.push(e.drp)
- })
-
- val.xAxis = tm
- val.yAxis = value
- this.initYlzftOption(val)
- }
- })
- },
- //获取图片测站
- async getTxStation() {
- const obj = {
- res_cd: this.reservoirId
- }
- const res = await getStation(obj)
- let arr = []
- res.data && res.data.length > 0 && res.data.forEach(val => {
- const skList = val.imagest_name.split(",")
- skList.forEach(item => {
- let [value, label, type, hasImg, time] = item.split(":")
- const obj = {
- value,
- label,
- hasImg,
- time
- }
- arr.push(obj)
- })
- })
- const timeStamp = new Date().getTime() - 12 * 60 * 60 * 1000
- const start_tm = convertTimestampToDate(new Date(timeStamp), "yyyy-MM-dd ") + " 00:00:00"
- const end_tm = convertTimestampToDate(new Date())
- arr = arr.filter(v => v.hasImg == 'Y')?.filter(v => v.time >= start_tm && v.time <= end_tm)
- if (arr.length > 0) {
- this.stationList = arr
- this.currentReservoir.imagest_cd = arr[0].value
- this.getImage()
- } else {
- this.imgList = ["https://sk.hubeishuiyi.cn/business//img/emptyImg.514374af.png"]
- }
- },
-
- bindPickerChange(item, index) {
- this.current = 0
- this.stationIndex = index
- this.currentReservoir.imagest_cd = item.value
- this.getImage()
- },
-
- change(e) {
- this.current = e.current
- },
-
- //轮播图
- previewImg(e) {
- let imgArr = this.imgList.map(v => v.image_url)
- uni.previewImage({
- current: e, //预览图片的下标
- urls: imgArr, //预览图片的地址,必须要数组形式,如果不是数组形式就转换成数组形式就可以,
- })
- },
-
- convertResource(flag) {
- if (flag == "物联网") {
- return "wlw"
- } else if (flag == "老库") {
- return "lk"
- } else if (flag == "水文") {
- return "sw"
- }
-
- return flag
- },
-
- //获取新站老站水位
- getSwData() {
- getSKResZLastChildApi({
- res_cd: this.reservoirId
- }).then(res => {
- let data = res.data.data
- this.waterStation = data.filter(e => {
- return e.st_cd == this.flag
- })[0]
- this.sqValue = this.waterStation.st_cd
- this.sqResource = this.convertResource(this.waterStation.resource_flag)
- this.sqIndex = this.czOptionList.findIndex(e => e.value == this.flag)
- this.getSqDataListByList()
- console.log(data, "----------------")
- //渲染新老库水位数据
- data.forEach(e => {
- console.log(e, 'eeeee')
- if (e.resource_flag == "物联网") {
- //有新站取新站
- if (JSON.stringify(this.wlw) == '{}') {
- this.wlw = e
- this.wlw.time = convertTimestampToDate(e.tm, "MM-dd hh:mm")
- } else if (e.rz) {
- this.wlw = e
- this.wlw.time = convertTimestampToDate(e.tm, "MM-dd hh:mm")
- }
- } else if (e.resource_flag == "老库") {
- this.lk = e
- this.lk.time = convertTimestampToDate(e.tm, "MM-dd hh:mm")
- } else if (e.resource_flag == "水文") {
- //如果后续有主站
- if (JSON.stringify(this.wlw) != '{}' && e.is_main_rsvr == 1) {
- this.shuiwen = e
- this.shuiwen.time = convertTimestampToDate(e.tm, "MM-dd hh:mm")
- } else {
- //先拿水文的数据
- this.shuiwen = e
- this.shuiwen.time = convertTimestampToDate(e.tm, "MM-dd hh:mm")
- }
- }
- })
- })
- },
-
- //获取水情数据
- async getSqDataListByList(param = {}) {
- this.sqEchartLoading = true
- const [start_dt, end_dt] = this.sqDatetimerange
- let params = {
- res_cd: this.reservoirId,
- start_dt: start_dt,
- end_dt: end_dt,
- st_cd: this.sqValue,
- resource_flag: this.sqResource
- }
- reservoirRealtimeSw(Object.assign(params, param, this.sqQuery)).then(res => {
- let data = res.data
- let value = []
- let time = []
- let val = {}
- //时间升序
- data = data.sort(function(a, b) {
- return new Date(a.tm) - new Date(b.tm)
- })
- data.forEach(e => {
- if (e.rz == 0 || e.rz == "") {
- e.rz = null
- }
- e.tm = timestampToMinute(new Date(e.tm).getTime())
- value.push(e.rz)
- time.push(e.tm)
- })
-
- val.yAxis = value
- val.xAxis = time
- this.initSwgcxOption(val)
- })
- },
-
- //获取水库详情数据
- async getReservoirDetail() {
- const res = await reservoirList(1, 1, {
- res_cd: this.reservoirId
- })
- let data = res.data.data[0]
- this.flag = data.st_cd
- this.currentReservoir = {
- id: this.reservoirId,
- name: data.res_nm,
- region: this.convertRegion(data),
- updateTime: convertTimestampToDate(data.tm, "yyyy-MM-dd hh:mm"),
- sw: data.rz,
- limitSw: data.flse_lim_stag,
- nowRainfall: data.cur_drp ? data.cur_drp : 0,
- _24Rainfall: data.ytr_drp ? data.ytr_drp : 0,
- bdHeight: 0,
- ydHeight: data.weir_top_elev,
- kr: data.tot_cap,
- res_lon: data.res_lon,
- res_lat: data.res_lat,
- }
- this.initSwBasicInfoOption()
- },
-
- //行政区划转换
- convertRegion(item) {
- let arr = []
- if (item.city_nm) {
- arr.push(item.city_nm)
- }
- if (item.county_nm) {
- arr.push(item.county_nm)
- }
- if (item.town_nm) {
- arr.push(item.town_nm)
- }
- return arr.join("")
- },
-
- //获取图片数据
- getImage() {
- this.imgList = []
- this.swiperLoading = true
- const timeStamp = new Date().getTime() - 12 * 60 * 60 * 1000
- let params = {
- start_tm: convertTimestampToDate(new Date(timeStamp), "yyyy-MM-dd") + " 00:00:00",
- end_tm: convertTimestampToDate(new Date()),
- res_cd: this.currentReservoir.id,
- imagest_cd: this.currentReservoir.imagest_cd
- }
- getReservoirImage(params).then(res => {
- let data = res.data.data
- data.sort((a, b) => b.tm - a.tm)
- if (data.length > 0) {
- data.forEach(val => {
- if (val.image_url && val.image_url.indexOf(
- 'http://183.95.190.143:9096/images') != -1) {
- val.image_url = val.image_url.replace('http://183.95.190.143:9096/images',
- 'https://sk.hubeishuiyi.cn/imgWLW/images')
- }
-
- if (val.image_url && val.image_url.indexOf(
- 'http://223.75.53.106:8891/skjgimages') != -1) {
- val.image_url = val.image_url.replace(
- `http://223.75.53.106:8891/skjgimages`,
- `https://sk.hubeishuiyi.cn/imgLK/skjgimages`)
- }
- if (val.image_url && val.sys_resource == 'hk') {
- val.image_url = 'https://sk.hubeishuiyi.cn/haik-camera-img/' + val
- .image_url
- }
- val.title = convertTimestampToDate(val.tm, "yyyy-MM-dd hh:mm")
-
- if (val.image_url) {
- val.image_url = val.image_url.replace(/\\/g, "/");
- }
- })
- this.imgList = data
- this.swiperLoading = false
- } else {
- this.imgList = ["https://sk.hubeishuiyi.cn/business//img/emptyImg.514374af.png"]
- this.swiperLoading = false
- }
- })
- },
- //初始化基础数据
- async initSwBasicInfoOption() {
- const resData = {
- res_cd: this.reservoirId
- }
- const tbRes = await getReservoirBasicInfo(resData)
- let tbData = tbRes.data[0]
- //死水位
- this.reservoirBasicInfo.dead_stag = tbData.tb_dead_stag || 0
- //正常水位
- this.reservoirBasicInfo.norm_pool_stag = tbData.tb_norm_pool_stag || 0
- //设计水位
- this.reservoirBasicInfo.des_fl_stag = tbData.tb_des_fl_stag || 0
- //校核水位
- this.reservoirBasicInfo.chec_fl_stag = tbData.tb_chec_fl_stag || 0
- //坝顶高程
- this.reservoirBasicInfo.dam_top_elevation = tbData.tb_dam_top_elevation || 0
- //堰顶高程
- this.reservoirBasicInfo.weir_top_elev = this.currentReservoir.ydHeight || 0
-
- this.swgcxOption.series[1].markLine.data[0].yAxis = this.currentReservoir.limitSw
- this.swgcxOption.series[2].markLine.data[0].yAxis = this.reservoirBasicInfo.dead_stag
- this.swgcxOption.series[3].markLine.data[0].yAxis = this.reservoirBasicInfo.norm_pool_stag
- this.swgcxOption.series[4].markLine.data[0].yAxis = this.reservoirBasicInfo.des_fl_stag
- this.swgcxOption.series[5].markLine.data[0].yAxis = this.reservoirBasicInfo.chec_fl_stag
- this.swgcxOption.series[6].markLine.data[0].yAxis = this.reservoirBasicInfo.dam_top_elevation
- this.swgcxOption.series[7].markLine.data[0].yAxis = this.reservoirBasicInfo.weir_top_elev
- },
- //预报水位
- async sqGetpredictionInfo() {
- const now = timestampToTime(new Date().getTime())
- const tomorrow = timestampToTime(new Date().getTime() + 60 * 60 * 1000 * 24)
- const jsonInfo = this.reservoirId
- const res = await hsybData(jsonInfo)
- if (!res.success) return
- this.pridictionDaList = []
- this.pridictionTmList = []
- if (res.data && res.data.length > 0) {
- //判断当天是否有第二天的数据
- let hasTomorrow = res.data.findIndex(v => v[0].includes("/"))
- if (hasTomorrow > -1) {
- res.data[hasTomorrow][0] = tomorrow + res.data[hasTomorrow][0].substring(5)
- }
- res.data.forEach((v, index) => {
- //对第二天数据进行处理
- if (index > hasTomorrow && hasTomorrow > -1) {
- res.data.splice(index, 1, [tomorrow + res.data[index][0], v[1], v[2], new Date(
- tomorrow + res.data[index][0]).getTime()])
- } else if (hasTomorrow == -1) {
- v[0] = now + v[0]
- } else if (index < hasTomorrow && hasTomorrow > -1) {
- v[0] = now + v[0]
- }
- v[3] = new Date(v[0]).getTime()
- })
- const defaultNowTm = this.sqDatetimerange[1].substring(0, 16)
- const index = res.data.sort((a, b) => a[3] - b[3]).map(v => v[0]).findIndex(v => v == defaultNowTm)
- this.pridictionTmList = res.data.sort((a, b) => a[3] - b[3]).map(v => v[0]).slice(index, res.data
- .length)
- this.pridictionDaList = res.data.sort((a, b) => a[3] - b[3]).map(v => v[2]).slice(index, res.data
- .length)
- }
- },
- //初始化水位过程线echart
- async initSwgcxOption(data) {
- await this.sqGetpredictionInfo()
- let xAxis = data.xAxis
- for (let i = 0; i < xAxis.length; i++) {
- this.pridictionDaList.unshift(null)
- }
- //去除相同的时间
- xAxis = [...new Set([...xAxis, ...this.pridictionTmList])]
- const dealXAxis = xAxis.map(v => {
- if (v.includes("00:00")) {
- v = v.substring(5, 17)
- } else {
- v = v.substring(11, 16)
- }
- return v
- })
- //获取最大水位
- const maxWater = Math.max(...data.yAxis)
- const minWater = Math.min(...data.yAxis)
- const numberData = [
- maxWater,
- this.currentReservoir.limitSw,
- this.reservoirBasicInfo.dead_stag,
- this.reservoirBasicInfo.norm_pool_stag,
- this.reservoirBasicInfo.des_fl_stag,
- this.reservoirBasicInfo.chec_fl_stag,
- this.reservoirBasicInfo.dam_top_elevation,
- this.reservoirBasicInfo.weir_top_elev,
- minWater
- ].filter(v => v > 0)
- //最大值
- const max = Math.max(...numberData)
-
- //最小值
- const min = Math.min(...numberData)
- this.swgcxOption.yAxis = [{
- name: "水位(m)",
- type: 'value',
- min: (min - 0.7).toFixed(2),
- max: (val) => {
- return (max + 0.5).toFixed(2);
- }
- }]
-
- this.swgcxOption.series[0].data = data.yAxis
- this.swgcxOption.series[8].data = this.pridictionDaList
- this.swgcxOption.xAxis.data = dealXAxis
- this.sqEchartLoading = false
- },
-
- //初始化雨量直方图echart
- initYlzftOption(data) {
- if (data.xAxis) {
- this.ylzftOption.xAxis.data = data.xAxis
- }
- this.ylzftOption.series[0].data = data.yAxis
- this.yqEchartLoading = false
- },
-
- //水情时间选择
- czSqChange(e) {
- this.getSqDataListByList()
- },
- //水情时段类型切换
- flagSelectSubmit(e) {
- this.flagIndex = e.index
- this.flagVisible = false
- this.flagValue = e.value
- this.sqQuery.flag = e.value
- this.getSqDataListByList()
- },
- //雨情时间选择
- czYqChange(e) {
- this.getYqDataListByList()
- },
- //雨情小时类型切换
- intvSelectSubmit(e) {
- this.intvIndex = e.index
- this.intvVisible = false
- this.intvValue = e.value
- this.yqQuery.intv = e.value
- this.getYqDataListByList()
- },
- //水情测点切换
- sqSelectSubmit(e) {
- this.sqIndex = e.index
- this.sqVisible = false
- this.sqValue = e.value
- this.sqResource = e.sys_resource
- this.getSqDataListByList()
- },
- //雨情测点切换
- yqSelectSubmit(e) {
- this.yqIndex = e.index
- this.yqVisible = false
- this.yqValue = e.value
- this.yqResource = e.sys_resource
- this.getYqDataListByList()
- },
-
- //初始化监测站数据
- async initGetStation() {
- const obj = {
- res_cd: this.reservoirId
- }
- const {
- resultList
- } = await getStationList(obj)
- const arr = []
- resultList.forEach((val, index) => {
- const obj = {
- name: `${val.sys_resource == 'wlw' ? `新站` : val.sys_resource == 'lk'?'老站':'水文'}`,
- value: val.guid,
- index: index,
- sys_resource: val.sys_resource
- }
- arr.push(obj)
- })
- if (arr.length > 0) {
- this.czOptionList = this.getTypeStation(arr)
- // this.sqValue = this.czOptionList[0].value
- // this.yqValue = this.czOptionList[0].value
- }
- },
- //处理有多个新站或者老站的数据
- getTypeStation(data) {
- if (data.length <= 0) return []
- //获取老站数据
- const lkList = data.filter(v => v.sys_resource == 'lk')
- //获取新站数据
- const xkList = data.filter(v => v.sys_resource == 'wlw')
- //获取水文数据
- const swList = data.filter(v => v.sys_resource == 'sw')
- this.dealStation(lkList)
- this.dealStation(xkList)
- this.dealStation(swList)
- return [...lkList, ...xkList, ...swList].sort((a, b) => a.index - b.index)
- },
- dealStation(list) {
- if (list.length <= 1) return
- list.forEach((v, index) => v.name = v.name + (index + 1))
- },
-
- }
- }
-</script>
-
-<style lang="scss" scoped>
- /deep/ .u-swiper__indicator {
- left: 20rpx !important;
- top: 20rpx !important;
- bottom: 0 !important;
- }
-
- .w45 {
- width: 45%;
- }
-
- .flex {
- display: flex;
- align-items: center;
- justify-content: center;
-
- .left {
- font-size: 28rpx;
- flex: 0.9;
- width: 100%;
-
- .title {
- flex: 1;
- }
- }
-
- .right {
- font-size: 28rpx;
- flex: 1;
- }
- }
-
- .img {
-
- height: 500rpx;
- margin: 10rpx 0;
- border-radius: 10rpx;
-
- .indicator {
- @include flex(row);
- justify-content: center;
-
- &__dot {
- height: 12rpx;
- width: 12rpx;
- border-radius: 200rpx;
- background-color: rgba(255, 255, 255, 0.35);
- margin: 0 10rpx;
- transition: background-color 0.3s;
-
- &--active {
- background-color: #ffffff;
- }
- }
- }
-
- .indicator-num {
- padding: 4rpx 0;
- background-color: rgba(0, 0, 0, 0.35);
- border-radius: 200rpx;
- width: 70rpx;
- @include flex;
- justify-content: center;
-
- &__text {
- color: #FFFFFF;
- font-size: 24rpx;
- }
- }
- }
-
- .tabSkName {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 100%;
-
- .tab_item_station {
- padding: 10rpx;
- height: 60rpx;
- box-sizing: border-box;
- color: black;
- font-size: 24rpx;
- max-width: 180rpx;
- white-space: nowrap; //不换行
- overflow: hidden; //超出部分隐藏
- text-overflow: ellipsis; //文本溢出显示省略号
- }
-
- .active {
- color: #1180ff;
- border-bottom: 1px solid #1180ff;
- }
- }
-
- .info {
- display: flex;
- align-items: center;
- margin-bottom: 20rpx;
-
- .wrap {
- display: flex;
- flex-wrap: wrap;
- flex-direction: column;
- justify-content: center;
- width: 100%;
-
- .wrap_item {
- display: flex;
- align-items: center;
- justify-content: space-between;
- font-size: 30rpx;
- padding: 10rpx 0;
-
- .title {
- color: #BBBBBB;
- /* flex: 1; */
- align-items: center;
- display: flex;
-
- .text {
- display: flex;
- color: #333333;
- }
- }
-
- .right_icon {
- flex: 1;
- display: flex;
- justify-content: center;
- }
- }
- }
-
- .text {
- display: flex;
- }
- }
-
- .basic-info {
- background-color: #f2fafc;
- border-radius: 15rpx;
- font-family: PingFang SC;
- margin-bottom: 20rpx;
-
- .top {
- display: flex;
- justify-content: space-around;
- align-items: center;
- font-family: PingFang SC;
-
- .left_box {
- flex: 3;
-
- .box_item {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- justify-content: space-evenly;
-
- .item {
- padding: 16rpx;
-
- .label {
- text-align: center;
- padding-top: 10rpx;
- }
- }
- }
- }
-
- .line {
- width: 4rpx;
- height: 60rpx;
- background: #C6EAE6;
- }
-
- .right_item_icon {
- flex: 1;
- display: flex;
- justify-content: center;
-
- .img-icon {
- width: 50rpx;
- height: 50rpx;
- }
- }
- }
-
- .bottom {
-
- .up {
- padding-bottom: 20rpx;
- display: flex;
- margin-top: -10rpx;
- align-items: center;
- justify-content: space-between;
- padding: 32rpx 10rpx;
- font-size: 28rpx;
- }
-
- .down {
- margin-left: 50rpx;
- padding-bottom: 20rpx;
- }
- }
-
- // .item {
- // display: flex;
- // }
- }
-
- .rain-info {
- background-color: #f2f8ff;
- border-radius: 15rpx;
- margin-bottom: 20rpx;
-
- .item {
- display: flex;
- flex-direction: column;
- align-items: center;
-
- .down {
- font-size: 30rpx;
- }
- }
- }
-
- .sw-info {
- background-color: #f2f8ff;
- border-radius: 15rpx;
- margin-bottom: 20rpx;
-
- .top {
- display: flex;
- justify-content: space-around;
- align-items: center;
- font-family: PingFang SC;
-
- .left_box {
- flex: 3;
-
- .box_item {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- justify-content: space-evenly;
- font-size: 34rpx;
-
- .item {
- padding: 16rpx;
- display: flex;
- justify-content: space-between;
-
- .label {
- text-align: center;
- }
- }
- }
- }
-
- .right_item_icon {
- flex: 1;
- display: flex;
- justify-content: center;
-
- .img-icon {
- width: 50rpx;
- height: 50rpx;
- }
- }
- }
- }
-
- .card-head {
- display: flex;
- justify-content: space-between;
- }
-
- .j-c-s-a {
- justify-content: space-between;
- }
-
- .h {
- min-height: 70rpx;
- }
-
- .card_box {
- display: flex;
- align-items: center;
- flex-shrink: 0;
-
- margin: 0px 5px;
-
- .date {
- flex: 1;
-
- .data-item {
- display: flex;
- align-items: center;
- justify-content: space-between;
- min-height: 70rpx;
- font-size: 28rpx;
-
- >view {
- flex: 1;
- text-align: center;
- }
- }
-
- // width: 440rpx;
- }
-
- .title {
- font-size: 28rpx;
- }
- }
-
-
-
- ::v-deep .uni-date-x--border {
- border: none !important;
- }
-
- /deep/ .uni-date-editor--x {
- border: none !important;
- }
-
- /deep/ .datetime-picker--uni-date-x {
- background-color: #eaf2fc !important;
- }
-
- /deep/ .uni-date-x {
- background-color: #eaf2fc !important;
- }
-
- /deep/ .uni-date-x .icon-calendar {
- display: none;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/responsiblePerson.vue b/subPackage/realtimeMonitor/components/responsiblePerson.vue
deleted file mode 100644
index 6e878c0..0000000
--- a/subPackage/realtimeMonitor/components/responsiblePerson.vue
+++ /dev/null
@@ -1,192 +0,0 @@
-<template>
- <view class="respon">
- <card v-for="(item,index) in responsiblePersonList" :key="index">
- <view class="content" slot="content">
- <view class="content_item">
- <u-row customStyle="margin-bottom: 10px">
- <u-col span="12">
- <view class="text">
- <text>{{item.responsibleName}}</text>
- </view>
- </u-col>
-
- </u-row>
- <u-row customStyle="margin-bottom: 10px">
- <u-col span="12">
- <view class="text">
- <img class="img_icon" :src="imgList.xm">
- </img>
- <text>姓名:{{item.name}}</text>
- </view>
- </u-col>
- </u-row>
- <u-row customStyle="margin-bottom: 10px">
- <u-col span="11">
- <view class="text">
- <img class="img_icon" :src="imgList.dh">
- </img>
- <text>电话:{{item.phone}}</text>
- </view>
- </u-col>
- <u-col span="1">
- <view class="text" @click="call(item.phone)">
- <u-icon name="phone" color="#2979ff" size="28"></u-icon>
- </view>
- </u-col>
- </u-row>
- <u-row customStyle="margin-bottom: 10px">
- <u-col span="12">
- <view class="text">
- <img class="img_icon" :src="imgList.zw">
- </img>
- <text>职务:{{item.role}}</text>
- </view>
- </u-col>
- </u-row>
- <u-row customStyle="margin-bottom: 10px">
- <u-col span="12">
- <view class="text">
- <img class="img_icon" :src="imgList.dw">
- </img>
- <text>单位:{{item.deptName}}</text>
- </view>
- </u-col>
- </u-row>
-
- </view>
- </view>
- <view class="border" slot="footer"></view>
- </card>
- </view>
-</template>
-
-<script>
- import card from "@/components/my-components/card.vue"
- import {
- findResManagePersonByResId
- } from "@/api/dataCenter/responsiblePerson/responsiblePerson.js"
- export default {
- components: {
- card
- },
- props: ['reservoirId'],
- data() {
- return {
- responsiblePersonList: [],
- imgList: {
- xm: "https://sk.hubeishuiyi.cn/business/xcxImg/reaponse/xm.png",
- dh: "https://sk.hubeishuiyi.cn/business/xcxImg/reaponse/dh.png",
- zw: "https://sk.hubeishuiyi.cn/business/xcxImg/reaponse/zw.png",
- dw: "https://sk.hubeishuiyi.cn/business/xcxImg/reaponse/dw.png",
- }
- }
- },
- created() {
- this.loadResponsiblePersonList()
- },
- mounted() {
-
- },
- onLoad(option) {
-
- },
- onShow() {
-
- },
- methods: {
- call(phone) {
- uni.makePhoneCall({
- phoneNumber: phone
- });
- },
- loadResponsiblePersonList() {
- findResManagePersonByResId({
- resGuid: this.reservoirId
- }).then(res => {
- let data = res.data
- data.sort((a, b) => a.type - b.type)
- // 1行政责任人,2主管部门责任人,3管理单位责任人,4技术责任人, 5巡查责任人
- data.forEach(e => {
- if (e.type == 1) {
- this.responsiblePersonList.push({
- responsibleName: "行政责任人",
- name: e.userName,
- phone: e.userPhone,
- role: e.position,
- deptName: e.userUnit
- })
- }
-
- if (e.type == 2) {
- this.responsiblePersonList.push({
- responsibleName: "主管部门责任人",
- name: e.userName,
- phone: e.userPhone,
- role: e.position,
- deptName: e.userUnit
- })
- }
-
- if (e.type == 3) {
- this.responsiblePersonList.push({
- responsibleName: "管理单位责任人",
- name: e.userName,
- phone: e.userPhone,
- role: e.position,
- deptName: e.userUnit
- })
- }
-
- if (e.type == 4) {
- this.responsiblePersonList.push({
- responsibleName: "技术责任人",
- name: e.userName,
- phone: e.userPhone,
- role: e.position,
- deptName: e.userUnit
- })
- }
-
- if (e.type == 5) {
- this.responsiblePersonList.push({
- responsibleName: "巡查责任人",
- name: e.userName,
- phone: e.userPhone,
- role: e.position,
- deptName: e.userUnit
- })
- }
- })
- })
- }
- }
- }
-</script>
-
-<style lang="scss" scoped>
- .respon {
- .content {
- padding: 0 32rpx;
- margin-bottom: 8rpx;
-
- .text {
- font-size: 24rpx;
- display: flex;
- align-items: center;
-
- .img_icon {
- width: 20rpx;
- height: 20rpx;
- margin-right: 30rpx;
- }
- }
- }
-
- .border {
- background-color: #F9F9FA;
- width: 100%;
- height: 2rpx;
- padding: 4rpx 0;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/schemePlan.vue b/subPackage/realtimeMonitor/components/schemePlan.vue
deleted file mode 100644
index 9cb3d6f..0000000
--- a/subPackage/realtimeMonitor/components/schemePlan.vue
+++ /dev/null
@@ -1,118 +0,0 @@
-<template>
- <view class="schemePlan">
- <card height="240">
- <view slot="content">
- <view class="content">
- <text class="title">汛期调度运行计划</text>
- <view class="file_content">
- <image class="icon_img" mode='widthFix' :src="imgList.empty" alt="" />
- <text class="text">暂无方案文档</text>
- </view>
- </view>
-
- </view>
- </card>
- <u-gap height="5" bgColor="#d8d8d8"></u-gap>
- <card height="240">
- <view slot="content">
- <view class="content">
- <text class="title">调度运用方案(调度规程)</text>
- <view class="file_content">
- <image class="icon_img" mode='widthFix' :src="imgList.empty" alt="" />
- <text class="text">暂无方案文档</text>
- </view>
- </view>
-
- </view>
- </card>
- <u-gap height="5" bgColor="#d8d8d8"></u-gap>
- <card height="240">
- <view slot="content">
- <view class="content">
- <text class="title">大坝安全管理应急方案</text>
- <view class="file_content">
- <image class="icon_img" mode='widthFix' :src="imgList.empty" alt="" />
- <text class="text">暂无方案文档</text>
- </view>
- </view>
-
- </view>
- </card>
- <u-gap height="5" bgColor="#d8d8d8"></u-gap>
- <card height="240">
- <view slot="content">
- <view class="content">
- <text class="title">防汛抢险应急预案</text>
- <view class="file_content">
- <image class="icon_img" mode='widthFix' :src="imgList.empty" alt="" />
- <text class="text">暂无方案文档</text>
- </view>
- </view>
-
- </view>
- </card>
- <u-gap height="5" bgColor="#d8d8d8">
- </u-gap>
- </view>
-</template>
-
-<script>
- import card from "@/components/my-components/card.vue"
- export default {
- components: {
- card
- },
- data() {
- return {
- imgList: {
- empty: require("../static/img/plan/icon_data.png")
- }
- }
- },
- created() {
-
- },
- mounted() {
-
- },
- onLoad(option) {
-
- },
- onShow() {
-
- },
- methods: {
-
- }
- }
-</script>
-
-<style lang="scss" scoped>
- .schemePlan {
- .content {
- .title {
- font-size: 24rpx;
- font-weight: 700;
- margin-left: 52rpx;
- }
-
- .file_content {
- display: flex;
- flex-direction: column;
- justify-content: center;
- padding: 36rpx 0;
-
- .icon_img {
- width: 82rpx;
- margin-left: 82rpx;
- }
-
- .text {
- margin-left: 52rpx;
- font-size: 20rpx;
- color: #BBBBBB;
- }
- }
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/sq.vue b/subPackage/realtimeMonitor/components/sq.vue
deleted file mode 100644
index eaa5acd..0000000
--- a/subPackage/realtimeMonitor/components/sq.vue
+++ /dev/null
@@ -1,129 +0,0 @@
-<template>
- <view class="card-content" slot="content">
- <echart initId="sq" :option="sqOption"></echart>
- </view>
-</template>
-
-<script>
- // import echart from "@/components/echart/echart.vue"
- export default {
- // components: {
- // echart
- // },
- data() {
- return {
- sqOption: {
- tooltip: {
- trigger: 'axis'
- },
- legend: {
- selected: {
- '水位(m)': true,
- "汛限水位": true,
- "堰顶高程": false,
- "坝顶高程": false,
- "校核水位": false,
- "设计水位": false,
- "正常水位": false,
- "死水位": false,
- },
- left: "100",
- align: "right",
- data: ['水位(m)', "汛限水位", "坝顶高程", "堰顶高程", "校核水位", "设计水位", "正常水位", "死水位"],
- // '入库流量',
- padding: [20, 0, 0, 0],
- textStyle: {
- fontSize: 10
- },
- },
- xAxis: [{
- type: 'category',
- boundaryGap: false,
- data: []
- }],
- yAxis: [{
- type: 'value',
- name: "水位(m)",
- nameTextStyle: {
- fontSize: 8,
- vertivalAlign: "middle",
- padding: [0, 56, 0, 0]
- },
- min: (val) => {
- return val.min;
- },
- max: (val) => {
- return val.max;
- }
- }, ],
- grid: {
- bottom: "10%",
- top: "30%",
- // right: "10%",
- left: "17%"
- },
- series: [{
- name: '水位',
- type: 'line',
- color: "#FF8B07",
- data: [],
- lineStyle: {
- normal: {
- type: "solid"
- }
- },
- smooth: true,
- showSymbol: false
- },
- {
- type: "line",
- name: "汛限水位",
- markLine: {
- symbol: 'none',
- data: [{
- lineStyle: {
- color: "#1180ff",
- type: "dashed"
- },
- label: {
- position: "middle",
- fontWeight: 'bold',
- color: "#1180ff",
- formatter(params) {
- return `汛限水位 ${params.value}m`
- }
- },
- yAxis: 0
- }, ]
- }
- },
- ]
- },
- }
- },
- props: {
- option: {
- type: Object,
- default: () => {}
- }
- },
- watch: {
- option: {
- handler(newVal) {
- if (newVal) {
- this.sqOption = {
- ...this.sqOption,
- ...newVal
- }
- }
- },
- deep: true,
- immediate: true
- }
- },
- methods: {}
- }
-</script>
-
-<style scoped lang="scss">
-</style>
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/station.vue b/subPackage/realtimeMonitor/components/station.vue
deleted file mode 100644
index 7f3cc9a..0000000
--- a/subPackage/realtimeMonitor/components/station.vue
+++ /dev/null
@@ -1,685 +0,0 @@
-<template>
- <view class="container">
- <view style=" margin: 0 20rpx;">
- <Card>
- <template slot="insideHead">
- <view class="card_box headTitle">
- 水情监测
- </view>
- </template>
- <template slot="content">
- <view class="card_box j-c-s-a h" style="padding: 20rpx 0;">
- <view class="card_box h" style="background-color: #eaf2fc;padding: 0 10rpx; "
- @click="sqVisible=true">
- <view class="title">{{czOptionList[sqIndex].name}}</view>
- <u-icon name="arrow-down-fill" size="12"></u-icon>
- </view>
- <view class="date" style="background-color: #eaf2fc;">
- <uni-datetime-picker @change="czSqChange" :clear-icon="false" v-model="datetimerange"
- type="datetimerange" rangeSeparator="至" />
- </view>
- <view class="card_box h" style="background-color: #eaf2fc;padding: 0 10rpx;"
- @click="flagVisible=true">
- <view class="title">{{flagOption[flagIndex].name}}</view>
- <u-icon name="arrow-down-fill" size="12"></u-icon>
- </view>
- </view>
- <SqStation :option="sqEchartOption" ref="SqStation"></SqStation>
-
- </template>
- </Card>
- </view>
- <view style="margin: 0 20rpx;">
- <Card>
- <template slot="insideHead">
- <view class="card_box headTitle">
- 雨情监测
- </view>
- </template>
- <template slot="content">
- <view class="card_box j-c-s-a h" style="padding: 20rpx 0;">
- <view class="card_box h" style="background-color: #eaf2fc;padding: 0 10rpx;"
- @click="yqVisible=true">
- <view class="title">{{czOptionList[yqIndex].name}}</view>
- <u-icon name="arrow-down-fill" size="12"></u-icon>
- </view>
- <view class="date" style="background-color: #eaf2fc;">
- <uni-datetime-picker @change="czYqChange" :clear-icon="false" v-model="yqDatetimerange"
- type="datetimerange" rangeSeparator="至" />
- </view>
- <view class="card_box h" style="background-color: #eaf2fc;padding: 0 10rpx;"
- @click="intvVisible=true">
- <view class="title">{{intvOption[intvIndex].name}}</view>
- <u-icon name="arrow-down-fill" size="12"></u-icon>
- </view>
- </view>
- <YqStation :option='yqEchartOption' ref="YqStation"></YqStation>
- </template>
- </Card>
- </view>
-
- <view class="main">
- </view>
- <my-select v-if="sqVisible" :show="sqVisible" type="radio" v-model="sqValue" popupTitle="请选择"
- :dataLists="czOptionList" @cancel="sqVisible=false" @submit="sqSelectSubmit">
- </my-select>
- <my-select v-if="yqVisible" :show="yqVisible" type="radio" v-model="yqValue" popupTitle="请选择"
- :dataLists="czOptionList" @cancel="yqVisible=false" @submit="yqSelectSubmit">
- </my-select>
- <my-select v-if="flagVisible" :show="flagVisible" type="radio" v-model="flagValue" popupTitle="请选择"
- :dataLists="flagOption" @cancel="flagVisible=false" @submit="flagSelectSubmit">
- </my-select>
- <my-select v-if="intvVisible" :show="intvVisible" type="radio" v-model="intvValue" popupTitle="请选择"
- :dataLists="intvOption" @cancel="intvVisible=false" @submit="intvSelectSubmit">
- </my-select>
-
- </view>
-</template>
-
-<script>
- import YqStation from "@/subPackage/realtimeMonitor/components/yq.vue"
- import SqStation from "@/subPackage/realtimeMonitor/components/sq.vue"
- import echart from "@/components/echart/echart.vue"
- import uniDataSelect from "./uni-components/uni-data-select/components/uni-data-select/uni-data-select.vue"
- import uniDatetimePicker from "./uni-components/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue"
- import Card from "@/components/my-components/card.vue"
- import mySelect from "@/components/my-components/my-select.vue"
- import {
- TimeMinute,
- getEightHourTime,
- } from "@/utils/date"
- import {
- reservoirList,
- getReservoirBasicInfo,
- getRsbNorspiData
- } from "@/api/dataCenter/reservoir/reservoir.js"
- import {
- getStation,
- getSqList as sqList,
- getYqList as yqList
-
- } from "@/api/dataCenter/rainWaterCondition/rainWaterCondition"
- export default {
- props: {
- reservoirId: {
- type: String,
- default: ""
- }
- },
- components: {
- YqStation,
- SqStation,
- uniDataSelect,
- uniDatetimePicker,
- Card,
- mySelect,
- echart
- },
- data() {
- return {
- datetimerange: getEightHourTime(),
- yqDatetimerange: getEightHourTime(),
- params: {
- pageNo: 1,
- pageSize: 500,
- flag: "1",
- intv: "1"
- },
- //水情测站显示
- sqVisible: false,
- sqValue: "",
- sqIndex: 0,
- //雨情测站显示
- yqIndex: 0,
- yqValue: "",
- yqVisible: false,
- //时段类型相关数据
- flagOption: [{
- name: "实时",
- value: "1",
- index: 0,
- },
- {
- name: "整点",
- value: "2",
- index: 1,
- },
- {
- name: "八时",
- value: "3",
- index: 2,
- },
- ],
- flagIndex: 0,
- flagValue: "1",
- flagVisible: false,
- //小时类型
- intvOption: [{
- name: "1小时",
- value: "1",
- index: 0
- },
- {
- name: "3小时",
- value: "3",
- index: 1
- },
- {
- name: "6小时",
- value: "6",
- index: 2
- },
- {
- name: "12小时",
- value: "12",
- index: 3
- }
- ],
- intvVisible: false,
- intvIndex: 0,
- intvValue: "1",
- //获取测站数据
- czOptionList: [{
- name: "老站",
- index: 0
- }],
- sqEchartOption: {},
- yqEchartOption: {},
- }
- },
- created() {
- this.params.res_cd = this.reservoirId
- this.initGetStation()
- },
- options: {
- styleIsolation: 'shared'
- },
- methods: {
- //初始化监测站数据
- async initGetStation() {
- uni.showLoading({
- title: "加载中,请稍等",
- mask: true
- })
- const obj = {
- res_cd: this.reservoirId
- }
- const {
- resultList
- } = await getStation(obj)
- const arr = []
- let typeIndex = 0
- resultList.forEach((val, index) => {
- const obj = {
- name: `${val.sys_resource == 'wlw' ? `新站` : `老站`}`,
- value: val.guid,
- index: index,
- sys_resource: val.sys_resource
- }
- arr.push(obj)
- })
- if (arr.length > 0) {
- this.czOptionList = this.getTypeStation(arr)
- this.sqValue = this.czOptionList[0].value
- this.yqValue = this.czOptionList[0].value
- this.params.st_cd = this.czOptionList[0].value
- this.init()
- }
- uni.hideLoading()
- },
- //处理有多个新站或者老站的数据
- getTypeStation(data) {
- if (data.length <= 0) return []
- //获取老站数据
- const lkList = data.filter(v => v.sys_resource == 'lk')
- //获取新站数据
- const xkList = data.filter(v => v.sys_resource == 'wlw')
- this.dealStation(lkList)
- this.dealStation(xkList)
- return [...lkList, ...xkList].sort((a, b) => a.index - b.index)
- },
- dealStation(list) {
- if (list.length <= 1) return
- list.forEach((v, index) => v.name = v.name + (index + 1))
- },
- //水情测点切换
- sqSelectSubmit(e) {
- this.sqIndex = e.index
- this.sqVisible = false
- this.sqValue = e.value
- const params = {
- st_cd: e.value
- }
- this.params = {
- ...this.params,
- ...params
- }
- this.getSqList()
- },
- //雨情测点切换
- yqSelectSubmit(e) {
- this.yqIndex = e.index
- this.yqVisible = false
- this.yqValue = e.value
- const params = {
- st_cd: e.value
- }
- this.params = {
- ...this.params,
- ...params
- }
- this.getYqList()
- },
- //时段类型切换
- flagSelectSubmit(e) {
- this.flagIndex = e.index
- this.flagVisible = false
- this.flagValue = e.value
- const params = {
- flag: e.value
- }
- this.params = {
- ...this.params,
- ...params
- }
- this.getSqList()
- },
- //雨情小时类型切换
- intvSelectSubmit(e) {
- this.intvIndex = e.index
- this.intvVisible = false
- this.intvValue = e.value
- const params = {
- intv: e.value
- }
- this.params = {
- ...this.params,
- ...params
- }
- this.getYqList()
- },
- //初始化
- init() {
- this.getSqList()
- this.getYqList()
- },
- //水情列表
- async getSqList() {
- const resData = {
- res_cd: this.reservoirId
- }
- const tbData = await getReservoirBasicInfo(resData)
- const ydgc = await getRsbNorspiData(resData).catch(err => this.loading = false)
- const [start_dt, end_dt] = this.datetimerange
- const obj = {
- ...this.params,
- start_dt,
- end_dt
- }
- const {
- data
- } = await sqList(obj)
- data.forEach(val => {
- val.tm = new Date(val.tm).getTime()
- val.time = TimeMinute(new Date(val.tm).getTime())
- })
-
- const xAxis = data.sort((a, b) => a.tm - b.tm).map(val => val.time)
- const swData = data.sort((a, b) => a.tm - b.tm).map(val => val.rz)
- const res = await reservoirList(1, 1, {
- res_cd: this.reservoirId
- })
- this.sqOptionDeal(tbData.data[0], data, ydgc)
- uni.hideLoading()
- },
- sqOptionDeal(xxswData, data, ydgc) {
- if (data.length <= 0) return
- //使用深拷贝处理表格的时间倒叙变正序
- const deepArr = JSON.parse(JSON.stringify(data))
- const xAxis = deepArr.sort((a, b) => a.tm - b.tm).map(val => val.time)
- //汛限水位
- const xxswValue = xxswData.mid_flood_flse_stag
- //水位
- const series2 = deepArr.sort((a, b) => a.tm - b.tm).map(val => val.rz)
- //获取最大水位
- const maxWater = Math.max(...series2)
- //获取死水位
- const dead_stag = xxswData.tb_dead_stag || 0
- //获取正常水位
- const norm_pool_stag = xxswData.tb_norm_pool_stag || 0
- //获取设计水位
- const des_fl_stag = xxswData.tb_des_fl_stag || 0
- //获取校核水位
- const chec_fl_stag = xxswData.tb_chec_fl_stag || 0
- //获取坝顶高程
- const dam_top_elevation = xxswData.tb_dam_top_elevation || 0
- //获取堰顶高程
- const weir_top_elev = ydgc.resultList[0].tb_weir_top_elevation || 0
- const numberData = [maxWater, xxswValue, dead_stag, norm_pool_stag, des_fl_stag, chec_fl_stag,
- dam_top_elevation, weir_top_elev
- ]
- //最大值
- const max = Math.max(...numberData)
- //最小值
- const min = Math.min(...numberData)
- this.sqEchartOption = {
- color: ["#FF8B07", "#1180ff", "#f800e8", "#08dca9", "green", "black", "brown", "red"],
- xAxis: [{
- data: xAxis
- }],
- title: {
- text: "水位过程线",
- textStyle: {
- fontSize: 14,
- fontWeight: "normal"
- }
- },
- yAxis: [{
- type: 'value',
- name: "水位(m)",
- nameTextStyle: {
- fontSize: 8,
- vertivalAlign: "middle",
- padding: [0, 56, 0, 0]
- },
- min: (min - 0.5).toFixed(2),
- max: (val) => {
- return (max + 0.5).toFixed(2);
- }
- }, ],
- series: [{
- name: '水位(m)',
- type: 'line',
- data: series2,
- lineStyle: {
- normal: {
- type: "solid"
- }
- },
- smooth: true,
- showSymbol: false
- },
- {
- type: "line",
- name: "汛限水位",
- markLine: {
- symbol: 'none',
- data: [{
- lineStyle: {
- color: "#1180ff",
- type: "dashed"
- },
- label: {
- position: "middle",
- fontWeight: 'bold',
- formatter(params) {
- return `汛限水位 ${params.value}m`
- }
- },
- yAxis: xxswValue
- }, ]
- }
- },
- {
- type: "line",
- name: "死水位",
- markLine: {
- symbol: 'none',
- data: [{
- lineStyle: {
- type: "dashed"
- },
- label: {
- position: "insideStartTop",
- distance: 5,
- fontWeight: 'bold',
- formatter(params) {
- return `死水位 ${params.value}m`
- }
- },
- yAxis: dead_stag
- }, ]
- }
- },
- {
- type: "line",
- name: "正常水位",
- markLine: {
- symbol: 'none',
- data: [{
- lineStyle: {
- type: "dashed"
- },
- label: {
- position: "insideStartBottom",
- fontWeight: 'bold',
- formatter(params) {
- return `正常水位 ${params.value}m`
- }
- },
- yAxis: norm_pool_stag
- }, ]
- }
- },
- {
- type: "line",
- name: "设计水位",
- markLine: {
- symbol: 'none',
- data: [{
- lineStyle: {
- type: "dashed"
- },
- label: {
- position: "insideMiddleTop",
- fontWeight: 'bold',
- formatter(params) {
- return `设计水位 ${params.value}m`
- }
- },
- yAxis: des_fl_stag
- }, ]
- }
- },
- {
- type: "line",
- name: "校核水位",
- markLine: {
- symbol: 'none',
- data: [{
- lineStyle: {
- type: "dashed"
- },
- label: {
- position: "insideEndTop",
- fontWeight: 'bold',
- formatter(params) {
- return `校核水位 ${params.value}m`
- }
- },
- yAxis: chec_fl_stag
- }, ]
- }
- },
- {
- type: "line",
- name: "坝顶高程",
- markLine: {
- symbol: 'none',
- data: [{
- lineStyle: {
- type: "dashed"
- },
- label: {
- position: "insideEndBottom",
- fontWeight: 'bold',
- formatter(params) {
- return `坝顶高程 ${params.value}m`
- }
- },
- yAxis: dam_top_elevation
- }, ]
- }
- },
- {
- type: "line",
- name: "堰顶高程",
- markLine: {
- symbol: 'none',
- data: [{
- lineStyle: {
- type: "dashed"
- },
- label: {
- position: "insideStartBottom",
- fontWeight: 'bold',
- formatter(params) {
- return `堰顶高程 ${params.value}m`
- }
- },
- yAxis: weir_top_elev
- }, ]
- }
- },
- ]
- }
- },
- //雨情列表
- async getYqList() {
- const [start_tm, end_tm] = this.yqDatetimerange
- const {
- st_cd,
- res_cd,
- intv
- } = this.params
- const params = {
- start_tm,
- end_tm,
- st_cd,
- res_cd,
- intv
- }
- const {
- data
- } = await yqList(params)
- data.data.forEach(val => {
- val.tm = new Date(val.tm).getTime()
- val.time = TimeMinute(new Date(val.tm).getTime())
- })
- const xAxis = data.data.sort((a, b) => a.tm - b.tm).map(val => val.time)
- const series1 = data.data.map(val => val.accp)
- const series2 = data.data.map(val => val.drp)
- this.yqEchartOption = {
- xAxis: [{
- data: xAxis
- }],
- series: [{
- name: '时段雨量(mm)',
- type: 'bar',
- barWidth: "10",
- yAxisIndex: 0,
- itemStyle: {
- color: "#1890FF"
- },
- tooltip: {
- valueFormatter: function(value) {
- return value + 'mm'
- }
- },
- data: series2,
- }]
- }
- },
- changeType(item) {
- if (this.params.flag == item.value) return
- this.params.flag = item.value
- this.getSqList()
- },
- changeRain(item) {
- if (this.params.intv == item.value) return
- this.params.intv = item.value
- this.getYqList()
- },
- changeStcd(item) {
- if (this.params.st_cd == item.value) return
- this.params.st_cd = item.value
- this.init()
- },
- czSqChange(e) {
- const [start_dt, end_dt] = e
- const params = {
- start_dt,
- end_dt
- }
- this.params = {
- ...this.params,
- ...params
- }
- this.getSqList()
- },
- czYqChange(e) {
- this.getYqList()
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- ::v-deep .uni-date-x--border {
- border: none !important;
- }
-
- /deep/ .uni-date-editor--x {
- border: none !important;
- }
-
- /deep/ .datetime-picker--uni-date-x {
- background-color: #eaf2fc !important;
- }
-
- /deep/ .uni-date-x {
- background-color: #eaf2fc !important;
- }
-
- /deep/ .uni-date-x .icon-calendar {
- display: none;
- }
-
- .container {
-
- // background-color: #f2f2f2;
- .headTitle {
- font-size: 32rpx;
- font-weight: 600;
- }
-
- .flex {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- }
-
- .j-c-s-a {
- justify-content: space-around;
- }
-
- .h {
- min-height: 70rpx;
- }
-
- .card_box {
- display: flex;
- align-items: center;
-
- .date {
- width: 400rpx;
- }
-
- .title {
- font-size: 32rpx;
- }
- }
-
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-data-select/changelog.md b/subPackage/realtimeMonitor/components/uni-components/uni-data-select/changelog.md
deleted file mode 100644
index eb3d1ce..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-data-select/changelog.md
+++ /dev/null
@@ -1,35 +0,0 @@
-## 1.0.6(2023-04-12)
-- 修复 微信小程序点击时会改变背景颜色的 bug
-## 1.0.5(2023-02-03)
-- 修复 禁用时会显示清空按钮
-## 1.0.4(2023-02-02)
-- 优化 查询条件短期内多次变更只查询最后一次变更后的结果
-- 调整 内部缓存键名调整为 uni-data-select-lastSelectedValue
-## 1.0.3(2023-01-16)
-- 修复 不关联服务空间报错的问题
-## 1.0.2(2023-01-14)
-- 新增 属性 `format` 可用于格式化显示选项内容
-## 1.0.1(2022-12-06)
-- 修复 当where变化时,数据不会自动更新的问题
-## 0.1.9(2022-09-05)
-- 修复 微信小程序下拉框出现后选择会点击到蒙板后面的输入框
-## 0.1.8(2022-08-29)
-- 修复 点击的位置不准确
-## 0.1.7(2022-08-12)
-- 新增 支持 disabled 属性
-## 0.1.6(2022-07-06)
-- 修复 pc端宽度异常的bug
-## 0.1.5
-- 修复 pc端宽度异常的bug
-## 0.1.4(2022-07-05)
-- 优化 显示样式
-## 0.1.3(2022-06-02)
-- 修复 localdata 赋值不生效的 bug
-- 新增 支持 uni.scss 修改颜色
-- 新增 支持选项禁用(数据选项设置 disabled: true 即禁用)
-## 0.1.2(2022-05-08)
-- 修复 当 value 为 0 时选择不生效的 bug
-## 0.1.1(2022-05-07)
-- 新增 记住上次的选项(仅 collection 存在时有效)
-## 0.1.0(2022-04-22)
-- 初始化
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-data-select/components/uni-data-select/uni-data-select.vue b/subPackage/realtimeMonitor/components/uni-components/uni-data-select/components/uni-data-select/uni-data-select.vue
deleted file mode 100644
index 6bcabfb..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-data-select/components/uni-data-select/uni-data-select.vue
+++ /dev/null
@@ -1,523 +0,0 @@
-<template>
- <view class="uni-stat__select">
- <span v-if="label" class="uni-label-text hide-on-phone">{{label + ':'}}</span>
- <view class="uni-stat-box" :class="{'uni-stat__actived': current}">
- <view class="uni-select" :class="{'uni-select--disabled':disabled}">
- <view class="uni-select__input-box" @click="toggleSelector">
- <view v-if="current" class="uni-select__input-text">{{current}}</view>
- <view v-else class="uni-select__input-text uni-select__input-placeholder">{{typePlaceholder}}</view>
- <view v-if="current && clear && !disabled" @click.stop="clearVal">
- <uni-icons type="clear" color="#c0c4cc" size="24" />
- </view>
- <view v-else>
- <uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" />
- </view>
- </view>
- <view class="uni-select--mask" v-if="showSelector" @click="toggleSelector" />
- <view class="uni-select__selector" v-if="showSelector">
- <view class="uni-popper__arrow"></view>
- <scroll-view scroll-y="true" class="uni-select__selector-scroll">
- <view class="uni-select__selector-empty" v-if="mixinDatacomResData.length === 0">
- <text>{{emptyTips}}</text>
- </view>
- <view v-else class="uni-select__selector-item" v-for="(item,index) in mixinDatacomResData"
- :key="index" @click="change(item)">
- <text
- :class="{'uni-select__selector__disabled': item.disable}">{{formatItemName(item)}}</text>
- </view>
- </scroll-view>
- </view>
- </view>
- </view>
- </view>
-</template>
-
-<script>
- import uniIcons from "../../../uni-icons/components/uni-icons/uni-icons.vue"
- /**
- * DataChecklist 数据选择器
- * @description 通过数据渲染的下拉框组件
- * @tutorial https://uniapp.dcloud.io/component/uniui/uni-data-select
- * @property {String} value 默认值
- * @property {Array} localdata 本地数据 ,格式 [{text:'',value:''}]
- * @property {Boolean} clear 是否可以清空已选项
- * @property {Boolean} emptyText 没有数据时显示的文字 ,本地数据无效
- * @property {String} label 左侧标题
- * @property {String} placeholder 输入框的提示文字
- * @property {Boolean} disabled 是否禁用
- * @event {Function} change 选中发生变化触发
- */
-
- export default {
- name: "uni-data-select",
- components: {
- uniIcons
- },
- mixins: [uniCloud.mixinDatacom || {}],
- props: {
- localdata: {
- type: Array,
- default () {
- return []
- }
- },
- value: {
- type: [String, Number],
- default: ''
- },
- modelValue: {
- type: [String, Number],
- default: ''
- },
- label: {
- type: String,
- default: ''
- },
- placeholder: {
- type: String,
- default: '请选择'
- },
- emptyTips: {
- type: String,
- default: '无选项'
- },
- clear: {
- type: Boolean,
- default: true
- },
- defItem: {
- type: Number,
- default: 0
- },
- disabled: {
- type: Boolean,
- default: false
- },
- // 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}"
- format: {
- type: String,
- default: ''
- },
- },
- data() {
- return {
- showSelector: false,
- current: '',
- mixinDatacomResData: [],
- apps: [],
- channels: [],
- cacheKey: "uni-data-select-lastSelectedValue",
- };
- },
- created() {
- this.debounceGet = this.debounce(() => {
- this.query();
- }, 300);
- if (this.collection && !this.localdata.length) {
- this.debounceGet();
- }
- },
- computed: {
- typePlaceholder() {
- const text = {
- 'opendb-stat-app-versions': '版本',
- 'opendb-app-channels': '渠道',
- 'opendb-app-list': '应用'
- }
- const common = this.placeholder
- const placeholder = text[this.collection]
- return placeholder ?
- common + placeholder :
- common
- },
- valueCom() {
- // #ifdef VUE3
- return this.modelValue;
- // #endif
- // #ifndef VUE3
- return this.value;
- // #endif
- }
- },
- watch: {
- localdata: {
- immediate: true,
- handler(val, old) {
- if (Array.isArray(val) && old !== val) {
- this.mixinDatacomResData = val
- }
- }
- },
- valueCom(val, old) {
- this.initDefVal()
- },
- mixinDatacomResData: {
- immediate: true,
- handler(val) {
- if (val.length) {
- this.initDefVal()
- }
- }
- }
- },
- methods: {
- debounce(fn, time = 100) {
- let timer = null
- return function(...args) {
- if (timer) clearTimeout(timer)
- timer = setTimeout(() => {
- fn.apply(this, args)
- }, time)
- }
- },
- // 执行数据库查询
- query() {
- this.mixinDatacomEasyGet();
- },
- // 监听查询条件变更事件
- onMixinDatacomPropsChange() {
- if (this.collection) {
- this.debounceGet();
- }
- },
- initDefVal() {
- let defValue = ''
- if ((this.valueCom || this.valueCom === 0) && !this.isDisabled(this.valueCom)) {
- defValue = this.valueCom
- } else {
- let strogeValue
- if (this.collection) {
- strogeValue = this.getCache()
- }
- if (strogeValue || strogeValue === 0) {
- defValue = strogeValue
- } else {
- let defItem = ''
- if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) {
- defItem = this.mixinDatacomResData[this.defItem - 1].value
- }
- defValue = defItem
- }
- if (defValue || defValue === 0) {
- this.emit(defValue)
- }
- }
- const def = this.mixinDatacomResData.find(item => item.value === defValue)
- this.current = def ? this.formatItemName(def) : ''
- },
-
- /**
- * @param {[String, Number]} value
- * 判断用户给的 value 是否同时为禁用状态
- */
- isDisabled(value) {
- let isDisabled = false;
-
- this.mixinDatacomResData.forEach(item => {
- if (item.value === value) {
- isDisabled = item.disable
- }
- })
-
- return isDisabled;
- },
-
- clearVal() {
- this.emit('')
- if (this.collection) {
- this.removeCache()
- }
- },
- change(item) {
- if (!item.disable) {
- this.showSelector = false
- this.current = this.formatItemName(item)
- this.emit(item.value)
- }
- },
- emit(val) {
- this.$emit('input', val)
- this.$emit('update:modelValue', val)
- this.$emit('change', val)
- if (this.collection) {
- this.setCache(val);
- }
- },
- toggleSelector() {
- if (this.disabled) {
- return
- }
-
- this.showSelector = !this.showSelector
- },
- formatItemName(item) {
- let {
- text,
- value,
- channel_code
- } = item
- channel_code = channel_code ? `(${channel_code})` : ''
-
- if (this.format) {
- // 格式化输出
- let str = "";
- str = this.format;
- for (let key in item) {
- str = str.replace(new RegExp(`{${key}}`, "g"), item[key]);
- }
- return str;
- } else {
- return this.collection.indexOf('app-list') > 0 ?
- `${text}(${value})` :
- (
- text ?
- text :
- `未命名${channel_code}`
- )
- }
- },
- // 获取当前加载的数据
- getLoadData() {
- return this.mixinDatacomResData;
- },
- // 获取当前缓存key
- getCurrentCacheKey() {
- return this.collection;
- },
- // 获取缓存
- getCache(name = this.getCurrentCacheKey()) {
- let cacheData = uni.getStorageSync(this.cacheKey) || {};
- return cacheData[name];
- },
- // 设置缓存
- setCache(value, name = this.getCurrentCacheKey()) {
- let cacheData = uni.getStorageSync(this.cacheKey) || {};
- cacheData[name] = value;
- uni.setStorageSync(this.cacheKey, cacheData);
- },
- // 删除缓存
- removeCache(name = this.getCurrentCacheKey()) {
- let cacheData = uni.getStorageSync(this.cacheKey) || {};
- delete cacheData[name];
- uni.setStorageSync(this.cacheKey, cacheData);
- },
- }
- }
-</script>
-
-<style lang="scss">
- $uni-base-color: #6a6a6a !default;
- $uni-main-color: #333 !default;
- $uni-secondary-color: #909399 !default;
- $uni-border-3: #e5e5e5;
-
-
- /* #ifndef APP-NVUE */
- @media screen and (max-width: 500px) {
- .hide-on-phone {
- display: none;
- }
- }
-
- /* #endif */
- .uni-stat__select {
- display: flex;
- align-items: center;
- // padding: 15px;
- /* #ifdef H5 */
- cursor: pointer;
- /* #endif */
- width: 100%;
- flex: 1;
- box-sizing: border-box;
- }
-
- .uni-stat-box {
- width: 100%;
- flex: 1;
- }
-
- .uni-stat__actived {
- width: 100%;
- flex: 1;
- // outline: 1px solid #2979ff;
- }
-
- .uni-label-text {
- font-size: 14px;
- font-weight: bold;
- color: $uni-base-color;
- margin: auto 0;
- margin-right: 5px;
- }
-
- .uni-select {
- font-size: 14px;
- border: 1px solid $uni-border-3;
- box-sizing: border-box;
- border-radius: 4px;
- padding: 0 5px;
- padding-left: 10px;
- position: relative;
- /* #ifndef APP-NVUE */
- display: flex;
- user-select: none;
- /* #endif */
- flex-direction: row;
- align-items: center;
- border-bottom: solid 1px $uni-border-3;
- width: 100%;
- flex: 1;
- height: 35px;
-
- &--disabled {
- background-color: #f5f7fa;
- cursor: not-allowed;
- }
- }
-
- .uni-select__label {
- font-size: 16px;
- // line-height: 22px;
- height: 35px;
- padding-right: 10px;
- color: $uni-secondary-color;
- }
-
- .uni-select__input-box {
- height: 35px;
- position: relative;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex: 1;
- flex-direction: row;
- align-items: center;
- }
-
- .uni-select__input {
- flex: 1;
- font-size: 14px;
- height: 22px;
- line-height: 22px;
- }
-
- .uni-select__input-plac {
- font-size: 14px;
- color: $uni-secondary-color;
- }
-
- .uni-select__selector {
- /* #ifndef APP-NVUE */
- box-sizing: border-box;
- /* #endif */
- position: absolute;
- top: calc(100% + 12px);
- left: 0;
- width: 100%;
- background-color: #FFFFFF;
- border: 1px solid #EBEEF5;
- border-radius: 6px;
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
- z-index: 3;
- padding: 4px 0;
- }
-
- .uni-select__selector-scroll {
- /* #ifndef APP-NVUE */
- max-height: 200px;
- box-sizing: border-box;
- /* #endif */
- }
-
- /* #ifdef H5 */
- @media (min-width: 768px) {
- .uni-select__selector-scroll {
- max-height: 600px;
- }
- }
-
- /* #endif */
-
- .uni-select__selector-empty,
- .uni-select__selector-item {
- /* #ifndef APP-NVUE */
- display: flex;
- cursor: pointer;
- /* #endif */
- line-height: 35px;
- font-size: 14px;
- text-align: center;
- /* border-bottom: solid 1px $uni-border-3; */
- padding: 0px 10px;
- }
-
- .uni-select__selector-item:hover {
- background-color: #f9f9f9;
- }
-
- .uni-select__selector-empty:last-child,
- .uni-select__selector-item:last-child {
- /* #ifndef APP-NVUE */
- border-bottom: none;
- /* #endif */
- }
-
- .uni-select__selector__disabled {
- opacity: 0.4;
- cursor: default;
- }
-
- /* picker 弹出层通用的指示小三角 */
- .uni-popper__arrow,
- .uni-popper__arrow::after {
- position: absolute;
- display: block;
- width: 0;
- height: 0;
- border-color: transparent;
- border-style: solid;
- border-width: 6px;
- }
-
- .uni-popper__arrow {
- filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
- top: -6px;
- left: 10%;
- margin-right: 3px;
- border-top-width: 0;
- border-bottom-color: #EBEEF5;
- }
-
- .uni-popper__arrow::after {
- content: " ";
- top: 1px;
- margin-left: -6px;
- border-top-width: 0;
- border-bottom-color: #fff;
- }
-
- .uni-select__input-text {
- // width: 280px;
- width: 100%;
- color: $uni-main-color;
- white-space: nowrap;
- text-overflow: ellipsis;
- -o-text-overflow: ellipsis;
- overflow: hidden;
- }
-
- .uni-select__input-placeholder {
- color: $uni-base-color;
- font-size: 12px;
- }
-
- .uni-select--mask {
- position: fixed;
- top: 0;
- bottom: 0;
- right: 0;
- left: 0;
- z-index: 2;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-data-select/package.json b/subPackage/realtimeMonitor/components/uni-components/uni-data-select/package.json
deleted file mode 100644
index 0187429..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-data-select/package.json
+++ /dev/null
@@ -1,85 +0,0 @@
-{
- "id": "uni-data-select",
- "displayName": "uni-data-select 下拉框选择器",
- "version": "1.0.6",
- "description": "通过数据驱动的下拉框选择器",
- "keywords": [
- "uni-ui",
- "select",
- "uni-data-select",
- "下拉框",
- "下拉选"
-],
- "repository": "https://github.com/dcloudio/uni-ui",
- "engines": {
- "HBuilderX": "^3.1.1"
- },
- "directories": {
- "example": "../../temps/example_temps"
- },
-"dcloudext": {
- "sale": {
- "regular": {
- "price": "0.00"
- },
- "sourcecode": {
- "price": "0.00"
- }
- },
- "contact": {
- "qq": ""
- },
- "declaration": {
- "ads": "无",
- "data": "无",
- "permissions": "无"
- },
- "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
- "type": "component-vue"
- },
- "uni_modules": {
- "dependencies": ["uni-load-more"],
- "encrypt": [],
- "platforms": {
- "cloud": {
- "tcb": "y",
- "aliyun": "y"
- },
- "client": {
- "App": {
- "app-vue": "u",
- "app-nvue": "n"
- },
- "H5-mobile": {
- "Safari": "y",
- "Android Browser": "y",
- "微信浏览器(Android)": "y",
- "QQ浏览器(Android)": "y"
- },
- "H5-pc": {
- "Chrome": "y",
- "IE": "y",
- "Edge": "y",
- "Firefox": "y",
- "Safari": "y"
- },
- "小程序": {
- "微信": "y",
- "阿里": "u",
- "百度": "u",
- "字节跳动": "u",
- "QQ": "u",
- "京东": "u"
- },
- "快应用": {
- "华为": "u",
- "联盟": "u"
- },
- "Vue": {
- "vue2": "y",
- "vue3": "y"
- }
- }
- }
- }
-}
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-data-select/readme.md b/subPackage/realtimeMonitor/components/uni-components/uni-data-select/readme.md
deleted file mode 100644
index eb58de3..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-data-select/readme.md
+++ /dev/null
@@ -1,8 +0,0 @@
-## DataSelect 下拉框选择器
-> **组件名:uni-data-select**
-> 代码块: `uDataSelect`
-
-当选项过多时,使用下拉菜单展示并选择内容
-
-### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-data-select)
-#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/changelog.md b/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/changelog.md
deleted file mode 100644
index 47e3ccf..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/changelog.md
+++ /dev/null
@@ -1,137 +0,0 @@
-## 2.2.23(2023-05-02)
-- 修复 部分情况修改时间,开始时间未更新 [详情](https://github.com/dcloudio/uni-ui/issues/737)
-- 修复 部分平台及设备第一次点击无法显示弹框
-- 修复 ios 日期格式未补零显示及使用异常 [详情](https://ask.dcloud.net.cn/question/162979)
-## 2.2.22(2023-03-30)
-- 修复 日历 picker 修改年月后,自动选中当月1日 [详情](https://ask.dcloud.net.cn/question/165937)
-- 修复 小程序端 低版本 ios NaN [详情](https://ask.dcloud.net.cn/question/162979)
-## 2.2.21(2023-02-20)
-- 修复 firefox 浏览器显示区域点击无法拉起日历弹框的Bug [详情](https://ask.dcloud.net.cn/question/163362)
-## 2.2.20(2023-02-17)
-- 优化 值为空依然选中当天问题
-- 优化 提供 default-value 属性支持配置选择器打开时默认显示的时间
-- 优化 非范围选择未选择日期时间,点击确认按钮选中当前日期时间
-- 优化 字节小程序日期时间范围选择,底部日期换行问题
-## 2.2.19(2023-02-09)
-- 修复 2.2.18 引起范围选择配置 end 选择无效的Bug [详情](https://github.com/dcloudio/uni-ui/issues/686)
-## 2.2.18(2023-02-08)
-- 修复 移动端范围选择change事件触发异常的Bug [详情](https://github.com/dcloudio/uni-ui/issues/684)
-- 优化 PC端输入日期格式错误时返回当前日期时间
-- 优化 PC端输入日期时间超出 start、end 限制的Bug
-- 优化 移动端日期时间范围用法时间展示不完整问题
-## 2.2.17(2023-02-04)
-- 修复 小程序端绑定 Date 类型报错的Bug [详情](https://github.com/dcloudio/uni-ui/issues/679)
-- 修复 vue3 time-picker 无法显示绑定时分秒的Bug
-## 2.2.16(2023-02-02)
-- 修复 字节小程序报错的Bug
-## 2.2.15(2023-02-02)
-- 修复 某些情况切换月份错误的Bug
-## 2.2.14(2023-01-30)
-- 修复 某些情况切换月份错误的Bug [详情](https://ask.dcloud.net.cn/question/162033)
-## 2.2.13(2023-01-10)
-- 修复 多次加载组件造成内存占用的Bug
-## 2.2.12(2022-12-01)
-- 修复 vue3 下 i18n 国际化初始值不正确的Bug
-## 2.2.11(2022-09-19)
-- 修复 支付宝小程序样式错乱的Bug [详情](https://github.com/dcloudio/uni-app/issues/3861)
-## 2.2.10(2022-09-19)
-- 修复 反向选择日期范围,日期显示异常的Bug [详情](https://ask.dcloud.net.cn/question/153401?item_id=212892&rf=false)
-## 2.2.9(2022-09-16)
-- 可以使用 uni-scss 控制主题色
-## 2.2.8(2022-09-08)
-- 修复 close事件无效的Bug
-## 2.2.7(2022-09-05)
-- 修复 移动端 maskClick 无效的Bug [详情](https://ask.dcloud.net.cn/question/140824)
-## 2.2.6(2022-06-30)
-- 优化 组件样式,调整了组件图标大小、高度、颜色等,与uni-ui风格保持一致
-## 2.2.5(2022-06-24)
-- 修复 日历顶部年月及底部确认未国际化的Bug
-## 2.2.4(2022-03-31)
-- 修复 Vue3 下动态赋值,单选类型未响应的Bug
-## 2.2.3(2022-03-28)
-- 修复 Vue3 下动态赋值未响应的Bug
-## 2.2.2(2021-12-10)
-- 修复 clear-icon 属性在小程序平台不生效的Bug
-## 2.2.1(2021-12-10)
-- 修复 日期范围选在小程序平台,必须多点击一次才能取消选中状态的Bug
-## 2.2.0(2021-11-19)
-- 优化 组件UI,并提供设计资源 [详情](https://uniapp.dcloud.io/component/uniui/resource)
-- 文档迁移 [https://uniapp.dcloud.io/component/uniui/uni-datetime-picker](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker)
-## 2.1.5(2021-11-09)
-- 新增 提供组件设计资源,组件样式调整
-## 2.1.4(2021-09-10)
-- 修复 hide-second 在移动端的Bug
-- 修复 单选赋默认值时,赋值日期未高亮的Bug
-- 修复 赋默认值时,移动端未正确显示时间的Bug
-## 2.1.3(2021-09-09)
-- 新增 hide-second 属性,支持只使用时分,隐藏秒
-## 2.1.2(2021-09-03)
-- 优化 取消选中时(范围选)直接开始下一次选择, 避免多点一次
-- 优化 移动端支持清除按钮,同时支持通过 ref 调用组件的 clear 方法
-- 优化 调整字号大小,美化日历界面
-- 修复 因国际化导致的 placeholder 失效的Bug
-## 2.1.1(2021-08-24)
-- 新增 支持国际化
-- 优化 范围选择器在 pc 端过宽的问题
-## 2.1.0(2021-08-09)
-- 新增 适配 vue3
-## 2.0.19(2021-08-09)
-- 新增 支持作为 uni-forms 子组件相关功能
-- 修复 在 uni-forms 中使用时,选择时间报 NAN 错误的Bug
-## 2.0.18(2021-08-05)
-- 修复 type 属性动态赋值无效的Bug
-- 修复 ‘确认’按钮被 tabbar 遮盖 bug
-- 修复 组件未赋值时范围选左、右日历相同的Bug
-## 2.0.17(2021-08-04)
-- 修复 范围选未正确显示当前值的Bug
-- 修复 h5 平台(移动端)报错 'cale' of undefined 的Bug
-## 2.0.16(2021-07-21)
-- 新增 return-type 属性支持返回 date 日期对象
-## 2.0.15(2021-07-14)
-- 修复 单选日期类型,初始赋值后不在当前日历的Bug
-- 新增 clearIcon 属性,显示框的清空按钮可配置显示隐藏(仅 pc 有效)
-- 优化 移动端移除显示框的清空按钮,无实际用途
-## 2.0.14(2021-07-14)
-- 修复 组件赋值为空,界面未更新的Bug
-- 修复 start 和 end 不能动态赋值的Bug
-- 修复 范围选类型,用户选择后再次选择右侧日历(结束日期)显示不正确的Bug
-## 2.0.13(2021-07-08)
-- 修复 范围选择不能动态赋值的Bug
-## 2.0.12(2021-07-08)
-- 修复 范围选择的初始时间在一个月内时,造成无法选择的bug
-## 2.0.11(2021-07-08)
-- 优化 弹出层在超出视窗边缘定位不准确的问题
-## 2.0.10(2021-07-08)
-- 修复 范围起始点样式的背景色与今日样式的字体前景色融合,导致日期字体看不清的Bug
-- 优化 弹出层在超出视窗边缘被遮盖的问题
-## 2.0.9(2021-07-07)
-- 新增 maskClick 事件
-- 修复 特殊情况日历 rpx 布局错误的Bug,rpx -> px
-- 修复 范围选择时清空返回值不合理的bug,['', ''] -> []
-## 2.0.8(2021-07-07)
-- 新增 日期时间显示框支持插槽
-## 2.0.7(2021-07-01)
-- 优化 添加 uni-icons 依赖
-## 2.0.6(2021-05-22)
-- 修复 图标在小程序上不显示的Bug
-- 优化 重命名引用组件,避免潜在组件命名冲突
-## 2.0.5(2021-05-20)
-- 优化 代码目录扁平化
-## 2.0.4(2021-05-12)
-- 新增 组件示例地址
-## 2.0.3(2021-05-10)
-- 修复 ios 下不识别 '-' 日期格式的Bug
-- 优化 pc 下弹出层添加边框和阴影
-## 2.0.2(2021-05-08)
-- 修复 在 admin 中获取弹出层定位错误的bug
-## 2.0.1(2021-05-08)
-- 修复 type 属性向下兼容,默认值从 date 变更为 datetime
-## 2.0.0(2021-04-30)
-- 支持日历形式的日期+时间的范围选择
- > 注意:此版本不向后兼容,不再支持单独时间选择(type=time)及相关的 hide-second 属性(时间选可使用内置组件 picker)
-## 1.0.6(2021-03-18)
-- 新增 hide-second 属性,时间支持仅选择时、分
-- 修复 选择跟显示的日期不一样的Bug
-- 修复 chang事件触发2次的Bug
-- 修复 分、秒 end 范围错误的Bug
-- 优化 更好的 nvue 适配
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue b/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue
deleted file mode 100644
index dba9887..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue
+++ /dev/null
@@ -1,177 +0,0 @@
-<template>
- <view class="uni-calendar-item__weeks-box" :class="{
- 'uni-calendar-item--disable':weeks.disable,
- 'uni-calendar-item--before-checked-x':weeks.beforeMultiple,
- 'uni-calendar-item--multiple': weeks.multiple,
- 'uni-calendar-item--after-checked-x':weeks.afterMultiple,
- }" @click="choiceDate(weeks)" @mouseenter="handleMousemove(weeks)">
- <view class="uni-calendar-item__weeks-box-item" :class="{
- 'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && (calendar.userChecked || !checkHover),
- 'uni-calendar-item--checked-range-text': checkHover,
- 'uni-calendar-item--before-checked':weeks.beforeMultiple,
- 'uni-calendar-item--multiple': weeks.multiple,
- 'uni-calendar-item--after-checked':weeks.afterMultiple,
- 'uni-calendar-item--disable':weeks.disable,
- }">
- <text v-if="selected && weeks.extraInfo" class="uni-calendar-item__weeks-box-circle"></text>
- <text class="uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text">{{weeks.date}}</text>
- </view>
- <view :class="{'uni-calendar-item--today': weeks.isToday}"></view>
- </view>
-</template>
-
-<script>
- export default {
- props: {
- weeks: {
- type: Object,
- default () {
- return {}
- }
- },
- calendar: {
- type: Object,
- default: () => {
- return {}
- }
- },
- selected: {
- type: Array,
- default: () => {
- return []
- }
- },
- checkHover: {
- type: Boolean,
- default: false
- }
- },
- methods: {
- choiceDate(weeks) {
- this.$emit('change', weeks)
- },
- handleMousemove(weeks) {
- this.$emit('handleMouse', weeks)
- }
- }
- }
-</script>
-
-<style lang="scss" >
- $uni-primary: #007aff !default;
-
- .uni-calendar-item__weeks-box {
- flex: 1;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: column;
- justify-content: center;
- align-items: center;
- margin: 1px 0;
- position: relative;
- }
-
- .uni-calendar-item__weeks-box-text {
- font-size: 14px;
- // font-family: Lato-Bold, Lato;
- font-weight: bold;
- color: darken($color: $uni-primary, $amount: 40%);
- }
-
- .uni-calendar-item__weeks-box-item {
- position: relative;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: column;
- justify-content: center;
- align-items: center;
- width: 40px;
- height: 40px;
- /* #ifdef H5 */
- cursor: pointer;
- /* #endif */
- }
-
-
- .uni-calendar-item__weeks-box-circle {
- position: absolute;
- top: 5px;
- right: 5px;
- width: 8px;
- height: 8px;
- border-radius: 8px;
- background-color: #dd524d;
-
- }
-
- .uni-calendar-item__weeks-box .uni-calendar-item--disable {
- cursor: default;
- }
-
- .uni-calendar-item--disable .uni-calendar-item__weeks-box-text-disable {
- color: #D1D1D1;
- }
-
- .uni-calendar-item--today {
- position: absolute;
- top: 10px;
- right: 17%;
- background-color: #dd524d;
- width:6px;
- height: 6px;
- border-radius: 50%;
- }
-
- .uni-calendar-item--extra {
- color: #dd524d;
- opacity: 0.8;
- }
-
- .uni-calendar-item__weeks-box .uni-calendar-item--checked {
- background-color: $uni-primary;
- border-radius: 50%;
- box-sizing: border-box;
- border: 3px solid #fff;
- }
-
- .uni-calendar-item--checked .uni-calendar-item--checked-text {
- color: #fff;
- }
-
- .uni-calendar-item--multiple .uni-calendar-item--checked-range-text {
- color: #333;
- }
-
- .uni-calendar-item--multiple {
- background-color: #F6F7FC;
- // color: #fff;
- }
-
- .uni-calendar-item--multiple .uni-calendar-item--before-checked,
- .uni-calendar-item--multiple .uni-calendar-item--after-checked {
- background-color: $uni-primary;
- border-radius: 50%;
- box-sizing: border-box;
- border: 3px solid #F6F7FC;
- }
-
- .uni-calendar-item--before-checked .uni-calendar-item--checked-text,
- .uni-calendar-item--after-checked .uni-calendar-item--checked-text {
- color: #fff;
- }
-
- .uni-calendar-item--before-checked-x {
- border-top-left-radius: 50px;
- border-bottom-left-radius: 50px;
- box-sizing: border-box;
- background-color: #F6F7FC;
- }
-
- .uni-calendar-item--after-checked-x {
- border-top-right-radius: 50px;
- border-bottom-right-radius: 50px;
- background-color: #F6F7FC;
- }
-</style>
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/calendar.vue b/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/calendar.vue
deleted file mode 100644
index d6d12bd..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/calendar.vue
+++ /dev/null
@@ -1,939 +0,0 @@
-<template>
- <view class="uni-calendar" @mouseleave="leaveCale">
-
- <view v-if="!insert && show" class="uni-calendar__mask" :class="{'uni-calendar--mask-show':aniMaskShow}"
- @click="maskClick"></view>
-
- <view v-if="insert || show" class="uni-calendar__content"
- :class="{'uni-calendar--fixed':!insert,'uni-calendar--ani-show':aniMaskShow, 'uni-calendar__content-mobile': aniMaskShow}">
- <view class="uni-calendar__header" :class="{'uni-calendar__header-mobile' :!insert}">
-
- <view class="uni-calendar__header-btn-box" @click.stop="changeMonth('pre')">
- <view class="uni-calendar__header-btn uni-calendar--left"></view>
- </view>
-
- <picker mode="date" :value="date" fields="month" @change="bindDateChange">
- <text
- class="uni-calendar__header-text">{{ (nowDate.year||'') + yearText + ( nowDate.month||'') + monthText}}</text>
- </picker>
-
- <view class="uni-calendar__header-btn-box" @click.stop="changeMonth('next')">
- <view class="uni-calendar__header-btn uni-calendar--right"></view>
- </view>
-
- <view v-if="!insert" class="dialog-close" @click="close">
- <view class="dialog-close-plus" data-id="close"></view>
- <view class="dialog-close-plus dialog-close-rotate" data-id="close"></view>
- </view>
- </view>
- <view class="uni-calendar__box">
-
- <view v-if="showMonth" class="uni-calendar__box-bg">
- <text class="uni-calendar__box-bg-text">{{nowDate.month}}</text>
- </view>
-
- <view class="uni-calendar__weeks" style="padding-bottom: 7px;">
- <view class="uni-calendar__weeks-day">
- <text class="uni-calendar__weeks-day-text">{{SUNText}}</text>
- </view>
- <view class="uni-calendar__weeks-day">
- <text class="uni-calendar__weeks-day-text">{{MONText}}</text>
- </view>
- <view class="uni-calendar__weeks-day">
- <text class="uni-calendar__weeks-day-text">{{TUEText}}</text>
- </view>
- <view class="uni-calendar__weeks-day">
- <text class="uni-calendar__weeks-day-text">{{WEDText}}</text>
- </view>
- <view class="uni-calendar__weeks-day">
- <text class="uni-calendar__weeks-day-text">{{THUText}}</text>
- </view>
- <view class="uni-calendar__weeks-day">
- <text class="uni-calendar__weeks-day-text">{{FRIText}}</text>
- </view>
- <view class="uni-calendar__weeks-day">
- <text class="uni-calendar__weeks-day-text">{{SATText}}</text>
- </view>
- </view>
-
- <view class="uni-calendar__weeks" v-for="(item,weekIndex) in weeks" :key="weekIndex">
- <view class="uni-calendar__weeks-item" v-for="(weeks,weeksIndex) in item" :key="weeksIndex">
- <calendar-item class="uni-calendar-item--hook" :weeks="weeks" :calendar="calendar"
- :selected="selected" :checkHover="range" @change="choiceDate"
- @handleMouse="handleMouse">
- </calendar-item>
- </view>
- </view>
- </view>
-
- <view v-if="!insert && !range && hasTime" class="uni-date-changed uni-calendar--fixed-top"
- style="padding: 0 80px;">
- <view class="uni-date-changed--time-date">{{tempSingleDate ? tempSingleDate : selectDateText}}</view>
- <time-picker type="time" :start="timepickerStartTime" :end="timepickerEndTime" v-model="time"
- :disabled="!tempSingleDate" :border="false" :hide-second="hideSecond" class="time-picker-style">
- </time-picker>
- </view>
-
- <view v-if="!insert && range && hasTime" class="uni-date-changed uni-calendar--fixed-top">
- <view class="uni-date-changed--time-start">
- <view class="uni-date-changed--time-date">{{tempRange.before ? tempRange.before : startDateText}}
- </view>
- <time-picker type="time" :start="timepickerStartTime" v-model="timeRange.startTime" :border="false"
- :hide-second="hideSecond" :disabled="!tempRange.before" class="time-picker-style">
- </time-picker>
- </view>
- <view style="line-height: 50px;">
- <uni-icons type="arrowthinright" color="#999"></uni-icons>
- </view>
- <view class="uni-date-changed--time-end">
- <view class="uni-date-changed--time-date">{{tempRange.after ? tempRange.after : endDateText}}</view>
- <time-picker type="time" :end="timepickerEndTime" v-model="timeRange.endTime" :border="false"
- :hide-second="hideSecond" :disabled="!tempRange.after" class="time-picker-style">
- </time-picker>
- </view>
- </view>
-
- <view v-if="!insert" class="uni-date-changed uni-date-btn--ok">
- <view class="uni-datetime-picker--btn" @click="confirm">{{confirmText}}</view>
- </view>
- </view>
- </view>
-</template>
-
-<script>
- import { Calendar, getDate, getTime } from './util.js';
- import calendarItem from './calendar-item.vue'
- import timePicker from './time-picker.vue'
- import uniIcons from "../../../uni-icons/components/uni-icons/uni-icons.vue"
- import { initVueI18n } from '@dcloudio/uni-i18n'
- import i18nMessages from './i18n/index.js'
- const { t } = initVueI18n(i18nMessages)
-
- /**
- * Calendar 日历
- * @description 日历组件可以查看日期,选择任意范围内的日期,打点操作。常用场景如:酒店日期预订、火车机票选择购买日期、上下班打卡等
- * @tutorial https://ext.dcloud.net.cn/plugin?id=56
- * @property {String} date 自定义当前时间,默认为今天
- * @property {String} startDate 日期选择范围-开始日期
- * @property {String} endDate 日期选择范围-结束日期
- * @property {Boolean} range 范围选择
- * @property {Boolean} insert = [true|false] 插入模式,默认为false
- * @value true 弹窗模式
- * @value false 插入模式
- * @property {Boolean} clearDate = [true|false] 弹窗模式是否清空上次选择内容
- * @property {Array} selected 打点,期待格式[{date: '2019-06-27', info: '签到', data: { custom: '自定义信息', name: '自定义消息头',xxx:xxx... }}]
- * @property {Boolean} showMonth 是否选择月份为背景
- * @property {[String} defaultValue 选择器打开时默认显示的时间
- * @event {Function} change 日期改变,`insert :ture` 时生效
- * @event {Function} confirm 确认选择`insert :false` 时生效
- * @event {Function} monthSwitch 切换月份时触发
- * @example <uni-calendar :insert="true" :start-date="'2019-3-2'":end-date="'2019-5-20'"@change="change" />
- */
- export default {
- components: {
- calendarItem,
- timePicker,
- uniIcons
- },
- props: {
- date: {
- type: String,
- default: ''
- },
- defTime: {
- type: [String, Object],
- default: ''
- },
- selectableTimes: {
- type: [Object],
- default () {
- return {}
- }
- },
- selected: {
- type: Array,
- default () {
- return []
- }
- },
- startDate: {
- type: String,
- default: ''
- },
- endDate: {
- type: String,
- default: ''
- },
- startPlaceholder: {
- type: String,
- default: ''
- },
- endPlaceholder: {
- type: String,
- default: ''
- },
- range: {
- type: Boolean,
- default: false
- },
- hasTime: {
- type: Boolean,
- default: false
- },
- insert: {
- type: Boolean,
- default: true
- },
- showMonth: {
- type: Boolean,
- default: true
- },
- clearDate: {
- type: Boolean,
- default: true
- },
- checkHover: {
- type: Boolean,
- default: true
- },
- hideSecond: {
- type: [Boolean],
- default: false
- },
- pleStatus: {
- type: Object,
- default () {
- return {
- before: '',
- after: '',
- data: [],
- fulldate: ''
- }
- }
- },
- defaultValue: {
- type: [String, Object, Array],
- default: ''
- }
- },
- data() {
- return {
- show: false,
- weeks: [],
- calendar: {},
- nowDate: {},
- aniMaskShow: false,
- firstEnter: true,
- time: '',
- timeRange: {
- startTime: '',
- endTime: ''
- },
- tempSingleDate: '',
- tempRange: {
- before: '',
- after: ''
- },
- isPhone: false
- }
- },
- watch: {
- date: {
- immediate: true,
- handler(newVal) {
- if (!this.range) {
- this.tempSingleDate = newVal
- setTimeout(() => {
- this.init(newVal)
- }, 100)
- }
- }
- },
- defTime: {
- immediate: true,
- handler(newVal) {
- if (!this.range) {
- this.time = newVal
- } else {
- this.timeRange.startTime = newVal.start
- this.timeRange.endTime = newVal.end
- }
- }
- },
- startDate(val) {
- // 字节小程序 watch 早于 created
- if(!this.cale){
- return
- }
- this.cale.setStartDate(val)
- this.cale.setDate(this.nowDate.fullDate)
- this.weeks = this.cale.weeks
- },
- endDate(val) {
- // 字节小程序 watch 早于 created
- if(!this.cale){
- return
- }
- this.cale.setEndDate(val)
- this.cale.setDate(this.nowDate.fullDate)
- this.weeks = this.cale.weeks
- },
- selected(newVal) {
- // 字节小程序 watch 早于 created
- if(!this.cale){
- return
- }
- this.cale.setSelectInfo(this.nowDate.fullDate, newVal)
- this.weeks = this.cale.weeks
- },
- pleStatus: {
- immediate: true,
- handler(newVal) {
- const {
- before,
- after,
- fulldate,
- which
- } = newVal
- this.tempRange.before = before
- this.tempRange.after = after
- setTimeout(() => {
- if (fulldate) {
- this.cale.setHoverMultiple(fulldate)
- if (before && after) {
- this.cale.lastHover = true
- if (this.rangeWithinMonth(after, before)) return
- this.setDate(before)
- } else {
- this.cale.setMultiple(fulldate)
- this.setDate(this.nowDate.fullDate)
- this.calendar.fullDate = ''
- this.cale.lastHover = false
- }
- } else {
- // 字节小程序 watch 早于 created
- if(!this.cale){
- return
- }
-
- this.cale.setDefaultMultiple(before, after)
- if (which === 'left' && before) {
- this.setDate(before)
- this.weeks = this.cale.weeks
- } else if(after) {
- this.setDate(after)
- this.weeks = this.cale.weeks
- }
- this.cale.lastHover = true
- }
- }, 16)
- }
- }
- },
- computed: {
- timepickerStartTime() {
- const activeDate = this.range ? this.tempRange.before : this.calendar.fullDate
- return activeDate === this.startDate ? this.selectableTimes.start : ''
- },
- timepickerEndTime() {
- const activeDate = this.range ? this.tempRange.after : this.calendar.fullDate
- return activeDate === this.endDate ? this.selectableTimes.end : ''
- },
- /**
- * for i18n
- */
- selectDateText() {
- return t("uni-datetime-picker.selectDate")
- },
- startDateText() {
- return this.startPlaceholder || t("uni-datetime-picker.startDate")
- },
- endDateText() {
- return this.endPlaceholder || t("uni-datetime-picker.endDate")
- },
- okText() {
- return t("uni-datetime-picker.ok")
- },
- yearText() {
- return t("uni-datetime-picker.year")
- },
- monthText() {
- return t("uni-datetime-picker.month")
- },
- MONText() {
- return t("uni-calender.MON")
- },
- TUEText() {
- return t("uni-calender.TUE")
- },
- WEDText() {
- return t("uni-calender.WED")
- },
- THUText() {
- return t("uni-calender.THU")
- },
- FRIText() {
- return t("uni-calender.FRI")
- },
- SATText() {
- return t("uni-calender.SAT")
- },
- SUNText() {
- return t("uni-calender.SUN")
- },
- confirmText() {
- return t("uni-calender.confirm")
- },
- },
- created() {
- // 获取日历方法实例
- this.cale = new Calendar({
- selected: this.selected,
- startDate: this.startDate,
- endDate: this.endDate,
- range: this.range,
- })
- // 选中某一天
- this.init(this.date)
- },
- mounted(){
- if(typeof navigator !== "undefined"){
- this.isPhone = navigator.userAgent.toLowerCase().indexOf('mobile') !== -1
- return
- }
- const { windowWidth } = uni.getSystemInfoSync()
- this.isPhone = windowWidth <= 500
- },
- methods: {
- leaveCale() {
- this.firstEnter = true
- },
- handleMouse(weeks) {
- if (weeks.disable) return
- if (this.cale.lastHover) return
- let {
- before,
- after
- } = this.cale.multipleStatus
- if (!before) return
- this.calendar = weeks
- // 设置范围选
- this.cale.setHoverMultiple(this.calendar.fullDate)
- this.weeks = this.cale.weeks
- // hover时,进入一个日历,更新另一个
- if (this.firstEnter) {
- this.$emit('firstEnterCale', this.cale.multipleStatus)
- this.firstEnter = false
- }
- },
- rangeWithinMonth(A, B) {
- const [yearA, monthA] = A.split('-')
- const [yearB, monthB] = B.split('-')
- return yearA === yearB && monthA === monthB
- },
- // 蒙版点击事件
- maskClick() {
- this.close()
- this.$emit('maskClose')
- },
-
- clearCalender() {
- if (this.range) {
- this.timeRange.startTime = ''
- this.timeRange.endTime = ''
- this.tempRange.before = ''
- this.tempRange.after = ''
- this.cale.multipleStatus.before = ''
- this.cale.multipleStatus.after = ''
- this.cale.multipleStatus.data = []
- this.cale.lastHover = false
- } else {
- this.time = ''
- this.tempSingleDate = ''
- }
- this.calendar.fullDate = ''
- this.setDate(new Date())
- },
-
- bindDateChange(e) {
- const value = e.detail.value + '-1'
- this.setDate(value)
- },
- /**
- * 初始化日期显示
- * @param {Object} date
- */
- init(date) {
- // 字节小程序 watch 早于 created
- if(!this.cale){
- return
- }
- this.cale.setDate(date || new Date())
- this.weeks = this.cale.weeks
- this.nowDate = this.cale.getInfo(date)
- this.calendar = {...this.nowDate}
- if(!date){
- // 优化date为空默认不选中今天
- this.calendar.fullDate = ''
- if(this.defaultValue && !this.range){
- // 暂时只支持移动端非范围选择
- const defaultDate = new Date(this.defaultValue)
- const fullDate = getDate(defaultDate)
- const year = defaultDate.getFullYear()
- const month = defaultDate.getMonth()+1
- const date = defaultDate.getDate()
- const day = defaultDate.getDay()
- this.calendar = {
- fullDate,
- year,
- month,
- date,
- day
- },
- this.tempSingleDate = fullDate
- this.time = getTime(defaultDate, this.hideSecond)
- }
- }
- },
- /**
- * 打开日历弹窗
- */
- open() {
- // 弹窗模式并且清理数据
- if (this.clearDate && !this.insert) {
- this.cale.cleanMultipleStatus()
- this.init(this.date)
- }
- this.show = true
- this.$nextTick(() => {
- setTimeout(() => {
- this.aniMaskShow = true
- }, 50)
- })
- },
- /**
- * 关闭日历弹窗
- */
- close() {
- this.aniMaskShow = false
- this.$nextTick(() => {
- setTimeout(() => {
- this.show = false
- this.$emit('close')
- }, 300)
- })
- },
- /**
- * 确认按钮
- */
- confirm() {
- this.setEmit('confirm')
- this.close()
- },
- /**
- * 变化触发
- */
- change() {
- if (!this.insert) return
- this.setEmit('change')
- },
- /**
- * 选择月份触发
- */
- monthSwitch() {
- let {
- year,
- month
- } = this.nowDate
- this.$emit('monthSwitch', {
- year,
- month: Number(month)
- })
- },
- /**
- * 派发事件
- * @param {Object} name
- */
- setEmit(name) {
- if(!this.range){
- if(!this.calendar.fullDate){
- this.calendar = this.cale.getInfo(new Date())
- this.tempSingleDate = this.calendar.fullDate
- }
- if(this.hasTime && !this.time) {
- this.time = getTime(new Date(), this.hideSecond)
- }
- }
- let {
- year,
- month,
- date,
- fullDate,
- extraInfo
- } = this.calendar
- this.$emit(name, {
- range: this.cale.multipleStatus,
- year,
- month,
- date,
- time: this.time,
- timeRange: this.timeRange,
- fulldate: fullDate,
- extraInfo: extraInfo || {}
- })
- },
- /**
- * 选择天触发
- * @param {Object} weeks
- */
- choiceDate(weeks) {
- if (weeks.disable) return
- this.calendar = weeks
- this.calendar.userChecked = true
- // 设置多选
- this.cale.setMultiple(this.calendar.fullDate, true)
- this.weeks = this.cale.weeks
- this.tempSingleDate = this.calendar.fullDate
- const beforeDate = new Date(this.cale.multipleStatus.before).getTime()
- const afterDate = new Date(this.cale.multipleStatus.after).getTime()
- // 这里返回的 before after 为什么要做替换?导致PC端如果开始结束日期都是今天,第一次选择开始日期早于今天,开始日期不更新
- if (beforeDate > afterDate && afterDate && !this.isPhone) {
- this.tempRange.before = this.cale.multipleStatus.after
- this.tempRange.after = this.cale.multipleStatus.before
- } else {
- this.tempRange.before = this.cale.multipleStatus.before
- this.tempRange.after = this.cale.multipleStatus.after
- }
- this.change()
- },
- changeMonth(type) {
- let newDate
- if(type === 'pre') {
- newDate = this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate
- } else if(type === 'next') {
- newDate = this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate
- }
-
- this.setDate(newDate)
- this.monthSwitch()
- },
- /**
- * 设置日期
- * @param {Object} date
- */
- setDate(date) {
- this.cale.setDate(date)
- this.weeks = this.cale.weeks
- this.nowDate = this.cale.getInfo(date)
- }
- }
- }
-</script>
-
-<style lang="scss" >
- $uni-primary: #007aff !default;
-
- .uni-calendar {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: column;
- }
-
- .uni-calendar__mask {
- position: fixed;
- bottom: 0;
- top: 0;
- left: 0;
- right: 0;
- background-color: rgba(0, 0, 0, 0.4);
- transition-property: opacity;
- transition-duration: 0.3s;
- opacity: 0;
- /* #ifndef APP-NVUE */
- z-index: 99;
- /* #endif */
- }
-
- .uni-calendar--mask-show {
- opacity: 1
- }
-
- .uni-calendar--fixed {
- position: fixed;
- bottom: calc(var(--window-bottom));
- left: 0;
- right: 0;
- transition-property: transform;
- transition-duration: 0.3s;
- transform: translateY(460px);
- /* #ifndef APP-NVUE */
- z-index: 99;
- /* #endif */
- }
-
- .uni-calendar--ani-show {
- transform: translateY(0);
- }
-
- .uni-calendar__content {
- background-color: #fff;
- }
-
- .uni-calendar__content-mobile {
- border-top-left-radius: 10px;
- border-top-right-radius: 10px;
- box-shadow: 0px 0px 5px 3px rgba(0, 0, 0, 0.1);
- }
-
- .uni-calendar__header {
- position: relative;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- justify-content: center;
- align-items: center;
- height: 50px;
- }
-
- .uni-calendar__header-mobile {
- padding: 10px;
- padding-bottom: 0;
- }
-
- .uni-calendar--fixed-top {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- justify-content: space-between;
- border-top-color: rgba(0, 0, 0, 0.4);
- border-top-style: solid;
- border-top-width: 1px;
- }
-
- .uni-calendar--fixed-width {
- width: 50px;
- }
-
- .uni-calendar__backtoday {
- position: absolute;
- right: 0;
- top: 25rpx;
- padding: 0 5px;
- padding-left: 10px;
- height: 25px;
- line-height: 25px;
- font-size: 12px;
- border-top-left-radius: 25px;
- border-bottom-left-radius: 25px;
- color: #fff;
- background-color: #f1f1f1;
- }
-
- .uni-calendar__header-text {
- text-align: center;
- width: 100px;
- font-size: 15px;
- color: #666;
- }
-
- .uni-calendar__button-text {
- text-align: center;
- width: 100px;
- font-size: 14px;
- color: $uni-primary;
- /* #ifndef APP-NVUE */
- letter-spacing: 3px;
- /* #endif */
- }
-
- .uni-calendar__header-btn-box {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- align-items: center;
- justify-content: center;
- width: 50px;
- height: 50px;
- }
-
- .uni-calendar__header-btn {
- width: 9px;
- height: 9px;
- border-left-color: #808080;
- border-left-style: solid;
- border-left-width: 1px;
- border-top-color: #555555;
- border-top-style: solid;
- border-top-width: 1px;
- }
-
- .uni-calendar--left {
- transform: rotate(-45deg);
- }
-
- .uni-calendar--right {
- transform: rotate(135deg);
- }
-
-
- .uni-calendar__weeks {
- position: relative;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- }
-
- .uni-calendar__weeks-item {
- flex: 1;
- }
-
- .uni-calendar__weeks-day {
- flex: 1;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: column;
- justify-content: center;
- align-items: center;
- height: 40px;
- border-bottom-color: #F5F5F5;
- border-bottom-style: solid;
- border-bottom-width: 1px;
- }
-
- .uni-calendar__weeks-day-text {
- font-size: 12px;
- color: #B2B2B2;
- }
-
- .uni-calendar__box {
- position: relative;
- // padding: 0 10px;
- padding-bottom: 7px;
- }
-
- .uni-calendar__box-bg {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- justify-content: center;
- align-items: center;
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- }
-
- .uni-calendar__box-bg-text {
- font-size: 200px;
- font-weight: bold;
- color: #999;
- opacity: 0.1;
- text-align: center;
- /* #ifndef APP-NVUE */
- line-height: 1;
- /* #endif */
- }
-
- .uni-date-changed {
- padding: 0 10px;
- // line-height: 50px;
- text-align: center;
- color: #333;
- border-top-color: #DCDCDC;
- ;
- border-top-style: solid;
- border-top-width: 1px;
- flex: 1;
- }
-
- .uni-date-btn--ok {
- padding: 20px 15px;
- }
-
- .uni-date-changed--time-start {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- align-items: center;
- }
-
- .uni-date-changed--time-end {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- align-items: center;
- }
-
- .uni-date-changed--time-date {
- color: #999;
- line-height: 50px;
- /* #ifdef MP-TOUTIAO */
- font-size: 16px;
- /* #endif */
- margin-right: 5px;
- // opacity: 0.6;
- }
-
- .time-picker-style {
- // width: 62px;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- justify-content: center;
- align-items: center
- }
-
- .mr-10 {
- margin-right: 10px;
- }
-
- .dialog-close {
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- align-items: center;
- padding: 0 25px;
- margin-top: 10px;
- }
-
- .dialog-close-plus {
- width: 16px;
- height: 2px;
- background-color: #737987;
- border-radius: 2px;
- transform: rotate(45deg);
- }
-
- .dialog-close-rotate {
- position: absolute;
- transform: rotate(-45deg);
- }
-
- .uni-datetime-picker--btn {
- border-radius: 100px;
- height: 40px;
- line-height: 40px;
- background-color: $uni-primary;
- color: #fff;
- font-size: 16px;
- letter-spacing: 2px;
- }
-
- /* #ifndef APP-NVUE */
- .uni-datetime-picker--btn:active {
- opacity: 0.7;
- }
- /* #endif */
-</style>
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json b/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json
deleted file mode 100644
index 024f22f..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "uni-datetime-picker.selectDate": "select date",
- "uni-datetime-picker.selectTime": "select time",
- "uni-datetime-picker.selectDateTime": "select date and time",
- "uni-datetime-picker.startDate": "start date",
- "uni-datetime-picker.endDate": "end date",
- "uni-datetime-picker.startTime": "start time",
- "uni-datetime-picker.endTime": "end time",
- "uni-datetime-picker.ok": "ok",
- "uni-datetime-picker.clear": "clear",
- "uni-datetime-picker.cancel": "cancel",
- "uni-datetime-picker.year": "-",
- "uni-datetime-picker.month": "",
- "uni-calender.MON": "MON",
- "uni-calender.TUE": "TUE",
- "uni-calender.WED": "WED",
- "uni-calender.THU": "THU",
- "uni-calender.FRI": "FRI",
- "uni-calender.SAT": "SAT",
- "uni-calender.SUN": "SUN",
- "uni-calender.confirm": "confirm"
-}
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js b/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js
deleted file mode 100644
index de7509c..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js
+++ /dev/null
@@ -1,8 +0,0 @@
-import en from './en.json'
-import zhHans from './zh-Hans.json'
-import zhHant from './zh-Hant.json'
-export default {
- en,
- 'zh-Hans': zhHans,
- 'zh-Hant': zhHant
-}
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hans.json b/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hans.json
deleted file mode 100644
index d2df5e7..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hans.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "uni-datetime-picker.selectDate": "选择日期",
- "uni-datetime-picker.selectTime": "选择时间",
- "uni-datetime-picker.selectDateTime": "选择日期时间",
- "uni-datetime-picker.startDate": "开始日期",
- "uni-datetime-picker.endDate": "结束日期",
- "uni-datetime-picker.startTime": "开始时间",
- "uni-datetime-picker.endTime": "结束时间",
- "uni-datetime-picker.ok": "确定",
- "uni-datetime-picker.clear": "清除",
- "uni-datetime-picker.cancel": "取消",
- "uni-datetime-picker.year": "年",
- "uni-datetime-picker.month": "月",
- "uni-calender.SUN": "日",
- "uni-calender.MON": "一",
- "uni-calender.TUE": "二",
- "uni-calender.WED": "三",
- "uni-calender.THU": "四",
- "uni-calender.FRI": "五",
- "uni-calender.SAT": "六",
- "uni-calender.confirm": "确认"
-}
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hant.json b/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hant.json
deleted file mode 100644
index d23fa3c..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hant.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "uni-datetime-picker.selectDate": "選擇日期",
- "uni-datetime-picker.selectTime": "選擇時間",
- "uni-datetime-picker.selectDateTime": "選擇日期時間",
- "uni-datetime-picker.startDate": "開始日期",
- "uni-datetime-picker.endDate": "結束日期",
- "uni-datetime-picker.startTime": "開始时间",
- "uni-datetime-picker.endTime": "結束时间",
- "uni-datetime-picker.ok": "確定",
- "uni-datetime-picker.clear": "清除",
- "uni-datetime-picker.cancel": "取消",
- "uni-datetime-picker.year": "年",
- "uni-datetime-picker.month": "月",
- "uni-calender.SUN": "日",
- "uni-calender.MON": "一",
- "uni-calender.TUE": "二",
- "uni-calender.WED": "三",
- "uni-calender.THU": "四",
- "uni-calender.FRI": "五",
- "uni-calender.SAT": "六",
- "uni-calender.confirm": "確認"
-}
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue b/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue
deleted file mode 100644
index 81a042a..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue
+++ /dev/null
@@ -1,934 +0,0 @@
-<template>
- <view class="uni-datetime-picker">
- <view @click="initTimePicker">
- <slot>
- <view class="uni-datetime-picker-timebox-pointer"
- :class="{'uni-datetime-picker-disabled': disabled, 'uni-datetime-picker-timebox': border}">
- <text class="uni-datetime-picker-text">{{time}}</text>
- <view v-if="!time" class="uni-datetime-picker-time">
- <text class="uni-datetime-picker-text">{{selectTimeText}}</text>
- </view>
- </view>
- </slot>
- </view>
- <view v-if="visible" id="mask" class="uni-datetime-picker-mask" @click="tiggerTimePicker"></view>
- <view v-if="visible" class="uni-datetime-picker-popup" :class="[dateShow && timeShow ? '' : 'fix-nvue-height']"
- :style="fixNvueBug">
- <view class="uni-title">
- <text class="uni-datetime-picker-text">{{selectTimeText}}</text>
- </view>
- <view v-if="dateShow" class="uni-datetime-picker__container-box">
- <picker-view class="uni-datetime-picker-view" :indicator-style="indicatorStyle" :value="ymd"
- @change="bindDateChange">
- <picker-view-column>
- <view class="uni-datetime-picker-item" v-for="(item,index) in years" :key="index">
- <text class="uni-datetime-picker-item">{{lessThanTen(item)}}</text>
- </view>
- </picker-view-column>
- <picker-view-column>
- <view class="uni-datetime-picker-item" v-for="(item,index) in months" :key="index">
- <text class="uni-datetime-picker-item">{{lessThanTen(item)}}</text>
- </view>
- </picker-view-column>
- <picker-view-column>
- <view class="uni-datetime-picker-item" v-for="(item,index) in days" :key="index">
- <text class="uni-datetime-picker-item">{{lessThanTen(item)}}</text>
- </view>
- </picker-view-column>
- </picker-view>
- <!-- 兼容 nvue 不支持伪类 -->
- <text class="uni-datetime-picker-sign sign-left">-</text>
- <text class="uni-datetime-picker-sign sign-right">-</text>
- </view>
- <view v-if="timeShow" class="uni-datetime-picker__container-box">
- <picker-view class="uni-datetime-picker-view" :class="[hideSecond ? 'time-hide-second' : '']"
- :indicator-style="indicatorStyle" :value="hms" @change="bindTimeChange">
- <picker-view-column>
- <view class="uni-datetime-picker-item" v-for="(item,index) in hours" :key="index">
- <text class="uni-datetime-picker-item">{{lessThanTen(item)}}</text>
- </view>
- </picker-view-column>
- <picker-view-column>
- <view class="uni-datetime-picker-item" v-for="(item,index) in minutes" :key="index">
- <text class="uni-datetime-picker-item">{{lessThanTen(item)}}</text>
- </view>
- </picker-view-column>
- <picker-view-column v-if="!hideSecond">
- <view class="uni-datetime-picker-item" v-for="(item,index) in seconds" :key="index">
- <text class="uni-datetime-picker-item">{{lessThanTen(item)}}</text>
- </view>
- </picker-view-column>
- </picker-view>
- <!-- 兼容 nvue 不支持伪类 -->
- <text class="uni-datetime-picker-sign" :class="[hideSecond ? 'sign-center' : 'sign-left']">:</text>
- <text v-if="!hideSecond" class="uni-datetime-picker-sign sign-right">:</text>
- </view>
- <view class="uni-datetime-picker-btn">
- <view @click="clearTime">
- <text class="uni-datetime-picker-btn-text">{{clearText}}</text>
- </view>
- <view class="uni-datetime-picker-btn-group">
- <view class="uni-datetime-picker-cancel" @click="tiggerTimePicker">
- <text class="uni-datetime-picker-btn-text">{{cancelText}}</text>
- </view>
- <view @click="setTime">
- <text class="uni-datetime-picker-btn-text">{{okText}}</text>
- </view>
- </view>
- </view>
- </view>
- </view>
-</template>
-
-<script>
- import { initVueI18n } from '@dcloudio/uni-i18n'
- import i18nMessages from './i18n/index.js'
- const { t } = initVueI18n(i18nMessages)
- import { fixIosDateFormat } from './util'
-
- /**
- * DatetimePicker 时间选择器
- * @description 可以同时选择日期和时间的选择器
- * @tutorial https://ext.dcloud.net.cn/plugin?id=xxx
- * @property {String} type = [datetime | date | time] 显示模式
- * @property {Boolean} multiple = [true|false] 是否多选
- * @property {String|Number} value 默认值
- * @property {String|Number} start 起始日期或时间
- * @property {String|Number} end 起始日期或时间
- * @property {String} return-type = [timestamp | string]
- * @event {Function} change 选中发生变化触发
- */
-
- export default {
- name: 'UniDatetimePicker',
- data() {
- return {
- indicatorStyle: `height: 50px;`,
- visible: false,
- fixNvueBug: {},
- dateShow: true,
- timeShow: true,
- title: '日期和时间',
- // 输入框当前时间
- time: '',
- // 当前的年月日时分秒
- year: 1920,
- month: 0,
- day: 0,
- hour: 0,
- minute: 0,
- second: 0,
- // 起始时间
- startYear: 1920,
- startMonth: 1,
- startDay: 1,
- startHour: 0,
- startMinute: 0,
- startSecond: 0,
- // 结束时间
- endYear: 2120,
- endMonth: 12,
- endDay: 31,
- endHour: 23,
- endMinute: 59,
- endSecond: 59,
- }
- },
- props: {
- type: {
- type: String,
- default: 'datetime'
- },
- value: {
- type: [String, Number],
- default: ''
- },
- modelValue: {
- type: [String, Number],
- default: ''
- },
- start: {
- type: [Number, String],
- default: ''
- },
- end: {
- type: [Number, String],
- default: ''
- },
- returnType: {
- type: String,
- default: 'string'
- },
- disabled: {
- type: [Boolean, String],
- default: false
- },
- border: {
- type: [Boolean, String],
- default: true
- },
- hideSecond: {
- type: [Boolean, String],
- default: false
- }
- },
- watch: {
- // #ifndef VUE3
- value: {
- handler(newVal) {
- if (newVal) {
- this.parseValue(fixIosDateFormat(newVal))
- this.initTime(false)
- } else {
- this.time = ''
- this.parseValue(Date.now())
- }
- },
- immediate: true
- },
- // #endif
- // #ifdef VUE3
- modelValue: {
- handler(newVal) {
- if (newVal) {
- this.parseValue(fixIosDateFormat(newVal))
- this.initTime(false)
- } else {
- this.time = ''
- this.parseValue(Date.now())
- }
- },
- immediate: true
- },
- // #endif
- type: {
- handler(newValue) {
- if (newValue === 'date') {
- this.dateShow = true
- this.timeShow = false
- this.title = '日期'
- } else if (newValue === 'time') {
- this.dateShow = false
- this.timeShow = true
- this.title = '时间'
- } else {
- this.dateShow = true
- this.timeShow = true
- this.title = '日期和时间'
- }
- },
- immediate: true
- },
- start: {
- handler(newVal) {
- this.parseDatetimeRange(fixIosDateFormat(newVal), 'start')
- },
- immediate: true
- },
- end: {
- handler(newVal) {
- this.parseDatetimeRange(fixIosDateFormat(newVal), 'end')
- },
- immediate: true
- },
-
- // 月、日、时、分、秒可选范围变化后,检查当前值是否在范围内,不在则当前值重置为可选范围第一项
- months(newVal) {
- this.checkValue('month', this.month, newVal)
- },
- days(newVal) {
- this.checkValue('day', this.day, newVal)
- },
- hours(newVal) {
- this.checkValue('hour', this.hour, newVal)
- },
- minutes(newVal) {
- this.checkValue('minute', this.minute, newVal)
- },
- seconds(newVal) {
- this.checkValue('second', this.second, newVal)
- }
- },
- computed: {
- // 当前年、月、日、时、分、秒选择范围
- years() {
- return this.getCurrentRange('year')
- },
-
- months() {
- return this.getCurrentRange('month')
- },
-
- days() {
- return this.getCurrentRange('day')
- },
-
- hours() {
- return this.getCurrentRange('hour')
- },
-
- minutes() {
- return this.getCurrentRange('minute')
- },
-
- seconds() {
- return this.getCurrentRange('second')
- },
-
- // picker 当前值数组
- ymd() {
- return [this.year - this.minYear, this.month - this.minMonth, this.day - this.minDay]
- },
- hms() {
- return [this.hour - this.minHour, this.minute - this.minMinute, this.second - this.minSecond]
- },
-
- // 当前 date 是 start
- currentDateIsStart() {
- return this.year === this.startYear && this.month === this.startMonth && this.day === this.startDay
- },
-
- // 当前 date 是 end
- currentDateIsEnd() {
- return this.year === this.endYear && this.month === this.endMonth && this.day === this.endDay
- },
-
- // 当前年、月、日、时、分、秒的最小值和最大值
- minYear() {
- return this.startYear
- },
- maxYear() {
- return this.endYear
- },
- minMonth() {
- if (this.year === this.startYear) {
- return this.startMonth
- } else {
- return 1
- }
- },
- maxMonth() {
- if (this.year === this.endYear) {
- return this.endMonth
- } else {
- return 12
- }
- },
- minDay() {
- if (this.year === this.startYear && this.month === this.startMonth) {
- return this.startDay
- } else {
- return 1
- }
- },
- maxDay() {
- if (this.year === this.endYear && this.month === this.endMonth) {
- return this.endDay
- } else {
- return this.daysInMonth(this.year, this.month)
- }
- },
- minHour() {
- if (this.type === 'datetime') {
- if (this.currentDateIsStart) {
- return this.startHour
- } else {
- return 0
- }
- }
- if (this.type === 'time') {
- return this.startHour
- }
- },
- maxHour() {
- if (this.type === 'datetime') {
- if (this.currentDateIsEnd) {
- return this.endHour
- } else {
- return 23
- }
- }
- if (this.type === 'time') {
- return this.endHour
- }
- },
- minMinute() {
- if (this.type === 'datetime') {
- if (this.currentDateIsStart && this.hour === this.startHour) {
- return this.startMinute
- } else {
- return 0
- }
- }
- if (this.type === 'time') {
- if (this.hour === this.startHour) {
- return this.startMinute
- } else {
- return 0
- }
- }
- },
- maxMinute() {
- if (this.type === 'datetime') {
- if (this.currentDateIsEnd && this.hour === this.endHour) {
- return this.endMinute
- } else {
- return 59
- }
- }
- if (this.type === 'time') {
- if (this.hour === this.endHour) {
- return this.endMinute
- } else {
- return 59
- }
- }
- },
- minSecond() {
- if (this.type === 'datetime') {
- if (this.currentDateIsStart && this.hour === this.startHour && this.minute === this.startMinute) {
- return this.startSecond
- } else {
- return 0
- }
- }
- if (this.type === 'time') {
- if (this.hour === this.startHour && this.minute === this.startMinute) {
- return this.startSecond
- } else {
- return 0
- }
- }
- },
- maxSecond() {
- if (this.type === 'datetime') {
- if (this.currentDateIsEnd && this.hour === this.endHour && this.minute === this.endMinute) {
- return this.endSecond
- } else {
- return 59
- }
- }
- if (this.type === 'time') {
- if (this.hour === this.endHour && this.minute === this.endMinute) {
- return this.endSecond
- } else {
- return 59
- }
- }
- },
-
- /**
- * for i18n
- */
- selectTimeText() {
- return t("uni-datetime-picker.selectTime")
- },
- okText() {
- return t("uni-datetime-picker.ok")
- },
- clearText() {
- return t("uni-datetime-picker.clear")
- },
- cancelText() {
- return t("uni-datetime-picker.cancel")
- }
- },
-
- mounted() {
- // #ifdef APP-NVUE
- const res = uni.getSystemInfoSync();
- this.fixNvueBug = {
- top: res.windowHeight / 2,
- left: res.windowWidth / 2
- }
- // #endif
- },
-
- methods: {
- /**
- * @param {Object} item
- * 小于 10 在前面加个 0
- */
-
- lessThanTen(item) {
- return item < 10 ? '0' + item : item
- },
-
- /**
- * 解析时分秒字符串,例如:00:00:00
- * @param {String} timeString
- */
- parseTimeType(timeString) {
- if (timeString) {
- let timeArr = timeString.split(':')
- this.hour = Number(timeArr[0])
- this.minute = Number(timeArr[1])
- this.second = Number(timeArr[2])
- }
- },
-
- /**
- * 解析选择器初始值,类型可以是字符串、时间戳,例如:2000-10-02、'08:30:00'、 1610695109000
- * @param {String | Number} datetime
- */
- initPickerValue(datetime) {
- let defaultValue = null
- if (datetime) {
- defaultValue = this.compareValueWithStartAndEnd(datetime, this.start, this.end)
- } else {
- defaultValue = Date.now()
- defaultValue = this.compareValueWithStartAndEnd(defaultValue, this.start, this.end)
- }
- this.parseValue(defaultValue)
- },
-
- /**
- * 初始值规则:
- * - 用户设置初始值 value
- * - 设置了起始时间 start、终止时间 end,并 start < value < end,初始值为 value, 否则初始值为 start
- * - 只设置了起始时间 start,并 start < value,初始值为 value,否则初始值为 start
- * - 只设置了终止时间 end,并 value < end,初始值为 value,否则初始值为 end
- * - 无起始终止时间,则初始值为 value
- * - 无初始值 value,则初始值为当前本地时间 Date.now()
- * @param {Object} value
- * @param {Object} dateBase
- */
- compareValueWithStartAndEnd(value, start, end) {
- let winner = null
- value = this.superTimeStamp(value)
- start = this.superTimeStamp(start)
- end = this.superTimeStamp(end)
-
- if (start && end) {
- if (value < start) {
- winner = new Date(start)
- } else if (value > end) {
- winner = new Date(end)
- } else {
- winner = new Date(value)
- }
- } else if (start && !end) {
- winner = start <= value ? new Date(value) : new Date(start)
- } else if (!start && end) {
- winner = value <= end ? new Date(value) : new Date(end)
- } else {
- winner = new Date(value)
- }
-
- return winner
- },
-
- /**
- * 转换为可比较的时间戳,接受日期、时分秒、时间戳
- * @param {Object} value
- */
- superTimeStamp(value) {
- let dateBase = ''
- if (this.type === 'time' && value && typeof value === 'string') {
- const now = new Date()
- const year = now.getFullYear()
- const month = now.getMonth() + 1
- const day = now.getDate()
- dateBase = year + '/' + month + '/' + day + ' '
- }
- if (Number(value)) {
- value = parseInt(value)
- dateBase = 0
- }
- return this.createTimeStamp(dateBase + value)
- },
-
- /**
- * 解析默认值 value,字符串、时间戳
- * @param {Object} defaultTime
- */
- parseValue(value) {
- if (!value) {
- return
- }
- if (this.type === 'time' && typeof value === "string") {
- this.parseTimeType(value)
- } else {
- let defaultDate = null
- defaultDate = new Date(value)
- if (this.type !== 'time') {
- this.year = defaultDate.getFullYear()
- this.month = defaultDate.getMonth() + 1
- this.day = defaultDate.getDate()
- }
- if (this.type !== 'date') {
- this.hour = defaultDate.getHours()
- this.minute = defaultDate.getMinutes()
- this.second = defaultDate.getSeconds()
- }
- }
- if (this.hideSecond) {
- this.second = 0
- }
- },
-
- /**
- * 解析可选择时间范围 start、end,年月日字符串、时间戳
- * @param {Object} defaultTime
- */
- parseDatetimeRange(point, pointType) {
- // 时间为空,则重置为初始值
- if (!point) {
- if (pointType === 'start') {
- this.startYear = 1920
- this.startMonth = 1
- this.startDay = 1
- this.startHour = 0
- this.startMinute = 0
- this.startSecond = 0
- }
- if (pointType === 'end') {
- this.endYear = 2120
- this.endMonth = 12
- this.endDay = 31
- this.endHour = 23
- this.endMinute = 59
- this.endSecond = 59
- }
- return
- }
- if (this.type === 'time') {
- const pointArr = point.split(':')
- this[pointType + 'Hour'] = Number(pointArr[0])
- this[pointType + 'Minute'] = Number(pointArr[1])
- this[pointType + 'Second'] = Number(pointArr[2])
- } else {
- if (!point) {
- pointType === 'start' ? this.startYear = this.year - 60 : this.endYear = this.year + 60
- return
- }
- if (Number(point)) {
- point = parseInt(point)
- }
- // datetime 的 end 没有时分秒, 则不限制
- const hasTime = /[0-9]:[0-9]/
- if (this.type === 'datetime' && pointType === 'end' && typeof point === 'string' && !hasTime.test(
- point)) {
- point = point + ' 23:59:59'
- }
- const pointDate = new Date(point)
- this[pointType + 'Year'] = pointDate.getFullYear()
- this[pointType + 'Month'] = pointDate.getMonth() + 1
- this[pointType + 'Day'] = pointDate.getDate()
- if (this.type === 'datetime') {
- this[pointType + 'Hour'] = pointDate.getHours()
- this[pointType + 'Minute'] = pointDate.getMinutes()
- this[pointType + 'Second'] = pointDate.getSeconds()
- }
- }
- },
-
- // 获取 年、月、日、时、分、秒 当前可选范围
- getCurrentRange(value) {
- const range = []
- for (let i = this['min' + this.capitalize(value)]; i <= this['max' + this.capitalize(value)]; i++) {
- range.push(i)
- }
- return range
- },
-
- // 字符串首字母大写
- capitalize(str) {
- return str.charAt(0).toUpperCase() + str.slice(1)
- },
-
- // 检查当前值是否在范围内,不在则当前值重置为可选范围第一项
- checkValue(name, value, values) {
- if (values.indexOf(value) === -1) {
- this[name] = values[0]
- }
- },
-
- // 每个月的实际天数
- daysInMonth(year, month) { // Use 1 for January, 2 for February, etc.
- return new Date(year, month, 0).getDate();
- },
-
- //兼容 iOS、safari 日期格式
- fixIosDateFormat(value) {
- if (typeof value === 'string') {
- value = value.replace(/-/g, '/')
- }
- return value
- },
-
- /**
- * 生成时间戳
- * @param {Object} time
- */
- createTimeStamp(time) {
- if (!time) return
- if (typeof time === "number") {
- return time
- } else {
- time = time.replace(/-/g, '/')
- if (this.type === 'date') {
- time = time + ' ' + '00:00:00'
- }
- return Date.parse(time)
- }
- },
-
- /**
- * 生成日期或时间的字符串
- */
- createDomSting() {
- const yymmdd = this.year +
- '-' +
- this.lessThanTen(this.month) +
- '-' +
- this.lessThanTen(this.day)
-
- let hhmmss = this.lessThanTen(this.hour) +
- ':' +
- this.lessThanTen(this.minute)
-
- if (!this.hideSecond) {
- hhmmss = hhmmss + ':' + this.lessThanTen(this.second)
- }
-
- if (this.type === 'date') {
- return yymmdd
- } else if (this.type === 'time') {
- return hhmmss
- } else {
- return yymmdd + ' ' + hhmmss
- }
- },
-
- /**
- * 初始化返回值,并抛出 change 事件
- */
- initTime(emit = true) {
- this.time = this.createDomSting()
- if (!emit) return
- if (this.returnType === 'timestamp' && this.type !== 'time') {
- this.$emit('change', this.createTimeStamp(this.time))
- this.$emit('input', this.createTimeStamp(this.time))
- this.$emit('update:modelValue', this.createTimeStamp(this.time))
- } else {
- this.$emit('change', this.time)
- this.$emit('input', this.time)
- this.$emit('update:modelValue', this.time)
- }
- },
-
- /**
- * 用户选择日期或时间更新 data
- * @param {Object} e
- */
- bindDateChange(e) {
- const val = e.detail.value
- this.year = this.years[val[0]]
- this.month = this.months[val[1]]
- this.day = this.days[val[2]]
- },
- bindTimeChange(e) {
- const val = e.detail.value
- this.hour = this.hours[val[0]]
- this.minute = this.minutes[val[1]]
- this.second = this.seconds[val[2]]
- },
-
- /**
- * 初始化弹出层
- */
- initTimePicker() {
- if (this.disabled) return
- const value = fixIosDateFormat(this.time)
- this.initPickerValue(value)
- this.visible = !this.visible
- },
-
- /**
- * 触发或关闭弹框
- */
- tiggerTimePicker(e) {
- this.visible = !this.visible
- },
-
- /**
- * 用户点击“清空”按钮,清空当前值
- */
- clearTime() {
- this.time = ''
- this.$emit('change', this.time)
- this.$emit('input', this.time)
- this.$emit('update:modelValue', this.time)
- this.tiggerTimePicker()
- },
-
- /**
- * 用户点击“确定”按钮
- */
- setTime() {
- this.initTime()
- this.tiggerTimePicker()
- }
- }
- }
-</script>
-
-<style lang="scss">
- $uni-primary: #007aff !default;
-
- .uni-datetime-picker {
- /* #ifndef APP-NVUE */
- /* width: 100%; */
- /* #endif */
- }
-
- .uni-datetime-picker-view {
- height: 130px;
- width: 270px;
- /* #ifndef APP-NVUE */
- cursor: pointer;
- /* #endif */
- }
-
- .uni-datetime-picker-item {
- height: 50px;
- line-height: 50px;
- text-align: center;
- font-size: 14px;
- }
-
- .uni-datetime-picker-btn {
- margin-top: 60px;
- /* #ifndef APP-NVUE */
- display: flex;
- cursor: pointer;
- /* #endif */
- flex-direction: row;
- justify-content: space-between;
- }
-
- .uni-datetime-picker-btn-text {
- font-size: 14px;
- color: $uni-primary;
- }
-
- .uni-datetime-picker-btn-group {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- }
-
- .uni-datetime-picker-cancel {
- margin-right: 30px;
- }
-
- .uni-datetime-picker-mask {
- position: fixed;
- bottom: 0px;
- top: 0px;
- left: 0px;
- right: 0px;
- background-color: rgba(0, 0, 0, 0.4);
- transition-duration: 0.3s;
- z-index: 998;
- }
-
- .uni-datetime-picker-popup {
- border-radius: 8px;
- padding: 30px;
- width: 270px;
- /* #ifdef APP-NVUE */
- height: 500px;
- /* #endif */
- /* #ifdef APP-NVUE */
- width: 330px;
- /* #endif */
- background-color: #fff;
- position: fixed;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- transition-duration: 0.3s;
- z-index: 999;
- }
-
- .fix-nvue-height {
- /* #ifdef APP-NVUE */
- height: 330px;
- /* #endif */
- }
-
- .uni-datetime-picker-time {
- color: grey;
- }
-
- .uni-datetime-picker-column {
- height: 50px;
- }
-
- .uni-datetime-picker-timebox {
-
- border: 1px solid #E5E5E5;
- border-radius: 5px;
- padding: 7px 10px;
- /* #ifndef APP-NVUE */
- box-sizing: border-box;
- cursor: pointer;
- /* #endif */
- }
-
- .uni-datetime-picker-timebox-pointer {
- /* #ifndef APP-NVUE */
- cursor: pointer;
- /* #endif */
- }
-
-
- .uni-datetime-picker-disabled {
- opacity: 0.4;
- /* #ifdef H5 */
- cursor: not-allowed !important;
- /* #endif */
- }
-
- .uni-datetime-picker-text {
- font-size: 14px;
- line-height: 50px
- }
-
- .uni-datetime-picker-sign {
- position: absolute;
- top: 53px;
- /* 减掉 10px 的元素高度,兼容nvue */
- color: #999;
- /* #ifdef APP-NVUE */
- font-size: 16px;
- /* #endif */
- }
-
- .sign-left {
- left: 86px;
- }
-
- .sign-right {
- right: 86px;
- }
-
- .sign-center {
- left: 135px;
- }
-
- .uni-datetime-picker__container-box {
- position: relative;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-top: 40px;
- }
-
- .time-hide-second {
- width: 180px;
- }
-</style>
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue b/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue
deleted file mode 100644
index 83008e4..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue
+++ /dev/null
@@ -1,1051 +0,0 @@
-<template>
- <view class="uni-date">
- <view class="uni-date-editor" @click="show">
- <slot>
- <view class="uni-date-editor--x"
- :class="{'uni-date-editor--x__disabled': disabled,'uni-date-x--border': border}">
- <view v-if="!isRange" class="uni-date-x uni-date-single">
- <uni-icons class="icon-calendar" type="calendar" color="#c0c4cc" size="22"></uni-icons>
- <view class="uni-date__x-input">{{ displayValue || singlePlaceholderText }}</view>
- </view>
-
- <view v-else class="uni-date-x uni-date-range">
- <uni-icons class="icon-calendar" type="calendar" color="#c0c4cc" size="22"></uni-icons>
- <view class="uni-date__x-input text-center">
- {{ displayRangeValue.startDate || startPlaceholderText }}</view>
-
- <view class="range-separator">{{rangeSeparator}}</view>
-
- <view class="uni-date__x-input text-center">
- {{ displayRangeValue.endDate || endPlaceholderText }}</view>
- </view>
-
- <view v-if="showClearIcon" class="uni-date__icon-clear" @click.stop="clear">
- <uni-icons type="clear" color="#c0c4cc" size="22"></uni-icons>
- </view>
- </view>
- </slot>
- </view>
-
- <view v-show="pickerVisible" class="uni-date-mask--pc" @click="close"></view>
-
- <view v-if="!isPhone" v-show="pickerVisible" ref="datePicker" class="uni-date-picker__container">
- <view v-if="!isRange" class="uni-date-single--x" :style="pickerPositionStyle">
- <view class="uni-popper__arrow"></view>
-
- <view v-if="hasTime" class="uni-date-changed popup-x-header">
- <input class="uni-date__input text-center" type="text" v-model="inputDate"
- :placeholder="selectDateText" />
-
- <time-picker type="time" v-model="pickerTime" :border="false" :disabled="!inputDate"
- :start="timepickerStartTime" :end="timepickerEndTime" :hideSecond="hideSecond"
- style="width: 100%;">
- <input class="uni-date__input text-center" type="text" v-model="pickerTime"
- :placeholder="selectTimeText" :disabled="!inputDate" />
- </time-picker>
- </view>
-
- <Calendar ref="pcSingle" :showMonth="false" :start-date="calendarRange.startDate"
- :end-date="calendarRange.endDate" :date="calendarDate" @change="singleChange"
- :default-value="defaultValue" style="padding: 0 8px;" />
-
- <view v-if="hasTime" class="popup-x-footer">
- <text class="confirm-text" @click="confirmSingleChange">{{okText}}</text>
- </view>
- </view>
-
- <view v-else class="uni-date-range--x" :style="pickerPositionStyle">
- <view class="uni-popper__arrow"></view>
- <view v-if="hasTime" class="popup-x-header uni-date-changed">
- <view class="popup-x-header--datetime">
- <input class="uni-date__input uni-date-range__input" type="text" v-model="tempRange.startDate"
- :placeholder="startDateText" />
-
- <time-picker type="time" v-model="tempRange.startTime" :start="timepickerStartTime"
- :border="false" :disabled="!tempRange.startDate" :hideSecond="hideSecond">
- <input class="uni-date__input uni-date-range__input" type="text"
- v-model="tempRange.startTime" :placeholder="startTimeText"
- :disabled="!tempRange.startDate" />
- </time-picker>
- </view>
-
- <uni-icons type="arrowthinright" color="#999" style="line-height: 40px;"></uni-icons>
-
- <view class="popup-x-header--datetime">
- <input class="uni-date__input uni-date-range__input" type="text" v-model="tempRange.endDate"
- :placeholder="endDateText" />
-
- <time-picker type="time" v-model="tempRange.endTime" :end="timepickerEndTime" :border="false"
- :disabled="!tempRange.endDate" :hideSecond="hideSecond">
- <input class="uni-date__input uni-date-range__input" type="text" v-model="tempRange.endTime"
- :placeholder="endTimeText" :disabled="!tempRange.endDate" />
- </time-picker>
- </view>
- </view>
-
- <view class="popup-x-body">
- <Calendar ref="left" :showMonth="false" :start-date="calendarRange.startDate"
- :end-date="calendarRange.endDate" :range="true" :pleStatus="endMultipleStatus"
- @change="leftChange" @firstEnterCale="updateRightCale" style="padding: 0 8px;" />
- <Calendar ref="right" :showMonth="false" :start-date="calendarRange.startDate"
- :end-date="calendarRange.endDate" :range="true" @change="rightChange"
- :pleStatus="startMultipleStatus" @firstEnterCale="updateLeftCale"
- style="padding: 0 8px;border-left: 1px solid #F1F1F1;" />
- </view>
-
- <view v-if="hasTime" class="popup-x-footer">
- <text @click="clear">{{clearText}}</text>
- <text class="confirm-text" @click="confirmRangeChange">{{okText}}</text>
- </view>
- </view>
- </view>
-
- <Calendar v-if="isPhone" ref="mobile" :clearDate="false" :date="calendarDate" :defTime="mobileCalendarTime"
- :start-date="calendarRange.startDate" :end-date="calendarRange.endDate" :selectableTimes="mobSelectableTime"
- :startPlaceholder="startPlaceholder" :endPlaceholder="endPlaceholder" :default-value="defaultValue"
- :pleStatus="endMultipleStatus" :showMonth="false" :range="isRange" :hasTime="hasTime" :insert="false"
- :hideSecond="hideSecond" @confirm="mobileChange" @maskClose="close" />
- </view>
-</template>
-<script>
- import uniIcons from "../../../uni-icons/components/uni-icons/uni-icons.vue"
- /**
- * DatetimePicker 时间选择器
- * @description 同时支持 PC 和移动端使用日历选择日期和日期范围
- * @tutorial https://ext.dcloud.net.cn/plugin?id=3962
- * @property {String} type 选择器类型
- * @property {String|Number|Array|Date} value 绑定值
- * @property {String} placeholder 单选择时的占位内容
- * @property {String} start 起始时间
- * @property {String} end 终止时间
- * @property {String} start-placeholder 范围选择时开始日期的占位内容
- * @property {String} end-placeholder 范围选择时结束日期的占位内容
- * @property {String} range-separator 选择范围时的分隔符
- * @property {Boolean} border = [true|false] 是否有边框
- * @property {Boolean} disabled = [true|false] 是否禁用
- * @property {Boolean} clearIcon = [true|false] 是否显示清除按钮(仅PC端适用)
- * @property {[String} defaultValue 选择器打开时默认显示的时间
- * @event {Function} change 确定日期时触发的事件
- * @event {Function} maskClick 点击遮罩层触发的事件
- * @event {Function} show 打开弹出层
- * @event {Function} close 关闭弹出层
- * @event {Function} clear 清除上次选中的状态和值
- **/
- import Calendar from './calendar.vue'
- import TimePicker from './time-picker.vue'
- import {
- initVueI18n
- } from '@dcloudio/uni-i18n'
- import i18nMessages from './i18n/index.js'
- import {
- getDateTime,
- getDate,
- getTime,
- getDefaultSecond,
- dateCompare,
- checkDate,
- fixIosDateFormat
- } from './util'
-
- export default {
- name: 'UniDatetimePicker',
- options: {
- virtualHost: true
- },
- components: {
- Calendar,
- TimePicker,
- uniIcons
- },
- data() {
- return {
- isRange: false,
- hasTime: false,
- displayValue: '',
- inputDate: '',
- calendarDate: '',
- pickerTime: '',
- calendarRange: {
- startDate: '',
- startTime: '',
- endDate: '',
- endTime: ''
- },
- displayRangeValue: {
- startDate: '',
- endDate: '',
- },
- tempRange: {
- startDate: '',
- startTime: '',
- endDate: '',
- endTime: ''
- },
- // 左右日历同步数据
- startMultipleStatus: {
- before: '',
- after: '',
- data: [],
- fulldate: ''
- },
- endMultipleStatus: {
- before: '',
- after: '',
- data: [],
- fulldate: ''
- },
- pickerVisible: false,
- pickerPositionStyle: null,
- isEmitValue: false,
- isPhone: false,
- isFirstShow: true,
- i18nT: () => {}
- }
- },
- props: {
- type: {
- type: String,
- default: 'datetime'
- },
- value: {
- type: [String, Number, Array, Date],
- default: ''
- },
- modelValue: {
- type: [String, Number, Array, Date],
- default: ''
- },
- start: {
- type: [Number, String],
- default: ''
- },
- end: {
- type: [Number, String],
- default: ''
- },
- returnType: {
- type: String,
- default: 'string'
- },
- placeholder: {
- type: String,
- default: ''
- },
- startPlaceholder: {
- type: String,
- default: ''
- },
- endPlaceholder: {
- type: String,
- default: ''
- },
- rangeSeparator: {
- type: String,
- default: '-'
- },
- border: {
- type: [Boolean],
- default: true
- },
- disabled: {
- type: [Boolean],
- default: false
- },
- clearIcon: {
- type: [Boolean],
- default: true
- },
- hideSecond: {
- type: [Boolean],
- default: false
- },
- defaultValue: {
- type: [String, Object, Array],
- default: ''
- }
- },
- watch: {
- type: {
- immediate: true,
- handler(newVal) {
- this.hasTime = newVal.indexOf('time') !== -1
- this.isRange = newVal.indexOf('range') !== -1
- }
- },
- // #ifndef VUE3
- value: {
- immediate: true,
- handler(newVal) {
- if (this.isEmitValue) {
- this.isEmitValue = false
- return
- }
- this.initPicker(newVal)
- }
- },
- // #endif
- // #ifdef VUE3
- modelValue: {
- immediate: true,
- handler(newVal) {
- if (this.isEmitValue) {
- this.isEmitValue = false
- return
- }
- this.initPicker(newVal)
- }
- },
- // #endif
- start: {
- immediate: true,
- handler(newVal) {
- if (!newVal) return
- this.calendarRange.startDate = getDate(newVal)
- if (this.hasTime) {
- this.calendarRange.startTime = getTime(newVal)
- }
- }
- },
- end: {
- immediate: true,
- handler(newVal) {
- if (!newVal) return
- this.calendarRange.endDate = getDate(newVal)
- if (this.hasTime) {
- this.calendarRange.endTime = getTime(newVal, this.hideSecond)
- }
- }
- },
- },
- computed: {
- timepickerStartTime() {
- const activeDate = this.isRange ? this.tempRange.startDate : this.inputDate
- return activeDate === this.calendarRange.startDate ? this.calendarRange.startTime : ''
- },
- timepickerEndTime() {
- const activeDate = this.isRange ? this.tempRange.endDate : this.inputDate
- return activeDate === this.calendarRange.endDate ? this.calendarRange.endTime : ''
- },
- mobileCalendarTime() {
- const timeRange = {
- start: this.tempRange.startTime,
- end: this.tempRange.endTime
- }
- return this.isRange ? timeRange : this.pickerTime
- },
- mobSelectableTime() {
- return {
- start: this.calendarRange.startTime,
- end: this.calendarRange.endTime
- }
- },
- datePopupWidth() {
- // todo
- return this.isRange ? 653 : 301
- },
-
- /**
- * for i18n
- */
- singlePlaceholderText() {
- return this.placeholder || (this.type === 'date' ? this.selectDateText : this.selectDateTimeText)
- },
- startPlaceholderText() {
- return this.startPlaceholder || this.startDateText
- },
- endPlaceholderText() {
- return this.endPlaceholder || this.endDateText
- },
- selectDateText() {
- return this.i18nT("uni-datetime-picker.selectDate")
- },
- selectDateTimeText() {
- return this.i18nT("uni-datetime-picker.selectDateTime")
- },
- selectTimeText() {
- return this.i18nT("uni-datetime-picker.selectTime")
- },
- startDateText() {
- return this.startPlaceholder || this.i18nT("uni-datetime-picker.startDate")
- },
- startTimeText() {
- return this.i18nT("uni-datetime-picker.startTime")
- },
- endDateText() {
- return this.endPlaceholder || this.i18nT("uni-datetime-picker.endDate")
- },
- endTimeText() {
- return this.i18nT("uni-datetime-picker.endTime")
- },
- okText() {
- return this.i18nT("uni-datetime-picker.ok")
- },
- clearText() {
- return this.i18nT("uni-datetime-picker.clear")
- },
- showClearIcon() {
- return this.clearIcon && !this.disabled && (this.displayValue || (this.displayRangeValue.startDate && this
- .displayRangeValue.endDate))
- }
- },
- created() {
- this.initI18nT()
- this.platform()
- },
- methods: {
- initI18nT() {
- const vueI18n = initVueI18n(i18nMessages)
- this.i18nT = vueI18n.t
- },
- initPicker(newVal) {
- if ((!newVal && !this.defaultValue) || Array.isArray(newVal) && !newVal.length) {
- this.$nextTick(() => {
- this.clear(false)
- })
- return
- }
-
- if (!Array.isArray(newVal) && !this.isRange) {
- if (newVal) {
- this.displayValue = this.inputDate = this.calendarDate = getDate(newVal)
- if (this.hasTime) {
- this.pickerTime = getTime(newVal, this.hideSecond)
- this.displayValue = `${this.displayValue} ${this.pickerTime}`
- }
- } else if (this.defaultValue) {
- this.inputDate = this.calendarDate = getDate(this.defaultValue)
- if (this.hasTime) {
- this.pickerTime = getTime(this.defaultValue, this.hideSecond)
- }
- }
- } else {
- const [before, after] = newVal
- if (!before && !after) return
- const beforeDate = getDate(before)
- const beforeTime = getTime(before, this.hideSecond)
-
- const afterDate = getDate(after)
- const afterTime = getTime(after, this.hideSecond)
- const startDate = beforeDate
- const endDate = afterDate
- this.displayRangeValue.startDate = this.tempRange.startDate = startDate
- this.displayRangeValue.endDate = this.tempRange.endDate = endDate
-
- if (this.hasTime) {
- this.displayRangeValue.startDate = `${beforeDate} ${beforeTime}`
- this.displayRangeValue.endDate = `${afterDate} ${afterTime}`
- this.tempRange.startTime = beforeTime
- this.tempRange.endTime = afterTime
- }
- const defaultRange = {
- before: beforeDate,
- after: afterDate
- }
- this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, defaultRange, {
- which: 'right'
- })
- this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, defaultRange, {
- which: 'left'
- })
- }
- },
- updateLeftCale(e) {
- const left = this.$refs.left
- // 设置范围选
- left.cale.setHoverMultiple(e.after)
- left.setDate(this.$refs.left.nowDate.fullDate)
- },
- updateRightCale(e) {
- const right = this.$refs.right
- // 设置范围选
- right.cale.setHoverMultiple(e.after)
- right.setDate(this.$refs.right.nowDate.fullDate)
- },
- platform() {
- if (typeof navigator !== "undefined") {
- this.isPhone = navigator.userAgent.toLowerCase().indexOf('mobile') !== -1
- return
- }
- const {
- windowWidth
- } = uni.getSystemInfoSync()
- this.isPhone = windowWidth <= 500
- this.windowWidth = windowWidth
- },
- show() {
- if (this.disabled) {
- return
- }
- this.platform()
- if (this.isPhone) {
- setTimeout(() => {
- this.$refs.mobile.open()
- }, 0);
- return
- }
- this.pickerPositionStyle = {
- top: '10px'
- }
- const dateEditor = uni.createSelectorQuery().in(this).select(".uni-date-editor")
- dateEditor.boundingClientRect(rect => {
- if (this.windowWidth - rect.left < this.datePopupWidth) {
- this.pickerPositionStyle.right = 0
- }
- }).exec()
- setTimeout(() => {
- this.pickerVisible = !this.pickerVisible
- if (!this.isPhone && this.isRange && this.isFirstShow) {
- this.isFirstShow = false
- const {
- startDate,
- endDate
- } = this.calendarRange
- if (startDate && endDate) {
- if (this.diffDate(startDate, endDate) < 30) {
- this.$refs.right.changeMonth('pre')
- }
- } else {
- this.$refs.right.changeMonth('next')
- this.$refs.right.cale.lastHover = false
- }
- }
-
- }, 50)
- },
- close() {
- setTimeout(() => {
- this.pickerVisible = false
- this.$emit('maskClick', this.value)
- this.$refs.mobile && this.$refs.mobile.close()
- }, 20)
- },
- setEmit(value) {
- if (this.returnType === "timestamp" || this.returnType === "date") {
- if (!Array.isArray(value)) {
- if (!this.hasTime) {
- value = value + ' ' + '00:00:00'
- }
- value = this.createTimestamp(value)
- if (this.returnType === "date") {
- value = new Date(value)
- }
- } else {
- if (!this.hasTime) {
- value[0] = value[0] + ' ' + '00:00:00'
- value[1] = value[1] + ' ' + '00:00:00'
- }
- value[0] = this.createTimestamp(value[0])
- value[1] = this.createTimestamp(value[1])
- if (this.returnType === "date") {
- value[0] = new Date(value[0])
- value[1] = new Date(value[1])
- }
- }
- }
-
- this.$emit('update:modelValue', value)
- this.$emit('input', value)
- this.$emit('change', value)
- this.isEmitValue = true
- },
- createTimestamp(date) {
- date = fixIosDateFormat(date)
- return Date.parse(new Date(date))
- },
- singleChange(e) {
- this.calendarDate = this.inputDate = e.fulldate
- if (this.hasTime) return
- this.confirmSingleChange()
- },
- confirmSingleChange() {
- if (!checkDate(this.inputDate)) {
- const now = new Date()
- this.calendarDate = this.inputDate = getDate(now)
- this.pickerTime = getTime(now, this.hideSecond)
- }
-
- let startLaterInputDate = false
- let startDate, startTime
- if (this.start) {
- let startString = this.start
- if (typeof this.start === 'number') {
- startString = getDateTime(this.start, this.hideSecond)
- }
- [startDate, startTime] = startString.split(' ')
- if (this.start && !dateCompare(startDate, this.inputDate)) {
- startLaterInputDate = true
- this.inputDate = startDate
- }
- }
-
- let endEarlierInputDate = false
- let endDate, endTime
- if (this.end) {
- let endString = this.end
- if (typeof this.end === 'number') {
- endString = getDateTime(this.end, this.hideSecond)
- }
- [endDate, endTime] = endString.split(' ')
- if (this.end && !dateCompare(this.inputDate, endDate)) {
- endEarlierInputDate = true
- this.inputDate = endDate
- }
- }
- if (this.hasTime) {
- if (startLaterInputDate) {
- this.pickerTime = startTime || getDefaultSecond(this.hideSecond)
- }
- if (endEarlierInputDate) {
- this.pickerTime = endTime || getDefaultSecond(this.hideSecond)
- }
- if (!this.pickerTime) {
- this.pickerTime = getTime(Date.now(), this.hideSecond)
- }
- this.displayValue = `${this.inputDate} ${this.pickerTime}`
- } else {
- this.displayValue = this.inputDate
- }
- this.setEmit(this.displayValue)
- this.pickerVisible = false
- },
- leftChange(e) {
- const {
- before,
- after
- } = e.range
- this.rangeChange(before, after)
- const obj = {
- before: e.range.before,
- after: e.range.after,
- data: e.range.data,
- fulldate: e.fulldate
- }
- this.startMultipleStatus = Object.assign({}, this.startMultipleStatus, obj)
- },
- rightChange(e) {
- const {
- before,
- after
- } = e.range
- this.rangeChange(before, after)
- const obj = {
- before: e.range.before,
- after: e.range.after,
- data: e.range.data,
- fulldate: e.fulldate
- }
- this.endMultipleStatus = Object.assign({}, this.endMultipleStatus, obj)
- },
- mobileChange(e) {
- if (this.isRange) {
- const {
- before,
- after
- } = e.range
-
- if (!before || !after) {
- return
- }
-
- this.handleStartAndEnd(before, after, true)
- if (this.hasTime) {
- const {
- startTime,
- endTime
- } = e.timeRange
- this.tempRange.startTime = startTime
- this.tempRange.endTime = endTime
- }
- this.confirmRangeChange()
- } else {
- if (this.hasTime) {
- this.displayValue = e.fulldate + ' ' + e.time
- } else {
- this.displayValue = e.fulldate
- }
- this.setEmit(this.displayValue)
- }
- this.$refs.mobile.close()
- },
- rangeChange(before, after) {
- if (!(before && after)) return
- this.handleStartAndEnd(before, after, true)
- if (this.hasTime) return
- this.confirmRangeChange()
- },
- confirmRangeChange() {
- if (!this.tempRange.startDate || !this.tempRange.endDate) {
- this.pickerVisible = false
- return
- }
- if (!checkDate(this.tempRange.startDate)) {
- this.tempRange.startDate = getDate(Date.now())
- }
- if (!checkDate(this.tempRange.endDate)) {
- this.tempRange.endDate = getDate(Date.now())
- }
-
- let start, end
-
- let startDateLaterRangeStartDate = false
- let startDateLaterRangeEndDate = false
- let startDate, startTime
- if (this.start) {
- let startString = this.start
- if (typeof this.start === 'number') {
- startString = getDateTime(this.start, this.hideSecond)
- }
- [startDate, startTime] = startString.split(' ')
- if (this.start && !dateCompare(this.start, this.tempRange.startDate)) {
- startDateLaterRangeStartDate = true
- this.tempRange.startDate = startDate
- }
- if (this.start && !dateCompare(this.start, this.tempRange.endDate)) {
- startDateLaterRangeEndDate = true
- this.tempRange.endDate = startDate
- }
- }
- let endDateEarlierRangeStartDate = false
- let endDateEarlierRangeEndDate = false
- let endDate, endTime
- if (this.end) {
- let endString = this.end
- if (typeof this.end === 'number') {
- endString = getDateTime(this.end, this.hideSecond)
- }
- [endDate, endTime] = endString.split(' ')
-
- if (this.end && !dateCompare(this.tempRange.startDate, this.end)) {
- endDateEarlierRangeStartDate = true
- this.tempRange.startDate = endDate
- }
- if (this.end && !dateCompare(this.tempRange.endDate, this.end)) {
- endDateEarlierRangeEndDate = true
- this.tempRange.endDate = endDate
- }
- }
- if (!this.hasTime) {
- start = this.displayRangeValue.startDate = this.tempRange.startDate
- end = this.displayRangeValue.endDate = this.tempRange.endDate
- } else {
- if (startDateLaterRangeStartDate) {
- this.tempRange.startTime = startTime || getDefaultSecond(this.hideSecond)
- } else if (endDateEarlierRangeStartDate) {
- this.tempRange.startTime = endTime || getDefaultSecond(this.hideSecond)
- }
- if (!this.tempRange.startTime) {
- this.tempRange.startTime = getTime(Date.now(), this.hideSecond)
- }
-
- if (startDateLaterRangeEndDate) {
- this.tempRange.endTime = startTime || getDefaultSecond(this.hideSecond)
- } else if (endDateEarlierRangeEndDate) {
- this.tempRange.endTime = endTime || getDefaultSecond(this.hideSecond)
- }
- if (!this.tempRange.endTime) {
- this.tempRange.endTime = getTime(Date.now(), this.hideSecond)
- }
- start = this.displayRangeValue.startDate = `${this.tempRange.startDate} ${this.tempRange.startTime}`
- end = this.displayRangeValue.endDate = `${this.tempRange.endDate} ${this.tempRange.endTime}`
- }
- if (!dateCompare(start, end)) {
- [start, end] = [end, start]
- }
- this.displayRangeValue.startDate = start
- this.displayRangeValue.endDate = end
- const displayRange = [start, end]
- this.setEmit(displayRange)
- this.pickerVisible = false
- },
- handleStartAndEnd(before, after, temp = false) {
- if (!(before && after)) return
-
- const type = temp ? 'tempRange' : 'range'
- const isStartEarlierEnd = dateCompare(before, after)
- this[type].startDate = isStartEarlierEnd ? before : after
- this[type].endDate = isStartEarlierEnd ? after : before
- },
- /**
- * 比较时间大小
- */
- dateCompare(startDate, endDate) {
- // 计算截止时间
- startDate = new Date(startDate.replace('-', '/').replace('-', '/'))
- // 计算详细项的截止时间
- endDate = new Date(endDate.replace('-', '/').replace('-', '/'))
- return startDate <= endDate
- },
-
- /**
- * 比较时间差
- */
- diffDate(startDate, endDate) {
- // 计算截止时间
- startDate = new Date(startDate.replace('-', '/').replace('-', '/'))
- // 计算详细项的截止时间
- endDate = new Date(endDate.replace('-', '/').replace('-', '/'))
- const diff = (endDate - startDate) / (24 * 60 * 60 * 1000)
- return Math.abs(diff)
- },
-
- clear(needEmit = true) {
- if (!this.isRange) {
- this.displayValue = ''
- this.inputDate = ''
- this.pickerTime = ''
- if (this.isPhone) {
- this.$refs.mobile && this.$refs.mobile.clearCalender()
- } else {
- this.$refs.pcSingle && this.$refs.pcSingle.clearCalender()
- }
- if (needEmit) {
- this.$emit('change', '')
- this.$emit('input', '')
- this.$emit('update:modelValue', '')
- }
- } else {
- this.displayRangeValue.startDate = ''
- this.displayRangeValue.endDate = ''
- this.tempRange.startDate = ''
- this.tempRange.startTime = ''
- this.tempRange.endDate = ''
- this.tempRange.endTime = ''
- if (this.isPhone) {
- this.$refs.mobile && this.$refs.mobile.clearCalender()
- } else {
- this.$refs.left && this.$refs.left.clearCalender()
- this.$refs.right && this.$refs.right.clearCalender()
- this.$refs.right && this.$refs.right.changeMonth('next')
- }
- if (needEmit) {
- this.$emit('change', [])
- this.$emit('input', [])
- this.$emit('update:modelValue', [])
- }
- }
- }
- }
- }
-</script>
-
-<style lang="scss">
- $uni-primary: #007aff !default;
-
- .uni-date {
- width: 100%;
- flex: 1;
- }
-
- .uni-date-x {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: center;
- border-radius: 4px;
- background-color: #fff;
- color: #666;
- font-size: 14px;
- flex: 1;
-
- .icon-calendar {
- padding-left: 3px;
- }
-
- .range-separator {
- height: 35px;
- /* #ifndef MP */
- padding: 0 2px;
- /* #endif */
- line-height: 35px;
- }
- }
-
- .uni-date-x--border {
- box-sizing: border-box;
- border-radius: 4px;
- border: 1px solid #e5e5e5;
- }
-
- .uni-date-editor--x {
- display: flex;
- align-items: center;
- position: relative;
- }
-
- .uni-date-editor--x .uni-date__icon-clear {
- padding-right: 3px;
- display: flex;
- align-items: center;
- /* #ifdef H5 */
- cursor: pointer;
- /* #endif */
- }
-
- .uni-date__x-input {
- width: auto;
- height: 35px;
- /* #ifndef MP */
- padding-left: 5px;
- /* #endif */
- position: relative;
- flex: 1;
- line-height: 35px;
- font-size: 14px;
- overflow: hidden;
- }
-
- .text-center {
- text-align: center;
- }
-
- .uni-date__input {
- height: 40px;
- width: 100%;
- line-height: 40px;
- font-size: 14px;
- }
-
- .uni-date-range__input {
- text-align: center;
- max-width: 142px;
- }
-
- .uni-date-picker__container {
- position: relative;
- }
-
- .uni-date-mask--pc {
- position: fixed;
- bottom: 0px;
- top: 0px;
- left: 0px;
- right: 0px;
- background-color: rgba(0, 0, 0, 0);
- transition-duration: 0.3s;
- z-index: 996;
- }
-
- .uni-date-single--x {
- background-color: #fff;
- position: absolute;
- top: 0;
- z-index: 999;
- border: 1px solid #EBEEF5;
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
- border-radius: 4px;
- }
-
- .uni-date-range--x {
- background-color: #fff;
- position: absolute;
- top: 0;
- z-index: 999;
- border: 1px solid #EBEEF5;
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
- border-radius: 4px;
- }
-
- .uni-date-editor--x__disabled {
- opacity: 0.4;
- cursor: default;
- }
-
- .uni-date-editor--logo {
- width: 16px;
- height: 16px;
- vertical-align: middle;
- }
-
- /* 添加时间 */
- .popup-x-header {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- }
-
- .popup-x-header--datetime {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- flex: 1;
- }
-
- .popup-x-body {
- display: flex;
- }
-
- .popup-x-footer {
- padding: 0 15px;
- border-top-color: #F1F1F1;
- border-top-style: solid;
- border-top-width: 1px;
- line-height: 40px;
- text-align: right;
- color: #666;
- }
-
- .popup-x-footer text:hover {
- color: $uni-primary;
- cursor: pointer;
- opacity: 0.8;
- }
-
- .popup-x-footer .confirm-text {
- margin-left: 20px;
- color: $uni-primary;
- }
-
- .uni-date-changed {
- text-align: center;
- color: #333;
- border-bottom-color: #F1F1F1;
- border-bottom-style: solid;
- border-bottom-width: 1px;
- }
-
- .uni-date-changed--time text {
- height: 50px;
- line-height: 50px;
- }
-
- .uni-date-changed .uni-date-changed--time {
- flex: 1;
- }
-
- .uni-date-changed--time-date {
- color: #333;
- opacity: 0.6;
- }
-
- .mr-50 {
- margin-right: 50px;
- }
-
- /* picker 弹出层通用的指示小三角, todo:扩展至上下左右方向定位 */
- .uni-popper__arrow,
- .uni-popper__arrow::after {
- position: absolute;
- display: block;
- width: 0;
- height: 0;
- border: 6px solid transparent;
- border-top-width: 0;
- }
-
- .uni-popper__arrow {
- filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
- top: -6px;
- left: 10%;
- margin-right: 3px;
- border-bottom-color: #EBEEF5;
- }
-
- .uni-popper__arrow::after {
- content: " ";
- top: 1px;
- margin-left: -6px;
- border-bottom-color: #fff;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/util.js b/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/util.js
deleted file mode 100644
index ab40b23..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/components/uni-datetime-picker/util.js
+++ /dev/null
@@ -1,403 +0,0 @@
-class Calendar {
- constructor({
- selected,
- startDate,
- endDate,
- range,
- } = {}) {
- // 当前日期
- this.date = this.getDateObj(new Date()) // 当前初入日期
- // 打点信息
- this.selected = selected || [];
- // 起始时间
- this.startDate = startDate
- // 终止时间
- this.endDate = endDate
- // 是否范围选择
- this.range = range
- // 多选状态
- this.cleanMultipleStatus()
- // 每周日期
- this.weeks = {}
- this.lastHover = false
- }
- /**
- * 设置日期
- * @param {Object} date
- */
- setDate(date) {
- const selectDate = this.getDateObj(date)
- this.getWeeks(selectDate.fullDate)
- }
-
- /**
- * 清理多选状态
- */
- cleanMultipleStatus() {
- this.multipleStatus = {
- before: '',
- after: '',
- data: []
- }
- }
-
- setStartDate(startDate) {
- this.startDate = startDate
- }
-
- setEndDate(endDate) {
- this.endDate = endDate
- }
-
- getPreMonthObj(date){
- date = fixIosDateFormat(date)
- date = new Date(date)
-
- const oldMonth = date.getMonth()
- date.setMonth(oldMonth - 1)
- const newMonth = date.getMonth()
- if(oldMonth !== 0 && newMonth - oldMonth === 0){
- date.setMonth(newMonth - 1)
- }
- return this.getDateObj(date)
- }
- getNextMonthObj(date){
- date = fixIosDateFormat(date)
- date = new Date(date)
-
- const oldMonth = date.getMonth()
- date.setMonth(oldMonth + 1)
- const newMonth = date.getMonth()
- if(newMonth - oldMonth > 1){
- date.setMonth(newMonth - 1)
- }
- return this.getDateObj(date)
- }
-
- /**
- * 获取指定格式Date对象
- */
- getDateObj(date) {
- date = fixIosDateFormat(date)
- date = new Date(date)
-
- return {
- fullDate: getDate(date),
- year: date.getFullYear(),
- month: addZero(date.getMonth() + 1),
- date: addZero(date.getDate()),
- day: date.getDay()
- }
- }
-
- /**
- * 获取上一个月日期集合
- */
- getPreMonthDays(amount, dateObj) {
- const result = []
- for (let i = amount - 1; i >= 0; i--) {
- const month = dateObj.month - 1
- result.push({
- date: new Date(dateObj.year, month, -i).getDate(),
- month,
- disable: true
- })
- }
- return result
- }
- /**
- * 获取本月日期集合
- */
- getCurrentMonthDays(amount, dateObj) {
- const result = []
- const fullDate = this.date.fullDate
- for (let i = 1; i <= amount; i++) {
- const currentDate = `${dateObj.year}-${dateObj.month}-${addZero(i)}`
- const isToday = fullDate === currentDate
- // 获取打点信息
- const info = this.selected && this.selected.find((item) => {
- if (this.dateEqual(currentDate, item.date)) {
- return item
- }
- })
-
- // 日期禁用
- let disableBefore = true
- let disableAfter = true
- if (this.startDate) {
- disableBefore = dateCompare(this.startDate, currentDate)
- }
-
- if (this.endDate) {
- disableAfter = dateCompare(currentDate, this.endDate)
- }
-
- let multiples = this.multipleStatus.data
- let multiplesStatus = -1
- if (this.range && multiples) {
- multiplesStatus = multiples.findIndex((item) => {
- return this.dateEqual(item, currentDate)
- })
- }
- const checked = multiplesStatus !== -1
-
- result.push({
- fullDate: currentDate,
- year: dateObj.year,
- date: i,
- multiple: this.range ? checked : false,
- beforeMultiple: this.isLogicBefore(currentDate, this.multipleStatus.before, this.multipleStatus.after),
- afterMultiple: this.isLogicAfter(currentDate, this.multipleStatus.before, this.multipleStatus.after),
- month: dateObj.month,
- disable: (this.startDate && !dateCompare(this.startDate, currentDate)) || (this.endDate && !dateCompare(currentDate,this.endDate)),
- isToday,
- userChecked: false,
- extraInfo: info
- })
- }
- return result
- }
- /**
- * 获取下一个月日期集合
- */
- _getNextMonthDays(amount, dateObj) {
- const result = []
- const month = dateObj.month + 1
- for (let i = 1; i <= amount; i++) {
- result.push({
- date: i,
- month,
- disable: true
- })
- }
- return result
- }
-
- /**
- * 获取当前日期详情
- * @param {Object} date
- */
- getInfo(date) {
- if (!date) {
- date = new Date()
- }
-
- return this.calendar.find(item => item.fullDate === this.getDateObj(date).fullDate)
- }
-
- /**
- * 比较时间是否相等
- */
- dateEqual(before, after) {
- before = new Date(fixIosDateFormat(before))
- after = new Date(fixIosDateFormat(after))
- return before.valueOf() === after.valueOf()
- }
-
- /**
- * 比较真实起始日期
- */
-
- isLogicBefore(currentDate, before, after) {
- let logicBefore = before
- if (before && after) {
- logicBefore = dateCompare(before, after) ? before : after
- }
- return this.dateEqual(logicBefore, currentDate)
- }
-
- isLogicAfter(currentDate, before, after) {
- let logicAfter = after
- if (before && after) {
- logicAfter = dateCompare(before, after) ? after : before
- }
- return this.dateEqual(logicAfter, currentDate)
- }
-
- /**
- * 获取日期范围内所有日期
- * @param {Object} begin
- * @param {Object} end
- */
- geDateAll(begin, end) {
- var arr = []
- var ab = begin.split('-')
- var ae = end.split('-')
- var db = new Date()
- db.setFullYear(ab[0], ab[1] - 1, ab[2])
- var de = new Date()
- de.setFullYear(ae[0], ae[1] - 1, ae[2])
- var unixDb = db.getTime() - 24 * 60 * 60 * 1000
- var unixDe = de.getTime() - 24 * 60 * 60 * 1000
- for (var k = unixDb; k <= unixDe;) {
- k = k + 24 * 60 * 60 * 1000
- arr.push(this.getDateObj(new Date(parseInt(k))).fullDate)
- }
- return arr
- }
-
- /**
- * 获取多选状态
- */
- setMultiple(fullDate) {
- if (!this.range) return
-
- let {
- before,
- after
- } = this.multipleStatus
- if (before && after) {
- if (!this.lastHover) {
- this.lastHover = true
- return
- }
- this.multipleStatus.before = fullDate
- this.multipleStatus.after = ''
- this.multipleStatus.data = []
- this.multipleStatus.fulldate = ''
- this.lastHover = false
- } else {
- if (!before) {
- this.multipleStatus.before = fullDate
- this.lastHover = false
- } else {
- this.multipleStatus.after = fullDate
- if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
- this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus
- .after);
- } else {
- this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus
- .before);
- }
- this.lastHover = true
- }
- }
- this.getWeeks(fullDate)
- }
-
- /**
- * 鼠标 hover 更新多选状态
- */
- setHoverMultiple(fullDate) {
- if (!this.range || this.lastHover) return
-
- const { before } = this.multipleStatus
-
- if (!before) {
- this.multipleStatus.before = fullDate
- } else {
- this.multipleStatus.after = fullDate
- if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
- this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
- } else {
- this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
- }
- }
- this.getWeeks(fullDate)
- }
-
- /**
- * 更新默认值多选状态
- */
- setDefaultMultiple(before, after) {
- this.multipleStatus.before = before
- this.multipleStatus.after = after
- if (before && after) {
- if (dateCompare(before, after)) {
- this.multipleStatus.data = this.geDateAll(before, after);
- this.getWeeks(after)
- } else {
- this.multipleStatus.data = this.geDateAll(after, before);
- this.getWeeks(before)
- }
- }
- }
-
- /**
- * 获取每周数据
- * @param {Object} dateData
- */
- getWeeks(dateData) {
- const {
- year,
- month,
- } = this.getDateObj(dateData)
-
- const preMonthDayAmount = new Date(year, month - 1, 1).getDay()
- const preMonthDays = this.getPreMonthDays(preMonthDayAmount, this.getDateObj(dateData))
-
- const currentMonthDayAmount = new Date(year, month, 0).getDate()
- const currentMonthDays = this.getCurrentMonthDays(currentMonthDayAmount, this.getDateObj(dateData))
-
- const nextMonthDayAmount = 42 - preMonthDayAmount - currentMonthDayAmount
- const nextMonthDays = this._getNextMonthDays(nextMonthDayAmount, this.getDateObj(dateData))
-
- const calendarDays = [...preMonthDays, ...currentMonthDays, ...nextMonthDays]
-
- const weeks = new Array(6)
- for (let i = 0; i < calendarDays.length; i++) {
- const index = Math.floor(i / 7)
- if(!weeks[index]){
- weeks[index] = new Array(7)
- }
- weeks[index][i % 7] = calendarDays[i]
- }
-
- this.calendar = calendarDays
- this.weeks = weeks
- }
-}
-
-function getDateTime(date, hideSecond){
- return `${getDate(date)} ${getTime(date, hideSecond)}`
-}
-
-function getDate(date) {
- date = fixIosDateFormat(date)
- date = new Date(date)
- const year = date.getFullYear()
- const month = date.getMonth()+1
- const day = date.getDate()
- return `${year}-${addZero(month)}-${addZero(day)}`
-}
-
-function getTime(date, hideSecond){
- date = fixIosDateFormat(date)
- date = new Date(date)
- const hour = date.getHours()
- const minute = date.getMinutes()
- const second = date.getSeconds()
- return hideSecond ? `${addZero(hour)}:${addZero(minute)}` : `${addZero(hour)}:${addZero(minute)}:${addZero(second)}`
-}
-
-function addZero(num) {
- if(num < 10){
- num = `0${num}`
- }
- return num
-}
-
-function getDefaultSecond(hideSecond) {
- return hideSecond ? '00:00' : '00:00:00'
-}
-
-function dateCompare(startDate, endDate) {
- startDate = new Date(fixIosDateFormat(startDate))
- endDate = new Date(fixIosDateFormat(endDate))
- return startDate <= endDate
-}
-
-function checkDate(date){
- const dateReg = /((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g
- return date.match(dateReg)
-}
-
-const dateTimeReg = /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])( [0-5]?[0-9]:[0-5]?[0-9]:[0-5]?[0-9])?$/
-function fixIosDateFormat(value) {
- if (typeof value === 'string' && dateTimeReg.test(value)) {
- value = value.replace(/-/g, '/')
- }
- return value
-}
-
-export {Calendar, getDateTime, getDate, getTime, addZero, getDefaultSecond, dateCompare, checkDate, fixIosDateFormat}
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/package.json b/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/package.json
deleted file mode 100644
index bc2378f..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/package.json
+++ /dev/null
@@ -1,87 +0,0 @@
-{
- "id": "uni-datetime-picker",
- "displayName": "uni-datetime-picker 日期选择器",
- "version": "2.2.23",
- "description": "uni-datetime-picker 日期时间选择器,支持日历,支持范围选择",
- "keywords": [
- "uni-datetime-picker",
- "uni-ui",
- "uniui",
- "日期时间选择器",
- "日期时间"
-],
- "repository": "https://github.com/dcloudio/uni-ui",
- "engines": {
- "HBuilderX": ""
- },
- "directories": {
- "example": "../../temps/example_temps"
- },
-"dcloudext": {
- "sale": {
- "regular": {
- "price": "0.00"
- },
- "sourcecode": {
- "price": "0.00"
- }
- },
- "contact": {
- "qq": ""
- },
- "declaration": {
- "ads": "无",
- "data": "无",
- "permissions": "无"
- },
- "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
- "type": "component-vue"
- },
- "uni_modules": {
- "dependencies": [
- "uni-scss",
- "uni-icons"
- ],
- "encrypt": [],
- "platforms": {
- "cloud": {
- "tcb": "y",
- "aliyun": "y"
- },
- "client": {
- "App": {
- "app-vue": "y",
- "app-nvue": "n"
- },
- "H5-mobile": {
- "Safari": "y",
- "Android Browser": "y",
- "微信浏览器(Android)": "y",
- "QQ浏览器(Android)": "y"
- },
- "H5-pc": {
- "Chrome": "y",
- "IE": "y",
- "Edge": "y",
- "Firefox": "y",
- "Safari": "y"
- },
- "小程序": {
- "微信": "y",
- "阿里": "y",
- "百度": "y",
- "字节跳动": "y",
- "QQ": "y"
- },
- "快应用": {
- "华为": "u",
- "联盟": "u"
- },
- "Vue": {
- "vue2": "y",
- "vue3": "y"
- }
- }
- }
- }
-}
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/readme.md b/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/readme.md
deleted file mode 100644
index 162fbef..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-datetime-picker/readme.md
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-> `重要通知:组件升级更新 2.0.0 后,支持日期+时间范围选择,组件 ui 将使用日历选择日期,ui 变化较大,同时支持 PC 和 移动端。此版本不向后兼容,不再支持单独的时间选择(type=time)及相关的 hide-second 属性(时间选可使用内置组件 picker)。若仍需使用旧版本,可在插件市场下载*非uni_modules版本*,旧版本将不再维护`
-
-## DatetimePicker 时间选择器
-
-> **组件名:uni-datetime-picker**
-> 代码块: `uDatetimePicker`
-
-
-该组件的优势是,支持**时间戳**输入和输出(起始时间、终止时间也支持时间戳),可**同时选择**日期和时间。
-
-若只是需要单独选择日期和时间,不需要时间戳输入和输出,可使用原生的 picker 组件。
-
-**_点击 picker 默认值规则:_**
-
-- 若设置初始值 value, 会显示在 picker 显示框中
-- 若无初始值 value,则初始值 value 为当前本地时间 Date.now(), 但不会显示在 picker 显示框中
-
-### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker)
-#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-icons/changelog.md b/subPackage/realtimeMonitor/components/uni-components/uni-icons/changelog.md
deleted file mode 100644
index 6449885..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-icons/changelog.md
+++ /dev/null
@@ -1,22 +0,0 @@
-## 1.3.5(2022-01-24)
-- 优化 size 属性可以传入不带单位的字符串数值
-## 1.3.4(2022-01-24)
-- 优化 size 支持其他单位
-## 1.3.3(2022-01-17)
-- 修复 nvue 有些图标不显示的bug,兼容老版本图标
-## 1.3.2(2021-12-01)
-- 优化 示例可复制图标名称
-## 1.3.1(2021-11-23)
-- 优化 兼容旧组件 type 值
-## 1.3.0(2021-11-19)
-- 新增 更多图标
-- 优化 自定义图标使用方式
-- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
-- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons)
-## 1.1.7(2021-11-08)
-## 1.2.0(2021-07-30)
-- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
-## 1.1.5(2021-05-12)
-- 新增 组件示例地址
-## 1.1.4(2021-02-05)
-- 调整为uni_modules目录规范
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-icons/components/uni-icons/icons.js b/subPackage/realtimeMonitor/components/uni-components/uni-icons/components/uni-icons/icons.js
deleted file mode 100644
index 7889936..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-icons/components/uni-icons/icons.js
+++ /dev/null
@@ -1,1169 +0,0 @@
-export default {
- "id": "2852637",
- "name": "uniui图标库",
- "font_family": "uniicons",
- "css_prefix_text": "uniui-",
- "description": "",
- "glyphs": [
- {
- "icon_id": "25027049",
- "name": "yanse",
- "font_class": "color",
- "unicode": "e6cf",
- "unicode_decimal": 59087
- },
- {
- "icon_id": "25027048",
- "name": "wallet",
- "font_class": "wallet",
- "unicode": "e6b1",
- "unicode_decimal": 59057
- },
- {
- "icon_id": "25015720",
- "name": "settings-filled",
- "font_class": "settings-filled",
- "unicode": "e6ce",
- "unicode_decimal": 59086
- },
- {
- "icon_id": "25015434",
- "name": "shimingrenzheng-filled",
- "font_class": "auth-filled",
- "unicode": "e6cc",
- "unicode_decimal": 59084
- },
- {
- "icon_id": "24934246",
- "name": "shop-filled",
- "font_class": "shop-filled",
- "unicode": "e6cd",
- "unicode_decimal": 59085
- },
- {
- "icon_id": "24934159",
- "name": "staff-filled-01",
- "font_class": "staff-filled",
- "unicode": "e6cb",
- "unicode_decimal": 59083
- },
- {
- "icon_id": "24932461",
- "name": "VIP-filled",
- "font_class": "vip-filled",
- "unicode": "e6c6",
- "unicode_decimal": 59078
- },
- {
- "icon_id": "24932462",
- "name": "plus_circle_fill",
- "font_class": "plus-filled",
- "unicode": "e6c7",
- "unicode_decimal": 59079
- },
- {
- "icon_id": "24932463",
- "name": "folder_add-filled",
- "font_class": "folder-add-filled",
- "unicode": "e6c8",
- "unicode_decimal": 59080
- },
- {
- "icon_id": "24932464",
- "name": "yanse-filled",
- "font_class": "color-filled",
- "unicode": "e6c9",
- "unicode_decimal": 59081
- },
- {
- "icon_id": "24932465",
- "name": "tune-filled",
- "font_class": "tune-filled",
- "unicode": "e6ca",
- "unicode_decimal": 59082
- },
- {
- "icon_id": "24932455",
- "name": "a-rilidaka-filled",
- "font_class": "calendar-filled",
- "unicode": "e6c0",
- "unicode_decimal": 59072
- },
- {
- "icon_id": "24932456",
- "name": "notification-filled",
- "font_class": "notification-filled",
- "unicode": "e6c1",
- "unicode_decimal": 59073
- },
- {
- "icon_id": "24932457",
- "name": "wallet-filled",
- "font_class": "wallet-filled",
- "unicode": "e6c2",
- "unicode_decimal": 59074
- },
- {
- "icon_id": "24932458",
- "name": "paihangbang-filled",
- "font_class": "medal-filled",
- "unicode": "e6c3",
- "unicode_decimal": 59075
- },
- {
- "icon_id": "24932459",
- "name": "gift-filled",
- "font_class": "gift-filled",
- "unicode": "e6c4",
- "unicode_decimal": 59076
- },
- {
- "icon_id": "24932460",
- "name": "fire-filled",
- "font_class": "fire-filled",
- "unicode": "e6c5",
- "unicode_decimal": 59077
- },
- {
- "icon_id": "24928001",
- "name": "refreshempty",
- "font_class": "refreshempty",
- "unicode": "e6bf",
- "unicode_decimal": 59071
- },
- {
- "icon_id": "24926853",
- "name": "location-ellipse",
- "font_class": "location-filled",
- "unicode": "e6af",
- "unicode_decimal": 59055
- },
- {
- "icon_id": "24926735",
- "name": "person-filled",
- "font_class": "person-filled",
- "unicode": "e69d",
- "unicode_decimal": 59037
- },
- {
- "icon_id": "24926703",
- "name": "personadd-filled",
- "font_class": "personadd-filled",
- "unicode": "e698",
- "unicode_decimal": 59032
- },
- {
- "icon_id": "24923351",
- "name": "back",
- "font_class": "back",
- "unicode": "e6b9",
- "unicode_decimal": 59065
- },
- {
- "icon_id": "24923352",
- "name": "forward",
- "font_class": "forward",
- "unicode": "e6ba",
- "unicode_decimal": 59066
- },
- {
- "icon_id": "24923353",
- "name": "arrowthinright",
- "font_class": "arrow-right",
- "unicode": "e6bb",
- "unicode_decimal": 59067
- },
- {
- "icon_id": "24923353",
- "name": "arrowthinright",
- "font_class": "arrowthinright",
- "unicode": "e6bb",
- "unicode_decimal": 59067
- },
- {
- "icon_id": "24923354",
- "name": "arrowthinleft",
- "font_class": "arrow-left",
- "unicode": "e6bc",
- "unicode_decimal": 59068
- },
- {
- "icon_id": "24923354",
- "name": "arrowthinleft",
- "font_class": "arrowthinleft",
- "unicode": "e6bc",
- "unicode_decimal": 59068
- },
- {
- "icon_id": "24923355",
- "name": "arrowthinup",
- "font_class": "arrow-up",
- "unicode": "e6bd",
- "unicode_decimal": 59069
- },
- {
- "icon_id": "24923355",
- "name": "arrowthinup",
- "font_class": "arrowthinup",
- "unicode": "e6bd",
- "unicode_decimal": 59069
- },
- {
- "icon_id": "24923356",
- "name": "arrowthindown",
- "font_class": "arrow-down",
- "unicode": "e6be",
- "unicode_decimal": 59070
- },{
- "icon_id": "24923356",
- "name": "arrowthindown",
- "font_class": "arrowthindown",
- "unicode": "e6be",
- "unicode_decimal": 59070
- },
- {
- "icon_id": "24923349",
- "name": "arrowdown",
- "font_class": "bottom",
- "unicode": "e6b8",
- "unicode_decimal": 59064
- },{
- "icon_id": "24923349",
- "name": "arrowdown",
- "font_class": "arrowdown",
- "unicode": "e6b8",
- "unicode_decimal": 59064
- },
- {
- "icon_id": "24923346",
- "name": "arrowright",
- "font_class": "right",
- "unicode": "e6b5",
- "unicode_decimal": 59061
- },
- {
- "icon_id": "24923346",
- "name": "arrowright",
- "font_class": "arrowright",
- "unicode": "e6b5",
- "unicode_decimal": 59061
- },
- {
- "icon_id": "24923347",
- "name": "arrowup",
- "font_class": "top",
- "unicode": "e6b6",
- "unicode_decimal": 59062
- },
- {
- "icon_id": "24923347",
- "name": "arrowup",
- "font_class": "arrowup",
- "unicode": "e6b6",
- "unicode_decimal": 59062
- },
- {
- "icon_id": "24923348",
- "name": "arrowleft",
- "font_class": "left",
- "unicode": "e6b7",
- "unicode_decimal": 59063
- },
- {
- "icon_id": "24923348",
- "name": "arrowleft",
- "font_class": "arrowleft",
- "unicode": "e6b7",
- "unicode_decimal": 59063
- },
- {
- "icon_id": "24923334",
- "name": "eye",
- "font_class": "eye",
- "unicode": "e651",
- "unicode_decimal": 58961
- },
- {
- "icon_id": "24923335",
- "name": "eye-filled",
- "font_class": "eye-filled",
- "unicode": "e66a",
- "unicode_decimal": 58986
- },
- {
- "icon_id": "24923336",
- "name": "eye-slash",
- "font_class": "eye-slash",
- "unicode": "e6b3",
- "unicode_decimal": 59059
- },
- {
- "icon_id": "24923337",
- "name": "eye-slash-filled",
- "font_class": "eye-slash-filled",
- "unicode": "e6b4",
- "unicode_decimal": 59060
- },
- {
- "icon_id": "24923305",
- "name": "info-filled",
- "font_class": "info-filled",
- "unicode": "e649",
- "unicode_decimal": 58953
- },
- {
- "icon_id": "24923299",
- "name": "reload-01",
- "font_class": "reload",
- "unicode": "e6b2",
- "unicode_decimal": 59058
- },
- {
- "icon_id": "24923195",
- "name": "mic_slash_fill",
- "font_class": "micoff-filled",
- "unicode": "e6b0",
- "unicode_decimal": 59056
- },
- {
- "icon_id": "24923165",
- "name": "map-pin-ellipse",
- "font_class": "map-pin-ellipse",
- "unicode": "e6ac",
- "unicode_decimal": 59052
- },
- {
- "icon_id": "24923166",
- "name": "map-pin",
- "font_class": "map-pin",
- "unicode": "e6ad",
- "unicode_decimal": 59053
- },
- {
- "icon_id": "24923167",
- "name": "location",
- "font_class": "location",
- "unicode": "e6ae",
- "unicode_decimal": 59054
- },
- {
- "icon_id": "24923064",
- "name": "starhalf",
- "font_class": "starhalf",
- "unicode": "e683",
- "unicode_decimal": 59011
- },
- {
- "icon_id": "24923065",
- "name": "star",
- "font_class": "star",
- "unicode": "e688",
- "unicode_decimal": 59016
- },
- {
- "icon_id": "24923066",
- "name": "star-filled",
- "font_class": "star-filled",
- "unicode": "e68f",
- "unicode_decimal": 59023
- },
- {
- "icon_id": "24899646",
- "name": "a-rilidaka",
- "font_class": "calendar",
- "unicode": "e6a0",
- "unicode_decimal": 59040
- },
- {
- "icon_id": "24899647",
- "name": "fire",
- "font_class": "fire",
- "unicode": "e6a1",
- "unicode_decimal": 59041
- },
- {
- "icon_id": "24899648",
- "name": "paihangbang",
- "font_class": "medal",
- "unicode": "e6a2",
- "unicode_decimal": 59042
- },
- {
- "icon_id": "24899649",
- "name": "font",
- "font_class": "font",
- "unicode": "e6a3",
- "unicode_decimal": 59043
- },
- {
- "icon_id": "24899650",
- "name": "gift",
- "font_class": "gift",
- "unicode": "e6a4",
- "unicode_decimal": 59044
- },
- {
- "icon_id": "24899651",
- "name": "link",
- "font_class": "link",
- "unicode": "e6a5",
- "unicode_decimal": 59045
- },
- {
- "icon_id": "24899652",
- "name": "notification",
- "font_class": "notification",
- "unicode": "e6a6",
- "unicode_decimal": 59046
- },
- {
- "icon_id": "24899653",
- "name": "staff",
- "font_class": "staff",
- "unicode": "e6a7",
- "unicode_decimal": 59047
- },
- {
- "icon_id": "24899654",
- "name": "VIP",
- "font_class": "vip",
- "unicode": "e6a8",
- "unicode_decimal": 59048
- },
- {
- "icon_id": "24899655",
- "name": "folder_add",
- "font_class": "folder-add",
- "unicode": "e6a9",
- "unicode_decimal": 59049
- },
- {
- "icon_id": "24899656",
- "name": "tune",
- "font_class": "tune",
- "unicode": "e6aa",
- "unicode_decimal": 59050
- },
- {
- "icon_id": "24899657",
- "name": "shimingrenzheng",
- "font_class": "auth",
- "unicode": "e6ab",
- "unicode_decimal": 59051
- },
- {
- "icon_id": "24899565",
- "name": "person",
- "font_class": "person",
- "unicode": "e699",
- "unicode_decimal": 59033
- },
- {
- "icon_id": "24899566",
- "name": "email-filled",
- "font_class": "email-filled",
- "unicode": "e69a",
- "unicode_decimal": 59034
- },
- {
- "icon_id": "24899567",
- "name": "phone-filled",
- "font_class": "phone-filled",
- "unicode": "e69b",
- "unicode_decimal": 59035
- },
- {
- "icon_id": "24899568",
- "name": "phone",
- "font_class": "phone",
- "unicode": "e69c",
- "unicode_decimal": 59036
- },
- {
- "icon_id": "24899570",
- "name": "email",
- "font_class": "email",
- "unicode": "e69e",
- "unicode_decimal": 59038
- },
- {
- "icon_id": "24899571",
- "name": "personadd",
- "font_class": "personadd",
- "unicode": "e69f",
- "unicode_decimal": 59039
- },
- {
- "icon_id": "24899558",
- "name": "chatboxes-filled",
- "font_class": "chatboxes-filled",
- "unicode": "e692",
- "unicode_decimal": 59026
- },
- {
- "icon_id": "24899559",
- "name": "contact",
- "font_class": "contact",
- "unicode": "e693",
- "unicode_decimal": 59027
- },
- {
- "icon_id": "24899560",
- "name": "chatbubble-filled",
- "font_class": "chatbubble-filled",
- "unicode": "e694",
- "unicode_decimal": 59028
- },
- {
- "icon_id": "24899561",
- "name": "contact-filled",
- "font_class": "contact-filled",
- "unicode": "e695",
- "unicode_decimal": 59029
- },
- {
- "icon_id": "24899562",
- "name": "chatboxes",
- "font_class": "chatboxes",
- "unicode": "e696",
- "unicode_decimal": 59030
- },
- {
- "icon_id": "24899563",
- "name": "chatbubble",
- "font_class": "chatbubble",
- "unicode": "e697",
- "unicode_decimal": 59031
- },
- {
- "icon_id": "24881290",
- "name": "upload-filled",
- "font_class": "upload-filled",
- "unicode": "e68e",
- "unicode_decimal": 59022
- },
- {
- "icon_id": "24881292",
- "name": "upload",
- "font_class": "upload",
- "unicode": "e690",
- "unicode_decimal": 59024
- },
- {
- "icon_id": "24881293",
- "name": "weixin",
- "font_class": "weixin",
- "unicode": "e691",
- "unicode_decimal": 59025
- },
- {
- "icon_id": "24881274",
- "name": "compose",
- "font_class": "compose",
- "unicode": "e67f",
- "unicode_decimal": 59007
- },
- {
- "icon_id": "24881275",
- "name": "qq",
- "font_class": "qq",
- "unicode": "e680",
- "unicode_decimal": 59008
- },
- {
- "icon_id": "24881276",
- "name": "download-filled",
- "font_class": "download-filled",
- "unicode": "e681",
- "unicode_decimal": 59009
- },
- {
- "icon_id": "24881277",
- "name": "pengyouquan",
- "font_class": "pyq",
- "unicode": "e682",
- "unicode_decimal": 59010
- },
- {
- "icon_id": "24881279",
- "name": "sound",
- "font_class": "sound",
- "unicode": "e684",
- "unicode_decimal": 59012
- },
- {
- "icon_id": "24881280",
- "name": "trash-filled",
- "font_class": "trash-filled",
- "unicode": "e685",
- "unicode_decimal": 59013
- },
- {
- "icon_id": "24881281",
- "name": "sound-filled",
- "font_class": "sound-filled",
- "unicode": "e686",
- "unicode_decimal": 59014
- },
- {
- "icon_id": "24881282",
- "name": "trash",
- "font_class": "trash",
- "unicode": "e687",
- "unicode_decimal": 59015
- },
- {
- "icon_id": "24881284",
- "name": "videocam-filled",
- "font_class": "videocam-filled",
- "unicode": "e689",
- "unicode_decimal": 59017
- },
- {
- "icon_id": "24881285",
- "name": "spinner-cycle",
- "font_class": "spinner-cycle",
- "unicode": "e68a",
- "unicode_decimal": 59018
- },
- {
- "icon_id": "24881286",
- "name": "weibo",
- "font_class": "weibo",
- "unicode": "e68b",
- "unicode_decimal": 59019
- },
- {
- "icon_id": "24881288",
- "name": "videocam",
- "font_class": "videocam",
- "unicode": "e68c",
- "unicode_decimal": 59020
- },
- {
- "icon_id": "24881289",
- "name": "download",
- "font_class": "download",
- "unicode": "e68d",
- "unicode_decimal": 59021
- },
- {
- "icon_id": "24879601",
- "name": "help",
- "font_class": "help",
- "unicode": "e679",
- "unicode_decimal": 59001
- },
- {
- "icon_id": "24879602",
- "name": "navigate-filled",
- "font_class": "navigate-filled",
- "unicode": "e67a",
- "unicode_decimal": 59002
- },
- {
- "icon_id": "24879603",
- "name": "plusempty",
- "font_class": "plusempty",
- "unicode": "e67b",
- "unicode_decimal": 59003
- },
- {
- "icon_id": "24879604",
- "name": "smallcircle",
- "font_class": "smallcircle",
- "unicode": "e67c",
- "unicode_decimal": 59004
- },
- {
- "icon_id": "24879605",
- "name": "minus-filled",
- "font_class": "minus-filled",
- "unicode": "e67d",
- "unicode_decimal": 59005
- },
- {
- "icon_id": "24879606",
- "name": "micoff",
- "font_class": "micoff",
- "unicode": "e67e",
- "unicode_decimal": 59006
- },
- {
- "icon_id": "24879588",
- "name": "closeempty",
- "font_class": "closeempty",
- "unicode": "e66c",
- "unicode_decimal": 58988
- },
- {
- "icon_id": "24879589",
- "name": "clear",
- "font_class": "clear",
- "unicode": "e66d",
- "unicode_decimal": 58989
- },
- {
- "icon_id": "24879590",
- "name": "navigate",
- "font_class": "navigate",
- "unicode": "e66e",
- "unicode_decimal": 58990
- },
- {
- "icon_id": "24879591",
- "name": "minus",
- "font_class": "minus",
- "unicode": "e66f",
- "unicode_decimal": 58991
- },
- {
- "icon_id": "24879592",
- "name": "image",
- "font_class": "image",
- "unicode": "e670",
- "unicode_decimal": 58992
- },
- {
- "icon_id": "24879593",
- "name": "mic",
- "font_class": "mic",
- "unicode": "e671",
- "unicode_decimal": 58993
- },
- {
- "icon_id": "24879594",
- "name": "paperplane",
- "font_class": "paperplane",
- "unicode": "e672",
- "unicode_decimal": 58994
- },
- {
- "icon_id": "24879595",
- "name": "close",
- "font_class": "close",
- "unicode": "e673",
- "unicode_decimal": 58995
- },
- {
- "icon_id": "24879596",
- "name": "help-filled",
- "font_class": "help-filled",
- "unicode": "e674",
- "unicode_decimal": 58996
- },
- {
- "icon_id": "24879597",
- "name": "plus-filled",
- "font_class": "paperplane-filled",
- "unicode": "e675",
- "unicode_decimal": 58997
- },
- {
- "icon_id": "24879598",
- "name": "plus",
- "font_class": "plus",
- "unicode": "e676",
- "unicode_decimal": 58998
- },
- {
- "icon_id": "24879599",
- "name": "mic-filled",
- "font_class": "mic-filled",
- "unicode": "e677",
- "unicode_decimal": 58999
- },
- {
- "icon_id": "24879600",
- "name": "image-filled",
- "font_class": "image-filled",
- "unicode": "e678",
- "unicode_decimal": 59000
- },
- {
- "icon_id": "24855900",
- "name": "locked-filled",
- "font_class": "locked-filled",
- "unicode": "e668",
- "unicode_decimal": 58984
- },
- {
- "icon_id": "24855901",
- "name": "info",
- "font_class": "info",
- "unicode": "e669",
- "unicode_decimal": 58985
- },
- {
- "icon_id": "24855903",
- "name": "locked",
- "font_class": "locked",
- "unicode": "e66b",
- "unicode_decimal": 58987
- },
- {
- "icon_id": "24855884",
- "name": "camera-filled",
- "font_class": "camera-filled",
- "unicode": "e658",
- "unicode_decimal": 58968
- },
- {
- "icon_id": "24855885",
- "name": "chat-filled",
- "font_class": "chat-filled",
- "unicode": "e659",
- "unicode_decimal": 58969
- },
- {
- "icon_id": "24855886",
- "name": "camera",
- "font_class": "camera",
- "unicode": "e65a",
- "unicode_decimal": 58970
- },
- {
- "icon_id": "24855887",
- "name": "circle",
- "font_class": "circle",
- "unicode": "e65b",
- "unicode_decimal": 58971
- },
- {
- "icon_id": "24855888",
- "name": "checkmarkempty",
- "font_class": "checkmarkempty",
- "unicode": "e65c",
- "unicode_decimal": 58972
- },
- {
- "icon_id": "24855889",
- "name": "chat",
- "font_class": "chat",
- "unicode": "e65d",
- "unicode_decimal": 58973
- },
- {
- "icon_id": "24855890",
- "name": "circle-filled",
- "font_class": "circle-filled",
- "unicode": "e65e",
- "unicode_decimal": 58974
- },
- {
- "icon_id": "24855891",
- "name": "flag",
- "font_class": "flag",
- "unicode": "e65f",
- "unicode_decimal": 58975
- },
- {
- "icon_id": "24855892",
- "name": "flag-filled",
- "font_class": "flag-filled",
- "unicode": "e660",
- "unicode_decimal": 58976
- },
- {
- "icon_id": "24855893",
- "name": "gear-filled",
- "font_class": "gear-filled",
- "unicode": "e661",
- "unicode_decimal": 58977
- },
- {
- "icon_id": "24855894",
- "name": "home",
- "font_class": "home",
- "unicode": "e662",
- "unicode_decimal": 58978
- },
- {
- "icon_id": "24855895",
- "name": "home-filled",
- "font_class": "home-filled",
- "unicode": "e663",
- "unicode_decimal": 58979
- },
- {
- "icon_id": "24855896",
- "name": "gear",
- "font_class": "gear",
- "unicode": "e664",
- "unicode_decimal": 58980
- },
- {
- "icon_id": "24855897",
- "name": "smallcircle-filled",
- "font_class": "smallcircle-filled",
- "unicode": "e665",
- "unicode_decimal": 58981
- },
- {
- "icon_id": "24855898",
- "name": "map-filled",
- "font_class": "map-filled",
- "unicode": "e666",
- "unicode_decimal": 58982
- },
- {
- "icon_id": "24855899",
- "name": "map",
- "font_class": "map",
- "unicode": "e667",
- "unicode_decimal": 58983
- },
- {
- "icon_id": "24855825",
- "name": "refresh-filled",
- "font_class": "refresh-filled",
- "unicode": "e656",
- "unicode_decimal": 58966
- },
- {
- "icon_id": "24855826",
- "name": "refresh",
- "font_class": "refresh",
- "unicode": "e657",
- "unicode_decimal": 58967
- },
- {
- "icon_id": "24855808",
- "name": "cloud-upload",
- "font_class": "cloud-upload",
- "unicode": "e645",
- "unicode_decimal": 58949
- },
- {
- "icon_id": "24855809",
- "name": "cloud-download-filled",
- "font_class": "cloud-download-filled",
- "unicode": "e646",
- "unicode_decimal": 58950
- },
- {
- "icon_id": "24855810",
- "name": "cloud-download",
- "font_class": "cloud-download",
- "unicode": "e647",
- "unicode_decimal": 58951
- },
- {
- "icon_id": "24855811",
- "name": "cloud-upload-filled",
- "font_class": "cloud-upload-filled",
- "unicode": "e648",
- "unicode_decimal": 58952
- },
- {
- "icon_id": "24855813",
- "name": "redo",
- "font_class": "redo",
- "unicode": "e64a",
- "unicode_decimal": 58954
- },
- {
- "icon_id": "24855814",
- "name": "images-filled",
- "font_class": "images-filled",
- "unicode": "e64b",
- "unicode_decimal": 58955
- },
- {
- "icon_id": "24855815",
- "name": "undo-filled",
- "font_class": "undo-filled",
- "unicode": "e64c",
- "unicode_decimal": 58956
- },
- {
- "icon_id": "24855816",
- "name": "more",
- "font_class": "more",
- "unicode": "e64d",
- "unicode_decimal": 58957
- },
- {
- "icon_id": "24855817",
- "name": "more-filled",
- "font_class": "more-filled",
- "unicode": "e64e",
- "unicode_decimal": 58958
- },
- {
- "icon_id": "24855818",
- "name": "undo",
- "font_class": "undo",
- "unicode": "e64f",
- "unicode_decimal": 58959
- },
- {
- "icon_id": "24855819",
- "name": "images",
- "font_class": "images",
- "unicode": "e650",
- "unicode_decimal": 58960
- },
- {
- "icon_id": "24855821",
- "name": "paperclip",
- "font_class": "paperclip",
- "unicode": "e652",
- "unicode_decimal": 58962
- },
- {
- "icon_id": "24855822",
- "name": "settings",
- "font_class": "settings",
- "unicode": "e653",
- "unicode_decimal": 58963
- },
- {
- "icon_id": "24855823",
- "name": "search",
- "font_class": "search",
- "unicode": "e654",
- "unicode_decimal": 58964
- },
- {
- "icon_id": "24855824",
- "name": "redo-filled",
- "font_class": "redo-filled",
- "unicode": "e655",
- "unicode_decimal": 58965
- },
- {
- "icon_id": "24841702",
- "name": "list",
- "font_class": "list",
- "unicode": "e644",
- "unicode_decimal": 58948
- },
- {
- "icon_id": "24841489",
- "name": "mail-open-filled",
- "font_class": "mail-open-filled",
- "unicode": "e63a",
- "unicode_decimal": 58938
- },
- {
- "icon_id": "24841491",
- "name": "hand-thumbsdown-filled",
- "font_class": "hand-down-filled",
- "unicode": "e63c",
- "unicode_decimal": 58940
- },
- {
- "icon_id": "24841492",
- "name": "hand-thumbsdown",
- "font_class": "hand-down",
- "unicode": "e63d",
- "unicode_decimal": 58941
- },
- {
- "icon_id": "24841493",
- "name": "hand-thumbsup-filled",
- "font_class": "hand-up-filled",
- "unicode": "e63e",
- "unicode_decimal": 58942
- },
- {
- "icon_id": "24841494",
- "name": "hand-thumbsup",
- "font_class": "hand-up",
- "unicode": "e63f",
- "unicode_decimal": 58943
- },
- {
- "icon_id": "24841496",
- "name": "heart-filled",
- "font_class": "heart-filled",
- "unicode": "e641",
- "unicode_decimal": 58945
- },
- {
- "icon_id": "24841498",
- "name": "mail-open",
- "font_class": "mail-open",
- "unicode": "e643",
- "unicode_decimal": 58947
- },
- {
- "icon_id": "24841488",
- "name": "heart",
- "font_class": "heart",
- "unicode": "e639",
- "unicode_decimal": 58937
- },
- {
- "icon_id": "24839963",
- "name": "loop",
- "font_class": "loop",
- "unicode": "e633",
- "unicode_decimal": 58931
- },
- {
- "icon_id": "24839866",
- "name": "pulldown",
- "font_class": "pulldown",
- "unicode": "e632",
- "unicode_decimal": 58930
- },
- {
- "icon_id": "24813798",
- "name": "scan",
- "font_class": "scan",
- "unicode": "e62a",
- "unicode_decimal": 58922
- },
- {
- "icon_id": "24813786",
- "name": "bars",
- "font_class": "bars",
- "unicode": "e627",
- "unicode_decimal": 58919
- },
- {
- "icon_id": "24813788",
- "name": "cart-filled",
- "font_class": "cart-filled",
- "unicode": "e629",
- "unicode_decimal": 58921
- },
- {
- "icon_id": "24813790",
- "name": "checkbox",
- "font_class": "checkbox",
- "unicode": "e62b",
- "unicode_decimal": 58923
- },
- {
- "icon_id": "24813791",
- "name": "checkbox-filled",
- "font_class": "checkbox-filled",
- "unicode": "e62c",
- "unicode_decimal": 58924
- },
- {
- "icon_id": "24813794",
- "name": "shop",
- "font_class": "shop",
- "unicode": "e62f",
- "unicode_decimal": 58927
- },
- {
- "icon_id": "24813795",
- "name": "headphones",
- "font_class": "headphones",
- "unicode": "e630",
- "unicode_decimal": 58928
- },
- {
- "icon_id": "24813796",
- "name": "cart",
- "font_class": "cart",
- "unicode": "e631",
- "unicode_decimal": 58929
- }
- ]
-}
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-icons/components/uni-icons/uni-icons.vue b/subPackage/realtimeMonitor/components/uni-components/uni-icons/components/uni-icons/uni-icons.vue
deleted file mode 100644
index 86e7444..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-icons/components/uni-icons/uni-icons.vue
+++ /dev/null
@@ -1,96 +0,0 @@
-<template>
- <!-- #ifdef APP-NVUE -->
- <text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" @click="_onClick">{{unicode}}</text>
- <!-- #endif -->
- <!-- #ifndef APP-NVUE -->
- <text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick"></text>
- <!-- #endif -->
-</template>
-
-<script>
- import icons from './icons.js';
- const getVal = (val) => {
- const reg = /^[0-9]*$/g
- return (typeof val === 'number' || reg.test(val) )? val + 'px' : val;
- }
- // #ifdef APP-NVUE
- var domModule = weex.requireModule('dom');
- import iconUrl from './uniicons.ttf'
- domModule.addRule('fontFace', {
- 'fontFamily': "uniicons",
- 'src': "url('"+iconUrl+"')"
- });
- // #endif
-
- /**
- * Icons 图标
- * @description 用于展示 icons 图标
- * @tutorial https://ext.dcloud.net.cn/plugin?id=28
- * @property {Number} size 图标大小
- * @property {String} type 图标图案,参考示例
- * @property {String} color 图标颜色
- * @property {String} customPrefix 自定义图标
- * @event {Function} click 点击 Icon 触发事件
- */
- export default {
- name: 'UniIcons',
- emits:['click'],
- props: {
- type: {
- type: String,
- default: ''
- },
- color: {
- type: String,
- default: '#333333'
- },
- size: {
- type: [Number, String],
- default: 16
- },
- customPrefix:{
- type: String,
- default: ''
- }
- },
- data() {
- return {
- icons: icons.glyphs
- }
- },
- computed:{
- unicode(){
- let code = this.icons.find(v=>v.font_class === this.type)
- if(code){
- return unescape(`%u${code.unicode}`)
- }
- return ''
- },
- iconSize(){
- return getVal(this.size)
- }
- },
- methods: {
- _onClick() {
- this.$emit('click')
- }
- }
- }
-</script>
-
-<style lang="scss">
- /* #ifndef APP-NVUE */
- @import './uniicons.css';
- @font-face {
- font-family: uniicons;
- src: url('./uniicons.ttf') format('truetype');
- }
-
- /* #endif */
- .uni-icons {
- font-family: uniicons;
- text-decoration: none;
- text-align: center;
- }
-
-</style>
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-icons/components/uni-icons/uniicons.css b/subPackage/realtimeMonitor/components/uni-components/uni-icons/components/uni-icons/uniicons.css
deleted file mode 100644
index 2f56eab..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-icons/components/uni-icons/uniicons.css
+++ /dev/null
@@ -1,663 +0,0 @@
-.uniui-color:before {
- content: "\e6cf";
-}
-
-.uniui-wallet:before {
- content: "\e6b1";
-}
-
-.uniui-settings-filled:before {
- content: "\e6ce";
-}
-
-.uniui-auth-filled:before {
- content: "\e6cc";
-}
-
-.uniui-shop-filled:before {
- content: "\e6cd";
-}
-
-.uniui-staff-filled:before {
- content: "\e6cb";
-}
-
-.uniui-vip-filled:before {
- content: "\e6c6";
-}
-
-.uniui-plus-filled:before {
- content: "\e6c7";
-}
-
-.uniui-folder-add-filled:before {
- content: "\e6c8";
-}
-
-.uniui-color-filled:before {
- content: "\e6c9";
-}
-
-.uniui-tune-filled:before {
- content: "\e6ca";
-}
-
-.uniui-calendar-filled:before {
- content: "\e6c0";
-}
-
-.uniui-notification-filled:before {
- content: "\e6c1";
-}
-
-.uniui-wallet-filled:before {
- content: "\e6c2";
-}
-
-.uniui-medal-filled:before {
- content: "\e6c3";
-}
-
-.uniui-gift-filled:before {
- content: "\e6c4";
-}
-
-.uniui-fire-filled:before {
- content: "\e6c5";
-}
-
-.uniui-refreshempty:before {
- content: "\e6bf";
-}
-
-.uniui-location-filled:before {
- content: "\e6af";
-}
-
-.uniui-person-filled:before {
- content: "\e69d";
-}
-
-.uniui-personadd-filled:before {
- content: "\e698";
-}
-
-.uniui-back:before {
- content: "\e6b9";
-}
-
-.uniui-forward:before {
- content: "\e6ba";
-}
-
-.uniui-arrow-right:before {
- content: "\e6bb";
-}
-
-.uniui-arrowthinright:before {
- content: "\e6bb";
-}
-
-.uniui-arrow-left:before {
- content: "\e6bc";
-}
-
-.uniui-arrowthinleft:before {
- content: "\e6bc";
-}
-
-.uniui-arrow-up:before {
- content: "\e6bd";
-}
-
-.uniui-arrowthinup:before {
- content: "\e6bd";
-}
-
-.uniui-arrow-down:before {
- content: "\e6be";
-}
-
-.uniui-arrowthindown:before {
- content: "\e6be";
-}
-
-.uniui-bottom:before {
- content: "\e6b8";
-}
-
-.uniui-arrowdown:before {
- content: "\e6b8";
-}
-
-.uniui-right:before {
- content: "\e6b5";
-}
-
-.uniui-arrowright:before {
- content: "\e6b5";
-}
-
-.uniui-top:before {
- content: "\e6b6";
-}
-
-.uniui-arrowup:before {
- content: "\e6b6";
-}
-
-.uniui-left:before {
- content: "\e6b7";
-}
-
-.uniui-arrowleft:before {
- content: "\e6b7";
-}
-
-.uniui-eye:before {
- content: "\e651";
-}
-
-.uniui-eye-filled:before {
- content: "\e66a";
-}
-
-.uniui-eye-slash:before {
- content: "\e6b3";
-}
-
-.uniui-eye-slash-filled:before {
- content: "\e6b4";
-}
-
-.uniui-info-filled:before {
- content: "\e649";
-}
-
-.uniui-reload:before {
- content: "\e6b2";
-}
-
-.uniui-micoff-filled:before {
- content: "\e6b0";
-}
-
-.uniui-map-pin-ellipse:before {
- content: "\e6ac";
-}
-
-.uniui-map-pin:before {
- content: "\e6ad";
-}
-
-.uniui-location:before {
- content: "\e6ae";
-}
-
-.uniui-starhalf:before {
- content: "\e683";
-}
-
-.uniui-star:before {
- content: "\e688";
-}
-
-.uniui-star-filled:before {
- content: "\e68f";
-}
-
-.uniui-calendar:before {
- content: "\e6a0";
-}
-
-.uniui-fire:before {
- content: "\e6a1";
-}
-
-.uniui-medal:before {
- content: "\e6a2";
-}
-
-.uniui-font:before {
- content: "\e6a3";
-}
-
-.uniui-gift:before {
- content: "\e6a4";
-}
-
-.uniui-link:before {
- content: "\e6a5";
-}
-
-.uniui-notification:before {
- content: "\e6a6";
-}
-
-.uniui-staff:before {
- content: "\e6a7";
-}
-
-.uniui-vip:before {
- content: "\e6a8";
-}
-
-.uniui-folder-add:before {
- content: "\e6a9";
-}
-
-.uniui-tune:before {
- content: "\e6aa";
-}
-
-.uniui-auth:before {
- content: "\e6ab";
-}
-
-.uniui-person:before {
- content: "\e699";
-}
-
-.uniui-email-filled:before {
- content: "\e69a";
-}
-
-.uniui-phone-filled:before {
- content: "\e69b";
-}
-
-.uniui-phone:before {
- content: "\e69c";
-}
-
-.uniui-email:before {
- content: "\e69e";
-}
-
-.uniui-personadd:before {
- content: "\e69f";
-}
-
-.uniui-chatboxes-filled:before {
- content: "\e692";
-}
-
-.uniui-contact:before {
- content: "\e693";
-}
-
-.uniui-chatbubble-filled:before {
- content: "\e694";
-}
-
-.uniui-contact-filled:before {
- content: "\e695";
-}
-
-.uniui-chatboxes:before {
- content: "\e696";
-}
-
-.uniui-chatbubble:before {
- content: "\e697";
-}
-
-.uniui-upload-filled:before {
- content: "\e68e";
-}
-
-.uniui-upload:before {
- content: "\e690";
-}
-
-.uniui-weixin:before {
- content: "\e691";
-}
-
-.uniui-compose:before {
- content: "\e67f";
-}
-
-.uniui-qq:before {
- content: "\e680";
-}
-
-.uniui-download-filled:before {
- content: "\e681";
-}
-
-.uniui-pyq:before {
- content: "\e682";
-}
-
-.uniui-sound:before {
- content: "\e684";
-}
-
-.uniui-trash-filled:before {
- content: "\e685";
-}
-
-.uniui-sound-filled:before {
- content: "\e686";
-}
-
-.uniui-trash:before {
- content: "\e687";
-}
-
-.uniui-videocam-filled:before {
- content: "\e689";
-}
-
-.uniui-spinner-cycle:before {
- content: "\e68a";
-}
-
-.uniui-weibo:before {
- content: "\e68b";
-}
-
-.uniui-videocam:before {
- content: "\e68c";
-}
-
-.uniui-download:before {
- content: "\e68d";
-}
-
-.uniui-help:before {
- content: "\e679";
-}
-
-.uniui-navigate-filled:before {
- content: "\e67a";
-}
-
-.uniui-plusempty:before {
- content: "\e67b";
-}
-
-.uniui-smallcircle:before {
- content: "\e67c";
-}
-
-.uniui-minus-filled:before {
- content: "\e67d";
-}
-
-.uniui-micoff:before {
- content: "\e67e";
-}
-
-.uniui-closeempty:before {
- content: "\e66c";
-}
-
-.uniui-clear:before {
- content: "\e66d";
-}
-
-.uniui-navigate:before {
- content: "\e66e";
-}
-
-.uniui-minus:before {
- content: "\e66f";
-}
-
-.uniui-image:before {
- content: "\e670";
-}
-
-.uniui-mic:before {
- content: "\e671";
-}
-
-.uniui-paperplane:before {
- content: "\e672";
-}
-
-.uniui-close:before {
- content: "\e673";
-}
-
-.uniui-help-filled:before {
- content: "\e674";
-}
-
-.uniui-paperplane-filled:before {
- content: "\e675";
-}
-
-.uniui-plus:before {
- content: "\e676";
-}
-
-.uniui-mic-filled:before {
- content: "\e677";
-}
-
-.uniui-image-filled:before {
- content: "\e678";
-}
-
-.uniui-locked-filled:before {
- content: "\e668";
-}
-
-.uniui-info:before {
- content: "\e669";
-}
-
-.uniui-locked:before {
- content: "\e66b";
-}
-
-.uniui-camera-filled:before {
- content: "\e658";
-}
-
-.uniui-chat-filled:before {
- content: "\e659";
-}
-
-.uniui-camera:before {
- content: "\e65a";
-}
-
-.uniui-circle:before {
- content: "\e65b";
-}
-
-.uniui-checkmarkempty:before {
- content: "\e65c";
-}
-
-.uniui-chat:before {
- content: "\e65d";
-}
-
-.uniui-circle-filled:before {
- content: "\e65e";
-}
-
-.uniui-flag:before {
- content: "\e65f";
-}
-
-.uniui-flag-filled:before {
- content: "\e660";
-}
-
-.uniui-gear-filled:before {
- content: "\e661";
-}
-
-.uniui-home:before {
- content: "\e662";
-}
-
-.uniui-home-filled:before {
- content: "\e663";
-}
-
-.uniui-gear:before {
- content: "\e664";
-}
-
-.uniui-smallcircle-filled:before {
- content: "\e665";
-}
-
-.uniui-map-filled:before {
- content: "\e666";
-}
-
-.uniui-map:before {
- content: "\e667";
-}
-
-.uniui-refresh-filled:before {
- content: "\e656";
-}
-
-.uniui-refresh:before {
- content: "\e657";
-}
-
-.uniui-cloud-upload:before {
- content: "\e645";
-}
-
-.uniui-cloud-download-filled:before {
- content: "\e646";
-}
-
-.uniui-cloud-download:before {
- content: "\e647";
-}
-
-.uniui-cloud-upload-filled:before {
- content: "\e648";
-}
-
-.uniui-redo:before {
- content: "\e64a";
-}
-
-.uniui-images-filled:before {
- content: "\e64b";
-}
-
-.uniui-undo-filled:before {
- content: "\e64c";
-}
-
-.uniui-more:before {
- content: "\e64d";
-}
-
-.uniui-more-filled:before {
- content: "\e64e";
-}
-
-.uniui-undo:before {
- content: "\e64f";
-}
-
-.uniui-images:before {
- content: "\e650";
-}
-
-.uniui-paperclip:before {
- content: "\e652";
-}
-
-.uniui-settings:before {
- content: "\e653";
-}
-
-.uniui-search:before {
- content: "\e654";
-}
-
-.uniui-redo-filled:before {
- content: "\e655";
-}
-
-.uniui-list:before {
- content: "\e644";
-}
-
-.uniui-mail-open-filled:before {
- content: "\e63a";
-}
-
-.uniui-hand-down-filled:before {
- content: "\e63c";
-}
-
-.uniui-hand-down:before {
- content: "\e63d";
-}
-
-.uniui-hand-up-filled:before {
- content: "\e63e";
-}
-
-.uniui-hand-up:before {
- content: "\e63f";
-}
-
-.uniui-heart-filled:before {
- content: "\e641";
-}
-
-.uniui-mail-open:before {
- content: "\e643";
-}
-
-.uniui-heart:before {
- content: "\e639";
-}
-
-.uniui-loop:before {
- content: "\e633";
-}
-
-.uniui-pulldown:before {
- content: "\e632";
-}
-
-.uniui-scan:before {
- content: "\e62a";
-}
-
-.uniui-bars:before {
- content: "\e627";
-}
-
-.uniui-cart-filled:before {
- content: "\e629";
-}
-
-.uniui-checkbox:before {
- content: "\e62b";
-}
-
-.uniui-checkbox-filled:before {
- content: "\e62c";
-}
-
-.uniui-shop:before {
- content: "\e62f";
-}
-
-.uniui-headphones:before {
- content: "\e630";
-}
-
-.uniui-cart:before {
- content: "\e631";
-}
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-icons/components/uni-icons/uniicons.ttf b/subPackage/realtimeMonitor/components/uni-components/uni-icons/components/uni-icons/uniicons.ttf
deleted file mode 100644
index 835f33b..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-icons/components/uni-icons/uniicons.ttf
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-icons/package.json b/subPackage/realtimeMonitor/components/uni-components/uni-icons/package.json
deleted file mode 100644
index d1c4e77..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-icons/package.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "id": "uni-icons",
- "displayName": "uni-icons 图标",
- "version": "1.3.5",
- "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
- "keywords": [
- "uni-ui",
- "uniui",
- "icon",
- "图标"
-],
- "repository": "https://github.com/dcloudio/uni-ui",
- "engines": {
- "HBuilderX": "^3.2.14"
- },
- "directories": {
- "example": "../../temps/example_temps"
- },
- "dcloudext": {
- "category": [
- "前端组件",
- "通用组件"
- ],
- "sale": {
- "regular": {
- "price": "0.00"
- },
- "sourcecode": {
- "price": "0.00"
- }
- },
- "contact": {
- "qq": ""
- },
- "declaration": {
- "ads": "无",
- "data": "无",
- "permissions": "无"
- },
- "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
- },
- "uni_modules": {
- "dependencies": ["uni-scss"],
- "encrypt": [],
- "platforms": {
- "cloud": {
- "tcb": "y",
- "aliyun": "y"
- },
- "client": {
- "App": {
- "app-vue": "y",
- "app-nvue": "y"
- },
- "H5-mobile": {
- "Safari": "y",
- "Android Browser": "y",
- "微信浏览器(Android)": "y",
- "QQ浏览器(Android)": "y"
- },
- "H5-pc": {
- "Chrome": "y",
- "IE": "y",
- "Edge": "y",
- "Firefox": "y",
- "Safari": "y"
- },
- "小程序": {
- "微信": "y",
- "阿里": "y",
- "百度": "y",
- "字节跳动": "y",
- "QQ": "y"
- },
- "快应用": {
- "华为": "u",
- "联盟": "u"
- },
- "Vue": {
- "vue2": "y",
- "vue3": "y"
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-icons/readme.md b/subPackage/realtimeMonitor/components/uni-components/uni-icons/readme.md
deleted file mode 100644
index 86234ba..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-icons/readme.md
+++ /dev/null
@@ -1,8 +0,0 @@
-## Icons 图标
-> **组件名:uni-icons**
-> 代码块: `uIcons`
-
-用于展示 icons 图标 。
-
-### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons)
-#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-load-more/changelog.md b/subPackage/realtimeMonitor/components/uni-components/uni-load-more/changelog.md
deleted file mode 100644
index 8f03f1d..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-load-more/changelog.md
+++ /dev/null
@@ -1,19 +0,0 @@
-## 1.3.3(2022-01-20)
-- 新增 showText属性 ,是否显示文本
-## 1.3.2(2022-01-19)
-- 修复 nvue 平台下不显示文本的bug
-## 1.3.1(2022-01-19)
-- 修复 微信小程序平台样式选择器报警告的问题
-## 1.3.0(2021-11-19)
-- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
-- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-load-more](https://uniapp.dcloud.io/component/uniui/uni-load-more)
-## 1.2.1(2021-08-24)
-- 新增 支持国际化
-## 1.2.0(2021-07-30)
-- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
-## 1.1.8(2021-05-12)
-- 新增 组件示例地址
-## 1.1.7(2021-03-30)
-- 修复 uni-load-more 在首页使用时,h5 平台报 'uni is not defined' 的 bug
-## 1.1.6(2021-02-05)
-- 调整为uni_modules目录规范
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-load-more/components/uni-load-more/i18n/en.json b/subPackage/realtimeMonitor/components/uni-components/uni-load-more/components/uni-load-more/i18n/en.json
deleted file mode 100644
index a4f14a5..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-load-more/components/uni-load-more/i18n/en.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "uni-load-more.contentdown": "Pull up to show more",
- "uni-load-more.contentrefresh": "loading...",
- "uni-load-more.contentnomore": "No more data"
-}
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-load-more/components/uni-load-more/i18n/index.js b/subPackage/realtimeMonitor/components/uni-components/uni-load-more/components/uni-load-more/i18n/index.js
deleted file mode 100644
index de7509c..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-load-more/components/uni-load-more/i18n/index.js
+++ /dev/null
@@ -1,8 +0,0 @@
-import en from './en.json'
-import zhHans from './zh-Hans.json'
-import zhHant from './zh-Hant.json'
-export default {
- en,
- 'zh-Hans': zhHans,
- 'zh-Hant': zhHant
-}
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-load-more/components/uni-load-more/i18n/zh-Hans.json b/subPackage/realtimeMonitor/components/uni-components/uni-load-more/components/uni-load-more/i18n/zh-Hans.json
deleted file mode 100644
index f15d510..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-load-more/components/uni-load-more/i18n/zh-Hans.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "uni-load-more.contentdown": "上拉显示更多",
- "uni-load-more.contentrefresh": "正在加载...",
- "uni-load-more.contentnomore": "没有更多数据了"
-}
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-load-more/components/uni-load-more/i18n/zh-Hant.json b/subPackage/realtimeMonitor/components/uni-components/uni-load-more/components/uni-load-more/i18n/zh-Hant.json
deleted file mode 100644
index a255c6d..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-load-more/components/uni-load-more/i18n/zh-Hant.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "uni-load-more.contentdown": "上拉顯示更多",
- "uni-load-more.contentrefresh": "正在加載...",
- "uni-load-more.contentnomore": "沒有更多數據了"
-}
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-load-more/components/uni-load-more/uni-load-more.vue b/subPackage/realtimeMonitor/components/uni-components/uni-load-more/components/uni-load-more/uni-load-more.vue
deleted file mode 100644
index e5eff4d..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-load-more/components/uni-load-more/uni-load-more.vue
+++ /dev/null
@@ -1,399 +0,0 @@
-<template>
- <view class="uni-load-more" @click="onClick">
- <!-- #ifdef APP-NVUE -->
- <loading-indicator v-if="!webviewHide && status === 'loading' && showIcon"
- :style="{color: color,width:iconSize+'px',height:iconSize+'px'}" :animating="true"
- class="uni-load-more__img uni-load-more__img--nvue"></loading-indicator>
- <!-- #endif -->
- <!-- #ifdef H5 -->
- <svg width="24" height="24" viewBox="25 25 50 50"
- v-if="!webviewHide && (iconType==='circle' || iconType==='auto' && platform === 'android') && status === 'loading' && showIcon"
- :style="{width:iconSize+'px',height:iconSize+'px'}"
- class="uni-load-more__img uni-load-more__img--android-H5">
- <circle cx="50" cy="50" r="20" fill="none" :style="{color:color}" :stroke-width="3"></circle>
- </svg>
- <!-- #endif -->
- <!-- #ifndef APP-NVUE || H5 -->
- <view
- v-if="!webviewHide && (iconType==='circle' || iconType==='auto' && platform === 'android') && status === 'loading' && showIcon"
- :style="{width:iconSize+'px',height:iconSize+'px'}"
- class="uni-load-more__img uni-load-more__img--android-MP">
- <view class="uni-load-more__img-icon" :style="{borderTopColor:color,borderTopWidth:iconSize/12}"></view>
- <view class="uni-load-more__img-icon" :style="{borderTopColor:color,borderTopWidth:iconSize/12}"></view>
- <view class="uni-load-more__img-icon" :style="{borderTopColor:color,borderTopWidth:iconSize/12}"></view>
- </view>
- <!-- #endif -->
- <!-- #ifndef APP-NVUE -->
- <view v-else-if="!webviewHide && status === 'loading' && showIcon"
- :style="{width:iconSize+'px',height:iconSize+'px'}" class="uni-load-more__img uni-load-more__img--ios-H5">
- <image :src="imgBase64" mode="widthFix"></image>
- </view>
- <!-- #endif -->
- <text v-if="showText" class="uni-load-more__text"
- :style="{color: color}">{{ status === 'more' ? contentdownText : status === 'loading' ? contentrefreshText : contentnomoreText }}</text>
- </view>
-</template>
-
-<script>
- let platform
- setTimeout(() => {
- platform = uni.getSystemInfoSync().platform
- }, 16)
-
- import {
- initVueI18n
- } from '@dcloudio/uni-i18n'
- import messages from './i18n/index.js'
- const {
- t
- } = initVueI18n(messages)
-
- /**
- * LoadMore 加载更多
- * @description 用于列表中,做滚动加载使用,展示 loading 的各种状态
- * @tutorial https://ext.dcloud.net.cn/plugin?id=29
- * @property {String} status = [more|loading|noMore] loading 的状态
- * @value more loading前
- * @value loading loading中
- * @value noMore 没有更多了
- * @property {Number} iconSize 指定图标大小
- * @property {Boolean} iconSize = [true|false] 是否显示 loading 图标
- * @property {String} iconType = [snow|circle|auto] 指定图标样式
- * @value snow ios雪花加载样式
- * @value circle 安卓唤醒加载样式
- * @value auto 根据平台自动选择加载样式
- * @property {String} color 图标和文字颜色
- * @property {Object} contentText 各状态文字说明,值为:{contentdown: "上拉显示更多",contentrefresh: "正在加载...",contentnomore: "没有更多数据了"}
- * @event {Function} clickLoadMore 点击加载更多时触发
- */
- export default {
- name: 'UniLoadMore',
- emits: ['clickLoadMore'],
- props: {
- status: {
- // 上拉的状态:more-loading前;loading-loading中;noMore-没有更多了
- type: String,
- default: 'more'
- },
- showIcon: {
- type: Boolean,
- default: true
- },
- iconType: {
- type: String,
- default: 'auto'
- },
- iconSize: {
- type: Number,
- default: 24
- },
- color: {
- type: String,
- default: '#777777'
- },
- contentText: {
- type: Object,
- default () {
- return {
- contentdown: '',
- contentrefresh: '',
- contentnomore: ''
- }
- }
- },
- showText: {
- type: Boolean,
- default: true
- }
- },
- data() {
- return {
- webviewHide: false,
- platform: platform,
- imgBase64: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QzlBMzU3OTlEOUM0MTFFOUI0NTZDNERBQURBQzI4RkUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QzlBMzU3OUFEOUM0MTFFOUI0NTZDNERBQURBQzI4RkUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDOUEzNTc5N0Q5QzQxMUU5QjQ1NkM0REFBREFDMjhGRSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDOUEzNTc5OEQ5QzQxMUU5QjQ1NkM0REFBREFDMjhGRSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pt+ALSwAAA6CSURBVHja1FsLkFZVHb98LM+F5bHL8khA1iSeiyQBCRM+YGqKUnnJTDLGI0BGZlKDIU2MMglUiDApEZvSsZnQtBRJtKwQNKQMFYeRDR10WOLd8ljYXdh+v8v5fR3Od+797t1dnOnO/Ofce77z+J//+b/P+ZqtXbs2sJ9MJhNUV1cHJ06cCJo3bx7EPc2aNcvpy7pWrVoF+/fvDyoqKoI2bdoE9fX1F7TjN8a+EXBn/fkfvw942Tf+wYMHg9mzZwfjxo0LDhw4EPa1x2MbFw/fOGfPng1qa2tzcCkILsLDydq2bRsunpOTMM7TD/W/tZDZhPdeKD+yGxHhdu3aBV27dg3OnDlzMVANMheLAO3btw8KCwuDmpoaX5OxbgUIMEq7K8IcPnw4KCsrC/r37x8cP378/4cAXAB3vqSkJMuiDhTkw+XcuXNhOWbMmKBly5YhUT8xArhyFvP0BfwRsAuwxJZJsm/nzp2DTp06he/OU+cZ64K6o0ePBkOHDg2GDx8e6gEbJ5Q/NHNuAJQ1hgBeHUDlR7nVTkY8rQAvAi4z34vR/mPs1FoRsaCgIJThI0eOBC1atEiFGGV+5MiRoS45efJkqFjJFXV1dQuA012m2WcwTw98fy6CqBdsaiIO4CScrGPHjvk4odhavPquRtFWXEC25VgkREKOCh/qDSq+vn37htzD/mZTOmOc5U7zKzBPEedygWshcDyWvs30igAbU+6oyMgJBCFhwQE0fccxN60Ay9iebbjoDh06hMowjQxT4fXq1SskArmHZpkArvixp/kWzHdMeArExSJEaiXIjjRjRJ4DaAGWpibLzXN3Fm1vA5teBgh3j1Rv3bp1YgKwPdmf2p9zcyNYYgPKMfY0T5f5nNYdw158nJ8QawW4CLKwiOBSEgO/hok2eBydR+3dYH+PLxA5J8Vv0KBBwenTp0P2JWAx6+yFEBfs8lMY+y0SWMBNI9E4ThKi58VKTg3FQZS1RQF1cz27eC0QHMu+3E0SkUowjhVt5VdaWhp07949ZHv2Qd1EjDXM2cla1M0nl3GxAs3J9yREzyTdFVKVFOaE9qRA8GM0WebRuo9JGZKA7Mv2SeS/Z8+eoQ9BArMfFrLGo6jvxbhHbJZnKX2Rzz1O7QhJJ9Cs2ZMaWIyq/zhdeqPNfIoHd58clIQD+JSXl4dKlyIAuBdVXZwFVWKspSSoxE++h8x4k3uCnEhE4I5KwRiFWGOU0QWKiCYLbdoRMRKAu2kQ9vkfLU6dOhX06NEjlH+yMRZSinnuyWnYosVcji8CEA/6Cg2JF+IIUBqnGKUTCNwtwBN4f89RiK1R96DEgO2o0NDmtEdvVFdVVYV+P3UAPUEs6GFwV3PHmXkD4vh74iDFJysVI/MlaQhwKeBNTLYX5VuA8T4/gZxA4MRGFxDB6R7OmYPfyykGRJbyie+XnGYnQIC/coH9+vULiYrxrkL9ZA9+0ykaHIfEpM7ge8TiJ2CsHYwyMfafAF1yCGBHYIbCVDjDjKt7BeB51D+LgQa6OkG7IDYEEtvQ7lnXLKLtLdLuJBpE4gPUXcW2+PkZwOex+4cGDhwYDBkyRL7/HFcEwUGPo/8uWRUpYnfxGHco8HkewLHLyYmAawAPuIFZxhOpDfJQ8gbUv41yORAptMWBNr6oqMhWird5+u+iHmBb2nhjDV7HWBNQTgK8y11l5NetWzc5ULscAtSj7nbNI0skhWeUZCc0W4nyH/jO4Vz0u1IeYhbk4AiwM6tjxIWByHsoZ9qcIBPJd/y+DwPfBESOmCa/QF3WiZHucLlEDpNxcNhmheEOPgdQNx6/VZFQzFZ5TN08AHXQt2Ii3EdyFuUsPtTcGPhW5iMiCNELvz+Gdn9huG4HUJaW/w3g0wxV0XaG7arG2WeKiUWYM4Y7GO5ezshTARbbWGw/DvXkpp/ivVvE0JVoMxN4rpGzJMhE5Pl+xlATsDIqikP9F9D2z3h9nOksEUFhK+qO4rcPkoalMQ/HqJLIyb3F3JdjrCcw1yZ8joyJLR5gCo54etlag7qIoeNh1N1BRYj3DTFJ0elotxPlVzkGuYAmL0VSJVGAJA41c4Z6A3BzTLfn0HYwYKEI6CUAMzZEWvLsIcQOo1AmmyyM72nHJCfYsogflGV6jEk9vyQZXSuq6w4c16NsGcGZbwOPr+H1RkOk2LEzjNepxQkihHSCQ4ynAYNRx2zMKV92CQMWqj8J0BRE8EShxRFN6YrfCRhC0x3r/Zm4IbQCcmJoV0kMamllccR6FjHqUC5F2R/wS2dcymOlfAKOS4KmzQb5cpNC2MC7JhVn5wjXoJ44rYhLh8n0eXOCorJxa7POjbSlCGVczr34/RsAmrcvo9s+wGp3tzVhntxiXiJ4nvEYb4FJkf0O8HocAePmLvCxnL0AORraVekJk6TYjDabRVXfRE2lCN1h6ZQRN1+InUbsCpKwoBZHh0dODN9JBCUffItXxEavTQkUtnfTVAplCWL3JISz29h4NjotnuSsQKJCk8dF+kJR6RARjrqFVmfPnj3ZbK8cIJ0msd6jgHPGtfVTQ8VLmlvh4mct9sobRmPic0DyDQQnx/NlfYUgyz59+oScsH379pAwXABD32nTpoUHIToESeI5mnbE/UqDdyLcafEBf2MCqgC7NwxIbMREJQ0g4D4sfJwnD+AmRrII05cfMWJE+L1169bQr+fip06dGp4oJ83lmYd5wj/EmMa4TaHivo4EeCguYZBnkB5g2aWA69OIEnUHOaGysjIYMGBAMGnSpODYsWPZwCpFmm4lNq+4gSLQA7jcX8DwtjEyRC8wjabnXEx9kfWnTJkSJkAo90xpJVV+FmcVNeYAF5zWngS4C4O91MBxmAv8blLEpbjI5sz9MTdAhcgkCT1RO8mZkAjfiYpTEvStAS53Uw1vAiUGgZ3GpuQEYvoiBqlIan7kSDHnTwJQFNiPu0+5VxCVYhcZIjNrdXUDdp+Eq5AZ3Gkg8QAyVZRZIk4Tl4QAbF9cXJxNYZMAtAokgs4BrNxEpCtteXg7DDTMDKYNSuQdKsnJBek7HxewvxaosWxLYXtw+cJp18217wql4aKCfBNoEu0O5VU+PhctJ0YeXD4C6JQpyrlpSLTojpGGGN5YwNziChdIZLk4lvLcFJ9jMX3QdiImY9bmGQU+TRUL5CHITTRlgF8D9ouD1MfmLoEPl5xokIumZ2cfgMpHt47IW9N64Hsh7wQYYjyIugWuF5fCqYncXRd5vPMWyizzvhi/32+nvG0dZc9vR6fZOu0md5e+uC408FvKSIOZwXlGvxPv95izA2Vtvg1xKFWARI+vMX66HUhpQQb643uW1bSjuTWyw2SBvDrBvjFic1eGGlz5esq3ko9uSIlBRqPuFcCv8F4WIcN12nVaBd0SaYwI6PDDImR11JkqgHcPmQssjxIn6bUshygDFJUTxPMpHk+jfjPgupgdnYV2R/g7xSjtpah8RJBewhwf0gGK6XI92u4wXFEU40afJ4DN4h5LcAd+40HI3JgJecuT0c062W0i2hQJUTcxan3/CMW1PF2K6bbA+Daz4xRs1D3Br1Cm0OihKCqizW78/nXAF/G5TXrEcVzaNMH6CyMswqsAHqDyDLEyou8lwOXnKF8DjI6KjV3KzMBiXkDH8ij/H214J5A596ekrZ3F0zXlWeL7+P5eUrNo3/QwC15uxthuzidy7DzKRwEDaAViiDgKbTbz7CJnzo0bN7pIfIiid8SuPwn25o3QCmpnyjlZkyxPP8EomCJzrGb7GJMx7tNsq4MT2xMUYaiErZOluTzKsnz3gwCeCZyVRZJfYplNEokEjwrPtxlxjeYAk+F1F74VAzPxQRNYYdtpOUvWs8J1sGhBJMNsb7igN8plJs1eSmLIhLKE4rvaCX27gOhLpLOsIzJ7qn/i+wZzcvSOZ23/du8TZjwV8zHIXoP4R3ifBxiFz1dcVpa3aPntPE+c6TmIWE9EtcMmAcPdWAhYhAXxcLOQi9L1WhD1Sc8p1d2oL7XGiRKp8F4A2i8K/nfI+y/gsTDJ/YC/8+AD5Uh04KHiGl+cIFPnBDDrPMjwRGkLXyxO4VGbfQWnDH2v0bVWE3C9QOXlepbgjEfIJQI6XDG3z5ahD9cw2pS78ipB85wyScNTvsVzlzzhL8/jRrnmVjfFJK/m3m4nj9vbgQTguT8XZTjsm672R5uJKEaQmBI/c58gyus8ZDagLpEVSJBIyHp4jn++xqPV71OgQgJYEWOtZ/haxRtKmWOBu8xdBLftWltsY84zE6WIEy/eIOWL+BaayMx+KHtL7EAkqdNDLiEXmEMUHniedtJqg9HmZtfvt26vNi0BdG3Ft3g8ZOf7PAu59TxtzivLNIekyi+wD1i8CuUiD9FXAa8C+/xS3JPmZnomyc7H+fb4/Se0bk41Fel621r4cgVxbq91V4jVqwB7HTe2M7jgB+QWHavZkDRPmZcASoZEmBx6i75bGjPcMdL4/VKGFAGWZkGzPG0XAbdL9A81G5LOmUnC9hHKJeO7dcUMjblSl12867ElFTtaGl20xvvLGPdVz/8TVuU7y0x1PG7vtNg24oz9Uo/Z412++VFWI7Fcog9tu9Lm6gvRmIPv9x1xmQAu6RDkXtbOtlGEmpgD5Nvnyc0dcv0EE6cfdi1HmhMf9wDF3k3gtRvEedhxjpgfqPb9PU9iEJHnyOUA7bQUXh6kq/D7l2iTjWv7XOD530BDr8jIrus+srXjt4MzumJMHuTsBa63YKE1+RR5lBjEikCCnWKWiHdzOgKO+nRIBAF88za/IFmJ3eMZov4CYxGBabcpGL8EYx+SeMXJeRwHNsV/h+vdxeuhEpN3ZyNY78Gm2fknJxVGhyjixPiQvVkNzT1elD9Py/aTAL64Hb9vcYmC9zfdXdT/C1LeGbg4rnBaAihDFJH12W5ulfNCNe/xTsP3bp8ikzJs5BF+5PNfAQYAPaseTdsEcaYAAAAASUVORK5CYII='
- }
- },
- computed: {
- iconSnowWidth() {
- return (Math.floor(this.iconSize / 24) || 1) * 2
- },
- contentdownText() {
- return this.contentText.contentdown || t("uni-load-more.contentdown")
- },
- contentrefreshText() {
- return this.contentText.contentrefresh || t("uni-load-more.contentrefresh")
- },
- contentnomoreText() {
- return this.contentText.contentnomore || t("uni-load-more.contentnomore")
- }
- },
- mounted() {
- // #ifdef APP-PLUS
- var pages = getCurrentPages();
- var page = pages[pages.length - 1];
- var currentWebview = page.$getAppWebview();
- currentWebview.addEventListener('hide', () => {
- this.webviewHide = true
- })
- currentWebview.addEventListener('show', () => {
- this.webviewHide = false
- })
- // #endif
- },
- methods: {
- onClick() {
- this.$emit('clickLoadMore', {
- detail: {
- status: this.status,
- }
- })
- }
- }
- }
-</script>
-
-<style lang="scss" >
- .uni-load-more {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: row;
- height: 40px;
- align-items: center;
- justify-content: center;
- }
-
- .uni-load-more__text {
- font-size: 14px;
- margin-left: 8px;
- }
-
- .uni-load-more__img {
- width: 24px;
- height: 24px;
- // margin-right: 8px;
- }
-
- .uni-load-more__img--nvue {
- color: #666666;
- }
-
- .uni-load-more__img--android,
- .uni-load-more__img--ios {
- width: 24px;
- height: 24px;
- transform: rotate(0deg);
- }
-
- /* #ifndef APP-NVUE */
- .uni-load-more__img--android {
- animation: loading-ios 1s 0s linear infinite;
- }
-
- @keyframes loading-android {
- 0% {
- transform: rotate(0deg);
- }
-
- 100% {
- transform: rotate(360deg);
- }
- }
-
- .uni-load-more__img--ios-H5 {
- position: relative;
- animation: loading-ios-H5 1s 0s step-end infinite;
- }
-
- .uni-load-more__img--ios-H5 image {
- position: absolute;
- width: 100%;
- height: 100%;
- left: 0;
- top: 0;
- }
-
- @keyframes loading-ios-H5 {
- 0% {
- transform: rotate(0deg);
- }
-
- 8% {
- transform: rotate(30deg);
- }
-
- 16% {
- transform: rotate(60deg);
- }
-
- 24% {
- transform: rotate(90deg);
- }
-
- 32% {
- transform: rotate(120deg);
- }
-
- 40% {
- transform: rotate(150deg);
- }
-
- 48% {
- transform: rotate(180deg);
- }
-
- 56% {
- transform: rotate(210deg);
- }
-
- 64% {
- transform: rotate(240deg);
- }
-
- 73% {
- transform: rotate(270deg);
- }
-
- 82% {
- transform: rotate(300deg);
- }
-
- 91% {
- transform: rotate(330deg);
- }
-
- 100% {
- transform: rotate(360deg);
- }
- }
-
- /* #endif */
-
- /* #ifdef H5 */
- .uni-load-more__img--android-H5 {
- animation: loading-android-H5-rotate 2s linear infinite;
- transform-origin: center center;
- }
-
- .uni-load-more__img--android-H5 circle {
- display: inline-block;
- animation: loading-android-H5-dash 1.5s ease-in-out infinite;
- stroke: currentColor;
- stroke-linecap: round;
- }
-
- @keyframes loading-android-H5-rotate {
- 0% {
- transform: rotate(0deg);
- }
-
- 100% {
- transform: rotate(360deg);
- }
- }
-
- @keyframes loading-android-H5-dash {
- 0% {
- stroke-dasharray: 1, 200;
- stroke-dashoffset: 0;
- }
-
- 50% {
- stroke-dasharray: 90, 150;
- stroke-dashoffset: -40;
- }
-
- 100% {
- stroke-dasharray: 90, 150;
- stroke-dashoffset: -120;
- }
- }
-
- /* #endif */
-
- /* #ifndef APP-NVUE || H5 */
- .uni-load-more__img--android-MP {
- position: relative;
- width: 24px;
- height: 24px;
- transform: rotate(0deg);
- animation: loading-ios 1s 0s ease infinite;
- }
-
- .uni-load-more__img--android-MP .uni-load-more__img-icon {
- position: absolute;
- box-sizing: border-box;
- width: 100%;
- height: 100%;
- border-radius: 50%;
- border: solid 2px transparent;
- border-top: solid 2px #777777;
- transform-origin: center;
- }
-
- .uni-load-more__img--android-MP .uni-load-more__img-icon:nth-child(1) {
- animation: loading-android-MP-1 1s 0s linear infinite;
- }
-
- .uni-load-more__img--android-MP .uni-load-more__img-icon:nth-child(2) {
- animation: loading-android-MP-2 1s 0s linear infinite;
- }
-
- .uni-load-more__img--android-MP .uni-load-more__img-icon:nth-child(3) {
- animation: loading-android-MP-3 1s 0s linear infinite;
- }
-
- @keyframes loading-android {
- 0% {
- transform: rotate(0deg);
- }
-
- 100% {
- transform: rotate(360deg);
- }
- }
-
- @keyframes loading-android-MP-1 {
- 0% {
- transform: rotate(0deg);
- }
-
- 50% {
- transform: rotate(90deg);
- }
-
- 100% {
- transform: rotate(360deg);
- }
- }
-
- @keyframes loading-android-MP-2 {
- 0% {
- transform: rotate(0deg);
- }
-
- 50% {
- transform: rotate(180deg);
- }
-
- 100% {
- transform: rotate(360deg);
- }
- }
-
- @keyframes loading-android-MP-3 {
- 0% {
- transform: rotate(0deg);
- }
-
- 50% {
- transform: rotate(270deg);
- }
-
- 100% {
- transform: rotate(360deg);
- }
- }
-
- /* #endif */
-</style>
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-load-more/package.json b/subPackage/realtimeMonitor/components/uni-components/uni-load-more/package.json
deleted file mode 100644
index 2fa6f04..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-load-more/package.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "id": "uni-load-more",
- "displayName": "uni-load-more 加载更多",
- "version": "1.3.3",
- "description": "LoadMore 组件,常用在列表里面,做滚动加载使用。",
- "keywords": [
- "uni-ui",
- "uniui",
- "加载更多",
- "load-more"
-],
- "repository": "https://github.com/dcloudio/uni-ui",
- "engines": {
- "HBuilderX": ""
- },
- "directories": {
- "example": "../../temps/example_temps"
- },
- "dcloudext": {
- "category": [
- "前端组件",
- "通用组件"
- ],
- "sale": {
- "regular": {
- "price": "0.00"
- },
- "sourcecode": {
- "price": "0.00"
- }
- },
- "contact": {
- "qq": ""
- },
- "declaration": {
- "ads": "无",
- "data": "无",
- "permissions": "无"
- },
- "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
- },
- "uni_modules": {
- "dependencies": ["uni-scss"],
- "encrypt": [],
- "platforms": {
- "cloud": {
- "tcb": "y",
- "aliyun": "y"
- },
- "client": {
- "App": {
- "app-vue": "y",
- "app-nvue": "y"
- },
- "H5-mobile": {
- "Safari": "y",
- "Android Browser": "y",
- "微信浏览器(Android)": "y",
- "QQ浏览器(Android)": "y"
- },
- "H5-pc": {
- "Chrome": "y",
- "IE": "y",
- "Edge": "y",
- "Firefox": "y",
- "Safari": "y"
- },
- "小程序": {
- "微信": "y",
- "阿里": "y",
- "百度": "y",
- "字节跳动": "y",
- "QQ": "y"
- },
- "快应用": {
- "华为": "u",
- "联盟": "u"
- },
- "Vue": {
- "vue2": "y",
- "vue3": "y"
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-load-more/readme.md b/subPackage/realtimeMonitor/components/uni-components/uni-load-more/readme.md
deleted file mode 100644
index 54dc1fa..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-load-more/readme.md
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-### LoadMore 加载更多
-> **组件名:uni-load-more**
-> 代码块: `uLoadMore`
-
-
-用于列表中,做滚动加载使用,展示 loading 的各种状态。
-
-
-### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-load-more)
-#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
-
-
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-scss/changelog.md b/subPackage/realtimeMonitor/components/uni-components/uni-scss/changelog.md
deleted file mode 100644
index b863bb0..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-scss/changelog.md
+++ /dev/null
@@ -1,8 +0,0 @@
-## 1.0.3(2022-01-21)
-- 优化 组件示例
-## 1.0.2(2021-11-22)
-- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题
-## 1.0.1(2021-11-22)
-- 修复 vue3中scss语法兼容问题
-## 1.0.0(2021-11-18)
-- init
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-scss/index.scss b/subPackage/realtimeMonitor/components/uni-components/uni-scss/index.scss
deleted file mode 100644
index 1744a5f..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-scss/index.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import './styles/index.scss';
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-scss/package.json b/subPackage/realtimeMonitor/components/uni-components/uni-scss/package.json
deleted file mode 100644
index 7cc0ccb..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-scss/package.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
- "id": "uni-scss",
- "displayName": "uni-scss 辅助样式",
- "version": "1.0.3",
- "description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。",
- "keywords": [
- "uni-scss",
- "uni-ui",
- "辅助样式"
-],
- "repository": "https://github.com/dcloudio/uni-ui",
- "engines": {
- "HBuilderX": "^3.1.0"
- },
- "dcloudext": {
- "category": [
- "JS SDK",
- "通用 SDK"
- ],
- "sale": {
- "regular": {
- "price": "0.00"
- },
- "sourcecode": {
- "price": "0.00"
- }
- },
- "contact": {
- "qq": ""
- },
- "declaration": {
- "ads": "无",
- "data": "无",
- "permissions": "无"
- },
- "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
- },
- "uni_modules": {
- "dependencies": [],
- "encrypt": [],
- "platforms": {
- "cloud": {
- "tcb": "y",
- "aliyun": "y"
- },
- "client": {
- "App": {
- "app-vue": "y",
- "app-nvue": "u"
- },
- "H5-mobile": {
- "Safari": "y",
- "Android Browser": "y",
- "微信浏览器(Android)": "y",
- "QQ浏览器(Android)": "y"
- },
- "H5-pc": {
- "Chrome": "y",
- "IE": "y",
- "Edge": "y",
- "Firefox": "y",
- "Safari": "y"
- },
- "小程序": {
- "微信": "y",
- "阿里": "y",
- "百度": "y",
- "字节跳动": "y",
- "QQ": "y"
- },
- "快应用": {
- "华为": "n",
- "联盟": "n"
- },
- "Vue": {
- "vue2": "y",
- "vue3": "y"
- }
- }
- }
- }
-}
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-scss/readme.md b/subPackage/realtimeMonitor/components/uni-components/uni-scss/readme.md
deleted file mode 100644
index b7d1c25..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-scss/readme.md
+++ /dev/null
@@ -1,4 +0,0 @@
-`uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。
-
-### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass)
-#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/index.scss b/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/index.scss
deleted file mode 100644
index ffac4fe..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/index.scss
+++ /dev/null
@@ -1,7 +0,0 @@
-@import './setting/_variables.scss';
-@import './setting/_border.scss';
-@import './setting/_color.scss';
-@import './setting/_space.scss';
-@import './setting/_radius.scss';
-@import './setting/_text.scss';
-@import './setting/_styles.scss';
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_border.scss b/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_border.scss
deleted file mode 100644
index 12a11c3..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_border.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-.uni-border {
- border: 1px $uni-border-1 solid;
-}
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_color.scss b/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_color.scss
deleted file mode 100644
index 1ededd9..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_color.scss
+++ /dev/null
@@ -1,66 +0,0 @@
-
-// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐
-// @mixin get-styles($k,$c) {
-// @if $k == size or $k == weight{
-// font-#{$k}:#{$c}
-// }@else{
-// #{$k}:#{$c}
-// }
-// }
-$uni-ui-color:(
- // 主色
- primary: $uni-primary,
- primary-disable: $uni-primary-disable,
- primary-light: $uni-primary-light,
- // 辅助色
- success: $uni-success,
- success-disable: $uni-success-disable,
- success-light: $uni-success-light,
- warning: $uni-warning,
- warning-disable: $uni-warning-disable,
- warning-light: $uni-warning-light,
- error: $uni-error,
- error-disable: $uni-error-disable,
- error-light: $uni-error-light,
- info: $uni-info,
- info-disable: $uni-info-disable,
- info-light: $uni-info-light,
- // 中性色
- main-color: $uni-main-color,
- base-color: $uni-base-color,
- secondary-color: $uni-secondary-color,
- extra-color: $uni-extra-color,
- // 背景色
- bg-color: $uni-bg-color,
- // 边框颜色
- border-1: $uni-border-1,
- border-2: $uni-border-2,
- border-3: $uni-border-3,
- border-4: $uni-border-4,
- // 黑色
- black:$uni-black,
- // 白色
- white:$uni-white,
- // 透明
- transparent:$uni-transparent
-) !default;
-@each $key, $child in $uni-ui-color {
- .uni-#{"" + $key} {
- color: $child;
- }
- .uni-#{"" + $key}-bg {
- background-color: $child;
- }
-}
-.uni-shadow-sm {
- box-shadow: $uni-shadow-sm;
-}
-.uni-shadow-base {
- box-shadow: $uni-shadow-base;
-}
-.uni-shadow-lg {
- box-shadow: $uni-shadow-lg;
-}
-.uni-mask {
- background-color:$uni-mask;
-}
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_radius.scss b/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_radius.scss
deleted file mode 100644
index 9a0428b..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_radius.scss
+++ /dev/null
@@ -1,55 +0,0 @@
-@mixin radius($r,$d:null ,$important: false){
- $radius-value:map-get($uni-radius, $r) if($important, !important, null);
- // Key exists within the $uni-radius variable
- @if (map-has-key($uni-radius, $r) and $d){
- @if $d == t {
- border-top-left-radius:$radius-value;
- border-top-right-radius:$radius-value;
- }@else if $d == r {
- border-top-right-radius:$radius-value;
- border-bottom-right-radius:$radius-value;
- }@else if $d == b {
- border-bottom-left-radius:$radius-value;
- border-bottom-right-radius:$radius-value;
- }@else if $d == l {
- border-top-left-radius:$radius-value;
- border-bottom-left-radius:$radius-value;
- }@else if $d == tl {
- border-top-left-radius:$radius-value;
- }@else if $d == tr {
- border-top-right-radius:$radius-value;
- }@else if $d == br {
- border-bottom-right-radius:$radius-value;
- }@else if $d == bl {
- border-bottom-left-radius:$radius-value;
- }
- }@else{
- border-radius:$radius-value;
- }
-}
-
-@each $key, $child in $uni-radius {
- @if($key){
- .uni-radius-#{"" + $key} {
- @include radius($key)
- }
- }@else{
- .uni-radius {
- @include radius($key)
- }
- }
-}
-
-@each $direction in t, r, b, l,tl, tr, br, bl {
- @each $key, $child in $uni-radius {
- @if($key){
- .uni-radius-#{"" + $direction}-#{"" + $key} {
- @include radius($key,$direction,false)
- }
- }@else{
- .uni-radius-#{$direction} {
- @include radius($key,$direction,false)
- }
- }
- }
-}
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_space.scss b/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_space.scss
deleted file mode 100644
index 3c89528..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_space.scss
+++ /dev/null
@@ -1,56 +0,0 @@
-
-@mixin fn($space,$direction,$size,$n) {
- @if $n {
- #{$space}-#{$direction}: #{$size*$uni-space-root}px
- } @else {
- #{$space}-#{$direction}: #{-$size*$uni-space-root}px
- }
-}
-@mixin get-styles($direction,$i,$space,$n){
- @if $direction == t {
- @include fn($space, top,$i,$n);
- }
- @if $direction == r {
- @include fn($space, right,$i,$n);
- }
- @if $direction == b {
- @include fn($space, bottom,$i,$n);
- }
- @if $direction == l {
- @include fn($space, left,$i,$n);
- }
- @if $direction == x {
- @include fn($space, left,$i,$n);
- @include fn($space, right,$i,$n);
- }
- @if $direction == y {
- @include fn($space, top,$i,$n);
- @include fn($space, bottom,$i,$n);
- }
- @if $direction == a {
- @if $n {
- #{$space}:#{$i*$uni-space-root}px;
- } @else {
- #{$space}:#{-$i*$uni-space-root}px;
- }
- }
-}
-
-@each $orientation in m,p {
- $space: margin;
- @if $orientation == m {
- $space: margin;
- } @else {
- $space: padding;
- }
- @for $i from 0 through 16 {
- @each $direction in t, r, b, l, x, y, a {
- .uni-#{$orientation}#{$direction}-#{$i} {
- @include get-styles($direction,$i,$space,true);
- }
- .uni-#{$orientation}#{$direction}-n#{$i} {
- @include get-styles($direction,$i,$space,false);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_styles.scss b/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_styles.scss
deleted file mode 100644
index 689afec..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_styles.scss
+++ /dev/null
@@ -1,167 +0,0 @@
-/* #ifndef APP-NVUE */
-
-$-color-white:#fff;
-$-color-black:#000;
-@mixin base-style($color) {
- color: #fff;
- background-color: $color;
- border-color: mix($-color-black, $color, 8%);
- &:not([hover-class]):active {
- background: mix($-color-black, $color, 10%);
- border-color: mix($-color-black, $color, 20%);
- color: $-color-white;
- outline: none;
- }
-}
-@mixin is-color($color) {
- @include base-style($color);
- &[loading] {
- @include base-style($color);
- &::before {
- margin-right:5px;
- }
- }
- &[disabled] {
- &,
- &[loading],
- &:not([hover-class]):active {
- color: $-color-white;
- border-color: mix(darken($color,10%), $-color-white);
- background-color: mix($color, $-color-white);
- }
- }
-
-}
-@mixin base-plain-style($color) {
- color:$color;
- background-color: mix($-color-white, $color, 90%);
- border-color: mix($-color-white, $color, 70%);
- &:not([hover-class]):active {
- background: mix($-color-white, $color, 80%);
- color: $color;
- outline: none;
- border-color: mix($-color-white, $color, 50%);
- }
-}
-@mixin is-plain($color){
- &[plain] {
- @include base-plain-style($color);
- &[loading] {
- @include base-plain-style($color);
- &::before {
- margin-right:5px;
- }
- }
- &[disabled] {
- &,
- &:active {
- color: mix($-color-white, $color, 40%);
- background-color: mix($-color-white, $color, 90%);
- border-color: mix($-color-white, $color, 80%);
- }
- }
- }
-}
-
-
-.uni-btn {
- margin: 5px;
- color: #393939;
- border:1px solid #ccc;
- font-size: 16px;
- font-weight: 200;
- background-color: #F9F9F9;
- // TODO 暂时处理边框隐藏一边的问题
- overflow: visible;
- &::after{
- border: none;
- }
-
- &:not([type]),&[type=default] {
- color: #999;
- &[loading] {
- background: none;
- &::before {
- margin-right:5px;
- }
- }
-
-
-
- &[disabled]{
- color: mix($-color-white, #999, 60%);
- &,
- &[loading],
- &:active {
- color: mix($-color-white, #999, 60%);
- background-color: mix($-color-white,$-color-black , 98%);
- border-color: mix($-color-white, #999, 85%);
- }
- }
-
- &[plain] {
- color: #999;
- background: none;
- border-color: $uni-border-1;
- &:not([hover-class]):active {
- background: none;
- color: mix($-color-white, $-color-black, 80%);
- border-color: mix($-color-white, $-color-black, 90%);
- outline: none;
- }
- &[disabled]{
- &,
- &[loading],
- &:active {
- background: none;
- color: mix($-color-white, #999, 60%);
- border-color: mix($-color-white, #999, 85%);
- }
- }
- }
- }
-
- &:not([hover-class]):active {
- color: mix($-color-white, $-color-black, 50%);
- }
-
- &[size=mini] {
- font-size: 16px;
- font-weight: 200;
- border-radius: 8px;
- }
-
-
-
- &.uni-btn-small {
- font-size: 14px;
- }
- &.uni-btn-mini {
- font-size: 12px;
- }
-
- &.uni-btn-radius {
- border-radius: 999px;
- }
- &[type=primary] {
- @include is-color($uni-primary);
- @include is-plain($uni-primary)
- }
- &[type=success] {
- @include is-color($uni-success);
- @include is-plain($uni-success)
- }
- &[type=error] {
- @include is-color($uni-error);
- @include is-plain($uni-error)
- }
- &[type=warning] {
- @include is-color($uni-warning);
- @include is-plain($uni-warning)
- }
- &[type=info] {
- @include is-color($uni-info);
- @include is-plain($uni-info)
- }
-}
-/* #endif */
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_text.scss b/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_text.scss
deleted file mode 100644
index a34d08f..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_text.scss
+++ /dev/null
@@ -1,24 +0,0 @@
-@mixin get-styles($k,$c) {
- @if $k == size or $k == weight{
- font-#{$k}:#{$c}
- }@else{
- #{$k}:#{$c}
- }
-}
-
-@each $key, $child in $uni-headings {
- /* #ifndef APP-NVUE */
- .uni-#{$key} {
- @each $k, $c in $child {
- @include get-styles($k,$c)
- }
- }
- /* #endif */
- /* #ifdef APP-NVUE */
- .container .uni-#{$key} {
- @each $k, $c in $child {
- @include get-styles($k,$c)
- }
- }
- /* #endif */
-}
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_variables.scss b/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_variables.scss
deleted file mode 100644
index 557d3d7..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/setting/_variables.scss
+++ /dev/null
@@ -1,146 +0,0 @@
-// @use "sass:math";
-@import '../tools/functions.scss';
-// 间距基础倍数
-$uni-space-root: 2 !default;
-// 边框半径默认值
-$uni-radius-root:5px !default;
-$uni-radius: () !default;
-// 边框半径断点
-$uni-radius: map-deep-merge(
- (
- 0: 0,
- // TODO 当前版本暂时不支持 sm 属性
- // 'sm': math.div($uni-radius-root, 2),
- null: $uni-radius-root,
- 'lg': $uni-radius-root * 2,
- 'xl': $uni-radius-root * 6,
- 'pill': 9999px,
- 'circle': 50%
- ),
- $uni-radius
-);
-// 字体家族
-$body-font-family: 'Roboto', sans-serif !default;
-// 文本
-$heading-font-family: $body-font-family !default;
-$uni-headings: () !default;
-$letterSpacing: -0.01562em;
-$uni-headings: map-deep-merge(
- (
- 'h1': (
- size: 32px,
- weight: 300,
- line-height: 50px,
- // letter-spacing:-0.01562em
- ),
- 'h2': (
- size: 28px,
- weight: 300,
- line-height: 40px,
- // letter-spacing: -0.00833em
- ),
- 'h3': (
- size: 24px,
- weight: 400,
- line-height: 32px,
- // letter-spacing: normal
- ),
- 'h4': (
- size: 20px,
- weight: 400,
- line-height: 30px,
- // letter-spacing: 0.00735em
- ),
- 'h5': (
- size: 16px,
- weight: 400,
- line-height: 24px,
- // letter-spacing: normal
- ),
- 'h6': (
- size: 14px,
- weight: 500,
- line-height: 18px,
- // letter-spacing: 0.0125em
- ),
- 'subtitle': (
- size: 12px,
- weight: 400,
- line-height: 20px,
- // letter-spacing: 0.00937em
- ),
- 'body': (
- font-size: 14px,
- font-weight: 400,
- line-height: 22px,
- // letter-spacing: 0.03125em
- ),
- 'caption': (
- 'size': 12px,
- 'weight': 400,
- 'line-height': 20px,
- // 'letter-spacing': 0.03333em,
- // 'text-transform': false
- )
- ),
- $uni-headings
-);
-
-
-
-// 主色
-$uni-primary: #2979ff !default;
-$uni-primary-disable:lighten($uni-primary,20%) !default;
-$uni-primary-light: lighten($uni-primary,25%) !default;
-
-// 辅助色
-// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
-$uni-success: #18bc37 !default;
-$uni-success-disable:lighten($uni-success,20%) !default;
-$uni-success-light: lighten($uni-success,25%) !default;
-
-$uni-warning: #f3a73f !default;
-$uni-warning-disable:lighten($uni-warning,20%) !default;
-$uni-warning-light: lighten($uni-warning,25%) !default;
-
-$uni-error: #e43d33 !default;
-$uni-error-disable:lighten($uni-error,20%) !default;
-$uni-error-light: lighten($uni-error,25%) !default;
-
-$uni-info: #8f939c !default;
-$uni-info-disable:lighten($uni-info,20%) !default;
-$uni-info-light: lighten($uni-info,25%) !default;
-
-// 中性色
-// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
-$uni-main-color: #3a3a3a !default; // 主要文字
-$uni-base-color: #6a6a6a !default; // 常规文字
-$uni-secondary-color: #909399 !default; // 次要文字
-$uni-extra-color: #c7c7c7 !default; // 辅助说明
-
-// 边框颜色
-$uni-border-1: #F0F0F0 !default;
-$uni-border-2: #EDEDED !default;
-$uni-border-3: #DCDCDC !default;
-$uni-border-4: #B9B9B9 !default;
-
-// 常规色
-$uni-black: #000000 !default;
-$uni-white: #ffffff !default;
-$uni-transparent: rgba($color: #000000, $alpha: 0) !default;
-
-// 背景色
-$uni-bg-color: #f7f7f7 !default;
-
-/* 水平间距 */
-$uni-spacing-sm: 8px !default;
-$uni-spacing-base: 15px !default;
-$uni-spacing-lg: 30px !default;
-
-// 阴影
-$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default;
-$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default;
-$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default;
-
-// 蒙版
-$uni-mask: rgba($color: #000000, $alpha: 0.4) !default;
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/tools/functions.scss b/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/tools/functions.scss
deleted file mode 100644
index ac6f63e..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-scss/styles/tools/functions.scss
+++ /dev/null
@@ -1,19 +0,0 @@
-// 合并 map
-@function map-deep-merge($parent-map, $child-map){
- $result: $parent-map;
- @each $key, $child in $child-map {
- $parent-has-key: map-has-key($result, $key);
- $parent-value: map-get($result, $key);
- $parent-type: type-of($parent-value);
- $child-type: type-of($child);
- $parent-is-map: $parent-type == map;
- $child-is-map: $child-type == map;
-
- @if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){
- $result: map-merge($result, ( $key: $child ));
- }@else {
- $result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) ));
- }
- }
- @return $result;
-};
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-scss/theme.scss b/subPackage/realtimeMonitor/components/uni-components/uni-scss/theme.scss
deleted file mode 100644
index 80ee62f..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-scss/theme.scss
+++ /dev/null
@@ -1,31 +0,0 @@
-// 间距基础倍数
-$uni-space-root: 2;
-// 边框半径默认值
-$uni-radius-root:5px;
-// 主色
-$uni-primary: #2979ff;
-// 辅助色
-$uni-success: #4cd964;
-// 警告色
-$uni-warning: #f0ad4e;
-// 错误色
-$uni-error: #dd524d;
-// 描述色
-$uni-info: #909399;
-// 中性色
-$uni-main-color: #303133;
-$uni-base-color: #606266;
-$uni-secondary-color: #909399;
-$uni-extra-color: #C0C4CC;
-// 背景色
-$uni-bg-color: #f5f5f5;
-// 边框颜色
-$uni-border-1: #DCDFE6;
-$uni-border-2: #E4E7ED;
-$uni-border-3: #EBEEF5;
-$uni-border-4: #F2F6FC;
-
-// 常规色
-$uni-black: #000000;
-$uni-white: #ffffff;
-$uni-transparent: rgba($color: #000000, $alpha: 0);
diff --git a/subPackage/realtimeMonitor/components/uni-components/uni-scss/variables.scss b/subPackage/realtimeMonitor/components/uni-components/uni-scss/variables.scss
deleted file mode 100644
index 1c062d4..0000000
--- a/subPackage/realtimeMonitor/components/uni-components/uni-scss/variables.scss
+++ /dev/null
@@ -1,62 +0,0 @@
-@import './styles/setting/_variables.scss';
-// 间距基础倍数
-$uni-space-root: 2;
-// 边框半径默认值
-$uni-radius-root:5px;
-
-// 主色
-$uni-primary: #2979ff;
-$uni-primary-disable:mix(#fff,$uni-primary,50%);
-$uni-primary-light: mix(#fff,$uni-primary,80%);
-
-// 辅助色
-// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
-$uni-success: #18bc37;
-$uni-success-disable:mix(#fff,$uni-success,50%);
-$uni-success-light: mix(#fff,$uni-success,80%);
-
-$uni-warning: #f3a73f;
-$uni-warning-disable:mix(#fff,$uni-warning,50%);
-$uni-warning-light: mix(#fff,$uni-warning,80%);
-
-$uni-error: #e43d33;
-$uni-error-disable:mix(#fff,$uni-error,50%);
-$uni-error-light: mix(#fff,$uni-error,80%);
-
-$uni-info: #8f939c;
-$uni-info-disable:mix(#fff,$uni-info,50%);
-$uni-info-light: mix(#fff,$uni-info,80%);
-
-// 中性色
-// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
-$uni-main-color: #3a3a3a; // 主要文字
-$uni-base-color: #6a6a6a; // 常规文字
-$uni-secondary-color: #909399; // 次要文字
-$uni-extra-color: #c7c7c7; // 辅助说明
-
-// 边框颜色
-$uni-border-1: #F0F0F0;
-$uni-border-2: #EDEDED;
-$uni-border-3: #DCDCDC;
-$uni-border-4: #B9B9B9;
-
-// 常规色
-$uni-black: #000000;
-$uni-white: #ffffff;
-$uni-transparent: rgba($color: #000000, $alpha: 0);
-
-// 背景色
-$uni-bg-color: #f7f7f7;
-
-/* 水平间距 */
-$uni-spacing-sm: 8px;
-$uni-spacing-base: 15px;
-$uni-spacing-lg: 30px;
-
-// 阴影
-$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5);
-$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2);
-$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5);
-
-// 蒙版
-$uni-mask: rgba($color: #000000, $alpha: 0.4);
diff --git a/subPackage/realtimeMonitor/components/videoDetail.vue b/subPackage/realtimeMonitor/components/videoDetail.vue
deleted file mode 100644
index f551427..0000000
--- a/subPackage/realtimeMonitor/components/videoDetail.vue
+++ /dev/null
@@ -1,567 +0,0 @@
-<template>
- <view class="video">
- <view>
- <!-- #ifdef APP-PLUS -->
- <web-view v-if="webUrl" :src="webUrl" @message="getMessage"></web-view>
- <!-- #endif -->
- <!-- #ifdef MP-WEIXIN -->
- <live-player :style="{'height':livePlayHeight}" :src="livePlayerUrl" style="width: 100vw;"
- autoplay id="livePlayer" mode="RTC" />
- <view v-if="array.length>0" @click="stationVisible = true">
- <view class="flex content">
- <view class="flex" style="padding:20rpx;">
- <view class="uni-input">{{array[index].video_name}}</view>
- <view class="uni-input" style="margin-left: 20rpx;"
- :class="[array[index].online=='1'?'active':'disabled']">
- {{array[index].online=='1'?'在线':'不在线'}}
- </view>
- </view>
- <view style="padding: 0 20rpx;">
- <u-icon name="arrow-down" size="20"></u-icon>
- </view>
- </view>
- </view>
- <view class="preset">
- <view class="flex content preContent" @click="preVisible = true" v-if="presetPointOptions.length>0">
- <view class="flex" style="padding:20rpx;">
- <view class="uni-input">{{presetPointOptions[preIndex].name}}</view>
- </view>
-
- <view style="padding: 0 20rpx;">
- <u-icon name="arrow-down" size="20"></u-icon>
- </view>
- </view>
- <div class="right-icon">
- <u-icon name="plus-circle-fill" size="16" @click="add"></u-icon>
- <u-icon name="play-right-fill" :color='preValue?"":"#e6e6e6"' size="16" @click="playPre"></u-icon>
- <u-icon name="trash-fill" :color='preValue?"":"#e6e6e6"' size="16" @click="delSubmit"></u-icon>
- </div>
- </view>
-
- <view class="speed">
- <view style="padding-bottom: 40rpx;">码流</view>
- <u-radio-group v-model="streamType" placement="row" @change="changeBitstream">
- <u-radio label="主码流" name='0' size="20"></u-radio>
- <u-radio label="子码流" name='1' size="20"></u-radio>
- </u-radio-group>
- </view>
-
- <view class="speed" v-if="array.length>0">
- <view style="padding-bottom: 40rpx;">云台速度</view>
- <u-radio-group v-model="speed" placement="row">
- <u-radio label="慢速" name='30' size="20"></u-radio>
- <u-radio label="正常" name='50' size="20"></u-radio>
- <u-radio label="快速" name='100' size="20"></u-radio>
- </u-radio-group>
- </view>
-
-
- <view class="control-box" v-if="array.length>0">
- <image src="../static/img/reservoirImg/control.png" style="width: 328rpx;height: 328rpx;"></image>
- <view class="btns-box" @touchstart="startVideoControls" @touchend="endVideoControls">
- <view class="top" data-speed="20" data-control="UP"></view>
- <view class="left" data-speed="20" data-control="LEFT"></view>
- <view class="right" data-speed="20" data-control="RIGHT"></view>
- <view class="bottom" data-speed="20" data-control="DOWN"></view>
- </view>
- </view>
- <view class="option_btn_right" v-if="array.length>0" @touchstart="startVideoControls"
- @touchend="endVideoControls">
- <image src="../static/img/reservoirImg/zoom-in.png" data-control="ZOOM_IN" data-speed="80"></image>
- <image src="../static/img/reservoirImg/zoom-out.png" data-control="ZOOM_OUT" data-speed="80">
- </image>
- </view>
-
- <my-select height='50vh' v-if="stationVisible" :show="stationVisible" v-model="selectStationValue"
- type="radio" popupTitle="请选择视频站" :dataLists="array" @submit="stationSelect"
- @cancel="stationVisible=false">
- </my-select>
- <my-select height='50vh' v-if="preVisible && presetPointOptions.length>0 && preValue"
- :show="preVisible && presetPointOptions.length>0 && preValue" v-model="preValue" type="radio"
- popupTitle="请选择预置点" :dataLists="presetPointOptions" @submit="preSelect" @cancel="preVisible=false">
- </my-select>
- <!-- #endif -->
- </view>
- </view>
-</template>
-<script>
- import permision from "@/js_sdk/wa-permission/permission.js"
- import {
- queryHkPreviewUrlCommon,
- handleCameraPosition,
- getPresetsSearchesUrls,
- getTalkURLs,
- setPresetsAddition,
- deletePresetsDeletion
- } from "@/api/hk/hk.js"
- import {
- getAttWmstBase
- } from "@/api/dataCenter/responsiblePerson/responsiblePerson.js"
- import mySelect from "@/components/my-components/my-select.vue"
- export default {
- name: "hkVideo",
- props: ['reservoirId'],
- components: {
- mySelect
- },
- data() {
- return {
- player: "",
- dialogVisible: false,
- webUrl: "",
- type: "",
- videoInfo: {},
- videoUrl: '',
- showWXLivePlayer: false,
- showAPPLivePlayer: false,
- //预制点
- preVisible: false,
- //删除预置点
- isDel: false,
- delValue: "",
- preValue: "",
- preIndex: 0,
- livePlayerUrl: '',
- array: [],
- stationVisible: false,
- selectStationValue: "",
- index: 0,
- talkUrl: "",
- presetPointOptions: [],
- speed: '50',
- streamType: "1",
- }
- },
- mounted() {
- const that = this
- // #ifdef APP-PLUS
- // this.initVideo()
- // #endif
- this.videoStation()
- },
- computed: {
- livePlayHeight() {
- const info = uni.getWindowInfo()
- //设备宽度
- const width = info.screenWidth
- //按照16:9设置高度
- const height = ((width / 16) * 9).toFixed(1)
- return `${height}px`
- },
- },
- methods: {
- async getMessage(data) {
- const platform = uni.getSystemInfoSync().platform
- if (platform == 'ios') {
- if (!permision.judgeIosPermission("record")) {
- uni.showModal({
- content: "目前未获取麦克风权限,是否授权允许使用麦克风",
- title: "提示",
- success(res) {
- if (res.confirm) {
- permision.gotoAppPermissionSetting()
- }
- }
- });
- }
- } else if (platform == 'android') {
- const record = await permision.requestAndroidPermission("android.permission.RECORD_AUDIO")
- if (record == 1) {} else {
- uni.showModal({
- content: "目前未获取麦克风权限,是否授权允许使用麦克风",
- title: "提示",
- success(res) {
- if (res.confirm) {
- permision.gotoAppPermissionSetting()
- }
- }
- });
- }
- }
- },
- //添加预置点
- add() {
- const that = this
- let curVideo = this.array.find(item => item.video_guid == this.selectStationValue)
- const index = this.presetPointOptions.length > 0 ? this.presetPointOptions.length + 1 : 1
- const param = {
- cameraIndexCode: this.selectStationValue,
- protocol: 'wss',
- type: this.type
- }
- uni.showModal({
- title: "添加预置点",
- editable: true,
- placeholderText: "请输入预置点名称",
- success: async res => {
- if (res.confirm) {
- const setRes = await setPresetsAddition({
- cameraIndexCode: that.selectStationValue,
- presetName: res.content,
- presetIndex: index,
- type: that.type
- })
- that.getPresetsSearchesUrl(param)
- }
- }
- })
- },
- //删除预置点
- async delSubmit() {
- if (!this.preValue) return
- const that = this
- const params = {
- cameraIndexCode: that.selectStationValue,
- presetIndex: that.preValue,
- type: that.type
- }
- uni.showModal({
- title: "提示",
- content: "确认删除该预置点吗?",
- async success(res) {
- if (res.confirm) {
- const res = await deletePresetsDeletion(params)
- const presetParam = {
- cameraIndexCode: that.selectStationValue,
- protocol: 'wss',
- type: that.type
- }
- uni.showToast({
- title: "删除成功",
- icon: "none"
- })
- that.getPresetsSearchesUrl(presetParam)
- }
- },
- })
- },
- //视频站切换
- stationSelect(data) {
- this.selectStationValue = data.value
- this.stationVisible = false
- this.index = data.index
- this.type = data.sys_resource
- this.queryHkPreviewUrlCommon()
- const param = {
- cameraIndexCode: data.cameraIndexCode,
- protocol: 'wss',
- type: this.type
- }
- getTalkURLs(param).then(res => {
- let resultUrl = JSON.parse(res.data.data).data.url
- if (resultUrl.indexOf('36.134.79.80:6014') != -1) {
- resultUrl = resultUrl.replace('36.134.79.80:6014', 'hubeihaikang.cn:6014')
- }
- if (resultUrl.indexOf('223.76.234.232:6014') != -1) {
- resultUrl = resultUrl.replace('223.76.234.232:6014', 'v.hubeishuiyi.cn:6014')
- }
- this.talkUrl = resultUrl.replace('36.134.79.80:6014', 'hubeihaikang.cn:6014')
- })
- this.getPresetsSearchesUrl({
- cameraIndexCode: this.selectStationValue,
- type: this.type,
- protocol: 'wss',
- })
- },
- //码流切换
- changeBitstream() {
- this.queryHkPreviewUrlCommon()
- },
- //预制点切换
- preSelect(data) {
- this.preVisible = false
- this.preValue = data.value
- this.preIndex = data.index
- },
- //预置点播放
- playPre() {
- if (!this.preValue) return
- handleCameraPosition({
- cameraIndexCode: this.selectStationValue,
- action: 0,
- command: 'GOTO_PRESET',
- presetIndex: this.preValue,
- type: this.type
- })
- },
- wxPlay() {
- const livePlayer = uni.createLivePlayerContext("livePlayer", this)
- livePlayer.play({
- success(res) {
- console.log("success:", res)
- },
- fail(err) {
- console.log("err:", err)
- }
- })
- },
- startVideoControls(e) {
- handleCameraPosition({
- cameraIndexCode: this.selectStationValue,
- action: 0,
- command: e.target.dataset.control,
- speed: this.speed,
- type: this.type
- })
- },
- //获取预置点列表
- getPresetsSearchesUrl(params) {
- this.presetPointOptions = []
- getPresetsSearchesUrls(params).then(res => {
- console.log(res, "pressssss")
- let data = JSON.parse(res.data)
- if (data.msg !== 'success') {
- return
- }
- let result = data.data.list
- if (result.length > 0) {
- result.forEach((item, index) => {
- this.presetPointOptions.push({
- name: item.presetPointName,
- value: item.presetPointIndex,
- index: index
- })
- })
- this.preValue = this.presetPointOptions[0].value || ""
- } else {
- this.preValue = ""
- }
- })
- },
-
- endVideoControls(e) {
- // 调视频控制的接口
- handleCameraPosition({
- cameraIndexCode: this.selectStationValue,
- action: 1,
- command: e.target.dataset.control,
- speed: this.speed,
- type: this.type
- })
- },
- //获取视频站
- async videoStation() {
- const obj = {
- res_cd: this.reservoirId
- }
- const res = await getAttWmstBase(obj)
- console.log(res, "res")
- if (res.resultList.length > 0) {
- let data = res.resultList
- data.forEach((e, index) => {
- const isOnline = e.online ? '在线' : '离线'
- e.value = e.video_guid
- e.name = `${e.video_name}--${isOnline}`
- e.index = index
- })
- this.array = data
- this.type = this.array[0].sys_resource
- const param = {
- cameraIndexCode: data[0].value,
- protocol: 'wss',
- type: this.type
- }
- this.selectStationValue = this.array[0].value
- // #ifdef MP-WEIXIN
- this.getPresetsSearchesUrl(param)
- this.queryHkPreviewUrlCommon()
- // #endif
-
- // #ifdef APP-PLUS
- getTalkURLs(param).then(res => {
- this.getPresetsSearchesUrl(param)
- let resultUrl = JSON.parse(res.data).data.url
- if (resultUrl.indexOf('36.134.79.80:6014') != -1) {
- resultUrl = resultUrl.replace('36.134.79.80:6014', 'hubeihaikang.cn:6014')
- }
- if (resultUrl.indexOf('223.76.234.232:6014') != -1) {
- resultUrl = resultUrl.replace('223.76.234.232:6014', 'v.hubeishuiyi.cn:6014')
- }
- this.talkUrl = resultUrl
- this.appHKPreviewVideo()
- })
- // #endif
- }
- },
- //微信小程序 视频播放
- queryHkPreviewUrlCommon() {
- queryHkPreviewUrlCommon({
- cameraIndexCode: this.selectStationValue,
- protocol: 'httpsflv',
- type: this.type,
- expand: 'transcode=1&videotype=h264',
- streamType: this.streamType
- }).then(result => {
- if (result.data.indexOf('36.134.79.80:6014') != -1) {
- result.data = result.data.replace('36.134.79.80:6014', 'hubeihaikang.cn:6014')
- }
- if (result.data.indexOf('223.76.234.232:6014') != -1) {
- result.data = result.data.replace('223.76.234.232:6014', 'v.hubeishuiyi.cn:6014')
- }
- this.livePlayerUrl = result.data
- console.log("播放地址", this.livePlayerUrl)
- this.wxPlay()
- })
- },
- //app视频播放
- appHKPreviewVideo() {
- queryHkPreviewUrlCommon({
- cameraIndexCode: this.selectStationValue,
- protocol: 'wss',
- type: this.type
- }).then(result => {
- const station = JSON.stringify(this.array)
- if (result.data.indexOf('36.134.79.80:6014') != -1) {
- result.data = result.data.replace('36.134.79.80:6014', 'hubeihaikang.cn:6014')
- }
- if (result.data.indexOf('223.76.234.232:6014') != -1) {
- result.data = result.data.replace('223.76.234.232:6014', 'v.hubeishuiyi.cn:6014')
- }
- result.data = result.data
- this.webUrl = 'https://sk.hubeishuiyi.cn/business/hk/h5/demo.html?station=' +
- encodeURIComponent(station) + '&url=' + result.data + "&talkUrl=" + this
- .talkUrl
- // this.livePlayerUrl = result.data
- })
- }
- },
- };
-</script>
-<style lang="scss" scoped>
- .content {
- margin: 40rpx;
- border: 2rpx solid;
-
- .active {
- color: #1180ff;
- }
-
- }
-
- .disabled {
- color: orangered;
- }
-
- .preContent {
- margin: 0;
- flex: 1;
- // width: 540rpx;
- }
-
- .right-icon {
- width: 180rpx;
- display: flex;
- align-items: center;
- justify-content: space-around;
- }
-
- .preset {
- display: flex;
- align-items: center;
- justify-content: flex-end;
- padding: 40rpx;
- }
-
- .text-label {
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
-
- .speed {
- padding: 20rpx 40rpx;
- }
-
- .control-box {
- position: relative;
- width: 328rpx;
- height: 100%;
-
- .btns-box {
- position: absolute;
- top: 0;
- left: 0;
- width: 328rpx;
- height: 328rpx;
-
- &>view {
- position: absolute;
- width: 82rpx;
- height: 80rpx;
- border-radius: 50%;
- cursor: pointer;
-
- &:hover {
- background: rgba(255, 255, 255, 0.5);
- }
- }
-
- .top {
- top: 24rpx;
- left: 50%;
- transform: translate(-50%, 0);
- }
-
- .left {
- top: 50%;
- left: 24rpx;
- transform: translate(0, -50%);
- }
-
- .right {
- top: 50%;
- right: 24rpx;
- transform: translate(0, -50%);
- }
-
- .bottom {
- left: 50%;
- bottom: 24rpx;
- transform: translate(-50%, 0);
- }
- }
- }
-
- .option_btn_right {
- position: absolute;
- /* width: 100%; */
- font-size: 0;
- top: 1250rpx;
- right: 30px;
- font-size: 0;
-
- image {
- height: 48rpx;
- width: 148rpx;
- margin: 10rpx;
- flex: 1;
- cursor: pointer;
- }
- }
-
- .speak_btn {
- width: 326rpx;
- top: 1240rpx;
-
- button {
- font-size: 28rpx;
- padding: 0 20rpx;
- }
- }
-
- .flex {
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
-
- .video {
- width: 100%;
- height: 100%;
-
- .video-controls {
- width: 100%;
- height: 50vh;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/videoMonitor.vue b/subPackage/realtimeMonitor/components/videoMonitor.vue
deleted file mode 100644
index 02409e3..0000000
--- a/subPackage/realtimeMonitor/components/videoMonitor.vue
+++ /dev/null
@@ -1,8 +0,0 @@
-<template>
-</template>
-
-<script>
-</script>
-
-<style>
-</style>
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/components/yq.vue b/subPackage/realtimeMonitor/components/yq.vue
deleted file mode 100644
index a7ce341..0000000
--- a/subPackage/realtimeMonitor/components/yq.vue
+++ /dev/null
@@ -1,124 +0,0 @@
-<template>
- <view class="card-content" slot="content">
- <echart initId="yq" :option="yqOption"></echart>
- </view>
-</template>
-
-<script>
- // import echart from "@/components/echart/echart.vue"
- export default {
- // components: {
- // echart
- // },
- props: {
- option: {
- type: Object,
- default: () => {}
- }
- },
- data() {
- return {
- yqOption: {
- title: {
- text: "雨量直方图",
- textStyle: {
- fontSize: 14,
- fontWeight: "normal"
- }
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- crossStyle: {
- color: '#999'
- }
- }
- },
- grid: {
- // left: '10%',
- // right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: [{
- type: 'category',
- data: [],
- axisPointer: {
- type: 'shadow'
- }
- }],
- yAxis: [{
- type: 'value',
- name: '时段雨量(mm)',
- nameTextStyle: {
- fontSize: 8,
- vertivalAlign: "middle",
- // padding: [0, 10, 0, 0]
- },
- },
- // {
- // type: 'value',
- // name: '累计雨量(mm)',
- // nameTextStyle: {
- // fontSize: 8,
- // vertivalAlign: "middle",
- // // padding: [0, 0, 0, 10]
- // },
- // }
- ],
- series: [
- // {
- // name: '累计雨量(mm)',
- // type: 'line',
- // barWidth: "20",
- // tooltip: {
- // valueFormatter: function(value) {
- // return value + 'mm'
- // }
- // },
- // yAxisIndex: 1,
- // data: [],
- // itemStyle: {
- // color: "#FF8B07"
-
- // },
- // },
- {
- name: '时段雨量(mm)',
- type: 'bar',
- yAxisIndex: 0,
- itemStyle: {
- color: "#1890FF"
- },
- tooltip: {
- valueFormatter: function(value) {
- return value + 'mm'
- }
- },
- data: [],
- }
- ]
- },
- }
- },
- watch: {
- option: {
- handler(newVal) {
- if (newVal) {
- this.yqOption = {
- ...this.yqOption,
- ...newVal
- }
- }
- },
- deep: true,
- immediate: true
- }
- },
- }
-</script>
-
-<style scoped lang="scss">
-
-</style>
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/realtimeMonitor/index.vue b/subPackage/realtimeMonitor/realtimeMonitor/index.vue
deleted file mode 100644
index d740ecb..0000000
--- a/subPackage/realtimeMonitor/realtimeMonitor/index.vue
+++ /dev/null
@@ -1,1221 +0,0 @@
-<template>
- <view class="container">
- <view class="customizeBar">
- <u-navbar title="实时监测" placeholder :titleStyle="{color:'#ffffff'}" leftIconColor="#ffffff" bgColor="#5887f9"
- safeAreaInsetTop @leftClick="navBarLeftClick">
- </u-navbar>
- </view>
- <!-- 占位 -->
- <!-- <view style="height: 88rpx;"></view> -->
-
- <view class="top-bar">
- <mySearch v-if="mySearchShow" :defaultValue="adBase" :keyWord="query.res_nm" @getKey="getSearchKey"
- @regionChange="regionChange" @basinChange="basinChange">
- </mySearch>
- <uFilter :top="filterTop" :menuList="dropDownData" :defaultModel="defaultSelected" @submit='dropDownConfirm'
- @reset='resetDropDown'></uFilter>
- </view>
- <!-- <view style="height: 160rpx;">
-
- </view> -->
- <view v-if="adBase" class="top-box">
- <view class="flood-limit-total">
- <u-icon name="volume" color="#ff0000" size="19"></u-icon>
- 下方水库超汛限总数<span class="total-number">{{floodLimitTotal}}</span>座
- </view>
- </view>
- <view class="reservoir-list">
- <view style="padding: 15rpx;" v-for="(item,index) in reservoirList" :key="index">
- <card>
- <view class="head" slot="insideHead">
- <view class="left">
- <view class="name">
- <text>{{item.res_nm}}</text>
- <span style="color: #1180ff;"
- v-show="item.is_gate&&item.is_gate.indexOf('有闸') != -1">(有闸)</span>
- </view>
- <view class="status" v-if="item.is_danger_res == 'true'">
- <text>(病)</text>
- </view>
- <view class="video-box" v-if="item.is_video == '1'">
- <view class="icon">
- <image class="img-icon"
- src="@/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/video.png">
- </image>
- </view>
- </view>
- </view>
- <view class="right">
- <view>{{isNull(item.oth_reg_cd)}}</view>
- </view>
- </view>
- <view @click="goReservoirDetail(item)" class="content" slot="content">
- <view class="info">
- <view class="text" v-if="item.is_over !='未超汛'"
- :style="{color:(Number(item.over_z)>0?'#F00':'#000')}">比汛限:{{isNull(item.over_z)}}m
- </view>
- <view class="location">{{item.regionName}}</view>
- </view>
- <view class="warp_box">
- <view class="left" style="font-size: 0;">
- <view>
- <image lazy-load class="reservoir-img"
- :src="item.current_site_image&&item.current_site_image.url !=''?item.current_site_image.url:'https://sk.hubeishuiyi.cn/business/img/emptyImg.514374af.png'">
- </image>
- </view>
- </view>
-
- <view class="list_right">
- <view class="line">
- <view class="item item1">
- <view class="l">当前水位:</view>
- <view class="r" :style="{color:item.over_z>0?'#FF1818':''}">
- <text> {{isNull(item.rz)}}m</text>
- <text v-if="item.powerIconShow" class="iconfont"
- :class="item.iconClass"></text>
- </view>
- </view>
- <view class="item item2">
- <view class="item">
- <view class="l">今日雨量:</view>
- <view class="r">{{isNull(item.cur_drp)}}mm</view>
- </view>
- </view>
- </view>
-
- <view class="line">
- <view class="item item1">
- <view class="l">汛限水位:</view>
- <view class="r">{{isNull(item.flse_lim_stag)}}m</view>
- </view>
- <view class="item item2">
- <view class="l">比汛限:</view>
- <view class="r" :style="{color:item.over_z>0?'#FF1818':''}">
- {{isNull(item.over_z)}}m
- </view>
- </view>
- </view>
-
- <view v-if="item.control_z" class="line">
- <view class="item item1">
- <view class="l">控制水位:</view>
- <view class="r">{{isNull(item.control_z)}}m</view>
- </view>
- <view class="item item2">
- <view class="l">比控制:</view>
- <view class="r">
- {{item.control_z?(item.rz-item.control_z).toFixed(2):'--'}}m
- </view>
- </view>
- </view>
-
- <view class="line">
- <view class="item item1">
- <view class="l">堰顶高程:</view>
- <view class="r">{{isNull(item.weir_top_elev)}}m</view>
- </view>
- <view class="item item2">
- <view class="l">坝顶高程:</view>
- <view class="r">{{isNull(item.dam_top_elevation)}}m</view>
- </view>
- </view>
-
- <view class="line">
- <view class="item item1">
- <view class="l">24h预报:</view>
- <view class="r">--</view>
- </view>
- <view class="item item2">
- <view class="l">昨日雨量:</view>
- <view class="r">{{isNull(item.ytr_drp)}}mm</view>
- </view>
- </view>
-
- <view class="line">
- <view class="item">
- <view class="l">纳雨量:</view>
- <view class="r"> --(到汛限) | --(到坝顶)</view>
- </view>
- </view>
- </view>
- </view>
-
- </view>
- <view class="footer" slot="insideFooter">
- <view>
- <text class="text-time">{{item.tm}}</text>
- </view>
- <view class="btn-group">
- <view @click="collect(item)" style="margin-right: 20rpx;" v-if="item.isCollect == 2"
- class="btn">
- <view class="icon">
- <u-icon name="star" color='#1180ff'></u-icon>
- </view>
- <view>
- <text class="text btn">收藏</text>
- </view>
- </view>
- <view @click="collect(item)" style="margin-right: 20rpx;" v-if="item.isCollect == 1"
- class="btn">
- <view class="icon">
- <u-icon name="star-fill" color='#1180ff'></u-icon>
- </view>
- <view>
- <text class="text btn">取消收藏</text>
- </view>
- </view>
- <view class="btn">
- <view class="icon">
- <image class="img-icon"
- src="@/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/navigator.png">
- </image>
- </view>
- <view @click="locationNav(item)">
- <text class="text btn">定位</text>
- </view>
- </view>
- </view>
- </view>
- </card>
-
- </view>
-
- <u-loading-page :loading="loading"></u-loading-page>
- <u-loading-icon text="加载中" textSize="18" :show="showLoading"></u-loading-icon>
- </view>
-
-
- </view>
-</template>
-
-<script>
- import uFilter from "@/subPackage/realtimeMonitor/components/filterBar.vue"
- import mySearch from "@/subPackage/realtimeMonitor/components/my-search.vue"
- import regionSelect from "@/components/my-components/regionSelect.vue"
- import card from "@/components/my-components/card.vue"
- import PopupGroup from "@/subPackage/realtimeMonitor/components/popup-group.vue"
- import {
- reservoirList,
- getSKResInfoZRainApi
- } from "@/api/dataCenter/reservoir/reservoir"
- import {
- convertTimestampToDate
- } from "@/utils/date"
- import {
- isInRole
- } from "../utils"
- import {
- getMyCollect,
- updateCollect
- } from "@/api/system/user"
- import store from "@/store/index.js"
- import {
- bizDictionary
- } from "@/api/system/dict"
- export default {
- components: {
- card,
- mySearch,
- regionSelect,
- PopupGroup,
- uFilter
- },
- data() {
- return {
- exceptionType: '1',
- filterPopVisible: false,
- reservoirList: [],
- loading: false,
- showLoading: false,
- bottomLoading: false,
- pages: {
- pageSize: 12,
- pageNo: 1
- },
- query: {
- eng_scal: "",
- is_danger: "",
- is_video: "",
- },
- isCollect: "",
-
- floodLimitTotal: '',
- adBase: uni.getStorageSync("adCodeBase"),
- //下拉选项
- dropDownData: [{
- label: "排序",
- prop: "is_order",
- type: "line",
- children: [{
- label: "超汛幅度降序",
- value: "1"
- },
- {
- label: "水位涨幅降序",
- value: "2"
- },
- {
- label: "1小时雨量降序",
- value: "3"
- },
- {
- label: "今日雨量降序",
- value: "4"
- },
- {
- label: "注册登记码",
- value: "5"
- },
- ]
- },
- {
- label: "筛选",
- prop: "filter",
- type: "check",
- children: [{
- label: "是否有数据",
- type: "radio",
- prop: "data_sta",
- option: [{
- label: "全部",
- value: ""
- },
- {
- label: "有数据",
- value: "1"
- },
- {
- label: "无数据",
- value: "0"
- },
- ],
- },
- {
- label: "溢洪道是否有闸",
- type: "radio",
- prop: "gate",
- option: [{
- label: "全部",
- value: ''
- },
- {
- label: "有闸",
- value: '1'
- },
- {
- label: "无闸",
- value: '2'
- },
- {
- label: "其他",
- value: '0'
- }
- ],
- },
- {
- label: "工程规模",
- type: "radio",
- prop: "eng_scal",
- option: [{
- label: "全部",
- value: ""
- },
- {
- label: "大(1)型",
- value: "大(1)型",
- },
- {
- label: "大(2)型",
- value: "大(2)型"
- },
- {
- label: "中型",
- value: "中型"
- },
- {
- label: "小(1)型",
- value: "小(1)型"
- },
- {
- label: "小(2)型",
- value: "小(2)型"
- },
- ]
- },
- {
- label: "是否病险",
- type: "radio",
- prop: "is_danger",
- option: [{
- label: "全部",
- value: ""
- },
- {
- label: "是",
- value: "true",
- },
- {
- label: "否",
- value: "false"
- },
- ]
- },
- {
- label: "是否视频",
- type: "radio",
- prop: "is_video",
- option: [{
- label: "全部",
- value: ""
- },
- {
- label: "有",
- value: "1",
- },
- {
- label: "无",
- value: "0"
- },
- ]
- },
- {
- label: "测站类型",
- type: "radio",
- prop: "flag",
- option: [{
- label: "全部",
- value: ''
- },
- {
- label: "省级平台",
- value: '物联网'
- },
- {
- label: "地方平台",
- value: '老库'
- },
- {
- label: "水文系统",
- value: '水文'
- }
- ]
- },
- {
- label: "标签",
- type: "checkbox",
- prop: "label",
- option: []
- },
- {
- label: "水位状态",
- type: "checkbox",
- prop: "riverStatus",
- option: [{
- label: "超汛限水位",
- value: 'is_over_z'
- },
- {
- label: "低于死水位",
- value: 'is_over_dead'
- },
- {
- label: "超校核水位",
- value: 'is_over_chec'
- },
- {
- label: "超设计水位",
- value: 'is_over_des'
- },
- {
- label: "低于校核水位",
- value: 'is_low_chec'
- },
- {
- label: "低于设计水位",
- value: 'is_low_des'
- }
- ],
- }
- ]
- },
- {
- label: '是否收藏',
- type: 'line',
- prop: "collect",
- children: [{
- label: "全部",
- value: ""
- },
- {
- label: "收藏",
- value: "1"
- }
- ]
- },
- ],
- //默认选中
- defaultSelected: {},
- //记录选择的水位状态
- queryProp: [],
- mySearchShow: false,
- publicPath: "https://sk.hubeishuiyi.cn/business/",
- userInRole: false,
-
- collectResIds: "",
- }
- },
- created() {},
- onLoad(option) {
- this.initDict()
- if (option.searchKey) {
- this.query.res_nm = option.searchKey
- }
- this.userInRole = isInRole()
-
- if (option.region) {
- this.adBase = JSON.parse(option.region)
- } else {
- this.adBase = uni.getStorageSync("adCodeBase")
- }
- this.regionChange(this.adBase)
-
- },
- onReachBottom() {
- if (this.showLoading) {
- return
- }
- if (!this.adBase) return
- this.showLoading = true
- this.pages.pageNo += 1
- reservoirList(this.pages.pageSize, this.pages.pageNo, Object.assign(this.getResIds(), this.query))
- .then(res => {
- let data = res.data.data
- data.forEach(item => {
- item.regionName = this.convertRegion(item)
- item.tm = item.tm ? convertTimestampToDate(item.tm, "MM-dd hh:mm") : ""
- item.current_site_image = ''
- item.current_site_image_index = ''
- item.imagesArray = []
-
- if (item.station_image && item.station_image.trim().length > 0) {
-
- let arr = []
-
- if (item.station_image.indexOf(',') != -1) {
- arr = item.station_image.split(',').map(arrItem => {
- if (arrItem.indexOf('~') != -1) {
- if (arrItem.split('~').length > 2) {
- arrItem = arrItem.split('~')
- } else {
- let cur = arrItem.split('~')
- cur.push(this.publicPath + 'img/emptyImg.514374af.png')
- arrItem = cur
- }
- }
-
- return arrItem
- })
- } else {
- if (item.station_image.indexOf('~') != -1) {
- if (item.station_image.split('~').length > 2) {
- arr = [item.station_image.split('~')]
- } else {
- let cur = item.station_image.split('~')
- cur.push(this.publicPath + 'img/emptyImg.514374af.png')
- arr = [cur]
- }
- }
- }
-
- if (arr && arr.length > 0) {
- arr.forEach(arrItem => {
-
- let urlStr = arrItem[2]
-
- if (urlStr.indexOf('http://183.95.190.143:9096/images') != -
- 1) {
- urlStr = urlStr.replace(
- 'http://183.95.190.143:9096/images',
- 'https://sk.hubeishuiyi.cn/imgWLW/images')
- }
-
- if (urlStr.indexOf('http://223.75.53.106:8891/skjgimages') != -
- 1) {
- urlStr = urlStr.replace(
- `http://223.75.53.106:8891/skjgimages`,
- `https://sk.hubeishuiyi.cn/imgLK/skjgimages`)
- }
-
- item.imagesArray.push({
- title: arrItem[1],
- url: urlStr
- })
- })
- }
-
- item.current_site_image = item.imagesArray.length > 0 ? item.imagesArray[0] :
- ''
- item.current_site_image_index = item.imagesArray.length > 0 ? 0 : ''
- item.current_site_image.url = item.current_site_image.url.replace(/\\/g, "/");
-
- }
-
- if (item.rz && item.rz_1h) {
- item.powerIconShow = true
- if (item.rz - item.rz_1h > 0) {
- item.iconClass = 'icon-wendushangsheng'
- } else if (item.rz - item.rz_1h < 0) {
- item.iconClass = 'icon-wenduxiajiang'
- }
- } else {
- item.powerIconShow = false
- }
- })
- this.listInCollect(data)
- this.reservoirList = this.reservoirList.concat(data)
- this.showLoading = false
- })
- },
- methods: {
-
- basinChange(basin) {
- this.query.bas_cd = basin.code
- this.getReservoirList(this.pages.pageSize, 1, this.query)
- this.getWaterListNumber(this.adBase, {
- ...this.query,
- })
- },
-
- navBarLeftClick() {
- this.$u.func.globalNavigator("", "navBack")
- },
- //行政区划转换
- convertRegion(item) {
- let arr = []
- if (item.city_nm) {
- arr.push(item.city_nm)
- }
- if (item.county_nm) {
- arr.push(item.county_nm)
- }
- if (item.town_nm) {
- arr.push(item.town_nm)
- }
- return arr.join("-")
- },
-
- //初始化字典
- initDict() {
- bizDictionary({
- code: "RES_LABEL"
- }).then(res => {
- let data = res.data
- let obj = this.dropDownData[1].children.find(e => e.label == "标签")
-
- data.forEach(e => {
- obj.option.push({
- label: e.dictValue,
- value: `'${e.dictKey}'`
- })
- })
-
- this.initDefault()
- })
-
- },
-
- //判断当前集合是否在收藏里
- listInCollect(list) {
- let collectResIds = this.userInfo.detail.collect
- if (list.length > 0) {
- list.forEach(res => {
- res.isCollect = collectResIds.indexOf(res.res_cd) > -1 ? 1 : 2
- })
- }
- },
-
- collect(item) {
- let params = {
- userId: this.userInfo.user_id,
- resId: item.res_cd,
- status: item.isCollect == 1 ? 2 : 1
- }
- updateCollect(params).then(res => {
- //提示
- if (params.status == 1) {
- this.$u.func.showToast("收藏成功")
- } else {
- this.$u.func.showToast("取消成功")
- }
- let data = res.data
- if (JSON.stringify(data) == "{}") {
- data = ""
- }
- this.userInfo.detail.collect = data
- store.commit("SET_USER_INFO", this.userInfo)
- this.listInCollect(this.reservoirList)
- })
- },
-
- dropDownConfirm(data) {
- let objKey = Object.keys(data)
- objKey.forEach(key => {
- if (data["label"] && key == "label") {
- this.query.label = data[key].join(",")
- } else if (key == "riverStatus") {
-
- let typeArr = ['is_over_z', 'is_over_dead', 'is_over_chec', 'is_over_des', 'is_low_chec',
- 'is_low_des'
- ]
-
- typeArr.forEach(item => {
- let flag = data[key].some(i => item == i)
- if (flag) {
- this.query[item] = 1
- } else {
- if (item in this.query) delete this.query[item]
- }
- })
-
- } else if (key == "collect") {
-
- if (data[key] == 1) {
- //收藏
- this.isCollect = true
- getMyCollect(this.userInfo.user_id).then(res => {
- let data = res.data
- if (JSON.stringify(data) != '{}') {
- this.userInfo.detail.collect = data
- store.commit("SET_USER_INFO", this.userInfo)
- }
- })
-
- } else {
- //全部
- this.isCollect = false
- }
-
- } else {
- this.query[key] = data[key]
- }
- })
- this.getReservoirList(this.pages.pageSize, 1, this.query)
- this.getWaterListNumber(this.adBase, {
- ...this.query,
- })
- },
-
- initDefault() {
- this.defaultSelected = {
- is_order: "1",
- data_sta: "",
- gate: "",
- eng_scal: "",
- is_danger: "",
- is_video: "",
- flag: "",
- collect: "",
- label: "",
- }
- let typeArr = ['is_over_z', 'is_over_dead', 'is_over_chec', 'is_over_des', 'is_low_chec', 'is_low_des']
-
- typeArr.forEach(e => {
- delete this.query[e]
- })
-
- Object.assign(this.query, this.defaultSelected)
- },
-
- resetDropDown() {
- this.initDefault()
- this.getReservoirList(this.pages.pageSize, 1, this.query)
- this.getWaterListNumber(this.adBase, {
- ...this.query,
- })
- },
-
- getResIds() {
- if (this.isCollect) {
- this.collectResIds = this.userInfo.detail.collect ? this.userInfo.detail.collect : 0
- this.collectResIds = this.collectResIds.split(",").map(e => `'${e}'`).join(",")
- } else {
- this.collectResIds = ""
- }
- return {
- res_cds: this.collectResIds
- }
- },
-
- getReservoirList(pageSize, pageNo, params = {}) {
- if (this.reservoirList == 0) {}
- if (!this.adBase) return
-
- this.mySearchShow = true
- this.loading = true
- Object.assign(params, this.query, this.getResIds())
- reservoirList(pageSize, pageNo, params).then(res => {
- let data = res.data.data
- data.forEach(item => {
- item.regionName = this.convertRegion(item)
- item.tm = item.tm ? convertTimestampToDate(item.tm, "MM-dd hh:mm") : ""
- item.current_site_image = ''
- item.current_site_image_index = ''
- item.imagesArray = []
- if (item.station_image && item.station_image.trim().length > 0) {
- let arr = []
- if (item.station_image.indexOf(',') != -1) {
- arr = item.station_image.split(',').map(arrItem => {
- if (arrItem.indexOf('~') != -1) {
- if (arrItem.split('~').length > 2) {
- arrItem = arrItem.split('~')
- } else {
- let cur = arrItem.split('~')
- cur.push(this.publicPath + 'img/emptyImg.514374af.png')
- arrItem = cur
- }
- }
-
- return arrItem
- })
- } else {
- if (item.station_image.indexOf('~') != -1) {
- if (item.station_image.split('~').length > 2) {
- arr = [item.station_image.split('~')]
- } else {
- let cur = item.station_image.split('~')
- cur.push(this.publicPath + 'img/emptyImg.514374af.png')
- arr = [cur]
- }
- }
- }
-
- if (arr && arr.length > 0) {
- arr.forEach(arrItem => {
-
- let urlStr = arrItem[2]
-
- if (urlStr.indexOf('http://183.95.190.143:9096/images') != -
- 1) {
- urlStr = urlStr.replace(
- 'http://183.95.190.143:9096/images',
- 'https://sk.hubeishuiyi.cn/imgWLW/images')
- }
-
- if (urlStr.indexOf('http://223.75.53.106:8891/skjgimages') != -
- 1) {
- urlStr = urlStr.replace(
- `http://223.75.53.106:8891/skjgimages`,
- `https://sk.hubeishuiyi.cn/imgLK/skjgimages`)
- }
-
- item.imagesArray.push({
- title: arrItem[1],
- url: urlStr
- })
- })
- }
- item.current_site_image = item.imagesArray.length > 0 ? item.imagesArray[0] :
- ''
- item.current_site_image_index = item.imagesArray.length > 0 ? 0 : ''
-
- item.current_site_image.url = item.current_site_image.url.replace(/\\/g, "/");
-
-
- }
-
- if (item.rz && item.rz_1h) {
- item.powerIconShow = true
- if (item.rz - item.rz_1h > 0) {
- item.iconClass = 'icon-wendushangsheng'
- } else if (item.rz - item.rz_1h < 0) {
- item.iconClass = 'icon-wenduxiajiang'
- }
- } else {
- item.powerIconShow = false
- }
-
-
- })
- this.listInCollect(data)
- this.reservoirList = data
- this.loading = false
- }).catch(err => {
- this.loading = false
- })
- },
-
- /**
- * 跳转到水库详情
- */
- goReservoirDetail(item) {
- let data = {
- id: item.res_cd,
- name: item.res_nm,
- }
- let url = "/subPackage/realtimeMonitor/reservoir/detail?item=" + JSON.stringify(data)
- this.$u.func.globalNavigator(url, "navTo")
- },
-
- regionChange(region) {
- // this.clearQuery()
- if (region.adGrad == 4) {
- this.query.town_cd = region.adCode
- delete this.query.city_cd
- delete this.query.county_cd
- }
- //市
- if (region.adGrad == 2) {
- this.query.city_cd = region.adCode
- delete this.query.county_cd
- delete this.query.town_cd
- }
- //区
- if (region.adGrad == 3) {
- this.query.county_cd = region.adCode
- delete this.query.city_cd
- delete this.query.town_cd
- }
- if (region.adGrad == 1) {
- delete this.query.city_cd
- delete this.query.county_cd
- delete this.query.town_cd
- }
- this.adBase = region
- this.getReservoirList(this.pages.pageSize, 1, this.query)
- this.getWaterListNumber(region, {
- ...this.query,
- })
-
- },
-
- clearQuery() {
- this.query = {}
- },
-
- getSearchKey(key) {
- this.query.res_nm = key
- this.getReservoirList(this.pages.pageSize, 1, this.query)
- this.getWaterListNumber(this.adBase, this.query)
- },
-
- locationNav(item) {
- uni.openLocation({
- latitude: item.res_lat,
- longitude: item.res_lon,
- scale: 15,
- name: item.res_nm
- });
- },
- getWaterListNumber(regionData, obj, res_nm) {
- if (!this.adBase) return
- let params = {}
- if (regionData.adGrad == 2) {
- params.city_cd = regionData.adCode
- delete params.county_cd
- delete params.town_cd
- } else if (regionData.adGrad == 3) {
- params.county_cd = regionData.adCode
- delete params.city_cd
- delete params.town_cd
- } else if (regionData.adGrad == 4) {
- params.town_cd = regionData.adCode
- delete params.county_cd
- delete params.city_cd
- }
- getSKResInfoZRainApi({
- ...params,
- ...obj,
- ...this.getResIds(),
- }).then(res => {
- let data = res.data[0]
-
- if (data.over_flse_cnt) {
- this.floodLimitTotal = data.over_flse_cnt
- } else {
- this.floodLimitTotal = 0
- }
-
- })
- },
- },
-
- computed: {
- isNull() {
- return (prop) => {
- if (prop === 0 || prop) {
- return prop
- } else {
- return "--"
- }
- }
- },
- filterTop() {
- const info = uni.getWindowInfo()
- const statusBar = info.statusBarHeight
- return 69 - (statusBar / 2)
- }
- }
-
- }
-</script>
-
-<style lang="scss" scoped>
- /deep/ .u-icon__icon {
- position: static !important;
- }
-
- .container {
- min-height: 100vh;
- // overflow: hidden;
- }
-
- .top-bar {
- width: 100%;
- display: flex;
- justify-content: space-around;
- // position: fixed;
- // top: 200rpx;
- flex-direction: column;
- position: -webkit-sticky;
- position: sticky;
- top: calc(var(--status-bar-height) + 80rpx);
- // top: 80rpx;
- }
-
- .top-box {
- display: flex;
-
- .img-icon {
- height: 45rpx;
- width: 45rpx;
- position: static;
-
- ::v-deep img {
- position: static;
- }
- }
-
- .flood-limit-total {
- padding: 20rpx 10rpx;
- color: #ff0000;
- font-size: 26rpx;
- display: flex;
- align-items: center;
- width: 100%;
- background-color: #3c9cff2e;
-
- /deep/ .u-icon__icon {
- position: static;
- }
-
- .total-number {
- color: #ff0000;
- margin: 0 10rpx;
- }
- }
-
- }
-
- .head {
- display: flex;
- justify-content: space-between;
- align-items: center;
-
- .left {
- display: flex;
- font-size: 50rpx;
-
- .name {
- color: #333333;
- font-family: PingFang-SC-Heavy;
- font-size: 35rpx;
- }
-
- .status {
- color: #FF5757;
- font-weight: bold;
- font-size: 35rpx;
- font-family: PingFang-SC-Heavy;
- }
-
- .video-box {
- font-size: 30rpx;
- display: flex;
- margin-left: 10rpx;
- color: #40b8ff;
- cursor: pointer;
-
- .img-icon {
- height: 45rpx;
- width: 45rpx;
- position: static;
-
- ::v-deep img {
- position: static;
- }
- }
- }
- }
-
- .right {
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #BBBBBB;
-
- .text {
- width: 320rpx;
- height: 22rpx;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #BBBBBB;
- line-height: 28px;
- }
- }
-
- }
-
- .content {
-
- .info {
- display: flex;
- align-items: center;
- justify-content: space-between;
-
- .text {
- // width: 140rpx;
- height: 20rpx;
- font-size: 20rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FF4A4A;
- line-height: 17rpx;
- }
-
- .location {
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #BBBBBB;
- }
- }
-
-
-
- .warp_box {
- display: flex;
- align-items: center;
-
- // justify-content: center;
- .left {
- width: 50%;
-
-
-
- .reservoir-img {
- // width: 300rpx;
- width: 100%;
- height: 250rpx;
- position: static;
-
- ::v-deep img {
- position: static;
- }
- }
-
- }
-
- .right {
- width: 50%;
-
- .text {
- width: 160rpx;
- height: 20px;
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #333333;
- line-height: 28rpx;
- }
- }
-
- .list_right {
- width: 84%;
- font-size: 24rpx;
- line-height: 30rpx;
- margin-left: 20rpx;
-
- .line {
- display: flex;
- // justify-content: space-between;
-
- .item {
- display: flex;
- width: 50%;
- line-height: 48rpx;
- align-items: center;
- white-space: nowrap;
- }
-
- .item1 {
- width: 55%;
- }
-
- .item2 {
- width: 40%;
- }
- }
- }
-
- }
-
- }
-
- .footer {
- display: flex;
- justify-content: space-between;
- align-items: center;
-
- .text-time {
- width: 238rpx;
- height: 22rpx;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #BBBBBB;
- line-height: 28rpx;
- }
-
- .btn-group {
- display: flex;
- align-items: center;
-
- .btn {
- display: flex;
- align-items: center;
-
- .img-icon {
- height: 22rpx;
- width: 22rpx;
- position: static;
-
- ::v-deep img {
- position: static;
- }
- }
-
- .text {
- // width: 48rpx;
- height: 22rpx;
- font-size: 24rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #333333;
- line-height: 28rpx;
- }
-
- }
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/reservoir/detail.vue b/subPackage/realtimeMonitor/reservoir/detail.vue
deleted file mode 100644
index 1576cf4..0000000
--- a/subPackage/realtimeMonitor/reservoir/detail.vue
+++ /dev/null
@@ -1,148 +0,0 @@
-<template>
- <view class="container">
- <view class="tab">
- <u-tabs scrollable :activeStyle="{color: '#99bada' }" lineWidth="60" :current="currentIndex" :list="tabList"
- @click="tabClick">
- </u-tabs>
- <!-- :itemStyle="{width: '160rpx' ,height: '88rpx' }" -->
- </view>
-
- <view style="height:88rpx;"></view>
-
- <view class="main">
- <realtimeInfo ref="realtimeInfo" v-if="currentIndex == 0" :reservoirId="currentReservoir.id">
- </realtimeInfo>
- <!-- <Station v-if="currentIndex == 1" :reservoirId="currentReservoir.id" /> -->
- <videoDetail v-if="tabList.length==4?currentIndex == 1:currentIndex == null"
- :reservoirId="currentReservoir.id"></videoDetail>
- <basicInfo v-if="tabList.length==4?currentIndex == 2:currentIndex == 1" :reservoirId="currentReservoir.id">
- </basicInfo>
- <!-- <schemePlan v-if="currentIndex==2" :reservoirId="currentReservoir.id"></schemePlan> -->
- <responsiblePerson v-if="tabList.length==4?currentIndex == 3:currentIndex == 2"
- :reservoirId="currentReservoir.id"></responsiblePerson>
- </view>
-
- </view>
-
-</template>
-
-<script>
- import realtimeInfo from "@/subPackage/realtimeMonitor/components/realtimeInfo.vue"
- import basicInfo from "@/subPackage/realtimeMonitor/components/basicInfo.vue"
- import schemePlan from "@/subPackage/realtimeMonitor/components/schemePlan.vue"
- import videoDetail from "@/subPackage/realtimeMonitor/components/videoDetail.vue"
- import responsiblePerson from "@/subPackage/realtimeMonitor/components/responsiblePerson.vue"
- import Station from "@/subPackage/realtimeMonitor/components/station.vue"
- import {
- getReservoirVideoImageStation
- } from "@/api/dataCenter/reservoir/reservoir"
- export default {
- components: {
- realtimeInfo,
- basicInfo,
- schemePlan,
- videoDetail,
- responsiblePerson,
- Station
- // videoMonitor
- },
- data() {
- return {
- currentIndex: 0,
- currentReservoir: {},
- tabList: [],
- videoList: [],
- }
- },
-
- created() {},
-
- mounted() {
-
- },
- onLoad(option) {
- if (option.item) {
- this.currentReservoir = JSON.parse(option.item)
- this.initTabList(this.currentReservoir.id)
- uni.setNavigationBarTitle({
- title: this.currentReservoir.name
- })
- }
- },
- onShow() {
- this.$nextTick(() => {
- if (this.currentIndex == 0 && this.$refs.realtimeInfo) {
- this.$refs.realtimeInfo.getReportFlood()
- }
- })
-
-
- },
- methods: {
- tabClick(item) {
- this.currentIndex = item.index
- },
- async initTabList(id) {
- const params = {
- res_cd: id
- }
- const {
- resultList
- } = await getReservoirVideoImageStation(params)
- if (resultList[0].ishas_wmst == 1) {
- this.tabList = [{
- name: "实时信息"
- },
- // {
- // name: "雨水情"
- // },
- {
- name: "视频监控"
- },
- {
- name: "基本信息"
- },
- {
- name: "责任人"
- }
- ]
- } else {
- this.tabList = [{
- name: "实时信息"
- },
- // {
- // name: "雨水情"
- // },
- {
- name: "基本信息"
- },
- {
- name: "责任人"
- }
- ]
- }
- }
- }
- }
-</script>
-
-<style lang="scss" scoped>
- .container {
- min-height: 100vh;
- overflow: hidden;
- background-color: #f9f9fa;
- }
-
- .main {
- // padding: 20rpx
- }
-
- .tab {
- display: flex;
- justify-content: space-evenly;
- width: 100%;
- position: fixed;
- background-color: #ffffff;
- z-index: 2;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/reservoir/floodSituationStatistics.vue b/subPackage/realtimeMonitor/reservoir/floodSituationStatistics.vue
deleted file mode 100644
index 143431d..0000000
--- a/subPackage/realtimeMonitor/reservoir/floodSituationStatistics.vue
+++ /dev/null
@@ -1,417 +0,0 @@
-<template>
- <!--水库汛情统计-->
- <view class="container">
- <view class="project-statistic">
- <view class="static_item">
- <projectStatistics :gridList="reservoirDataStatistic"></projectStatistics>
- </view>
- <view class="static_item">
- <projectStatistics useBgImg='1' :gridList="overLimitDataStatistic"></projectStatistics>
- </view>
- </view>
-
- <view class="list">
- <view class="head">
- <view class="left">
- <img src="https://sk.hubeishuiyi.cn/business/xcxImg/statistic/sk.png"
- style="width: 44rpx; height: 44rpx; margin-right: 20rpx;" />
- <text>水库工程分布</text>
- </view>
- <view class="right">
- <text>超汛限/总数</text>
- </view>
- </view>
- <view class="itme-box">
- <view class="h-table">
- <view class="h-tr h-tr-5 h-thead ">
- <view class="h-td">行政区划</view>
- <view class="h-td">水库数量</view>
- <view class="h-td">大中型</view>
- <view class="h-td">小一型</view>
- <view class="h-td">小二型</view>
- </view>
-
- <view class="h-tr h-tr-5" v-for="(item,index) in tableList" :key="index">
- <view class="h-td" @click="goDetail(item)">{{item.ad_nm}}</view>
- <view class="h-td">
- <view style="color: red;">
- {{item.overTotal}}
- </view>
- /
- <view>
- {{item.total}}
- </view>
- </view>
- <view class="h-td">
- <view style="color: red;">
- {{item.overBigMiddle}}
- </view>
- /
- <view>
- {{item.bigMiddle}}
- </view>
- </view>
- <view class="h-td">
- <view style="color: red;">
- {{item.overSmallOne}}
- </view>
- /
- <view>
- {{item.smallOne}}
- </view>
- </view>
- <view class="h-td">
- <view style="color: red;">
- {{item.overSmallTwo}}
- </view>
- /
- <view>
- {{item.smallTwo}}
- </view>
- </view>
-
- </view>
- </view>
- </view>
- </view>
- <view>
- <u-popup :show="popupVisible" @close="closePopup">
- <view>
- <text>{{flag}}</text>
- <u-cell-group>
- <u-cell v-for="(item,index) in reservoirList" :key="index" :title="item.name"
- @click="navigatorReservoirDetail(item)">
- <template slot="value">
- <u-icon name="arrow-right" color="#000000" size="14"></u-icon>
- </template>
- </u-cell>
-
- </u-cell-group>
- </view>
- </u-popup>
- </view>
- </view>
-
-
-</template>
-
-<script>
- import regionSelect from "@/components/my-components/regionSelect.vue"
- import projectStatistics from "@/components/my-components/projectStatistic.vue"
- import {
- realTimeOverStatistics,
- reservoirNumRegion,
- reservoirNumStatistic,
- reservoirOverLimitNumStatistic
- } from "@/api/dataCenter/reservoir/reservoir"
- export default {
- components: {
- regionSelect,
- projectStatistics
- },
- data() {
- return {
- reservoirDataStatistic: [{
- label: "水库",
- value: 0
- },
- {
- label: "大中型",
- value: 0
- },
- {
- label: "小一型",
- value: 0
- },
- {
- label: "小二型",
- value: 0
- }
- ],
- overLimitDataStatistic: [{
- label: "超汛限",
- value: 0
- },
- {
- label: "大中型",
- value: 0
- },
- {
- label: "小一型",
- value: 0
- },
- {
- label: "小二型",
- value: 0
- }
- ],
- tableList: [],
- popupVisible: false,
- flag: "",
- reservoirList: [],
- adBase: uni.getStorageSync("adCodeBase")
- }
- },
- created() {
-
- },
- mounted() {
-
- },
- onLoad(option) {
-
- },
- onShow() {
- if (!this.adBase) return
-
- this.loadReservoirDataStatistic()
- this.loadOverLimitDataStatistic()
- this.loadTableList()
- },
- methods: {
- //加载水库统计数据
- loadReservoirDataStatistic() {
- let params = {
- pcode: this.adBase.adCode
- }
- reservoirNumStatistic(params).then(res => {
- let data = res.resultList
- this.reservoirDataStatistic[0].value = 0
- this.reservoirDataStatistic[1].value = 0
- this.reservoirDataStatistic[2].value = 0
- this.reservoirDataStatistic[3].value = 0
- data.forEach(e => {
- this.reservoirDataStatistic[0].value += e.total_cnt
- this.reservoirDataStatistic[1].value += e.bigone + e.bigtwo + e.mid
- this.reservoirDataStatistic[2].value += e.smallone
- this.reservoirDataStatistic[3].value += e.smalltwo
- })
- })
- },
- //跳转实时监控
- goDetail(item) {
- let region = {
- adCode: item.ad_cd,
- adGrad: this.codeGetAdGrad(item.ad_cd),
- adName: item.ad_nm,
- guid: "",
- pAdCode: item.pcode,
- padCode: item.pcode
- }
- let str = JSON.stringify(region)
- const url = "/subPackage/realtimeMonitor/realtimeMonitor/index?region=" + str
- this.$u.func.globalNavigator(url, "navTo")
- },
-
- //加载超汛限统计数据
- loadOverLimitDataStatistic() {
- let params = {
- pcode: this.adBase.adCode
- }
- realTimeOverStatistics(params).then(res => {
- let data = res.data
- this.overLimitDataStatistic[0].value = 0
- this.overLimitDataStatistic[1].value = 0
- this.overLimitDataStatistic[2].value = 0
- this.overLimitDataStatistic[3].value = 0
- data.forEach(e => {
- if (!e.bigone) e.bigone = 0
- if (!e.bigtwo) e.bigtwo = 0
- if (!e.mid) e.mid = 0
- if (!e.smallone) e.smallone = 0
- if (!e.smalltwo) e.smalltwo = 0
- //大中
- this.overLimitDataStatistic[1].value += e.bigone + e.bigtwo + e.mid
- //小1
- this.overLimitDataStatistic[2].value += e.smallone
- //小2
- this.overLimitDataStatistic[3].value += e.smalltwo
- })
- this.overLimitDataStatistic[0].value = this.overLimitDataStatistic[1].value + this
- .overLimitDataStatistic[2].value + this.overLimitDataStatistic[3].value
- })
- },
-
- //加载表格数据
- loadTableList() {
- let params = {
- pcode: this.adBase.adCode
- }
- this.tableList = []
- reservoirNumRegion(params).then(res => {
- let data = res.resultList
- data.forEach(e => {
- this.tableList.push({
- ad_nm: e.ad_nm,
- ad_cd: e.ad_cd,
- pnm: e.pnm,
- pcode: e.pcode,
- overTotal: 0,
- total: e.bigone + e.bigtwo + e.mid + e.smallone + e.smalltwo,
- overBigMiddle: 0,
- bigMiddle: e.bigone + e.bigtwo + e.mid,
- overSmallOne: 0,
- smallOne: e.smallone,
- overSmallTwo: 0,
- smallTwo: e.smalltwo
- })
- })
-
- realTimeOverStatistics(params).then(res => {
- let data = res.data
- data.forEach(e => {
- if (!e.bigone) e.bigone = 0
- if (!e.bigtwo) e.bigtwo = 0
- if (!e.mid) e.mid = 0
- if (!e.smallone) e.smallone = 0
- if (!e.smalltwo) e.smalltwo = 0
- this.tableList.forEach(item => {
- if (e.ad_cd == item.ad_cd) {
- item.overTotal = e.bigone + e.bigtwo + e.mid + e
- .smallone + e.smalltwo
- item.overBigMiddle = e.bigone + e.bigtwo + e.mid
- item.overSmallOne = e.smallone
- item.overSmallTwo = e.smalltwo
- }
- })
- })
- })
- })
- },
-
- //加载水库数据
- loadReservoirList() {
-
- this.reservoirList = [{
- id: "1",
- name: "汪店水库"
- },
- {
- id: "1",
- name: "汪店水库"
- },
- {
- id: "1",
- name: "汪店水库"
- },
- {
- id: "1",
- name: "汪店水库"
- }
- ]
- },
- /**
- * 关闭弹出层
- */
- closePopup() {
- this.popupVisible = false
- },
- popup(flag) {
- // this.flag = flag
- // this.loadReservoirList()
- // this.popupVisible = true
- },
- navigatorReservoirDetail(item) {
- let itemStr = JSON.stringify(item)
- uni.navigateTo({
- url: "/pages/reservoir/detail?item=" + itemStr
- })
- },
- codeGetAdGrad(code) {
- let codeStr = code.slice(0, 6)
- let arr = this.mySplit(codeStr, 2)
- if (arr[2] != "00") {
- //区
- return '3'
- } else if (arr[1] != "00") {
- return '2'
- } else {
- return '1'
- }
- },
- //字符串按长度分割
- mySplit(str, leng) {
- let arr = [];
- let index = 0;
- while (index < str.length) {
- arr.push(str.slice(index, index += leng));
- }
- return arr
- }
-
- }
- }
-</script>
-
-<style scoped lang="scss">
- /* 引入表格样式表 */
- @import "@/subPackage/rainWaterCondition/static/style/helang-table.scss";
-
- .container {
- min-height: 100vh;
- overflow: hidden;
- }
-
- .head {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
-
- .project-statistic {
- background-color: #E8F6FF;
- padding: 20rpx 0;
-
-
- .static_item {
- margin: 20rpx 40rpx;
- background: #fff;
- }
- }
-
- .list {
- .head {
- padding: 20rpx;
-
- .left {
- display: flex;
- align-items: center;
-
- .img-icon {
- width: 44rpx;
- height: 44rpx;
- margin-right: 20rpx;
- }
- }
-
- .right {
- font-size: 24rpx;
- color: #a9a9a9;
- }
- }
-
- .h-table {
- .h-thead {
- color: #51A4FA;
- background-color: #E1F3FF;
- }
-
- .h-td {
- border-right-width: 0;
- font-size: 25rpx;
- }
-
- .h-tr {
- border-width: 0;
- }
-
- .name {
- color: #3c9cff;
- }
-
- .differ {
- color: #ff0000
- }
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/reservoir/reportFlood.vue b/subPackage/realtimeMonitor/reservoir/reportFlood.vue
deleted file mode 100644
index b4ef153..0000000
--- a/subPackage/realtimeMonitor/reservoir/reportFlood.vue
+++ /dev/null
@@ -1,491 +0,0 @@
-<template>
- <view class="container">
- <!--基本信息-->
- <card class="basic-info">
- <view slot="insideHead">
- <boxTitle title="测站水位信息"></boxTitle>
- </view>
- <view class="content" slot="content">
- <view class="item">
- <view class="label">水库名称:</view>
- <view class="value">{{reservoir.res_nm || model.reservoirName}}</view>
- </view>
-
- <view v-if="JSON.stringify(wlw) != '{}' || model.wlwRz" class="item">
- <view class="label">新站水位:</view>
- <view class="value">{{wlw.rz || model.wlwRz}}m</view>
- <view class="tip" v-if="wlw.overWeirTopElev>0 || model.wlwOverZ>0">
- (超溢洪道{{wlw.overWeirTopElev || model.wlwOverZ}}米)</view>
- <view class="tip" v-else>(低于溢洪道{{-wlw.overWeirTopElev|| -model.wlwOverZ}}米)</view>
- </view>
- <view v-if="JSON.stringify(lk) != '{}'|| model.lkRz" class="item">
- <view class="label">老站水位:</view>
- <view class="value">{{lk.rz || model.lkRz}}m</view>
- <view class="tip" v-if="lk.overWeirTopElev>0 || model.lkOverZ>0">
- (超溢洪道{{lk.overWeirTopElev || model.lkOverZ}}米)</view>
- <view class="tip" v-else>(低于溢洪道{{-lk.overWeirTopElev || -model.lkOverZ}}米)</view>
- </view>
- </view>
- </card>
- <!--上报信息-->
- <card class="basic-info">
- <view slot="insideHead">
- <boxTitle title="上报信息"></boxTitle>
- </view>
- <view class="content" slot="content">
- <u--form :model="model" :rules="rules" ref="form">
- <u-form-item labelWidth="150" required label="水位是否超溢洪道:" prop="isOver">
- <view class="btn-group">
- <view class="value-item"
- :class="{'border-left-none':index==1||index==2,'active':item.value==model.isOver,'disabled':disabled}"
- v-for="(item,index) in isOverOption" :key="item.value" @click="changeIsOver(item)">
- {{item.text}}
- </view>
- </view>
- </u-form-item>
-
- <u-form-item labelWidth="1" label=" " prop="personOverZ">
- <view style="display: flex;flex-direction: row;align-items: center;">
- <text v-if="model.isOver == 1">
- 人工观测水位超溢洪道堰顶约
- </text>
- <text v-if="model.isOver == 2">
- 人工观测水位低于溢洪道堰顶约
- </text>
- <view class="input">
- <u--input type="digit" border="bottom" :disabled='disabled'
- v-model="model.personOverZ"></u--input>
- </view>
- <text>米</text>
- </view>
- </u-form-item>
-
- <u-form-item labelWidth="80" label="闸门状态:" prop="gateStatus">
- <view class="btn-group">
- <view class="value-item"
- :class="{'border-left-none':index==1||index==2,'active':item.value==model.gateStatus,'disabled':disabled}"
- v-for="(item,index) in gateStatusOption" :key="item.value"
- @click="changeGateStatus(item)">
- {{item.text}}
- </view>
- </view>
- </u-form-item>
-
- <u-form-item labelWidth="80" label="是否异常:" prop="status">
- <view class="btn-group">
- <view class="value-item"
- :class="{'border-left-none':index==1||index==2,'active':item.value==model.status,'disabled':disabled}"
- v-for="(item,index) in statusOption" :key="item.value" @click="changeFloodStatus(item)">
- {{item.text}}
- </view>
- </view>
-
- </u-form-item>
-
- <view v-if="model.status == 2">
-
- <u-form-item labelWidth="100" required label="异常情况说明:" prop="content">
- <u-textarea confirmType="done" :disabled='disabled' v-model="model.content"
- placeholder="请填写异常情况说明">
- </u-textarea>
- </u-form-item>
-
- <u-form-item labelWidth="100" prop="images" label="核查图片">
- <u-upload :fileList="model.images" :previewFullImage="uploadConfig.previewFullImage"
- :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
- :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture"
- @afterRead="afterReadFloodImg" :deletable='!disabled' :disabled='disabled'
- @delete="deleteFloodPic">
- </u-upload>
- </u-form-item>
-
- <u-form-item labelWidth="100" prop="videos" label="核查视频">
- <u-upload :fileList="model.videos" :previewFullImage="uploadConfig.previewFullImage"
- :accept="uploadConfig.acceptVideo" :multiple="false" :maxCount="1"
- :capture="uploadConfig.capture" :deletable='!disabled' :disabled='disabled'
- @afterRead="afterReadFloodVideo" @delete="deleteFloodVideo">
- </u-upload>
- </u-form-item>
- </view>
-
- </u--form>
- </view>
- </card>
- <u-button v-if="!id" type="primary" text="上报" @click="submit"></u-button>
- <u-loading-page :loading="loading"></u-loading-page>
- </view>
-</template>
-
-<script>
- import {
- devUrl,
- clientId,
- clientSecret
- } from '@/common/setting'
- import {
- Base64
- } from '@/utils/base64.js';
- import boxTitle from "@/subPackage/realtimeMonitor/components/boxTitle.vue"
- import card from "@/components/my-components/card.vue"
- import {
- add,
- detailRecord
- } from '@/api/reportFlood/reportFloodRecord'
- import {
- fileUrlConvert
- } from "@/subPackage/patrol/util/fileUtil.js"
- import {
- floatAdd,
- floatSub
- } from '@/subPackage/realtimeMonitor/utils.js'
- import {
- getSKResZLastChildApi
- } from '@/api/dataCenter/rainWaterCondition/rainWaterCondition';
- export default {
- components: {
- boxTitle,
- card
- },
- data() {
- return {
- loading: false,
- reservoirId: "",
- reservoir: {},
- lk: {},
- wlw: {},
- id: "",
- model: {
- isOver: "1",
- gateStatus: "1",
- status: 1,
- images: [],
- videos: [],
- isAudit: "20",
- },
- rules: {
- 'personOverZ': {
- type: 'string',
- required: true,
- message: '请输入差值',
- trigger: ['blur', 'change']
- },
- 'content': {
- type: 'string',
- required: true,
- message: '请输入异常情况说明',
- trigger: ['blur', 'change']
- },
- },
- isOverOption: [{
- text: "是",
- value: "1"
- },
- {
- text: "否",
- value: "2"
- },
- ],
- gateStatusOption: [{
- text: "开启",
- value: "1"
- },
- {
- text: "关闭",
- value: "2"
- },
- ],
- statusOption: [{
- text: "有异常",
- value: 2
- },
- {
- text: "无异常",
- value: 1
- },
- ],
- uploadConfig: {
- acceptImg: "image",
- acceptVideo: 'video',
- capture: ['album', 'camera'],
- multiple: true,
- maxCount: "5",
- previewFullImage: true,
- uploadText: "上传中",
- url: devUrl + "/api/blade-resource/oss/endpoint/put-file-attach",
- header: {},
- },
- }
- },
- computed: {
- disabled() {
- if (this.id) {
- return true
- } else {
- return false
- }
- },
- },
- onLoad(option) {
- console.log(option, "option")
- this.getHeader()
- if (option.reservoirId && !option.id) {
- this.reservoirId = option.reservoirId
- this.getReservoirDetail()
- }
- if (option.id) {
- this.id = option.id
- this.getDetail()
- }
- },
- methods: {
- submit() {
- this.$refs.form.validate().then(res => {
-
- this.model.reservoirId = this.reservoirId
-
- if (this.wlw) {
- this.model.wlwRz = this.wlw.rz
- this.model.wlwOverZ = this.wlw.overWeirTopElev
- }
-
- if (this.lk) {
- this.model.lkRz = this.lk.rz
- this.model.lkOverZ = this.lk.overWeirTopElev
- }
-
-
- this.model.adCode = this.reservoir.county_cd
- if (this.model.isOver == 1) {
- //超溢洪道
- this.model.personRz = floatAdd(this.reservoir.weir_top_elev, this.model
- .personOverZ)
- } else {
- //低于溢洪道
- this.model.personRz = floatSub(this.reservoir.weir_top_elev, this.model
- .personOverZ)
- }
-
-
- if (this.model.images.length == 0) {
- this.model.images = undefined
- }
- if (this.model.videos.length == 0) {
- this.model.videos = undefined
- }
-
- add(this.model).then(res => {
- let that = this
- uni.showToast({
- icon: 'success',
- title: '提交成功',
- success() {
- setTimeout(() => {
- that.$u.func.globalNavigator("", "navBack")
- }, 1000)
- }
- })
- })
- })
- },
- //获取报讯详情
- async getDetail() {
- const res = await detailRecord(this.id)
- if (res.code != 200) return
- this.model = res.data
- console.log(res, "res")
- },
- //获取头部
- getHeader() {
- let accessToken = uni.getStorageSync('accessToken');
- let myHeader = {}
- if (accessToken) {
- myHeader['Blade-Auth'] = 'bearer ' + accessToken;
- }
- // 客户端认证参数
- myHeader['Authorization'] = 'Basic ' + Base64.encode(clientId + ':' + clientSecret);
- this.header = myHeader
- this.uploadConfig.header = myHeader
- },
- //上传方法
- uploadFilePromise(url) {
- return new Promise((resolve, reject) => {
- let a = uni.uploadFile({
- url: this.uploadConfig.url, //接口地址
- filePath: url,
- name: 'file',
- header: this.uploadConfig.header,
- success: (res) => {
- let data = JSON.parse(res.data)
- setTimeout(() => {
- resolve(data)
- }, 1000)
- }
- });
- })
- },
- showLoading() {
- uni.showLoading({
- mask: true,
- title: '上传中'
- })
- },
- loadingClose() {
- uni.hideLoading()
- },
- //读取后的处理函数
- async afterReadFloodImg(event, index) {
- if (this.id) return
- this.showLoading()
- // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
- let lists = [].concat(event.file)
- let fileListLen = this.model.images.length
- lists.map((item) => {
- this.model.images.push({
- ...item,
- status: 'uploading',
- message: '上传中'
- })
- })
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url)
- this.model.images.splice(fileListLen, 1, Object.assign({}, {
- url: fileUrlConvert(result.data.link)
- }))
- fileListLen++
- }
- this.loadingClose()
- },
-
- //读取后的处理函数
- async afterReadFloodVideo(event, index) {
- if (this.id) return
- this.showLoading()
- // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
- let lists = [].concat(event.file)
- let fileListLen = this.model.videos.length
- lists.map((item) => {
- this.model.videos.push({
- ...item,
- status: 'uploading',
- message: '上传中'
- })
- })
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url)
- this.model.videos.splice(fileListLen, 1, Object.assign({}, {
- url: fileUrlConvert(result.data.link)
- }))
- fileListLen++
- }
- this.loadingClose()
- },
-
- //删除图片
- deleteFloodPic(event) {
- if (this.id) return
- this.model.images.splice(event.index, 1)
- },
-
- //删除视频
- deleteFloodVideo(event) {
- if (this.id) return
- this.model.videos.splice(event.index, 1)
- },
- //获取水库实时信息
- getReservoirDetail() {
- this.loading = true
- let params = {
- res_cd: this.reservoirId
- }
- getSKResZLastChildApi(params).then(res => {
- let data = res.data.data
- this.reservoir.res_nm = data[0].res_nm
- this.reservoir.weir_top_elev = data[0].weir_top_elev
- this.reservoir.county_cd = data[0].county_cd
- data.forEach(e => {
- if (e.resource_flag == "物联网") {
- this.wlw = e
- this.wlw.overWeirTopElev = floatSub(this.wlw.rz, this.wlw.weir_top_elev)
- } else if (e.resource_flag == "老库") {
- this.lk = e
- this.lk.overWeirTopElev = floatSub(this.lk.rz, this.lk.weir_top_elev)
- }
- })
- this.loading = false
- }).catch(err => {
- this.loading = false
- })
- },
- //改变超汛限状态
- changeIsOver(item) {
- if (this.id) return
- if (this.model.isOver == item.value) return
- this.model.isOver = item.value
- },
- //改变闸门关闭状态
- changeGateStatus(item) {
- if (this.id) return
- if (this.model.gateStatus == item.value) return
- this.model.gateStatus = item.value
- },
- //改变状态
- changeFloodStatus(item) {
- if (this.id) return
- if (this.model.status == item.value) return
- this.model.status = item.value
- },
- }
- }
-</script>
-
-<style scoped lang="scss">
- .container {
- overflow: hidden;
-
- .basic-info {
-
- .content {
- .item {
- display: flex;
- }
- }
- }
-
- .input {
- width: 220rpx;
- }
-
- .btn-group {
- display: flex;
-
- .value-item {
- padding: 0rpx 40rpx;
- background-color: #ffffff;
- border: 2rpx solid #333333;
- height: 70rpx;
- line-height: 70rpx;
- box-sizing: border-box;
- }
-
- .active {
- background-color: #1180ff !important;
- color: #ffffff !important;
- border: 2rpx solid #1180ff !important;
- }
-
- .disabled {
- background-color: #dddddd;
- border: 2rpx solid #dddddd;
- color: #ffffff;
- }
-
- .border-left-none {
- border-left: 0;
- }
- }
-
-
-
-
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/search/index.vue b/subPackage/realtimeMonitor/search/index.vue
deleted file mode 100644
index 63f6d9b..0000000
--- a/subPackage/realtimeMonitor/search/index.vue
+++ /dev/null
@@ -1,84 +0,0 @@
-<template>
- <!--搜索页-->
- <view class="container">
- <view class="search">
- <u-search shape="square" focus placeholder="搜索水库" :actionStyle="{color:'#ffffff'}" actionText="取消"
- @custom="cancelSearch" @search="search" v-model="searchKey">
- </u-search>
-
- </view>
- <view>
- <u-cell-group>
- <u-cell @click="goRealtimeMonitor('')" icon="search" title="全部水库"></u-cell>
- </u-cell-group>
- </view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- searchKey: ""
- }
- },
- created() {
-
- },
- mounted() {
-
- },
- onLoad(option) {
-
- },
- onShow() {
-
- },
- methods: {
- /**
- * 点击右侧控件时的事件
- * @param {Object} value 输入框的值
- */
- cancelSearch(value) {
- this.$u.func.globalNavigator("", "navBack")
- },
-
- /**
- * 按下enter或搜索键时的方法
- * @param {Object} value 搜索关键字
- */
- search(searchKey) {
- this.goRealtimeMonitor(searchKey)
- },
-
- /**
- * 前往实时监测页面
- */
- goRealtimeMonitor(searchKey) {
- if (searchKey) {
- let url = "/subPackage/realtimeMonitor/realtimeMonitor/index?searchKey=" + searchKey
- this.$u.func.globalNavigator(url, "redTo")
- } else {
- let url = "/subPackage/realtimeMonitor/realtimeMonitor/index?searchKey=" + searchKey
- this.$u.func.globalNavigator(url, "redTo")
- }
-
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- .container {
- min-height: 100vh;
- overflow: hidden;
- }
-
- .search {
- height: 200rpx;
- display: flex;
- background-color: #5887f9;
- padding: 30rpx;
- align-items: flex-end;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/realtimeMonitor/static/img/plan/icon_data.png b/subPackage/realtimeMonitor/static/img/plan/icon_data.png
deleted file mode 100644
index b30f249..0000000
--- a/subPackage/realtimeMonitor/static/img/plan/icon_data.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/downBlack.png b/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/downBlack.png
deleted file mode 100644
index af44838..0000000
--- a/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/downBlack.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/horn.png b/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/horn.png
deleted file mode 100644
index bf8b34d..0000000
--- a/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/horn.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/more.png b/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/more.png
deleted file mode 100644
index 02d9424..0000000
--- a/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/more.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/navigator.png b/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/navigator.png
deleted file mode 100644
index 9eb78d8..0000000
--- a/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/navigator.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/rain.png b/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/rain.png
deleted file mode 100644
index 4a7ea8d..0000000
--- a/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/rain.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/search.png b/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/search.png
deleted file mode 100644
index b00b582..0000000
--- a/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/search.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/video.png b/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/video.png
deleted file mode 100644
index b9bd256..0000000
--- a/subPackage/realtimeMonitor/static/img/realtimeMonitiorImg/video.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/bdgc.png b/subPackage/realtimeMonitor/static/img/reservoirImg/bdgc.png
deleted file mode 100644
index 90ba99d..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/bdgc.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/control.png b/subPackage/realtimeMonitor/static/img/reservoirImg/control.png
deleted file mode 100644
index 5bb9186..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/control.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/db.png b/subPackage/realtimeMonitor/static/img/reservoirImg/db.png
deleted file mode 100644
index 6c9f10e..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/db.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/default.jpg b/subPackage/realtimeMonitor/static/img/reservoirImg/default.jpg
deleted file mode 100644
index 0b75c71..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/default.jpg
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/dhkr.png b/subPackage/realtimeMonitor/static/img/reservoirImg/dhkr.png
deleted file mode 100644
index feaa26f..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/dhkr.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/fhgsw.png b/subPackage/realtimeMonitor/static/img/reservoirImg/fhgsw.png
deleted file mode 100644
index 844b0d4..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/fhgsw.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/fhkr.png b/subPackage/realtimeMonitor/static/img/reservoirImg/fhkr.png
deleted file mode 100644
index cbbd4ba..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/fhkr.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/gcgk.png b/subPackage/realtimeMonitor/static/img/reservoirImg/gcgk.png
deleted file mode 100644
index b1d2443..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/gcgk.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/gcgm.png b/subPackage/realtimeMonitor/static/img/reservoirImg/gcgm.png
deleted file mode 100644
index 83888a3..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/gcgm.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/jhhsw.png b/subPackage/realtimeMonitor/static/img/reservoirImg/jhhsw.png
deleted file mode 100644
index 1a54999..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/jhhsw.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/jymj.png b/subPackage/realtimeMonitor/static/img/reservoirImg/jymj.png
deleted file mode 100644
index 9252f18..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/jymj.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/kzyxsw.png b/subPackage/realtimeMonitor/static/img/reservoirImg/kzyxsw.png
deleted file mode 100644
index c053b9d..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/kzyxsw.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/sjhsw.png b/subPackage/realtimeMonitor/static/img/reservoirImg/sjhsw.png
deleted file mode 100644
index 794c598..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/sjhsw.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/skr.png b/subPackage/realtimeMonitor/static/img/reservoirImg/skr.png
deleted file mode 100644
index baddf11..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/skr.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/ssw.png b/subPackage/realtimeMonitor/static/img/reservoirImg/ssw.png
deleted file mode 100644
index f4d8828..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/ssw.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/xlkr.png b/subPackage/realtimeMonitor/static/img/reservoirImg/xlkr.png
deleted file mode 100644
index d0b83be..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/xlkr.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/xxsw.png b/subPackage/realtimeMonitor/static/img/reservoirImg/xxsw.png
deleted file mode 100644
index 627af9d..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/xxsw.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/yhd.png b/subPackage/realtimeMonitor/static/img/reservoirImg/yhd.png
deleted file mode 100644
index 93170a2..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/yhd.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/zcxsw.png b/subPackage/realtimeMonitor/static/img/reservoirImg/zcxsw.png
deleted file mode 100644
index e7b6859..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/zcxsw.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/zkr.png b/subPackage/realtimeMonitor/static/img/reservoirImg/zkr.png
deleted file mode 100644
index 8418ba4..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/zkr.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/zoom-in.png b/subPackage/realtimeMonitor/static/img/reservoirImg/zoom-in.png
deleted file mode 100644
index 17a459b..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/zoom-in.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/reservoirImg/zoom-out.png b/subPackage/realtimeMonitor/static/img/reservoirImg/zoom-out.png
deleted file mode 100644
index 9575c47..0000000
--- a/subPackage/realtimeMonitor/static/img/reservoirImg/zoom-out.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/static/img/statistic/sk.png b/subPackage/realtimeMonitor/static/img/statistic/sk.png
deleted file mode 100644
index 60745d4..0000000
--- a/subPackage/realtimeMonitor/static/img/statistic/sk.png
+++ /dev/null
Binary files differ
diff --git a/subPackage/realtimeMonitor/utils.js b/subPackage/realtimeMonitor/utils.js
deleted file mode 100644
index 1037628..0000000
--- a/subPackage/realtimeMonitor/utils.js
+++ /dev/null
@@ -1,55 +0,0 @@
-import store from "@/store"
-
-export const floatAdd = (arg1, arg2) => {
- var r1, r2, m;
- try {
- r1 = arg1.toString().split(".")[1].length;
- } catch (e) {
- r1 = 0;
- }
- try {
- r2 = arg2.toString().split(".")[1].length;
- } catch (e) {
- r2 = 0;
- }
- m = Math.pow(10, Math.max(r1, r2));
- return (arg1 * m + arg2 * m) / m;
-}
-
-//减法
-export const floatSub = (arg1, arg2) => {
- var r1, r2, m, n;
- try {
- r1 = arg1.toString().split(".")[1].length
- } catch (e) {
- r1 = 0
- }
- try {
- r2 = arg2.toString().split(".")[1].length
- } catch (e) {
- r2 = 0
- }
- m = Math.pow(10, Math.max(r1, r2));
- n = (r1 >= r2) ? r1 : r2;
- return ((arg1 * m - arg2 * m) / m).toFixed(n);
-}
-
-
-/**
- * 判断当前登录用户是否在这六个角色之中
- * 省厅管理员、省厅水库处业务人员、市州管理员、市州水库管理业务人员、区县管理员、区县水库管理业务人员
- */
-const roleName = "stgly,stskywuser,dsswjgly,sdglywuser,qxswjgly,qxglywuser"
-export const isInRole = () => {
- let userRoleName = store.state.userInfo.role_name
- let roleArr = userRoleName.split(",")
- let isIn = false
- roleArr.forEach(role => {
- if (roleName.indexOf(role) > -1) {
- isIn = true
- return
- }
- })
- return isIn
-
-}
\ No newline at end of file
diff --git a/subPackage/user/addressList.vue b/subPackage/user/addressList.vue
deleted file mode 100644
index aa74670..0000000
--- a/subPackage/user/addressList.vue
+++ /dev/null
@@ -1,105 +0,0 @@
-<template>
- <view>
- <view>
- <Search placeholder='请输入姓名' padding='0 30rpx' v-model="query.realName" @search="search" />
- </view>
- <u-list lowerThreshold='100' @scrolltolower="scrolltolower">
- <u-list-item v-for="(item, index) in list" :key="index">
- <u-cell :title="item.realName">
- <view @click="call(item.phone)" class="value" slot="value">
- <view class="icon">
- <u-icon color="#2979ff" name="phone"></u-icon>
- </view>
- <!-- <view class="phone">
- {{item.phone}}
- </view> -->
- </view>
- </u-cell>
- </u-list-item>
- </u-list>
- <u-loading-icon text="加载中" textSize="18" :show="loadingIcon"></u-loading-icon>
- <u-loading-page :loading="loadingPage"></u-loading-page>
- </view>
-</template>
-
-<script>
- import {
- getList
- } from '@/api/system/user'
- import Search from "@/components/my-components/search.vue"
- export default {
- components: {
- Search
- },
- data() {
- return {
- list: [],
- query: {
- realName: "",
- },
- page: {
- current: 1,
- size: 20,
- total: 0
- },
- loadingIcon: false,
- loadingPage: false
- }
- },
- created() {
-
- },
- mounted() {
- this.loadmore()
- },
- onLoad(option) {
-
- },
- onShow() {
-
- },
- methods: {
- search() {
- this.page.current = 1
- this.loadmore()
- },
- scrolltolower() {
- this.page.current = this.page.current + 1
- this.loadmore()
- },
- loadmore() {
-
- if (this.page.current == 1) {
- this.loadingPage = true
- }
-
- this.loadingIcon = true
- getList(this.page.current, this.page.size, this.query, this.userInfo.dept_id).then(res => {
- let data = res.data.records
-
- if (this.page.current == 1) {
- this.list = data
- } else {
- this.list = this.list.concat(data)
- }
- if (this.loadingPage) {
- this.loadingPage = false
- }
- this.loadingIcon = false
- })
- },
- call(phone) {
- uni.makePhoneCall({
- phoneNumber: phone
- });
- },
- }
- }
-</script>
-
-<style scoped lang="scss">
- .value {
- display: flex;
- align-items: center;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/user/components/boxTitle.vue b/subPackage/user/components/boxTitle.vue
deleted file mode 100644
index 38e4200..0000000
--- a/subPackage/user/components/boxTitle.vue
+++ /dev/null
@@ -1,72 +0,0 @@
-<template>
- <div class="box-title-container flex j-c-s-b">
- <div class="title-name">
- {{ title }}
- </div>
-
- <div class="region-more">
- <div class="region">
- <slot name="region"></slot>
- </div>
- <div class="more">
- <slot name="more"></slot>
- </div>
- </div>
- </div>
-</template>
-
-<script>
- export default {
- name: 'BoxTitle',
- props: {
- title: {
- type: String,
- default: ''
- }
- }
- }
-</script>
-
-<style lang="scss" scoped>
- .box-title-container {
- height: 36px;
- line-height: 36px;
-
- .title-name {
- padding-left: 10px;
- position: relative;
- font-size: 20px;
- font-family: Microsoft YaHei-Bold, Microsoft YaHei;
- font-weight: bold;
- color: #333333;
-
- &::after {
- content: '';
- position: absolute;
- top: 50%;
- left: 0;
- width: 4px;
- height: 18px;
- background: #1890FF;
- border-radius: 2px 2px 2px 2px;
- opacity: 1;
- transform: translate(0, -50%);
- }
- }
-
- .region {
- font-size: 20px;
- font-family: Alibaba PuHuiTi-Bold, Alibaba PuHuiTi;
- font-weight: bold;
- color: #333333;
- }
-
- .more {
- font-size: 15px;
- font-family: Microsoft YaHei-Regular, Microsoft YaHei;
- font-weight: 400;
- color: #1890FF;
- cursor: pointer;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/user/components/feedbackList.vue b/subPackage/user/components/feedbackList.vue
deleted file mode 100644
index 8fdd3a6..0000000
--- a/subPackage/user/components/feedbackList.vue
+++ /dev/null
@@ -1,34 +0,0 @@
-<template>
- <view>
- list
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
-
- }
- },
- created() {
-
- },
- mounted() {
-
- },
- onLoad(option) {
-
- },
- onShow() {
-
- },
- methods: {
-
- }
- }
-</script>
-
-<style scoped lang="scss">
-
-</style>
\ No newline at end of file
diff --git a/subPackage/user/components/feedbackReport.vue b/subPackage/user/components/feedbackReport.vue
deleted file mode 100644
index f7c83f3..0000000
--- a/subPackage/user/components/feedbackReport.vue
+++ /dev/null
@@ -1,202 +0,0 @@
-<template>
- <view class="container">
-
- <!--上报信息-->
- <card class="card">
- <view class="content" slot="content">
- <u-form labelPosition="top" labelWidth="70" :model="form" :rules="rules" ref="form">
-
- <u-form-item label="描述:" required prop="content">
- <u-textarea confirmType="done" v-model="form.content" placeholder="请填写描述">
- </u-textarea>
- </u-form-item>
-
- <u-form-item label="图片:" prop="images">
- <u-upload :fileList="form.images" :previewFullImage="uploadConfig.previewFullImage"
- :accept="uploadConfig.acceptImg" :multiple="uploadConfig.multiple"
- :maxCount="uploadConfig.maxCount" :capture="uploadConfig.capture" @afterRead="afterReadImg"
- @delete="deletePic">
- </u-upload>
- </u-form-item>
-
- <!-- <u-form-item label="联系方式:" prop="phone">
- <u-input confirmType="done" v-model="form.phone" placeholder="联系方式">
- </u-input>
- </u-form-item> -->
- </u-form>
- </view>
- </card>
-
- <view class="btn">
- <u-button type="primary" text="提交" @click="submit"></u-button>
- </view>
- </view>
-</template>
-
-<script>
- import card from "@/components/my-components/card.vue"
- import {
- devUrl,
- clientId,
- clientSecret
- } from '@/common/setting'
- import {
- Base64
- } from '@/utils/base64.js';
- import {
- fileUrlConvert
- } from "@/subPackage/patrol/util/fileUtil.js"
- import {
- add
- } from "@/api/feedback/feedback.js"
- export default {
- components: {
- card,
- },
- data() {
- return {
- form: {
- images: [],
- content: "",
- // phone: "",
- },
- rules: {
- 'content': {
- required: true,
- message: '请输入说明',
- trigger: ['blur', 'change']
- },
- },
- uploadConfig: {
- acceptImg: "image",
- acceptVideo: 'video',
- capture: ['album', 'camera'],
- multiple: true,
- maxCount: "5",
- previewFullImage: true,
- uploadText: "上传中",
- url: devUrl + "/api/blade-resource/oss/endpoint/put-file-attach",
- header: {},
- },
- }
- },
- created() {
-
- },
- mounted() {
- this.getHeader()
- },
- onLoad(option) {
-
- },
- onShow() {
-
- },
- methods: {
- //获取头部
- getHeader() {
- let accessToken = uni.getStorageSync('accessToken');
- let myHeader = {}
- if (accessToken) {
- myHeader['Blade-Auth'] = 'bearer ' + accessToken;
- }
- // 客户端认证参数
- myHeader['Authorization'] = 'Basic ' + Base64.encode(clientId + ':' + clientSecret);
- this.header = myHeader
- this.uploadConfig.header = myHeader
- },
- //上传方法
- uploadFilePromise(url) {
- return new Promise((resolve, reject) => {
- let a = uni.uploadFile({
- url: this.uploadConfig.url, //接口地址
- filePath: url,
- name: 'file',
- header: this.uploadConfig.header,
- success: (res) => {
- let data = JSON.parse(res.data)
- setTimeout(() => {
- resolve(data)
- }, 1000)
- }
- });
- })
- },
-
- //读取后的处理函数
- async afterReadImg(event) {
- this.showLoading()
-
- // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
- let lists = [].concat(event.file)
- let fileListLen = this.form.images.length
- lists.map((item) => {
- this.form.images.push({
- ...item,
- status: 'uploading',
- message: '上传中'
- })
- })
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url)
- this.form.images.splice(fileListLen, 1, Object.assign({}, {
- url: fileUrlConvert(result.data.link)
- }))
- fileListLen++
- }
- this.loadingClose()
-
- },
- showLoading() {
- uni.showLoading({
- mask: true,
- title: '上传中'
- })
- },
- loadingClose() {
- uni.hideLoading()
- },
- //删除图片
- deletePic(event) {
- this.form.images.splice(event.index, 1)
- },
- //15841602118
- submit() {
- this.$refs.form.validate().then(valid => {
-
- if (this.form.images.length == 0) {
- this.form.images = undefined
- }
- add(this.form).then(res => {
- this.$u.func.showToast({
- title: "反馈成功",
- back: true
- })
- })
- })
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- .container {
- overflow: hidden;
- padding: 0 14rpx;
- }
-
- .card {
- .content {
- // padding: 0 30rpx;
- }
-
- .image {
- width: 100rpx;
- height: 100rpx;
- }
- }
-
- .btn {
- padding: 0 20rpx;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/user/components/uni-collapse/changelog.md b/subPackage/user/components/uni-collapse/changelog.md
deleted file mode 100644
index 292e4c7..0000000
--- a/subPackage/user/components/uni-collapse/changelog.md
+++ /dev/null
@@ -1,36 +0,0 @@
-## 1.4.3(2022-01-25)
-- 修复 初始化的时候 ,open 属性失效的bug
-## 1.4.2(2022-01-21)
-- 修复 微信小程序resize后组件收起的bug
-## 1.4.1(2021-11-22)
-- 修复 vue3中个别scss变量无法找到的问题
-## 1.4.0(2021-11-19)
-- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
-- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-collapse](https://uniapp.dcloud.io/component/uniui/uni-collapse)
-## 1.3.3(2021-08-17)
-- 优化 show-arrow 属性默认为true
-## 1.3.2(2021-08-17)
-- 新增 show-arrow 属性,控制是否显示右侧箭头
-## 1.3.1(2021-07-30)
-- 优化 vue3下小程序事件警告的问题
-## 1.3.0(2021-07-30)
-- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
-## 1.2.2(2021-07-21)
-- 修复 由1.2.0版本引起的 change 事件返回 undefined 的Bug
-## 1.2.1(2021-07-21)
-- 优化 组件示例
-## 1.2.0(2021-07-21)
-- 新增 组件折叠动画
-- 新增 value\v-model 属性 ,动态修改面板折叠状态
-- 新增 title 插槽 ,可定义面板标题
-- 新增 border 属性 ,显示隐藏面板内容分隔线
-- 新增 title-border 属性 ,显示隐藏面板标题分隔线
-- 修复 resize 方法失效的Bug
-- 修复 change 事件返回参数不正确的Bug
-- 优化 H5、App 平台自动更具内容更新高度,无需调用 reszie() 方法
-## 1.1.7(2021-05-12)
-- 新增 组件示例地址
-## 1.1.6(2021-02-05)
-- 优化 组件引用关系,通过uni_modules引用组件
-## 1.1.5(2021-02-05)
-- 调整为uni_modules目录规范
\ No newline at end of file
diff --git a/subPackage/user/components/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue b/subPackage/user/components/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue
deleted file mode 100644
index 4016e2b..0000000
--- a/subPackage/user/components/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue
+++ /dev/null
@@ -1,406 +0,0 @@
-<template>
- <view class="uni-collapse-item">
- <!-- onClick(!isOpen) -->
- <view @click="onClick(!isOpen)" class="uni-collapse-item__title"
- :class="{'is-open':isOpen &&titleBorder === 'auto' ,'uni-collapse-item-border':titleBorder !== 'none'}">
- <view class="uni-collapse-item__title-wrap">
- <slot name="title">
- <view class="uni-collapse-item__title-box" :class="{'is-disabled':disabled}">
- <image v-if="thumb" :src="thumb" class="uni-collapse-item__title-img" />
- <text class="uni-collapse-item__title-text">{{ title }}</text>
- </view>
- </slot>
- </view>
- <view v-if="showArrow"
- :class="{ 'uni-collapse-item__title-arrow-active': isOpen, 'uni-collapse-item--animation': showAnimation === true }"
- class="uni-collapse-item__title-arrow">
- <uni-icons :color="disabled?'#ddd':'#bbb'" size="14" type="bottom" />
- </view>
- </view>
- <view class="uni-collapse-item__wrap" :class="{'is--transition':showAnimation}"
- :style="{height: (isOpen?height:0) +'px'}">
- <view :id="elId" ref="collapse--hook" class="uni-collapse-item__wrap-content"
- :class="{open:isheight,'uni-collapse-item--border':border&&isOpen}">
- <slot></slot>
- </view>
- </view>
-
- </view>
-</template>
-
-<script>
- // #ifdef APP-NVUE
- const dom = weex.requireModule('dom')
- // #endif
- /**
- * CollapseItem 折叠面板子组件
- * @description 折叠面板子组件
- * @property {String} title 标题文字
- * @property {String} thumb 标题左侧缩略图
- * @property {String} name 唯一标志符
- * @property {Boolean} open = [true|false] 是否展开组件
- * @property {Boolean} titleBorder = [true|false] 是否显示标题分隔线
- * @property {Boolean} border = [true|false] 是否显示分隔线
- * @property {Boolean} disabled = [true|false] 是否展开面板
- * @property {Boolean} showAnimation = [true|false] 开启动画
- * @property {Boolean} showArrow = [true|false] 是否显示右侧箭头
- */
- import uniIcons from "@/subPackage/user/components/uni-icons/components/uni-icons/uni-icons.vue"
- export default {
- components: {
- uniIcons
- },
- name: 'uniCollapseItem',
- props: {
- // 列表标题
- title: {
- type: String,
- default: ''
- },
- name: {
- type: [Number, String],
- default: ''
- },
- // 是否禁用
- disabled: {
- type: Boolean,
- default: false
- },
- // #ifdef APP-PLUS
- // 是否显示动画,app 端默认不开启动画,卡顿严重
- showAnimation: {
- type: Boolean,
- default: false
- },
- // #endif
- // #ifndef APP-PLUS
- // 是否显示动画
- showAnimation: {
- type: Boolean,
- default: true
- },
- // #endif
- // 是否展开
- open: {
- type: Boolean,
- default: false
- },
- // 缩略图
- thumb: {
- type: String,
- default: ''
- },
- // 标题分隔线显示类型
- titleBorder: {
- type: String,
- default: 'auto'
- },
- border: {
- type: Boolean,
- default: true
- },
- showArrow: {
- type: Boolean,
- default: true
- }
- },
- data() {
- // TODO 随机生生元素ID,解决百度小程序获取同一个元素位置信息的bug
- const elId = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`
- return {
- isOpen: false,
- isheight: null,
- height: 0,
- elId,
- nameSync: 0
- }
- },
- watch: {
- open(val) {
- this.isOpen = val
- this.onClick(val, 'init')
- }
- },
- updated(e) {
- this.$nextTick(() => {
- this.init(true)
- })
- },
- created() {
- this.collapse = this.getCollapse()
- this.oldHeight = 0
- this.onClick(this.open, 'init')
- },
- // #ifndef VUE3
- // TODO vue2
- destroyed() {
- if (this.__isUnmounted) return
- this.uninstall()
- },
- // #endif
- // #ifdef VUE3
- // TODO vue3
- unmounted() {
- this.__isUnmounted = true
- this.uninstall()
- },
- // #endif
- mounted() {
- if (!this.collapse) return
- if (this.name !== '') {
- this.nameSync = this.name
- } else {
- this.nameSync = this.collapse.childrens.length + ''
- }
- if (this.collapse.names.indexOf(this.nameSync) === -1) {
- this.collapse.names.push(this.nameSync)
- } else {
- console.warn(`name 值 ${this.nameSync} 重复`);
- }
- if (this.collapse.childrens.indexOf(this) === -1) {
- this.collapse.childrens.push(this)
- }
- this.init()
- },
- methods: {
- init(type) {
- // #ifndef APP-NVUE
- this.getCollapseHeight(type)
- // #endif
- // #ifdef APP-NVUE
- this.getNvueHwight(type)
- // #endif
- },
- uninstall() {
- if (this.collapse) {
- this.collapse.childrens.forEach((item, index) => {
- if (item === this) {
- this.collapse.childrens.splice(index, 1)
- }
- })
- this.collapse.names.forEach((item, index) => {
- if (item === this.nameSync) {
- this.collapse.names.splice(index, 1)
- }
- })
- }
- },
- onClick(isOpen, type) {
- if (this.disabled) return
- this.isOpen = isOpen
- if (this.isOpen && this.collapse) {
- this.collapse.setAccordion(this)
- }
- if (type !== 'init') {
- this.collapse.onChange(isOpen, this)
- }
- },
- getCollapseHeight(type, index = 0) {
- const views = uni.createSelectorQuery().in(this)
- views
- .select(`#${this.elId}`)
- .fields({
- size: true
- }, data => {
- // TODO 百度中可能获取不到节点信息 ,需要循环获取
- if (index >= 10) return
- if (!data) {
- index++
- this.getCollapseHeight(false, index)
- return
- }
- // #ifdef APP-NVUE
- this.height = data.height + 1
- // #endif
- // #ifndef APP-NVUE
- this.height = data.height
- // #endif
- this.isheight = true
- if (type) return
- this.onClick(this.isOpen, 'init')
- })
- .exec()
- },
- getNvueHwight(type) {
- const result = dom.getComponentRect(this.$refs['collapse--hook'], option => {
- if (option && option.result && option.size) {
- // #ifdef APP-NVUE
- this.height = option.size.height + 1
- // #endif
- // #ifndef APP-NVUE
- this.height = option.size.height
- // #endif
- this.isheight = true
- if (type) return
- this.onClick(this.open, 'init')
- }
- })
- },
- /**
- * 获取父元素实例
- */
- getCollapse(name = 'uniCollapse') {
- let parent = this.$parent;
- let parentName = parent.$options.name;
- while (parentName !== name) {
- parent = parent.$parent;
- if (!parent) return false;
- parentName = parent.$options.name;
- }
- return parent;
- }
- }
- }
-</script>
-
-<style lang="scss">
- .uni-collapse-item {
- /* #ifndef APP-NVUE */
- box-sizing: border-box;
-
- /* #endif */
- &__title {
- /* #ifndef APP-NVUE */
- display: flex;
- width: 100%;
- box-sizing: border-box;
- /* #endif */
- flex-direction: row;
- align-items: center;
- transition: border-bottom-color .3s;
-
- // transition-property: border-bottom-color;
- // transition-duration: 5s;
- &-wrap {
- width: 100%;
- flex: 1;
-
- }
-
- &-box {
- padding: 0 15px;
- /* #ifndef APP-NVUE */
- display: flex;
- width: 100%;
- box-sizing: border-box;
- /* #endif */
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- height: 48px;
- line-height: 48px;
- background-color: #fff;
- color: #303133;
- font-size: 13px;
- font-weight: 500;
- /* #ifdef H5 */
- cursor: pointer;
- outline: none;
-
- /* #endif */
- &.is-disabled {
- .uni-collapse-item__title-text {
- color: #999;
- }
- }
-
- }
-
- &.uni-collapse-item-border {
- border-bottom: 1px solid #ebeef5;
- }
-
- &.is-open {
- border-bottom-color: transparent;
- }
-
- &-img {
- height: 22px;
- width: 22px;
- margin-right: 10px;
- }
-
- &-text {
- flex: 1;
- font-size: 14px;
- /* #ifndef APP-NVUE */
- white-space: nowrap;
- color: inherit;
- /* #endif */
- /* #ifdef APP-NVUE */
- lines: 1;
- /* #endif */
- overflow: hidden;
- text-overflow: ellipsis;
- }
-
- &-arrow {
- /* #ifndef APP-NVUE */
- display: flex;
- box-sizing: border-box;
- /* #endif */
- align-items: center;
- justify-content: center;
- width: 20px;
- height: 20px;
- margin-right: 10px;
- transform: rotate(0deg);
-
- &-active {
- transform: rotate(-180deg);
- }
- }
-
-
- }
-
- &__wrap {
- /* #ifndef APP-NVUE */
- will-change: height;
- box-sizing: border-box;
- /* #endif */
- background-color: #fff;
- overflow: hidden;
- position: relative;
- height: 0;
-
- &.is--transition {
- // transition: all 0.3s;
- transition-property: height, border-bottom-width;
- transition-duration: 0.3s;
- /* #ifndef APP-NVUE */
- will-change: height;
- /* #endif */
- }
-
-
-
- &-content {
- position: absolute;
- font-size: 13px;
- color: #303133;
- // transition: height 0.3s;
- border-bottom-color: transparent;
- border-bottom-style: solid;
- border-bottom-width: 0;
-
- &.uni-collapse-item--border {
- border-bottom-width: 1px;
- border-bottom-color: red;
- border-bottom-color: #ebeef5;
- }
-
- &.open {
- position: relative;
- }
- }
- }
-
- &--animation {
- transition-property: transform;
- transition-duration: 0.3s;
- transition-timing-function: ease;
- }
-
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/user/components/uni-collapse/components/uni-collapse/uni-collapse.vue b/subPackage/user/components/uni-collapse/components/uni-collapse/uni-collapse.vue
deleted file mode 100644
index 384c39a..0000000
--- a/subPackage/user/components/uni-collapse/components/uni-collapse/uni-collapse.vue
+++ /dev/null
@@ -1,147 +0,0 @@
-<template>
- <view class="uni-collapse">
- <slot />
- </view>
-</template>
-<script>
- /**
- * Collapse 折叠面板
- * @description 展示可以折叠 / 展开的内容区域
- * @tutorial https://ext.dcloud.net.cn/plugin?id=23
- * @property {String|Array} value 当前激活面板改变时触发(如果是手风琴模式,参数类型为string,否则为array)
- * @property {Boolean} accordion = [true|false] 是否开启手风琴效果是否开启手风琴效果
- * @event {Function} change 切换面板时触发,如果是手风琴模式,返回类型为string,否则为array
- */
- export default {
- name: 'uniCollapse',
- emits:['change','activeItem','input','update:modelValue'],
- props: {
- value: {
- type: [String, Array],
- default: ''
- },
- modelValue: {
- type: [String, Array],
- default: ''
- },
- accordion: {
- // 是否开启手风琴效果
- type: [Boolean, String],
- default: false
- },
- },
- data() {
- return {}
- },
- computed: {
- // TODO 兼容 vue2 和 vue3
- dataValue() {
- let value = (typeof this.value === 'string' && this.value === '') ||
- (Array.isArray(this.value) && this.value.length === 0)
- let modelValue = (typeof this.modelValue === 'string' && this.modelValue === '') ||
- (Array.isArray(this.modelValue) && this.modelValue.length === 0)
- if (value) {
- return this.modelValue
- }
- if (modelValue) {
- return this.value
- }
-
- return this.value
- }
- },
- watch: {
- dataValue(val) {
- this.setOpen(val)
- }
- },
- created() {
- this.childrens = []
- this.names = []
- },
- mounted() {
- this.$nextTick(()=>{
- this.setOpen(this.dataValue)
- })
- },
- methods: {
- setOpen(val) {
- let str = typeof val === 'string'
- let arr = Array.isArray(val)
- this.childrens.forEach((vm, index) => {
- if (str) {
- if (val === vm.nameSync) {
- if (!this.accordion) {
- console.warn('accordion 属性为 false ,v-model 类型应该为 array')
- return
- }
- vm.isOpen = true
- }
- }
- if (arr) {
- val.forEach(v => {
- if (v === vm.nameSync) {
- if (this.accordion) {
- console.warn('accordion 属性为 true ,v-model 类型应该为 string')
- return
- }
- vm.isOpen = true
- }
- })
- }
- })
- this.emit(val)
- },
- setAccordion(self) {
- if (!this.accordion) return
- this.childrens.forEach((vm, index) => {
- if (self !== vm) {
- vm.isOpen = false
- }
- })
- },
- resize() {
- this.childrens.forEach((vm, index) => {
- // #ifndef APP-NVUE
- vm.getCollapseHeight()
- // #endif
- // #ifdef APP-NVUE
- vm.getNvueHwight()
- // #endif
- })
- },
- onChange(isOpen, self) {
- let activeItem = []
-
- if (this.accordion) {
- activeItem = isOpen ? self.nameSync : ''
- } else {
- this.childrens.forEach((vm, index) => {
- if (vm.isOpen) {
- activeItem.push(vm.nameSync)
- }
- })
- }
- this.$emit('change', activeItem)
- this.emit(activeItem)
- },
- emit(val){
- this.$emit('input', val)
- this.$emit('update:modelValue', val)
- }
- }
- }
-</script>
-<style lang="scss" >
- .uni-collapse {
- /* #ifndef APP-NVUE */
- width: 100%;
- display: flex;
- /* #endif */
- /* #ifdef APP-NVUE */
- flex: 1;
- /* #endif */
- flex-direction: column;
- background-color: #fff;
- }
-</style>
diff --git a/subPackage/user/components/uni-collapse/components/uni-icons/changelog.md b/subPackage/user/components/uni-collapse/components/uni-icons/changelog.md
deleted file mode 100644
index 6449885..0000000
--- a/subPackage/user/components/uni-collapse/components/uni-icons/changelog.md
+++ /dev/null
@@ -1,22 +0,0 @@
-## 1.3.5(2022-01-24)
-- 优化 size 属性可以传入不带单位的字符串数值
-## 1.3.4(2022-01-24)
-- 优化 size 支持其他单位
-## 1.3.3(2022-01-17)
-- 修复 nvue 有些图标不显示的bug,兼容老版本图标
-## 1.3.2(2021-12-01)
-- 优化 示例可复制图标名称
-## 1.3.1(2021-11-23)
-- 优化 兼容旧组件 type 值
-## 1.3.0(2021-11-19)
-- 新增 更多图标
-- 优化 自定义图标使用方式
-- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
-- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons)
-## 1.1.7(2021-11-08)
-## 1.2.0(2021-07-30)
-- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
-## 1.1.5(2021-05-12)
-- 新增 组件示例地址
-## 1.1.4(2021-02-05)
-- 调整为uni_modules目录规范
diff --git a/subPackage/user/components/uni-collapse/components/uni-icons/components/uni-icons/icons.js b/subPackage/user/components/uni-collapse/components/uni-icons/components/uni-icons/icons.js
deleted file mode 100644
index 7889936..0000000
--- a/subPackage/user/components/uni-collapse/components/uni-icons/components/uni-icons/icons.js
+++ /dev/null
@@ -1,1169 +0,0 @@
-export default {
- "id": "2852637",
- "name": "uniui图标库",
- "font_family": "uniicons",
- "css_prefix_text": "uniui-",
- "description": "",
- "glyphs": [
- {
- "icon_id": "25027049",
- "name": "yanse",
- "font_class": "color",
- "unicode": "e6cf",
- "unicode_decimal": 59087
- },
- {
- "icon_id": "25027048",
- "name": "wallet",
- "font_class": "wallet",
- "unicode": "e6b1",
- "unicode_decimal": 59057
- },
- {
- "icon_id": "25015720",
- "name": "settings-filled",
- "font_class": "settings-filled",
- "unicode": "e6ce",
- "unicode_decimal": 59086
- },
- {
- "icon_id": "25015434",
- "name": "shimingrenzheng-filled",
- "font_class": "auth-filled",
- "unicode": "e6cc",
- "unicode_decimal": 59084
- },
- {
- "icon_id": "24934246",
- "name": "shop-filled",
- "font_class": "shop-filled",
- "unicode": "e6cd",
- "unicode_decimal": 59085
- },
- {
- "icon_id": "24934159",
- "name": "staff-filled-01",
- "font_class": "staff-filled",
- "unicode": "e6cb",
- "unicode_decimal": 59083
- },
- {
- "icon_id": "24932461",
- "name": "VIP-filled",
- "font_class": "vip-filled",
- "unicode": "e6c6",
- "unicode_decimal": 59078
- },
- {
- "icon_id": "24932462",
- "name": "plus_circle_fill",
- "font_class": "plus-filled",
- "unicode": "e6c7",
- "unicode_decimal": 59079
- },
- {
- "icon_id": "24932463",
- "name": "folder_add-filled",
- "font_class": "folder-add-filled",
- "unicode": "e6c8",
- "unicode_decimal": 59080
- },
- {
- "icon_id": "24932464",
- "name": "yanse-filled",
- "font_class": "color-filled",
- "unicode": "e6c9",
- "unicode_decimal": 59081
- },
- {
- "icon_id": "24932465",
- "name": "tune-filled",
- "font_class": "tune-filled",
- "unicode": "e6ca",
- "unicode_decimal": 59082
- },
- {
- "icon_id": "24932455",
- "name": "a-rilidaka-filled",
- "font_class": "calendar-filled",
- "unicode": "e6c0",
- "unicode_decimal": 59072
- },
- {
- "icon_id": "24932456",
- "name": "notification-filled",
- "font_class": "notification-filled",
- "unicode": "e6c1",
- "unicode_decimal": 59073
- },
- {
- "icon_id": "24932457",
- "name": "wallet-filled",
- "font_class": "wallet-filled",
- "unicode": "e6c2",
- "unicode_decimal": 59074
- },
- {
- "icon_id": "24932458",
- "name": "paihangbang-filled",
- "font_class": "medal-filled",
- "unicode": "e6c3",
- "unicode_decimal": 59075
- },
- {
- "icon_id": "24932459",
- "name": "gift-filled",
- "font_class": "gift-filled",
- "unicode": "e6c4",
- "unicode_decimal": 59076
- },
- {
- "icon_id": "24932460",
- "name": "fire-filled",
- "font_class": "fire-filled",
- "unicode": "e6c5",
- "unicode_decimal": 59077
- },
- {
- "icon_id": "24928001",
- "name": "refreshempty",
- "font_class": "refreshempty",
- "unicode": "e6bf",
- "unicode_decimal": 59071
- },
- {
- "icon_id": "24926853",
- "name": "location-ellipse",
- "font_class": "location-filled",
- "unicode": "e6af",
- "unicode_decimal": 59055
- },
- {
- "icon_id": "24926735",
- "name": "person-filled",
- "font_class": "person-filled",
- "unicode": "e69d",
- "unicode_decimal": 59037
- },
- {
- "icon_id": "24926703",
- "name": "personadd-filled",
- "font_class": "personadd-filled",
- "unicode": "e698",
- "unicode_decimal": 59032
- },
- {
- "icon_id": "24923351",
- "name": "back",
- "font_class": "back",
- "unicode": "e6b9",
- "unicode_decimal": 59065
- },
- {
- "icon_id": "24923352",
- "name": "forward",
- "font_class": "forward",
- "unicode": "e6ba",
- "unicode_decimal": 59066
- },
- {
- "icon_id": "24923353",
- "name": "arrowthinright",
- "font_class": "arrow-right",
- "unicode": "e6bb",
- "unicode_decimal": 59067
- },
- {
- "icon_id": "24923353",
- "name": "arrowthinright",
- "font_class": "arrowthinright",
- "unicode": "e6bb",
- "unicode_decimal": 59067
- },
- {
- "icon_id": "24923354",
- "name": "arrowthinleft",
- "font_class": "arrow-left",
- "unicode": "e6bc",
- "unicode_decimal": 59068
- },
- {
- "icon_id": "24923354",
- "name": "arrowthinleft",
- "font_class": "arrowthinleft",
- "unicode": "e6bc",
- "unicode_decimal": 59068
- },
- {
- "icon_id": "24923355",
- "name": "arrowthinup",
- "font_class": "arrow-up",
- "unicode": "e6bd",
- "unicode_decimal": 59069
- },
- {
- "icon_id": "24923355",
- "name": "arrowthinup",
- "font_class": "arrowthinup",
- "unicode": "e6bd",
- "unicode_decimal": 59069
- },
- {
- "icon_id": "24923356",
- "name": "arrowthindown",
- "font_class": "arrow-down",
- "unicode": "e6be",
- "unicode_decimal": 59070
- },{
- "icon_id": "24923356",
- "name": "arrowthindown",
- "font_class": "arrowthindown",
- "unicode": "e6be",
- "unicode_decimal": 59070
- },
- {
- "icon_id": "24923349",
- "name": "arrowdown",
- "font_class": "bottom",
- "unicode": "e6b8",
- "unicode_decimal": 59064
- },{
- "icon_id": "24923349",
- "name": "arrowdown",
- "font_class": "arrowdown",
- "unicode": "e6b8",
- "unicode_decimal": 59064
- },
- {
- "icon_id": "24923346",
- "name": "arrowright",
- "font_class": "right",
- "unicode": "e6b5",
- "unicode_decimal": 59061
- },
- {
- "icon_id": "24923346",
- "name": "arrowright",
- "font_class": "arrowright",
- "unicode": "e6b5",
- "unicode_decimal": 59061
- },
- {
- "icon_id": "24923347",
- "name": "arrowup",
- "font_class": "top",
- "unicode": "e6b6",
- "unicode_decimal": 59062
- },
- {
- "icon_id": "24923347",
- "name": "arrowup",
- "font_class": "arrowup",
- "unicode": "e6b6",
- "unicode_decimal": 59062
- },
- {
- "icon_id": "24923348",
- "name": "arrowleft",
- "font_class": "left",
- "unicode": "e6b7",
- "unicode_decimal": 59063
- },
- {
- "icon_id": "24923348",
- "name": "arrowleft",
- "font_class": "arrowleft",
- "unicode": "e6b7",
- "unicode_decimal": 59063
- },
- {
- "icon_id": "24923334",
- "name": "eye",
- "font_class": "eye",
- "unicode": "e651",
- "unicode_decimal": 58961
- },
- {
- "icon_id": "24923335",
- "name": "eye-filled",
- "font_class": "eye-filled",
- "unicode": "e66a",
- "unicode_decimal": 58986
- },
- {
- "icon_id": "24923336",
- "name": "eye-slash",
- "font_class": "eye-slash",
- "unicode": "e6b3",
- "unicode_decimal": 59059
- },
- {
- "icon_id": "24923337",
- "name": "eye-slash-filled",
- "font_class": "eye-slash-filled",
- "unicode": "e6b4",
- "unicode_decimal": 59060
- },
- {
- "icon_id": "24923305",
- "name": "info-filled",
- "font_class": "info-filled",
- "unicode": "e649",
- "unicode_decimal": 58953
- },
- {
- "icon_id": "24923299",
- "name": "reload-01",
- "font_class": "reload",
- "unicode": "e6b2",
- "unicode_decimal": 59058
- },
- {
- "icon_id": "24923195",
- "name": "mic_slash_fill",
- "font_class": "micoff-filled",
- "unicode": "e6b0",
- "unicode_decimal": 59056
- },
- {
- "icon_id": "24923165",
- "name": "map-pin-ellipse",
- "font_class": "map-pin-ellipse",
- "unicode": "e6ac",
- "unicode_decimal": 59052
- },
- {
- "icon_id": "24923166",
- "name": "map-pin",
- "font_class": "map-pin",
- "unicode": "e6ad",
- "unicode_decimal": 59053
- },
- {
- "icon_id": "24923167",
- "name": "location",
- "font_class": "location",
- "unicode": "e6ae",
- "unicode_decimal": 59054
- },
- {
- "icon_id": "24923064",
- "name": "starhalf",
- "font_class": "starhalf",
- "unicode": "e683",
- "unicode_decimal": 59011
- },
- {
- "icon_id": "24923065",
- "name": "star",
- "font_class": "star",
- "unicode": "e688",
- "unicode_decimal": 59016
- },
- {
- "icon_id": "24923066",
- "name": "star-filled",
- "font_class": "star-filled",
- "unicode": "e68f",
- "unicode_decimal": 59023
- },
- {
- "icon_id": "24899646",
- "name": "a-rilidaka",
- "font_class": "calendar",
- "unicode": "e6a0",
- "unicode_decimal": 59040
- },
- {
- "icon_id": "24899647",
- "name": "fire",
- "font_class": "fire",
- "unicode": "e6a1",
- "unicode_decimal": 59041
- },
- {
- "icon_id": "24899648",
- "name": "paihangbang",
- "font_class": "medal",
- "unicode": "e6a2",
- "unicode_decimal": 59042
- },
- {
- "icon_id": "24899649",
- "name": "font",
- "font_class": "font",
- "unicode": "e6a3",
- "unicode_decimal": 59043
- },
- {
- "icon_id": "24899650",
- "name": "gift",
- "font_class": "gift",
- "unicode": "e6a4",
- "unicode_decimal": 59044
- },
- {
- "icon_id": "24899651",
- "name": "link",
- "font_class": "link",
- "unicode": "e6a5",
- "unicode_decimal": 59045
- },
- {
- "icon_id": "24899652",
- "name": "notification",
- "font_class": "notification",
- "unicode": "e6a6",
- "unicode_decimal": 59046
- },
- {
- "icon_id": "24899653",
- "name": "staff",
- "font_class": "staff",
- "unicode": "e6a7",
- "unicode_decimal": 59047
- },
- {
- "icon_id": "24899654",
- "name": "VIP",
- "font_class": "vip",
- "unicode": "e6a8",
- "unicode_decimal": 59048
- },
- {
- "icon_id": "24899655",
- "name": "folder_add",
- "font_class": "folder-add",
- "unicode": "e6a9",
- "unicode_decimal": 59049
- },
- {
- "icon_id": "24899656",
- "name": "tune",
- "font_class": "tune",
- "unicode": "e6aa",
- "unicode_decimal": 59050
- },
- {
- "icon_id": "24899657",
- "name": "shimingrenzheng",
- "font_class": "auth",
- "unicode": "e6ab",
- "unicode_decimal": 59051
- },
- {
- "icon_id": "24899565",
- "name": "person",
- "font_class": "person",
- "unicode": "e699",
- "unicode_decimal": 59033
- },
- {
- "icon_id": "24899566",
- "name": "email-filled",
- "font_class": "email-filled",
- "unicode": "e69a",
- "unicode_decimal": 59034
- },
- {
- "icon_id": "24899567",
- "name": "phone-filled",
- "font_class": "phone-filled",
- "unicode": "e69b",
- "unicode_decimal": 59035
- },
- {
- "icon_id": "24899568",
- "name": "phone",
- "font_class": "phone",
- "unicode": "e69c",
- "unicode_decimal": 59036
- },
- {
- "icon_id": "24899570",
- "name": "email",
- "font_class": "email",
- "unicode": "e69e",
- "unicode_decimal": 59038
- },
- {
- "icon_id": "24899571",
- "name": "personadd",
- "font_class": "personadd",
- "unicode": "e69f",
- "unicode_decimal": 59039
- },
- {
- "icon_id": "24899558",
- "name": "chatboxes-filled",
- "font_class": "chatboxes-filled",
- "unicode": "e692",
- "unicode_decimal": 59026
- },
- {
- "icon_id": "24899559",
- "name": "contact",
- "font_class": "contact",
- "unicode": "e693",
- "unicode_decimal": 59027
- },
- {
- "icon_id": "24899560",
- "name": "chatbubble-filled",
- "font_class": "chatbubble-filled",
- "unicode": "e694",
- "unicode_decimal": 59028
- },
- {
- "icon_id": "24899561",
- "name": "contact-filled",
- "font_class": "contact-filled",
- "unicode": "e695",
- "unicode_decimal": 59029
- },
- {
- "icon_id": "24899562",
- "name": "chatboxes",
- "font_class": "chatboxes",
- "unicode": "e696",
- "unicode_decimal": 59030
- },
- {
- "icon_id": "24899563",
- "name": "chatbubble",
- "font_class": "chatbubble",
- "unicode": "e697",
- "unicode_decimal": 59031
- },
- {
- "icon_id": "24881290",
- "name": "upload-filled",
- "font_class": "upload-filled",
- "unicode": "e68e",
- "unicode_decimal": 59022
- },
- {
- "icon_id": "24881292",
- "name": "upload",
- "font_class": "upload",
- "unicode": "e690",
- "unicode_decimal": 59024
- },
- {
- "icon_id": "24881293",
- "name": "weixin",
- "font_class": "weixin",
- "unicode": "e691",
- "unicode_decimal": 59025
- },
- {
- "icon_id": "24881274",
- "name": "compose",
- "font_class": "compose",
- "unicode": "e67f",
- "unicode_decimal": 59007
- },
- {
- "icon_id": "24881275",
- "name": "qq",
- "font_class": "qq",
- "unicode": "e680",
- "unicode_decimal": 59008
- },
- {
- "icon_id": "24881276",
- "name": "download-filled",
- "font_class": "download-filled",
- "unicode": "e681",
- "unicode_decimal": 59009
- },
- {
- "icon_id": "24881277",
- "name": "pengyouquan",
- "font_class": "pyq",
- "unicode": "e682",
- "unicode_decimal": 59010
- },
- {
- "icon_id": "24881279",
- "name": "sound",
- "font_class": "sound",
- "unicode": "e684",
- "unicode_decimal": 59012
- },
- {
- "icon_id": "24881280",
- "name": "trash-filled",
- "font_class": "trash-filled",
- "unicode": "e685",
- "unicode_decimal": 59013
- },
- {
- "icon_id": "24881281",
- "name": "sound-filled",
- "font_class": "sound-filled",
- "unicode": "e686",
- "unicode_decimal": 59014
- },
- {
- "icon_id": "24881282",
- "name": "trash",
- "font_class": "trash",
- "unicode": "e687",
- "unicode_decimal": 59015
- },
- {
- "icon_id": "24881284",
- "name": "videocam-filled",
- "font_class": "videocam-filled",
- "unicode": "e689",
- "unicode_decimal": 59017
- },
- {
- "icon_id": "24881285",
- "name": "spinner-cycle",
- "font_class": "spinner-cycle",
- "unicode": "e68a",
- "unicode_decimal": 59018
- },
- {
- "icon_id": "24881286",
- "name": "weibo",
- "font_class": "weibo",
- "unicode": "e68b",
- "unicode_decimal": 59019
- },
- {
- "icon_id": "24881288",
- "name": "videocam",
- "font_class": "videocam",
- "unicode": "e68c",
- "unicode_decimal": 59020
- },
- {
- "icon_id": "24881289",
- "name": "download",
- "font_class": "download",
- "unicode": "e68d",
- "unicode_decimal": 59021
- },
- {
- "icon_id": "24879601",
- "name": "help",
- "font_class": "help",
- "unicode": "e679",
- "unicode_decimal": 59001
- },
- {
- "icon_id": "24879602",
- "name": "navigate-filled",
- "font_class": "navigate-filled",
- "unicode": "e67a",
- "unicode_decimal": 59002
- },
- {
- "icon_id": "24879603",
- "name": "plusempty",
- "font_class": "plusempty",
- "unicode": "e67b",
- "unicode_decimal": 59003
- },
- {
- "icon_id": "24879604",
- "name": "smallcircle",
- "font_class": "smallcircle",
- "unicode": "e67c",
- "unicode_decimal": 59004
- },
- {
- "icon_id": "24879605",
- "name": "minus-filled",
- "font_class": "minus-filled",
- "unicode": "e67d",
- "unicode_decimal": 59005
- },
- {
- "icon_id": "24879606",
- "name": "micoff",
- "font_class": "micoff",
- "unicode": "e67e",
- "unicode_decimal": 59006
- },
- {
- "icon_id": "24879588",
- "name": "closeempty",
- "font_class": "closeempty",
- "unicode": "e66c",
- "unicode_decimal": 58988
- },
- {
- "icon_id": "24879589",
- "name": "clear",
- "font_class": "clear",
- "unicode": "e66d",
- "unicode_decimal": 58989
- },
- {
- "icon_id": "24879590",
- "name": "navigate",
- "font_class": "navigate",
- "unicode": "e66e",
- "unicode_decimal": 58990
- },
- {
- "icon_id": "24879591",
- "name": "minus",
- "font_class": "minus",
- "unicode": "e66f",
- "unicode_decimal": 58991
- },
- {
- "icon_id": "24879592",
- "name": "image",
- "font_class": "image",
- "unicode": "e670",
- "unicode_decimal": 58992
- },
- {
- "icon_id": "24879593",
- "name": "mic",
- "font_class": "mic",
- "unicode": "e671",
- "unicode_decimal": 58993
- },
- {
- "icon_id": "24879594",
- "name": "paperplane",
- "font_class": "paperplane",
- "unicode": "e672",
- "unicode_decimal": 58994
- },
- {
- "icon_id": "24879595",
- "name": "close",
- "font_class": "close",
- "unicode": "e673",
- "unicode_decimal": 58995
- },
- {
- "icon_id": "24879596",
- "name": "help-filled",
- "font_class": "help-filled",
- "unicode": "e674",
- "unicode_decimal": 58996
- },
- {
- "icon_id": "24879597",
- "name": "plus-filled",
- "font_class": "paperplane-filled",
- "unicode": "e675",
- "unicode_decimal": 58997
- },
- {
- "icon_id": "24879598",
- "name": "plus",
- "font_class": "plus",
- "unicode": "e676",
- "unicode_decimal": 58998
- },
- {
- "icon_id": "24879599",
- "name": "mic-filled",
- "font_class": "mic-filled",
- "unicode": "e677",
- "unicode_decimal": 58999
- },
- {
- "icon_id": "24879600",
- "name": "image-filled",
- "font_class": "image-filled",
- "unicode": "e678",
- "unicode_decimal": 59000
- },
- {
- "icon_id": "24855900",
- "name": "locked-filled",
- "font_class": "locked-filled",
- "unicode": "e668",
- "unicode_decimal": 58984
- },
- {
- "icon_id": "24855901",
- "name": "info",
- "font_class": "info",
- "unicode": "e669",
- "unicode_decimal": 58985
- },
- {
- "icon_id": "24855903",
- "name": "locked",
- "font_class": "locked",
- "unicode": "e66b",
- "unicode_decimal": 58987
- },
- {
- "icon_id": "24855884",
- "name": "camera-filled",
- "font_class": "camera-filled",
- "unicode": "e658",
- "unicode_decimal": 58968
- },
- {
- "icon_id": "24855885",
- "name": "chat-filled",
- "font_class": "chat-filled",
- "unicode": "e659",
- "unicode_decimal": 58969
- },
- {
- "icon_id": "24855886",
- "name": "camera",
- "font_class": "camera",
- "unicode": "e65a",
- "unicode_decimal": 58970
- },
- {
- "icon_id": "24855887",
- "name": "circle",
- "font_class": "circle",
- "unicode": "e65b",
- "unicode_decimal": 58971
- },
- {
- "icon_id": "24855888",
- "name": "checkmarkempty",
- "font_class": "checkmarkempty",
- "unicode": "e65c",
- "unicode_decimal": 58972
- },
- {
- "icon_id": "24855889",
- "name": "chat",
- "font_class": "chat",
- "unicode": "e65d",
- "unicode_decimal": 58973
- },
- {
- "icon_id": "24855890",
- "name": "circle-filled",
- "font_class": "circle-filled",
- "unicode": "e65e",
- "unicode_decimal": 58974
- },
- {
- "icon_id": "24855891",
- "name": "flag",
- "font_class": "flag",
- "unicode": "e65f",
- "unicode_decimal": 58975
- },
- {
- "icon_id": "24855892",
- "name": "flag-filled",
- "font_class": "flag-filled",
- "unicode": "e660",
- "unicode_decimal": 58976
- },
- {
- "icon_id": "24855893",
- "name": "gear-filled",
- "font_class": "gear-filled",
- "unicode": "e661",
- "unicode_decimal": 58977
- },
- {
- "icon_id": "24855894",
- "name": "home",
- "font_class": "home",
- "unicode": "e662",
- "unicode_decimal": 58978
- },
- {
- "icon_id": "24855895",
- "name": "home-filled",
- "font_class": "home-filled",
- "unicode": "e663",
- "unicode_decimal": 58979
- },
- {
- "icon_id": "24855896",
- "name": "gear",
- "font_class": "gear",
- "unicode": "e664",
- "unicode_decimal": 58980
- },
- {
- "icon_id": "24855897",
- "name": "smallcircle-filled",
- "font_class": "smallcircle-filled",
- "unicode": "e665",
- "unicode_decimal": 58981
- },
- {
- "icon_id": "24855898",
- "name": "map-filled",
- "font_class": "map-filled",
- "unicode": "e666",
- "unicode_decimal": 58982
- },
- {
- "icon_id": "24855899",
- "name": "map",
- "font_class": "map",
- "unicode": "e667",
- "unicode_decimal": 58983
- },
- {
- "icon_id": "24855825",
- "name": "refresh-filled",
- "font_class": "refresh-filled",
- "unicode": "e656",
- "unicode_decimal": 58966
- },
- {
- "icon_id": "24855826",
- "name": "refresh",
- "font_class": "refresh",
- "unicode": "e657",
- "unicode_decimal": 58967
- },
- {
- "icon_id": "24855808",
- "name": "cloud-upload",
- "font_class": "cloud-upload",
- "unicode": "e645",
- "unicode_decimal": 58949
- },
- {
- "icon_id": "24855809",
- "name": "cloud-download-filled",
- "font_class": "cloud-download-filled",
- "unicode": "e646",
- "unicode_decimal": 58950
- },
- {
- "icon_id": "24855810",
- "name": "cloud-download",
- "font_class": "cloud-download",
- "unicode": "e647",
- "unicode_decimal": 58951
- },
- {
- "icon_id": "24855811",
- "name": "cloud-upload-filled",
- "font_class": "cloud-upload-filled",
- "unicode": "e648",
- "unicode_decimal": 58952
- },
- {
- "icon_id": "24855813",
- "name": "redo",
- "font_class": "redo",
- "unicode": "e64a",
- "unicode_decimal": 58954
- },
- {
- "icon_id": "24855814",
- "name": "images-filled",
- "font_class": "images-filled",
- "unicode": "e64b",
- "unicode_decimal": 58955
- },
- {
- "icon_id": "24855815",
- "name": "undo-filled",
- "font_class": "undo-filled",
- "unicode": "e64c",
- "unicode_decimal": 58956
- },
- {
- "icon_id": "24855816",
- "name": "more",
- "font_class": "more",
- "unicode": "e64d",
- "unicode_decimal": 58957
- },
- {
- "icon_id": "24855817",
- "name": "more-filled",
- "font_class": "more-filled",
- "unicode": "e64e",
- "unicode_decimal": 58958
- },
- {
- "icon_id": "24855818",
- "name": "undo",
- "font_class": "undo",
- "unicode": "e64f",
- "unicode_decimal": 58959
- },
- {
- "icon_id": "24855819",
- "name": "images",
- "font_class": "images",
- "unicode": "e650",
- "unicode_decimal": 58960
- },
- {
- "icon_id": "24855821",
- "name": "paperclip",
- "font_class": "paperclip",
- "unicode": "e652",
- "unicode_decimal": 58962
- },
- {
- "icon_id": "24855822",
- "name": "settings",
- "font_class": "settings",
- "unicode": "e653",
- "unicode_decimal": 58963
- },
- {
- "icon_id": "24855823",
- "name": "search",
- "font_class": "search",
- "unicode": "e654",
- "unicode_decimal": 58964
- },
- {
- "icon_id": "24855824",
- "name": "redo-filled",
- "font_class": "redo-filled",
- "unicode": "e655",
- "unicode_decimal": 58965
- },
- {
- "icon_id": "24841702",
- "name": "list",
- "font_class": "list",
- "unicode": "e644",
- "unicode_decimal": 58948
- },
- {
- "icon_id": "24841489",
- "name": "mail-open-filled",
- "font_class": "mail-open-filled",
- "unicode": "e63a",
- "unicode_decimal": 58938
- },
- {
- "icon_id": "24841491",
- "name": "hand-thumbsdown-filled",
- "font_class": "hand-down-filled",
- "unicode": "e63c",
- "unicode_decimal": 58940
- },
- {
- "icon_id": "24841492",
- "name": "hand-thumbsdown",
- "font_class": "hand-down",
- "unicode": "e63d",
- "unicode_decimal": 58941
- },
- {
- "icon_id": "24841493",
- "name": "hand-thumbsup-filled",
- "font_class": "hand-up-filled",
- "unicode": "e63e",
- "unicode_decimal": 58942
- },
- {
- "icon_id": "24841494",
- "name": "hand-thumbsup",
- "font_class": "hand-up",
- "unicode": "e63f",
- "unicode_decimal": 58943
- },
- {
- "icon_id": "24841496",
- "name": "heart-filled",
- "font_class": "heart-filled",
- "unicode": "e641",
- "unicode_decimal": 58945
- },
- {
- "icon_id": "24841498",
- "name": "mail-open",
- "font_class": "mail-open",
- "unicode": "e643",
- "unicode_decimal": 58947
- },
- {
- "icon_id": "24841488",
- "name": "heart",
- "font_class": "heart",
- "unicode": "e639",
- "unicode_decimal": 58937
- },
- {
- "icon_id": "24839963",
- "name": "loop",
- "font_class": "loop",
- "unicode": "e633",
- "unicode_decimal": 58931
- },
- {
- "icon_id": "24839866",
- "name": "pulldown",
- "font_class": "pulldown",
- "unicode": "e632",
- "unicode_decimal": 58930
- },
- {
- "icon_id": "24813798",
- "name": "scan",
- "font_class": "scan",
- "unicode": "e62a",
- "unicode_decimal": 58922
- },
- {
- "icon_id": "24813786",
- "name": "bars",
- "font_class": "bars",
- "unicode": "e627",
- "unicode_decimal": 58919
- },
- {
- "icon_id": "24813788",
- "name": "cart-filled",
- "font_class": "cart-filled",
- "unicode": "e629",
- "unicode_decimal": 58921
- },
- {
- "icon_id": "24813790",
- "name": "checkbox",
- "font_class": "checkbox",
- "unicode": "e62b",
- "unicode_decimal": 58923
- },
- {
- "icon_id": "24813791",
- "name": "checkbox-filled",
- "font_class": "checkbox-filled",
- "unicode": "e62c",
- "unicode_decimal": 58924
- },
- {
- "icon_id": "24813794",
- "name": "shop",
- "font_class": "shop",
- "unicode": "e62f",
- "unicode_decimal": 58927
- },
- {
- "icon_id": "24813795",
- "name": "headphones",
- "font_class": "headphones",
- "unicode": "e630",
- "unicode_decimal": 58928
- },
- {
- "icon_id": "24813796",
- "name": "cart",
- "font_class": "cart",
- "unicode": "e631",
- "unicode_decimal": 58929
- }
- ]
-}
diff --git a/subPackage/user/components/uni-collapse/components/uni-icons/components/uni-icons/uni-icons.vue b/subPackage/user/components/uni-collapse/components/uni-icons/components/uni-icons/uni-icons.vue
deleted file mode 100644
index 86e7444..0000000
--- a/subPackage/user/components/uni-collapse/components/uni-icons/components/uni-icons/uni-icons.vue
+++ /dev/null
@@ -1,96 +0,0 @@
-<template>
- <!-- #ifdef APP-NVUE -->
- <text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" @click="_onClick">{{unicode}}</text>
- <!-- #endif -->
- <!-- #ifndef APP-NVUE -->
- <text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick"></text>
- <!-- #endif -->
-</template>
-
-<script>
- import icons from './icons.js';
- const getVal = (val) => {
- const reg = /^[0-9]*$/g
- return (typeof val === 'number' || reg.test(val) )? val + 'px' : val;
- }
- // #ifdef APP-NVUE
- var domModule = weex.requireModule('dom');
- import iconUrl from './uniicons.ttf'
- domModule.addRule('fontFace', {
- 'fontFamily': "uniicons",
- 'src': "url('"+iconUrl+"')"
- });
- // #endif
-
- /**
- * Icons 图标
- * @description 用于展示 icons 图标
- * @tutorial https://ext.dcloud.net.cn/plugin?id=28
- * @property {Number} size 图标大小
- * @property {String} type 图标图案,参考示例
- * @property {String} color 图标颜色
- * @property {String} customPrefix 自定义图标
- * @event {Function} click 点击 Icon 触发事件
- */
- export default {
- name: 'UniIcons',
- emits:['click'],
- props: {
- type: {
- type: String,
- default: ''
- },
- color: {
- type: String,
- default: '#333333'
- },
- size: {
- type: [Number, String],
- default: 16
- },
- customPrefix:{
- type: String,
- default: ''
- }
- },
- data() {
- return {
- icons: icons.glyphs
- }
- },
- computed:{
- unicode(){
- let code = this.icons.find(v=>v.font_class === this.type)
- if(code){
- return unescape(`%u${code.unicode}`)
- }
- return ''
- },
- iconSize(){
- return getVal(this.size)
- }
- },
- methods: {
- _onClick() {
- this.$emit('click')
- }
- }
- }
-</script>
-
-<style lang="scss">
- /* #ifndef APP-NVUE */
- @import './uniicons.css';
- @font-face {
- font-family: uniicons;
- src: url('./uniicons.ttf') format('truetype');
- }
-
- /* #endif */
- .uni-icons {
- font-family: uniicons;
- text-decoration: none;
- text-align: center;
- }
-
-</style>
diff --git a/subPackage/user/components/uni-collapse/components/uni-icons/components/uni-icons/uni.ttf b/subPackage/user/components/uni-collapse/components/uni-icons/components/uni-icons/uni.ttf
deleted file mode 100644
index 60a1968..0000000
--- a/subPackage/user/components/uni-collapse/components/uni-icons/components/uni-icons/uni.ttf
+++ /dev/null
Binary files differ
diff --git a/subPackage/user/components/uni-collapse/components/uni-icons/components/uni-icons/uniicons.css b/subPackage/user/components/uni-collapse/components/uni-icons/components/uni-icons/uniicons.css
deleted file mode 100644
index 2f56eab..0000000
--- a/subPackage/user/components/uni-collapse/components/uni-icons/components/uni-icons/uniicons.css
+++ /dev/null
@@ -1,663 +0,0 @@
-.uniui-color:before {
- content: "\e6cf";
-}
-
-.uniui-wallet:before {
- content: "\e6b1";
-}
-
-.uniui-settings-filled:before {
- content: "\e6ce";
-}
-
-.uniui-auth-filled:before {
- content: "\e6cc";
-}
-
-.uniui-shop-filled:before {
- content: "\e6cd";
-}
-
-.uniui-staff-filled:before {
- content: "\e6cb";
-}
-
-.uniui-vip-filled:before {
- content: "\e6c6";
-}
-
-.uniui-plus-filled:before {
- content: "\e6c7";
-}
-
-.uniui-folder-add-filled:before {
- content: "\e6c8";
-}
-
-.uniui-color-filled:before {
- content: "\e6c9";
-}
-
-.uniui-tune-filled:before {
- content: "\e6ca";
-}
-
-.uniui-calendar-filled:before {
- content: "\e6c0";
-}
-
-.uniui-notification-filled:before {
- content: "\e6c1";
-}
-
-.uniui-wallet-filled:before {
- content: "\e6c2";
-}
-
-.uniui-medal-filled:before {
- content: "\e6c3";
-}
-
-.uniui-gift-filled:before {
- content: "\e6c4";
-}
-
-.uniui-fire-filled:before {
- content: "\e6c5";
-}
-
-.uniui-refreshempty:before {
- content: "\e6bf";
-}
-
-.uniui-location-filled:before {
- content: "\e6af";
-}
-
-.uniui-person-filled:before {
- content: "\e69d";
-}
-
-.uniui-personadd-filled:before {
- content: "\e698";
-}
-
-.uniui-back:before {
- content: "\e6b9";
-}
-
-.uniui-forward:before {
- content: "\e6ba";
-}
-
-.uniui-arrow-right:before {
- content: "\e6bb";
-}
-
-.uniui-arrowthinright:before {
- content: "\e6bb";
-}
-
-.uniui-arrow-left:before {
- content: "\e6bc";
-}
-
-.uniui-arrowthinleft:before {
- content: "\e6bc";
-}
-
-.uniui-arrow-up:before {
- content: "\e6bd";
-}
-
-.uniui-arrowthinup:before {
- content: "\e6bd";
-}
-
-.uniui-arrow-down:before {
- content: "\e6be";
-}
-
-.uniui-arrowthindown:before {
- content: "\e6be";
-}
-
-.uniui-bottom:before {
- content: "\e6b8";
-}
-
-.uniui-arrowdown:before {
- content: "\e6b8";
-}
-
-.uniui-right:before {
- content: "\e6b5";
-}
-
-.uniui-arrowright:before {
- content: "\e6b5";
-}
-
-.uniui-top:before {
- content: "\e6b6";
-}
-
-.uniui-arrowup:before {
- content: "\e6b6";
-}
-
-.uniui-left:before {
- content: "\e6b7";
-}
-
-.uniui-arrowleft:before {
- content: "\e6b7";
-}
-
-.uniui-eye:before {
- content: "\e651";
-}
-
-.uniui-eye-filled:before {
- content: "\e66a";
-}
-
-.uniui-eye-slash:before {
- content: "\e6b3";
-}
-
-.uniui-eye-slash-filled:before {
- content: "\e6b4";
-}
-
-.uniui-info-filled:before {
- content: "\e649";
-}
-
-.uniui-reload:before {
- content: "\e6b2";
-}
-
-.uniui-micoff-filled:before {
- content: "\e6b0";
-}
-
-.uniui-map-pin-ellipse:before {
- content: "\e6ac";
-}
-
-.uniui-map-pin:before {
- content: "\e6ad";
-}
-
-.uniui-location:before {
- content: "\e6ae";
-}
-
-.uniui-starhalf:before {
- content: "\e683";
-}
-
-.uniui-star:before {
- content: "\e688";
-}
-
-.uniui-star-filled:before {
- content: "\e68f";
-}
-
-.uniui-calendar:before {
- content: "\e6a0";
-}
-
-.uniui-fire:before {
- content: "\e6a1";
-}
-
-.uniui-medal:before {
- content: "\e6a2";
-}
-
-.uniui-font:before {
- content: "\e6a3";
-}
-
-.uniui-gift:before {
- content: "\e6a4";
-}
-
-.uniui-link:before {
- content: "\e6a5";
-}
-
-.uniui-notification:before {
- content: "\e6a6";
-}
-
-.uniui-staff:before {
- content: "\e6a7";
-}
-
-.uniui-vip:before {
- content: "\e6a8";
-}
-
-.uniui-folder-add:before {
- content: "\e6a9";
-}
-
-.uniui-tune:before {
- content: "\e6aa";
-}
-
-.uniui-auth:before {
- content: "\e6ab";
-}
-
-.uniui-person:before {
- content: "\e699";
-}
-
-.uniui-email-filled:before {
- content: "\e69a";
-}
-
-.uniui-phone-filled:before {
- content: "\e69b";
-}
-
-.uniui-phone:before {
- content: "\e69c";
-}
-
-.uniui-email:before {
- content: "\e69e";
-}
-
-.uniui-personadd:before {
- content: "\e69f";
-}
-
-.uniui-chatboxes-filled:before {
- content: "\e692";
-}
-
-.uniui-contact:before {
- content: "\e693";
-}
-
-.uniui-chatbubble-filled:before {
- content: "\e694";
-}
-
-.uniui-contact-filled:before {
- content: "\e695";
-}
-
-.uniui-chatboxes:before {
- content: "\e696";
-}
-
-.uniui-chatbubble:before {
- content: "\e697";
-}
-
-.uniui-upload-filled:before {
- content: "\e68e";
-}
-
-.uniui-upload:before {
- content: "\e690";
-}
-
-.uniui-weixin:before {
- content: "\e691";
-}
-
-.uniui-compose:before {
- content: "\e67f";
-}
-
-.uniui-qq:before {
- content: "\e680";
-}
-
-.uniui-download-filled:before {
- content: "\e681";
-}
-
-.uniui-pyq:before {
- content: "\e682";
-}
-
-.uniui-sound:before {
- content: "\e684";
-}
-
-.uniui-trash-filled:before {
- content: "\e685";
-}
-
-.uniui-sound-filled:before {
- content: "\e686";
-}
-
-.uniui-trash:before {
- content: "\e687";
-}
-
-.uniui-videocam-filled:before {
- content: "\e689";
-}
-
-.uniui-spinner-cycle:before {
- content: "\e68a";
-}
-
-.uniui-weibo:before {
- content: "\e68b";
-}
-
-.uniui-videocam:before {
- content: "\e68c";
-}
-
-.uniui-download:before {
- content: "\e68d";
-}
-
-.uniui-help:before {
- content: "\e679";
-}
-
-.uniui-navigate-filled:before {
- content: "\e67a";
-}
-
-.uniui-plusempty:before {
- content: "\e67b";
-}
-
-.uniui-smallcircle:before {
- content: "\e67c";
-}
-
-.uniui-minus-filled:before {
- content: "\e67d";
-}
-
-.uniui-micoff:before {
- content: "\e67e";
-}
-
-.uniui-closeempty:before {
- content: "\e66c";
-}
-
-.uniui-clear:before {
- content: "\e66d";
-}
-
-.uniui-navigate:before {
- content: "\e66e";
-}
-
-.uniui-minus:before {
- content: "\e66f";
-}
-
-.uniui-image:before {
- content: "\e670";
-}
-
-.uniui-mic:before {
- content: "\e671";
-}
-
-.uniui-paperplane:before {
- content: "\e672";
-}
-
-.uniui-close:before {
- content: "\e673";
-}
-
-.uniui-help-filled:before {
- content: "\e674";
-}
-
-.uniui-paperplane-filled:before {
- content: "\e675";
-}
-
-.uniui-plus:before {
- content: "\e676";
-}
-
-.uniui-mic-filled:before {
- content: "\e677";
-}
-
-.uniui-image-filled:before {
- content: "\e678";
-}
-
-.uniui-locked-filled:before {
- content: "\e668";
-}
-
-.uniui-info:before {
- content: "\e669";
-}
-
-.uniui-locked:before {
- content: "\e66b";
-}
-
-.uniui-camera-filled:before {
- content: "\e658";
-}
-
-.uniui-chat-filled:before {
- content: "\e659";
-}
-
-.uniui-camera:before {
- content: "\e65a";
-}
-
-.uniui-circle:before {
- content: "\e65b";
-}
-
-.uniui-checkmarkempty:before {
- content: "\e65c";
-}
-
-.uniui-chat:before {
- content: "\e65d";
-}
-
-.uniui-circle-filled:before {
- content: "\e65e";
-}
-
-.uniui-flag:before {
- content: "\e65f";
-}
-
-.uniui-flag-filled:before {
- content: "\e660";
-}
-
-.uniui-gear-filled:before {
- content: "\e661";
-}
-
-.uniui-home:before {
- content: "\e662";
-}
-
-.uniui-home-filled:before {
- content: "\e663";
-}
-
-.uniui-gear:before {
- content: "\e664";
-}
-
-.uniui-smallcircle-filled:before {
- content: "\e665";
-}
-
-.uniui-map-filled:before {
- content: "\e666";
-}
-
-.uniui-map:before {
- content: "\e667";
-}
-
-.uniui-refresh-filled:before {
- content: "\e656";
-}
-
-.uniui-refresh:before {
- content: "\e657";
-}
-
-.uniui-cloud-upload:before {
- content: "\e645";
-}
-
-.uniui-cloud-download-filled:before {
- content: "\e646";
-}
-
-.uniui-cloud-download:before {
- content: "\e647";
-}
-
-.uniui-cloud-upload-filled:before {
- content: "\e648";
-}
-
-.uniui-redo:before {
- content: "\e64a";
-}
-
-.uniui-images-filled:before {
- content: "\e64b";
-}
-
-.uniui-undo-filled:before {
- content: "\e64c";
-}
-
-.uniui-more:before {
- content: "\e64d";
-}
-
-.uniui-more-filled:before {
- content: "\e64e";
-}
-
-.uniui-undo:before {
- content: "\e64f";
-}
-
-.uniui-images:before {
- content: "\e650";
-}
-
-.uniui-paperclip:before {
- content: "\e652";
-}
-
-.uniui-settings:before {
- content: "\e653";
-}
-
-.uniui-search:before {
- content: "\e654";
-}
-
-.uniui-redo-filled:before {
- content: "\e655";
-}
-
-.uniui-list:before {
- content: "\e644";
-}
-
-.uniui-mail-open-filled:before {
- content: "\e63a";
-}
-
-.uniui-hand-down-filled:before {
- content: "\e63c";
-}
-
-.uniui-hand-down:before {
- content: "\e63d";
-}
-
-.uniui-hand-up-filled:before {
- content: "\e63e";
-}
-
-.uniui-hand-up:before {
- content: "\e63f";
-}
-
-.uniui-heart-filled:before {
- content: "\e641";
-}
-
-.uniui-mail-open:before {
- content: "\e643";
-}
-
-.uniui-heart:before {
- content: "\e639";
-}
-
-.uniui-loop:before {
- content: "\e633";
-}
-
-.uniui-pulldown:before {
- content: "\e632";
-}
-
-.uniui-scan:before {
- content: "\e62a";
-}
-
-.uniui-bars:before {
- content: "\e627";
-}
-
-.uniui-cart-filled:before {
- content: "\e629";
-}
-
-.uniui-checkbox:before {
- content: "\e62b";
-}
-
-.uniui-checkbox-filled:before {
- content: "\e62c";
-}
-
-.uniui-shop:before {
- content: "\e62f";
-}
-
-.uniui-headphones:before {
- content: "\e630";
-}
-
-.uniui-cart:before {
- content: "\e631";
-}
diff --git a/subPackage/user/components/uni-collapse/components/uni-icons/components/uni-icons/uniicons.ttf b/subPackage/user/components/uni-collapse/components/uni-icons/components/uni-icons/uniicons.ttf
deleted file mode 100644
index 835f33b..0000000
--- a/subPackage/user/components/uni-collapse/components/uni-icons/components/uni-icons/uniicons.ttf
+++ /dev/null
Binary files differ
diff --git a/subPackage/user/components/uni-collapse/components/uni-icons/package.json b/subPackage/user/components/uni-collapse/components/uni-icons/package.json
deleted file mode 100644
index d1c4e77..0000000
--- a/subPackage/user/components/uni-collapse/components/uni-icons/package.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "id": "uni-icons",
- "displayName": "uni-icons 图标",
- "version": "1.3.5",
- "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
- "keywords": [
- "uni-ui",
- "uniui",
- "icon",
- "图标"
-],
- "repository": "https://github.com/dcloudio/uni-ui",
- "engines": {
- "HBuilderX": "^3.2.14"
- },
- "directories": {
- "example": "../../temps/example_temps"
- },
- "dcloudext": {
- "category": [
- "前端组件",
- "通用组件"
- ],
- "sale": {
- "regular": {
- "price": "0.00"
- },
- "sourcecode": {
- "price": "0.00"
- }
- },
- "contact": {
- "qq": ""
- },
- "declaration": {
- "ads": "无",
- "data": "无",
- "permissions": "无"
- },
- "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
- },
- "uni_modules": {
- "dependencies": ["uni-scss"],
- "encrypt": [],
- "platforms": {
- "cloud": {
- "tcb": "y",
- "aliyun": "y"
- },
- "client": {
- "App": {
- "app-vue": "y",
- "app-nvue": "y"
- },
- "H5-mobile": {
- "Safari": "y",
- "Android Browser": "y",
- "微信浏览器(Android)": "y",
- "QQ浏览器(Android)": "y"
- },
- "H5-pc": {
- "Chrome": "y",
- "IE": "y",
- "Edge": "y",
- "Firefox": "y",
- "Safari": "y"
- },
- "小程序": {
- "微信": "y",
- "阿里": "y",
- "百度": "y",
- "字节跳动": "y",
- "QQ": "y"
- },
- "快应用": {
- "华为": "u",
- "联盟": "u"
- },
- "Vue": {
- "vue2": "y",
- "vue3": "y"
- }
- }
- }
- }
-}
\ No newline at end of file
diff --git a/subPackage/user/components/uni-collapse/components/uni-icons/readme.md b/subPackage/user/components/uni-collapse/components/uni-icons/readme.md
deleted file mode 100644
index 86234ba..0000000
--- a/subPackage/user/components/uni-collapse/components/uni-icons/readme.md
+++ /dev/null
@@ -1,8 +0,0 @@
-## Icons 图标
-> **组件名:uni-icons**
-> 代码块: `uIcons`
-
-用于展示 icons 图标 。
-
-### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons)
-#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
diff --git a/subPackage/user/components/uni-collapse/package.json b/subPackage/user/components/uni-collapse/package.json
deleted file mode 100644
index 65349cf..0000000
--- a/subPackage/user/components/uni-collapse/package.json
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- "id": "uni-collapse",
- "displayName": "uni-collapse 折叠面板",
- "version": "1.4.3",
- "description": "Collapse 组件,可以折叠 / 展开的内容区域。",
- "keywords": [
- "uni-ui",
- "折叠",
- "折叠面板",
- "手风琴"
-],
- "repository": "https://github.com/dcloudio/uni-ui",
- "engines": {
- "HBuilderX": ""
- },
- "directories": {
- "example": "../../temps/example_temps"
- },
- "dcloudext": {
- "category": [
- "前端组件",
- "通用组件"
- ],
- "sale": {
- "regular": {
- "price": "0.00"
- },
- "sourcecode": {
- "price": "0.00"
- }
- },
- "contact": {
- "qq": ""
- },
- "declaration": {
- "ads": "无",
- "data": "无",
- "permissions": "无"
- },
- "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
- },
- "uni_modules": {
- "dependencies": [
- "uni-scss",
- "uni-icons"
- ],
- "encrypt": [],
- "platforms": {
- "cloud": {
- "tcb": "y",
- "aliyun": "y"
- },
- "client": {
- "App": {
- "app-vue": "y",
- "app-nvue": "y"
- },
- "H5-mobile": {
- "Safari": "y",
- "Android Browser": "y",
- "微信浏览器(Android)": "y",
- "QQ浏览器(Android)": "y"
- },
- "H5-pc": {
- "Chrome": "y",
- "IE": "y",
- "Edge": "y",
- "Firefox": "y",
- "Safari": "y"
- },
- "小程序": {
- "微信": "y",
- "阿里": "y",
- "百度": "y",
- "字节跳动": "y",
- "QQ": "y"
- },
- "快应用": {
- "华为": "u",
- "联盟": "u"
- },
- "Vue": {
- "vue2": "y",
- "vue3": "y"
- }
- }
- }
- }
-}
diff --git a/subPackage/user/components/uni-collapse/readme.md b/subPackage/user/components/uni-collapse/readme.md
deleted file mode 100644
index bc758eb..0000000
--- a/subPackage/user/components/uni-collapse/readme.md
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-## Collapse 折叠面板
-> **组件名:uni-collapse**
-> 代码块: `uCollapse`
-> 关联组件:`uni-collapse-item`、`uni-icons`。
-
-
-折叠面板用来折叠/显示过长的内容或者是列表。通常是在多内容分类项使用,折叠不重要的内容,显示重要内容。点击可以展开折叠部分。
-
-### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-collapse)
-#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
diff --git a/subPackage/user/feedback.vue b/subPackage/user/feedback.vue
deleted file mode 100644
index 868a95d..0000000
--- a/subPackage/user/feedback.vue
+++ /dev/null
@@ -1,38 +0,0 @@
-<template>
- <view>
- <feedbackReport></feedbackReport>
- </view>
-</template>
-
-<script>
- import feedbackReport from "@/subPackage/user/components/feedbackReport.vue"
- export default {
- components: {
- feedbackReport
- },
- data() {
- return {
-
- }
- },
- created() {
-
- },
- mounted() {
-
- },
- onLoad(option) {
-
- },
- onShow() {
-
- },
- methods: {
-
- }
- }
-</script>
-
-<style scoped lang="scss">
-
-</style>
\ No newline at end of file
diff --git a/subPackage/user/historical/detail/index.vue b/subPackage/user/historical/detail/index.vue
deleted file mode 100644
index 7fec21d..0000000
--- a/subPackage/user/historical/detail/index.vue
+++ /dev/null
@@ -1,95 +0,0 @@
-<template>
- <view class="container">
- <u--form labelWidth='134' ref="baseForm" :model="baseFormData">
- <u-form-item label="水库名称 :" name='waterName'>
- <u--input disabled v-model="baseFormData.waterName" placeholder="请输入水库名称" />
- </u-form-item>
- <u-form-item label="巡查责任人姓名 :" name='realName'>
- <u--input disabled v-model="baseFormData.realName" placeholder="请输入姓名" />
- </u-form-item>
- <u-form-item label="联系电话:" name='tel'>
- <u--input disabled v-model="baseFormData.tel" placeholder="请输入联系电话" />
- </u-form-item>
- <u-form-item label="是否为巡查责任人 :" name='isPatrolPerson'>
- <view class="forms-item">
- <u-radio-group disabled v-model="baseFormData.isPatrolPerson" placement="row">
- <u-radio name='是' label="是"></u-radio>
- <u-radio name='否' label="否"></u-radio>
- </u-radio-group>
- </view>
- </u-form-item>
- <u-form-item label="今日是否已巡查 :" name='isPatrol'>
- <view class="forms-item">
- <u-radio-group disabled v-model="baseFormData.isPatrol" placement="row">
- <u-radio name='是' label="是"></u-radio>
- <u-radio name='否' label="否"></u-radio>
- </u-radio-group>
- </view>
- </u-form-item>
- <u-form-item label="是否超汛限 :" name='isOver'>
- <view class="forms-item">
- <u-radio-group disabled v-model="baseFormData.isPatrol" placement="row">
- <u-radio name='是' label="是"></u-radio>
- <u-radio name='否' label="否"></u-radio>
- </u-radio-group>
- </view>
- </u-form-item>
- <u-form-item label="是否发现险情 :" name='isDanger'>
- <view class="forms-item">
- <u-radio-group disabled v-model="baseFormData.isDanger" placement="row">
- <u-radio name='是' label="是"></u-radio>
- <u-radio name='否' label="否"></u-radio>
- </u-radio-group>
- </view>
- </u-form-item>
- </u--form>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
- baseFormData: {},
- // 单选数据源
- option: [{
- text: '是',
- value: "是"
- }, {
- text: '否',
- value: "否"
- }],
- }
- },
- onLoad(option) {
- this.baseFormData = JSON.parse(decodeURIComponent(option.data))
- },
- }
-</script>
-
-<style lang="scss" scoped>
- .container {
- padding: 20px;
- font-size: 14px;
- line-height: 24px;
- }
-
- .forms-item {
- height: 100%;
- display: flex;
- align-items: center;
- }
-
- .disable {
- background-color: #f2f2f2 !important;
- color: #333333;
- }
-
- /deep/ .u-radio__icon-wrap--disabled {
- background-color: #fff !important;
- }
-
- /deep/ .u-radio {
- margin-right: 60rpx;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/user/historical/index.vue b/subPackage/user/historical/index.vue
deleted file mode 100644
index 16d41da..0000000
--- a/subPackage/user/historical/index.vue
+++ /dev/null
@@ -1,168 +0,0 @@
-<template>
- <view class="u-page">
- <view class="tab">
- <u-tabs :itemStyle="{width: '160rpx' ,height: '88rpx' }" :activeStyle="{color: '#99bada' }" lineWidth="60"
- :current="current" :list="tabList" @click="tabClick">
- </u-tabs>
- </view>
- <!-- 外呼报讯 -->
- <view v-if="current==0">
- <view v-if="historyList.length<=0" class="line-center">
- <u-empty mode="data" />
- </view>
- <u-list @scrolltolower="scrolltolower" v-else>
- <u-list-item v-for="(item, index) in historyList" :key="item.id">
- <u-cell isLink :url='`./detail/index?data=${encodeURIComponent(JSON.stringify(item))}`'
- :title="`${item.waterName}-${item.realName}`" :value='item.createTime'>
- </u-cell>
- </u-list-item>
- </u-list>
- </view>
- <view v-else>
- <view v-if="patrolList.length<=0" class="line-center">
- <u-empty mode="data" />
- </view>
- <u-list @scrolltolower="scrolltolower" v-else>
- <u-list-item v-for="(item, index) in patrolList" :key="item.id">
- <u-cell isLink
- :url='`../../realtimeMonitor/reservoir/reportFlood?reservoirId=${item.reservoirId}&id=${item.id}`'
- :title="`${item.reservoirName}`" :value='item.createTime'>
- </u-cell>
- </u-list-item>
- </u-list>
- </view>
- </view>
-</template>
-
-<script>
- import {
- getHistotyList,
- reportFloodRecord
- } from "@/api/history"
- export default {
- data() {
- return {
- historyList: [],
- query: {
- current: 0,
- pageSize: 14,
- size: 14,
- account: uni.getStorageSync("userInfo").account,
- createUser: uni.getStorageSync("userInfo").user_id
- },
- total: 0,
- tabList: [{
- name: "外呼报汛"
- },
- {
- name: "巡查报汛"
- },
- ],
- current: 1,
- //巡查报讯列表
- patrolList: [],
- }
- },
- onLoad() {
- // this.loadmore()
- if (this.current == 0) {
- this.initList()
- } else {
- this.getReportFloodRecord()
- }
- },
- methods: {
- //外呼报讯初始化
- async initList(query = this.query) {
- //通过当前账号字段判断是否登录
- if (!this.query.account) {
- uni.showModal({
- title: "提示",
- content: "您当前未登录,请登陆后查看!",
- showCancel: false,
- success(res) {
- if (res.confirm) {
- uni.clearStorageSync()
- uni.navigateTo({
- url: "../../../pages/login/index"
- })
- }
- }
- })
- }
- this.query.current += 1
- if (this.historyList.length >= this.total && this.historyList.length != 0) return
- const {
- code,
- data,
- msg
- } = await getHistotyList(query)
- if (code != 200) {
- uni.showToast({
- title: msg,
- icon: "none"
- })
- return
- }
- this.total = data.total
- if (this.historyList.length === 0) {
- this.historyList = data.records
- } else {
- this.query.current += 1
- this.historyList = [...this.historyList, ...data.records]
- }
- },
- //巡查报讯初始化
- async getReportFloodRecord() {
- this.query.current += 1
- if (this.patrolList.length >= this.total && this.patrolList.length != 0) return
- const res = await reportFloodRecord(this.query)
- if (res.code != 200) return
- this.total = res.data.total
- if (this.patrolList.length === 0) {
- this.patrolList = res.data.records
- } else {
- this.patrolList = [...this.patrolList, ...res.data.records]
- }
- },
- tabClick(e) {
- this.query.current = 0
- this.current = e.index
- if (this.current == 0) {
- this.patrolList = []
- this.initList()
- } else if (this.current == 1) {
- this.historyList = []
- this.getReportFloodRecord()
- }
- },
- scrolltolower() {
- if (this.current == 0) {
- this.initList()
- } else if (this.current == 1) {
- this.getReportFloodRecord()
- }
- },
- },
- }
-</script>
-
-<style lang="scss" scoped>
- .u-page {
- .tab {
- display: flex;
- flex-direction: column;
- justify-content: space-evenly;
- width: 100%;
- background-color: #ffffff;
- align-items: center;
- }
- }
-
- .line-center {
- height: 100vh;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/user/history/danger.vue b/subPackage/user/history/danger.vue
deleted file mode 100644
index 8e579ac..0000000
--- a/subPackage/user/history/danger.vue
+++ /dev/null
@@ -1,125 +0,0 @@
-<template>
- <view class="u-page">
- <view v-if="list.length<=0" class="line-center">
- <u-empty mode="data" />
- </view>
- <u-list @scrolltolower="scrolltolower" v-else>
- <u-list-item v-for="(item, index) in list" :key="item.id">
- <u-cell isLink :url='`./detail/dangerDetail?detail=${JSON.stringify(item)}`' :title="`${item.title}`"
- :value='item.formatterTime'>
- </u-cell>
- </u-list-item>
- </u-list>
-
- <u-loading-page :loading="loadingPage"></u-loading-page>
-
- </view>
-</template>
-
-<script>
- import {
- getPage
- } from "@/api/jcsb/dangerReport/dangerReport.js"
- import {
- convertTimestampToDate
- } from "@/utils/date"
- export default {
- data() {
- return {
- list: [],
- pages: {
- current: 1,
- size: 15,
- total: 0,
- },
- query: {
- createUser: uni.getStorageSync("userInfo").user_id,
- },
- loadingPage: false,
- }
- },
- created() {
-
- },
- mounted() {
-
- },
- onLoad(option) {
-
- },
- onShow() {
- this.list = []
- this.pages.current = 1
- this.getList()
- },
- methods: {
- getList(params = {}) {
- this.loadingPage = true
- getPage(this.pages.current, this.pages.size, Object.assign(params, this.query)).then(res => {
- let data = res.data.records
- console.log(data, "--------------")
- let realData = []
-
- data.forEach(e => {
-
- console.log()
-
- let info = JSON.parse(this.convertBase64(e.base64Data))
- info.createTime = e.createTime
- info.id = e.id
- realData.push(info)
- })
-
- realData.forEach(e => {
-
- if (e.createUserName == this.userInfo.real_name) {
- //这是上报的
- e.isReport = true
- e.title = e.reservoirName + "险情上报"
- e.formatterTime = convertTimestampToDate(e.createTime, "MM-dd hh:mm")
- } else {
- e.isReport = false
- e.title = e.reservoirName + "险情处理"
- e.formatterTime = convertTimestampToDate(e.updateTime, "MM-dd hh:mm")
- }
- })
-
- if (this.list.length == 0) {
- this.list = realData
- } else {
- this.list = [...this.list, ...realData]
- }
- this.loadingPage = false
- })
- },
- scrolltolower() {
- this.pages.current += 1
- this.getList()
- },
-
- convertBase64(base64Data) {
- return decodeURIComponent(atob(base64Data))
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- .u-page {
- .tab {
- display: flex;
- flex-direction: column;
- justify-content: space-evenly;
- width: 100%;
- background-color: #ffffff;
- align-items: center;
- }
- }
-
- .line-center {
- height: 100vh;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/user/history/detail/dangerDetail.vue b/subPackage/user/history/detail/dangerDetail.vue
deleted file mode 100644
index d3bd173..0000000
--- a/subPackage/user/history/detail/dangerDetail.vue
+++ /dev/null
@@ -1,99 +0,0 @@
-<template>
- <view>
- <!--上报信息-->
- <card class="card">
- <view slot="insideHead">
- <boxTitle title="上报信息"></boxTitle>
- </view>
- <view class="content" slot="content">
- <u-form labelWidth="70" :model="form" ref="form">
- <u-form-item labelWidth="100" label="水库名称:">
- <u--input border="bottom" v-model="form.reservoirName" disabled disabledColor="#ffffff"
- placeholder="请选择水库">
- </u--input>
- </u-form-item>
-
- <u-form-item labelWidth="100" required label="情况说明:" prop="desinfo">
- <u-textarea confirmType="done" disabled="" v-model="form.description" placeholder="请填写情况说明">
- </u-textarea>
- </u-form-item>
-
- <u-form-item labelWidth="100" required prop="images" label="现场图片:">
-
- <image @click="previewFullImage(img)" class="image" v-for="(img,index) in form.images"
- :key="index" :src="img.url"></image>
- </u-form-item>
- </u-form>
- </view>
- </card>
- </view>
-</template>
-
-<script>
- import card from "@/components/my-components/card.vue"
- import boxTitle from "@/subPackage/user/components/boxTitle.vue"
- export default {
- components: {
- card,
- boxTitle
- },
- data() {
- return {
- detail: {},
- form: {}
- }
- },
- created() {
-
- },
- mounted() {
-
- },
- onLoad(option) {
- this.detail = JSON.parse(option.detail)
- console.log(this.detail, "------------------")
- uni.setNavigationBarTitle({
- title: this.detail.title
- })
- this.form.reservoirName = this.detail.reservoirName
- if (this.detail.isReport) {
- //上报
- this.form.description = this.detail.desinfo
- this.form.images = this.detail.images
- } else {
- //处理
- this.form.description = this.detail.toDesinfo
- this.form.images = this.detail.toImages
-
- }
-
-
- },
- onShow() {
-
- },
- methods: {
- //图片预览
- previewFullImage(img) {
- uni.previewImage({
- // current: e, //预览图片的下标
- urls: [img.url] //预览图片的地址,必须要数组形式,如果不是数组形式就转换成数组形式就可以
- })
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- .card {
- .content {
- padding: 0 30rpx;
- border: 5rpx solid #edf6ff;
- }
-
- .image {
- width: 200rpx;
- height: 200rpx;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/user/history/detail/patrolDetail.vue b/subPackage/user/history/detail/patrolDetail.vue
deleted file mode 100644
index fbd5946..0000000
--- a/subPackage/user/history/detail/patrolDetail.vue
+++ /dev/null
@@ -1,233 +0,0 @@
-<template>
- <view class="container">
-
- <map style="width: 100%; height: 450rpx;" scale="18" :latitude="latitude" :longitude="longitude"
- :polyline="polyline">
- </map>
-
- <uni-collapse accordion ref="collapse" v-model="collapseValue">
- <uni-collapse-item :show-animation="showAnimation" v-for="(group,gIndex) in groupList" :key="gIndex"
- ref="collapseItem">
-
- <view class="uni-collapse-item-title" slot="title">
- <view class="title">{{group.name}}</view>
- </view>
-
- <card class="report-card" v-for="(item,index) in group.patrolRecordVOList" :key="item.itemId">
- <view class="card-inside-head" slot="insideHead" v-if="item.status == 1">{{item.itemsName}}(正常)
- </view>
- <view class="card-inside-head" slot="insideHead" v-if="item.status == 2">{{item.itemsName}}(异常)
- </view>
- <view class="content" slot="content">
- <view class="report">
- <!-- <view class=" title">处理信息</view> -->
- <view class="content">
-
- <view class="item">
- <view class="lable">内容:</view>
- <view class="value">{{item.content}}</view>
- </view>
-
- <view class="item">
- <view class="lable">图片:</view>
- <view class="value">
- <image @click="previewFullImg(item.images)" class="image"
- v-for="(img,imgIndex) in item.images" :key="img.url" :src="img.url">
- </image>
- </view>
- </view>
-
- <view v-if="item.videos.length>0" class="item">
- <view class="lable">视频:</view>
- <view class="value">
- <video class="image" v-for="(video,videoIndex) in item.videos" :key="video.url"
- :src="video.url">
- </video>
- </view>
- </view>
- </view>
- </view>
- </view>
- </card>
- </uni-collapse-item>
- </uni-collapse>
- </view>
-</template>
-
-<script>
- import {
- getHistoryRecord
- } from '@/api/patrol/patrolRecord'
- import uniCollapse from "@/subPackage/patrol/components/uni-collapse/components/uni-collapse/uni-collapse.vue"
- import uniCollapseItem from "@/subPackage/patrol/components/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue"
- import card from "@/components/my-components/card.vue"
- export default {
- components: {
- uniCollapse,
- uniCollapseItem,
- card
- },
- data() {
- return {
- patrolTask: "",
-
- groupList: [],
-
- collapseValue: "",
- showAnimation: false,
-
- formList: [],
-
- latitude: 39.909,
- longitude: 116.39742,
- polyline: [],
- polylineObj: {
- color: "#10a4ff", //线的颜色
- width: 5, //线的宽度
- arrowLine: false, //带箭头的线 开发者工具暂不支持该属性
- },
-
- }
- },
- created() {
-
- },
- mounted() {
-
- },
- onLoad(option) {
- this.patrolTask = JSON.parse(option.patrolTask)
- this.convertPolyline()
- this.getHistory()
- },
- onShow() {
-
- },
- methods: {
-
- //获取历史
- getHistory() {
- let params = {
- flowTaskId: this.patrolTask.taskId,
- taskId: this.patrolTask.detail.id
- }
- getHistoryRecord(params).then(res => {
- let data = res.data
- this.groupList = data
- })
- },
-
- previewFullImg(imgArr) {
- let urls = []
- imgArr.forEach(e => {
- urls.push(e.url)
- })
- uni.previewImage({
- // current: e, //预览图片的下标
- urls: urls //预览图片的地址,必须要数组形式,如果不是数组形式就转换成数组形式就可以
- })
- },
-
- convertPolyline() {
-
- if (this.patrolTask.detail.patrolRoute) {
- //转换字符串
- let routeStr = this.patrolTask.detail.patrolRoute
- routeStr = routeStr.replace("'LINESTRING(", "").replace(")'", "")
-
- //获取数组
- let routeArr = routeStr.split(",")
- let points = []
-
- //整合为对象
- routeArr.forEach(e => {
- let pointsArr = e.split(" ")
- points.push({
- longitude: Number(pointsArr[0]),
- latitude: Number(pointsArr[1])
- })
- })
- this.polylineObj.points = points
- this.polyline = [this.polylineObj]
- this.latitude = Number(points[0].latitude)
- this.longitude = Number(points[0].longitude)
- }
-
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- .container {
- .report-card {
- padding: 0 30rpx;
-
- .card-inside-head {
- font-size: 36rpx;
- // border: 2rpx solid black;
- }
-
- .content {
-
- .report {
- // border: 2rpx solid black;
- margin-bottom: 10rpx;
- }
-
- .handle {
- // border: 1px solid black;
- }
-
- .title {
- // border-bottom: 2rpx solid black;
- font-size: 40rpx;
- }
-
- .content {
-
- .item {
- font-size: 30rpx;
- display: flex;
- align-items: center;
- margin: 20rpx 0rpx;
-
- .image {
- width: 180rpx;
- height: 180rpx;
- }
- }
- }
- }
- }
-
- .page-footer {
- position: fixed;
- bottom: 0;
- width: 100%;
- }
- }
-
-
- .uni-collapse-item-title {
- display: flex;
- justify-content: space-between;
- padding: 20rpx;
- font-size: 44rpx;
-
- .tip {
- font-size: 15px;
- display: flex;
- align-items: center;
- color: #ff0000;
- }
- }
-
- /deep/ .amap-logo {
- display: none !important;
- }
-
- /deep/ .amap-copyright {
- display: none !important;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/user/history/patrol.vue b/subPackage/user/history/patrol.vue
deleted file mode 100644
index 12d5c6c..0000000
--- a/subPackage/user/history/patrol.vue
+++ /dev/null
@@ -1,96 +0,0 @@
-<template>
- <view class="u-page">
- <view v-if="patrolList.length<=0" class="line-center">
- <u-empty mode="data" />
- </view>
- <u-list @scrolltolower="scrolltolower" v-else>
- <u-list-item v-for="(item, index) in patrolList" :key="index">
- <u-cell isLink :url='`./detail/patrolDetail?patrolTask=${JSON.stringify(item)}`'
- :title="`${item.detail.title}`" :value='item.formatterEndTime'>
- </u-cell>
- </u-list-item>
- </u-list>
-
- <u-loading-page :loading="loadingPage"></u-loading-page>
- </view>
-</template>
-
-<script>
- import {
- taskDoneList
- } from '@/api/patrol/patrolTask'
- import {
- convertTimestampToDate,
- } from '@/utils/date'
- export default {
- data() {
- return {
- patrolList: [],
- pages: {
- current: 1,
- size: 15,
- total: 0,
- },
- query: {
- currentUserId: uni.getStorageSync("userInfo").user_id
- },
- loadingPage: false,
- }
- },
- created() {
-
- },
- mounted() {
-
- },
- onLoad(option) {
-
- },
- onShow() {
- this.patrolList = []
- this.pages.current = 1
- this.getList()
- },
- methods: {
- scrolltolower() {
- this.pages.current += 1
- this.getList()
- },
- getList(params = {}) {
- this.loadingPage = true
- taskDoneList(this.pages.current, this.pages.size, Object.assign(params, this.query)).then(res => {
- let data = res.data
- data.records.forEach(e => {
- e.formatterEndTime = convertTimestampToDate(e.historyTaskEndTime, "MM-dd hh:mm")
- })
- if (this.patrolList.length == 0) {
- this.patrolList = data.records
- } else {
- this.patrolList = [...this.patrolList, ...data.records]
- }
- this.loadingPage = false
- })
- }
- }
- }
-</script>
-
-<style scoped lang="scss">
- .u-page {
- .tab {
- display: flex;
- flex-direction: column;
- justify-content: space-evenly;
- width: 100%;
- background-color: #ffffff;
- align-items: center;
- }
- }
-
- .line-center {
- height: 100vh;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/user/history/protect.vue b/subPackage/user/history/protect.vue
deleted file mode 100644
index 8ff19a9..0000000
--- a/subPackage/user/history/protect.vue
+++ /dev/null
@@ -1,98 +0,0 @@
-<template>
- <view class="u-page">
- <view v-if="list.length<=0" class="line-center">
- <u-empty mode="data" />
- </view>
- <u-list @scrolltolower="scrolltolower" v-else>
- <u-list-item v-for="(item, index) in list" :key="item.id">
- <u-cell isLink :url='`../../jcsb/manageProtect/index?detail=${JSON.stringify(item)}`'
- :title="`${item.title}`">
- </u-cell>
- </u-list-item>
- </u-list>
-
- <u-loading-page :loading="loadingPage"></u-loading-page>
- </view>
-</template>
-
-<script>
- import {
- getList
- } from "@/api/manageProtect/manageProtectRecord.js"
- import {
- convertTimestampToDate
- } from "@/utils/date"
- export default {
- data() {
- return {
- list: [],
- pages: {
- current: 1,
- size: 15,
- total: 0,
- },
- query: {
- createUser: uni.getStorageSync("userInfo").user_id,
- },
- loadingPage: false,
- }
- },
- created() {
-
- },
- mounted() {
-
- },
- onLoad(option) {
-
- },
- onShow() {
- this.list = []
- this.pages.current = 1
- this.getList()
- },
- methods: {
- getList(params = {}) {
- this.loadingPage = true
- getList(this.pages.current, this.pages.size, Object.assign(params, this.query)).then(res => {
- let data = res.data.records
- data.forEach(e => {
- e.title = convertTimestampToDate(e.reportTime, "MM-dd hh:mm") + "管护"
- })
-
- if (this.list.length == 0) {
- this.list = data
- } else {
- this.list = [...this.list, ...data]
- }
- this.loadingPage = false
-
- })
- },
- scrolltolower() {
- this.pages.current += 1
- this.getList()
- },
- }
- }
-</script>
-
-<style scoped lang="scss">
- .u-page {
- .tab {
- display: flex;
- flex-direction: column;
- justify-content: space-evenly;
- width: 100%;
- background-color: #ffffff;
- align-items: center;
- }
- }
-
- .line-center {
- height: 100vh;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/user/history/scheduling.vue b/subPackage/user/history/scheduling.vue
deleted file mode 100644
index 230afa3..0000000
--- a/subPackage/user/history/scheduling.vue
+++ /dev/null
@@ -1,98 +0,0 @@
-<template>
- <view class="u-page">
- <view v-if="list.length<=0" class="line-center">
- <u-empty mode="data" />
- </view>
- <u-list @scrolltolower="scrolltolower" v-else>
- <u-list-item v-for="(item, index) in list" :key="item.id">
- <u-cell isLink :url='`../../jcsb/modules/scheduling?detail=${JSON.stringify(item)}`'
- :title="`${item.title}`">
- </u-cell>
- </u-list-item>
- </u-list>
-
- <u-loading-page :loading="loadingPage"></u-loading-page>
- </view>
-</template>
-
-<script>
- import {
- getList
- } from "@/api/modules/modules.js"
- import {
- convertTimestampToDate
- } from "@/utils/date"
- export default {
- data() {
- return {
- list: [],
- pages: {
- current: 1,
- size: 15,
- total: 0,
- },
- query: {
- createUser: uni.getStorageSync("userInfo").user_id,
- },
- loadingPage: false,
- }
- },
- created() {
-
- },
- mounted() {
-
- },
- onLoad(option) {
-
- },
- onShow() {
- this.list = []
- this.pages.current = 1
- this.getList()
- },
- methods: {
- getList(params = {}) {
- this.loadingPage = true
- getList(this.pages.current, this.pages.size, Object.assign(params, this.query)).then(res => {
- let data = res.data.records
- data.forEach(e => {
- e.title = convertTimestampToDate(e.createTime, "MM-dd hh:mm") + "调度"
- })
-
- if (this.list.length == 0) {
- this.list = data
- } else {
- this.list = [...this.list, ...data]
- }
- this.loadingPage = false
-
- })
- },
- scrolltolower() {
- this.pages.current += 1
- this.getList()
- },
- }
- }
-</script>
-
-<style scoped lang="scss">
- .u-page {
- .tab {
- display: flex;
- flex-direction: column;
- justify-content: space-evenly;
- width: 100%;
- background-color: #ffffff;
- align-items: center;
- }
- }
-
- .line-center {
- height: 100vh;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/user/message/detail/index.vue b/subPackage/user/message/detail/index.vue
deleted file mode 100644
index f1d24fc..0000000
--- a/subPackage/user/message/detail/index.vue
+++ /dev/null
@@ -1,62 +0,0 @@
-<template>
- <view class="container">
- <card>
- <view class="card-head" slot="insideHead" style="display: flex;align-items: center;">
- <view class="left">
- <view>
- <!-- <image class="img-icon" :src="imgList._24Rain"></image> -->
- </view>
- <view class="text" style="font-size: 40rpx;">
- <text>{{detail.theme}}</text>
- </view>
- </view>
- <view class="right">
- <view class="text" style="font-size: 28rpx;">
- <text>{{timeFormatter(detail.createTime)}}</text>
- </view>
- </view>
- </view>
- <view slot="content" style="font-size: 34rpx;">
- <text>{{detail.content}}</text>
- </view>
- </card>
-
-
- </view>
-</template>
-
-<script>
- import card from "@/components/my-components/card.vue"
- import {
- convertTimestampToDate
- } from "../../../../utils/date"
- export default {
- components: {
- card
- },
- data() {
- return {
- detail: {}
- }
- },
- computed: {
- timeFormatter() {
- return (time) => {
- return convertTimestampToDate(time, "yyyy-MM-dd hh:mm")
- }
- }
- },
- onLoad(option) {
- this.detail = JSON.parse(option.data)
- },
- }
-</script>
-
-<style lang="scss" scoped>
- .container {
- .card-head {
- display: flex;
- justify-content: space-between;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/user/message/index.vue b/subPackage/user/message/index.vue
deleted file mode 100644
index 083a26e..0000000
--- a/subPackage/user/message/index.vue
+++ /dev/null
@@ -1,104 +0,0 @@
-<template>
- <view class="u-page">
- <view v-if="list.length<=0" class="line-center">
- <u-empty mode="data" />
- </view>
- <u-list @scrolltolower="scrolltolower" v-else>
- <u-list-item v-for="(item, index) in list" :key="item.id">
- <u-cell isLink :url='`./detail/index?data=${JSON.stringify(item)}`'
- :title="`${item.createTime} ${item.theme}`" @click="clickMessage(item)">
- <view v-show="item.status != 1" slot="right-icon">
- <!-- <u-badge :absolute="false" :isDot="true" type="error"></u-badge> -->
- <view class="badge"></view>
- <!-- 未读 -->
- </view>
- </u-cell>
- </u-list-item>
- </u-list>
-
-
- <u-loading-page :loading="loading"></u-loading-page>
-
-
- </view>
-</template>
-
-<script>
- import {
- getMessageList,
- readMessage,
- } from '@/api/system/message'
-
- export default {
- data() {
- return {
- loading: false,
- list: [],
- query: {
- current: 1,
- size: 15,
- recipient: uni.getStorageSync("userInfo").user_id,
- },
- }
- },
- onShow() {
- // this.loadmore()
- this.initList()
- },
- methods: {
- //初始化
- async initList(query = this.query) {
- this.loading = true
- const {
- code,
- data,
- msg
- } = await getMessageList(query)
- if (code != 200) {
- uni.showToast({
- title: msg,
- icon: "none"
- })
- return
- }
-
-
- if (this.query.current == 1) {
- this.list = data.records
- } else {
-
- this.list = [...this.list, ...data.records]
- }
- this.loading = false
- },
- scrolltolower() {
- this.query.current += 1
- this.initList()
- },
- clickMessage(item) {
- if (item.status != 1) {
- readMessage({
- id: item.id
- })
- }
- },
- },
- }
-</script>
-
-<style lang="scss" scoped>
- .line-center {
- height: 100vh;
- display: flex;
- align-items: center;
- justify-content: center;
- }
-
- .badge {
- height: 10rpx;
- width: 10rpx;
- border-radius: 50%;
- border: 2rpx solid #ff0000;
- background-color: #ff0000;
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/user/password.vue b/subPackage/user/password.vue
deleted file mode 100644
index ef5b063..0000000
--- a/subPackage/user/password.vue
+++ /dev/null
@@ -1,183 +0,0 @@
-<template>
- <view class="password">
- <view class="form-card">
- <!-- 注意,如果需要兼容微信小程序,最好通过setRules方法设置rules规则 -->
- <u--form labelPosition="left" :model="model" :rules="rules" ref="uForm">
- <u-form-item labelWidth='200rpx' label="原密码" prop="oldPassword" borderBottom ref="item1">
- <u--input v-model="model.oldPassword" placeholder='请输入原密码' border="none"></u--input>
- </u-form-item>
- <u-form-item labelWidth='200rpx' label="新密码" prop="newPassword" borderBottom ref="item1">
- <u--input v-model="model.newPassword" placeholder='请输入新密码' border="none"></u--input>
- </u-form-item>
- <u-form-item labelWidth='280rpx' label="请再次输入新密码" prop="newPassword1" ref="item1">
- <u--input v-model="model.newPassword1" placeholder='请再次输入新密码' border="none"></u--input>
- </u-form-item>
- </u--form>
- </view>
- <button class="confirm_btn" @click="confirm">保存</button>
- </view>
-</template>
-
-<script>
- import {
- updatePassword
- } from "@/api/system/user"
- import md5 from "../../utils/md5.js"
- var result = ""
- export default {
- data() {
- var newPassword = (rule, value, callback) => {
- if (value === '') {
- callback(new Error('请输入密码'));
- } else {
- if (this.model.newPassword !== '') {
- this.$refs.uForm.validateField('newPassword1');
- }
- callback();
- }
- };
- var newPassword1 = (rule, value, callback) => {
- if (value === '') {
- callback(new Error('请再次输入密码'));
- } else if (value !== this.model.newPassword) {
- callback(new Error('两次输入密码不一致!'));
- } else {
- callback();
- }
- };
- var checkPassWord = (rule, value, callback) => {
- let level = []
- if (!value) {
- return callback('密码不能为空')
- }
- if (value.length < 8) {
- return callback('密码不少于8位')
- }
- if (value.length > 16) {
- return callback('密码不大于16位')
- }
- // 是数字
- let isDigit = /^.*[0-9]+.*/;
- // isLowerCase 小写字母
- let isLowerCase = /^.*[a-z]+.*/;
- // isUpperCase 大写字母
- let isUpperCase = /^.*[A-Z]+.*/;
- // 特殊字符
- let regEx = /^.*[^a-zA-Z0-9]+.*/;
- // 记录匹配的次数
- let num = 0;
- if (isDigit.test(value)) {
- num = num + 1;
- }
- if (isLowerCase.test(value)) {
- num = num + 1;
- }
- if (isUpperCase.test(value)) {
- num = num + 1;
- }
- if (regEx.test(value)) {
- num = num + 1;
- }
- if (num <= 2) {
- return callback("密码强度不足,密码至少包含三种:(1)大写字母、(2)小写字母、(3)数字、(4)特殊符号");
- }
- return callback()
- }
- return {
- showSex: false,
- model: {
- oldPassword: '',
- newPassword: "",
- newPassword1: '',
- },
- rules: {
- 'oldPassword': [{
- type: 'string',
- required: true,
- message: '请输入原密码',
- trigger: ['blur', 'change']
- }],
- "newPassword": [{
- type: 'string',
- required: true,
- message: '请输入新密码',
- trigger: ['blur', 'change']
- }, {
- validator: newPassword,
- trigger: 'blur'
- },
- {
- validator: checkPassWord,
- trigger: 'blur'
- },
- ],
- "newPassword1": [{
- type: 'string',
- required: true,
- message: '请输入新密码',
- trigger: ['blur']
- },
- {
- validator: newPassword1,
- trigger: 'blur'
- }
- ],
- },
- radio: '',
- switchVal: false
- };
- },
- methods: {
-
- confirm() {
- this.$refs.uForm.validate().then(async res => {
- const obj = {
- newPassword: md5(this.model.newPassword),
- oldPassword: md5(this.model.oldPassword),
- newPassword1: md5(this.model.newPassword1),
- }
- const data = await updatePassword(obj).catch(err => {
- const {
- data
- } = err
- return uni.$u.toast(data.msg || "验证失败")
- })
- if (data.code != 200) return uni.$u.toast(data.msg)
- uni.$u.toast("修改成功")
- setTimeout(() => {
- this.$u.func.globalNavigator("", "navBack")
- }, 1500)
- })
- }
- },
- onReady() {
- //如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
- this.$refs.uForm.setRules(this.rules)
- },
- };
-</script>
-
-<style lang="scss" scoped>
- .password {
- background-color: #e6edfa;
- padding: 20rpx 0;
- height: 100vh;
-
- .form-card {
- background-color: #fff;
- border-radius: 16rpx;
- margin: 0 20rpx;
- padding: 0 20rpx;
- }
-
- .confirm_btn {
- background: #1180ff;
- color: #fff;
- height: 72rpx;
- line-height: 72rpx;
- width: 90%;
- margin-top: 200rpx;
- border-radius: 20rpx;
- }
- }
-</style>
\ No newline at end of file
diff --git a/subPackage/user/privacyPolicy.vue b/subPackage/user/privacyPolicy.vue
deleted file mode 100644
index 86b9d4c..0000000
--- a/subPackage/user/privacyPolicy.vue
+++ /dev/null
@@ -1,34 +0,0 @@
-<template>
- <view>
- <web-view src="https://sk.hubeishuiyi.cn/yszc/#/"></web-view>
- </view>
-</template>
-
-<script>
- export default {
- data() {
- return {
-
- }
- },
- created() {
-
- },
- mounted() {
-
- },
- onLoad(option) {
-
- },
- onShow() {
-
- },
- methods: {
-
- }
- }
-</script>
-
-<style scoped lang="scss">
-
-</style>
\ No newline at end of file
--
Gitblit v1.9.3