Browse Source

样式调整

master
parent
commit
a6ac1c6c6d
  1. 4
      components/cs-dict-tag/index.vue
  2. 19
      components/cs-text-more/index.vue
  3. 4
      config.js
  4. 15
      pages.json
  5. 174
      pages/enterprise.vue
  6. 207
      pages/index.vue
  7. 51
      pages/owner.vue
  8. 136
      pages/task.vue
  9. BIN
      static/favicon.png
  10. BIN
      static/images/owner/bill.png
  11. BIN
      static/images/owner/message-grey.png
  12. BIN
      static/images/owner/policy.png
  13. BIN
      static/images/tabbers/home-select.png
  14. BIN
      static/images/tabbers/home.png
  15. BIN
      static/images/tabbers/logo.png
  16. BIN
      static/images/tabbers/position-select.png
  17. BIN
      static/images/tabbers/position.png
  18. BIN
      static/images/tabbers/task-select.png
  19. BIN
      static/images/tabbers/task.png
  20. BIN
      static/images/tabbers/user-select.png
  21. BIN
      static/images/tabbers/user.png
  22. 24
      static/scss/global.scss
  23. 4
      static/scss/index.scss
  24. 72
      sub/enterprise/detail.vue
  25. 59
      sub/inspection/detail.vue
  26. 3
      sub/inspection/record.vue
  27. 242
      sub/owner/notic.vue
  28. 0
      sub/owner/notice-detail.vue
  29. 38
      sub/owner/policy-detail.vue
  30. 118
      sub/owner/policy.vue
  31. 206
      sub/task/detail.vue
  32. 33
      sub/task/enforce.vue
  33. 2
      sub/task/locate.vue
  34. 166
      sub/task/record.vue
  35. 1125
      uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue
  36. 4
      uni_modules/qiun-data-charts/js_sdk/u-charts/config-echarts.js
  37. 595
      uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js
  38. 14675
      uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.js
  39. 7542
      uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.min.js
  40. 51
      uni_modules/s-components/s-header/index.vue
  41. 17
      uni_modules/s-components/s-tabber/index.vue
  42. 330
      uni_modules/uview-ui/components/u-count-to/u-count-to.vue
  43. 1079
      uni_modules/uview-ui/components/u-upload/u-upload.vue
  44. 1
      utils/request.js
  45. 33
      wxcomponents/vant/dropdown-item/index.wxss
  46. 1
      wxcomponents/vant/dropdown-menu/index.wxml
  47. 7
      wxcomponents/vant/dropdown-menu/index.wxs
  48. 8
      wxcomponents/vant/dropdown-menu/index.wxss

4
components/cs-dict-tag/index.vue

@ -97,9 +97,9 @@ export default {
color: #99a1b7;
}
.dict-tag {
min-width: 200rpx;
min-width: 212rpx;
text-align: center;
font-size: 24rpx;
padding: 16rpx 40rpx;
padding: 4rpx 40rpx;
}
</style>

19
components/cs-text-more/index.vue

@ -1,11 +1,10 @@
<template>
<view :style="{ color }">
<view :style="{ color: color }">
<view
style="
font-size: 26rpx;
font-size: 28rpx;
line-height: 160%;
position: relative;
transform: 0.2s all;
color: inherit;
white-space: normal;
"
@ -16,17 +15,16 @@
<view
v-else
style="
font-size: 26rpx;
font-size: 28rpx;
line-height: 160%;
position: relative;
transform: 0.2s all;
color: inherit;
white-space: normal;
"
@tap="isShowAllText = !isShowAllText"
@tap.native.stop="isShowAllText = !isShowAllText"
>
{{ isShowAllText ? value : `${value.slice(1, splitLength)}...` }}
<text style="color: #17c653; padding-left: 4px">
{{ isShowAllText ? value : `${value.slice(0, splitLength)}...` }}
<text style="color: #17c653; padding-left: 8rpx">
{{ isShowAllText ? '收起' : '展开' }}
</text>
</view>
@ -47,11 +45,12 @@ export default {
default: '文本简介'.repeat(20)
},
color: {
type: String
type: String,
default: '#4b5675'
},
splitLength: {
type: Number,
default: 100
default: 62
}
}
}

4
config.js

@ -1,8 +1,8 @@
// 应用全局配置
module.exports = {
// baseUrl: 'http://188.188.5.188:48080',
baseUrl: 'https://hb.jzce.com',
// baseUrl: 'http://188.188.3.232:48080',
// baseUrl: 'https://hb.jzce.com',
baseUrl: 'http://188.188.3.232:48080',
// baseUrl: 'http://localhost:48080',
baseApi: '/admin-api',
imgUrl: 'https://hb.jzce.com',

15
pages.json

@ -3,13 +3,15 @@
"path": "pages/login",
"style": {
"navigationBarTitleText": "登录",
"navigationStyle": "custom"
"navigationStyle": "custom",
"disableScroll": true
}
}, {
"path": "pages/index",
"style": {
"navigationBarTitleText": "首页",
"navigationStyle": "custom",
"disableScroll": true,
"usingComponents": {
"van-dropdown-menu": "/wxcomponents/vant/dropdown-menu/index",
"van-dropdown-item": "/wxcomponents/vant/dropdown-item/index"
@ -21,6 +23,7 @@
"style": {
"navigationBarTitleText": "企业",
"navigationStyle": "custom",
"disableScroll": true,
"usingComponents": {
"van-dropdown-menu": "/wxcomponents/vant/dropdown-menu/index",
"van-dropdown-item": "/wxcomponents/vant/dropdown-item/index",
@ -40,6 +43,7 @@
"style": {
"navigationBarTitleText": "任务",
"navigationStyle": "custom",
"disableScroll": true,
"usingComponents": {
"van-dropdown-menu": "/wxcomponents/vant/dropdown-menu/index",
"van-dropdown-item": "/wxcomponents/vant/dropdown-item/index",
@ -117,7 +121,7 @@
"componentPlaceholder": {}
}
},
{
"path": "enterprise/edit",
"style": {
@ -250,6 +254,13 @@
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "owner/notic",
"style": {
"navigationBarTitleText": "消息通知",
"disableScroll": true
}
}
]
}],

174
pages/enterprise.vue

@ -9,44 +9,47 @@
id="sreach"
@change="handleSearch"
/>
<van-dropdown-menu safe-area-tab-bar active-color="#17C653">
<van-dropdown-item
:value="queryParams.region"
:options="getDropdownOption('enterprises_area')"
@change="
v => {
querySelect(v, 'region')
}
"
/>
<van-dropdown-item
:value="queryParams.hy"
:options="getDropdownOption('hy')"
@change="
v => {
querySelect(v, 'hy')
}
"
/>
<van-dropdown-item
:value="queryParams.st"
:options="getDropdownOption('st')"
@change="
v => {
querySelect(v, 'st')
}
"
/>
<van-dropdown-item
:value="queryParams.wr"
:options="getDropdownOption('wr')"
@change="
v => {
querySelect(v, 'wr')
}
"
/>
</van-dropdown-menu>
<view class="drop-box">
<van-dropdown-menu active-color="#17C653">
<van-dropdown-item
:value="queryParams.region"
:options="getDropdownOption('enterprises_area')"
@change="
v => {
querySelect(v, 'region')
}
"
/>
<van-dropdown-item
:value="queryParams.hy"
:options="getDropdownOption('hy')"
@change="
v => {
querySelect(v, 'hy')
}
"
/>
<van-dropdown-item
:value="queryParams.st"
:options="getDropdownOption('st')"
@change="
v => {
querySelect(v, 'st')
}
"
/>
<van-dropdown-item
:value="queryParams.wr"
:options="getDropdownOption('wr')"
@change="
v => {
querySelect(v, 'wr')
}
"
/>
</van-dropdown-menu>
</view>
<scroll-view
scroll-y="true"
:refresher-enabled="true"
@ -68,11 +71,24 @@
shape="square"
size="64"
></u-avatar>
<view class="wd-flex wd-flex-col" style="gap: 4px">
<text class="wd-font-800 wd-text-15">
<view class="wd-flex wd-flex-col">
<text
class="wd-font-800 wd-text-15"
style="
padding-right: 3rem;
margin-bottom: 4rpx;
white-space: nowrap;
text-overflow: ellipsis;
width: 432rpx;
overflow: hidden;
"
>
{{ enterprise.enterprisesName }}
</text>
<view class="wd-flex wd-pb-8px">
<view
class="wd-flex"
style="margin-bottom: 16rpx; margin-top: 4rpx"
>
<u-icon name="map" size="14" color="#17C653"></u-icon>
<text class="address wd-text-12" style="margin-left: 4px">
{{ enterprise.address }}
@ -206,35 +222,37 @@ export default {
getDropdownOption(key) {
if (!this.dictMap[key]) return []
const keyMap = {
enterprises_area: '区域',
hy: '行业',
st: '生态',
wr: '污染'
enterprises_area: '区域',
hy: '行业',
st: '生态',
wr: '污染'
}
if (['enterprises_area'].includes(key)) {
return [
{
value: '',
text: keyMap[key]
},
...this.dictMap[key].map(i => {
return {
value: i.value,
text: i.label
}
}),
{
value: '',
text: keyMap[key]
}
})
]
}
const data = this.dictMap[key].map(d => {
return {
value: d.id,
text: d.tagName
}
})
data.push({
value: '',
text: keyMap[key]
})
const data = [
{
value: '',
text: keyMap[key]
},
...this.dictMap[key].map(d => {
return {
value: d.id,
text: d.tagName
}
})
]
return data
},
querySelect(v, key) {
@ -328,26 +346,14 @@ export default {
font-size: 24rpx;
.address {
color: $uni-text-color-grey;
white-space: nowrap;
text-overflow: ellipsis;
width: 448rpx;
overflow: hidden;
}
&:active {
background-color: $cs-color-touch;
}
.tagList {
margin-top: 16rpx;
display: flex;
gap: 8rpx;
color: $uni-text-color-grey;
flex-flow: row wrap;
.tag {
font-size: 24rpx;
display: flex;
padding: 4rpx 12rpx;
justify-content: center;
align-items: center;
border-radius: 4rpx;
background: #f9f9f9;
}
}
.audit {
position: absolute;
right: -38rpx;
@ -359,13 +365,17 @@ export default {
text-align: center;
}
}
::v-deep .van-dropdown-menu {
box-shadow: none;
height: 70rpx;
font-size: 26rpx;
border-bottom: 1px solid #f1f1f4;
.drop-box {
padding: 24rpx;
border-bottom: 2rpx solid #f1f1f4;
background-color: #fff;
::v-deep .van-dropdown-menu {
box-shadow: none;
height: fit-content !important;
font-size: 26rpx;
padding: 12rpx 24rpx;
}
}
::v-deep .u-list {
padding: 24rpx;
}

207
pages/index.vue

@ -1,33 +1,35 @@
<template>
<cs-page :selected="0" title="智慧生态" isTab>
<cs-page :selected="0" isTab title="智慧环保">
<view class="view-container">
<van-dropdown-menu safe-area-tab-bar active-color="#17C653">
<van-dropdown-item
:value="queryParams.deptId"
:options="dropOption.dept"
use-before-toggle
@before-toggle="dorpToggle"
@change="
v => {
querySelect(v, 'deptId')
}
"
/>
<van-dropdown-item
:value="queryParams.selectWeek"
:options="dropOption.select_week"
@change="
v => {
querySelect(v, 'selectWeek')
}
"
/>
</van-dropdown-menu>
<view class="drop-box">
<van-dropdown-menu active-color="#17C653">
<van-dropdown-item
:value="queryParams.deptId"
:options="dropOption.dept"
title="按部门"
@change="
v => {
querySelect(v, 'deptId')
}
"
></van-dropdown-item>
<van-dropdown-item
:value="queryParams.selectWeek"
:options="dropOption.select_week"
title="按周期"
@change="
v => {
querySelect(v, 'selectWeek')
}
"
/>
</van-dropdown-menu>
</view>
<scroll-view
:scroll-y="true"
:style="{ maxHeight: `${viewHeigth}px` }"
class="view"
:refresher-enabled="true"
class="view"
@refresherrefresh="refresherrefresh"
:refresher-triggered="refresherTriggered"
@refresherpulling="refresherpulling"
@ -39,43 +41,43 @@
>
<view
class="wd-flex wd-flex-col wd-flex-center"
style="gap: 4px"
style="gap: 8rpx"
>
<u-count-to
:start-val="0"
:end-val="detail.taskCount"
bold
font-size="24"
blod="500"
color="#071437"
class="number"
></u-count-to>
<view class="">任务数量</view>
<view style="color: #4b5675">任务数量</view>
</view>
<view
class="wd-flex wd-flex-col wd-flex-center"
style="gap: 4px"
style="gap: 8rpx"
>
<u-count-to
:start-val="0"
:end-val="detail.inspectionsCount"
bold
font-size="24"
blod="500"
color="#071437"
></u-count-to>
<view class="">执法记录</view>
<view style="color: #4b5675">执法记录</view>
</view>
<view
class="wd-flex wd-flex-col wd-flex-center"
style="gap: 4px"
style="gap: 8rpx"
>
<u-count-to
:start-val="0"
:end-val="detail.enterpriseCount"
bold
font-size="24"
blod="500"
color="#071437"
></u-count-to>
<view class="">企业数量</view>
<view style="color: #4b5675">企业数量</view>
</view>
</view>
<qiun-data-charts
@ -117,7 +119,6 @@
<u-count-to
:start-val="0"
:end-val="Number(item.value)"
bold
font-size="16"
color="#071437"
></u-count-to>
@ -130,13 +131,13 @@
<view class="box row-1">
<view
class="wd-flex"
style="margin-top: 12px; justify-content: center"
style="margin-top: 24rpx; justify-content: center"
>
<view
style="
background-color: #f9f9f9;
display: inline-flex;
padding: 4px;
padding: 8rpx;
"
>
<view
@ -158,7 +159,7 @@
? '#071437'
: '#78829d',
fontWeight:
queryParams.type == item.type ? '800' : 'normal'
queryParams.type == item.type ? 'bold' : '400'
}"
>
{{ item.name }}
@ -166,15 +167,15 @@
</view>
</view>
</view>
<view style="min-height: 220px">
<view style="min-height: 440rpx">
<view
v-for="(item, index) in list"
:key="index"
class="wd-flex"
style="justify-content: space-between; padding: 12px"
style="justify-content: space-between; padding: 24rpx"
>
<view class="wd-font-800">{{ item.name }}</view>
<view class="wd-font-800" style="color: #17c653">
<view class="wd-font-500">{{ item.name }}</view>
<view class="wd-font-500" style="color: #17c653">
<view>
<u-count-to
:start-val="0"
@ -202,7 +203,7 @@ export default {
return {
dictMap: {},
queryParams: {
selectWeek: '',
selectWeek: '3',
deptId: '',
type: 1
},
@ -212,7 +213,7 @@ export default {
viewHeigth: 0,
tabs: [
{
name: '资质期',
name: '资质期',
type: 1
},
{
@ -223,7 +224,7 @@ export default {
refresherTriggered: false,
list: [],
dropOption: {},
color: ['#1B84FF', '#7239EA', '#F6B100', '#F8285A', '#17C653']
color: []
}
},
onLoad: async function () {
@ -231,11 +232,11 @@ export default {
uni.hideTabBar({
animation: false
})
this.getDict()
await this.getDict()
if (!this.$roles.checkRole(['director'])) {
this.queryParams.deptId = this.$store.getters.deptId
}
this.init()
await this.init()
},
onReady() {
this.$nextTick(() => {
@ -250,39 +251,55 @@ export default {
const query = uni.createSelectorQuery().in(this)
query
.select('.view-container')
.boundingClientRect(data => {
this.viewHeigth = data.height - 35 - 25
.boundingClientRect()
.select('.drop-box')
.boundingClientRect()
.select('.cs-tabber-container')
.boundingClientRect()
.exec(res => {
this.viewHeigth = res[0].height - res[1].height
})
.exec()
},
async getDict() {
const dict = await getDictBatchByType({
type: ['select_week'].join(',')
})
const dept = await getDeptTree()
this.dropOption.dept = [
...dept.data.map(i => {
return {
value: i.id,
text: i.name
if (!this.$roles.checkRole(['director'])) {
this.dropOption.dept = [
...dept.data
.filter(i => {
return i.id == this.$store.getters.deptId
})
.map(i => {
return {
value: i.id,
text: i.name
}
})
]
} else {
this.dropOption.dept = [
...dept.data.map(i => {
return {
value: i.id,
text: i.name
}
}),
{
value: '',
text: '全部'
}
}),
{
value: '',
text: '全部'
}
]
]
}
this.dropOption.select_week = [
...dict.data.select_week.map(i => {
return {
value: i.value,
text: i.label
}
}),
{
value: '',
text: '全部'
}
})
]
},
async init() {
@ -305,6 +322,7 @@ export default {
colorMap.push(color)
return res
})
colorMap.push('#F9F9F9')
this.color = colorMap
this.detail.legendData = data
this.setPieData(data, this.detail.taskCompletionRate)
@ -322,10 +340,9 @@ export default {
}
})
if (Number(max) < 100) {
pieData.push({
pieData.splice(pieData.length, 0, {
name: '',
value: 100 - Number(max),
color: '#F9F9F9'
value: 100 - Number(max)
})
}
this.opts = {
@ -341,9 +358,7 @@ export default {
title: {
name: `${max}%`,
fontSize: 24,
color: '#071437',
fontWeight: 'bold',
fontFamily: 'Tahoma'
color: '#071437'
},
subtitle: {
name: '完成率',
@ -366,7 +381,7 @@ export default {
this.chartData = {
series: [
{
data: pieData
data: [...pieData]
}
]
}
@ -394,13 +409,7 @@ export default {
refresherrefresh() {
this.init()
},
dorpToggle(e) {
if (!this.$roles.checkRole(['director'])) {
e.detail.callback(false)
} else {
e.detail.callback(true)
}
},
numFilter(value) {
//
let tempVal = parseFloat(value).toFixed(3)
@ -420,33 +429,24 @@ export default {
.view-container {
height: 100%;
}
.number {
font-family: 'Tahoma';
}
::v-deep .u-count-num {
font-family: 'Tahoma';
}
.view {
padding: 0 24rpx;
padding-bottom: 24rpx;
display: flex;
gap: 24rpx;
flex-flow: column nowrap;
padding: 0 24rpx 48rpx;
.box {
padding: 24rpx;
background-color: #fff;
border: 2rpx solid #f9f9f9;
border-radius: 24rpx;
margin-top: 24rpx;
&:last-child {
margin-bottom: 24rpx;
}
}
.row-1 {
display: flex;
flex-flow: column nowrap;
gap: 24rpx;
margin-top: 24rpx;
&:last-child {
margin-bottom: 84rpx;
}
}
.people-name {
max-width: 4rem;
@ -454,10 +454,11 @@ export default {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
color: #4b5675;
}
.tab {
position: relative;
padding: 16rpx 32rpx;
padding: 8rpx 32rpx;
.name {
z-index: 2;
position: inherit;
@ -474,10 +475,18 @@ export default {
}
}
}
::v-deep .van-dropdown-menu {
box-shadow: none;
height: 70rpx !important;
font-size: 26rpx;
.drop-box {
padding: 24rpx;
border-bottom: 2rpx solid #f1f1f4;
background-color: #fff;
::v-deep .van-dropdown-menu {
box-shadow: none;
height: fit-content !important;
font-size: 26rpx;
padding: 8rpx 24rpx;
}
::v-deep .van-dropdown-item {
margin-bottom: 64rpx;
}
}
</style>

51
pages/owner.vue

@ -26,13 +26,16 @@
<u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="section wd-flex wd-flex-row wd-justify-between">
<view class="wd-flex wd-flex-row" style="gap: 8px">
<view
class="section wd-flex wd-flex-row wd-justify-between"
@click="openSubMessage"
>
<view class="wd-flex wd-flex-row" style="gap: 16rpx">
<u--image
src="/static/images/owner/message.png"
width="20px"
height="20px"
mode="aspectFit"
width="40rpx"
height="40rpx"
mode="aspectFill"
></u--image>
<text class="wd-font-800">消息通知</text>
</view>
@ -48,7 +51,6 @@
<view
class="wd-flex wd-flex-row wd-items-center"
style="gap: 16rpx"
@click="openSubMessage"
>
<text></text>
<u-icon name="arrow-right"></u-icon>
@ -81,9 +83,9 @@
<view class="wd-flex wd-flex-row" style="gap: 16rpx">
<u--image
src="/static/images/owner/list.png"
width="20px"
height="20px"
mode="aspectFit"
width="40rpx"
height="40rpx"
mode="aspectFill"
></u--image>
<text class="wd-font-800">政策法规</text>
</view>
@ -108,9 +110,9 @@
<view class="wd-flex wd-flex-row" style="gap: 16rpx">
<u--image
src="/static/images/owner/edit.png"
width="20px"
height="20px"
mode="aspectFit"
width="40rpx"
height="40rpx"
mode="aspectFill"
></u--image>
<text class="wd-font-800">企业入驻</text>
</view>
@ -128,9 +130,9 @@
<view class="wd-flex wd-flex-row" style="gap: 16rpx">
<u--image
src="/static/images/owner/phone.png"
width="20px"
height="20px"
mode="aspectFit"
width="40rpx"
height="40rpx"
mode="aspectFill"
></u--image>
<text class="wd-font-800">内部专线</text>
</view>
@ -148,10 +150,10 @@
>
<view class="wd-flex wd-flex-row" style="gap: 16rpx">
<u--image
src="/static/images/owner/edit.png"
width="20px"
height="20px"
mode="aspectFit"
src="/static/images/owner/bill.png"
width="40rpx"
height="40rpx"
mode="aspectFill"
></u--image>
<text class="wd-font-800">工作汇报</text>
</view>
@ -215,8 +217,10 @@ export default {
uni.requestSubscribeMessage({
//ID
tmplIds: ['E8RK91cPLMios6ZHoKx6FJOV4H2kodx6yPWYp7jpLJY'],
success(res) {
console.log('requestSubscribeMessage', res)
complete(res) {
uni.navigateTo({
url: '/sub/owner/notic'
})
}
})
},
@ -225,13 +229,12 @@ export default {
url: '/sub/owner/edit'
})
},
invite() {
this.share = {
title: '邀请企业入驻', //
path: `/pages/login?inviteId=${this.$store.getters.userId}`,
imageUrl:
'https://hb.jzce.com/fx_qyrz.png'
imageUrl: 'https://hb.jzce.com/fx_qyrz.png'
}
},
callPhone() {

136
pages/task.vue

@ -1,44 +1,38 @@
<template>
<cs-page :selected="1" title="执法任务" isTab>
<view class="page-container page">
<van-dropdown-menu safe-area-tab-bar active-color="#17C653">
<van-dropdown-item
:value="queryParams.status"
:options="getDropdownOption('task_state')"
@change="
v => {
querySelect(v, 'status')
}
"
/>
<van-dropdown-item
:value="queryParams.priority"
:options="getDropdownOption('task_priority')"
@change="
v => {
querySelect(v, 'priority')
}
"
/>
<van-dropdown-item
:value="queryParams.zf_lx"
:options="getDropdownOption('zf_lx')"
@change="
v => {
querySelect(v, 'zf_lx')
}
"
/>
<van-dropdown-item
:value="queryParams.select_week"
:options="getDropdownOption('select_week')"
@change="
v => {
querySelect(v, 'select_week')
}
"
/>
</van-dropdown-menu>
<view class="drop-box">
<van-dropdown-menu active-color="#17C653">
<van-dropdown-item
:value="queryParams.status"
:options="getDropdownOption('task_state')"
@change="
v => {
querySelect(v, 'status')
}
"
/>
<van-dropdown-item
:value="queryParams.zf_lx"
:options="getDropdownOption('zf_lx')"
@change="
v => {
querySelect(v, 'zf_lx')
}
"
/>
<van-dropdown-item
:value="queryParams.select_week"
:options="getDropdownOption('select_week')"
@change="
v => {
querySelect(v, 'select_week')
}
"
/>
</van-dropdown-menu>
</view>
<scroll-view
scroll-y="true"
:refresher-enabled="true"
@ -72,19 +66,27 @@
fontSize="16"
bold
duration="1000"
color="#071437"
></u-count-to>
%
<text style="color: #071437; font-size: 24rpx">%</text>
</template>
</van-circle>
</view>
<view class="wd-flex wd-flex-col" style="gap: 8rpx">
<view class="wd-flex wd-flex-col">
<text
class="wd-font-800 wd-text-15 wd-pb-2px"
style="padding-right: 3rem"
class="wd-font-800 wd-text-15"
style="
padding-right: 3rem;
margin-bottom: 4rpx;
white-space: nowrap;
text-overflow: ellipsis;
width: 432rpx;
overflow: hidden;
"
>
{{ task.title }}
</text>
<view class="wd-flex wd-pb-8px">
<view class="wd-flex" style="margin-top: 4rpx">
<u-icon
name="calendar"
size="18"
@ -92,7 +94,7 @@
></u-icon>
<text
class="address wd-text-12"
style="margin-left: 8rpx"
style="margin-left: 4rpx"
:style="{
color: task.status == '2' ? '#17C653' : '#78829D'
}"
@ -102,7 +104,7 @@
}}结束
</text>
</view>
<view class="tagList">
<view class="tagList" style="margin-top: 16rpx">
<view class="tag" v-if="task.deptName">
{{ task.deptName }}
</view>
@ -223,28 +225,28 @@ export default {
const keyMap = {
task_priority: '按等级',
zf_lx: '按类型',
task_state: '按状态',
task_state: '按发布',
select_week: '按周期'
}
if (['zf_lx'].includes(key)) {
return [
{ value: '', text: keyMap[key] },
...this.dictMap[key].map(d => {
return {
value: d.id,
text: d.tagName
}
}),
{ value: '', text: keyMap[key] }
})
]
} else {
return [
{ value: '', text: keyMap[key] },
...this.dictMap[key].map(d => {
return {
value: d.value,
text: d.label
}
}),
{ value: '', text: keyMap[key] }
})
]
}
},
@ -322,44 +324,34 @@ export default {
position: relative;
overflow: hidden;
font-size: 24rpx;
border: 1px solid var(--LightMode-Grey-Grey-100, #f9f9f9);
&:active {
background-color: $cs-color-touch;
}
.address {
color: $uni-text-color-grey;
}
.tagList {
margin-top: 16rpx;
display: flex;
gap: 8rpx;
color: $uni-text-color-grey;
display: flex;
.tag {
font-size: 24rpx;
display: flex;
padding: 4rpx 12rpx;
justify-content: center;
align-items: center;
border-radius: 4rpx;
background: #f9f9f9;
}
}
.audit {
position: absolute;
right: 0;
top: 0;
transform-origin: 50% 50%;
transform: translateX(28px) translateY(9px) rotateZ(45deg);
transform: translateX(33px) translateY(9px) rotateZ(45deg);
}
.rate {
position: relative;
}
}
::v-deep .van-dropdown-menu {
box-shadow: none;
height: 70rpx !important;
font-size: 26rpx;
border-bottom: 1px solid #f1f1f4;
.drop-box {
padding: 24rpx;
border-bottom: 2rpx solid #f1f1f4;
background-color: #fff;
::v-deep .van-dropdown-menu {
box-shadow: none;
height: fit-content !important;
font-size: 26rpx;
padding: 12rpx 24rpx;
}
}
::v-deep .u-list {

BIN
static/favicon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

BIN
static/images/owner/bill.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

BIN
static/images/owner/message-grey.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
static/images/owner/policy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 990 B

BIN
static/images/tabbers/home-select.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 B

After

Width:  |  Height:  |  Size: 792 B

BIN
static/images/tabbers/home.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 701 B

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/images/tabbers/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
static/images/tabbers/position-select.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 600 B

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
static/images/tabbers/position.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 873 B

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/images/tabbers/task-select.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 553 B

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
static/images/tabbers/task.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 774 B

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/images/tabbers/user-select.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 464 B

After

Width:  |  Height:  |  Size: 777 B

BIN
static/images/tabbers/user.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 671 B

After

Width:  |  Height:  |  Size: 1.2 KiB

24
static/scss/global.scss

@ -9,6 +9,10 @@ page {
color: #071437;
}
view {
box-sizing: border-box;
}
button {
padding-left: 0;
padding-right: 0;
@ -23,3 +27,23 @@ button {
::v-deep .uni-calendar__box {
padding-bottom: 32px;
}
.tagList {
display: flex;
align-items: center;
gap: 16rpx;
.tag {
display: flex;
padding: 4rpx 12rpx;
justify-content: center;
align-items: center;
border-radius: 4rpx;
background: var(--LightMode-Grey-Grey-100, #f9f9f9);
color: var(--LightMode-Grey-Grey-600, #78829d);
text-align: center;
font-size: 24rpx;
font-style: normal;
font-weight: 400;
line-height: normal;
}
}

4
static/scss/index.scss

@ -10,3 +10,7 @@
border-radius: 50%;
box-shadow: 0 0 4px 2px $cs-shadow-color;
}
* {
box-sizing: border-box;
}

72
sub/enterprise/detail.vue

@ -7,8 +7,19 @@
</text>
</view>
<view class="address" @click="goView(detail)">
<u-icon name="map" size="14" color="#17C653"></u-icon>
<text style="text-decoration: underline">
<u-icon name="map" size="28rpx" color="#17C653"></u-icon>
<text
style="
text-decoration: underline;
color: #071437;
font-size: 26rpx;
padding-right: 3rem;
white-space: nowrap;
text-overflow: ellipsis;
width: 528rpx;
overflow: hidden;
"
>
{{ detail.address }}
</text>
</view>
@ -25,28 +36,31 @@
</view>
</view>
<view class="wd-flex" style="align-items: center">
<text class="address" style="margin-right: 12rpx">环保负责人</text>
<text style="margin-right: 12rpx">
<text class="address" style="margin-right: 24rpx">环保负责人</text>
<text style="margin-right: 24rpx; color: #071437">
{{ detail.contactName }}
</text>
<text class="address" style="margin-right: 12rpx">联系方式</text>
<text style="text-decoration: underline" @click="callPhone(detail.environmentalContactPhone)">
<text class="address" style="margin-right: 24rpx">联系方式</text>
<text
style="text-decoration: underline; color: #071437"
@click="callPhone(detail.environmentalContactPhone)"
>
{{ detail.environmentalContactPhone }}
</text>
</view>
<view class="images-box">
<view
class="images-box"
@click="$util.perviewImage(detail.files.map(i => i.url))"
>
<image
v-for="(src, index) in detail.files"
:key="index"
:src="src.url"
mode="aspectFit"
mode="aspectFill"
class="image"
></image>
</view>
<cs-text-more
color="#4B5675"
:value="detail.introduction"
></cs-text-more>
<cs-text-more :value="detail.introduction"></cs-text-more>
<!-- <view class="status">
<cs-dict-tag
:dict="dictMap.enterprises_status"
@ -62,17 +76,18 @@
>
<view class="wd-flex" style="gap: 18rpx; position: relative">
<image
src="@/static/images/enterprise/zz.png"
style="width: 90px; height: 70px"
mode="aspectFit"
:src="prove.files[0].url"
style="width: 180rpx; height: 140rpx"
mode="aspectFill"
@click="$util.perviewImage([prove.files[0].url])"
></image>
<view
style="flex: 1; justify-content: space-between"
class="wd-flex wd-flex-col"
>
<view class="wd-flex" style="gap: 18rpx; align-items: center">
<text class="label">资质名称</text>
<view>
<text class="label" style="color: #78829d">资质名称</text>
<view style="color: #071437">
{{
$dict.echoDicValue(
dictMap.enterprise_qua,
@ -83,13 +98,13 @@
</view>
<view class="wd-flex" style="gap: 18rpx; align-items: center">
<text class="label">资质编号</text>
<view>
<view style="color: #071437">
{{ prove.enterpriseAuth }}
</view>
</view>
<view class="wd-flex" style="gap: 18rpx; align-items: center">
<text class="label">资质时限</text>
<view>
<view style="color: #071437">
{{ $util.formatDate(prove.expiryDate, 'YYYY年M月D日') }}
</view>
</view>
@ -203,11 +218,11 @@ export default {
...dict.data
}
},
callPhone(number) {
uni.makePhoneCall({
phoneNumber: number
})
},
callPhone(number) {
uni.makePhoneCall({
phoneNumber: number
})
},
async init() {
const res = await getEnterPrise(this.detail.id)
this.detail = res.data
@ -316,13 +331,10 @@ export default {
overflow: hidden;
.status {
position: absolute;
right: -38rpx;
top: 12rpx;
transform: rotateZ(45deg) translateX(40rpx) translateY(-40rpx);
right: 0;
top: 0;
transform: rotateZ(45deg) translateX(60rpx) translateY(-41rpx);
transform-origin: 50% 50%;
padding: 8rpx 40rpx;
font-size: 24rpx;
text-align: center;
}
}
.images-box {

59
sub/inspection/detail.vue

@ -1,13 +1,21 @@
<template>
<scroll-view scroll-y flex-enable class="view-container" st>
<scroll-view scroll-y flex-enable class="view-container">
<view
class="box"
@tap="goDetail(task)"
v-for="task in list"
:key="task.id"
>
<view class="wd-font-800">{{ task.title }}</view>
<view class="wd-font-bold" style="color: #071437">
{{ task.title }}
</view>
<view class="tagList">
<view class="tag" v-if="task.deptName">
{{ task.deptName }}
</view>
<view class="tag" v-if="task.priority">
{{ $dict.echoDicValue(dictMap.task_priority, task.priority) }}
</view>
<view
v-for="(tag, index) in task.tagList"
:key="index"
@ -20,9 +28,9 @@
class="wd-flex wd-text-13"
style="justify-content: space-between"
>
<view class="wd-flex" style="align-items: center; gap: 4px">
<view class="wd-flex" style="align-items: center; gap: 8rpx">
<u-icon name="calendar" color="#17C653" />
<text class="wd-text-13 wd-ml-4px">
<text class="wd-text-13 wd-ml-4px" style="color: #252f4a">
{{
`${$util.formatDate(
task.startDate,
@ -36,11 +44,16 @@
<view class="status">
<cs-dict-tag
:dict="dictMap.task_state"
:value="task.taskType"
:value="task.status"
></cs-dict-tag>
</view>
</view>
<u-loadmore :status="load" marginTop="12" marginBottom="12" />
<u-loadmore
:status="load"
marginTop="12"
marginBottom="12"
v-if="load != 'nomore'"
/>
</scroll-view>
</template>
@ -80,7 +93,7 @@ export default {
*/
async getDict() {
const dict = await getDictBatchByType({
type: ['task_state'].join(',')
type: ['task_state', 'task_priority'].join(',')
})
this.dictMap = {
...dict.data
@ -128,39 +141,19 @@ export default {
<style lang="scss" scoped>
.view-container {
padding: 12px;
padding: 24rpx;
flex-direction: column;
white-space: nowrap;
.box {
border-radius: 12px;
padding: 12px;
border-radius: 24rpx;
padding: 24rpx;
display: flex;
flex-direction: column;
gap: 12px;
gap: 24rpx;
background-color: #fff;
position: relative;
margin-bottom: 12px;
margin-bottom: 24rpx;
overflow: hidden;
.tagList {
display: flex;
align-items: center;
gap: var(--Number-4px, 4px);
.tag {
display: flex;
padding: var(--Number-2px, 2px) var(--Number-6px, 6px);
justify-content: center;
align-items: center;
gap: var(--Number-4px, 4px);
border-radius: var(--Number-2px, 2px);
background: var(--LightMode-Grey-Grey-100, #f9f9f9);
color: var(--LightMode-Grey-Grey-600, #78829d);
text-align: center;
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: normal;
}
}
.status {
position: absolute;
right: -19px;
@ -168,7 +161,7 @@ export default {
transform: rotateZ(45deg) translateX(20px) translateY(-20px);
transform-origin: 50% 50%;
padding: 4px 20px;
font-size: 12px;
font-size: 24rpx;
text-align: center;
}
}

3
sub/inspection/record.vue

@ -138,7 +138,8 @@ export default {
.image {
width: 192rpx;
height: 192rpx;
border-radius: 8px;
border-radius: 16rpx;
flex-shrink: 0;
}
}
}

242
sub/owner/notic.vue

@ -0,0 +1,242 @@
<template>
<view class="container">
<!-- Tab 切换 -->
<view class="tab-container">
<view
v-for="(tab, index) in tabs"
:key="index"
class="tab-item"
:class="{ active: currentTab === index }"
@tap="switchTab(index)"
>
<text>{{ tab.name }}</text>
<text v-if="tab.count > 0" class="badge">{{ tab.count }}</text>
</view>
</view>
<!-- 列表内容 -->
<scroll-view
class="scroll-container"
scroll-y
@scrolltolower="loadMore"
@refresherrefresh="onRefresh"
refresher-enabled
:refresher-triggered="isRefreshing"
>
<view
v-for="(item, index) in list"
:key="index"
:class="['notice-item', !item.type ? 'is-read' : '']"
@tap="goDetail(item)"
>
<view :class="['notice-icon', !item.type ? 'green' : '']">
<image
:src="
!item.type
? '/static/images/owner/message.png'
: '/static/images/owner/message-grey.png'
"
mode="aspectFill"
></image>
</view>
<view class="notice-content">
<view class="notice-title">{{ item.title }}</view>
<view class="notice-time">{{ item.time }}</view>
</view>
<view class="notice-arrow">
<text class="iconfont icon-right"></text>
</view>
</view>
<cs-emty v-if="list.length == 0"></cs-emty>
</scroll-view>
</view>
</template>
<script>
export default {
data() {
return {
tabs: [
{ name: '任务通知', count: 4 },
{ name: '整改到期', count: 0 },
{ name: '资质逾期', count: 0 }
],
currentTab: 0,
list: [],
mock: [
{
id: 1,
title: '全区餐饮环保检查全区餐饮环保检查全区餐饮环保检查...',
time: '2025年3月18日 - 2025年3月18日',
icon: '/static/images/notice-icon.png',
type: 0
},
{
id: 2,
title: '餐饮店卫生检查通知',
time: '2025年3月15日 - 2025年3月20日',
icon: '/static/images/notice-icon.png',
type: 0
},
{
id: 3,
title: '消防安全整改通知',
time: '2025年3月10日 - 2025年3月25日',
icon: '/static/images/notice-icon.png',
type: 1
},
{
id: 4,
title: '营业执照即将到期提醒',
time: '2025年4月1日到期',
icon: '/static/images/notice-icon.png',
type: 1
}
],
page: 1,
isRefreshing: false,
hasMore: true //
}
},
onLoad() {
this.getList()
},
methods: {
switchTab(index) {
if (this.currentTab === index) return
this.currentTab = index
this.page = 1
this.list = []
this.getList()
},
async getList() {
if (this.currentTab == 0) {
this.list = [...this.mock, ...this.mock]
}
},
async loadMore() {
if (!this.hasMore) return //
this.page++
await this.getList()
},
async onRefresh() {
try {
this.isRefreshing = true
this.page = 1
await this.getList()
} finally {
this.isRefreshing = false
}
},
goDetail(item) {
// //
// uni.navigateTo({
// url: `/pages/notice-detail/notice-detail?id=${item.id}`,
// });
}
}
}
</script>
<style lang="scss" scoped>
.container {
height: 100vh;
display: flex;
flex-direction: column;
}
.tab-container {
display: flex;
background: #fff;
padding: 24rpx 32rpx;
gap: 24rpx;
border-bottom: 2rpx solid var(--LightMode-Grey-Grey-100, #f9f9f9);
.tab-item {
flex: 1;
text-align: center;
position: relative;
height: 64rpx;
line-height: 64rpx;
font-size: 28rpx;
color: #4b5675;
background: #f9f9f9;
border-radius: 240rpx;
&.active {
color: #07c160;
background: rgba(7, 193, 96, 0.1);
font-weight: bold;
}
.badge {
margin-left: 8rpx;
color: #07c160;
}
}
}
.scroll-container {
flex: 1;
box-sizing: border-box;
max-height: calc(100vh - 124rpx);
padding: 0 24rpx;
}
.notice-item {
display: flex;
align-items: center;
padding: 32rpx 24rpx;
border-radius: 16rpx;
border: 2rpx solid #f9f9f9;
background: #fff;
color: #4b5675;
margin-top: 24rpx;
&:last-child {
margin-bottom: 48rpx;
}
.notice-icon {
padding: 16rpx;
border-radius: 50%;
background-color: #f9f9f9;
box-sizing: border-box;
margin-right: 24rpx;
display: flex;
justify-content: center;
align-items: center;
image {
width: 40rpx;
height: 40rpx;
flex-shrink: 0;
z-index: 1;
}
}
.green {
background-color: #eafff1;
}
.notice-content {
flex: 1;
.notice-title {
margin-bottom: 10rpx;
font-weight: bold;
max-width: 486rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.notice-time {
}
}
.notice-arrow {
color: #c4cada;
font-size: 24rpx;
}
}
.is-read {
color: #071437;
}
</style>

0
sub/owner/notice-detail.vue

38
sub/owner/policy-detail.vue

@ -1,12 +1,12 @@
<template>
<view class="policy-detail">
<!-- 详情内容区 -->
<view class="content-wrap">
<view class="policy-title">{{ policyDetail.name }}</view>
<view class="policy-time">生效时间{{ policyDetail.effectiveDate }}</view>
<view class="policy-time">
生效时间{{ policyDetail.effectiveDate }}
</view>
<!-- 富文本内容 -->
<view class="policy-content">
<rich-text :nodes="policyDetail.context"></rich-text>
@ -59,13 +59,19 @@ export default {
formatTime(time) {
if (!time) return ''
const date = new Date(time)
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, '0')}-${String(date.getDate()).padStart(2, '0')}`
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(
2,
'0'
)}-${String(date.getDate()).padStart(2, '0')}`
},
//
formatRichText(html) {
if (!html) return ''
//
return html.replace(/<img/gi, '<img style="max-width:100%;height:auto;display:block;"')
return html.replace(
/<img/gi,
'<img style="max-width:100%;height:auto;display:block;"'
)
},
//
handleBack() {
@ -93,12 +99,12 @@ export default {
padding: 0 30rpx;
border-bottom: 1rpx solid #eee;
z-index: 100;
.back-btn {
font-size: 28rpx;
color: #333;
}
.title {
flex: 1;
text-align: center;
@ -107,37 +113,37 @@ export default {
padding-right: 60rpx;
}
}
.content-wrap {
padding: 30rpx 30rpx 30rpx;
.policy-title {
font-size: 36rpx;
font-weight: bold;
color: #333;
margin-bottom: 20rpx;
}
.policy-time {
font-size: 24rpx;
color: #999;
margin-bottom: 40rpx;
}
.policy-content {
font-size: 28rpx;
line-height: 1.8;
color: #333;
color: #071437;
:deep(img) {
max-width: 100%;
height: auto;
}
:deep(p) {
margin-bottom: 20rpx;
}
}
}
}
</style>
</style>

118
sub/owner/policy.vue

@ -3,19 +3,19 @@
<view class="policy-container">
<!-- 搜索框区域 -->
<view class="search-box">
<van-search
:value="abc"
placeholder="输入关键字查询"
<van-search
:value="abc"
placeholder="输入关键字查询"
id="sreach"
@clear="handleClear"
@change="handleSearch"
/>
/>
</view>
<!-- 政策法规列表区域 -->
<!-- 修改列表项部分 -->
<view class="policy-list">
<scroll-view
<scroll-view
class="policy-scroll"
scroll-y
@scrolltolower="loadNextPage"
@ -23,25 +23,31 @@
refresher-enabled
:refresher-triggered="isRefreshing"
>
<view
<view
class="policy-item"
v-for="item in policyList"
:key="item.id"
@click="handlePolicyClick(item)"
>
<view class="item-left">
<image :src="itemImgUrl" class="policy-icon"></image>
<image
src="@/static/images/owner/policy.png"
class="policy-icon"
mode="aspectFit"
></image>
</view>
<view class="item-right">
<view class="policy-title">{{ item.title }}</view>
<view class="policy-time">生效时间: {{ item.effectiveDate }}</view>
<view class="policy-title">
{{ item.title }}
</view>
<view class="policy-time">
生效时间: {{ item.effectiveDate }}
</view>
</view>
</view>
</scroll-view>
</view>
<!-- 加载更多状态组件 -->
<uni-load-more :status="loadMoreStatus" />
</view>
@ -52,30 +58,29 @@ import { PolicyApi, formatPolicyContext } from '@/api/policy/index.js'
import { formatDate } from '@/utils/ruoyi.js'
import config from '@/config'
export default {
data() {
return {
isRefreshing: false, //
searchValue: '', //
abc: '',
abc: '',
policyList: [], //
pageNum: 1, //
pageSize: 10, //
total: 0, //
loadMoreStatus: 'more' ,// more- loading- noMore-
itemImgUrl: config.imgUrl + '/miniohb/c103c92335bdd30d33ff8a062c219ead0626bf0a1898536bd7590285ca11c9db.png'
loadMoreStatus: 'more', // more- loading- noMore-
itemImgUrl:
config.imgUrl +
'/miniohb/c103c92335bdd30d33ff8a062c219ead0626bf0a1898536bd7590285ca11c9db.png'
}
},
//
onShow() {
console.log(this.itemImgUrl)
console.log(this.itemImgUrl)
this.getPolicyList()
},
methods: {
//
onRefresh() {
this.isRefreshing = true
@ -83,42 +88,45 @@ export default {
this.getPolicyList()
},
loadNextPage() {
console.log('列表值',this.policyList.length)
if (this.policyList.length < this.total) {
this.pageNum++
this.getPolicyList()
}
},
console.log('列表值', this.policyList.length)
if (this.policyList.length < this.total) {
this.pageNum++
this.getPolicyList()
}
},
//
async getPolicyList() {
try {
console.log('PolicyApi',this.searchValue)
console.log('PolicyApi', this.searchValue)
this.loadMoreStatus = 'loading'
const res = await PolicyApi.getPolicyPage({
pageNum: this.pageNum,
pageSize: this.pageSize,
name: this.searchValue //
})
if (res.code === 0 && res.data.total > 0) {
//
const formattedData = res.data.list.map(item => ({
...item,
title: item.name.length > 15 ? item.name.slice(0, 15) + '...' : item.name,
effectiveDate: formatDate(item.effectiveDate,'YYYY年MM月DD日')
}))
title:
item.name.length > 15
? item.name.slice(0, 15) + '...'
: item.name,
effectiveDate: formatDate(item.effectiveDate, 'YYYY年MM月DD日')
}))
//
if (this.pageNum === 1) {
this.policyList = formattedData
} else {
this.policyList = [...this.policyList, ...formattedData]
}
console.log('列表信息',res)
console.log('列表信息', res)
this.total = res.data.total
//
this.loadMoreStatus = this.policyList.length >= this.total ? 'noMore' : 'more'
this.loadMoreStatus =
this.policyList.length >= this.total ? 'noMore' : 'more'
}
} catch (error) {
console.error(error)
@ -127,24 +135,23 @@ export default {
title: '获取列表失败',
icon: 'none'
})
}
finally {
this.loadMoreStatus = this.policyList.length >= this.total? 'noMore' :'more'
//
//
setTimeout(() => {
} finally {
this.loadMoreStatus =
this.policyList.length >= this.total ? 'noMore' : 'more'
//
//
setTimeout(() => {
this.isRefreshing = false
}, 300) //
}, 300) //
}
},
//
handleSearch(e) {
if(e.detail && e.detail.length > 1){
if (e.detail && e.detail.length > 1) {
this.pageNum = 1 //
this.searchValue = e.detail //
this.getPolicyList()
}
},
//
handleClear() {
@ -164,11 +171,11 @@ export default {
<style lang="scss">
.policy-container {
background: var(--LightMode-Secondary-Secondary, #F9F9F9);
background: var(--LightMode-Secondary-Secondary, #f9f9f9);
min-height: 100vh;
display: flex;
flex-direction: column;
.search-box {
padding: 20rpx;
background: #fff;
@ -178,16 +185,17 @@ export default {
right: 0;
z-index: 1;
}
.policy-list {
margin-top: 120rpx; //
flex: 1;
.policy-scroll {
height: calc(100vh - 120rpx);
box-sizing: border-box;
padding-top: 24rpx;
}
.policy-item {
display: flex;
padding: 24rpx;
@ -197,33 +205,33 @@ export default {
margin: 24rpx;
margin-bottom: 0;
border-radius: 16rpx;
border-bottom: 2rpx solid var(--LightMode-Grey-Grey-100, #f9f9f9);
.item-left {
border-radius: 100rpx;
background: var(--LightMode-Grey-Grey-100, #F9F9F9);
background: var(--LightMode-Grey-Grey-100, #f9f9f9);
padding: 16rpx;
display: flex;
justify-content: center;
align-items: center;
.policy-icon {
width: 40rpx;
height: 40rpx;
flex-shrink: 0;
}
}
.item-right {
flex: 1;
overflow: hidden;
.policy-title {
font-weight: bold;
margin-bottom: 8rpx;
font-size: 28rpx;
color: #333;
margin-bottom: 12rpx;
line-height: 1.4;
}
.policy-time {
font-size: 24rpx;
color: #999;
@ -238,4 +246,4 @@ export default {
::v-deep .uni-load-more {
padding: 24rpx 0;
}
</style>
</style>

206
sub/task/detail.vue

@ -3,14 +3,22 @@
<view
class="detail-container"
:style="{
paddingBottom: isSelect.length > 0 ? '70px' : '20px'
paddingBottom: isSelect.length > 0 ? '140rpx' : '40rpx'
}"
>
<view class="box detail">
<text class="wd-font-800 wd-text-16" style="margin-bottom: 4px">
<text class="wd-font-800 wd-text-16" style="color: #071437">
{{ detail.title }}
</text>
<view class="tagList">
<view class="tag" v-if="detail.deptName">
{{ detail.deptName }}
</view>
<view class="tag">
{{
$dict.echoDicValue(dictMap.task_priority, detail.priority)
}}
</view>
<view
v-for="(tag, index) in detail.tagList"
:key="index"
@ -23,48 +31,22 @@
class="wd-flex wd-text-13"
style="justify-content: space-between"
>
<view class="wd-flex" style="align-items: center; gap: 4px">
<u-icon name="calendar" color="#17C653" />
<text class="wd-text-13 wd-ml-4px">
<view class="wd-flex" style="align-items: center; gap: 8rpx">
<u-icon name="calendar" color="#17C653" size="16" />
<text
class="wd-text-13"
style="font-weight: bold; margin-right: 8rpx"
>
{{
`${$util.formatDate(
detail.startDate,
'YYYY/M/D'
)}~${$util.formatDate(detail.endDate, 'YYYY/M/D')}`
'YYYY年M月D日'
)} ${$util.formatDate(detail.endDate, 'YYYY年M月D日')}`
}}
</text>
</view>
</view>
<view
style="
font-size: 13px;
line-height: 160%;
position: relative;
transform: 0.2s all;
"
v-if="detail.description.length < 20"
>
{{ detail.description }}
</view>
<view
v-else
style="
font-size: 13px;
line-height: 160%;
position: relative;
transform: 0.2s all;
"
@tap="isShowAllText = !isShowAllText"
>
{{
isShowAllText
? detail.description
: `${detail.description.slice(1, 100)}...`
}}
<text style="color: #17c653; padding-left: 4px">
{{ isShowAllText ? '收起' : '展开' }}
</text>
</view>
<cs-text-more :value="detail.description" />
<view class="audit">
<cs-dict-tag
:dict="dictMap.task_state"
@ -89,7 +71,7 @@
<van-dropdown-item
v-if="showItem(['director'])"
:value="queryParams.departmentId"
:options="getDropdownOption('dept')"
:options="dropOption.dept"
@change="
v => {
querySelect(v, 'departmentId')
@ -110,7 +92,7 @@
/>
<van-dropdown-item
:value="queryParams.Inspections_status"
:options="getDropdownOption('Inspections_status')"
:options="dropOption.status"
@change="
v => {
querySelect(v, 'inspectionsStatus')
@ -118,7 +100,7 @@
"
/>
</van-dropdown-menu>
<view class="wd-font-600">
<view class="wd-font-600" style="flex: 0 0 200rpx">
(当前
<text style="color: #17c653">{{ list.length }}</text>
条记录)
@ -139,15 +121,27 @@
@tap.native.stop="select(record.id)"
v-if="['3', null].includes(record.inspectionStatus)"
>
<u-icon name="checkbox-mark" size="16px" color="#fff"></u-icon>
<u-icon name="checkbox-mark" size="16" color="#fff"></u-icon>
</view>
<view class="disable" v-else></view>
<view class="info">
<view class="name">{{ record.enterpriseName }}</view>
<view style="font-size: 1 3px">
<view class="name">
{{ record.enterpriseName }}
</view>
<view
style="
font-size: 26rpx;
padding-right: 3rem;
margin-bottom: 4rpx;
white-space: nowrap;
text-overflow: ellipsis;
width: 528rpx;
overflow: hidden;
"
>
{{ record.enterpriseAddress }}
</view>
<view class="tagList" style="margin-top: 8px">
<view class="tagList" style="margin-top: 16rpx">
<view
v-for="(item, index) in record.tagList"
:key="index"
@ -164,7 +158,12 @@
></cs-dict-tag>
</view>
</view>
<u-loadmore :status="load" marginTop="12" marginBottom="12" />
<u-loadmore
:status="load"
marginTop="12"
marginBottom="12"
v-if="load != 'nomore'"
/>
<view class="btn-box" v-if="isSelect.length > 0">
<view class="confirm-btn" @tap="replay">
已选择({{ isSelect.length }})
@ -263,12 +262,18 @@ export default {
value: '',
text: '按人员'
}
]
],
//
dropOption: {
dept: [],
userList: [],
status: []
}
}
},
onLoad(res) {
async onLoad(res) {
this.detail.id = res.id
this.getDict()
await this.getDict()
},
onPageScroll(e) {
this.OptionsOffset.isTop = e.scrollTop + 10 > this.OptionsOffset.top
@ -304,13 +309,42 @@ export default {
*/
async getDict() {
const dict = await getDictBatchByType({
type: ['task_state', 'Inspections_status'].join(',')
type: ['task_state', 'Inspections_status', 'task_priority'].join(
','
)
})
const dept = await getDeptTree()
this.dictMap = {
...dict.data,
dept: dept.data
}
this.dropOption = {
dept: [
{
value: '',
text: '按部门'
},
...dept.data.map(d => {
return {
value: d.id,
text: d.name
}
})
],
status: [
{
value: '',
text: '按状态'
},
...dict.data.task_state.map(d => {
return {
...d,
value: d.value,
text: d.label
}
})
]
}
},
getDropdownOption(key) {
const keyMap = {
@ -385,17 +419,17 @@ export default {
getUserOption({ detail }) {
this.getUser().then(res => {
this.userList = [
{
value: '',
text: '按人员'
},
...res.map(i => {
return {
...i,
value: i.userId,
text: i.realName
}
}),
{
value: '',
text: '按人员'
}
})
]
detail.callback(true)
})
@ -501,38 +535,18 @@ export default {
position: absolute;
right: 0;
top: 0;
transform: translateX(23px) translateY(16px) rotateZ(45deg);
transform: translateX(58rpx) translateY(24rpx) rotateZ(45deg);
transform-origin: 50% 50%;
}
}
.tagList {
display: flex;
align-items: center;
gap: var(--Number-4px, 4px);
.tag {
display: flex;
padding: var(--Number-2px, 2px) var(--Number-6px, 6px);
justify-content: center;
align-items: center;
gap: var(--Number-4px, 4px);
border-radius: var(--Number-2px, 2px);
background: var(--LightMode-Grey-Grey-100, #f9f9f9);
color: var(--LightMode-Grey-Grey-600, #78829d);
text-align: center;
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: normal;
}
}
.record {
background-color: #fff;
display: flex;
padding: 12px 16px;
padding: 24rpx 32rpx;
align-items: center;
border-radius: var(--Number-8px, 8px);
border: 1px solid var(--LightMode-Grey-Grey-100, #f9f9f9);
margin: 12px;
border: 2rpx solid var(--LightMode-Grey-Grey-100, #f9f9f9);
margin: 24rpx;
margin-top: 0;
position: relative;
overflow: hidden;
@ -541,45 +555,49 @@ export default {
right: 0;
top: 0;
transform-origin: 50% 50%;
transform: translateX(30px) translateY(10px) rotateZ(45deg);
transform: translateX(64rpx) translateY(18rpx) rotateZ(45deg);
}
.select {
width: 24px;
height: 24px;
border: 2px solid $cs-color-main;
border-radius: 6px;
width: 44rpx;
height: 44rpx;
border: 4rpx solid $cs-color-main;
border-radius: 12rpx;
display: flex;
align-items: center;
justify-content: center;
transition: 0.2s all;
margin-right: 16px;
margin-right: 32rpx;
}
.disable {
width: 24px;
height: 24px;
border: 2px solid #dbdfe9;
margin-right: 16px;
width: 44rpx;
height: 44rpx;
border: 4rpx solid #dbdfe9;
margin-right: 32rpx;
border-radius: 100%;
position: relative;
&::after {
content: '';
position: absolute;
inset: 0;
border-left: 2px solid #dbdfe9;
border-left: 4rpx solid #dbdfe9;
transform-origin: 0 50%;
transform: translateX(calc(50% - 1px)) rotateZ(45deg);
transform: translateX(calc(50% - 2rpx)) rotateZ(45deg);
}
}
.isSelect {
background-color: $cs-color-main;
}
.info {
font-size: 13px;
font-size: 26rpx;
.name {
font-size: 16px;
font-size: 32rpx;
font-weight: 600;
color: #071437;
margin-bottom: 4px;
margin-bottom: 8rpx;
white-space: nowrap;
text-overflow: ellipsis;
width: 480rpx;
overflow: hidden;
}
}
&:active {
@ -641,7 +659,7 @@ export default {
display: flex;
.info {
.name {
font-size: 16px;
font-size: 30rpx;
font-weight: bold;
}
.dept {

33
sub/task/enforce.vue

@ -46,7 +46,7 @@
>
<view style="font-weight: bold">
<text style="color: #f8285a; margin-right: 4px">*</text>
上传证明
上传照片
</view>
</view>
<u-upload
@ -54,9 +54,9 @@
@afterRead="addPhoto"
@delete="delPhoto"
multiple
:maxCount="3"
width="96px"
height="96px"
width="96"
height="96"
:maxCount="6"
></u-upload>
</view>
@ -272,29 +272,4 @@ export default {
::v-deep .uni-easyinput__content-textarea {
min-height: 400rpx;
}
::v-deep .u-upload__button {
border-radius: 16rpx !important;
border: 1px solid #f1f1f4;
background-color: #f9f9f9 !important;
}
::v-deep .u-upload__wrap {
.u-upload__wrap__preview {
width: 192rpx;
height: 192rpx;
border-radius: 16rpx !important;
overflow: visible !important;
.u-upload__wrap__preview__image {
border-radius: 16rpx !important;
}
.u-upload__deletable {
border-radius: 100% !important;
background-color: #f8285a !important;
transform: translateX(50%) translateY(-50%);
.u-upload__deletable__icon {
position: relative;
}
}
}
}
</style>

2
sub/task/locate.vue

@ -230,7 +230,7 @@ export default {
scene: `aId=${this.inspectionsId}&bId=${this.enterpriseId}`,
path: 'sub/task/locate',
checkPath: false,
envVersion: 'trial',
envVersion: 'develop',
isHyaline: true
})
this.miniCode = `data:image/jpeg;base64,${res.data}`

166
sub/task/record.vue

@ -1,7 +1,7 @@
<template>
<scroll-view class="view-container" scroll-y>
<view class="box detail" style="margin-bottom: 12px">
<text class="wd-font-800 wd-text-16" style="margin-bottom: 4px">
<text class="wd-font-800 wd-text-16">
{{ detail.title }}
</text>
<view class="tagList">
@ -20,7 +20,7 @@
class="wd-flex wd-text-13"
style="justify-content: space-between"
>
<view class="wd-flex" style="align-items: center; gap: 4px">
<view class="wd-flex" style="align-items: center; gap: 8rpx">
<u-icon name="calendar" color="#17C653" />
<text class="wd-text-13 wd-ml-4px wd-font-800">
{{
@ -32,37 +32,7 @@
</text>
</view>
</view>
<view
style="
font-size: 26rpx;
line-height: 160%;
position: relative;
transform: 0.2s all;
"
v-if="detail.description.length < 20"
>
{{ detail.description }}
</view>
<view
v-else
style="
font-size: 26rpx;
line-height: 160%;
position: relative;
transform: 0.2s all;
"
@tap="isShowAllText = !isShowAllText"
>
{{
isShowAllText
? detail.description
: `${detail.description.slice(1, 100)}...`
}}
<text style="color: #17c653; padding-left: 8rpx">
{{ isShowAllText ? '收起' : '展开' }}
</text>
</view>
<cs-text-more :value="detail.description"></cs-text-more>
<view
class="wd-flex wd-items-center enterprise"
@tap="goEnterprise(detail.enterprise)"
@ -72,20 +42,17 @@
shape="square"
size="64"
></u-avatar>
<view class="wd-flex wd-flex-col" style="gap: 4px">
<view class="wd-flex wd-flex-col">
<text class="wd-font-800 wd-text-15">
{{ detail.enterprise.enterprisesName }}
</text>
<!-- @tap.native.stop="viewPosition(detail.enterprise)" -->
<view
class="wd-flex wd-pb-8px"
>
<u-icon name="map" size="14" color="#17C653"></u-icon>
<text class="address wd-text-12" style="margin-left: 4px">
<view class="wd-flex" style="margin-top: 4rpx">
<u-icon name="map" size="28rpx" color="#17C653"></u-icon>
<text class="address wd-text-12" style="margin-left: 8rpx">
{{ detail.enterprise.address }}
</text>
</view>
<view class="tagList">
<view class="tagList" style="margin-top: 16rpx">
<view class="tag" v-if="detail.enterprise.region">
{{
$dict.echoDicValue(
@ -128,18 +95,20 @@
:key="item.id"
@tap="goLog(item)"
>
<view style="margin-bottom: 12px">
<view style="margin-bottom: 24rpx">
<text
:style="{
marginRight: '10px',
marginRight: '20rpx',
fontWeight: 'bold',
color: $dict.echoDictOption(
dictMap.inspections_mark,
dictMap.Inspections_status,
item.status
).remark
}"
>
{{ $dict.echoDicValue(dictMap.inspections_mark, item.status) }}
{{
$dict.echoDicValue(dictMap.Inspections_status, item.status)
}}
</text>
<text>
{{ $util.formatDate(item.createTime, 'YYYY/M/D h:m') }}
@ -153,14 +122,14 @@
class="row"
v-for="people in item.userList"
:key="people.userId"
style="display: inline-flex; gap: 12px; margin-right: 12px"
style="display: inline-flex; gap: 24rpx; margin-right: 24rpx"
>
<u-avatar
:src="people.avtar"
size="40px"
size="80rpx"
shape="circle"
></u-avatar>
<view class="wd-flex wd-flex-col" style="gap: 2px">
<view class="wd-flex wd-flex-col" style="gap: 4rpx">
<text>{{ people.realName }}</text>
<text>{{ people.deptName }}</text>
</view>
@ -177,7 +146,7 @@
</view>
<view class="audit">
<cs-dict-tag
:dict="dictMap.Inspections_status"
:dict="dictMap.inspections_mark"
:value="inspectionsState"
color="#fff"
:bgColor="setColor(inspectionsState)"
@ -326,94 +295,47 @@ export default {
<style lang="scss" scoped>
.view-container {
padding: 0 12px;
padding: 0 24rpx;
position: relative;
padding-bottom: 100px;
padding-bottom: 200rpx;
.box {
background-color: #fff;
border-radius: $cs-border-radius;
padding: 16px;
margin-top: 12px;
padding: 32rpx;
margin-top: 24rpx;
}
.row {
border-radius: $cs-border-radius;
padding: 12px;
border: 1px solid #f9f9f9;
padding: 24rpx;
border: 2rpx solid #f9f9f9;
}
.detail {
display: flex;
flex-flow: column nowrap;
gap: 12px;
gap: 24rpx;
position: relative;
overflow: hidden;
.tagList {
display: flex;
align-items: center;
gap: var(--Number-4px, 4px);
.tag {
display: flex;
padding: var(--Number-2px, 2px) var(--Number-6px, 6px);
justify-content: center;
align-items: center;
gap: var(--Number-4px, 4px);
border-radius: var(--Number-2px, 2px);
background: var(--LightMode-Grey-Grey-100, #f9f9f9);
color: var(--LightMode-Grey-Grey-600, #78829d);
text-align: center;
font-size: 12px;
font-style: normal;
font-weight: 400;
line-height: normal;
}
}
.enterprise {
border: 1px solid #f9f9f9;
padding: 12px;
border: 2rpx solid #f9f9f9;
padding: 24rpx;
border-radius: $cs-border-radius;
gap: 12px;
gap: 24rpx;
position: relative;
overflow: hidden;
font-size: 12px;
font-size: 24rpx;
.address {
color: $uni-text-color-grey;
text-decoration: underline;
}
&:active {
background-color: $cs-color-touch;
}
.tagList {
margin-top: 8px;
display: flex;
gap: 4px;
color: $uni-text-color-grey;
display: flex;
flex-flow: row wrap;
.tag {
font-size: 12px;
display: flex;
padding: 2px 6px;
justify-content: center;
align-items: center;
border-radius: 2px;
background: #f9f9f9;
}
}
.audit {
position: absolute;
right: -19px;
top: 6px;
transform: rotateZ(45deg);
transform-origin: 50% 50%;
padding: 4px 20px;
font-size: 12px;
text-align: center;
}
}
.audit {
position: absolute;
right: 0;
top: 0;
transform: translateX(23px) translateY(16px) rotateZ(45deg);
transform: translateX(36rpx) translateY(32rpx) rotateZ(45deg);
transform-origin: 50% 50%;
}
}
@ -423,26 +345,26 @@ export default {
overflow: hidden;
display: flex;
flex-flow: column nowrap;
gap: 12px;
gap: 24rpx;
.emty {
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
border-radius: var(--Number-8px, 8px);
border: 1px solid var(--LightMode-Grey-Grey-100, #f9f9f9);
padding: 24px 12px;
border-radius: 8px;
gap: 24rpx;
border-radius: 16rpx;
border: 2rpx solid var(--LightMode-Grey-Grey-100, #f9f9f9);
padding: 48rpx 24rpx;
border-radius: 16rpx;
.image {
width: 64px;
height: 64px;
width: 128rpx;
height: 128rpx;
}
}
.audit {
position: absolute;
right: 0;
top: 0;
transform: translateX(30px) translateY(8px) rotateZ(45deg);
transform: translateX(60rpx) translateY(16rpx) rotateZ(45deg);
transform-origin: 50% 50%;
}
}
@ -452,16 +374,16 @@ export default {
}
}
.operation {
padding: 12px;
padding: 24rpx;
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
gap: 24rpx;
.btn {
flex: 1;
border-radius: 8px;
border-radius: 16rpx;
display: flex;
padding: 12px 0;
padding: 24rpx 0;
align-items: center;
justify-content: center;
}

1125
uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue

File diff suppressed because it is too large Load Diff

4
uni_modules/qiun-data-charts/js_sdk/u-charts/config-echarts.js

@ -285,8 +285,8 @@ const cfe = {
"trigger": 'item'
},
"grid": {
"top": 40,
"bottom": 30,
"top": 0,
"bottom": 0,
"right": 15,
"left": 15
},

595
uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js

@ -20,85 +20,106 @@
const color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc'];
//事件转换函数,主要用作格式化x轴为时间轴,根据需求自行修改
const formatDateTime = (timeStamp, returnType)=>{
var date = new Date();
date.setTime(timeStamp * 1000);
var y = date.getFullYear();
var m = date.getMonth() + 1;
m = m < 10 ? ('0' + m) : m;
var d = date.getDate();
d = d < 10 ? ('0' + d) : d;
var h = date.getHours();
h = h < 10 ? ('0' + h) : h;
var minute = date.getMinutes();
var second = date.getSeconds();
minute = minute < 10 ? ('0' + minute) : minute;
second = second < 10 ? ('0' + second) : second;
if(returnType == 'full'){return y + '-' + m + '-' + d + ' '+ h +':' + minute + ':' + second;}
if(returnType == 'y-m-d'){return y + '-' + m + '-' + d;}
if(returnType == 'h:m'){return h +':' + minute;}
if(returnType == 'h:m:s'){return h +':' + minute +':' + second;}
return [y, m, d, h, minute, second];
const formatDateTime = (timeStamp, returnType) => {
var date = new Date();
date.setTime(timeStamp * 1000);
var y = date.getFullYear();
var m = date.getMonth() + 1;
m = m < 10 ? ('0' + m) : m;
var d = date.getDate();
d = d < 10 ? ('0' + d) : d;
var h = date.getHours();
h = h < 10 ? ('0' + h) : h;
var minute = date.getMinutes();
var second = date.getSeconds();
minute = minute < 10 ? ('0' + minute) : minute;
second = second < 10 ? ('0' + second) : second;
if (returnType == 'full') {
return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
}
if (returnType == 'y-m-d') {
return y + '-' + m + '-' + d;
}
if (returnType == 'h:m') {
return h + ':' + minute;
}
if (returnType == 'h:m:s') {
return h + ':' + minute + ':' + second;
}
return [y, m, d, h, minute, second];
}
const cfu = {
//demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
"type":["pie","ring","rose","word","funnel","map","arcbar","line","column","mount","bar","area","radar","gauge","candle","mix","tline","tarea","scatter","bubble","demotype"],
"range":["饼状图","圆环图","玫瑰图","词云图","漏斗图","地图","圆弧进度条","折线图","柱状图","山峰图","条状图","区域图","雷达图","仪表盘","K线图","混合图","时间轴折线","时间轴区域","散点图","气泡图","自定义类型"],
//增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
//自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
"categories":["line","column","mount","bar","area","radar","gauge","candle","mix","demotype"],
//instance为实例变量承载属性,不要删除
"instance":{},
//option为opts及eopts承载属性,不要删除
"option":{},
//下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
"formatter":{
"yAxisDemo1":function(val, index, opts){return val+'元'},
"yAxisDemo2":function(val, index, opts){return val.toFixed(2)},
"xAxisDemo1":function(val, index, opts){return val+'年';},
"xAxisDemo2":function(val, index, opts){return formatDateTime(val,'h:m')},
"seriesDemo1":function(val, index, series, opts){return val+'元'},
"tooltipDemo1":function(item, category, index, opts){
if(index==0){
return '随便用'+item.data+'年'
}else{
return '其他我没改'+item.data+'天'
}
},
"pieDemo":function(val, index, series, opts){
if(index !== undefined){
return series[index].name+':'+series[index].data+'元'
}
},
},
//这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
"demotype":{
//我这里把曲线图当做了自定义图表类型,您可以根据需要随意指定类型或配置
"type": "line",
"color": color,
"padding": [15,10,0,15],
"xAxis": {
"disableGrid": true,
},
"yAxis": {
"gridType": "dash",
"dashLength": 2,
},
"legend": {
},
"extra": {
"line": {
"type": "curve",
"width": 2
},
}
},
//下面是自定义配置,请添加项目所需的通用配置
"pie":{
//demotype为自定义图表类型,一般不需要自定义图表类型,只需要改根节点上对应的类型即可
"type": ["pie", "ring", "rose", "word", "funnel", "map", "arcbar", "line", "column", "mount", "bar", "area",
"radar", "gauge", "candle", "mix", "tline", "tarea", "scatter", "bubble", "demotype"
],
"range": ["饼状图", "圆环图", "玫瑰图", "词云图", "漏斗图", "地图", "圆弧进度条", "折线图", "柱状图", "山峰图", "条状图", "区域图", "雷达图", "仪表盘", "K线图",
"混合图", "时间轴折线", "时间轴区域", "散点图", "气泡图", "自定义类型"
],
//增加自定义图表类型,如果需要categories,请在这里加入您的图表类型,例如最后的"demotype"
//自定义类型时需要注意"tline","tarea","scatter","bubble"等时间轴(矢量x轴)类图表,没有categories,不需要加入categories
"categories": ["line", "column", "mount", "bar", "area", "radar", "gauge", "candle", "mix", "demotype"],
//instance为实例变量承载属性,不要删除
"instance": {},
//option为opts及eopts承载属性,不要删除
"option": {},
//下面是自定义format配置,因除H5端外的其他端无法通过props传递函数,只能通过此属性对应下标的方式来替换
"formatter": {
"yAxisDemo1": function(val, index, opts) {
return val + '元'
},
"yAxisDemo2": function(val, index, opts) {
return val.toFixed(2)
},
"xAxisDemo1": function(val, index, opts) {
return val + '年';
},
"xAxisDemo2": function(val, index, opts) {
return formatDateTime(val, 'h:m')
},
"seriesDemo1": function(val, index, series, opts) {
return val + '元'
},
"tooltipDemo1": function(item, category, index, opts) {
if (index == 0) {
return '随便用' + item.data + '年'
} else {
return '其他我没改' + item.data + '天'
}
},
"pieDemo": function(val, index, series, opts) {
if (index !== undefined) {
return series[index].name + ':' + series[index].data + '元'
}
},
},
//这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
"demotype": {
//我这里把曲线图当做了自定义图表类型,您可以根据需要随意指定类型或配置
"type": "line",
"color": color,
"padding": [15, 10, 0, 15],
"xAxis": {
"disableGrid": true,
},
"yAxis": {
"gridType": "dash",
"dashLength": 2,
},
"legend": {},
"extra": {
"line": {
"type": "curve",
"width": 2
},
}
},
//下面是自定义配置,请添加项目所需的通用配置
"pie": {
"type": "pie",
"color": color,
"padding": [5,5,5,5],
"color": color,
"padding": [5, 5, 5, 5],
"extra": {
"pie": {
"activeOpacity": 0.5,
@ -111,30 +132,33 @@ const cfu = {
},
}
},
"ring":{
"ring": {
"type": "ring",
"color": color,
"padding": [5,5,5,5],
"color": color,
"padding": [0, 0, 0, 0],
"rotate": false,
"dataLabel": true,
"legend": {
"show": true,
"position": "right",
"lineHeight": 25,
"lineHeight": 25,
},
"title": {
"name": "收益率",
"fontSize": 15,
"color": "#666666"
"color": "#666666",
"fontFamoly": 'Tahoma',
"fontWeight": 'blod'
},
"subtitle": {
"name": "70%",
"fontSize": 25,
"color": "#7cb5ec"
"color": "#7cb5ec",
"fontFamoly": 'Tahoma'
},
"extra": {
"ring": {
"ringWidth":30,
"ringWidth": 30,
"activeOpacity": 0.5,
"activeRadius": 10,
"offsetAngle": 0,
@ -145,14 +169,14 @@ const cfu = {
},
},
},
"rose":{
"rose": {
"type": "rose",
"color": color,
"padding": [5,5,5,5],
"color": color,
"padding": [5, 5, 5, 5],
"legend": {
"show": true,
"position": "left",
"lineHeight": 25,
"lineHeight": 25,
},
"extra": {
"rose": {
@ -168,9 +192,9 @@ const cfu = {
},
}
},
"word":{
"word": {
"type": "word",
"color": color,
"color": color,
"extra": {
"word": {
"type": "normal",
@ -178,10 +202,10 @@ const cfu = {
}
}
},
"funnel":{
"funnel": {
"type": "funnel",
"color": color,
"padding": [15,15,0,15],
"color": color,
"padding": [15, 15, 0, 15],
"extra": {
"funnel": {
"activeOpacity": 0.3,
@ -194,11 +218,11 @@ const cfu = {
},
}
},
"map":{
"map": {
"type": "map",
"color": color,
"padding": [0,0,0,0],
"dataLabel": true,
"color": color,
"padding": [0, 0, 0, 0],
"dataLabel": true,
"extra": {
"map": {
"border": true,
@ -211,9 +235,9 @@ const cfu = {
},
}
},
"arcbar":{
"arcbar": {
"type": "arcbar",
"color": color,
"color": color,
"title": {
"name": "百分比",
"fontSize": 25,
@ -235,98 +259,92 @@ const cfu = {
}
}
},
"line":{
"line": {
"type": "line",
"color": color,
"padding": [15,10,0,15],
"color": color,
"padding": [15, 10, 0, 15],
"xAxis": {
"disableGrid": true,
"disableGrid": true,
},
"yAxis": {
"gridType": "dash",
"dashLength": 2,
},
"legend": {
"gridType": "dash",
"dashLength": 2,
},
"legend": {},
"extra": {
"line": {
"type": "straight",
"width": 2,
"activeType": "hollow"
"activeType": "hollow"
},
}
},
"tline":{
"type": "line",
"color": color,
"padding": [15,10,0,15],
"xAxis": {
"disableGrid": false,
"boundaryGap":"justify",
},
"yAxis": {
"gridType": "dash",
"dashLength": 2,
"data":[
{
"min":0,
"max":80
}
]
},
"legend": {
},
"extra": {
"line": {
"type": "curve",
"width": 2,
"activeType": "hollow"
},
}
},
"tarea":{
"type": "area",
"color": color,
"padding": [15,10,0,15],
"xAxis": {
"disableGrid": true,
"boundaryGap":"justify",
},
"yAxis": {
"gridType": "dash",
"dashLength": 2,
"data":[
{
"min":0,
"max":80
}
]
},
"legend": {
},
"extra": {
"area": {
"type": "curve",
"opacity": 0.2,
"addLine": true,
"width": 2,
"gradient": true,
"activeType": "hollow"
},
}
},
"column":{
"type": "column",
"color": color,
"padding": [15,15,0,5],
"tline": {
"type": "line",
"color": color,
"padding": [15, 10, 0, 15],
"xAxis": {
"disableGrid": true,
"disableGrid": false,
"boundaryGap": "justify",
},
"yAxis": {
"data":[{"min":0}]
"gridType": "dash",
"dashLength": 2,
"data": [{
"min": 0,
"max": 80
}]
},
"legend": {
"legend": {},
"extra": {
"line": {
"type": "curve",
"width": 2,
"activeType": "hollow"
},
}
},
"tarea": {
"type": "area",
"color": color,
"padding": [15, 10, 0, 15],
"xAxis": {
"disableGrid": true,
"boundaryGap": "justify",
},
"yAxis": {
"gridType": "dash",
"dashLength": 2,
"data": [{
"min": 0,
"max": 80
}]
},
"legend": {},
"extra": {
"area": {
"type": "curve",
"opacity": 0.2,
"addLine": true,
"width": 2,
"gradient": true,
"activeType": "hollow"
},
}
},
"column": {
"type": "column",
"color": color,
"padding": [15, 15, 0, 5],
"xAxis": {
"disableGrid": true,
},
"yAxis": {
"data": [{
"min": 0
}]
},
"legend": {},
"extra": {
"column": {
"type": "group",
@ -336,63 +354,61 @@ const cfu = {
},
}
},
"mount":{
"type": "mount",
"color": color,
"padding": [15,15,0,5],
"xAxis": {
"disableGrid": true,
},
"yAxis": {
"data":[{"min":0}]
},
"legend": {
},
"extra": {
"mount": {
"type": "mount",
"widthRatio": 1.5,
},
}
},
"bar":{
"type": "bar",
"color": color,
"padding": [15,30,0,5],
"xAxis": {
"boundaryGap":"justify",
"disableGrid":false,
"min":0,
"axisLine":false
},
"yAxis": {
},
"legend": {
},
"extra": {
"bar": {
"type": "group",
"width": 30,
"meterBorde": 1,
"meterFillColor": "#FFFFFF",
"activeBgColor": "#000000",
"activeBgOpacity": 0.08
},
}
},
"area":{
"type": "area",
"mount": {
"type": "mount",
"color": color,
"padding": [15,15,0,15],
"padding": [15, 15, 0, 5],
"xAxis": {
"disableGrid": true,
"disableGrid": true,
},
"yAxis": {
"gridType": "dash",
"dashLength": 2,
"data": [{
"min": 0
}]
},
"legend": {
"legend": {},
"extra": {
"mount": {
"type": "mount",
"widthRatio": 1.5,
},
}
},
"bar": {
"type": "bar",
"color": color,
"padding": [15, 30, 0, 5],
"xAxis": {
"boundaryGap": "justify",
"disableGrid": false,
"min": 0,
"axisLine": false
},
"yAxis": {},
"legend": {},
"extra": {
"bar": {
"type": "group",
"width": 30,
"meterBorde": 1,
"meterFillColor": "#FFFFFF",
"activeBgColor": "#000000",
"activeBgOpacity": 0.08
},
}
},
"area": {
"type": "area",
"color": color,
"padding": [15, 15, 0, 15],
"xAxis": {
"disableGrid": true,
},
"yAxis": {
"gridType": "dash",
"dashLength": 2,
},
"legend": {},
"extra": {
"area": {
"type": "straight",
@ -400,19 +416,19 @@ const cfu = {
"addLine": true,
"width": 2,
"gradient": false,
"activeType": "hollow"
"activeType": "hollow"
},
}
},
"radar":{
"radar": {
"type": "radar",
"color": color,
"padding": [5,5,5,5],
"dataLabel": false,
"padding": [5, 5, 5, 5],
"dataLabel": false,
"legend": {
"show": true,
"position": "right",
"lineHeight": 25,
"lineHeight": 25,
},
"extra": {
"radar": {
@ -425,7 +441,7 @@ const cfu = {
},
}
},
"gauge":{
"gauge": {
"type": "gauge",
"color": color,
"title": {
@ -465,10 +481,10 @@ const cfu = {
}
}
},
"candle":{
"candle": {
"type": "candle",
"color": color,
"padding": [15,15,0,15],
"padding": [15, 15, 0, 15],
"enableScroll": true,
"enableMarkLine": true,
"dataLabel": false,
@ -484,10 +500,8 @@ const cfu = {
"scrollColor": "#A6A6A6",
"scrollBackgroundColor": "#EFEBEF"
},
"yAxis": {
},
"legend": {
},
"yAxis": {},
"legend": {},
"extra": {
"candle": {
"color": {
@ -498,16 +512,15 @@ const cfu = {
},
"average": {
"show": true,
"name": ["MA5","MA10","MA30"],
"day": [5,10,20],
"color": ["#1890ff","#2fc25b","#facc14"]
"name": ["MA5", "MA10", "MA30"],
"day": [5, 10, 20],
"color": ["#1890ff", "#2fc25b", "#facc14"]
}
},
"markLine": {
"type": "dash",
"dashLength": 5,
"data": [
{
"data": [{
"value": 2150,
"lineColor": "#f04864",
"showLabel": true
@ -521,12 +534,12 @@ const cfu = {
}
}
},
"mix":{
"mix": {
"type": "mix",
"color": color,
"padding": [15,15,0,15],
"padding": [15, 15, 0, 15],
"xAxis": {
"disableGrid": true,
"disableGrid": true,
},
"yAxis": {
"disabled": false,
@ -539,8 +552,7 @@ const cfu = {
"showTitle": true,
"data": []
},
"legend": {
},
"legend": {},
"extra": {
"mix": {
"column": {
@ -549,57 +561,54 @@ const cfu = {
},
}
},
"scatter":{
"scatter": {
"type": "scatter",
"color":color,
"padding":[15,15,0,15],
"dataLabel":false,
"xAxis": {
"disableGrid": false,
"gridType":"dash",
"splitNumber":5,
"boundaryGap":"justify",
"min":0
},
"yAxis": {
"disableGrid": false,
"gridType":"dash",
},
"legend": {
},
"extra": {
"scatter": {
},
}
"color": color,
"padding": [15, 15, 0, 15],
"dataLabel": false,
"xAxis": {
"disableGrid": false,
"gridType": "dash",
"splitNumber": 5,
"boundaryGap": "justify",
"min": 0
},
"yAxis": {
"disableGrid": false,
"gridType": "dash",
},
"legend": {},
"extra": {
"scatter": {},
}
},
"bubble":{
"bubble": {
"type": "bubble",
"color":color,
"padding":[15,15,0,15],
"xAxis": {
"disableGrid": false,
"gridType":"dash",
"splitNumber":5,
"boundaryGap":"justify",
"min":0,
"max":250
},
"yAxis": {
"disableGrid": false,
"gridType":"dash",
"data":[{
"min":0,
"max":150
}]
},
"legend": {
},
"extra": {
"bubble": {
"border":2,
"opacity": 0.5,
},
}
"color": color,
"padding": [15, 15, 0, 15],
"xAxis": {
"disableGrid": false,
"gridType": "dash",
"splitNumber": 5,
"boundaryGap": "justify",
"min": 0,
"max": 250
},
"yAxis": {
"disableGrid": false,
"gridType": "dash",
"data": [{
"min": 0,
"max": 150
}]
},
"legend": {},
"extra": {
"bubble": {
"border": 2,
"opacity": 0.5,
},
}
}
}

14675
uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.js

File diff suppressed because it is too large Load Diff

7542
uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.min.js vendored

File diff suppressed because one or more lines are too long

51
uni_modules/s-components/s-header/index.vue

@ -1,34 +1,18 @@
<template>
<view class="container">
<view class="fit-content"></view>
<!-- <view class="fit-content"></view> -->
<view class="operation" v-if="isCustom">
<slot></slot>
</view>
<view v-else>
<view class="operation" v-if="isTab">
<view
class="wd-flex wd-items-center"
style="gap: 10px; padding: 4px 12px"
>
<u--image
src="/static/favicon.png"
width="24px"
height="24px"
mode="aspectFit"
></u--image>
<text class="title">{{ title }}</text>
</view>
</view>
<view
class="operation wd-flex wd-flex-row wd-items-center"
style="gap: 10px; padding: 4px 12px"
v-else
@tap="goback"
>
<view class="icon-box">
<u-icon name="arrow-left" size="12"></u-icon>
</view>
<text class="title wd-text-16 wd-font-800">{{ title }}</text>
<u--image
src="/static/images/tabbers/logo.png"
width="48rpx"
height="48rpx"
mode="aspectFit"
></u--image>
<text class="title">{{ title }}</text>
</view>
</view>
</view>
@ -63,18 +47,23 @@ export default {
.container {
background-color: #fff;
z-index: 1;
.fit-content {
height: 6vh;
}
height: 176rpx;
position: relative;
.operation {
padding: 12px 4px;
position: absolute;
bottom: 14rpx;
padding: 8rpx 24rpx;
display: flex;
flex-flow: row nowrap;
align-items: center;
gap: 8rpx;
.title {
color: #000;
font-size: 16px;
color: #071437;
font-size: 32rpx;
font-weight: bold;
}
.icon-box {
padding: 5px;
padding: 10rpx;
border-radius: 50%;
}
}

17
uni_modules/s-components/s-tabber/index.vue

@ -19,12 +19,12 @@
height="24"
v-else
></u--image>
<view class="name">
<view :class="[tab.code == selected ? 'isActive' : 'name']">
{{ tab.name }}
</view>
</view>
</view>
<view :style="{ height: isFit ? '50rpx' : '24rpx' }"></view>
<view :style="{ height: isFit ? '68rpx' : '24rpx' }"></view>
</view>
</template>
@ -81,7 +81,7 @@ export default {
},
computed: {
setClass() {
return this.$props.isTab ? 'container' : 'noTab'
return this.$props.isTab ? 'cs-tabber-container' : 'noTab'
},
isFit() {
return uni.getStorageSync('SYSTEM').includes('iOS')
@ -101,7 +101,7 @@ export default {
</script>
<style lang="scss">
.container {
.cs-tabber-container {
background-color: #fff;
}
.noTab {
@ -109,10 +109,10 @@ export default {
.tabber {
display: flex;
flex-flow: row nowrap;
justify-content: space-around;
align-items: center;
justify-content: space-around;
border-top: 2rpx solid #f1f1f4;
padding: 24rpx 64rpx 0px 64rpx;
padding: 24rpx 48rpx 0px 48rpx;
.tab {
display: flex;
flex-flow: column nowrap;
@ -123,6 +123,11 @@ export default {
}
.isActive {
color: #22c55e;
font-weight: 500;
}
.name {
color: #99a1b7;
font-weight: 400;
}
}
</style>

330
uni_modules/uview-ui/components/u-count-to/u-count-to.vue

@ -1,16 +1,18 @@
<template>
<text
class="u-count-num"
:style="{
fontSize: $u.addUnit(fontSize),
fontWeight: bold ? 'bold' : 'normal',
color: color
}"
>{{ displayValue }}</text>
<text
class="u-count-num"
:style="{
fontSize: $u.addUnit(fontSize),
fontWeight: bold ? bold : 'normal',
color: color
}"
>
{{ displayValue }}
</text>
</template>
<script>
import props from './props.js';
import props from './props.js'
/**
* countTo 数字滚动
* @description 该组件一般用于需要滚动数字到某一个值的场景目标要求是一个递增的值
@ -30,155 +32,175 @@
* @example <u-count-to ref="uCountTo" :end-val="endVal" :autoplay="autoplay"></u-count-to>
*/
export default {
name: 'u-count-to',
data() {
return {
localStartVal: this.startVal,
displayValue: this.formatNumber(this.startVal),
printVal: null,
paused: false, //
localDuration: Number(this.duration),
startTime: null, //
timestamp: null, //
remaining: null, //
rAF: null,
lastTime: 0 //
};
},
mixins: [uni.$u.mpMixin, uni.$u.mixin,props],
computed: {
countDown() {
return this.startVal > this.endVal;
}
},
watch: {
startVal() {
this.autoplay && this.start();
},
endVal() {
this.autoplay && this.start();
}
},
mounted() {
this.autoplay && this.start();
},
methods: {
easingFn(t, b, c, d) {
return (c * (-Math.pow(2, (-10 * t) / d) + 1) * 1024) / 1023 + b;
},
requestAnimationFrame(callback) {
const currTime = new Date().getTime();
// 使setTimteout60
const timeToCall = Math.max(0, 16 - (currTime - this.lastTime));
const id = setTimeout(() => {
callback(currTime + timeToCall);
}, timeToCall);
this.lastTime = currTime + timeToCall;
return id;
},
cancelAnimationFrame(id) {
clearTimeout(id);
},
//
start() {
this.localStartVal = this.startVal;
this.startTime = null;
this.localDuration = this.duration;
this.paused = false;
this.rAF = this.requestAnimationFrame(this.count);
},
//
reStart() {
if (this.paused) {
this.resume();
this.paused = false;
} else {
this.stop();
this.paused = true;
}
},
//
stop() {
this.cancelAnimationFrame(this.rAF);
},
// ()
resume() {
if (!this.remaining) return
this.startTime = 0;
this.localDuration = this.remaining;
this.localStartVal = this.printVal;
this.requestAnimationFrame(this.count);
},
//
reset() {
this.startTime = null;
this.cancelAnimationFrame(this.rAF);
this.displayValue = this.formatNumber(this.startVal);
},
count(timestamp) {
if (!this.startTime) this.startTime = timestamp;
this.timestamp = timestamp;
const progress = timestamp - this.startTime;
this.remaining = this.localDuration - progress;
if (this.useEasing) {
if (this.countDown) {
this.printVal = this.localStartVal - this.easingFn(progress, 0, this.localStartVal - this.endVal, this.localDuration);
} else {
this.printVal = this.easingFn(progress, this.localStartVal, this.endVal - this.localStartVal, this.localDuration);
}
} else {
if (this.countDown) {
this.printVal = this.localStartVal - (this.localStartVal - this.endVal) * (progress / this.localDuration);
} else {
this.printVal = this.localStartVal + (this.endVal - this.localStartVal) * (progress / this.localDuration);
}
}
if (this.countDown) {
this.printVal = this.printVal < this.endVal ? this.endVal : this.printVal;
} else {
this.printVal = this.printVal > this.endVal ? this.endVal : this.printVal;
}
this.displayValue = this.formatNumber(this.printVal) || 0;
if (progress < this.localDuration) {
this.rAF = this.requestAnimationFrame(this.count);
} else {
this.$emit('end');
}
},
//
isNumber(val) {
return !isNaN(parseFloat(val));
},
formatNumber(num) {
// numNumbertoFixed
num = Number(num);
num = num.toFixed(Number(this.decimals));
num += '';
const x = num.split('.');
let x1 = x[0];
const x2 = x.length > 1 ? this.decimal + x[1] : '';
const rgx = /(\d+)(\d{3})/;
if (this.separator && !this.isNumber(this.separator)) {
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + this.separator + '$2');
}
}
return x1 + x2;
},
destroyed() {
this.cancelAnimationFrame(this.rAF);
}
}
};
name: 'u-count-to',
data() {
return {
localStartVal: this.startVal,
displayValue: this.formatNumber(this.startVal),
printVal: null,
paused: false, //
localDuration: Number(this.duration),
startTime: null, //
timestamp: null, //
remaining: null, //
rAF: null,
lastTime: 0 //
}
},
mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
computed: {
countDown() {
return this.startVal > this.endVal
}
},
watch: {
startVal() {
this.autoplay && this.start()
},
endVal() {
this.autoplay && this.start()
}
},
mounted() {
this.autoplay && this.start()
},
methods: {
easingFn(t, b, c, d) {
return (c * (-Math.pow(2, (-10 * t) / d) + 1) * 1024) / 1023 + b
},
requestAnimationFrame(callback) {
const currTime = new Date().getTime()
// 使setTimteout60
const timeToCall = Math.max(0, 16 - (currTime - this.lastTime))
const id = setTimeout(() => {
callback(currTime + timeToCall)
}, timeToCall)
this.lastTime = currTime + timeToCall
return id
},
cancelAnimationFrame(id) {
clearTimeout(id)
},
//
start() {
this.localStartVal = this.startVal
this.startTime = null
this.localDuration = this.duration
this.paused = false
this.rAF = this.requestAnimationFrame(this.count)
},
//
reStart() {
if (this.paused) {
this.resume()
this.paused = false
} else {
this.stop()
this.paused = true
}
},
//
stop() {
this.cancelAnimationFrame(this.rAF)
},
// ()
resume() {
if (!this.remaining) return
this.startTime = 0
this.localDuration = this.remaining
this.localStartVal = this.printVal
this.requestAnimationFrame(this.count)
},
//
reset() {
this.startTime = null
this.cancelAnimationFrame(this.rAF)
this.displayValue = this.formatNumber(this.startVal)
},
count(timestamp) {
if (!this.startTime) this.startTime = timestamp
this.timestamp = timestamp
const progress = timestamp - this.startTime
this.remaining = this.localDuration - progress
if (this.useEasing) {
if (this.countDown) {
this.printVal =
this.localStartVal -
this.easingFn(
progress,
0,
this.localStartVal - this.endVal,
this.localDuration
)
} else {
this.printVal = this.easingFn(
progress,
this.localStartVal,
this.endVal - this.localStartVal,
this.localDuration
)
}
} else {
if (this.countDown) {
this.printVal =
this.localStartVal -
(this.localStartVal - this.endVal) *
(progress / this.localDuration)
} else {
this.printVal =
this.localStartVal +
(this.endVal - this.localStartVal) *
(progress / this.localDuration)
}
}
if (this.countDown) {
this.printVal =
this.printVal < this.endVal ? this.endVal : this.printVal
} else {
this.printVal =
this.printVal > this.endVal ? this.endVal : this.printVal
}
this.displayValue = this.formatNumber(this.printVal) || 0
if (progress < this.localDuration) {
this.rAF = this.requestAnimationFrame(this.count)
} else {
this.$emit('end')
}
},
//
isNumber(val) {
return !isNaN(parseFloat(val))
},
formatNumber(num) {
// numNumbertoFixed
num = Number(num)
num = num.toFixed(Number(this.decimals))
num += ''
const x = num.split('.')
let x1 = x[0]
const x2 = x.length > 1 ? this.decimal + x[1] : ''
const rgx = /(\d+)(\d{3})/
if (this.separator && !this.isNumber(this.separator)) {
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + this.separator + '$2')
}
}
return x1 + x2
},
destroyed() {
this.cancelAnimationFrame(this.rAF)
}
}
}
</script>
<style lang="scss" scoped>
@import "../../libs/css/components.scss";
@import '../../libs/css/components.scss';
.u-count-num {
/* #ifndef APP-NVUE */
display: inline-flex;
/* #endif */
text-align: center;
/* #ifndef APP-NVUE */
display: inline-flex;
/* #endif */
text-align: center;
}
</style>

1079
uni_modules/uview-ui/components/u-upload/u-upload.vue

File diff suppressed because it is too large Load Diff

1
utils/request.js

@ -60,7 +60,6 @@ const request = config => {
})
}, 500)
}
reject('无效的会话,或者会话已过期,请重新登录。')
} else if (code === 500) {
toast(msg)

33
wxcomponents/vant/dropdown-item/index.wxss

@ -1 +1,32 @@
@import '../common/index.wxss';.van-dropdown-item{left:0;overflow:hidden;position:fixed;right:0}.van-dropdown-item__option{text-align:left}.van-dropdown-item__option--active .van-dropdown-item__icon,.van-dropdown-item__option--active .van-dropdown-item__title{color:var(--dropdown-menu-option-active-color,#ee0a24)}.van-dropdown-item--up{top:0}.van-dropdown-item--down{bottom:0}.van-dropdown-item__icon{display:block;line-height:inherit}
@import '../common/index.wxss';
.van-dropdown-item {
left: 0;
overflow: hidden;
position: fixed;
right: 0
}
.van-dropdown-item__option {
text-align: left
}
.van-dropdown-item__option--active .van-dropdown-item__icon,
.van-dropdown-item__option--active .van-dropdown-item__title {
color: var(--dropdown-menu-option-active-color, #ee0a24)
}
.van-dropdown-item--up {
top: 0
}
.van-dropdown-item--down {
/* bottom: 48rpx */
bottom: 0;
margin-bottom: 48rpx;
}
.van-dropdown-item__icon {
display: block;
line-height: inherit
}

1
wxcomponents/vant/dropdown-menu/index.wxml

@ -14,6 +14,7 @@
style="{{ item.showPopup ? 'color:' + activeColor : '' }}"
>
<view class="van-ellipsis">
<text class='preffix'>{{item.title}}</text>
<text class="select-title" style="color:{{computed.setTitleColor(item)}}"> {{ computed.displayTitle(item) }}</text>
<text class='arrow' style="border-color:#17c653"></text>
</view>

7
wxcomponents/vant/dropdown-menu/index.wxs

@ -1,9 +1,8 @@
/* eslint-disable */
function displayTitle(item) {
if (item.title) {
return item.title;
}
// if (!item.value) {
// return item.title;
// }
var match = item.options.filter(function(option) {
return option.value === item.value;
});

8
wxcomponents/vant/dropdown-menu/index.wxss

@ -1,8 +1,6 @@
@import '../common/index.wxss';
.van-dropdown-menu {
background-color: var(--dropdown-menu-background-color, #fff);
box-shadow: var(--dropdown-menu-box-shadow, 0 2px 12px hsla(210, 1%, 40%, .12));
display: flex;
height: var(--dropdown-menu-height, 50px);
-webkit-user-select: none;
@ -61,15 +59,15 @@
flex: row nowrap;
justify-content: center;
align-items: center;
gap: 4px;
gap: 8rpx;
}
.select-title {
font-weight: 600;
font-weight: bold;
transition: .2s all;
color: #071437;
}
.van-dropdown-menu__title .arrow {
border-style: solid;
border-color: #000;

Loading…
Cancel
Save