Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
computedRoomPad
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
邓文彬
computedRoomPad
Commits
9f7b6bb1
提交
9f7b6bb1
authored
9月 09, 2024
作者:
邓文彬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(操作日志): 修改完成
上级
8a6985b1
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
720 行增加
和
52 行删除
+720
-52
index.vue
components/searchCom/index.vue
+103
-0
content.vue
pages/home/content.vue
+2
-1
home.vue
pages/home/home.vue
+76
-8
operLog.vue
pages/index/operLog.vue
+0
-0
index.vue
pages/inspectionManagement/index.vue
+105
-0
login.vue
pages/login/login.vue
+5
-5
reportInfo.vue
pages/report/reportInfo.vue
+1
-1
dialog.vue
pages/synchronousManagement/dialog.vue
+206
-0
index.vue
pages/synchronousManagement/index.vue
+118
-0
changelog.md
uni_modules/uni-data-select/changelog.md
+6
-0
uni-data-select.vue
...ata-select/components/uni-data-select/uni-data-select.vue
+95
-35
package.json
uni_modules/uni-data-select/package.json
+3
-2
app-service.js
unpackage/dist/dev/app-plus/app-service.js
+0
-0
app-view.js
unpackage/dist/dev/app-plus/app-view.js
+0
-0
systemCofig.js
utils/systemCofig.js
+0
-0
没有找到文件。
components/searchCom/index.vue
0 → 100644
浏览文件 @
9f7b6bb1
<
template
>
<view
class=
"search-com"
>
<view
class=
"search-com-left"
>
<uni-data-select
class=
"uni-search-item"
v-model=
"searchFrom.inspectionType"
:localdata=
"inspectArr"
@
change=
"(e) => change(e, 'inspectionType')"
placeholder=
"全部巡检"
></uni-data-select>
<uni-data-select
class=
"uni-search-item"
v-model=
"searchFrom.iSync"
:localdata=
"synchronization"
placeholder=
"全部"
@
change=
"(e) => change(e, 'iSynchronization')"
></uni-data-select>
<uni-data-select
class=
"uni-search-item"
v-model=
"searchFrom.isException"
:localdata=
"exceptionArr"
placeholder=
"有无异常"
@
change=
"(e) => change(e, 'isException')"
></uni-data-select>
</view>
<view
class=
"search-com-right"
>
<uni-datetime-picker
class=
"uni-datetime-picker"
type=
"daterange"
v-model=
"searchFrom.inspectionTime"
:border=
"false"
@
change=
"(e) => change(e, 'inspectionTime')"
/>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
searchFrom
:
{
inspectionType
:
""
,
// 巡检类型
iSynchronization
:
""
,
// 同部数据
isException
:
""
,
// 有无异常
inspectionTime
:
""
,
// 时间选择
},
inspectArr
:
[
// { value: 0, text: "全部巡检" },
{
value
:
1
,
text
:
"机房巡检"
},
{
value
:
2
,
text
:
"进到巡检"
},
],
synchronization
:
[
// { value: 0, text: "全部" },
{
value
:
1
,
text
:
"未同步"
},
{
value
:
2
,
text
:
"已同步"
},
],
exceptionArr
:
[
{
value
:
0
,
text
:
"有无异常"
},
{
value
:
1
,
text
:
"有异常"
},
{
value
:
2
,
text
:
"无异常"
},
],
};
},
methods
:
{
change
(
e
,
key
)
{
this
.
searchFrom
[
key
]
=
e
;
this
.
$emit
(
"change"
,
this
.
searchFrom
);
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.search-com {
display: flex;
align-items: center;
.search-com-left {
display: flex;
align-items: center;
border: 1px solid;
flex: 1;
.uni-search-item {
margin-right: 12px;
width: 130px;
background: #fff;
border-radius: 4px;
border: none !important;
}
}
.search-com-right {
width: 300px;
.uni-datetime-picker {
background: #fff;
border: 1px solid;
}
}
}
</
style
>
pages/home/content.vue
浏览文件 @
9f7b6bb1
...
...
@@ -49,6 +49,7 @@
<view
class=
"month-record-item"
v-for=
"item in 20"
:key=
"item"
>
<view
class=
"seconed-title"
>
2024年08月
</view>
<view
class=
"inspect-list"
>
<InspectionItem
/>
</view>
...
...
@@ -182,7 +183,7 @@ export default {
}
.month-list {
height: calc(100vh - 166px - 25px - 16px);
height: calc(100vh - 166px - 25px - 16px
- 16px - 20px
);
overflow: auto;
.month-record-item {
margin-bottom: 24px;
...
...
pages/home/home.vue
浏览文件 @
9f7b6bb1
...
...
@@ -23,32 +23,65 @@
</view>
<view
class=
"button-group"
>
<view
class=
"log-button"
>
操作日志
</view>
<view
class=
"reset-password-button"
>
修改密码?
</view>
<view
class=
"log-button"
@
click=
"lookLog"
>
操作日志
</view>
<view
class=
"reset-password-button"
@
click=
"updatePassword"
>
修改密码?
</view
>
<view
class=
"reset-password-button"
@
click=
"logOut"
>
退出账号?
</view>
</view>
</view>
<!-- 内容区 -->
<view
class=
"right-container"
>
<Content
v-if=
"activeTabIndex == 0"
/>
<!-- 首页 -->
<Content
v-if=
"activeTabIndex == 0"
/>
<!-- 巡检管理 -->
<InspectionManagement
v-if=
"activeTabIndex == 1"
/>
<!-- 同步管理 -->
<SynchronousManagement
v-if=
"activeTabIndex == 2"
/>
<!-- 日志 -->
<OperLog
v-if=
"activeTabIndex == 4"
/>
</view>
<!-- 退出账号弹出 -->
<uni-popup
ref=
"inputDialog2"
type=
"dialog"
>
<uni-popup-dialog
ref=
"inputClose2"
mode=
"base"
title=
"确定退出该账号?"
@
confirm=
"dialogInputConfirm2"
>
</uni-popup-dialog>
</uni-popup>
</view>
</
template
>
<
script
>
import
InspectionItem
from
"@/components/inspectionItem/index.vue"
;
import
Content
from
"./content.vue"
;
import
InspectionManagement
from
"@/pages/inspectionManagement/index.vue"
;
import
SynchronousManagement
from
"@/pages/synchronousManagement/index.vue"
;
import
OperLog
from
"@/pages/index/operLog.vue"
import
Content
from
"./content.vue"
;
export
default
{
components
:
{
InspectionItem
,
Content
InspectionItem
,
Content
,
InspectionManagement
,
SynchronousManagement
,
OperLog
},
data
()
{
return
{
activeTabIndex
:
0
,
activeTabIndex
:
3
,
tabList
:
[
{
defaultIcon
:
"iconfont icon-yingyongyewuguanli1"
,
...
...
@@ -69,6 +102,39 @@ export default {
};
},
methods
:
{
// 修改密码
updatePassword
()
{
uni
.
navigateTo
({
url
:
"/pages/index/editPd"
,
});
},
// 查看操作日志
lookLog
()
{
// console.log('查看操作日志');
// uni.navigateTo({
// url: "/pages/index/operLog",
// });
this
.
activeTabIndex
=
4
},
//退出--弹出对话框
dialogInputConfirm2
()
{
let
_this
=
this
;
uni
.
redirectTo
({
url
:
"/pages/login/login"
,
success
()
{
_this
.
$store
.
commit
(
"SET_USER"
,
{});
},
});
},
//退出
logOut
()
{
this
.
$refs
.
inputDialog2
.
open
();
},
// 切换tab
tabClick
(
item
,
index
)
{
console
.
log
(
"----"
);
this
.
activeTabIndex
=
index
;
...
...
@@ -180,6 +246,8 @@ export default {
flex: 1;
margin-left: 16px;
z-index: 10;
padding-top: 32px;
padding-right: 16px;
// .card-list {
// display: flex;
...
...
pages/index/operLog.vue
浏览文件 @
9f7b6bb1
差异被折叠。
点击展开。
pages/inspectionManagement/index.vue
0 → 100644
浏览文件 @
9f7b6bb1
<
template
>
<view
class=
"inspection-management"
>
<!-- 搜索项 -->
<SearchCom
@
change=
"change"
/>
<!-- 结果 -->
<view
class=
"inspection-management-content"
>
<view
class=
"count-tatal"
>
<text
class=
"num"
>
123条
</text>
<text>
查询结果
</text>
</view>
<view
class=
"month-list"
>
<!-- 每月记录 -->
<view
class=
"month-record-item"
v-for=
"item in 20"
:key=
"item"
>
<view
class=
"seconed-title"
>
2024年08月
</view>
<view
class=
"inspect-list"
>
<InspectionItem
/>
</view>
</view>
</view>
</view>
<!-- 开始巡检 -->
<view
class=
"inspection-button"
>
开始巡检
</view>
</view>
</
template
>
<
script
>
import
SearchCom
from
"@/components/searchCom/index.vue"
;
import
InspectionItem
from
"@/components/inspectionItem/index.vue"
;
export
default
{
components
:
{
SearchCom
,
InspectionItem
,
},
data
()
{
return
{};
},
methods
:
{
change
(
e
)
{
console
.
log
(
"----"
,
e
);
},
},
};
</
script
>
<
style
scoped
lang=
"less"
>
.inspection-management {
padding-top: 16px;
.count-tatal {
margin: 16px 0 8px 0;
font-size: 14px;
color: #4a4a4a;
font-weight: 400;
.num {
font-size: 18px;
color: #3774f6;
line-height: 26px;
font-weight: 500;
}
}
.inspection-management-content {
.month-list {
height: calc(100vh - 26px - 16px - 8px - 36px - 62px);
border: 1px solid;
overflow: auto;
.seconed-title {
margin-top: 16px;
font-size: 18px;
color: #000000;
font-weight: bold;
}
.month-record-item {
margin-bottom: 24px;
&:last-of-type {
margin: 0;
}
.inspect-list {
display: flex;
flex-wrap: wrap;
}
}
}
}
.inspection-button {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 60px;
width: 240px;
height: 40px;
left: 50%;
color: #fff;
transform: translateX(-50%);
background-image: linear-gradient(180deg, #3773f6 0%, #2c57f6 99%);
box-shadow: 0px 10px 24px 0px rgba(51, 104, 246, 0.24);
border-radius: 27px;
}
}
</
style
>
pages/login/login.vue
浏览文件 @
9f7b6bb1
...
...
@@ -41,7 +41,7 @@ export default {
return
{
person
:
{
user
:
"test"
,
pd
:
"Aa123456
789
"
,
pd
:
"Aa123456"
,
},
backButtonPress
:
0
,
personList
:
[],
...
...
@@ -112,10 +112,10 @@ export default {
// 点击登录
login
()
{
// url: "/pages/index/index",
uni
.
navigateTo
({
url
:
"/pages/home/home"
,
});
return
;
//
uni.navigateTo({
//
url: "/pages/home/home",
//
});
//
return;
// 是否输入账号密码
if
(
this
.
person
.
user
&&
this
.
person
.
pd
)
{
...
...
pages/report/reportInfo.vue
浏览文件 @
9f7b6bb1
...
...
@@ -51,7 +51,7 @@
<uni-forms-item
label=
"客户单位:"
required
>
<hintInput
:maxlength=
"50"
:disabled=
"!baseFormData.customerUnit"
v-model=
"baseFormData.customerUnit"
@
fous=
"showDialogType('unit')"
:configData=
'dialogCofig'
:isShow=
"dialogShow"
>
:configData=
'dialogCofig'
:isShow=
hintInput
"dialogShow"
>
</hintInput>
</uni-forms-item>
</uni-col>
...
...
pages/synchronousManagement/dialog.vue
0 → 100644
浏览文件 @
9f7b6bb1
<
template
>
<view
class=
"synchronous-dialog"
>
<view
class=
"synchronous-content"
>
<view
class=
"row-item"
>
<text
class=
"title"
>
待打包数据
</text>
</view>
<view
class=
"row-item count-num"
>
<text
class=
"num"
>
132
</text>
<text>
条
</text>
</view>
<view
class=
"operating-instructions"
>
<view
class=
"title"
>
操作说明:
</view>
<view
class=
"instructions-item"
>
1、在PAD端,点击“数据打包”,做好同步准备。
</view>
<view
class=
"instructions-item"
>
2、完成打包后,将PAD直联PC机,等待PC机自动导入需同步记录。
</view>
<view
class=
"instructions-item"
>
3、PC端自动导入完成后,请点击“同步数据”,同步成功后,列表自动刷新展示同步数据;且PAD同步的数据不支持修改。
</view>
</view>
<view
class=
"row-item bottom-row"
>
<button
class=
"button"
:loading=
"loading"
@
click=
"packedData"
>
数据打包
</button>
</view>
<!-- 关闭按钮 -->
<div
class=
"close-button"
>
<text
class=
"iconfont icon-a-bianzu16beifen"
@
click=
"close"
></text>
</div>
</view>
</view>
</
template
>
<
script
>
import
{
SYNCHRONIZE_DATA_PAD
,
checkAndCreateDirectory
,
createFileWithPlusIO
,
setSm2
,
TEST
,
}
from
"@/utils/systemCofig"
;
import
getDateTime
from
"@/common/getdateTime.js"
;
export
default
{
components
:
{},
data
()
{
return
{
loading
:
false
,
};
},
methods
:
{
change
(
e
)
{
console
.
log
(
"----"
,
e
);
},
close
()
{
this
.
$emit
(
"close"
);
},
packedData
()
{
this
.
loading
=
true
;
const
userName
=
this
.
$store
.
state
.
now_user
.
name
;
let
timeStr
=
getDateTime
.
dateTimeStr
(
"y-m-d h-i-s"
);
let
fileName
=
`
${
userName
}${
timeStr
}
.txt`
;
const
fileContent
=
setSm2
(
TEST
);
createFileWithPlusIO
(
`
${
SYNCHRONIZE_DATA_PAD
}
/同步数据`
,
fileName
,
fileContent
)
.
then
((
res
)
=>
{
console
.
log
(
"---写入成功"
,
res
);
uni
.
showToast
({
title
:
"打包成功"
,
icon
:
"none"
,
duration
:
2000
,
});
this
.
loading
=
false
;
this
.
close
()
})
.
catch
(()
=>
{
uni
.
showToast
({
title
:
"打包失败"
,
icon
:
"none"
,
duration
:
2000
,
});
this
.
loading
=
false
;
});
},
},
};
</
script
>
<
style
scoped
lang=
"less"
>
.synchronous-dialog {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
.synchronous-content {
padding: 3% 20px 32px 24px;
width: 400px;
height: 60%;
box-sizing: border-box;
background-image: linear-gradient(
-6deg,
#f9ffe7 0%,
#ffffff 12%,
#fcfeff 73%,
#ccf1ff 100%
);
border: 0.4px solid rgba(224, 224, 224, 1);
border-radius: 12px;
position: relative;
.row-item {
display: flex;
align-items: center;
justify-content: center;
}
.title {
font-family: PingFangSC-Medium;
font-size: 18px;
color: #000000;
text-align: center;
line-height: 26px;
font-weight: 500;
}
.count-num {
margin: 5% 0 5% 0;
align-items: flex-end;
.num {
display: inline-block;
font-family: AlibabaPuHuiTi_2_65_Medium;
font-size: 50px;
color: #3774f6;
line-height: 44px;
font-weight: 500;
}
}
.operating-instructions {
margin-bottom: 8%;
.title {
font-size: 13px;
color: #4a4a4a;
line-height: 24px;
font-weight: 600;
text-align: left;
}
.instructions-item {
font-size: 12px;
color: #7c7c7c;
line-height: 22px;
font-weight: 400;
}
}
// 打包按钮
.bottom-row {
position: absolute;
bottom: 24px;
left: 50%;
transform: translateX(-50%);
.button {
display: flex;
align-items: center;
justify-content: center;
background-image: linear-gradient(180deg, #3773f6 0%, #2c57f6 99%);
box-shadow: 0px 10px 24px 0px rgba(51, 104, 246, 0.24);
border-radius: 27px;
width: 160px;
height: 40px;
color: #fff;
}
}
// 关闭按钮
.close-button {
position: absolute;
bottom: -40px;
left: 50%;
transform: translateX(-50%);
.iconfont {
color: #fff;
font-size: 24px;
}
}
}
}
</
style
>
pages/synchronousManagement/index.vue
0 → 100644
浏览文件 @
9f7b6bb1
<
template
>
<view
class=
"synchronous-management"
>
<!-- 搜索项 -->
<SearchCom
@
change=
"change"
/>
<!-- 结果 -->
<view
class=
"synchronous-management-content"
>
<view
class=
"count-tatal"
>
<text
class=
"num"
>
123条
</text>
<text>
查询结果
</text>
</view>
<view
class=
"month-list"
>
<!-- 每月记录 -->
<view
class=
"month-record-item"
v-for=
"item in 20"
:key=
"item"
>
<view
class=
"seconed-title"
>
2024年08月
</view>
<view
class=
"inspect-list"
>
<InspectionItem
/>
</view>
</view>
</view>
</view>
<!-- 数据打包 -->
<view
class=
"synchronous-button"
@
click=
"openDialog(true)"
>
数据打包
</view>
<!-- 打包弹窗 -->
<Dialog
v-show=
"isDialog"
@
close=
"openDialog(false)"
></Dialog>
</view>
</
template
>
<
script
>
import
SearchCom
from
"@/components/searchCom/index.vue"
;
import
InspectionItem
from
"@/components/inspectionItem/index.vue"
;
import
Dialog
from
"./dialog.vue"
;
export
default
{
components
:
{
SearchCom
,
InspectionItem
,
Dialog
},
data
()
{
return
{
isDialog
:
false
,
//
};
},
methods
:
{
change
(
e
)
{
console
.
log
(
"----"
,
e
);
},
openDialog
(
show
){
this
.
isDialog
=
show
;
}
},
};
</
script
>
<
style
scoped
lang=
"less"
>
.synchronous-management {
padding-top: 16px;
.count-tatal {
margin: 16px 0 8px 0;
font-size: 14px;
color: #4a4a4a;
font-weight: 400;
.num {
font-size: 18px;
color: #3774f6;
line-height: 26px;
font-weight: 500;
}
}
.synchronous-management-content {
.month-list {
height: calc(100vh - 26px - 16px - 8px - 36px - 62px);
border: 1px solid;
overflow: auto;
.seconed-title {
margin-top: 16px;
font-size: 18px;
color: #000000;
font-weight: bold;
}
.month-record-item {
margin-bottom: 24px;
&:last-of-type {
margin: 0;
}
.inspect-list {
display: flex;
flex-wrap: wrap;
}
}
}
}
.synchronous-button {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 60px;
width: 240px;
height: 40px;
left: 50%;
color: #fff;
transform: translateX(-50%);
background-image: linear-gradient(180deg, #3773f6 0%, #2c57f6 99%);
box-shadow: 0px 10px 24px 0px rgba(51, 104, 246, 0.24);
border-radius: 27px;
}
}
</
style
>
uni_modules/uni-data-select/changelog.md
浏览文件 @
9f7b6bb1
## 1.0.8(2024-03-28)
-
修复 在vue2下:style动态绑定导致编译失败的bug
## 1.0.7(2024-01-20)
-
修复 长文本回显超过容器的bug,超过容器部分显示省略号
## 1.0.6(2023-04-12)
-
修复 微信小程序点击时会改变背景颜色的 bug
## 1.0.5(2023-02-03)
-
修复 禁用时会显示清空按钮
## 1.0.4(2023-02-02)
...
...
uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue
浏览文件 @
9f7b6bb1
...
...
@@ -4,14 +4,18 @@
<view
class=
"uni-stat-box"
:class=
"
{'uni-stat__actived': current}">
<view
class=
"uni-select"
:class=
"
{'uni-select--disabled':disabled}">
<view
class=
"uni-select__input-box"
@
click=
"toggleSelector"
>
<view
v-if=
"current"
class=
"uni-select__input-text"
>
{{
current
}}
</view>
<view
v-if=
"current"
class=
"uni-select__input-text"
>
{{
textShow
}}
</view>
<view
v-else
class=
"uni-select__input-text uni-select__input-placeholder"
>
{{
typePlaceholder
}}
</view>
<uni-icons
v-if=
"current && clear && !disabled"
type=
"clear"
color=
"#c0c4cc"
size=
"24"
@
click=
"clearVal"
/>
<uni-icons
v-else
:type=
"showSelector? 'top' : 'bottom'"
size=
"14"
color=
"#999"
/>
<view
v-if=
"current && clear && !disabled"
@
click
.
stop=
"clearVal"
>
<uni-icons
type=
"clear"
color=
"#c0c4cc"
size=
"24"
/>
</view>
<view
v-else
>
<uni-icons
:type=
"showSelector? 'top' : 'bottom'"
size=
"14"
color=
"#999"
/>
</view>
</view>
<view
class=
"uni-select--mask"
v-if=
"showSelector"
@
click=
"toggleSelector"
/>
<view
class=
"uni-select__selector"
v-if=
"showSelector"
>
<view
class=
"uni-popper__arrow
"
></view>
<view
class=
"uni-select__selector"
:style=
"getOffsetByPlacement"
v-if=
"showSelector"
>
<view
:class=
"placement=='bottom'?'uni-popper__arrow_bottom':'uni-popper__arrow_top'
"
></view>
<scroll-view
scroll-y=
"true"
class=
"uni-select__selector-scroll"
>
<view
class=
"uni-select__selector-empty"
v-if=
"mixinDatacomResData.length === 0"
>
<text>
{{
emptyTips
}}
</text>
...
...
@@ -39,11 +43,14 @@
* @property {String} label 左侧标题
* @property {String} placeholder 输入框的提示文字
* @property {Boolean} disabled 是否禁用
* @property {String} placement 弹出位置
* @value top 顶部弹出
* @value bottom 底部弹出(default)
* @event {Function} change 选中发生变化触发
*/
export
default
{
name
:
"uni-
stat
-select"
,
name
:
"uni-
data
-select"
,
mixins
:
[
uniCloud
.
mixinDatacom
||
{}],
props
:
{
localdata
:
{
...
...
@@ -89,6 +96,10 @@
type
:
String
,
default
:
''
},
placement
:
{
type
:
String
,
default
:
'bottom'
}
},
data
()
{
return
{
...
...
@@ -121,15 +132,32 @@
common
+
placeholder
:
common
},
valueCom
(){
valueCom
()
{
// #ifdef VUE3
return
this
.
modelValue
;
// #endif
// #ifndef VUE3
return
this
.
value
;
// #endif
},
textShow
()
{
// 长文本显示
let
text
=
this
.
current
;
if
(
text
.
length
>
10
)
{
return
text
.
slice
(
0
,
25
)
+
'...'
;
}
return
text
;
},
getOffsetByPlacement
()
{
switch
(
this
.
placement
)
{
case
'top'
:
return
"bottom:calc(100% + 12px);"
;
case
'bottom'
:
return
"top:calc(100% + 12px);"
;
}
}
},
watch
:
{
localdata
:
{
immediate
:
true
,
...
...
@@ -149,10 +177,11 @@
this
.
initDefVal
()
}
}
}
},
},
methods
:
{
debounce
(
fn
,
time
=
100
){
debounce
(
fn
,
time
=
100
)
{
let
timer
=
null
return
function
(...
args
)
{
if
(
timer
)
clearTimeout
(
timer
)
...
...
@@ -162,11 +191,11 @@
}
},
// 执行数据库查询
query
(){
query
()
{
this
.
mixinDatacomEasyGet
();
},
// 监听查询条件变更事件
onMixinDatacomPropsChange
(){
onMixinDatacomPropsChange
()
{
if
(
this
.
collection
)
{
this
.
debounceGet
();
}
...
...
@@ -189,9 +218,9 @@
}
defValue
=
defItem
}
if
(
defValue
||
defValue
===
0
)
{
this
.
emit
(
defValue
)
}
if
(
defValue
||
defValue
===
0
)
{
this
.
emit
(
defValue
)
}
}
const
def
=
this
.
mixinDatacomResData
.
find
(
item
=>
item
.
value
===
defValue
)
this
.
current
=
def
?
this
.
formatItemName
(
def
)
:
''
...
...
@@ -227,9 +256,9 @@
}
},
emit
(
val
)
{
this
.
$emit
(
'change'
,
val
)
this
.
$emit
(
'input'
,
val
)
this
.
$emit
(
'update:modelValue'
,
val
)
this
.
$emit
(
'change'
,
val
)
if
(
this
.
collection
)
{
this
.
setCache
(
val
);
}
...
...
@@ -254,7 +283,7 @@
let
str
=
""
;
str
=
this
.
format
;
for
(
let
key
in
item
)
{
str
=
str
.
replace
(
new
RegExp
(
`{
${
key
}
}`
,
"g"
),
item
[
key
]);
str
=
str
.
replace
(
new
RegExp
(
`{
${
key
}
}`
,
"g"
),
item
[
key
]);
}
return
str
;
}
else
{
...
...
@@ -268,26 +297,26 @@
}
},
// 获取当前加载的数据
getLoadData
(){
getLoadData
()
{
return
this
.
mixinDatacomResData
;
},
// 获取当前缓存key
getCurrentCacheKey
(){
getCurrentCacheKey
()
{
return
this
.
collection
;
},
// 获取缓存
getCache
(
name
=
this
.
getCurrentCacheKey
())
{
getCache
(
name
=
this
.
getCurrentCacheKey
())
{
let
cacheData
=
uni
.
getStorageSync
(
this
.
cacheKey
)
||
{};
return
cacheData
[
name
];
},
// 设置缓存
setCache
(
value
,
name
=
this
.
getCurrentCacheKey
())
{
setCache
(
value
,
name
=
this
.
getCurrentCacheKey
())
{
let
cacheData
=
uni
.
getStorageSync
(
this
.
cacheKey
)
||
{};
cacheData
[
name
]
=
value
;
uni
.
setStorageSync
(
this
.
cacheKey
,
cacheData
);
},
// 删除缓存
removeCache
(
name
=
this
.
getCurrentCacheKey
())
{
removeCache
(
name
=
this
.
getCurrentCacheKey
())
{
let
cacheData
=
uni
.
getStorageSync
(
this
.
cacheKey
)
||
{};
delete
cacheData
[
name
];
uni
.
setStorageSync
(
this
.
cacheKey
,
cacheData
);
...
...
@@ -302,7 +331,6 @@
$uni-secondary-color
:
#909399
!
default
;
$uni-border-3
:
#e5e5e5
;
/* #ifndef APP-NVUE */
@media
screen
and
(
max-width
:
500px
)
{
.hide-on-phone
{
...
...
@@ -315,7 +343,9 @@
display
:
flex
;
align-items
:
center
;
// padding: 15px;
/* #ifdef H5 */
cursor
:
pointer
;
/* #endif */
width
:
100%
;
flex
:
1
;
box-sizing
:
border-box
;
...
...
@@ -401,7 +431,6 @@
box-sizing
:
border-box
;
/* #endif */
position
:
absolute
;
top
:
calc
(
100%
+
12px
);
left
:
0
;
width
:
100%
;
background-color
:
#FFFFFF
;
...
...
@@ -419,6 +448,15 @@
/* #endif */
}
/* #ifdef H5 */
@media
(
min-width
:
768px
)
{
.uni-select__selector-scroll
{
max-height
:
600px
;
}
}
/* #endif */
.uni-select__selector-empty
,
.uni-select__selector-item
{
/* #ifndef APP-NVUE */
...
...
@@ -449,18 +487,21 @@
}
/* picker 弹出层通用的指示小三角 */
.
uni-popper__arrow
,
.
uni-popper__arrow
:
:
after
{
position
:
absolute
;
display
:
block
;
width
:
0
;
height
:
0
;
border-color
:
transparent
;
border-style
:
solid
;
border-width
:
6px
;
.
uni-popper__arrow_bottom
,
.
uni-popper__arrow_bottom
:
:
after
,
.
uni-popper__arrow_top
,
.
uni-popper__arrow_top
::
after
,
{
position
:
absolute
;
display
:
block
;
width
:
0
;
height
:
0
;
border-color
:
transparent
;
border-style
:
solid
;
border-width
:
6px
;
}
.uni-popper__arrow
{
.uni-popper__arrow
_bottom
{
filter
:
drop-shadow
(
0
2px
12px
rgba
(
0
,
0
,
0
,
0
.03
));
top
:
-6px
;
left
:
10%
;
...
...
@@ -469,7 +510,7 @@
border-bottom-color
:
#EBEEF5
;
}
.
uni-popper__arrow
:
:
after
{
.
uni-popper__arrow
_bottom
:
:
after
{
content
:
" "
;
top
:
1px
;
margin-left
:
-6px
;
...
...
@@ -477,6 +518,24 @@
border-bottom-color
:
#fff
;
}
.uni-popper__arrow_top
{
filter
:
drop-shadow
(
0
2px
12px
rgba
(
0
,
0
,
0
,
0
.03
));
bottom
:
-6px
;
left
:
10%
;
margin-right
:
3px
;
border-bottom-width
:
0
;
border-top-color
:
#EBEEF5
;
}
.
uni-popper__arrow_top
:
:
after
{
content
:
" "
;
bottom
:
1px
;
margin-left
:
-6px
;
border-bottom-width
:
0
;
border-top-color
:
#fff
;
}
.uni-select__input-text
{
// width: 280px;
width
:
100%
;
...
...
@@ -498,5 +557,6 @@
bottom
:
0
;
right
:
0
;
left
:
0
;
z-index
:
2
;
}
</
style
>
</
style
>
uni_modules/uni-data-select/package.json
浏览文件 @
9f7b6bb1
{
"id"
:
"uni-data-select"
,
"displayName"
:
"uni-data-select 下拉框选择器"
,
"version"
:
"1.0.
5
"
,
"version"
:
"1.0.
8
"
,
"description"
:
"通过数据驱动的下拉框选择器"
,
"keywords"
:
[
"uni-ui"
,
...
...
@@ -43,7 +43,8 @@
"platforms"
:
{
"cloud"
:
{
"tcb"
:
"y"
,
"aliyun"
:
"y"
"aliyun"
:
"y"
,
"alipay"
:
"n"
},
"client"
:
{
"App"
:
{
...
...
unpackage/dist/dev/app-plus/app-service.js
浏览文件 @
9f7b6bb1
This source diff could not be displayed because it is too large. You can
view the blob
instead.
unpackage/dist/dev/app-plus/app-view.js
浏览文件 @
9f7b6bb1
差异被折叠。
点击展开。
utils/systemCofig.js
浏览文件 @
9f7b6bb1
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论