Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
ndr
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
刘旭
ndr
Commits
2b90c182
提交
2b90c182
authored
9月 05, 2023
作者:
刘旭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
更新代码
上级
9c487a93
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
288 行增加
和
238 行删除
+288
-238
launch.json
.hbuilderx/launch.json
+14
-8
wyb-popup.vue
src/components/wyb-popup/wyb-popup.vue
+2
-2
index.ts
src/config/index.ts
+3
-4
edit.vue
src/pages/index/components/edit.vue
+11
-21
formList.vue
src/pages/index/components/formList.vue
+212
-161
popup.vue
src/pages/index/components/popup.vue
+11
-6
index.vue
src/pages/index/index.vue
+0
-0
index.vue
src/pages/login/index.vue
+1
-1
index.vue
src/pages/query/index.vue
+9
-7
uni-calendar.vue
...les/uni-calendar/components/uni-calendar/uni-calendar.vue
+0
-0
vite.config.ts
vite.config.ts
+25
-28
没有找到文件。
.hbuilderx/launch.json
浏览文件 @
2b90c182
...
...
@@ -4,20 +4,26 @@
"version"
:
"0.0"
,
"configurations"
:
[
{
"default"
:
{
"launchtype"
:
"local"
},
"mp-weixin"
:
{
"launchtype"
:
"local"
},
"type"
:
"uniCloud"
"app-plus"
:
{
"launchtype"
:
"local"
},
"default"
:
{
"launchtype"
:
"local"
},
"mp-weixin"
:
{
"launchtype"
:
"local"
},
"type"
:
"uniCloud"
},
{
"openVueDevtools"
:
true
,
"type"
:
"uni-app:h5"
},
{
"playground"
:
"
custom
"
,
"playground"
:
"
standard
"
,
"type"
:
"uni-app:app-android"
}
]
...
...
src/components/wyb-popup/wyb-popup.vue
浏览文件 @
2b90c182
<
template
>
<view
v-if=
"isShow"
>
<view
@
tap
.
stop
.
prevent
@
touchmove
.
stop
.
prevent
class=
"wyb-popup-box"
:style=
"
{
<view
class=
"wyb-popup-box"
:style=
"
{
transitionDuration: duration + 'ms',
opacity: contentOpacity || (type === 'center' ? 0 : 1),
transform: contentTransform || autoTransform,
...
...
@@ -44,7 +44,7 @@
</view>
</scroll-view>
</view>
<view
class=
"wyb-popup-mask"
@
tap
.
stop=
"close"
@
touchmove
.
stop
.
prevent
:style=
"
{
<view
class=
"wyb-popup-mask"
@
tap
.
stop=
"close"
:style=
"
{
opacity: maskOpacity,
transitionDuration: duration + 'ms',
backgroundColor: 'rgba(0, 0, 0, ' + maskAlpha + ')',
...
...
src/config/index.ts
浏览文件 @
2b90c182
// export const ApiUrl: string = '
http://192.168.1.37
/ndr'
export
const
ApiUrl
:
string
=
'http://192.168.1.37/k3Cloud'
// export const ApiUrl: string = '/ndr'
//
export const ApiUrl: string = 'http://192.168.1.37/k3Cloud'
// export const ApiUrl = 'http://192.168.0.242:89/k3Cloud'
// export const ApiUrl = 'http://k3.newdegreetech.com:89/k3cloud'
\ No newline at end of file
export
const
ApiUrl
=
'http://k3.newdegreetech.com:89/k3cloud'
src/pages/index/components/edit.vue
浏览文件 @
2b90c182
<
template
>
<div
class=
'edit-container'
>
<formList
ref=
"formListRef"
:select-list=
"selectList"
/>
<formList
ref=
"formListRef"
:select-list=
"selectList"
@
initSelect=
"initSelect"
/>
<view
class=
"button"
>
<button
size=
"mini"
@
tap=
"onSave"
>
保存
</button>
</view>
...
...
@@ -33,35 +33,25 @@ onLoad((options: any) => {
})
const
initSelect
=
()
=>
{
const
initSelect
=
(
FName
?:
string
)
=>
{
uni
.
showLoading
({
title
:
'加载中'
,
mask
:
true
})
uni
.
request
({
url
:
ApiUrl
+
'/LQKJ.K3.NDR.WebApiBusinessServicePlugIn.WebApi.ExecuteCmdSelect,LQKJ.K3.NDR.WebApiBusinessServicePlugIn.common.kdsvc'
,
method
:
'GET'
,
success
(
res
:
any
)
{
uni
.
hideLoading
()
const
{
data
}
=
res
if
(
data
.
code
==
200
)
{
data
.
data
.
map
((
item
:
any
)
=>
{
selectList
.
value
.
push
({
text
:
item
.
fname
,
value
:
item
.
fnumber
})
})
}
else
{
uni
.
showToast
({
title
:
data
.
msg
,
icon
:
'none'
})
}
method
:
'POST'
,
data
:
{
FName
},
success
({
data
:
res
}:
any
)
{
uni
.
hideLoading
()
if
(
res
.
code
==
200
)
{
selectList
.
value
=
res
.
data
}
},
fail
()
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'请
在内网使用
'
,
title
:
'请
求失败
'
,
icon
:
'none'
})
}
...
...
@@ -125,7 +115,7 @@ const onSave = () => {
fail
()
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'请
在内网使用
'
,
title
:
'请
求失败
'
,
icon
:
'none'
})
}
...
...
src/pages/index/components/formList.vue
浏览文件 @
2b90c182
<
template
>
<view
class=
"item-container"
>
<view
class=
"form-title"
>
{{
placeholder
}}
</view>
<view
class=
"line"
/>
<uni-forms
ref=
"formRef"
:modelValue=
"formData"
:rules=
"rules"
label-width=
"10"
>
<view
style=
"width: 100%; display: flex; justify-content: center; align-items: center;"
>
<uni-forms-item
name=
"number"
@
tap=
"handleClick"
>
<uni-easyinput
type=
"text"
v-model=
"formData.number"
placeholder=
"项目编号"
:inputBorder=
"false"
:clearable=
"false"
disabled
placeholderStyle=
"color: rgba(0, 0, 0, 0.9); font-size: 28rpx;"
/>
</uni-forms-item>
<uni-icons
v-show=
"formData.number"
type=
"clear"
size=
"22"
color=
"#ccc"
@
tap=
"clear"
/>
</view>
<view
class=
"line"
/>
<uni-forms-item
name=
"Hours"
>
<uni-easyinput
type=
"number"
v-model=
"formData.Hours"
placeholder=
"工时数"
:inputBorder=
"false"
:clearable=
"false"
placeholderStyle=
"color: rgba(0, 0, 0, 0.9); font-size: 28rpx"
/>
<view
class=
"line"
/>
</uni-forms-item>
<view
class=
"line"
/>
<uni-forms-item
name=
"workContent"
>
<uni-easyinput
type=
"textarea"
maxlength=
"-1"
v-model=
"formData.workContent"
placeholder=
"工作内容"
:inputBorder=
"false"
:clearable=
"false"
placeholderStyle=
"color: rgba(0, 0, 0, 0.9); font-size: 28rpx"
/>
<view
class=
"line"
/>
</uni-forms-item>
</uni-forms>
</view>
<popup
ref=
"popupRef"
v-model=
"formData.number"
:selectList=
"selectList"
@
input-value=
"inputValue"
/>
<view
class=
"item-container"
>
<view
class=
"form-title"
>
{{
placeholder
}}
</view>
<view
class=
"line"
/>
<uni-forms
ref=
"formRef"
:modelValue=
"formData"
:rules=
"rules"
label-width=
"10"
>
<view
style=
"
width: 100%;
display: flex;
justify-content: center;
align-items: center;
"
>
<uni-forms-item
name=
"number"
>
<div
@
tap=
"handleClick"
>
<uni-easyinput
type=
"text"
v-model=
"formData.number"
placeholder=
"项目编号"
:inputBorder=
"false"
:clearable=
"false"
disabled
placeholderStyle=
"color: rgba(0, 0, 0, 0.9); font-size: 28rpx;"
style=
"pointer-events: none"
/>
</div>
</uni-forms-item>
<uni-icons
v-show=
"formData.number"
type=
"clear"
size=
"22"
color=
"#ccc"
@
tap=
"clear"
/>
</view>
<view
class=
"line"
/>
<uni-forms-item
name=
"Hours"
>
<uni-easyinput
type=
"number"
v-model=
"formData.Hours"
placeholder=
"工时数"
:inputBorder=
"false"
:clearable=
"false"
placeholderStyle=
"color: rgba(0, 0, 0, 0.9); font-size: 28rpx"
/>
<view
class=
"line"
/>
</uni-forms-item>
<view
class=
"line"
/>
<uni-forms-item
name=
"workContent"
>
<uni-easyinput
type=
"textarea"
maxlength=
"-1"
v-model=
"formData.workContent"
placeholder=
"工作内容"
:inputBorder=
"false"
:clearable=
"false"
placeholderStyle=
"color: rgba(0, 0, 0, 0.9); font-size: 28rpx"
/>
<view
class=
"line"
/>
</uni-forms-item>
</uni-forms>
</view>
<popup
ref=
"popupRef"
v-model=
"formData.number"
:selectList=
"selectList"
@
input-value=
"inputValue"
/>
</
template
>
<
script
setup
lang=
'ts'
>
import
{
nextTick
,
ref
}
from
'vue'
import
{
ApiUrl
}
from
'@/config'
;
import
popup
from
'./popup.vue'
;
defineProps
({
placeholder
:
{
type
:
String
},
selectList
:
{
type
:
Array
,
default
:
[]
}
})
const
emits
=
defineEmits
([
'initSelect'
])
const
formData
=
ref
({
number
:
''
,
Hours
:
''
,
workContent
:
''
,
})
const
rules
=
ref
({
number
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请选择项目编号'
,
}]
<
script
setup
lang=
"ts"
>
import
{
nextTick
,
ref
}
from
'vue'
import
popup
from
'./popup.vue'
defineProps
({
placeholder
:
{
type
:
String
,
},
selectList
:
{
type
:
Array
,
default
:
[],
},
})
const
emits
=
defineEmits
([
'initSelect'
])
const
formData
=
ref
({
number
:
''
,
Hours
:
''
,
workContent
:
''
,
})
const
rules
=
ref
({
number
:
{
rules
:
[
{
required
:
true
,
errorMessage
:
'请选择项目编号'
,
},
workContent
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请选择工作内容'
,
}]
],
},
workContent
:
{
rules
:
[
{
required
:
true
,
errorMessage
:
'请选择工作内容'
,
},
Hours
:
{
rules
:
[{
required
:
true
,
errorMessage
:
'请输入工时数'
,
}]
],
},
Hours
:
{
rules
:
[
{
required
:
true
,
errorMessage
:
'请输入工时数'
,
},
})
const
formRef
=
ref
()
const
popupRef
=
ref
()
const
initRules
=
()
=>
{
formRef
.
value
?.
setRules
(
rules
.
value
)
}
const
reset
=
()
=>
{
formData
.
value
=
{
number
:
''
,
Hours
:
''
,
workContent
:
''
,
}
}
const
submit
=
()
=>
{
let
p
=
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
formRef
.
value
?.
validate
().
then
((
res
:
any
)
=>
{
resolve
(
res
)
}).
catch
((
err
:
any
)
=>
{
reject
(
err
)
})
],
},
})
const
formRef
=
ref
()
const
popupRef
=
ref
()
const
initRules
=
()
=>
{
formRef
.
value
?.
setRules
(
rules
.
value
)
}
const
reset
=
()
=>
{
formData
.
value
=
{
number
:
''
,
Hours
:
''
,
workContent
:
''
,
}
}
const
submit
=
()
=>
{
let
p
=
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
formRef
.
value
?.
validate
()
.
then
((
res
:
any
)
=>
{
resolve
(
res
)
})
return
p
}
const
handleClick
=
()
=>
{
emits
(
'initSelect'
)
popupRef
.
value
.
open
()
const
height
=
localStorage
.
getItem
(
'windowHeight'
)
nextTick
(()
=>
popupRef
.
value
.
windowHeight
=
Number
(
height
)
*
0.8
*
0.9
)
}
const
clear
=
()
=>
{
formData
.
value
.
number
=
''
}
const
inputValue
=
(
value
:
string
)
=>
{
emits
(
'initSelect'
,
value
)
}
defineExpose
({
formData
,
initRules
,
submit
,
reset
})
.
catch
((
err
:
any
)
=>
{
reject
(
err
)
})
})
return
p
}
const
handleClick
=
(
event
:
any
)
=>
{
event
.
stopPropagation
()
console
.
log
(
'sss'
)
emits
(
'initSelect'
)
popupRef
.
value
.
open
()
const
height
=
localStorage
.
getItem
(
'windowHeight'
)
nextTick
(()
=>
(
popupRef
.
value
.
windowHeight
=
Number
(
height
)
*
0.8
*
0.9
))
}
const
clear
=
()
=>
{
formData
.
value
.
number
=
''
}
const
inputValue
=
(
value
:
string
)
=>
emits
(
'initSelect'
,
value
)
defineExpose
({
formData
,
initRules
,
submit
,
reset
,
})
</
script
>
<
style
scoped
>
.form-title
{
padding
:
14
rpx
20
rpx
;
color
:
#ccc
;
font-size
:
24
rpx
;
}
.line
{
border-bottom
:
1px
solid
#ddd
;
width
:
100%
;
transform
:
scaleY
(
0.5
);
}
.item-container
{
margin-bottom
:
20
rpx
;
/* border: #ddd 1px solid;
.form-title
{
padding
:
14
rpx
20
rpx
;
color
:
#ccc
;
font-size
:
24
rpx
;
}
.line
{
border-bottom
:
1px
solid
#ddd
;
width
:
100%
;
transform
:
scaleY
(
0.5
);
}
.item-container
{
margin-bottom
:
20
rpx
;
/* border: #ddd 1px solid;
padding: 10rpx;
border-radius: 10rpx;
padding-bottom: 20rpx; */
}
}
.item-container
>>>
.uni-select
{
border
:
0
;
}
.item-container
>>>
.uni-select
{
border
:
0
;
}
.item-container
>>>
.uni-select__input-placeholder
{
color
:
rgba
(
0
,
0
,
0
,
0.9
);
font-size
:
28
rpx
}
.item-container
>>>
.uni-select__input-placeholder
{
color
:
rgba
(
0
,
0
,
0
,
0.9
);
font-size
:
28
rpx
;
}
.item-container
>>>
.is-direction-left
{
width
:
100%
;
}
.item-container
>>>
.is-direction-left
{
width
:
100%
;
}
.item-container
>>>
.uni-icons
{
/* display: none; */
}
.item-container
>>>
.uni-icons
{
/* display: none; */
}
/* .item-container>>>.uni-forms-item:last-child {
/* .item-container>>>.uni-forms-item:last-child {
margin-bottom: 10px;
} */
.item-container
>>>
.uni-forms-item
{
margin-bottom
:
0
;
}
.item-container
>>>
.uni-forms-item
{
margin-bottom
:
0
;
}
.item-container
>>>
.is-textarea
{
padding
:
0
20
rpx
;
}
.item-container
>>>
.is-textarea
{
padding
:
0
20
rpx
;
}
.item-container
>>>
.uni-forms-item__error
{
display
:
none
;
}
.item-container
>>>
.uni-forms-item__error
{
display
:
none
;
}
.item-container
>>>
.is-disabled
{
background-color
:
#fff
;
}
</
style
>
\ No newline at end of file
.item-container
>>>
.is-disabled
{
background-color
:
#fff
;
}
</
style
>
src/pages/index/components/popup.vue
浏览文件 @
2b90c182
<
template
>
<wyb-popup
ref=
"popupRef"
type=
"bottom"
height=
"800"
width=
"500"
radius=
"4"
:showCloseIcon=
"true"
>
<view
class=
"popup-content"
>
<uni-easyinput
suffixIcon=
"search"
v-model=
"inputValue"
placeholder=
"项目编号"
@
iconClick=
"iconClick"
/>
<uni-easyinput
suffixIcon=
"search"
v-model=
"inputValue"
placeholder=
"项目编号"
@
iconClick=
"inputChange"
@
input=
"inputChange"
@
change=
"inputChange"
/>
<view
style=
"margin-bottom: 20px; box-sizing: border-box; overflow-y: scroll;"
:style=
"
{ 'height': windowHeight + 'px' }">
<!--
<scroll-view
scroll-
y=
"true"
>
-->
<!--
<scroll-view
scroll-
top=
"0"
scroll-y=
"true"
>
-->
<uni-list
v-if=
"selectList.length !== 0"
>
<uni-list-item
v-for=
"(item, i) in selectList"
:key=
"i"
:title=
"item.fnumber"
<uni-list-item
class=
"project-list"
v-for=
"(item, i) in selectList"
:key=
"i"
:title=
"item.fnumber"
@
click=
"handleList(item.fnumber)"
clickable
/>
</uni-list>
<!--
</scroll-view>
-->
<view
v-else
class=
"loading"
>
暂无数据
</view>
<!--
</scroll-view>
-->
</view>
</view>
</wyb-popup>
...
...
@@ -40,12 +41,15 @@ const handleList = (value: String) => {
popupRef
.
value
?.
hide
()
}
const
open
=
()
=>
{
popupRef
.
value
?.
show
()
}
const
iconClick
=
()
=>
{
emits
(
'inputValue'
,
inputValue
.
value
)
const
inputChange
=
()
=>
{
setTimeout
(()
=>
{
emits
(
'inputValue'
,
inputValue
.
value
)
},
100
)
}
defineExpose
({
...
...
@@ -62,6 +66,7 @@ defineExpose({
.uni-easyinput
{
width
:
90%
;
margin-bottom
:
20rpx
;
}
:deep
(
.uni-scroll-view
)
{
...
...
src/pages/index/index.vue
浏览文件 @
2b90c182
差异被折叠。
点击展开。
src/pages/login/index.vue
浏览文件 @
2b90c182
...
...
@@ -43,7 +43,7 @@ const login = () => {
},
fail
:
(
error
)
=>
{
uni
.
showToast
({
title
:
'请
在内网使用
'
,
title
:
'请
求失败
'
,
icon
:
'none'
})
}
...
...
src/pages/query/index.vue
浏览文件 @
2b90c182
...
...
@@ -26,12 +26,14 @@
:circle=
"true"
/>
<uni-tag
v-else
text=
"重新审核"
type=
"warning"
size=
"small"
:circle=
"true"
/>
-->
<uni-tag
v-if=
"item.F_LQKJ_BILLSTATUS == 'C'"
text=
"已审核"
type=
"success"
size=
"small"
:circle=
"true"
/>
<uni-tag
v-else-if=
"item.F_LQKJ_BILLSTATUS == 'B'"
text=
"审核中"
type=
"primary"
size=
"small"
:circle=
"true"
/>
<uni-tag
v-else
text=
"未审核"
type=
"default"
size=
"small"
:circle=
"true"
/>
</view>
</view>
<view
class=
"line"
v-show=
"item.F_LQKJ_BILLSTATUS != 'C'"
/>
<view
class=
"footer"
v-show=
"item.F_LQKJ_BILLSTATUS != 'C'"
>
<view
class=
"button"
@
tap
.
stop=
"edit(item)"
>
修改
</view>
<view
class=
"line"
v-show=
"item.F_LQKJ_BILLSTATUS != 'C'
&& item.F_LQKJ_BILLSTATUS != 'B'
"
/>
<view
class=
"footer"
v-show=
"item.F_LQKJ_BILLSTATUS != 'C'
&& item.F_LQKJ_BILLSTATUS != 'B'
"
>
<view
class=
"
button"
@
tap
.
stop=
"edit(item)"
>
修改
</view>
<view
class=
"button error"
@
tap
.
stop=
"deleteItem(item.FID)"
>
删除
</view>
</view>
</view>
...
...
@@ -67,7 +69,7 @@ const init = () => {
fail
()
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'请
在内网使用
'
,
title
:
'请
求失败
'
,
icon
:
'none'
})
}
...
...
@@ -112,7 +114,7 @@ const deleteItem = (Id: number) => {
fail
()
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'请
在内网使用
'
,
title
:
'请
求失败
'
,
icon
:
'none'
})
}
...
...
@@ -153,7 +155,7 @@ const submitTo = (id: number) => {
fail
()
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'请
在内网使用
'
,
title
:
'请
求失败
'
,
icon
:
'none'
})
}
...
...
@@ -190,7 +192,7 @@ const cancel = (id: number) => {
fail
()
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
'请
在内网使用
'
,
title
:
'请
求失败
'
,
icon
:
'none'
})
}
...
...
src/uni_modules/uni-calendar/components/uni-calendar/uni-calendar.vue
浏览文件 @
2b90c182
差异被折叠。
点击展开。
vite.config.ts
浏览文件 @
2b90c182
import
{
defineConfig
}
from
'vite'
;
import
uni
from
'@dcloudio/vite-plugin-uni'
;
import
{
defineConfig
}
from
'vite'
import
uni
from
'@dcloudio/vite-plugin-uni'
// https://vitejs.dev/config/
export
default
defineConfig
({
plugins
:
[
uni
()],
server
:
{
host
:
'0.0.0.0'
,
port
:
7879
,
open
:
true
,
strictPort
:
false
,
// 端口被占用直接退出
proxy
:
{
'/NDR'
:
{
target
:
'http://192.168.1.12'
,
},
'/k3Cloud'
:
{
target
:
'http://192.168.1.37'
,
},
},
},
build
:
{
minify
:
'terser'
,
terserOptions
:
{
compress
:
{
//生产环境时移除console
drop_console
:
true
,
drop_debugger
:
true
,
},
},
},
});
plugins
:
[
uni
()],
server
:
{
host
:
'0.0.0.0'
,
port
:
7879
,
open
:
true
,
strictPort
:
false
,
// 端口被占用直接退出
proxy
:
{
'/ndr'
:
{
target
:
'http://192.168.1.12'
,
},
},
},
build
:
{
minify
:
'terser'
,
terserOptions
:
{
compress
:
{
//生产环境时移除console
drop_console
:
true
,
drop_debugger
:
true
,
},
},
},
})
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论