Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常超
founder_vue
Commits
76dc2b34
Commit
76dc2b34
authored
Dec 09, 2022
by
liuguorong93
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
3dca11c6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
76 additions
and
44 deletions
+76
-44
src/api/menuDataApi/tableHeaderApi.js
+1
-1
src/components/headerSettings.vue
+74
-34
src/views/artisanManage/index.vue
+1
-1
vue.config.js
+0
-8
No files found.
src/api/menuDataApi/tableHeaderApi.js
View file @
76dc2b34
import
{
post
,
postform
,
get
,
postJson
}
from
'@/utils/http.js'
export
let
baseUrl
=
'/api
_btpz
'
export
let
baseUrl
=
'/api'
// 查询表头配置
export
const
getMenuBt
=
params
=>
...
...
src/components/headerSettings.vue
View file @
76dc2b34
...
...
@@ -76,6 +76,7 @@
<el-button
type=
"primary"
size=
"small"
@
click=
"saveMenuBtData"
>
确定
</el-button>
</div>
</div>
...
...
@@ -89,57 +90,96 @@ import draggable from "vuedraggable";
export
default
{
name
:
"headerSettings"
,
props
:
{
headerSettInfo
:
{
type
:
Object
,
default
:
()
=>
{},
},
},
components
:
{
draggable
,
},
data
()
{
return
{
cxDefaultFormThead
:
[
{
label
:
"名称"
,
prop
:
"name"
,
},
{
label
:
"单位"
,
prop
:
"unit"
,
},
],
cxDefaultFormTheadList
:
[
{
label
:
"名称"
,
prop
:
"name"
,
},
{
label
:
"单位"
,
prop
:
"unit"
,
},
{
label
:
"警犬"
,
prop
:
"jingquan"
,
},
{
label
:
"时间"
,
prop
:
"time"
,
},
],
// 已选表头(默认表头)的数据
cxDefaultFormThead
:
[],
// 全部列的数据
cxDefaultFormTheadList
:
[],
// 待选表头的数据
waitBt
:
[],
};
},
mounted
()
{
this
.
cxDefaultFormTheadList
=
this
.
headerSettInfo
.
allColumns
||
[];
this
.
getMenuBtData
();
// this.waitBt = this.cxDefaultFormTheadList.filter(
// (item) => !this.cxDefaultFormThead.some((ele) => ele.label === item.label)
// );
// console.log(this.waitBt);
},
methods
:
{
onMove
(
e
)
{
if
(
this
.
cxDefaultFormThead
&&
this
.
cxDefaultFormThead
.
length
===
1
)
{
return
false
;
}
else
{
return
true
;
}
},
closePage
()
{
this
.
$emit
(
"close"
);
},
// 获取表头配置
getMenuBtData
()
{},
getMenuBtData
()
{
let
params
=
{
menuId
:
this
.
headerSettInfo
.
menuId
,
};
getMenuBt
(
params
)
.
then
((
res
)
=>
{
if
(
res
.
code
===
200
&&
res
.
success
&&
res
.
data
&&
Object
.
keys
(
res
.
data
).
length
)
{
console
.
log
(
res
.
data
);
// 从接口中可以查询到数据,那么已选表头(默认表头)就用接口返回的数据
return
;
}
// 没有返回数据,用本地默认数据
this
.
setLocalData
();
})
.
catch
(()
=>
{
// 同样,接口请求失败,也用本地默认数据
this
.
setLocalData
();
});
},
// 用本地默认数据
setLocalData
()
{
this
.
cxDefaultFormThead
=
this
.
headerSettInfo
.
defaultColumns
||
[];
this
.
waitBt
=
this
.
cxDefaultFormTheadList
.
filter
(
(
item
)
=>
!
this
.
cxDefaultFormThead
.
some
((
ele
)
=>
ele
.
prop
===
item
.
prop
)
);
},
// 保存表头配置
saveMenuBtData
()
{},
saveMenuBtData
()
{
let
btxxEn
=
""
;
let
btxxCn
=
""
;
if
(
this
.
cxDefaultFormThead
?.
length
)
{
this
.
cxDefaultFormThead
.
forEach
((
item
)
=>
{
if
(
item
.
prop
&&
item
.
label
)
{
btxxEn
=
btxxEn
+
item
.
prop
+
","
;
btxxCn
=
btxxCn
+
item
.
label
+
","
;
}
});
btxxEn
=
btxxEn
.
substr
(
0
,
btxxEn
.
length
-
1
);
btxxCn
=
btxxCn
.
substr
(
0
,
btxxCn
.
length
-
1
);
}
let
params
=
{
menuId
:
this
.
headerSettInfo
.
menuId
,
btxxEn
,
btxxCn
,
};
addMenuBt
(
params
).
then
((
res
)
=>
{
console
.
log
(
res
);
});
},
},
};
</
script
>
...
...
src/views/artisanManage/index.vue
View file @
76dc2b34
...
...
@@ -325,7 +325,7 @@ export default {
apiName
:
"importArtisanApi"
,
},
showHeaderSettingBox
:
fals
e
,
showHeaderSettingBox
:
tru
e
,
headerSettInfo
:
{
menuId
:
"jsryManage"
,
allColumns
:
getJsryglAllColumns
(),
...
...
vue.config.js
View file @
76dc2b34
...
...
@@ -66,14 +66,6 @@ module.exports = {
pathRewrite
:
{
'^/api'
:
'/'
}
},
"/api_btpz"
:
{
target
:
"http://47.92.226.24:1008/"
,
ws
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
'^/api_btpz'
:
'/'
}
}
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment