Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
basic-uniapp-v3
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-uniapp-v3
Commits
0fb18627
提交
0fb18627
authored
3月 11, 2026
作者:
廖在望
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 功能修改
上级
083562c2
全部展开
显示空白字符变更
内嵌
并排
正在显示
64 个修改的文件
包含
1366 行增加
和
895 行删除
+1366
-895
package-lock.json
package-lock.json
+0
-0
dict.ts
src/api/model/dict.ts
+1
-1
home.ts
src/api/model/home.ts
+1
-2
knowledgeVideo.ts
src/api/model/knowledgeVideo.ts
+2
-2
linghuoyonggong.ts
src/api/model/linghuoyonggong.ts
+1
-1
news.ts
src/api/model/news.ts
+2
-2
nongchang.ts
src/api/model/nongchang.ts
+0
-0
nongjifuwu.ts
src/api/model/nongjifuwu.ts
+0
-1
nongzhi.ts
src/api/model/nongzhi.ts
+1
-1
userInfo.ts
src/api/model/userInfo.ts
+9
-6
index.vue
src/components/ConfirmDialog/index.vue
+69
-69
successfulDialog.vue
src/components/ConfirmDialog/successfulDialog.vue
+71
-71
index.vue
src/components/Echarts/src/index.vue
+0
-0
index.vue
src/components/IframeVideo/index.vue
+5
-3
hook.ts
src/components/Map/Mapbox/hook.ts
+8
-2
index.ts
src/components/Map/Mapbox/index.ts
+22
-10
index.vue
src/pages/agencyBookkeeping/index.vue
+3
-9
caixianyi.vue
src/pages/chanxiao/caixianyi/caixianyi.vue
+19
-18
chanxiao.vue
src/pages/chanxiao/chanxiao.vue
+12
-6
hema.vue
src/pages/chanxiao/hema/hema.vue
+19
-18
hongxing.vue
src/pages/chanxiao/hongxing/hongxing.vue
+19
-18
purchaseXuQiu.vue
src/pages/chanxiao/purchaseXuQiu.vue
+4
-2
qiandama.vue
src/pages/chanxiao/qiandama/qiandama.vue
+19
-18
supplyXuQiu.vue
src/pages/chanxiao/supplyXuQiu.vue
+3
-2
xiaoxiangchaoshi.vue
src/pages/chanxiao/xiaoxiangchaoshi/xiaoxiangchaoshi.vue
+23
-19
zhusiling.vue
src/pages/chanxiao/zhusiling/zhusiling.vue
+20
-18
save-dialog.vue
src/pages/device/components/save-dialog.vue
+74
-73
device.vue
src/pages/device/device.vue
+0
-0
dailijizhang.vue
src/pages/fuwu/dailijizhang/dailijizhang.vue
+17
-16
fuwu.vue
src/pages/fuwu/fuwu.vue
+28
-15
add.vue
src/pages/jidiguanli/add.vue
+80
-80
jidiguanli.vue
src/pages/jidiguanli/jidiguanli.vue
+0
-0
detail.vue
src/pages/kexinnongzi/detail.vue
+0
-0
kexinnongzi.vue
src/pages/kexinnongzi/kexinnongzi.vue
+31
-32
shenqingruzhu.vue
src/pages/kexinnongzi/shenqingruzhu.vue
+0
-0
index.vue
src/pages/knowledgeVideo/index.vue
+12
-11
register-dialog.vue
src/pages/linghuoyonggong/components/register-dialog.vue
+19
-2
yonggongmap.vue
src/pages/linghuoyonggong/components/yonggongmap.vue
+0
-0
details.vue
src/pages/linghuoyonggong/details.vue
+63
-56
form.vue
src/pages/linghuoyonggong/form.vue
+0
-0
linghuoyonggong.vue
src/pages/linghuoyonggong/linghuoyonggong.vue
+0
-0
publishEmployment.vue
src/pages/linghuoyonggong/publishEmployment.vue
+0
-0
login.vue
src/pages/login/login.vue
+2
-3
index.vue
src/pages/news/index.vue
+4
-3
WeatherForecast.vue
src/pages/nongchang/components/WeatherForecast.vue
+24
-22
create-nongchang-form.vue
src/pages/nongchang/create-nongchang-form.vue
+64
-7
index.vue
src/pages/nongchang/detail/index.vue
+82
-79
equipment.vue
src/pages/nongchang/equipment.vue
+191
-0
nongchang.vue
src/pages/nongchang/nongchang.vue
+0
-0
apply-dialog.vue
src/pages/nongjifuwu/components/apply-dialog.vue
+57
-10
detail.vue
src/pages/nongjifuwu/detail.vue
+0
-0
farm-form.vue
src/pages/nongjifuwu/farm-form.vue
+115
-55
machine-form.vue
src/pages/nongjifuwu/machine-form.vue
+6
-3
nongjifuwu.vue
src/pages/nongjifuwu/nongjifuwu.vue
+0
-0
shenqingruzhu.vue
src/pages/nongjifuwu/shenqingruzhu.vue
+0
-0
nongyezhengce.vue
src/pages/nongyezhengce/nongyezhengce.vue
+95
-60
save-dialog.vue
src/pages/resource/components/save-dialog.vue
+1
-2
resource.vue
src/pages/resource/resource.vue
+4
-5
webview.vue
src/pages/webview/webview.vue
+10
-10
wode.vue
src/pages/wode/wode.vue
+2
-1
_zhunongjinrong.vue
src/pages/zhunongjinrong/_zhunongjinrong.vue
+1
-1
zhunongjinrong.vue
src/pages/zhunongjinrong/zhunongjinrong.vue
+23
-22
date.ts
src/utils/date.ts
+10
-10
area.ts
src/utils/dict/area.ts
+18
-18
没有找到文件。
package-lock.json
浏览文件 @
0fb18627
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/api/model/dict.ts
浏览文件 @
0fb18627
...
...
@@ -25,6 +25,6 @@ export function getQueryByType(params = {}) {
params
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
,
}
},
})
}
src/api/model/home.ts
浏览文件 @
0fb18627
...
...
@@ -10,7 +10,6 @@ enum Api {
postConsultRecordAdd
=
'/server/consultRecord/add'
,
// 添加咨询信息
getNewsList
=
'/news/list'
,
// 分页列表查询
}
/**
...
...
@@ -20,7 +19,7 @@ enum Api {
export
function
postConsultRecordAdd
(
params
=
{})
{
return
otherHttp
.
post
({
url
:
Api
.
postConsultRecordAdd
,
params
params
,
})
}
...
...
src/api/model/knowledgeVideo.ts
浏览文件 @
0fb18627
...
...
@@ -29,7 +29,7 @@ export function addViewCount(params) {
url
:
Api
.
viewCount
,
params
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
'Content-Type'
:
'application/x-www-form-urlencoded'
,
}
,
})
}
src/api/model/linghuoyonggong.ts
浏览文件 @
0fb18627
...
...
@@ -27,7 +27,7 @@ export function getLaborAppDel(params = {}) {
params
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
,
}
},
})
}
...
...
src/api/model/news.ts
浏览文件 @
0fb18627
...
...
@@ -29,7 +29,7 @@ export function addViewCount(params) {
url
:
Api
.
viewCount
,
params
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
'Content-Type'
:
'application/x-www-form-urlencoded'
,
}
,
})
}
src/api/model/nongchang.ts
浏览文件 @
0fb18627
src/api/model/nongjifuwu.ts
浏览文件 @
0fb18627
...
...
@@ -11,7 +11,6 @@ enum Api {
postMachineryAdd
=
'/server/machinery/add'
,
// 农机商品管理-添加
postMachineryQueryById
=
'/server/machinery/listByEnterpriseId'
,
// 按企业ID查询未删除农机
}
/**
* @param params 请求参数
...
...
src/api/model/nongzhi.ts
浏览文件 @
0fb18627
...
...
@@ -4,7 +4,7 @@ enum Api {
goodsList
=
'/trade/goods/list'
,
// 农资列表
getEnterpriseList
=
'/server/enterprise/list'
,
// 可信农资列表
postEnterpriseAdd
=
'/server/enterprise/add'
,
// 入驻申请
getEnterpriseDetail
=
'/server/enterprise/detail'
,
// 企业详情
getEnterpriseDetail
=
'/server/enterprise/detail'
,
// 企业详情
postGoodsAdd
=
'/trade/goods/add'
,
// 农资商品管理-添加
getGoodsQueryById
=
'/trade/goods/listByEnterpriseId'
,
// 农资商品管理-通过id查询
}
...
...
src/api/model/userInfo.ts
浏览文件 @
0fb18627
...
...
@@ -17,12 +17,15 @@ enum Api {
* @description: 查询登录用户信息
*/
export
function
getUserInfo
(
params
=
{})
{
return
otherHttp
.
get
({
return
otherHttp
.
get
(
{
url
:
Api
.
getUserInfo
,
data
:
params
,
},
{
errorMessageMode
:
null
})
},
{
errorMessageMode
:
null
,
},
)
}
/**
...
...
@@ -43,7 +46,7 @@ export function sysLogin(params = {}) {
export
function
phoneLogin
(
params
=
{})
{
return
otherHttp
.
post
({
url
:
Api
.
phoneLogin
,
data
:
params
data
:
params
,
})
}
...
...
@@ -54,7 +57,7 @@ export function phoneLogin(params = {}) {
export
function
sysSms
(
params
=
{})
{
return
otherHttp
.
post
({
url
:
Api
.
sms
,
data
:
params
data
:
params
,
})
}
...
...
src/components/ConfirmDialog/index.vue
浏览文件 @
0fb18627
<
script
setup
lang=
"ts"
>
interface
Props
{
show
?:
boolean
title
?:
string
content
?:
string
cancelText
?:
string
confirmText
?:
string
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
show
:
false
,
title
:
'提示'
,
content
:
''
,
cancelText
:
'取消'
,
confirmText
:
'确认'
,
})
const
emit
=
defineEmits
<
{
(
e
:
'update:show'
,
value
:
boolean
):
void
(
e
:
'cancel'
):
void
(
e
:
'confirm'
):
void
}
>
()
function
handleCancel
()
{
emit
(
'update:show'
,
false
)
emit
(
'cancel'
)
}
function
handleConfirm
()
{
emit
(
'update:show'
,
false
)
emit
(
'confirm'
)
}
</
script
>
<
template
>
<view
v-if=
"show"
class=
"confirm-dialog-overlay"
@
click=
"handleCancel"
>
<view
class=
"confirm-dialog-container"
@
click
.
stop
>
...
...
@@ -25,42 +59,8 @@
</view>
</
template
>
<
script
setup
lang=
"ts"
>
interface
Props
{
show
?:
boolean
title
?:
string
content
?:
string
cancelText
?:
string
confirmText
?:
string
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
show
:
false
,
title
:
'提示'
,
content
:
''
,
cancelText
:
'取消'
,
confirmText
:
'确认'
,
})
const
emit
=
defineEmits
<
{
(
e
:
'update:show'
,
value
:
boolean
):
void
(
e
:
'cancel'
):
void
(
e
:
'confirm'
):
void
}
>
()
function
handleCancel
()
{
emit
(
'update:show'
,
false
)
emit
(
'cancel'
)
}
function
handleConfirm
()
{
emit
(
'update:show'
,
false
)
emit
(
'confirm'
)
}
</
script
>
<
style
lang=
"scss"
scoped
>
.confirm-dialog-overlay
{
.confirm-dialog-overlay
{
position
:
fixed
;
top
:
0
;
left
:
0
;
...
...
@@ -71,18 +71,18 @@ function handleConfirm() {
align-items
:
center
;
justify-content
:
center
;
z-index
:
99999
;
}
}
.confirm-dialog-container
{
.confirm-dialog-container
{
position
:
relative
;
width
:
600
rpx
;
background
:
linear-gradient
(
180deg
,
#E8F5E9
0%
,
#FFFFFF
30%
);
background
:
linear-gradient
(
180deg
,
#e8f5e9
0%
,
#ffffff
30%
);
border-radius
:
32
rpx
;
padding
:
60
rpx
48
rpx
48
rpx
;
box-shadow
:
0
8
rpx
32
rpx
rgba
(
0
,
0
,
0
,
0.1
);
}
}
.close-btn
{
.close-btn
{
position
:
absolute
;
top
:
24
rpx
;
right
:
24
rpx
;
...
...
@@ -92,37 +92,37 @@ function handleConfirm() {
align-items
:
center
;
justify-content
:
center
;
cursor
:
pointer
;
}
}
.close-icon
{
.close-icon
{
font-size
:
36
rpx
;
color
:
#999999
;
font-weight
:
300
;
}
}
.dialog-title
{
.dialog-title
{
font-size
:
36
rpx
;
font-weight
:
600
;
color
:
#333333
;
text-align
:
center
;
margin-bottom
:
32
rpx
;
}
}
.dialog-content
{
.dialog-content
{
font-size
:
28
rpx
;
color
:
#666666
;
text-align
:
center
;
line-height
:
40
rpx
;
margin-bottom
:
48
rpx
;
}
}
.dialog-buttons
{
.dialog-buttons
{
display
:
flex
;
gap
:
24
rpx
;
}
}
.cancel-btn
,
.confirm-btn
{
.cancel-btn
,
.confirm-btn
{
flex
:
1
;
height
:
80
rpx
;
border-radius
:
40
rpx
;
...
...
@@ -130,36 +130,36 @@ function handleConfirm() {
align-items
:
center
;
justify-content
:
center
;
cursor
:
pointer
;
}
}
.cancel-btn
{
background-color
:
#FFFFFF
;
border
:
2
rpx
solid
#5DB66F
;
}
.cancel-btn
{
background-color
:
#ffffff
;
border
:
2
rpx
solid
#5db66f
;
}
.cancel-text
{
.cancel-text
{
font-size
:
28
rpx
;
color
:
#5DB66F
;
color
:
#5db66f
;
font-weight
:
500
;
}
}
.confirm-btn
{
background
:
linear-gradient
(
135deg
,
#5DB66F
0%
,
#4CAF
50
100%
);
.confirm-btn
{
background
:
linear-gradient
(
135deg
,
#5db66f
0%
,
#4caf
50
100%
);
box-shadow
:
0
4
rpx
12
rpx
rgba
(
93
,
182
,
111
,
0.3
);
}
}
.confirm-text
{
.confirm-text
{
font-size
:
28
rpx
;
color
:
#FFFFFF
;
color
:
#ffffff
;
font-weight
:
500
;
}
}
.cancel-btn
:active
{
.cancel-btn
:active
{
opacity
:
0.8
;
}
}
.confirm-btn
:active
{
.confirm-btn
:active
{
opacity
:
0.9
;
transform
:
scale
(
0.98
);
}
}
</
style
>
src/components/ConfirmDialog/successfulDialog.vue
浏览文件 @
0fb18627
<
script
setup
lang=
"ts"
>
interface
Props
{
show
?:
boolean
title
?:
string
content
?:
string
cancelText
?:
string
confirmText
?:
string
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
show
:
false
,
title
:
'提示'
,
content
:
''
,
cancelText
:
'取消'
,
confirmText
:
'确认'
,
})
const
emit
=
defineEmits
<
{
(
e
:
'update:show'
,
value
:
boolean
):
void
(
e
:
'cancel'
):
void
(
e
:
'confirm'
):
void
}
>
()
function
handleCancel
()
{
emit
(
'update:show'
,
false
)
emit
(
'cancel'
)
}
function
handleConfirm
()
{
emit
(
'confirm'
)
}
</
script
>
<
template
>
<view
v-if=
"show"
class=
"confirm-dialog-overlay"
@
click=
"handleCancel"
>
<view
class=
"confirm-dialog-container"
@
click
.
stop
>
...
...
@@ -24,41 +57,8 @@
</view>
</
template
>
<
script
setup
lang=
"ts"
>
interface
Props
{
show
?:
boolean
title
?:
string
content
?:
string
cancelText
?:
string
confirmText
?:
string
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
show
:
false
,
title
:
'提示'
,
content
:
''
,
cancelText
:
'取消'
,
confirmText
:
'确认'
,
})
const
emit
=
defineEmits
<
{
(
e
:
'update:show'
,
value
:
boolean
):
void
(
e
:
'cancel'
):
void
(
e
:
'confirm'
):
void
}
>
()
function
handleCancel
()
{
emit
(
'update:show'
,
false
)
emit
(
'cancel'
)
}
function
handleConfirm
()
{
emit
(
'confirm'
)
}
</
script
>
<
style
lang=
"scss"
scoped
>
.confirm-dialog-overlay
{
.confirm-dialog-overlay
{
position
:
fixed
;
top
:
0
;
left
:
0
;
...
...
@@ -69,18 +69,18 @@ function handleConfirm() {
align-items
:
center
;
justify-content
:
center
;
z-index
:
9999
;
}
}
.confirm-dialog-container
{
.confirm-dialog-container
{
position
:
relative
;
width
:
600
rpx
;
background
:
#FFFFFF
;
background
:
#ffffff
;
border-radius
:
32
rpx
;
box-sizing
:
border-box
;
box-shadow
:
0
8
rpx
32
rpx
rgba
(
0
,
0
,
0
,
0.1
);
padding-bottom
:
28
rpx
;
}
.confirm-dialog-content
{
}
.confirm-dialog-content
{
width
:
600
rpx
;
height
:
240
rpx
;
border-radius
:
32
rpx
;
...
...
@@ -89,14 +89,14 @@ function handleConfirm() {
position
:
relative
;
display
:
flex
;
justify-content
:
center
;
.apply_success_icon
{
.apply_success_icon
{
width
:
240
rpx
;
height
:
162
rpx
;
margin-top
:
54
rpx
;
}
}
}
.close-btn
{
.close-btn
{
position
:
absolute
;
top
:
24
rpx
;
right
:
24
rpx
;
...
...
@@ -106,40 +106,40 @@ function handleConfirm() {
align-items
:
center
;
justify-content
:
center
;
cursor
:
pointer
;
}
}
.close-icon
{
.close-icon
{
font-size
:
36
rpx
;
color
:
#999999
;
font-weight
:
300
;
}
}
.dialog-title
{
.dialog-title
{
margin-top
:
-32
rpx
;
font-size
:
36
rpx
;
font-weight
:
600
;
color
:
#333333
;
text-align
:
center
;
margin-bottom
:
32
rpx
;
}
}
.dialog-content
{
.dialog-content
{
font-size
:
28
rpx
;
color
:
#666666
;
text-align
:
center
;
line-height
:
40
rpx
;
margin-bottom
:
48
rpx
;
}
}
.dialog-buttons
{
.dialog-buttons
{
display
:
flex
;
gap
:
24
rpx
;
padding-left
:
30
rpx
;
padding-right
:
30
rpx
;
}
}
.cancel-btn
,
.confirm-btn
{
.cancel-btn
,
.confirm-btn
{
flex
:
1
;
height
:
80
rpx
;
border-radius
:
40
rpx
;
...
...
@@ -147,36 +147,36 @@ function handleConfirm() {
align-items
:
center
;
justify-content
:
center
;
cursor
:
pointer
;
}
}
.cancel-btn
{
background-color
:
#FFFFFF
;
border
:
2
rpx
solid
#5DB66F
;
}
.cancel-btn
{
background-color
:
#ffffff
;
border
:
2
rpx
solid
#5db66f
;
}
.cancel-text
{
.cancel-text
{
font-size
:
28
rpx
;
color
:
#5DB66F
;
color
:
#5db66f
;
font-weight
:
500
;
}
}
.confirm-btn
{
background
:
linear-gradient
(
135deg
,
#5DB66F
0%
,
#4CAF
50
100%
);
.confirm-btn
{
background
:
linear-gradient
(
135deg
,
#5db66f
0%
,
#4caf
50
100%
);
box-shadow
:
0
4
rpx
12
rpx
rgba
(
93
,
182
,
111
,
0.3
);
}
}
.confirm-text
{
.confirm-text
{
font-size
:
28
rpx
;
color
:
#FFFFFF
;
color
:
#ffffff
;
font-weight
:
500
;
}
}
.cancel-btn
:active
{
.cancel-btn
:active
{
opacity
:
0.8
;
}
}
.confirm-btn
:active
{
.confirm-btn
:active
{
opacity
:
0.9
;
transform
:
scale
(
0.98
);
}
}
</
style
>
src/components/Echarts/src/index.vue
浏览文件 @
0fb18627
src/components/IframeVideo/index.vue
浏览文件 @
0fb18627
<
template
>
<iframe
:onload=
"onloadCode"
style=
"width: 100%; height: 100%; border: 1px solid #fff; background: #000"
></iframe>
</
template
>
<
script
>
export
default
{
props
:
{
...
...
@@ -16,4 +13,9 @@
},
}
</
script
>
<
template
>
<iframe
:onload=
"onloadCode"
style=
"width: 100%; height: 100%; border: 1px solid #fff; background: #000"
></iframe>
</
template
>
<
style
lang=
"scss"
></
style
>
src/components/Map/Mapbox/hook.ts
浏览文件 @
0fb18627
...
...
@@ -80,8 +80,14 @@ export function useMapbox<T extends MapboxInstance, P extends MapboxConfig>(
getInstance
()?.
setLayoutProperty
(
layerId
,
name
,
value
),
setFilter
:
(
layerId
:
string
,
filter
:
any
[])
=>
getInstance
()?.
setFilter
(
layerId
,
filter
),
flyTo
:
(
options
:
mapboxgl
.
FlyToOptions
)
=>
getInstance
()?.
flyTo
(
options
),
addMarker
:
(
id
:
string
,
lnglat
:
[
number
,
number
],
popup
?:
string
,
popupDefaultOpen
?:
boolean
,
imageUrl
?:
string
,
iconSize
?:
[
number
,
number
])
=>
getInstance
()?.
addMarker
(
id
,
lnglat
,
popup
,
popupDefaultOpen
,
imageUrl
,
iconSize
),
addMarker
:
(
id
:
string
,
lnglat
:
[
number
,
number
],
popup
?:
string
,
popupDefaultOpen
?:
boolean
,
imageUrl
?:
string
,
iconSize
?:
[
number
,
number
],
)
=>
getInstance
()?.
addMarker
(
id
,
lnglat
,
popup
,
popupDefaultOpen
,
imageUrl
,
iconSize
),
removeMarker
:
(
id
:
string
)
=>
getInstance
()?.
removeMarker
(
id
),
removePopup
:
()
=>
getInstance
()?.
removePopup
(),
loadImage
:
(
url
:
string
,
callback
:
(
error
:
Error
|
null
,
image
:
HTMLImageElement
)
=>
void
)
=>
...
...
src/components/Map/Mapbox/index.ts
浏览文件 @
0fb18627
...
...
@@ -16,7 +16,7 @@ export const tk = 'aa0ccd36f2dbb86dbb16cbf63f0034a6'
const
host
=
'https://foxgis.app.yiring.com'
// 构建天地图图层地址
export
function
buildTdtTileUrl
(
id
:
string
,
layer
:
string
)
{
export
function
buildTdtTileUrl
(
id
:
string
,
layer
:
string
)
{
return
`http://t0.tianditu.gov.cn/
${
id
}
/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=
${
layer
}
&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=
${
tk
}
`
return
`
${
host
}
/api/tdt/cache/
${
id
}
/{z}/{y}/{x}/
${
tk
}
?v=2022`
}
...
...
@@ -41,13 +41,13 @@ export const defaultStyle: mapboxgl.Style = {
sources
:
{
'wms-vec_w-source'
:
{
type
:
'raster'
,
tiles
:
[
buildTdtTileUrl
(
'vec_w'
,
'vec'
)],
tiles
:
[
buildTdtTileUrl
(
'vec_w'
,
'vec'
)],
tileSize
:
256
,
maxzoom
:
18
,
},
'wms-cva_w-source'
:
{
type
:
'raster'
,
tiles
:
[
buildTdtTileUrl
(
'cva_w'
,
'cva'
)],
tiles
:
[
buildTdtTileUrl
(
'cva_w'
,
'cva'
)],
tileSize
:
256
,
maxzoom
:
18
,
},
...
...
@@ -59,7 +59,7 @@ export const defaultStyle: mapboxgl.Style = {
// },
'wms-img_w-source'
:
{
type
:
'raster'
,
tiles
:
[
buildTdtTileUrl
(
'img_w'
,
'img'
)],
tiles
:
[
buildTdtTileUrl
(
'img_w'
,
'img'
)],
tileSize
:
256
,
maxzoom
:
18
,
},
...
...
@@ -850,7 +850,14 @@ export interface MapboxInstance {
* @param iconSize 图标大小 [width, height]
* @link https://docs.mapbox.com/mapbox-gl-js/api/markers/#marker
*/
addMarker
(
id
:
string
,
lngLat
:
number
[],
popup
?:
string
,
popupDefaultOpen
?:
boolean
,
imageUrl
?:
string
,
iconSize
?:
[
number
,
number
]):
void
addMarker
(
id
:
string
,
lngLat
:
number
[],
popup
?:
string
,
popupDefaultOpen
?:
boolean
,
imageUrl
?:
string
,
iconSize
?:
[
number
,
number
],
):
void
/**
* 移除 Marker
* @param id Marker ID
...
...
@@ -986,7 +993,8 @@ export const HandlerUtil = {
popup
:
HandlerUtil
.
createDefaultPopupHtml
(
station
,
{
'{key}'
:
`
${(
additional
?.
valueName
?
station
[
additional
.
valueName
]
:
station
.
value
)
||
'-'
'{key}'
:
`
${
(
additional
?.
valueName
?
station
[
additional
.
valueName
]
:
station
.
value
)
||
'-'
}{
suffix
}
`,
...map,
},
...
...
@@ -1008,7 +1016,8 @@ export const HandlerUtil = {
if (isPlainObject(station) && isStation) {
htmls.push(
`
<
div
class
=
"popup-row"
><
span
class
=
"popup-title"
>
地点:
<
/span>${station.city || ''} ${station.cnty || '
'
`
<
div
class
=
"popup-row"
><
span
class
=
"popup-title"
>
地点:
<
/span>${station.city || ''} $
{
station
.
cnty
||
''
}
$
{
station
.
town
||
''
}
<
/div>`
,
)
htmls
.
push
(
`<div class="popup-row"><span class="popup-title">发生时间:</span>
${
station
.
occurTime
}
</div>`
)
...
...
@@ -1024,7 +1033,8 @@ export const HandlerUtil = {
for
(
const
key
in
map
)
{
const
len
=
String
(
key
===
'{key}'
?
station
.
key
:
key
).
length
htmls
.
push
(
`<div class="popup-row"><span class="popup-title" style="min-width:
${
len
+
1
}
em">
${
key
}
: </span>
${
wrap
?
'</br>'
:
''
`<div class="popup-row"><span class="popup-title" style="min-width:
${
len
+
1
}
em">
${
key
}
: </span>
${
wrap
?
'</br>'
:
''
}
${
map
[
key
]
||
'-'
}
</div>`
,
)
}
...
...
@@ -1039,7 +1049,8 @@ export const HandlerUtil = {
if
(
isPlainObject
(
station
)
&&
isStation
)
{
htmls
.
push
(
`<div class="popup-row"><span class="popup-title">站号:</span>
${
station
.
stationCode
}
</div>`
)
htmls
.
push
(
`<div class="popup-row"><span class="popup-title">站名:</span>
${
station
.
city
||
''
}
${
station
.
cnty
||
''
`<div class="popup-row"><span class="popup-title">站名:</span>
${
station
.
city
||
''
}
${
station
.
cnty
||
''
}
${
station
.
stationName
||
''
}
</div>`
,
)
}
...
...
@@ -1068,7 +1079,8 @@ export const HandlerUtil = {
const len = String(key === '{key}' ? station.key : key).length
if (key !== '{key}') {
htmls.push(
`
<
div
class
=
"popup-row"
><
span
class
=
"popup-title"
style
=
"min-width: ${len + 1}em"
>
$
{
key
}
:
<
/span>${wrap
?
'</
br
>
' : ''
`
<
div
class
=
"popup-row"
><
span
class
=
"popup-title"
style
=
"min-width: ${len + 1}em"
>
$
{
key
}
:
<
/span>$
{
wrap
?
'</br>'
:
''
}
$
{
map
[
key
]
||
'-'
}
<
/div>`
,
)
}
...
...
src/pages/agencyBookkeeping/index.vue
浏览文件 @
0fb18627
<
template
>
</
template
>
<
script
>
export
default
{
}
export
default
{}
</
script
>
<
styl
e
>
<
template
></
templat
e
>
</
style
>
<
style
><
/
style
>
src/pages/chanxiao/caixianyi/caixianyi.vue
浏览文件 @
0fb18627
<
script
setup
lang=
"ts"
>
import
successfulDialog
from
'@/components/ConfirmDialog/successfulDialog.vue'
;
import
successfulDialog
from
'@/components/ConfirmDialog/successfulDialog.vue'
import
{
getCurrentDateTime
}
from
'@/utils/date'
import
*
as
HomeAPI
from
'@/api/model/home'
import
{
useUserStore
}
from
'@/store/modules/user'
const
userStore
=
useUserStore
();
const
userStore
=
useUserStore
()
const
consultRecord
=
reactive
({
id
:
""
,
mobile
:
''
,
// 咨询人号码
consultTime
:
""
,
// 咨询时间
bizType
:
5
,
// 业务类型(1代理记账,2农资,3农机,4金融)
enterpriseId
:
"2004840258270433254"
,
// 意向企业
feedbackRemark
:
""
// 反馈备注
id
:
''
,
mobile
:
''
,
// 咨询人号码
consultTime
:
''
,
// 咨询时间
bizType
:
5
,
// 业务类型(1代理记账,2农资,3农机,4金融)
enterpriseId
:
'2004840258270433254'
,
// 意向企业
feedbackRemark
:
''
,
// 反馈备注
})
const
pageData
=
reactive
({
showLogoutDialog
:
false
,
allpyMessageTitle
:
""
,
applyMessageText
:
""
,
allpyMessageTitle
:
''
,
applyMessageText
:
''
,
})
onShow
(()
=>
{
const
{
id
,
realname
,
phone
}
=
userStore
.
getUserInfo
;
consultRecord
.
id
=
id
;
consultRecord
.
mobile
=
phone
;
consultRecord
.
feedbackRemark
=
realname
;
const
{
id
,
realname
,
phone
}
=
userStore
.
getUserInfo
consultRecord
.
id
=
id
consultRecord
.
mobile
=
phone
consultRecord
.
feedbackRemark
=
realname
})
// 洽谈合作
function
onCooperationClick
()
{
// Message.alert('洽谈合作功能暂不可用,敬请期待~', '温馨提示')
consultRecord
.
consultTime
=
getCurrentDateTime
();
consultRecord
.
consultTime
=
getCurrentDateTime
()
HomeAPI
.
postConsultRecordAdd
(
consultRecord
).
then
((
res
)
=>
{
pageData
.
allpyMessageTitle
=
"申请成功"
;
pageData
.
applyMessageText
=
"平台已收到申请,将尽快与您取得联系!"
;
pageData
.
showLogoutDialog
=
true
;
pageData
.
allpyMessageTitle
=
'申请成功'
pageData
.
applyMessageText
=
'平台已收到申请,将尽快与您取得联系!'
pageData
.
showLogoutDialog
=
true
})
}
</
script
>
...
...
src/pages/chanxiao/chanxiao.vue
浏览文件 @
0fb18627
...
...
@@ -188,8 +188,10 @@
pageData
.
search
.
pageNo
=
1
pageData
.
purchaseDemands
=
[]
pageData
.
supplyInfos
=
[]
if
(
pageData
.
currentTransactionTab
===
1
)
getPurchaseList
()
if
(
pageData
.
currentTransactionTab
===
2
)
getSupplyList
()
if
(
pageData
.
currentTransactionTab
===
1
)
getPurchaseList
()
if
(
pageData
.
currentTransactionTab
===
2
)
getSupplyList
()
}
// 采购/供应标签点击事件
...
...
@@ -199,8 +201,10 @@
pageData
.
search
.
pageNo
=
1
pageData
.
purchaseDemands
=
[]
pageData
.
supplyInfos
=
[]
if
(
pageData
.
currentTransactionTab
===
1
)
getPurchaseList
()
if
(
pageData
.
currentTransactionTab
===
2
)
getSupplyList
()
if
(
pageData
.
currentTransactionTab
===
1
)
getPurchaseList
()
if
(
pageData
.
currentTransactionTab
===
2
)
getSupplyList
()
}
// 新需求提醒点击事件
...
...
@@ -245,12 +249,14 @@
onReachBottom
(()
=>
{
console
.
log
(
'触底了'
)
if
(
pageData
.
currentTransactionTab
===
1
)
{
if
(
pageData
.
total
<=
pageData
.
purchaseDemands
.
length
)
return
if
(
pageData
.
total
<=
pageData
.
purchaseDemands
.
length
)
return
pageData
.
search
.
pageNo
++
getPurchaseList
()
}
if
(
pageData
.
currentTransactionTab
===
2
)
{
if
(
pageData
.
total
<=
pageData
.
supplyInfos
.
length
)
return
if
(
pageData
.
total
<=
pageData
.
supplyInfos
.
length
)
return
pageData
.
search
.
pageNo
++
getSupplyList
()
}
...
...
src/pages/chanxiao/hema/hema.vue
浏览文件 @
0fb18627
<
script
setup
lang=
"ts"
>
import
successfulDialog
from
'@/components/ConfirmDialog/successfulDialog.vue'
;
import
successfulDialog
from
'@/components/ConfirmDialog/successfulDialog.vue'
import
{
getCurrentDateTime
}
from
'@/utils/date'
import
*
as
HomeAPI
from
'@/api/model/home'
import
{
useUserStore
}
from
'@/store/modules/user'
const
userStore
=
useUserStore
();
const
userStore
=
useUserStore
()
const
consultRecord
=
reactive
({
id
:
""
,
mobile
:
''
,
// 咨询人号码
consultTime
:
""
,
// 咨询时间
bizType
:
5
,
// 业务类型(1代理记账,2农资,3农机,4金融)
enterpriseId
:
"2004840258270488953"
,
// 意向企业
feedbackRemark
:
""
// 反馈备注
id
:
''
,
mobile
:
''
,
// 咨询人号码
consultTime
:
''
,
// 咨询时间
bizType
:
5
,
// 业务类型(1代理记账,2农资,3农机,4金融)
enterpriseId
:
'2004840258270488953'
,
// 意向企业
feedbackRemark
:
''
,
// 反馈备注
})
const
pageData
=
reactive
({
showLogoutDialog
:
false
,
allpyMessageTitle
:
""
,
applyMessageText
:
""
,
allpyMessageTitle
:
''
,
applyMessageText
:
''
,
})
onShow
(()
=>
{
const
{
id
,
realname
,
phone
}
=
userStore
.
getUserInfo
;
consultRecord
.
id
=
id
;
consultRecord
.
mobile
=
phone
;
consultRecord
.
feedbackRemark
=
realname
;
const
{
id
,
realname
,
phone
}
=
userStore
.
getUserInfo
consultRecord
.
id
=
id
consultRecord
.
mobile
=
phone
consultRecord
.
feedbackRemark
=
realname
})
// 洽谈合作
function
onCooperationClick
()
{
// Message.alert('洽谈合作功能暂不可用,敬请期待~', '温馨提示')
consultRecord
.
consultTime
=
getCurrentDateTime
();
consultRecord
.
consultTime
=
getCurrentDateTime
()
HomeAPI
.
postConsultRecordAdd
(
consultRecord
).
then
((
res
)
=>
{
pageData
.
allpyMessageTitle
=
"申请成功"
;
pageData
.
applyMessageText
=
"平台已收到申请,将尽快与您取得联系!"
;
pageData
.
showLogoutDialog
=
true
;
pageData
.
allpyMessageTitle
=
'申请成功'
pageData
.
applyMessageText
=
'平台已收到申请,将尽快与您取得联系!'
pageData
.
showLogoutDialog
=
true
})
}
</
script
>
...
...
src/pages/chanxiao/hongxing/hongxing.vue
浏览文件 @
0fb18627
<
script
setup
lang=
"ts"
>
import
successfulDialog
from
'@/components/ConfirmDialog/successfulDialog.vue'
;
import
successfulDialog
from
'@/components/ConfirmDialog/successfulDialog.vue'
import
{
getCurrentDateTime
}
from
'@/utils/date'
import
*
as
HomeAPI
from
'@/api/model/home'
import
{
useUserStore
}
from
'@/store/modules/user'
const
userStore
=
useUserStore
();
const
userStore
=
useUserStore
()
const
consultRecord
=
reactive
({
id
:
""
,
mobile
:
''
,
// 咨询人号码
consultTime
:
""
,
// 咨询时间
bizType
:
5
,
// 业务类型(1代理记账,2农资,3农机,4金融)
enterpriseId
:
"2004840258270471548"
,
// 意向企业
feedbackRemark
:
""
// 反馈备注
id
:
''
,
mobile
:
''
,
// 咨询人号码
consultTime
:
''
,
// 咨询时间
bizType
:
5
,
// 业务类型(1代理记账,2农资,3农机,4金融)
enterpriseId
:
'2004840258270471548'
,
// 意向企业
feedbackRemark
:
''
,
// 反馈备注
})
const
pageData
=
reactive
({
showLogoutDialog
:
false
,
allpyMessageTitle
:
""
,
applyMessageText
:
""
,
allpyMessageTitle
:
''
,
applyMessageText
:
''
,
})
onShow
(()
=>
{
const
{
id
,
realname
,
phone
}
=
userStore
.
getUserInfo
;
consultRecord
.
id
=
id
;
consultRecord
.
mobile
=
phone
;
consultRecord
.
feedbackRemark
=
realname
;
const
{
id
,
realname
,
phone
}
=
userStore
.
getUserInfo
consultRecord
.
id
=
id
consultRecord
.
mobile
=
phone
consultRecord
.
feedbackRemark
=
realname
})
// 洽谈合作
function
onCooperationClick
()
{
// Message.alert('洽谈合作功能暂不可用,敬请期待~', '温馨提示')
consultRecord
.
consultTime
=
getCurrentDateTime
();
consultRecord
.
consultTime
=
getCurrentDateTime
()
HomeAPI
.
postConsultRecordAdd
(
consultRecord
).
then
((
res
)
=>
{
pageData
.
allpyMessageTitle
=
"申请成功"
;
pageData
.
applyMessageText
=
"平台已收到申请,将尽快与您取得联系!"
;
pageData
.
showLogoutDialog
=
true
;
pageData
.
allpyMessageTitle
=
'申请成功'
pageData
.
applyMessageText
=
'平台已收到申请,将尽快与您取得联系!'
pageData
.
showLogoutDialog
=
true
})
}
</
script
>
...
...
src/pages/chanxiao/purchaseXuQiu.vue
浏览文件 @
0fb18627
...
...
@@ -291,8 +291,10 @@ return
<
view
class
=
"price-range"
>
<
input
:
disabled
=
"!isSave"
type
=
"number"
class
=
"price-input"
v
-
model
=
"form.priceStart"
placeholder
=
"最低价"
:
min
=
"0"
maxlength
=
"6"
/>
<
text
class
=
"price-separator"
>
至
<
/text
>
<
input
:
disabled
=
"!isSave"
type
=
"number"
class
=
"price-input"
v
-
model
=
"form.priceEnd"
placeholder
=
"最高价"
:
min
=
"0"
maxlength
=
"6"
>
<
view
slot
=
"suffix"
class
=
"unit-slot"
style
=
"font-size: 28rpx;"
>
元
<
/view
>
<
input
:
disabled
=
"!isSave"
type
=
"number"
class
=
"price-input"
v
-
model
=
"form.priceEnd"
placeholder
=
"最高价"
:
min
=
"0"
maxlength
=
"6"
/>
<
template
#
suffix
>
<
view
class
=
"unit-slot"
style
=
"font-size: 28rpx;"
>
元
<
/view
>
<
/template
>
<
/input
>
<
/view
>
<
/view
>
...
...
src/pages/chanxiao/qiandama/qiandama.vue
浏览文件 @
0fb18627
<
script
setup
lang=
"ts"
>
import
successfulDialog
from
'@/components/ConfirmDialog/successfulDialog.vue'
;
import
successfulDialog
from
'@/components/ConfirmDialog/successfulDialog.vue'
import
{
getCurrentDateTime
}
from
'@/utils/date'
import
*
as
HomeAPI
from
'@/api/model/home'
import
{
useUserStore
}
from
'@/store/modules/user'
const
userStore
=
useUserStore
();
const
userStore
=
useUserStore
()
const
consultRecord
=
reactive
({
id
:
""
,
mobile
:
''
,
// 咨询人号码
consultTime
:
""
,
// 咨询时间
bizType
:
5
,
// 业务类型(1代理记账,2农资,3农机,4金融)
enterpriseId
:
"2004840258270471581"
,
// 意向企业
feedbackRemark
:
""
// 反馈备注
id
:
''
,
mobile
:
''
,
// 咨询人号码
consultTime
:
''
,
// 咨询时间
bizType
:
5
,
// 业务类型(1代理记账,2农资,3农机,4金融)
enterpriseId
:
'2004840258270471581'
,
// 意向企业
feedbackRemark
:
''
,
// 反馈备注
})
const
pageData
=
reactive
({
showLogoutDialog
:
false
,
allpyMessageTitle
:
""
,
applyMessageText
:
""
,
allpyMessageTitle
:
''
,
applyMessageText
:
''
,
})
onShow
(()
=>
{
const
{
id
,
realname
,
phone
}
=
userStore
.
getUserInfo
;
consultRecord
.
id
=
id
;
consultRecord
.
mobile
=
phone
;
consultRecord
.
feedbackRemark
=
realname
;
const
{
id
,
realname
,
phone
}
=
userStore
.
getUserInfo
consultRecord
.
id
=
id
consultRecord
.
mobile
=
phone
consultRecord
.
feedbackRemark
=
realname
})
// 洽谈合作
function
onCooperationClick
()
{
// Message.alert('洽谈合作功能暂不可用,敬请期待~', '温馨提示')
consultRecord
.
consultTime
=
getCurrentDateTime
()
;
consultRecord
.
consultTime
=
getCurrentDateTime
()
HomeAPI
.
postConsultRecordAdd
(
consultRecord
).
then
((
res
)
=>
{
pageData
.
allpyMessageTitle
=
"申请成功"
;
pageData
.
applyMessageText
=
"平台已收到申请,将尽快与您取得联系!"
;
pageData
.
showLogoutDialog
=
true
;
pageData
.
allpyMessageTitle
=
'申请成功'
pageData
.
applyMessageText
=
'平台已收到申请,将尽快与您取得联系!'
pageData
.
showLogoutDialog
=
true
})
}
</
script
>
...
...
src/pages/chanxiao/supplyXuQiu.vue
浏览文件 @
0fb18627
...
...
@@ -150,7 +150,8 @@
}
function
getCurrentAddressInfo
()
{
if
(
!
uni
.
getStorageSync
(
'location'
))
return
if
(
!
uni
.
getStorageSync
(
'location'
))
return
const
{
lon
,
lat
}
=
uni
.
getStorageSync
(
'location'
)
UserInfoAPI
.
location
({
...
...
@@ -416,7 +417,7 @@
<!-- 供应时间 -->
<view
class=
"form-section"
style=
"padding: 0 30rpx"
>
<view
class=
"form-item flex align-center"
>
<text
class=
"label"
style=
"font-size: 28rpx"
>
{{
pageText
}}
时间
</text>
<text
class=
"label"
style=
"font-size: 28rpx"
>
{{
pageText
}}
时间
</text>
<view
class=
"time-range"
>
<view
class=
"time-input"
...
...
src/pages/chanxiao/xiaoxiangchaoshi/xiaoxiangchaoshi.vue
浏览文件 @
0fb18627
<
script
setup
lang=
"ts"
>
import
successfulDialog
from
'@/components/ConfirmDialog/successfulDialog.vue'
;
import
successfulDialog
from
'@/components/ConfirmDialog/successfulDialog.vue'
import
{
getCurrentDateTime
}
from
'@/utils/date'
import
*
as
HomeAPI
from
'@/api/model/home'
import
{
useUserStore
}
from
'@/store/modules/user'
const
userStore
=
useUserStore
();
const
userStore
=
useUserStore
()
const
consultRecord
=
reactive
({
id
:
""
,
mobile
:
''
,
// 咨询人号码
consultTime
:
""
,
// 咨询时间
bizType
:
5
,
// 业务类型(1代理记账,2农资,3农机,4金融)
enterpriseId
:
"2004840258270437514"
,
// 意向企业
feedbackRemark
:
""
// 反馈备注
id
:
''
,
mobile
:
''
,
// 咨询人号码
consultTime
:
''
,
// 咨询时间
bizType
:
5
,
// 业务类型(1代理记账,2农资,3农机,4金融)
enterpriseId
:
'2004840258270437514'
,
// 意向企业
feedbackRemark
:
''
,
// 反馈备注
})
const
pageData
=
reactive
({
showLogoutDialog
:
false
,
allpyMessageTitle
:
""
,
applyMessageText
:
""
,
allpyMessageTitle
:
''
,
applyMessageText
:
''
,
})
onShow
(()
=>
{
const
{
id
,
realname
,
phone
}
=
userStore
.
getUserInfo
;
consultRecord
.
id
=
id
;
consultRecord
.
mobile
=
phone
;
consultRecord
.
feedbackRemark
=
realname
;
const
{
id
,
realname
,
phone
}
=
userStore
.
getUserInfo
consultRecord
.
id
=
id
consultRecord
.
mobile
=
phone
consultRecord
.
feedbackRemark
=
realname
})
// 洽谈合作
function
onCooperationClick
()
{
// Message.alert('洽谈合作功能暂不可用,敬请期待~', '温馨提示')
consultRecord
.
consultTime
=
getCurrentDateTime
();
consultRecord
.
consultTime
=
getCurrentDateTime
()
HomeAPI
.
postConsultRecordAdd
(
consultRecord
).
then
((
res
)
=>
{
pageData
.
allpyMessageTitle
=
"申请成功"
;
pageData
.
applyMessageText
=
"平台已收到申请,将尽快与您取得联系!"
;
pageData
.
showLogoutDialog
=
true
;
pageData
.
allpyMessageTitle
=
'申请成功'
pageData
.
applyMessageText
=
'平台已收到申请,将尽快与您取得联系!'
pageData
.
showLogoutDialog
=
true
})
}
</
script
>
...
...
@@ -104,7 +105,10 @@
src=
"/static/images/codefun/ca51ef39a15d5c8414c9a427b3c4434b.png"
/>
</view>
<view
class=
"codefun-flex-row codefun-justify-between codefun-relative group_6"
@
click=
"onCooperationClick"
>
<view
class=
"codefun-flex-row codefun-justify-between codefun-relative group_6"
@
click=
"onCooperationClick"
>
<image
class=
"image_8"
src=
"/static/images/codefun/979b55187f885f1b302dd29760bb516b.png"
/>
<image
class=
"image_8"
src=
"/static/images/codefun/ecb55b953a8e07a17301bcd12aec591f.png"
/>
<view
class=
"codefun-flex-row codefun-justify-center codefun-items-center section_6 pos"
>
...
...
src/pages/chanxiao/zhusiling/zhusiling.vue
浏览文件 @
0fb18627
<
script
setup
lang=
"ts"
>
import
successfulDialog
from
'@/components/ConfirmDialog/successfulDialog.vue'
;
import
successfulDialog
from
'@/components/ConfirmDialog/successfulDialog.vue'
import
{
getCurrentDateTime
}
from
'@/utils/date'
import
*
as
HomeAPI
from
'@/api/model/home'
import
{
useUserStore
}
from
'@/store/modules/user'
const
userStore
=
useUserStore
();
const
userStore
=
useUserStore
()
const
consultRecord
=
reactive
({
id
:
""
,
mobile
:
''
,
// 咨询人号码
consultTime
:
""
,
// 咨询时间
bizType
:
5
,
// 业务类型(1代理记账,2农资,3农机,4金融)
enterpriseId
:
"2004840258270474551"
,
// 意向企业
feedbackRemark
:
""
// 反馈备注
id
:
''
,
mobile
:
''
,
// 咨询人号码
consultTime
:
''
,
// 咨询时间
bizType
:
5
,
// 业务类型(1代理记账,2农资,3农机,4金融)
enterpriseId
:
'2004840258270474551'
,
// 意向企业
feedbackRemark
:
''
,
// 反馈备注
})
const
pageData
=
reactive
({
showLogoutDialog
:
false
,
allpyMessageTitle
:
""
,
applyMessageText
:
""
,
allpyMessageTitle
:
''
,
applyMessageText
:
''
,
})
onShow
(()
=>
{
const
{
id
,
realname
,
phone
}
=
userStore
.
getUserInfo
;
consultRecord
.
id
=
id
;
consultRecord
.
mobile
=
phone
;
consultRecord
.
feedbackRemark
=
realname
;
const
{
id
,
realname
,
phone
}
=
userStore
.
getUserInfo
consultRecord
.
id
=
id
consultRecord
.
mobile
=
phone
consultRecord
.
feedbackRemark
=
realname
})
// 洽谈合作
function
onCooperationClick
()
{
// Message.alert('洽谈合作功能暂不可用,敬请期待~', '温馨提示')
consultRecord
.
consultTime
=
getCurrentDateTime
();
consultRecord
.
consultTime
=
getCurrentDateTime
()
HomeAPI
.
postConsultRecordAdd
(
consultRecord
).
then
((
res
)
=>
{
pageData
.
allpyMessageTitle
=
"申请成功"
;
pageData
.
applyMessageText
=
"平台已收到申请,将尽快与您取得联系!"
;
pageData
.
showLogoutDialog
=
true
;
pageData
.
allpyMessageTitle
=
'申请成功'
pageData
.
applyMessageText
=
'平台已收到申请,将尽快与您取得联系!'
pageData
.
showLogoutDialog
=
true
})
}
</
script
>
<
template
>
<view
class=
"codefun-flex-col page"
>
<view
class=
"codefun-flex-col section"
>
...
...
src/pages/device/components/save-dialog.vue
浏览文件 @
0fb18627
<
script
setup
lang=
"ts"
>
import
{
computed
,
reactive
,
ref
,
watch
}
from
'vue'
import
{
useDictStore
}
from
'@/store/modules/dict'
import
*
as
NongchangAPI
from
'@/api/model/nongchang'
import
{
computed
,
reactive
,
ref
,
watch
}
from
'vue'
import
{
useDictStore
}
from
'@/store/modules/dict'
import
*
as
NongchangAPI
from
'@/api/model/nongchang'
// 定义Props
interface
Props
{
// 定义Props
interface
Props
{
show
:
boolean
editData
?:
any
farmId
:
any
farmBaseId
:
any
}
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
show
:
false
,
editData
:
null
,
farmId
:
0
,
farmBaseId
:
0
,
})
})
// 定义Emits
const
emit
=
defineEmits
<
{
// 定义Emits
const
emit
=
defineEmits
<
{
'update:show'
:
[
value
:
boolean
]
submit
:
[
data
:
any
]
close
:
[]
}
>
()
}
>
()
// 表单引用
const
formRef
=
ref
()
const
loading
=
ref
(
false
)
const
showDeviceTypePicker
=
ref
(
false
)
// 表单引用
const
formRef
=
ref
()
const
loading
=
ref
(
false
)
const
showDeviceTypePicker
=
ref
(
false
)
// 字典存储
const
dictStore
=
useDictStore
()
// 字典存储
const
dictStore
=
useDictStore
()
// 表单数据
const
formData
=
reactive
({
// 表单数据
const
formData
=
reactive
({
deviceName
:
''
,
deviceType
:
''
,
deviceTypeText
:
''
,
deviceIdentifier
:
''
,
})
})
// 设备类型选项 - 使用字典数据
const
deviceTypeOptions
=
computed
(()
=>
{
// 设备类型选项 - 使用字典数据
const
deviceTypeOptions
=
computed
(()
=>
{
return
(
dictStore
.
getDictList
.
deviceType
?.
map
((
item
:
any
)
=>
({
value
:
item
.
value
,
text
:
item
.
text
,
}))
||
[]
)
})
})
// 设备类型选择器数据 (不再需要,因为fui-picker使用options属性)
// 设备类型选择器数据 (不再需要,因为fui-picker使用options属性)
// 计算属性
const
dialogTitle
=
computed
(()
=>
{
// 计算属性
const
dialogTitle
=
computed
(()
=>
{
return
props
.
editData
?
'编辑设备'
:
'添加设备'
})
})
const
submitButtonText
=
computed
(()
=>
{
const
submitButtonText
=
computed
(()
=>
{
return
props
.
editData
?
'保存'
:
'确认'
})
})
// 表单验证规则
const
rules
=
{
// 表单验证规则
const
rules
=
{
deviceName
:
[
{
required
:
true
,
message
:
'请输入设备名称'
,
trigger
:
'blur'
},
{
min
:
2
,
max
:
50
,
message
:
'设备名称长度在2-50个字符之间'
,
trigger
:
'blur'
},
...
...
@@ -83,10 +83,10 @@ const rules = {
trigger
:
'blur'
,
},
],
}
}
// 监听显示状态
watch
(
// 监听显示状态
watch
(
()
=>
props
.
show
,
(
newVal
)
=>
{
if
(
newVal
&&
props
.
editData
)
{
...
...
@@ -98,10 +98,10 @@ watch(
resetFormData
()
}
},
)
)
// 重置表单数据
function
resetFormData
()
{
// 重置表单数据
function
resetFormData
()
{
formData
.
deviceName
=
''
formData
.
deviceType
=
''
formData
.
deviceTypeText
=
''
...
...
@@ -111,11 +111,12 @@ function resetFormData() {
if
(
formRef
.
value
)
{
formRef
.
value
.
resetFields
()
}
}
}
// 加载编辑数据
function
loadEditData
()
{
if
(
!
props
.
editData
)
return
// 加载编辑数据
function
loadEditData
()
{
if
(
!
props
.
editData
)
return
formData
.
deviceName
=
props
.
editData
.
deviceName
||
''
formData
.
deviceType
=
props
.
editData
.
deviceType
||
''
...
...
@@ -133,17 +134,17 @@ function loadEditData() {
}
else
{
formData
.
deviceTypeText
=
''
}
}
}
// 设备类型选择确认
function
handleDeviceTypeConfirm
(
e
:
any
)
{
// 设备类型选择确认
function
handleDeviceTypeConfirm
(
e
:
any
)
{
formData
.
deviceType
=
e
.
value
formData
.
deviceTypeText
=
e
.
text
showDeviceTypePicker
.
value
=
false
}
}
// 提交表单
async
function
handleSubmit
()
{
// 提交表单
async
function
handleSubmit
()
{
try
{
console
.
log
(
formData
)
// 先进行表单验证
...
...
@@ -190,21 +191,21 @@ async function handleSubmit() {
}
finally
{
loading
.
value
=
false
}
}
}
// 关闭弹窗
function
handleClose
()
{
// 关闭弹窗
function
handleClose
()
{
emit
(
'update:show'
,
false
)
emit
(
'close'
)
}
}
// 暴露方法给父组件
defineExpose
({
// 暴露方法给父组件
defineExpose
({
resetFormData
,
setLoading
:
(
value
:
boolean
)
=>
{
loading
.
value
=
value
},
})
})
</
script
>
<
template
>
...
...
@@ -269,23 +270,23 @@ defineExpose({
</
template
>
<
style
lang=
"scss"
scoped
>
.dialog-content
{
.dialog-content
{
padding
:
10
rpx
30
rpx
;
width
:
90%
;
max-height
:
80vh
;
overflow-y
:
auto
;
}
}
.section-title
{
.section-title
{
font-size
:
32
rpx
;
font-weight
:
600
;
color
:
#333
;
margin
:
20
rpx
0
30
rpx
0
;
padding-left
:
20
rpx
;
border-left
:
6
rpx
solid
#5db66f
;
}
}
.dialog-buttons
{
.dialog-buttons
{
display
:
flex
;
gap
:
20
rpx
;
margin-top
:
40
rpx
;
...
...
@@ -308,10 +309,10 @@ defineExpose({
border
:
2
rpx
solid
#dcdfe6
;
}
}
}
}
//
uview-plus
表单样式调整
::v-deep
.u-form-item
{
//
uview-plus
表单样式调整
::v-deep
.u-form-item
{
margin-bottom
:
40
rpx
;
.u-form-item__body
{
...
...
@@ -334,8 +335,8 @@ defineExpose({
flex
:
1
;
min-width
:
0
;
}
}
.address-display
{
}
.address-display
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
...
...
@@ -355,15 +356,15 @@ defineExpose({
.placeholder-text
{
color
:
#c0c4cc
;
}
}
}
::v-deep
.u-form-item__body__left__content__required
{
::v-deep
.u-form-item__body__left__content__required
{
position
:
static
;
padding-right
:
10
rpx
;
}
}
//
输入框样式优化
::v-deep
.u-input
{
//
输入框样式优化
::v-deep
.u-input
{
.u-input__content
{
padding
:
0
;
...
...
@@ -388,10 +389,10 @@ defineExpose({
}
}
}
}
}
//
模态框样式调整
::v-deep
.u-modal
{
//
模态框样式调整
::v-deep
.u-modal
{
.u-modal__content
{
border-radius
:
20
rpx
;
padding
:
20
rpx
0
rpx
;
...
...
@@ -407,5 +408,5 @@ defineExpose({
color
:
#333
;
}
}
}
}
</
style
>
src/pages/device/device.vue
浏览文件 @
0fb18627
差异被折叠。
点击展开。
src/pages/fuwu/dailijizhang/dailijizhang.vue
浏览文件 @
0fb18627
<
script
setup
lang=
"ts"
>
import
successfulDialog
from
'@/components/ConfirmDialog/successfulDialog.vue'
;
import
successfulDialog
from
'@/components/ConfirmDialog/successfulDialog.vue'
import
{
getCurrentDateTime
}
from
'@/utils/date'
import
*
as
HomeAPI
from
'@/api/model/home'
import
{
useUserStore
}
from
'@/store/modules/user'
const
userStore
=
useUserStore
();
const
userStore
=
useUserStore
()
const
consultRecord
=
reactive
({
id
:
''
,
mobile
:
''
,
// 咨询人号码
consultTime
:
""
,
// 咨询时间
bizType
:
1
,
// 业务类型(1代理记账,2农资,3农机,4金融)
enterpriseId
:
1324324324
,
// 意向企业
feedbackRemark
:
""
// 反馈备注
mobile
:
''
,
// 咨询人号码
consultTime
:
''
,
// 咨询时间
bizType
:
1
,
// 业务类型(1代理记账,2农资,3农机,4金融)
enterpriseId
:
1324324324
,
// 意向企业
feedbackRemark
:
''
,
// 反馈备注
})
const
pageData
=
reactive
({
showLogoutDialog
:
false
,
})
onShow
(()
=>
{
const
{
id
,
realname
,
phone
}
=
userStore
.
getUserInfo
;
consultRecord
.
id
=
id
;
consultRecord
.
mobile
=
phone
;
consultRecord
.
feedbackRemark
=
realname
;
const
{
id
,
realname
,
phone
}
=
userStore
.
getUserInfo
consultRecord
.
id
=
id
consultRecord
.
mobile
=
phone
consultRecord
.
feedbackRemark
=
realname
})
// 立即申请
function
onApplyClick
()
{
consultRecord
.
consultTime
=
getCurrentDateTime
();
consultRecord
.
consultTime
=
getCurrentDateTime
()
HomeAPI
.
postConsultRecordAdd
(
consultRecord
).
then
((
res
)
=>
{
pageData
.
showLogoutDialog
=
true
;
pageData
.
showLogoutDialog
=
true
})
}
// 提交申请
function
handleConfirmLogout
()
{
pageData
.
showLogoutDialog
=
false
;
function
handleConfirmLogout
()
{
pageData
.
showLogoutDialog
=
false
}
// 查看大图
function
onViewImage
(
imageUrl
)
{
uni
.
previewImage
({
urls
:
[
imageUrl
]
urls
:
[
imageUrl
]
,
})
}
</
script
>
...
...
src/pages/fuwu/fuwu.vue
浏览文件 @
0fb18627
...
...
@@ -5,7 +5,8 @@
import
*
as
HomeAPI
from
'@/api/model/home'
import
Navigate
from
'@/utils/page/navigate'
import
{
useUserStore
}
from
'@/store/modules/user'
const
userStore
=
useUserStore
();
const
userStore
=
useUserStore
()
// 下拉刷新
onPullDownRefresh
(()
=>
{
getGoodsList
()
...
...
@@ -227,23 +228,31 @@
// 查询服务列表
function
getServiceItems
()
{
// '灵活用工','农机租赁','惠农金融','助农保险'
const
testLimitContent
=
[
'1983075690694692866'
,
'1983077495298183170'
,
'1983077763284848642'
,
'1983077932298522625'
,
'1985038053803876354'
,
'1985038211056721921'
,
'1985038680680357889'
];
const
testLimitContent
=
[
'1983075690694692866'
,
'1983077495298183170'
,
'1983077763284848642'
,
'1983077932298522625'
,
'1985038053803876354'
,
'1985038211056721921'
,
'1985038680680357889'
,
]
HomeAPI
.
zoneList
({
pageNo
:
1
,
pageSize
:
5
,
status
:
1
,
type
:
3
,
}).
then
((
res
)
=>
{
const
{
records
}
=
res
;
if
(
userStore
.
isAuditMode
)
{
let
arrData
=
[];
for
(
let
i
=
0
;
i
<
records
.
length
;
i
++
)
{
if
(
!
testLimitContent
.
includes
(
records
[
i
].
id
))
{
arrData
.
push
(
records
[
i
]);
const
{
records
}
=
res
if
(
userStore
.
isAuditMode
)
{
const
arrData
=
[]
for
(
let
i
=
0
;
i
<
records
.
length
;
i
++
)
{
if
(
!
testLimitContent
.
includes
(
records
[
i
].
id
))
{
arrData
.
push
(
records
[
i
])
}
}
pageData
.
menuItems
=
arrData
;
}
else
{
pageData
.
menuItems
=
arrData
}
else
{
pageData
.
menuItems
=
[...
records
]
}
})
...
...
@@ -403,7 +412,10 @@
</view>
</view>
</view>
<view
v-if=
"!userStore.isAuditMode"
class=
"codefun-flex-row codefun-justify-between codefun-items-baseline codefun-mt-24"
>
<view
v-if=
"!userStore.isAuditMode"
class=
"codefun-flex-row codefun-justify-between codefun-items-baseline codefun-mt-24"
>
<text
class=
"font_5 text_8"
>
灵活用工
</text>
<text
class=
"font_6 text_9"
@
click=
"onViewMoreFlexibleEmployment"
>
更多
</text>
</view>
...
...
@@ -485,9 +497,7 @@
</view>
</view>
<view
class=
"codefun-flex-col codefun-mt-24"
>
<view
class=
"codefun-flex-row codefun-justify-between codefun-items-center codefun-self-stretch"
>
<view
class=
"codefun-flex-row codefun-justify-between codefun-items-center codefun-self-stretch"
>
<text
class=
"font_5"
>
农资交易
</text>
<text
class=
"text-28 font-extralight color-#5DB66F"
@
click=
"onViewMoreKexinnongzi"
>
更多
<fui-icon
name=
"right"
size=
"30"
color=
"#5DB66F"
/>
...
...
@@ -521,7 +531,10 @@
>
{{ product.name }}
</text
>
<text
class=
"codefun-self-start font_1 text_27 codefun-mt-10"
style=
"font-size: 32rpx"
>
¥{{ product.minSellPrice }}
<text
v-if=
"product.unit"
style=
"font-size: 24rpx;color:#999999;"
>
/{{ product.unit }}
</text></text
>
¥{{ product.minSellPrice
}}
<text
v-if=
"product.unit"
style=
"font-size: 24rpx; color: #999999"
>
/{{ product.unit }}
</text
></text
>
</view>
</view>
...
...
src/pages/jidiguanli/add.vue
浏览文件 @
0fb18627
<
script
setup
lang=
"ts"
>
import
{
reactive
,
toRefs
}
from
'vue'
import
{
onShow
}
from
'@dcloudio/uni-app'
import
{
useUserStore
}
from
'@/store/modules/user'
import
{
useGlobSetting
}
from
'/@/hooks/setting'
import
*
as
NongchangAPI
from
'@/api/model/nongchang'
import
{
areaTree
}
from
'@/utils/areaData'
import
{
useDictStore
}
from
'@/store/modules/dict'
import
{
useFarmStore
}
from
'@/store/modules/farm'
import
{
reactive
}
from
'vue'
import
{
onShow
}
from
'@dcloudio/uni-app'
import
{
useUserStore
}
from
'@/store/modules/user'
import
{
useGlobSetting
}
from
'/@/hooks/setting'
import
*
as
NongchangAPI
from
'@/api/model/nongchang'
import
{
areaTree
}
from
'@/utils/areaData'
import
{
useDictStore
}
from
'@/store/modules/dict'
import
{
useFarmStore
}
from
'@/store/modules/farm'
const
dictStore
=
useDictStore
()
const
userStore
=
useUserStore
()
const
globSetting
=
useGlobSetting
()
const
farmStore
=
useFarmStore
()
onLoad
((
pageOptions
)
=>
{
const
dictStore
=
useDictStore
()
const
userStore
=
useUserStore
()
const
globSetting
=
useGlobSetting
()
const
farmStore
=
useFarmStore
()
onLoad
((
pageOptions
)
=>
{
// 页面加载时的初始化操作
const
farmInfo
=
farmStore
.
getFarm
if
(
farmInfo
)
{
pageData
.
form
.
farmId
=
farmInfo
.
id
}
pageData
.
form
.
farmId
=
pageOptions
.
farmId
})
})
onShow
(()
=>
{
onShow
(()
=>
{
// 数据字典赋值
initDict
()
pageData
.
form
.
userId
=
userStore
.
getUserInfo
.
id
})
})
const
pageData
=
reactive
({
const
pageData
=
reactive
({
loading
:
false
,
show
:
{
growCrops
:
false
,
...
...
@@ -75,9 +75,9 @@ const pageData = reactive({
msg
:
[
'请选择种植作物'
],
},
],
})
})
function
initDict
()
{
function
initDict
()
{
pageData
.
options
.
address
=
areaTree
pageData
.
options
.
growCrops
=
dictStore
.
getDictList
.
crops_type
.
map
((
item
)
=>
{
return
{
...
...
@@ -85,16 +85,16 @@ function initDict() {
text
:
item
.
text
,
}
})
}
function
handleChangeGrowCrops
(
e
)
{
}
function
handleChangeGrowCrops
(
e
)
{
pageData
.
form
.
growCrops
=
e
.
value
pageData
.
form
.
growCropsText
=
e
.
text
pageData
.
show
.
growCrops
=
false
}
const
toastRef
=
ref
()
}
const
toastRef
=
ref
()
const
formRef
=
ref
()
function
submit
()
{
const
formRef
=
ref
()
function
submit
()
{
formRef
.
value
.
validator
(
pageData
.
form
,
pageData
.
rules
,
true
).
then
((
res
)
=>
{
if
(
res
.
isPassed
)
{
pageData
.
loading
=
true
...
...
@@ -118,7 +118,7 @@ function submit() {
})
}
})
}
}
</
script
>
<
template
>
...
...
@@ -209,113 +209,113 @@ function submit() {
</
template
>
<
style
lang=
"scss"
scoped
>
.page
{
.page
{
background
:
#e8f5e9
;
min-height
:
100vh
;
}
}
.page-container
{
.page-container
{
padding
:
28
rpx
;
}
}
.form-card
{
.form-card
{
background-color
:
#ffffff
;
border-radius
:
20
rpx
;
margin-bottom
:
20
rpx
;
padding
:
0
;
overflow
:
hidden
;
box-shadow
:
0
1px
3px
rgba
(
0
,
0
,
0
,
0.05
);
}
}
.upload-title
{
.upload-title
{
padding
:
28
rpx
;
font-size
:
28
rpx
;
color
:
#333333
;
font-weight
:
400
;
}
}
.upload-content
{
.upload-content
{
padding
:
0
32
rpx
32
rpx
;
}
}
.submit-btn-box
{
.submit-btn-box
{
padding
:
32
rpx
0
;
}
}
:deep
(
.fui-button
)
{
:deep
(
.fui-button
)
{
border-color
:
#ff9800
!important
;
background
:
#ff9800
!important
;
}
}
:deep
(
.fui-input__wrap
),
:deep
(
.fui-textarea__wrap
)
{
:deep
(
.fui-input__wrap
),
:deep
(
.fui-textarea__wrap
)
{
padding
:
28
rpx
32
rpx
;
//
border-bottom
:
1px
solid
#e5e5e5
;
}
}
:deep
(
.fui-input__label
),
:deep
(
.fui-textarea__label
)
{
:deep
(
.fui-input__label
),
:deep
(
.fui-textarea__label
)
{
font-size
:
28
rpx
;
color
:
#333333
;
min-width
:
160
rpx
;
font-weight
:
400
;
}
}
:deep
(
.fui-input__self
),
:deep
(
.fui-textarea__self
)
{
:deep
(
.fui-input__self
),
:deep
(
.fui-textarea__self
)
{
font-size
:
28
rpx
;
color
:
#333333
;
}
}
:deep
(
.fui-input__placeholder
),
:deep
(
.fui-textarea__placeholder
)
{
:deep
(
.fui-input__placeholder
),
:deep
(
.fui-textarea__placeholder
)
{
color
:
#d0d0d0
;
font-size
:
28
rpx
;
}
}
.form-card
:deep
(
.fui-input__wrap
:last-child
),
.form-card
:deep
(
.fui-textarea__wrap
:last-child
)
{
.form-card
:deep
(
.fui-input__wrap
:last-child
),
.form-card
:deep
(
.fui-textarea__wrap
:last-child
)
{
border-bottom
:
none
;
}
}
::v-deep
.uni-input-placeholder
{
::v-deep
.uni-input-placeholder
{
font-size
:
28
rpx
!important
;
color
:
#999999
!important
;
}
:deep
(
.uni-textarea-placeholder
)
{
}
:deep
(
.uni-textarea-placeholder
)
{
font-size
:
28
rpx
!important
;
color
:
#999999
!important
;
}
:deep
(
.fui-button
)
{
}
:deep
(
.fui-button
)
{
width
:
690
rpx
;
border-color
:
#5db66f
!important
;
background
:
#5db66f
!important
;
}
}
//
移除
fui-form
的默认样式
:deep
(
.fui-form
)
{
//
移除
fui-form
的默认样式
:deep
(
.fui-form
)
{
background
:
transparent
;
}
}
:deep
(
.fui-form__item
)
{
:deep
(
.fui-form__item
)
{
background
:
transparent
;
border
:
none
;
margin-bottom
:
0
;
padding
:
0
;
}
:deep
(
.fui-input__border-bottom
)
{
}
:deep
(
.fui-input__border-bottom
)
{
right
:
32
rpx
!important
;
}
.form-item-block
{
}
.form-item-block
{
padding
:
24
rpx
12
rpx
;
//
border-bottom
:
1px
solid
#e5e5e5
;
&:last-child
{
border-bottom
:
none
;
}
}
}
.form-item-label
{
.form-item-label
{
font-size
:
28
rpx
;
color
:
#333333
;
font-weight
:
400
;
...
...
@@ -326,14 +326,14 @@ function submit() {
color
:
#ff4d4f
;
margin-right
:
8
rpx
;
}
}
}
.block-textarea
{
.block-textarea
{
width
:
100%
;
padding
:
0
rpx
12
rpx
!important
;
}
}
.block-upload
{
.block-upload
{
width
:
100%
;
padding
:
0
20
rpx
;
:deep(.uni-file-picker__container)
{
...
...
@@ -344,17 +344,17 @@ function submit() {
display
:
flex
;
justify-content
:
left
!important
;
}
}
.select-text
{
}
.select-text
{
font-size
:
28
rpx
;
color
:
#333333
;
padding
:
0
20
rpx
;
&.placeholder
{
color
:
#999999
;
}
}
}
.fui-input-wrapper
{
.fui-input-wrapper
{
cursor
:
pointer
;
}
}
</
style
>
src/pages/jidiguanli/jidiguanli.vue
浏览文件 @
0fb18627
src/pages/kexinnongzi/detail.vue
浏览文件 @
0fb18627
差异被折叠。
点击展开。
src/pages/kexinnongzi/kexinnongzi.vue
浏览文件 @
0fb18627
<
script
setup
lang=
"ts"
>
import
{
onLoad
,
onPullDownRefresh
,
onShow
}
from
'@dcloudio/uni-app'
import
{
onPullDownRefresh
,
onShow
}
from
'@dcloudio/uni-app'
import
{
reactive
}
from
'vue'
import
Navigate
from
'@/utils/page/navigate'
import
{
reactive
,
ref
}
from
'vue'
import
*
as
NongzhiAPI
from
'@/api/model/nongzhi'
onPullDownRefresh
(()
=>
{
resetData
()
getList
(
pageData
.
params
)
...
...
@@ -20,16 +21,17 @@
params
:
{
pageNo
:
1
,
pageSize
:
10
,
bizCategory
:
2
,
reviewStatus
:
1
bizCategory
:
2
,
reviewStatus
:
1
,
},
// 分页参数
hasMore
:
true
,
// 是否还有更多数据
loading
:
false
,
// 是否正在加载
dataList
:[]
dataList
:
[],
})
async
function
getList
(
params
)
{
if
(
pageData
.
loading
)
return
if
(
pageData
.
loading
)
return
pageData
.
loading
=
true
await
NongzhiAPI
.
getEnterpriseList
(
params
).
then
((
res
)
=>
{
if
(
res
.
records
.
length
>
0
)
{
...
...
@@ -48,9 +50,8 @@
pageData
.
loading
=
false
}
function
toDetail
(
item
)
{
let
param
=
encodeURIComponent
(
JSON
.
stringify
({
id
:
item
.
id
,
name
:
item
.
enterpriseName
}));
const
param
=
encodeURIComponent
(
JSON
.
stringify
({
id
:
item
.
id
,
name
:
item
.
enterpriseName
}))
Navigate
.
to
(
`/pages/kexinnongzi/detail?param=
${
param
}
`
)
}
...
...
@@ -81,14 +82,13 @@
<image
class=
"enterprise_logo"
mode=
"aspectFit"
:src=
"item.enterpriseLogoUrl"
/>
</view>
<view
class=
"item_right"
>
<view
class=
"item_name ellipsis"
>
{{
item
.
enterpriseName
}}
</view>
<view
class=
"item_description ellipsis"
>
{{
item
.
businessScope
}}
</view>
<view
class=
"item_name ellipsis"
>
{{
item
.
enterpriseName
}}
</view>
<view
class=
"item_description ellipsis"
>
{{
item
.
businessScope
}}
</view>
<view
class=
"item_details"
>
<view
class=
"detail_btn"
@
click=
"toDetail(item)"
>
查看详情
</view>
</view>
</view>
</view>
</view>
<!-- 加载状态 -->
<view
class=
"loading-status"
>
...
...
@@ -101,60 +101,62 @@
</
template
>
<
style
lang=
"less"
scoped
>
.yr_page_view
{
.yr_page_view
{
padding
:
28
rpx
;
.top_img,.agr_sup_img{
.top_img,
.agr_sup_img
{
height
:
280
rpx
;
width
:
690
rpx
;
}
.top_img
{
.top_img
{
margin-bottom
:
24
rpx
;
}
.page_content
{
.page_content
{
border-radius
:
16
rpx
;
background
:
#FFFFFF
;
background
:
#ffffff
;
}
.ellipsis
{
.ellipsis
{
width
:
200px
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.item_list
{
.item_list
{
display
:
flex
;
align-items
:
flex-start
;
align-items
:
flex-start
;
justify-content
:
space-between
;
padding-left
:
24
rpx
;
padding-right
:
30
rpx
;
padding-bottom
:
24
rpx
;
padding-top
:
24
rpx
;
border-bottom
:
2
rpx
solid
#EEEEEE
;
.item_left,.enterprise_logo{
border-bottom
:
2
rpx
solid
#eeeeee
;
.item_left,
.enterprise_logo
{
width
:
192
rpx
;
max-height
:
160
rpx
;
}
.item_right
{
.item_right
{
width
:
436
rpx
;
.item_name
{
.item_name
{
font-size
:
32
rpx
;
font-weight
:
500
;
color
:
#333333
;
}
.item_description
{
.item_description
{
font-size
:
24
rpx
;
font-weight
:
400
;
color
:
#999999
;
margin-top
:
16
rpx
;
margin-bottom
:
12
rpx
;
}
.item_details
{
.item_details
{
display
:
flex
;
justify-content
:
flex-end
;
}
.detail_btn
{
.detail_btn
{
border-radius
:
100
rpx
;
background
:
#5DB66F
;
background
:
#5db66f
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
...
...
@@ -163,18 +165,15 @@
height
:
48
rpx
;
font-size
:
24
rpx
;
font-weight
:
400
;
color
:
#FFFFFF
;
color
:
#ffffff
;
}
}
}
.item_list
:last-child
{
.item_list
:last-child
{
border-bottom
:
none
;
}
}
.loading-status
{
text-align
:
center
;
padding
:
20
rpx
;
...
...
src/pages/kexinnongzi/shenqingruzhu.vue
浏览文件 @
0fb18627
差异被折叠。
点击展开。
src/pages/knowledgeVideo/index.vue
浏览文件 @
0fb18627
...
...
@@ -15,21 +15,22 @@
const
videoList
=
ref
([])
function
getVideoList
(
params
)
{
if
(
model
.
loading
)
return
if
(
model
.
loading
)
return
model
.
loading
=
true
videoApi
.
getList
(
params
).
then
((
res
)
=>
{
if
(
res
.
records
.
length
>
0
)
{
const
{
records
}
=
res
;
const
{
records
}
=
res
let
scale
:
any
=
0
;
for
(
let
i
=
0
;
i
<
records
.
length
;
i
++
)
{
if
(
records
[
i
].
width
)
{
scale
=
(
340
/
records
[
i
].
width
).
toFixed
(
1
);
records
[
i
].
videoWidth
=
340
;
records
[
i
].
videoHeight
=
Math
.
floor
(
records
[
i
].
height
*
scale
);
}
else
{
records
[
i
].
videoWidth
=
0
;
records
[
i
].
videoHeight
=
0
;
let
scale
:
any
=
0
for
(
let
i
=
0
;
i
<
records
.
length
;
i
++
)
{
if
(
records
[
i
].
width
)
{
scale
=
(
340
/
records
[
i
].
width
).
toFixed
(
1
)
records
[
i
].
videoWidth
=
340
records
[
i
].
videoHeight
=
Math
.
floor
(
records
[
i
].
height
*
scale
)
}
else
{
records
[
i
].
videoWidth
=
0
records
[
i
].
videoHeight
=
0
}
}
...
...
src/pages/linghuoyonggong/components/register-dialog.vue
浏览文件 @
0fb18627
...
...
@@ -73,8 +73,25 @@
</view>
<view
class=
"text-left"
>
<fui-form
ref=
"formRef"
>
<fui-input
marginTop=
"30"
size=
"28"
placeholder=
"请填写姓名"
v-model=
"pageData.form.reservedname"
required
maxlength=
"16"
placeholderStyle=
"margin-left: 10rpx"
/>
<fui-input
marginTop=
"30"
size=
"28"
placeholder=
"请填写预留手机"
v-model=
"pageData.form.reservedmobile"
required
type=
"number"
maxlength=
"11"
placeholderStyle=
"margin-left: 10rpx"
/>
<fui-input
marginTop=
"30"
size=
"28"
placeholder=
"请填写姓名"
v-model=
"pageData.form.reservedname"
required
maxlength=
"16"
placeholderStyle=
"margin-left: 10rpx"
/>
<fui-input
marginTop=
"30"
size=
"28"
placeholder=
"请填写预留手机"
v-model=
"pageData.form.reservedmobile"
required
type=
"number"
maxlength=
"11"
placeholderStyle=
"margin-left: 10rpx"
/>
<view
style=
"margin-top: 30rpx"
>
<fui-button
text=
"提交"
bold
radius=
"96rpx"
@
click=
"submit"
/>
</view>
...
...
src/pages/linghuoyonggong/components/yonggongmap.vue
浏览文件 @
0fb18627
差异被折叠。
点击展开。
src/pages/linghuoyonggong/details.vue
浏览文件 @
0fb18627
<
script
setup
lang=
"ts"
>
import
{
reactive
,
toRefs
}
from
'vue'
import
{
onLoad
,
onShow
}
from
'@dcloudio/uni-app'
import
{
reactive
}
from
'vue'
import
{
onLoad
}
from
'@dcloudio/uni-app'
import
{
getCalculateAge
}
from
'@/utils/date'
import
*
as
LinghuoyonggongAPI
from
'@/api/model/linghuoyonggong'
;
import
*
as
LinghuoyonggongAPI
from
'@/api/model/linghuoyonggong'
import
ConfirmDialog
from
'@/components/ConfirmDialog/index.vue'
const
pageData
=
reactive
({
loading
:
false
,
workersParam
:
[],
contactMobile
:
""
,
contactName
:
""
,
showConfirmDialog
:
false
,
workersParam
:
[],
contactMobile
:
''
,
contactName
:
''
,
showConfirmDialog
:
false
,
})
// 字典值
const
DictData
=
reactive
({
sexArr
:[],
// 性别
educationArr
:[]
// 学历
sexArr
:
[],
// 性别
educationArr
:
[],
// 学历
})
onLoad
((
options
)
=>
{
let
param
=
JSON
.
parse
(
decodeURIComponent
(
options
.
param
));
const
param
=
JSON
.
parse
(
decodeURIComponent
(
options
.
param
))
uni
.
setNavigationBarTitle
({
title
:
param
.
villageName
});
getLaborAppDetail
(
param
.
id
);
title
:
param
.
villageName
,
})
getLaborAppDetail
(
param
.
id
)
})
async
function
getLaborAppDetail
(
id
:
string
)
{
await
LinghuoyonggongAPI
.
gitListByCodeDict
({
code
:
'sex'
}).
then
(
res
=>
{
DictData
.
sexArr
=
res
;
await
LinghuoyonggongAPI
.
gitListByCodeDict
({
code
:
'sex'
}).
then
((
res
)
=>
{
DictData
.
sexArr
=
res
})
await
LinghuoyonggongAPI
.
gitListByCodeDict
({
code
:
'education'
}).
then
(
res
=>
{
DictData
.
educationArr
=
res
;
await
LinghuoyonggongAPI
.
gitListByCodeDict
({
code
:
'education'
}).
then
((
res
)
=>
{
DictData
.
educationArr
=
res
})
await
LinghuoyonggongAPI
.
getLaborAppDetail
({
id
}).
then
((
res
)
=>
{
pageData
.
workersParam
=
res
.
workers
;
pageData
.
contactMobile
=
res
.
contactMobile
;
pageData
.
contactName
=
res
.
contactName
.
substring
(
0
,
1
)
+
new
Array
(
res
.
contactName
.
length
).
join
(
'*'
);
pageData
.
workersParam
=
res
.
workers
pageData
.
contactMobile
=
res
.
contactMobile
pageData
.
contactName
=
res
.
contactName
.
substring
(
0
,
1
)
+
Array
.
from
({
length
:
res
.
contactName
.
length
}).
join
(
'*'
)
})
}
// 返回字典中的中文值
function
returnDictZhVel
(
type
:
any
,
val
:
any
)
{
let
valText
=
""
;
if
(
type
==
'gender'
)
{
let
arr
=
DictData
.
sexArr
;
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
if
(
val
==
parseInt
(
arr
[
i
].
itemValue
))
{
valText
=
arr
[
i
].
itemText
;
break
;
function
returnDictZhVel
(
type
:
any
,
val
:
any
)
{
let
valText
=
''
if
(
type
==
'gender'
)
{
const
arr
=
DictData
.
sexArr
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
if
(
val
==
Number
.
parseInt
(
arr
[
i
].
itemValue
))
{
valText
=
arr
[
i
].
itemText
break
}
}
}
if
(
type
==
'edu'
)
{
let
arr
=
DictData
.
educationArr
;
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
if
(
val
==
parseInt
(
arr
[
i
].
itemValue
))
{
valText
=
arr
[
i
].
itemText
;
break
;
if
(
type
==
'edu'
)
{
const
arr
=
DictData
.
educationArr
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
if
(
val
==
Number
.
parseInt
(
arr
[
i
].
itemValue
))
{
valText
=
arr
[
i
].
itemText
break
}
}
}
return
valText
;
return
valText
}
function
makePhoneCall
()
{
function
makePhoneCall
()
{
uni
.
makePhoneCall
({
phoneNumber
:
pageData
.
contactMobile
});
phoneNumber
:
pageData
.
contactMobile
,
})
}
</
script
>
...
...
@@ -73,16 +74,22 @@
<view
v-if=
"!pageData.workersParam || pageData.workersParam.length == 0"
style=
"height: 700rpx"
>
<fui-empty
marginTop=
"100"
src=
"/static/images/no-data.png"
title=
"暂无数据"
/>
</view>
<view
class=
"yr-person-item"
v-for=
"(item,
index) in pageData.workersParam"
:key=
"index"
>
<view
class=
"yr-person-item"
v-for=
"(item,
index) in pageData.workersParam"
:key=
"index"
>
<view
class=
"yr-person-info"
>
<view
class=
"person_name_attr"
>
{{
item
.
name
}}
<text
class=
"person_attr"
>
{{
item
.
attr
}}
</text></view>
<view
class=
"person-info"
>
{{
getCalculateAge
(
item
.
birthday
)
}}
|
{{
returnDictZhVel
(
'gender'
,
item
.
gender
)
}}
|
{{
returnDictZhVel
(
'edu'
,
item
.
edu
)
}}
</view>
<view
class=
"person-info text_overflow_ellipsis"
>
技能:
{{
item
.
skill
}}
</view>
<view
class=
"person_name_attr"
>
{{
item
.
name
}}
<text
class=
"person_attr"
>
{{
item
.
attr
}}
</text></view
>
<view
class=
"person-info"
>
{{
getCalculateAge
(
item
.
birthday
)
}}
|
{{
returnDictZhVel
(
'gender'
,
item
.
gender
)
}}
|
{{
returnDictZhVel
(
'edu'
,
item
.
edu
)
}}
</view
>
<view
class=
"person-info text_overflow_ellipsis"
>
技能:
{{
item
.
skill
}}
</view>
</view>
</view>
</view>
<view
v-if=
"pageData.workersParam.length"
class=
"make-phone-view"
>
<fui-button
text=
"电话沟通"
bold
radius=
"96rpx"
@
click=
"pageData.showConfirmDialog = true"
height=
"80rpx"
/>
<fui-button
text=
"电话沟通"
bold
radius=
"96rpx"
@
click=
"pageData.showConfirmDialog = true"
height=
"80rpx"
/>
</view>
<!-- 确认对话框 -->
<ConfirmDialog
...
...
@@ -98,35 +105,35 @@
</
template
>
<
style
lang=
"scss"
scoped
>
.details_page
{
.details_page
{
background
:
rgba
(
230
,
245
,
232
,
1
);
min-height
:
100vh
;
width
:
750
rpx
;
padding-top
:
24
rpx
;
position
:
relative
;
.details-content
{
.details-content
{
width
:
694
rpx
;
background-color
:
#FFFFFF
;
background-color
:
#ffffff
;
margin-left
:
28
rpx
;
border-radius
:
12
rpx
;
padding
:
24
rpx
;
.yr-person-item
{
border-bottom
:
2
rpx
solid
#EEEEEE
;
.yr-person-item
{
border-bottom
:
2
rpx
solid
#eeeeee
;
margin-bottom
:
24
rpx
;
.yr-person-info
{
.person_name_attr
{
.yr-person-info
{
.person_name_attr
{
font-size
:
28
rpx
;
font-weight
:
500
;
color
:
#333333
;
.person_attr
{
.person_attr
{
font-size
:
24
rpx
;
font-weight
:
400
;
color
:
#5DB66F
;
color
:
#5db66f
;
margin-left
:
12
rpx
;
}
}
.person-info
{
.person-info
{
font-size
:
24
rpx
;
color
:
#999999
;
vertical-align
:
middle
;
...
...
@@ -135,17 +142,17 @@
}
}
}
.yr-person-item
:last-child
{
.yr-person-item
:last-child
{
border-bottom
:
none
;
}
}
.make-phone-view
{
.make-phone-view
{
width
:
690
rpx
;
height
:
80
rpx
;
position
:
fixed
;
left
:
30
rpx
;
bottom
:
62
rpx
;
}
}
}
</
style
>
src/pages/linghuoyonggong/form.vue
浏览文件 @
0fb18627
差异被折叠。
点击展开。
src/pages/linghuoyonggong/linghuoyonggong.vue
浏览文件 @
0fb18627
差异被折叠。
点击展开。
src/pages/linghuoyonggong/publishEmployment.vue
浏览文件 @
0fb18627
差异被折叠。
点击展开。
src/pages/login/login.vue
浏览文件 @
0fb18627
...
...
@@ -91,7 +91,7 @@
],
data
:
{
username
:
''
,
password
:
''
,
password
:
''
,
// code: '',
read
:
false
,
deviceId
:
''
,
...
...
@@ -274,8 +274,7 @@
v-model=
"model.form.data.password"
backgroundColor=
"transparent"
borderColor=
"transparent"
>
</fui-input>
/>
</view>
</view>
<!--
<view
class=
"login-input-area"
>
...
...
src/pages/news/index.vue
浏览文件 @
0fb18627
<
script
setup
lang=
"ts"
>
import
{
reactive
,
ref
}
from
'vue'
import
*
as
NewsApi
from
'@/api/model/news'
import
dayjs
from
'dayjs'
import
*
as
NewsApi
from
'@/api/model/news'
interface
News
{
id
:
number
...
...
@@ -34,7 +34,8 @@
const
navigateName
=
ref
([
'热点新闻'
,
'农业政策'
])
async
function
getNewsList
(
params
)
{
if
(
model
.
loading
)
return
if
(
model
.
loading
)
return
model
.
loading
=
true
NewsApi
.
getList
(
params
).
then
((
res
)
=>
{
if
(
res
.
records
.
length
>
0
)
{
...
...
@@ -129,7 +130,7 @@
<image
class=
"mt-0.5 mr-1 w-30 h-26"
src=
"/static/images/news/views.png"
/>
<view
class=
"flex-center text-24 lh-24rpx"
>
{{
news
.
viewCount
}}
</view>
</view>
<view
v-show=
"!news.posterUrl"
class=
"w-4%"
></view
>
<view
v-show=
"!news.posterUrl"
class=
"w-4%"
/
>
</view>
</view>
<view
v-show=
"news.posterUrl"
class=
"w-30% h-130"
>
...
...
src/pages/nongchang/components/WeatherForecast.vue
浏览文件 @
0fb18627
<
script
setup
lang=
"ts"
>
import
dayjs
from
'dayjs'
import
*
as
WeatherAPI
from
'@/api/model/weather'
import
{
Echarts
,
useEcharts
}
from
'@/components/Echarts'
import
{
getDayLabelValue
,
getWeatherIcon
}
from
'@/utils/weather'
import
dayjs
from
'dayjs'
import
*
as
WeatherAPI
from
'@/api/model/weather'
import
{
Echarts
,
useEcharts
}
from
'@/components/Echarts'
import
{
getDayLabelValue
,
getWeatherIcon
}
from
'@/utils/weather'
// 逐 7 天预报图表
const
[
register7Forecast
,
Forecast7Chart
]
=
useEcharts
()
const
model
=
reactive
({
// 逐 7 天预报图表
const
[
register7Forecast
,
Forecast7Chart
]
=
useEcharts
()
const
model
=
reactive
({
days
:
15
,
updateTime
:
'-'
,
})
})
onLoad
(
async
()
=>
{
onLoad
(
async
()
=>
{
const
location
=
uni
.
getStorageSync
(
'location'
)
const
forecasts
=
await
WeatherAPI
.
forecast
(
`
${
location
.
lon
}
,
${
location
.
lat
}
`
,
model
.
days
).
then
((
res
)
=>
{
model
.
updateTime
=
dayjs
(
res
.
data
.
updateTime
).
format
(
'YYYY-MM-DD HH:mm'
)
...
...
@@ -44,22 +44,24 @@ onLoad(async () => {
},
formatter
:
(
params
)
=>
{
// 过滤掉星期标签、日期标签和天气图标
const
filteredParams
=
params
.
filter
(
param
=>
{
return
param
.
seriesName
!==
'星期标签'
&&
const
filteredParams
=
params
.
filter
((
param
)
=>
{
return
(
param
.
seriesName
!==
'星期标签'
&&
param
.
seriesName
!==
'日期标签'
&&
param
.
seriesName
!==
'天气图标'
;
});
if
(
filteredParams
.
length
===
0
)
return
''
;
param
.
seriesName
!==
'天气图标'
)
})
if
(
filteredParams
.
length
===
0
)
return
''
let
result
=
''
;
filteredParams
.
forEach
(
param
=>
{
let
result
=
''
filteredParams
.
forEach
((
param
)
=>
{
// 只显示有意义的数值信息
if
(
param
.
seriesName
===
'最高温度'
||
param
.
seriesName
===
'最低温度'
)
{
result
+=
`
${
param
.
seriesName
}
:
${
param
.
value
}
°<br/>`
;
}
});
return
result
;
result
+=
`
${
param
.
seriesName
}
:
${
param
.
value
}
°<br/>`
}
})
return
result
},
},
grid
:
{
top
:
'5%'
,
...
...
@@ -194,7 +196,7 @@ onLoad(async () => {
},
],
})
})
})
</
script
>
<
template
>
...
...
@@ -213,5 +215,5 @@ onLoad(async () => {
</
template
>
<
style
lang=
"scss"
scoped
>
//
//
</
style
>
src/pages/nongchang/create-nongchang-form.vue
浏览文件 @
0fb18627
<
script
setup
lang=
"ts"
>
import
{
reactive
,
toRefs
}
from
'vue'
import
{
onShow
}
from
'@dcloudio/uni-app'
import
{
useUserStore
}
from
'@/store/modules/user'
import
{
useGlobSetting
}
from
'/@/hooks/setting'
...
...
@@ -23,7 +22,13 @@ onLoad((pageOptions) => {
pageData
.
form
[
key
]
=
res
[
key
]
}
})
// 回显省市区名称
if
(
res
.
provinceName
&&
res
.
cityName
&&
res
.
districtName
)
{
pageData
.
form
.
provinceName
=
res
.
provinceName
pageData
.
form
.
cityName
=
res
.
cityName
pageData
.
form
.
districtName
=
res
.
districtName
pageData
.
form
.
provinceText
=
res
.
provinceName
+
'/'
+
res
.
cityName
+
'/'
+
res
.
districtName
}
// 编辑模式下,如果已有示例图片,需要设置到上传组件中
if
(
res
.
coverImage
)
{
...
...
@@ -99,6 +104,7 @@ const pageData = reactive({
districtName
:
''
,
addressDetail
:
''
,
coverImage
:
''
,
slogan
:
''
,
},
rules
:
[
{
...
...
@@ -139,7 +145,17 @@ const pageData = reactive({
{
name
:
'provinceName'
,
rule
:
[
'required'
],
msg
:
[
'请选择归属省份'
],
msg
:
[
'请填写省市区信息!'
],
},
{
name
:
'cityName'
,
rule
:
[
'required'
],
msg
:
[
'请填写省市区信息!'
],
},
{
name
:
'districtName'
,
rule
:
[
'required'
],
msg
:
[
'请填写省市区信息!'
],
},
{
name
:
'addressDetail'
,
...
...
@@ -231,15 +247,43 @@ function submit() {
formRef
.
value
.
validator
(
pageData
.
form
,
pageData
.
rules
,
true
).
then
((
res
)
=>
{
if
(
res
.
isPassed
)
{
pageData
.
loading
=
true
// 提交前处理:通过对provinceText值按/分隔,分别赋值给provinceName、cityName和districtName
if
(
pageData
.
form
.
provinceText
)
{
const
addressParts
=
pageData
.
form
.
provinceText
.
split
(
'/'
)
if
(
addressParts
.
length
>=
3
)
{
pageData
.
form
.
provinceName
=
addressParts
[
0
]
pageData
.
form
.
cityName
=
addressParts
[
1
]
pageData
.
form
.
districtName
=
addressParts
[
2
]
}
}
const
apiCall
=
pageData
.
form
.
id
?
NongchangAPI
.
farmsEdit
:
NongchangAPI
.
farmsAdd
apiCall
(
pageData
.
form
)
.
then
(()
=>
{
.
then
((
res
)
=>
{
toastRef
.
value
.
show
({
type
:
'success'
,
text
:
pageData
.
form
.
id
?
'保存修改成功'
:
'添加农场成功'
,
})
// 获取农场ID:编辑时使用当前ID,新增时从返回值获取(假设返回的是ID或包含ID的对象)
// 根据后端接口惯例,如果返回的是ID字符串直接使用,如果是对象则取id字段
// 暂时假设res为ID或者不影响跳转,优先使用pageData.form.id,如果是新增则尝试从res获取
// 如果res不是id,则需要确认接口返回值结构。通常新增接口返回ID比较合理。
// 鉴于不确定接口返回值,这里先假设编辑时id已知,新增时尝试从res获取,如果获取不到则回退到列表页
const
targetId
=
pageData
.
form
.
id
||
(
typeof
res
===
'string'
?
res
:
res
?.
id
);
setTimeout
(()
=>
{
if
(
targetId
)
{
// 跳转到农场详情页,注意路径需要是绝对路径
uni
.
redirectTo
({
url
:
`/pages/nongchang/detail/index?id=
${
targetId
}
`
})
}
else
{
// 如果没有ID,回退上一页
uni
.
navigateBack
()
}
},
500
);
})
.
finally
(()
=>
{
...
...
@@ -326,6 +370,19 @@ function submit() {
class=
"block-textarea"
/>
</view>
<!-- 农场标语 -->
<view
class=
"form-item-block"
>
<view
class=
"form-item-label"
>
农场标语
</view>
<fui-textarea
height=
"100rpx"
size=
"28"
:borderTop=
"false"
:borderBottom=
"false"
placeholder=
"请输入农场标语"
v-model=
"pageData.form.slogan"
class=
"block-textarea"
/>
</view>
</view>
<!-- 第二组表单 -->
...
...
@@ -333,14 +390,14 @@ function submit() {
<fui-form-item
required
asterisk
label=
"归属
省份
"
label=
"归属
地区
"
labelSize=
"28"
:labelWeight=
"400"
labelWidth=
"auto"
>
<view
class=
"time-input"
@
click=
"pageData.show.address = true"
>
<text
class=
"select-text"
:class=
"
{ placeholder: !pageData.form.provinceText }">
{{
pageData
.
form
.
provinceText
||
'请选择归属
省份
'
}}
{{
pageData
.
form
.
provinceText
||
'请选择归属
地区
'
}}
</text>
</view>
</fui-form-item>
...
...
@@ -351,8 +408,8 @@ function submit() {
labelWidth=
"auto"
labelSize=
"28"
:labelWeight=
"400"
label=
"归属
省份
"
placeholder=
"请选择归属
省份
"
label=
"归属
地区
"
placeholder=
"请选择归属
地区
"
:value=
"pageData.form.provinceText"
/>
</view>
-->
...
...
src/pages/nongchang/detail/index.vue
浏览文件 @
0fb18627
差异被折叠。
点击展开。
src/pages/nongchang/equipment.vue
0 → 100644
浏览文件 @
0fb18627
<
script
setup
lang=
"ts"
>
import
{
computed
,
reactive
,
ref
}
from
'vue'
import
dayjs
from
'dayjs'
const
nowText
=
ref
(
''
)
function
tick
()
{
nowText
.
value
=
dayjs
().
format
(
'YYYY年MM月DD日 dddd HH:mm:ss'
)
}
tick
()
setInterval
(
tick
,
1000
)
const
pageData
=
reactive
({
banner
:
{
image
:
'/static/images/codefun/farm.jpg'
,
name
:
'西区茶油基地'
,
},
search
:
''
,
categories
:
[
{
id
:
'all'
,
name
:
'全部'
},
{
id
:
'irrigation'
,
name
:
'灌溉系统'
},
{
id
:
'soil'
,
name
:
'土壤监测'
},
{
id
:
'camera'
,
name
:
'摄像监控'
},
{
id
:
'weather'
,
name
:
'气象站'
},
],
currentCategory
:
'all'
,
areas
:
[
{
id
:
1
,
name
:
'北区灌溉系统'
,
type
:
'irrigation'
},
{
id
:
2
,
name
:
'南区灌溉系统'
,
type
:
'irrigation'
},
{
id
:
3
,
name
:
'西区灌溉系统'
,
type
:
'irrigation'
},
{
id
:
4
,
name
:
'东区灌溉系统'
,
type
:
'irrigation'
},
{
id
:
5
,
name
:
'南区土壤监测'
,
type
:
'soil'
},
{
id
:
6
,
name
:
'北区土壤监测'
,
type
:
'soil'
},
{
id
:
7
,
name
:
'北区土壤监测'
,
type
:
'soil'
},
{
id
:
8
,
name
:
'西区摄像监控'
,
type
:
'camera'
},
{
id
:
9
,
name
:
'东区摄像监控'
,
type
:
'camera'
},
{
id
:
10
,
name
:
'南区摄像监控'
,
type
:
'camera'
},
{
id
:
11
,
name
:
'北区摄像监控'
,
type
:
'camera'
},
{
id
:
12
,
name
:
'东区摄像监控'
,
type
:
'camera'
},
{
id
:
13
,
name
:
'北区气象站'
,
type
:
'weather'
},
{
id
:
14
,
name
:
'南区气象站'
,
type
:
'weather'
},
{
id
:
15
,
name
:
'西区气象站'
,
type
:
'weather'
},
],
})
const
filteredAreas
=
computed
(()
=>
{
const
kw
=
pageData
.
search
.
trim
()
return
pageData
.
areas
.
filter
((
a
)
=>
{
const
byCat
=
pageData
.
currentCategory
===
'all'
||
a
.
type
===
pageData
.
currentCategory
const
byKw
=
!
kw
||
a
.
name
.
includes
(
kw
)
return
byCat
&&
byKw
})
})
function
selectCategory
(
id
:
string
)
{
pageData
.
currentCategory
=
id
}
function
onSearchConfirm
()
{}
function
openArea
(
item
:
any
)
{
uni
.
navigateTo
({
url
:
`/pages/device/device?area=
${
encodeURIComponent
(
item
.
name
)}
`
})
}
</
script
>
<
template
>
<view
class=
"page"
>
<view
class=
"banner"
>
<image
class=
"banner-img"
:src=
"pageData.banner.image"
mode=
"aspectFill"
/>
<view
class=
"banner-time"
>
{{
nowText
}}
</view>
<view
class=
"banner-label"
>
<text
class=
"label-text"
>
{{
pageData
.
banner
.
name
}}
</text>
<fui-icon
name=
"share"
:size=
"36"
color=
"#fff"
/>
</view>
</view>
<view
class=
"section"
>
<fui-search-bar
v-model=
"pageData.search"
:height=
"72"
:radius=
"80"
placeholder=
"请输入搜索内容"
inputBackground=
"#fff"
:cancel=
"false"
@
search=
"onSearchConfirm"
/>
<scroll-view
class=
"chip-row"
scroll-x
show-scrollbar=
"false"
>
<view
class=
"chip-wrap"
>
<fui-tag
v-for=
"c in pageData.categories"
:key=
"c.id"
:text=
"c.name"
:theme=
"pageData.currentCategory === c.id ? 'dark' : 'light'"
type=
"success"
:padding=
"['16rpx', '32rpx']"
:radius=
"40"
:marginRight=
"16"
@
click=
"selectCategory(c.id)"
/>
</view>
</scroll-view>
<view
class=
"grid-box"
>
<fui-grid
:columns=
"3"
:showBorder=
"false"
:square=
"false"
>
<fui-grid-item
v-for=
"(item, idx) in filteredAreas"
:key=
"item.id"
:index=
"idx"
backgroundColor=
"#FFFFFF"
@
click=
"() => openArea(item)"
>
<view
class=
"card"
:class=
"
{ active: item.name.includes('西区摄像监控') }">
<text
class=
"card-text"
>
{{
item
.
name
}}
</text>
</view>
</fui-grid-item>
</fui-grid>
</view>
</view>
</view>
</
template
>
<
style
lang=
"scss"
scoped
>
.page
{
background
:
#e6f5e8
;
min-height
:
100vh
;
}
.banner
{
position
:
relative
;
margin
:
24
rpx
;
border-radius
:
16
rpx
;
overflow
:
hidden
;
height
:
280
rpx
;
}
.banner-img
{
width
:
100%
;
height
:
100%
;
}
.banner-time
{
position
:
absolute
;
left
:
24
rpx
;
top
:
20
rpx
;
color
:
#fff
;
text-shadow
:
0
1px
2px
rgba
(
0
,
0
,
0
,
0.2
);
font-size
:
24
rpx
;
}
.banner-label
{
position
:
absolute
;
right
:
16
rpx
;
bottom
:
16
rpx
;
display
:
flex
;
align-items
:
center
;
gap
:
12
rpx
;
}
.label-text
{
color
:
#fff
;
font-size
:
28
rpx
;
}
.section
{
padding
:
24
rpx
;
}
.chip-row
{
width
:
100%
;
}
.chip-wrap
{
display
:
flex
;
flex-direction
:
row
;
gap
:
16
rpx
;
}
.grid-box
{
margin-top
:
24
rpx
;
}
.card
{
height
:
120
rpx
;
margin
:
12
rpx
;
border-radius
:
16
rpx
;
border
:
1
rpx
solid
#eaeef1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
background
:
#fff
;
}
.card.active
{
background
:
#5db66f
;
color
:
#fff
;
border-color
:
#5db66f
;
}
.card-text
{
font-size
:
28
rpx
;
color
:
#2a2a2a
;
}
</
style
>
src/pages/nongchang/nongchang.vue
浏览文件 @
0fb18627
差异被折叠。
点击展开。
src/pages/nongjifuwu/components/apply-dialog.vue
浏览文件 @
0fb18627
...
...
@@ -33,23 +33,28 @@
name
:
'phone'
,
rule
:
[
'required'
],
msg
:
[
'请填写手机号码'
],
},
{
},
{
name
:
'scope'
,
rule
:
[
'required'
],
msg
:
[
'请选择作业区域'
],
},
{
},
{
name
:
'startTime'
,
rule
:
[
'required'
],
msg
:
[
'请选择开始时间'
],
},
{
},
{
name
:
'endTime'
,
rule
:
[
'required'
],
msg
:
[
'请选择结束时间'
],
},
{
},
{
name
:
'address'
,
rule
:
[
'required'
],
msg
:
[
'请填写详细地址'
],
},
{
},
{
name
:
'demand'
,
rule
:
[
'required'
],
msg
:
[
'请填写需求'
],
...
...
@@ -135,11 +140,53 @@
</view>
<view
class=
"text-left"
>
<fui-form
ref=
"formRef"
>
<fui-input
marginTop=
"30"
size=
"24"
type=
"number"
maxlength=
"11"
placeholder=
"请填写手机号码"
v-model=
"pageData.form.phone"
required
placeholderStyle=
"margin-left: 10rpx;"
/>
<fui-input
marginTop=
"30"
size=
"24"
disabled
@
click=
"pageData.areaShow.address = true"
placeholder=
"请选择作业区域"
v-model=
"pageData.scopeText"
required
placeholderStyle=
"margin-left: 10rpx;"
/>
<fui-input
marginTop=
"30"
size=
"24"
placeholder=
"请填写详细地址"
v-model=
"pageData.form.address"
required
placeholderStyle=
"margin-left: 10rpx;"
/>
<fui-input
marginTop=
"30"
size=
"24"
placeholder=
"请选择作业时间"
v-model=
"pageData.form.time"
@
click=
"dict.show.time = true"
required
placeholderStyle=
"margin-left: 10rpx;"
/>
<fui-textarea
v-model=
"pageData.form.demand"
:marginTop=
"30"
size=
"24"
placeholder=
"简要说明作业要求"
flexStart
required
placeholderStyle=
"margin-left: 10rpx;"
height=
"100rpx"
/>
<fui-input
marginTop=
"30"
size=
"24"
type=
"number"
maxlength=
"11"
placeholder=
"请填写手机号码"
v-model=
"pageData.form.phone"
required
placeholderStyle=
"margin-left: 10rpx;"
/>
<fui-input
marginTop=
"30"
size=
"24"
disabled
@
click=
"pageData.areaShow.address = true"
placeholder=
"请选择作业区域"
v-model=
"pageData.scopeText"
required
placeholderStyle=
"margin-left: 10rpx;"
/>
<fui-input
marginTop=
"30"
size=
"24"
placeholder=
"请填写详细地址"
v-model=
"pageData.form.address"
required
placeholderStyle=
"margin-left: 10rpx;"
/>
<fui-input
marginTop=
"30"
size=
"24"
placeholder=
"请选择作业时间"
v-model=
"pageData.form.time"
@
click=
"dict.show.time = true"
required
placeholderStyle=
"margin-left: 10rpx;"
/>
<fui-textarea
v-model=
"pageData.form.demand"
:marginTop=
"30"
size=
"24"
placeholder=
"简要说明作业要求"
flexStart
required
placeholderStyle=
"margin-left: 10rpx;"
height=
"100rpx"
/>
<view
style=
"margin-top: 30rpx"
>
<fui-button
type=
"warning"
text=
"提交"
bold
radius=
"96rpx"
@
click=
"submit"
/>
</view>
...
...
src/pages/nongjifuwu/detail.vue
浏览文件 @
0fb18627
差异被折叠。
点击展开。
src/pages/nongjifuwu/farm-form.vue
浏览文件 @
0fb18627
差异被折叠。
点击展开。
src/pages/nongjifuwu/machine-form.vue
浏览文件 @
0fb18627
...
...
@@ -222,14 +222,17 @@
label-width=
"180"
maxlength=
"6"
>
<view
slot=
"suffix"
class=
"unit-slot"
>
元/亩
</view>
<template
#
suffix
>
<view
class=
"unit-slot"
>
元/亩
</view>
</
template
>
<!-- <slot name="right" style="font-size:28rpx;"></slot> -->
</fui-input>
</view>
<view
class=
"bg-white mt20"
style=
"padding: 0.875rem 1rem"
>
<view
class=
"mb-1 flex justify-start"
style=
"font-size:28rpx;"
><span
class=
"text-red"
>
*
</span>
图片
</view>
<view
class=
"mb-1 flex justify-start"
style=
"font-size: 28rpx"
><span
class=
"text-red"
>
*
</span>
图片
</view>
<uni-file-picker
:value=
"form.pictureObj"
:max-size=
"1024"
...
...
src/pages/nongjifuwu/nongjifuwu.vue
浏览文件 @
0fb18627
差异被折叠。
点击展开。
src/pages/nongjifuwu/shenqingruzhu.vue
浏览文件 @
0fb18627
差异被折叠。
点击展开。
src/pages/nongyezhengce/nongyezhengce.vue
浏览文件 @
0fb18627
<!-- src/pages/zhunongjinrong/zhunongjinrong.vue -->
<
script
setup
lang=
"ts"
>
import
{
reactive
,
ref
}
from
'vue'
import
successfulDialog
from
'@/components/ConfirmDialog/successfulDialog.vue'
;
import
{
getCurrentDateTime
}
from
'@/utils/date'
import
*
as
NewsApi
from
'@/api/model/news'
import
dayjs
from
'dayjs'
let
currentTab
=
ref
(
'redian'
);
import
*
as
NewsApi
from
'@/api/model/news'
const
currentTab
=
ref
(
'redian'
)
const
pageData
=
reactive
({
params
:
{
pageNo
:
1
,
pageSize
:
10
,
category
:
1
,
category
:
1
,
/* news:{
category:1
} */
},
// 分页参数
hasMore
:
true
,
// 是否还有更多数据
loading
:
false
,
// 是否正在加载
dataList
:[]
dataList
:
[],
})
onLoad
((
options
)
=>
{
if
(
options
&&
options
.
category
==
1
)
{
pageData
.
params
.
category
=
options
.
category
;
currentTab
.
value
=
'redian'
;
}
else
{
pageData
.
params
.
category
=
2
;
currentTab
.
value
=
'nongye'
;
if
(
options
&&
options
.
category
==
1
)
{
pageData
.
params
.
category
=
options
.
category
currentTab
.
value
=
'redian'
}
else
{
pageData
.
params
.
category
=
2
currentTab
.
value
=
'nongye'
}
})
onShow
(()
=>
{
getListData
();
getListData
()
})
async
function
getListData
()
{
if
(
pageData
.
loading
)
return
if
(
pageData
.
loading
)
return
pageData
.
loading
=
true
await
NewsApi
.
getList
(
pageData
.
params
).
then
((
res
)
=>
{
if
(
res
.
records
.
length
>
0
)
{
...
...
@@ -55,22 +55,22 @@
url
:
`/pages/news/detail?id=
${
news
.
id
}
`
,
})
}
function
switchTab
(
type
)
{
pageData
.
dataList
=
[];
pageData
.
hasMore
=
true
;
pageData
.
params
.
pageNo
=
1
;
currentTab
.
value
=
type
;
if
(
type
==
'redian'
)
{
pageData
.
params
.
category
=
1
;
getListData
();
function
switchTab
(
type
)
{
pageData
.
dataList
=
[]
pageData
.
hasMore
=
true
pageData
.
params
.
pageNo
=
1
currentTab
.
value
=
type
if
(
type
==
'redian'
)
{
pageData
.
params
.
category
=
1
getListData
()
}
if
(
type
==
'nongye'
)
{
pageData
.
params
.
category
=
2
;
getListData
();
if
(
type
==
'nongye'
)
{
pageData
.
params
.
category
=
2
getListData
()
}
if
(
type
==
'butie'
)
{
pageData
.
params
.
category
=
3
;
pageData
.
dataList
=
[];
if
(
type
==
'butie'
)
{
pageData
.
params
.
category
=
3
pageData
.
dataList
=
[]
}
}
</
script
>
...
...
@@ -78,18 +78,42 @@
<
template
>
<view
class=
"nongyezhengce-page"
>
<view
class=
"nongyezhengce-content"
>
<scroll-view
class=
"page-content"
scroll-y
@
scrolltolower=
"getListData()"
:show-scrollbar=
"false"
>
<scroll-view
class=
"page-content"
scroll-y
@
scrolltolower=
"getListData()"
:show-scrollbar=
"false"
>
<view
class=
"top-tab"
>
<view
class=
"tab-btn"
:class=
"currentTab == 'redian' ? 'tab-active' : ''"
@
click=
"switchTab('redian')"
>
<image
class=
"tab-icon"
mode=
"heightFix"
:src=
"`/static/images/home/$
{currentTab == 'redian' ?'redian_active':'redian_icon'}.png`" />
<view
class=
"tab-btn"
:class=
"currentTab == 'redian' ? 'tab-active' : ''"
@
click=
"switchTab('redian')"
>
<image
class=
"tab-icon"
mode=
"heightFix"
:src=
"`/static/images/home/$
{currentTab == 'redian' ? 'redian_active' : 'redian_icon'}.png`"
/>
<text
class=
"tab-text"
>
热点新闻
</text>
</view>
<view
class=
"tab-btn"
:class=
"currentTab == 'nongye' ? 'tab-active' : ''"
@
click=
"switchTab('nongye')"
>
<image
class=
"tab-icon"
mode=
"heightFix"
:src=
"`/static/images/home/$
{currentTab == 'nongye' ?'nongye_active':'nongye_icon'}.png`" />
<view
class=
"tab-btn"
:class=
"currentTab == 'nongye' ? 'tab-active' : ''"
@
click=
"switchTab('nongye')"
>
<image
class=
"tab-icon"
mode=
"heightFix"
:src=
"`/static/images/home/$
{currentTab == 'nongye' ? 'nongye_active' : 'nongye_icon'}.png`"
/>
<text
class=
"tab-text"
>
农业政策
</text>
</view>
<view
class=
"tab-btn"
:class=
"currentTab == 'butie' ? 'tab-active' : ''"
@
click=
"switchTab('butie')"
>
<image
class=
"tab-icon"
mode=
"heightFix"
:src=
"`/static/images/home/$
{currentTab == 'butie' ?'butie_active':'butie_icon'}.png`" />
<view
class=
"tab-btn"
:class=
"currentTab == 'butie' ? 'tab-active' : ''"
@
click=
"switchTab('butie')"
>
<image
class=
"tab-icon"
mode=
"heightFix"
:src=
"`/static/images/home/$
{currentTab == 'butie' ? 'butie_active' : 'butie_icon'}.png`"
/>
<text
class=
"tab-text"
>
购置补贴
</text>
</view>
</view>
...
...
@@ -97,11 +121,22 @@
<view
v-if=
"!pageData.dataList || pageData.dataList.length == 0"
style=
"height: 700rpx"
>
<fui-empty
marginTop=
"100"
src=
"/static/images/no-data.png"
title=
"暂无数据"
/>
</view>
<view
class=
"content-item"
v-for=
"item in pageData.dataList"
:key=
"item.id"
@
click=
"toNewsDetail(item)"
>
<view
class=
"item-content"
>
{{
item
.
title
}}
</view>
<view
class=
"content-item"
v-for=
"item in pageData.dataList"
:key=
"item.id"
@
click=
"toNewsDetail(item)"
>
<view
class=
"item-content"
>
{{
item
.
title
}}
</view>
<view
class=
"item-info"
>
<view
class=
"item-time"
>
{{
dayjs
(
item
.
publishDate
).
format
(
'YYYY-MM-DD'
)
}}
</view>
<view
class=
"item-views"
><image
class=
"views-icon"
mode=
"widthFix"
src=
"/static/images/home/views_icon.png"
/><text>
{{
item
.
viewCount
}}
</text></view>
<view
class=
"item-views"
><image
class=
"views-icon"
mode=
"widthFix"
src=
"/static/images/home/views_icon.png"
/><text>
{{
item
.
viewCount
}}
</text></view
>
</view>
</view>
</view>
...
...
@@ -116,61 +151,61 @@
</
template
>
<
style
scoped
lang=
"scss"
>
.nongyezhengce-page
{
.nongyezhengce-page
{
background-color
:
#e6f5e8
;
overflow-y
:
auto
;
}
.nongyezhengce-content
{
}
.nongyezhengce-content
{
width
:
100vw
;
height
:
calc
(
100vh
-
88
rpx
);
display
:
flex
;
justify-content
:
center
;
.page-content
{
.page-content
{
width
:
690
rpx
;
padding-top
:
24
rpx
;
padding-bottom
:
24
rpx
;
.top-tab
{
.top-tab
{
display
:
flex
;
justify-content
:
space-between
;
.tab-btn
{
.tab-btn
{
width
:
220
rpx
;
height
:
72
rpx
;
border-radius
:
9999px
;
background
:
#FFFFFF
;
background
:
#ffffff
;
color
:
#333333
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
.tab-icon
{
.tab-icon
{
height
:
36
rpx
;
margin-right
:
8
rpx
;
}
.tab-text
{
.tab-text
{
font-size
:
28
rpx
;
}
}
.tab-active
{
background
:
#5DB66F
;
color
:
#FFFFFF
;
.tab-active
{
background
:
#5db66f
;
color
:
#ffffff
;
}
}
.list-content
{
.list-content
{
margin-top
:
4
rpx
;
}
.content-item
{
.content-item
{
width
:
690
rpx
;
border-radius
:
8
rpx
;
background
:
#FFFFFF
;
padding
:
20
rpx
;
background
:
#ffffff
;
padding
:
20
rpx
;
margin-top
:
20
rpx
;
.item-content
{
.item-content
{
font-size
:
28
rpx
;
line-height
:
40
rpx
;
text-align
:
justify
;
color
:
#333333
;
}
.item-info
{
.item-info
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
...
...
@@ -179,19 +214,19 @@
font-size
:
24
rpx
;
line-height
:
40
rpx
;
font-weight
:
400
;
.views-icon
{
.views-icon
{
width
:
28
rpx
;
margin-right
:
8
rpx
;
}
}
}
}
}
.loading-status
{
}
.loading-status
{
background-color
:
#e6f5e8
;
text-align
:
center
;
padding
:
20
rpx
;
color
:
#999
;
font-size
:
28
rpx
;
}
}
</
style
>
src/pages/resource/components/save-dialog.vue
浏览文件 @
0fb18627
...
...
@@ -115,8 +115,7 @@
// 加载编辑数据
function
loadEditData
()
{
if
(
!
props
.
editData
)
return
if
(
!
props
.
editData
)
return
formData
.
fileName
=
props
.
editData
.
fileName
||
''
formData
.
fileType
=
props
.
editData
.
fileType
||
''
...
...
src/pages/resource/resource.vue
浏览文件 @
0fb18627
...
...
@@ -16,7 +16,8 @@
})
function
getList
()
{
if
(
!
paging
.
value
)
return
if
(
!
paging
.
value
)
return
// API留空,使用模拟数据 - 根据图片内容调整
API
.
getResourceList
(
pageData
.
param
).
then
((
res
)
=>
{
paging
.
value
.
complete
(
res
.
records
)
...
...
@@ -50,8 +51,7 @@
// 格式化时间显示
function
formatTime
(
time
)
{
if
(
!
time
)
return
''
if
(
!
time
)
return
''
// 如果是完整的时间字符串,可以格式化为图片中的样式
return
time
.
includes
(
' '
)
?
time
:
`
${
time
}
14:00`
}
...
...
@@ -75,8 +75,7 @@ return ''
// 格式化文件大小
function
formatFileSize
(
bytes
)
{
if
(
!
bytes
)
return
'125kb'
if
(
!
bytes
)
return
'125kb'
const
k
=
1024
const
sizes
=
[
'B'
,
'KB'
,
'MB'
,
'GB'
]
const
i
=
Math
.
floor
(
Math
.
log
(
bytes
)
/
Math
.
log
(
k
))
...
...
src/pages/webview/webview.vue
浏览文件 @
0fb18627
<
template
>
<view
class=
"webview-container"
>
<web-view
:src=
"url"
></web-view>
</view>
</
template
>
<
script
>
export
default
{
export
default
{
data
()
{
return
{
url
:
''
url
:
''
,
}
},
onLoad
(
options
)
{
...
...
@@ -17,10 +11,16 @@ export default {
}
else
{
uni
.
showToast
({
title
:
'网址不存在'
,
icon
:
'none'
icon
:
'none'
,
})
uni
.
navigateBack
()
}
},
}
}
</
script
>
<
template
>
<view
class=
"webview-container"
>
<web-view
:src=
"url"
/>
</view>
</
template
>
src/pages/wode/wode.vue
浏览文件 @
0fb18627
...
...
@@ -239,7 +239,8 @@
function
onAddClick
(
feature
:
any
)
{
console
.
log
(
'点击功能模块:'
,
feature
)
if
(
feature
.
id
===
2
)
showAddDialog
()
if
(
feature
.
id
===
2
)
showAddDialog
()
}
// 常用资源点击事件
function
onResourceClick
(
resource
:
any
)
{
...
...
src/pages/zhunongjinrong/_zhunongjinrong.vue
浏览文件 @
0fb18627
...
...
@@ -103,7 +103,7 @@
}
const
policyInfoTitle
=
computed
(()
=>
{
return
(
pageData
.
buttons
.
filter
((
btn
)
=>
btn
.
active
)?.[
0
]?.
name
||
'惠农贷款'
)
+
'政策'
return
`
${
pageData
.
buttons
.
filter
((
btn
)
=>
btn
.
active
)?.[
0
]?.
name
||
'惠农贷款'
}
政策
`
})
</
script
>
...
...
src/pages/zhunongjinrong/zhunongjinrong.vue
浏览文件 @
0fb18627
<!-- src/pages/zhunongjinrong/zhunongjinrong.vue -->
<
script
setup
lang=
"ts"
>
import
{
reactive
,
ref
}
from
'vue'
import
successfulDialog
from
'@/components/ConfirmDialog/successfulDialog.vue'
;
import
successfulDialog
from
'@/components/ConfirmDialog/successfulDialog.vue'
import
{
getCurrentDateTime
}
from
'@/utils/date'
import
*
as
HomeAPI
from
'@/api/model/home'
import
{
useUserStore
}
from
'@/store/modules/user'
onShow
(()
=>
{
const
{
id
,
realname
,
phone
}
=
userStore
.
getUserInfo
;
consultRecord
.
id
=
id
;
consultRecord
.
mobile
=
phone
;
consultRecord
.
feedbackRemark
=
realname
;
const
{
id
,
realname
,
phone
}
=
userStore
.
getUserInfo
consultRecord
.
id
=
id
consultRecord
.
mobile
=
phone
consultRecord
.
feedbackRemark
=
realname
})
// 定义银行类型
type
BankKey
=
'nongye'
|
'youzheng'
|
'nongshang'
...
...
@@ -167,33 +168,33 @@
currentBank
.
value
=
bank
}
const
userStore
=
useUserStore
()
;
const
userStore
=
useUserStore
()
const
consultRecord
=
reactive
({
id
:
""
,
mobile
:
''
,
// 咨询人号码
consultTime
:
""
,
// 咨询时间
bizType
:
4
,
// 业务类型(1代理记账,2农资,3农机,4金融)
enterpriseId
:
1324324324
,
// 意向企业
feedbackRemark
:
""
// 反馈备注
id
:
''
,
mobile
:
''
,
// 咨询人号码
consultTime
:
''
,
// 咨询时间
bizType
:
4
,
// 业务类型(1代理记账,2农资,3农机,4金融)
enterpriseId
:
1324324324
,
// 意向企业
feedbackRemark
:
''
,
// 反馈备注
})
const
pageData
=
reactive
({
showLogoutDialog
:
false
,
allpyMessageTitle
:
""
,
applyMessageText
:
""
,
allpyMessageTitle
:
''
,
applyMessageText
:
''
,
})
// 立即申请
function
onApplyClick
()
{
consultRecord
.
consultTime
=
getCurrentDateTime
();
consultRecord
.
consultTime
=
getCurrentDateTime
()
HomeAPI
.
postConsultRecordAdd
(
consultRecord
).
then
((
res
)
=>
{
pageData
.
allpyMessageTitle
=
"申请成功"
;
pageData
.
applyMessageText
=
"平台已收到申请,将尽快与您取得联系!"
;
pageData
.
showLogoutDialog
=
true
;
pageData
.
allpyMessageTitle
=
'申请成功'
pageData
.
applyMessageText
=
'平台已收到申请,将尽快与您取得联系!'
pageData
.
showLogoutDialog
=
true
})
}
// 提交申请
function
handleConfirmLogout
(){
pageData
.
showLogoutDialog
=
false
;
function
handleConfirmLogout
()
{
pageData
.
showLogoutDialog
=
false
}
</
script
>
...
...
@@ -287,7 +288,7 @@
v-if=
"bankInfo[currentBank].processType === 'simple'"
class=
"codefun-flex-col codefun-justify-start codefun-items-start codefun-self-stretch text-wrapper"
>
<text
class=
"
font_6 text_13 fontsize_28"
>
线下咨询,已实际办理流程为准。
</text>
<text
class=
"font_6 text_13 fontsize_28"
>
线下咨询,已实际办理流程为准。
</text>
</view>
<view
v-else
class=
"codefun-flex-col codefun-self-stretch section_8"
>
<view
...
...
@@ -302,7 +303,7 @@
>
<text
class=
"font_8"
>
{{
step
.
number
}}
</text>
</view>
<text
class=
"font_9 text_15 ml-11
"
>
{{
step
.
title
}}
</text>
<text
class=
"font_9 text_15 ml-11"
>
{{
step
.
title
}}
</text>
</view>
<view
v-if=
"step.desc"
class=
"codefun-flex-row group_5"
>
<view
class=
"codefun-self-center section_9"
/>
...
...
src/utils/date.ts
浏览文件 @
0fb18627
...
...
@@ -37,17 +37,17 @@ export function formatDate(date: Date | number | string): string {
*/
export
function
getCalculateAge
(
birthDate
:
Date
|
string
):
number
{
// 解析出生日期字符串为Date对象
const
birthDateObj
=
new
Date
(
birthDate
);
const
birthDateObj
=
new
Date
(
birthDate
)
// 获取当前日期
const
currentDate
=
new
Date
();
const
currentDate
=
new
Date
()
// 计算两个日期之间的年份差异
let
age
=
currentDate
.
getFullYear
()
-
birthDateObj
.
getFullYear
();
let
age
=
currentDate
.
getFullYear
()
-
birthDateObj
.
getFullYear
()
// 检查是否还没到生日,如果是,则年龄减1
const
m
=
currentDate
.
getMonth
()
-
birthDateObj
.
getMonth
();
const
m
=
currentDate
.
getMonth
()
-
birthDateObj
.
getMonth
()
if
(
m
<
0
||
(
m
===
0
&&
currentDate
.
getDate
()
<
birthDateObj
.
getDate
()))
{
age
--
;
age
--
}
return
age
;
return
age
}
/**
...
...
@@ -62,11 +62,11 @@ export function getCurrentDateTime(): string {
const
month
=
String
(
now
.
getMonth
()
+
1
).
padStart
(
2
,
'0'
)
// 获取日期,确保两位数格式
const
day
=
String
(
now
.
getDate
()).
padStart
(
2
,
'0'
)
;
const
day
=
String
(
now
.
getDate
()).
padStart
(
2
,
'0'
)
const
hour
=
String
(
now
.
getHours
()).
padStart
(
2
,
'0'
);
const
minute
=
String
(
now
.
getMinutes
()).
padStart
(
2
,
'0'
);
const
second
=
String
(
now
.
getSeconds
()).
padStart
(
2
,
'0'
);
const
hour
=
String
(
now
.
getHours
()).
padStart
(
2
,
'0'
)
const
minute
=
String
(
now
.
getMinutes
()).
padStart
(
2
,
'0'
)
const
second
=
String
(
now
.
getSeconds
()).
padStart
(
2
,
'0'
)
// 返回格式化后的日期字符串
return
`
${
year
}
-
${
month
}
-
${
day
}
${
hour
}
:
${
minute
}
:
${
second
}
`
...
...
src/utils/dict/area.ts
浏览文件 @
0fb18627
import
{
cascaderHn
}
from
'/@/api/model/dict'
const
storageKey
=
'app_dict_data_area_cascaderHn'
;
const
storageKey
=
'app_dict_data_area_cascaderHn'
let
areaOptions
=
[]
;
export
const
getDictData
=
async
()
=>
{
let
areaOptions
=
[]
export
async
function
getDictData
()
{
// 先从本地加载数据
let
dictData
=
getLocalDict
()
;
let
dictData
=
getLocalDict
()
if
(
!
dictData
)
{
// 如果本地没有数据,则从接口获取
const
res
=
await
cascaderHn
()
;
const
data
=
JSON
.
stringify
(
res
[
0
].
children
).
replace
(
/label/g
,
'text'
)
;
uni
.
setStorageSync
(
storageKey
,
data
)
;
dictData
=
JSON
.
parse
(
data
)
;
const
res
=
await
cascaderHn
()
const
data
=
JSON
.
stringify
(
res
[
0
].
children
).
replace
(
/label/g
,
'text'
)
uni
.
setStorageSync
(
storageKey
,
data
)
dictData
=
JSON
.
parse
(
data
)
}
areaOptions
=
dictData
;
return
dictData
;
areaOptions
=
dictData
return
dictData
}
/**
* 获取本地数据
*/
export
const
getLocalDict
=
()
=>
{
const
data
=
uni
.
getStorageSync
(
storageKey
)
;
export
function
getLocalDict
()
{
const
data
=
uni
.
getStorageSync
(
storageKey
)
if
(
data
)
{
return
data
?
JSON
.
parse
(
data
)
:
null
;
return
data
?
JSON
.
parse
(
data
)
:
null
}
return
null
;
return
null
}
/**
* 刷新数据
*/
export
const
refreshDictData
=
()
=>
{
export
function
refreshDictData
()
{
// 删除本地数据
uni
.
removeStorageSync
(
storageKey
)
;
uni
.
removeStorageSync
(
storageKey
)
// 重新获取数据
getDictData
()
;
getDictData
()
}
export
const
getText
=
(
scope
:
string
,
spliced
:
string
)
=>
{
export
function
getText
(
scope
:
string
,
spliced
:
string
)
{
if
(
!
scope
||
!
areaOptions
||
areaOptions
.
length
===
0
)
{
return
''
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论