Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
Support
提交反馈
为 GitLab 提交贡献
登录
切换导航
场
场地管理前端
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
刘英杰
场地管理前端
提交
5589801b
提交
5589801b
编写于
10月 10, 2024
作者:
刘英杰
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
20241010 申请活动》物资排版优化〉基本完成,剩下一点,需要排查
上级
d0009b1e
流水线
#29740
已通过 ,包含阶段
in 34 second
变更
1
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
41 行增加
和
29 行删除
+41
-29
straightOpenActivity.vue
src/pages/welcome/compontes/form/straightOpenActivity.vue
+41
-29
未找到文件。
src/pages/welcome/compontes/form/straightOpenActivity.vue
浏览文件 @
5589801b
...
...
@@ -127,6 +127,7 @@
</van-radio-group>
</
template
>
</van-field>
<!-- 物资-->
<van-field
v-if=
"init.radio === '1'"
...
...
@@ -140,12 +141,17 @@
:error-message=
"init.commodityTextError"
/>
<van-cell
v-if=
"init.radio === '1'"
>
{{ init.commodityText }}
<!-- {{ init.commodityText }}-->
<van-tag
class=
"mx-1"
color=
"#EEF9FF"
text-color=
"#2D8FFF"
v-for=
"(item,index) in init.commoditySelectArray"
:key=
"index"
closeable
size=
"medium"
type=
"primary"
@
close=
"closeTag(item,index)"
>
{{item.commodity_name}}
</van-tag>
</van-cell>
<cs-pop-up
:show=
"init.commodity"
position=
"bottom"
>
<
template
#content
>
<div
class=
"w-full h-[90%] bg-gray-100 overflow-y-auto "
>
<Tree
:data=
"init.commodityArray"
show-checkbox
@
on-check-change=
"checkChange"
></Tree>
<Tree
:key=
"asc"
:data=
"init.commodityArray"
show-checkbox
@
on-check-change=
"checkChange"
></Tree>
</div>
<div
class=
"w-full h-[10%] flex items-center justify-center p-3 shadow-gray-600 shadow"
>
<van-button
class=
"w-[95%]"
round
@
click=
"init.commodity = false"
>
关闭
</van-button>
...
...
@@ -187,7 +193,8 @@ import * as hooks from '../../../../hooks/index.js'
import
*
as
_
from
'
lodash
'
const
asc
=
getCurrentInstance
().
appContext
.
config
.
globalProperties
const
init
=
reactive
({
let
init
=
reactive
({
error
:
''
,
radio
:
'
1
'
,
...
...
@@ -207,6 +214,7 @@ const init = reactive({
beginTimeText
:
''
,
endTimeText
:
''
,
commodityText
:
''
,
timeRangeTextError
:
''
,
dateTextError
:
""
,
placeTypeTextError
:
''
,
...
...
@@ -220,6 +228,7 @@ const init = reactive({
beginTimeArray
:
''
,
endTimeArray
:
''
,
commodityArray
:
[],
commoditySelectArray
:
[],
minDateStart
:
''
,
maxDateStart
:
''
,
})
...
...
@@ -303,6 +312,7 @@ function checkChange(all, item) {
/*checkTreeArray.value = all
checkTreeArray.value.splice(checkTreeArray.value.indexOf('1001'), 1)
console.log("🚀🚀checkTreeArray.value🚀,", checkTreeArray.value)*/
//选中物资树遍历获取ID
let
array
=
[]
init
.
commodityText
=
''
...
...
@@ -313,35 +323,37 @@ function checkChange(all, item) {
})
formValidate
.
data
.
commodity_list
=
array
}
init
.
commoditySelectArray
=
all
console
.
log
(
"
🚀🚀🚀,
"
,
init
.
commoditySelectArray
)
console
.
log
(
"
🚀all🚀🚀,
"
,
all
);
console
.
log
(
"
🚀🚀🚀,
"
,
formValidate
.
data
.
commodity_list
);
}
function
closeTag
(
item
,
index
){
//关闭物资标签
function
recursiveMethod
(
array1
){
return
array1
.
map
((
cur
,
ind
)
=>
{
if
(
cur
.
children
.
length
!==
0
)
cur
.
children
=
recursiveMethod
(
cur
.
children
);
if
(
item
.
id
===
cur
.
id
)
delete
cur
.
checked
return
{
...
cur
,
}
})
}
console
.
log
(
"
🚀🚀recursiveMethod(init.commodityArray)🚀,
"
,
recursiveMethod
(
init
.
commodityArray
))
let
a
=
recursiveMethod
(
init
.
commodityArray
)
console
.
log
(
"
🚀init.commodityArray🚀🚀,
"
,
a
)
init
.
commodityArray
=
JSON
.
parse
(
JSON
.
stringify
(
a
))
console
.
log
(
"
🚀🚀init.comm11odityArray🚀,
"
,
init
.
commodityArray
)
}
function
aaa
(
e
,
i
)
{
//1.push选中总数组索
//自定义下标数组 判断 i 是否存在 是则删除 否则 插入下标
// check.data.bs_arr.includes(i) ? check.data.bs_arr.splice(check.data.bs_arr.indexOf(i), 1) : check.data.bs_arr.push(i);
//
// console.log(11111, check.data.bs_arr)
// //2.排序
// check.data.bs_arr.sort(function (a, b) {
// return a - b;
// });
//
//
// //3.判断数组是否连续 自定义下标数组
// if (isConsecutive(check.data.bs_arr)) {
// if (check.data.bs_arr.length > 1) alert("连续的,很棒!!!")
// // check.data.checked.push(e);
// } else {
// console.log('check.data.bs_arr', check.data.bs_arr)
// //删除自定义数组
// check.data.bs_arr = check.data.bs_arr.splice(check.data.bs_arr.length, 1);
// check.data.checked.splice(check.data.checked.length - 1, 1);
// alert("@@@不连续,不是我想要的,呜呜呜呜~")
// }
// console.log('原数组', check.data.checked)
// console.log('@@@新数组', check.data.bs_arr)
//
// check.data.checked.push(e)
if
(
String
(
e
.
occupy_flag
)
===
String
(
0
))
{
if
(
check
.
data
.
checked
.
length
>=
1
)
{
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录