Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
Releases
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
周远喜
mes-ui
Commits
f2494204
Commit
f2494204
authored
Oct 22, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product-rjt
parents
a7bb5066
30fd49e1
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
639 additions
and
187 deletions
+639
-187
filesView.vue
components/page/filesView.vue
+86
-0
index.vue
components/page/treeGrid/index.vue
+93
-25
add.vue
pages/project/plan/add.vue
+23
-18
api.js
pages/project/plan/api.js
+1
-1
detail.vue
pages/project/plan/detail.vue
+2
-4
index.vue
pages/project/plan/index.vue
+120
-76
main.vue
pages/project/plan/main.vue
+162
-0
detail.vue
pages/project/project/detail.vue
+1
-4
details.vue
pages/project/project/details.vue
+1
-1
index.vue
pages/project/project/index.vue
+84
-57
select.vue
pages/test/example/select.vue
+61
-0
index.vue
pages/test/example/tree/index.vue
+2
-1
iview.js
plugins/iview.js
+3
-0
No files found.
components/page/filesView.vue
0 → 100644
View file @
f2494204
<
template
>
<div
class=
"files-view"
>
<Tag
v-for=
"(item, index) in nameList"
:key=
"index"
:name=
"item.id"
>
<a
@
click=
"downFile(item)"
target=
"_blank"
>
{{
item
.
fileName
}}
</a>
</Tag>
<Modal
v-model=
"modal"
title=
"查看"
width=
"800"
footer-hide
:mask-closable=
"false"
>
<div
class=
"img"
>
<img
:src=
"avatorPath"
width=
"100%"
height=
"100%"
/>
</div>
</Modal>
</div>
</
template
>
<
script
>
export
default
{
name
:
""
,
data
()
{
return
{
downUrl
:
fileUrlDown
,
avatorPath
:
""
,
nameList
:
[],
modal
:
false
,
};
},
props
:
{
parms
:
{
type
:
[
String
,
Object
],
default
:
""
,
},
},
mounted
()
{
if
(
this
.
parms
.
eid
)
{
this
.
filesList
();
}
},
methods
:
{
filesList
()
{
//查询上传到文件服务器上的文件
this
.
$http
.
sysUser
.
getFile
(
this
.
parms
).
then
((
res
)
=>
{
if
(
res
.
data
!=
[]
&&
res
.
data
.
length
>
0
)
{
var
items
=
[];
res
.
data
.
forEach
((
data
)
=>
{
let
objImag
=
{};
objImag
.
fileName
=
data
.
fileName
;
objImag
.
filePath
=
data
.
downloadPath
;
objImag
.
id
=
data
.
id
;
objImag
.
fileType
=
data
.
fileType
;
items
.
push
(
objImag
);
});
this
.
nameList
=
items
;
}
});
},
downFile
(
item
)
{
console
.
log
(
item
);
if
(
item
.
fileType
==
"jpg"
||
item
.
fileType
==
"gif"
||
item
.
fileType
==
"png"
)
{
this
.
avatorPath
=
this
.
downUrl
+
item
.
filePath
;
this
.
modal
=
true
;
}
else
{
window
.
open
(
this
.
downUrl
+
item
.
filePath
,
"_blank"
);
}
},
},
watch
:
{
"parms.eid"
(
v
)
{
if
(
v
)
{
this
.
filesList
();
}
},
},
};
</
script
>
<
style
lang=
"less"
>
.files-view {
}
</
style
>
components/page/treeGrid/index.vue
View file @
f2494204
...
...
@@ -42,11 +42,13 @@
:key=
"item.id"
v-show=
"show(item)"
class=
"treetr"
:
class=
"
{ 'child-tr': item.parent }
"
:
id=
"'tr' + index
"
:draggable=
"drag"
@
dragstart=
"dragstart($event, index, item)"
@dragover="dragover($event, index, item)"
@
drop=
"dragdrop($event, index, item)"
@
dragenter=
"dragenter($event, index, item)"
@
dragover=
"dragover($event, index, item)"
@
dragleave=
"dragleave($event, index, item)"
>
<td
v-for=
"(column, snum) in columns"
...
...
@@ -54,8 +56,11 @@
:style=
"tdStyle(column)"
>
<!-- 多选 -->
<label
v-if=
"column.type === 'selection'"
@
click=
"handleCheckClick(item, $event, index)"
>
<Checkbox
v-model=
"item.checked"
></Checkbox>
<label
v-if=
"column.type === 'selection'"
@
click=
"handleCheckClick(item, $event, index)"
>
<Checkbox
v-model=
"item.checked"
></Checkbox>
</label>
<!-- 图标 -->
<div
v-if=
"column.type === 'icon'"
>
...
...
@@ -168,7 +173,7 @@
</div>
<!-- 树图标 -->
<span
@
click=
"toggle(index, item)"
v-if=
"snum == iconRow()"
>
<
i
v-html=
"item.spaceHtml"
></i
>
<
span
v-html=
"item.spaceHtml"
></span
>
<a
v-if=
"item.children && item.children.length > 0"
>
<i
class=
"ivu-icon"
...
...
@@ -220,15 +225,29 @@ export default {
return
[];
},
},
data
:{
type
:
Array
,
default
()
{
return
[];
},
},
root
:{
type
:[
String
,
Number
],
default
:
0
,
},
parent
:{
type
:
String
,
default
:
"upId"
},
iconName
:
false
,
drag
:{
type
:
Boolean
,
default
:
false
drag
:
{
type
:
Boolean
,
default
:
false
,
},
spaceWidth
:
{
type
:
Number
,
default
:
20
,
},
spaceWidth
:{
type
:
Number
,
default
:
20
}
},
provide
()
{
return
{
...
...
@@ -238,7 +257,8 @@ export default {
data
()
{
return
{
color
:
"#19be6b"
,
all
:
true
,
all
:
true
,
logs
:[],
initItems
:
[],
// 处理后数据数组
cloneColumns
:
[],
// 处理后的表头数据
checkGroup
:
[],
// 复选框数组
...
...
@@ -247,7 +267,7 @@ export default {
tdsWidth
:
0
,
// td总宽
timer
:
false
,
// 控制监听时长
dataLength
:
0
,
// 树形数据长度
dragIndex
:
-
1
,
//拖拽开始的序号
dragIndex
:
-
1
,
//拖拽开始的序号
};
},
computed
:
{
...
...
@@ -317,18 +337,52 @@ export default {
slots
()
{
return
this
.
$scopedSlots
;
},
//拖拽
dragstart
(
e
,
index
,
row
)
{
this
.
dragIndex
=
index
;
console
.
log
(
index
)
},
dragover
(
e
,
index
,
row
)
{
e
.
preventDefault
();
},
dragdrop
(
e
,
index
,
row
)
{
//拖拽开始
dragstart
(
e
,
index
,
row
)
{
this
.
dragIndex
=
index
;
console
.
log
(
index
);
},
//进入
dragenter
(
e
,
index
,
row
)
{
var
tr
=
document
.
getElementById
(
"tr"
+
index
);
tr
.
className
+=
" move"
;
// console.warn("进入",e, e.clientY,tr.clientTop, tr.className);
},
// 悬浮
dragover
(
e
,
index
,
row
)
{
// console.warn("悬浮",e)
e
.
preventDefault
();
// 鼠标Y
var
my
=
e
.
clientY
;
var
ty
=
e
.
toElement
.
offsetTop
;
var
h
=
e
.
toElement
.
clientHeight
;
var
tr
=
document
.
getElementById
(
"tr"
+
index
);
if
(
tr
.
className
.
indexOf
(
" sort"
)
==-
1
&&
2.5
*
h
<
(
my
-
ty
)){
tr
.
className
=
tr
.
className
.
replace
(
" move"
,
" sort"
)
}
// console.warn("在上边",my,ty,my-ty,h, tr.className);
this
.
logs
.
push
({
index
,
ty
,
my
,
h
})
},
// 离开
dragleave
(
e
,
index
,
row
)
{
var
tr
=
document
.
getElementById
(
"tr"
+
index
);
tr
.
className
=
tr
.
className
.
replace
(
" move"
,
""
).
replace
(
" sort"
,
""
);
console
.
warn
(
"离开"
,
e
.
clientY
,
e
.
toElement
.
offsetTop
,
e
.
toElement
.
clientHeight
,
tr
.
className
);
},
//放下
dragdrop
(
e
,
index
,
row
)
{
event
.
preventDefault
();
this
.
$emit
(
"on-drag-drop"
,
this
.
dragIndex
,
index
,
this
.
initItems
)
var
tr
=
document
.
getElementById
(
"tr"
+
index
);
tr
.
className
=
tr
.
className
.
replace
(
" move"
,
""
).
replace
(
" sort"
,
""
);
if
(
index
!=
this
.
dragIndex
)
{
this
.
$emit
(
"on-drag-drop"
,
this
.
dragIndex
,
index
,
this
.
initItems
);
}
console
.
log
(
JSON
.
stringify
(
this
.
logs
))
},
/**
* @dragover="dragover($event, index, item)"
@dragleave="dragleave($event,index,item)"
*/
// 有无多选框折叠位置优化
iconRow
()
{
var
num
=
0
;
...
...
@@ -339,6 +393,7 @@ export default {
}
return
num
;
},
// 设置td宽度,td的align
tdStyle
(
column
)
{
const
style
=
{};
...
...
@@ -454,7 +509,10 @@ export default {
// 数据处理 增加自定义属性监听
initData
(
items
,
level
,
parent
)
{
// this.initItems = []
let
spaceHtml
=
"<i class='ms-tree-space' style='width:"
+
this
.
spaceWidth
*
level
+
"px'></i>"
;
let
spaceHtml
=
""
;
for
(
let
i
=
1
;
i
<
level
;
i
++
)
{
spaceHtml
+=
"<i class='ms-tree-space'></i>"
;
}
items
.
forEach
((
item
,
index
)
=>
{
item
=
Object
.
assign
({},
item
,
{
parent
,
...
...
@@ -747,6 +805,16 @@ export default {
tr.treetr:hover td {
background: #f7f7f7;
}
tr.move {
td {
background-color: blue;
}
}
tr.sort {
td {
border-top: 2px solid blue;
}
}
.ms-tree-space {
position: relative;
top: 1px;
...
...
pages/project/plan/add.vue
View file @
f2494204
<
template
>
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<!--
<Col
:span=
"12"
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"date"
...
...
@@ -42,15 +42,15 @@
<Col
:span=
"12"
><FormItem
:label=
"l('deleterUserId')"
prop=
"deleterUserId"
>
<InputNumber
v-model=
"entity.deleterUserId"
></InputNumber>
</FormItem
></Col>
></Col>
-->
<Col
:span=
"12"
><FormItem
:label=
"l('projectId')"
prop=
"projectId"
>
<Input
Number
v-model=
"entity.projectId"
></InputNumber
>
</FormItem
<Input
v-model=
"entity.projectId"
></Input
>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('upId')"
prop=
"upId"
>
<Input
Number
v-model=
"entity.upId"
></InputNumber
>
</FormItem
></Col>
-->
<Input
v-model=
"entity.upId"
></Input
>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"entity.title"
>
</Input>
</FormItem
...
...
@@ -60,6 +60,7 @@
<Dictionary
code=
"mes.project_plan.Status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
</FormItem
></Col>
<Col
:span=
"24"
...
...
@@ -89,11 +90,13 @@
<Dictionary
code=
"mes.project_plan.Type"
v-model=
"entity.type"
type=
"radio"
></Dictionary>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('attachment')"
prop=
"attachment"
>
<Input
v-model=
"entity.attachment"
>
</Input>
</FormItem
<!--
<files
ref=
"refFile"
parms=
"parms"
v-model=
"entity.attachment"
files
/>
-->
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('executor')"
prop=
"executor"
>
...
...
@@ -101,12 +104,13 @@
></Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
noClick
>
保存
</Button
>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</
template
>
<
script
>
</
template
><
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"Add"
,
...
...
@@ -121,7 +125,7 @@ export default {
// deletionTime: null,
// deleterUserId: null,
projectId
:
"33930562-a9f7-bd95-88ab-d01eb1c4c369"
,
upId
:
"33930562-a9f7-bd95-88ab-d01eb1c4c369"
,
upId
:
this
.
v
.
id
,
title
:
""
,
status
:
0
,
note
:
""
,
...
...
@@ -131,6 +135,7 @@ export default {
attachment
:
""
,
executor
:
""
,
},
parmsName
:
"app=material&eid=1&name=ProjectPlan"
,
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
...
...
@@ -138,12 +143,12 @@ export default {
},
props
:
{
v
:
Object
,
eid
:
Number
,
eid
:
String
,
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
// if (this.eid
) {
//
this.load(this.eid);
//
}
},
methods
:
{
handleSubmit
()
{
...
...
@@ -184,9 +189,9 @@ export default {
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
},
eid
(
v
)
{
if
(
v
)
{
this
.
load
(
v
);
}
//
if (v) {
//
this.load(v);
//
}
},
},
};
...
...
pages/project/plan/api.js
View file @
f2494204
import
Api
from
'@/plugins/request'
export
default
{
index
:
`
${
material
}
proje/
ctplan/paged`
,
index
:
`
${
material
}
/proje
ctplan/paged`
,
paged
(
params
)
{
return
Api
.
post
(
`
${
material
}
/projectplan/paged`
,
params
);
},
...
...
pages/project/plan/detail.vue
View file @
f2494204
...
...
@@ -36,11 +36,9 @@
}
}
},
props
:
{
eid
:
Number
},
props
:[
"eid"
],
mounted
()
{
if
(
this
.
eid
>
0
)
{
if
(
this
.
eid
)
{
this
.
load
(
this
.
eid
);
}
},
...
...
pages/project/plan/index.vue
View file @
f2494204
...
...
@@ -5,34 +5,25 @@
<Icon
type=
"ios-arrow-down"
/>
</p>
项目信息
<Actions/>
<op/>
<Actions
/>
</Card>
<Card>
<TreeGrid
:columns=
"columns"
ref=
"grid"
:items=
"list"
><template
slot=
"easySearch"
><Form
ref=
"formInline"
:model=
"easySearch"
inline
><FormItem
prop=
"keys"
><Input
placeholder=
"请输入关键字标题"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem
><Button
type=
"primary"
@
click=
"search"
>
查询
</Button></FormItem
>
</Form></
template
>
<
template
slot=
"searchForm"
>
<template
slot=
"easySearch"
><Form
ref=
"formInline"
:model=
"easySearch"
inline
><FormItem
prop=
"keys"
><Input
placeholder=
"请输入关键字标题"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem><Button
type=
"primary"
@
click=
"search"
>
查询
</Button></FormItem>
</Form></
template
>
<!-- <template slot="searchForm">
<Search />
</
template
>
</template>
-->
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"add"
>
新增
</Button>
<Button
type=
"primary"
@
click=
"add
(null)
"
>
新增
</Button>
</
template
>
</TreeGrid>
</Card>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
<component
:is=
"detail"
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
<component
:is=
"detail"
:eid=
"curId"
:v=
"row"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</div>
</template>
...
...
@@ -49,8 +40,21 @@ export default {
author
:
"henq"
,
description
:
"project_plan 10/19/2020 10:23:07 AM"
,
},
props
:{
v
:{
type
:
Object
,
default
:()
=>
{
return
{
id
:
"33930562-a9f7-bd95-88ab-d01eb1c4c369"
,
title
:
"示例项目"
}
}
}
},
data
()
{
return
{
entity
:{},
row
:{},
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"title"
,
value
:
null
},
...
...
@@ -58,10 +62,8 @@ export default {
modal
:
false
,
title
:
"新增"
,
detail
:
null
,
curId
:
0
,
list
:
[
],
curId
:
null
,
list
:
[],
columns
:
[
// { key:"id",title:this.$t("id") ,hide:true ,align:"left" ,high:true },
// { key:"creationTime",title:this.l("creationTime") ,align:"left" ,high:true },
...
...
@@ -73,58 +75,76 @@ export default {
// { key:"deleterUserId",title:this.l("deleterUserId") ,align:"left" ,high:true },
// { key:"projectId",title:this.l("projectId") ,align:"left" ,high:true },
// { key:"upId",title:this.l("upId") ,align:"left" ,high:true },
{
type
:
"selection"
,
width
:
80
,
align
:
"center"
},
//
{ type: "selection", width: 80, align: "center" },
{
title
:
"操作"
,
key
:
"action"
,
width
:
150
,
align
:
"center"
,
render
:(
h
,
params
)
=>
{
return
h
(
"Actions"
,{
attrs
:{
row
:
params
,
// render:(h,params)=>{
// return h("Actions"
// ,{
// attrs:{
// row:params,
// },
// on:{
// 'on-click':this.rowclick
// }
// }
// )
// }
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"action"
},
[
h
(
"op"
,
{
attrs
:
{
icon
:
"ios-trash"
,
type
:
"icon"
,
title
:
"复制"
,
oprate
:
"add"
,
msg
:
"确认要移出排产吗?"
},
on
:
{
click
:
()
=>
this
.
copy
(
params
.
row
.
id
)
},
},
on
:{
'on-click'
:
this
.
rowclick
),
h
(
"op"
,
{
attrs
:
{
icon
:
"md-add"
,
type
:
"icon"
,
title
:
"新增子任务"
,
oprate
:
"add"
,},
on
:
{
click
:
()
=>
this
.
add
(
params
.
row
)
},
}
}
)
}
// render: (h, params) => {
// return h("div", { class: "action" }, [
// h(
// "op",
// {
// attrs: { oprate: "detail" },
// on: { click: () => this.view(params.row.id) },
// },
// "查看"
// ),
// //h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
// h(
// "op",
// {
// attrs: { oprate: "edit" },
// on: { click: () => this.edit(params.row.id) },
// },
// "编辑"
// ),
// h(
// "op",
// {
// attrs: { oprate: "delete" },
// on: { click: () => this.remove(params.row.id) },
// },
// "删除"
// ),
// ]);
// },
),
h
(
"op"
,
{
attrs
:
{
icon
:
"md-eye"
,
type
:
"icon"
,
title
:
"编辑"
,
oprate
:
"edit"
,
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
},
}
),
h
(
"op"
,
{
attrs
:
{
icon
:
"ios-trash"
,
type
:
"icon"
,
title
:
"删除"
,
oprate
:
"delete"
,
msg
:
"确认要删除吗?"
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
},
}
),
]);
},
},
{
key
:
"type"
,
width
:
90
,
width
:
90
,
title
:
this
.
l
(
"type"
),
align
:
"left"
,
high
:
true
,
...
...
@@ -181,19 +201,43 @@ export default {
this
.
curId
=
0
;
},
search
()
{
// this.$refs.grid.reload(this.easySearch);
var
params
=
{
conditions
:[]
}
Api
.
list
(
params
).
then
(
r
=>
{
this
.
list
=
r
.
result
;
})
},
rowclick
(
row
,
li
){
console
.
warn
(
"rowclick"
,
row
,
li
);
// this.$refs.grid.reload(this.easySearch);
var
params
=
{
conditions
:
[{
fieldName
:
"projectId"
,
conditionalType
:
'Equal'
,
fieldValue
:
this
.
v
.
id
}],
// conditions: []
};
Api
.
list
(
params
).
then
((
r
)
=>
{
let
res
=
r
.
result
;
var
data
=
this
.
$u
.
toTree
(
res
,
"33930562-a9f7-bd95-88ab-d01eb1c4c369"
,
(
u
)
=>
{
// console.log(u);
u
.
expanded
=
true
;
u
.
selected
=
false
;
u
.
checked
=
false
;
},
"upId"
);
this
.
list
=
data
;
});
},
add
()
{
this
.
curId
=
0
;
// rowclick(row,li){
// return {
// test(){
// alert(1);
// }
// }
// },
add
(
row
)
{
this
.
curId
=
row
.
id
;
this
.
row
=
row
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
"./add"
);
this
.
modal
=
true
;
...
...
pages/project/plan/main.vue
0 → 100644
View file @
f2494204
<
template
>
<div>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
><template
slot=
"easySearch"
><Form
ref=
"formInline"
:model=
"easySearch"
inline
><FormItem
prop=
"keys"
><Input
placeholder=
"请输入关键字标题"
v-model=
"easySearch.keys.value"
/>
</FormItem>
<FormItem><Button
type=
"primary"
@
click=
"search"
>
查询
</Button></FormItem>
</Form></
template
>
<
template
slot=
"searchForm"
>
<Search
/>
</
template
>
<
template
slot=
"buttons"
>
<Button
type=
"primary"
@
click=
"add"
>
新增
</Button>
</
template
>
</DataGrid>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
:fullscreen=
"modalFullscreen"
>
<component
:is=
"detail"
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
</div>
</template>
<
script
>
import
Api
from
'./api'
import
Search
from
'./search'
export
default
{
name
:
'list'
,
components
:{
Search
},
head
:
{
title
:
"项目计划"
,
author
:
"henq"
,
description
:
"project_plan 10/21/2020 11:06:17 AM"
,
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:{
op
:
"title"
,
value
:
null
}
},
modal
:
false
,
modalFullscreen
:
true
,
title
:
"新增"
,
detail
:
null
,
curId
:
0
,
columns
:
[
{
key
:
"id"
,
title
:
this
.
$t
(
"id"
)
,
hide
:
true
,
align
:
"left"
,
high
:
true
},
// { key:"creationTime",title:this.l("creationTime") ,align:"left" ,high:true },
// { key:"creatorUserId",title:this.l("creatorUserId") ,align:"left" ,high:true },
// { key:"lastModificationTime",title:this.l("lastModificationTime") ,align:"left" ,high:true },
// { key:"lastModifierUserId",title:this.l("lastModifierUserId") ,align:"left" ,high:true },
// { key:"isDeleted",title:this.l("isDeleted") ,align:"left" ,high:true },
// { key:"deletionTime",title:this.l("deletionTime") ,align:"left" ,high:true },
// { key:"deleterUserId",title:this.l("deleterUserId") ,align:"left" ,high:true },
// { key:"projectId",title:this.l("projectId") ,align:"left" ,high:true },
{
key
:
"upId"
,
title
:
this
.
l
(
"upId"
)
,
align
:
"left"
,
high
:
true
},
{
key
:
"title"
,
title
:
this
.
l
(
"title"
)
,
align
:
"left"
,
easy
:
true
,
high
:
true
},
{
key
:
"status"
,
title
:
this
.
l
(
"status"
)
,
align
:
"left"
,
high
:
true
,
code
:
'mes.project_plan.Status'
},
{
key
:
"startDate"
,
title
:
this
.
l
(
"startDate"
)
,
align
:
"left"
,
high
:
true
},
{
key
:
"endDate"
,
title
:
this
.
l
(
"endDate"
)
,
align
:
"left"
,
high
:
true
},
{
key
:
"type"
,
title
:
this
.
l
(
"type"
)
,
align
:
"left"
,
high
:
true
,
code
:
'mes.project_plan.Type'
},
{
key
:
"attachment"
,
title
:
this
.
l
(
"attachment"
)
,
align
:
"left"
,
high
:
true
},
{
key
:
"executor"
,
title
:
this
.
l
(
"executor"
)
,
align
:
"left"
,
high
:
true
},
{
title
:
'操作'
,
key
:
'action'
,
width
:
140
,
align
:
'center'
,
render
:
(
h
,
params
)
=>
{
return
h
(
'div'
,
{
class
:
"action"
},
[
h
(
'op'
,
{
attrs
:
{
oprate
:
'detail'
},
on
:
{
click
:
()
=>
this
.
view
(
params
.
row
.
id
)
}
},
'查看'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'detail'
},
on
:
{
click
:
()
=>
this
.
main
(
params
.
row
)
}
},
'克隆'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'edit'
},
on
:
{
click
:
()
=>
this
.
edit
(
params
.
row
.
id
)
}
},
'编辑'
),
h
(
'op'
,
{
attrs
:
{
oprate
:
'delete'
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
id
)
}
},
'删除'
)
])
}
},
]
}
},
mounted
(){
console
.
log
(
this
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
'loadDictionary'
)
// 加载数据字典
},
methods
:{
ok
()
{
this
.
$refs
.
grid
.
load
()
this
.
modal
=
false
this
.
curId
=
0
;
},
search
()
{
this
.
$refs
.
grid
.
reload
(
this
.
easySearch
)
},
add
()
{
this
.
curId
=
0
;
this
.
title
=
"新增"
;
this
.
detail
=
()
=>
import
(
'./add'
)
this
.
modal
=
true
;
},
copy
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"克隆"
;
this
.
detail
=
()
=>
import
(
'./add'
)
this
.
modal
=
true
;
},
main
()
{
this
.
title
=
"模版"
;
this
.
detail
=
()
=>
import
(
'./main'
)
this
.
modal
=
true
;
},
view
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"详情"
;
this
.
detail
=
()
=>
import
(
'./detail'
)
this
.
modal
=
true
;
},
edit
(
id
)
{
this
.
curId
=
id
;
this
.
title
=
"编辑"
;
this
.
detail
=
()
=>
import
(
'./edit'
)
this
.
modal
=
true
;
},
remove
(
id
)
{
Api
.
delete
(
id
).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$refs
.
grid
.
load
();
this
.
$Message
.
success
(
'删除成功'
)
}
})
},
cancel
()
{
this
.
curId
=
0
;
this
.
modal
=
false
},
l
(
key
)
{
/*
project_plan:{
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
projectId:'项目id',
upId:'父级',
title:'标题',
status:'状态',
note:'备注',
startDate:'开始日期',
endDate:'结束日期',
type:'类型',
attachment:'附件',
executor:'执行人',
}
*/
let
vkey
=
"project_plan"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
}
}
}
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
pages/project/project/detail.vue
View file @
f2494204
...
...
@@ -53,7 +53,6 @@ export default {
detail
:
null
,
curId
:
this
.
eid
,
avatorPath
:
""
,
downUrl
:
fileUrlDown
,
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
...
...
@@ -73,9 +72,7 @@ export default {
if
(
this
.
eid
)
{
this
.
load
(
this
.
eid
);
}
// this.detail = () => import("./details");
// this.parms.eid = this.$u.guid();
// this.parms.eid = r.result.attachment;
this
.
detail
=
()
=>
import
(
"./details"
);
},
methods
:
{
load
(
v
)
{
...
...
pages/project/project/details.vue
View file @
f2494204
...
...
@@ -47,7 +47,6 @@ export default {
data
()
{
return
{
avatorPath
:
""
,
downUrl
:
fileUrlDown
,
entity
:
this
.
row
,
parms
:
{
app
:
"material"
,
...
...
@@ -70,6 +69,7 @@ export default {
this
.
entity
=
r
.
result
;
this
.
entity
.
type
=
r
.
result
.
type
+
""
;
this
.
entity
.
state
=
r
.
result
.
state
+
""
;
this
.
avatorPath
=
r
.
result
.
picture
;
this
.
parms
.
eid
=
r
.
result
.
attachment
;
this
.
$emit
(
"on-load"
);
});
...
...
pages/project/project/index.vue
View file @
f2494204
...
...
@@ -123,6 +123,15 @@
>
<component
:is=
"detail"
:eid=
"curId"
@
on-close=
"cancel"
@
on-ok=
"ok"
/>
</Modal>
<Modal
v-model=
"modal1"
title=
"查看附件"
width=
"800"
footer-hide
:mask-closable=
"false"
>
<FilesView
ref=
"refFile"
:parms=
"parms"
class=
"files-detail"
/>
</Modal>
</div>
</template>
<
script
>
...
...
@@ -163,42 +172,42 @@ export default {
high
:
true
,
},
{
key
:
"lastModificationTime"
,
title
:
this
.
l
(
"lastModificationTime"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
},
//
{
//
key: "lastModificationTime",
//
title: this.l("lastModificationTime"),
//
align: "left",
//
high: true,
//
hide: true,
//
},
{
key
:
"lastModifierUserId"
,
title
:
this
.
l
(
"lastModifierUserId"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
},
{
key
:
"isDeleted"
,
title
:
this
.
l
(
"isDeleted"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
},
{
key
:
"deletionTime"
,
title
:
this
.
l
(
"deletionTime"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
},
{
key
:
"deleterUserId"
,
title
:
this
.
l
(
"deleterUserId"
),
align
:
"left"
,
high
:
true
,
hide
:
true
,
},
//
{
//
key: "lastModifierUserId",
//
title: this.l("lastModifierUserId"),
//
align: "left",
//
high: true,
//
hide: true,
//
},
//
{
//
key: "isDeleted",
//
title: this.l("isDeleted"),
//
align: "left",
//
high: true,
//
hide: true,
//
},
//
{
//
key: "deletionTime",
//
title: this.l("deletionTime"),
//
align: "left",
//
high: true,
//
hide: true,
//
},
//
{
//
key: "deleterUserId",
//
title: this.l("deleterUserId"),
//
align: "left",
//
high: true,
//
hide: true,
//
},
{
key
:
"title"
,
title
:
this
.
l
(
"title"
),
...
...
@@ -235,21 +244,21 @@ export default {
);
},
},
//
{
//
key: "attachment",
//
title: this.l("attachment"),
//
align: "center",
//
high: true,
//
render: (h, params) => {
//
return h(
//
"a",
//
{
// on: { click: () => this.view(params.row.id
) },
//
},
//
"查看附件"
//
);
//
},
//
},
{
key
:
"attachment"
,
title
:
this
.
l
(
"attachment"
),
align
:
"center"
,
high
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"a"
,
{
on
:
{
click
:
()
=>
this
.
viewFiles
(
params
.
row
)
},
},
"查看附件"
);
},
},
// {
// key: "phase",
// title: this.l("phase"),
...
...
@@ -285,12 +294,7 @@ export default {
);
},
},
// {
// key: "businessUnits",
// title: this.l("businessUnits"),
// align: "left",
// high: true,
// },
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
...
...
@@ -304,6 +308,13 @@ export default {
high
:
true
,
type
:
"user"
,
},
{
key
:
"note"
,
title
:
this
.
l
(
"note"
),
align
:
"left"
,
high
:
true
,
tooltip
:
true
,
},
{
title
:
"操作"
,
key
:
"action"
,
...
...
@@ -343,10 +354,17 @@ export default {
typeInfo
:
"table"
,
iconInfo
:
"md-list"
,
titleInfo
:
"列表模式"
,
parms
:
{
app
:
"material"
,
eid
:
null
,
name
:
""
,
field
:
""
,
},
modal1
:
false
,
};
},
mounted
()
{
console
.
log
(
this
);
this
.
parms
.
eid
=
this
.
$u
.
guid
(
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
...
...
@@ -388,6 +406,12 @@ export default {
console
.
log
(
row
);
window
.
open
(
fileUrlDown
+
row
.
picture
,
"_blank"
);
},
viewFiles
(
row
)
{
console
.
log
(
row
);
this
.
parms
.
eid
=
row
.
attachment
;
this
.
modal1
=
true
;
},
ok
()
{
this
.
$refs
.
grid
.
load
();
this
.
modal
=
false
;
...
...
@@ -538,4 +562,7 @@ export default {
}
}
}
.files-detail {
min-height: 300px;
}
</
style
>
\ No newline at end of file
pages/test/example/select.vue
0 → 100644
View file @
f2494204
<
template
>
<!--
<Table
:columns=
"columns"
:data=
"list"
/>
-->
<div
class=
"hi"
>
<div
class=
"x"
>
{{
x
}}
</div>
<div
class=
"x"
>
{{
y
}}
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
''
,
data
()
{
return
{
x
:[],
y
:[],
columns
:[{
key
:
"index"
,
key
:
"index"
,
},{
key
:
"my"
,
title
:
"my"
},
{
key
:
"ty"
,
title
:
"ty"
},
{
key
:
"my-ty"
,
title
:
"my-ty"
,
render
(
h
,
p
)
{
return
h
(
"span"
,
p
.
row
.
my
-
p
.
row
.
ty
)
},
}
,{
key
:
"h"
,
title
:
"h"
}
],
list
:[{
"index"
:
9
,
"ty"
:
410
,
"my"
:
483
,
"h"
:
40
},{
"index"
:
9
,
"ty"
:
410
,
"my"
:
480
,
"h"
:
40
},{
"index"
:
9
,
"ty"
:
410
,
"my"
:
476
,
"h"
:
40
},{
"index"
:
9
,
"ty"
:
410
,
"my"
:
476
,
"h"
:
40
},{
"index"
:
9
,
"ty"
:
410
,
"my"
:
474
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
471
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
468
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
466
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
466
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
463
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
460
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
460
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
459
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
456
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
456
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
452
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
452
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
451
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
450
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
450
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
447
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
444
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
444
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
440
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
438
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
438
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
436
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
433
,
"h"
:
40
},{
"index"
:
8
,
"ty"
:
369
,
"my"
:
433
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
428
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
426
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
426
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
425
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
423
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
423
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
421
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
419
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
419
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
417
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
416
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
416
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
415
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
414
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
414
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
414
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
414
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
413
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
412
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
411
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
411
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
409
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
409
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
408
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
408
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
407
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
406
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
406
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
405
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
404
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
404
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
403
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
402
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
402
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
401
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
399
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
399
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
398
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
395
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
395
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
395
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
394
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
394
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
394
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
394
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
394
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
394
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
392
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
392
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
391
,
"h"
:
40
},{
"index"
:
7
,
"ty"
:
328
,
"my"
:
390
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
388
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
385
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
382
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
382
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
379
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
376
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
376
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
372
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
370
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
370
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
368
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
366
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
366
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
364
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
364
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
364
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
364
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
364
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
364
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
363
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
362
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
362
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
361
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
360
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
359
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
359
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
358
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
355
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
355
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
353
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
352
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
352
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
351
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
349
,
"h"
:
40
},{
"index"
:
6
,
"ty"
:
287
,
"my"
:
349
,
"h"
:
40
},{
"index"
:
5
,
"ty"
:
246
,
"my"
:
345
,
"h"
:
40
},{
"index"
:
5
,
"ty"
:
246
,
"my"
:
345
,
"h"
:
40
},{
"index"
:
5
,
"ty"
:
246
,
"my"
:
344
,
"h"
:
40
},{
"index"
:
5
,
"ty"
:
246
,
"my"
:
343
,
"h"
:
40
},{
"index"
:
5
,
"ty"
:
246
,
"my"
:
343
,
"h"
:
40
},{
"index"
:
5
,
"ty"
:
246
,
"my"
:
341
,
"h"
:
40
},{
"index"
:
5
,
"ty"
:
246
,
"my"
:
340
,
"h"
:
40
},{
"index"
:
5
,
"ty"
:
246
,
"my"
:
340
,
"h"
:
40
},{
"index"
:
5
,
"ty"
:
246
,
"my"
:
339
,
"h"
:
40
},{
"index"
:
5
,
"ty"
:
246
,
"my"
:
337
,
"h"
:
40
},{
"index"
:
5
,
"ty"
:
246
,
"my"
:
337
,
"h"
:
40
},{
"index"
:
5
,
"ty"
:
246
,
"my"
:
337
,
"h"
:
40
},{
"index"
:
5
,
"ty"
:
246
,
"my"
:
336
,
"h"
:
40
},{
"index"
:
5
,
"ty"
:
246
,
"my"
:
336
,
"h"
:
40
},{
"index"
:
5
,
"ty"
:
246
,
"my"
:
334
,
"h"
:
40
},{
"index"
:
5
,
"ty"
:
246
,
"my"
:
332
,
"h"
:
40
},{
"index"
:
5
,
"ty"
:
246
,
"my"
:
332
,
"h"
:
40
},{
"index"
:
5
,
"ty"
:
246
,
"my"
:
330
,
"h"
:
40
},{
"index"
:
5
,
"ty"
:
246
,
"my"
:
330
,
"h"
:
40
},{
"index"
:
5
,
"ty"
:
246
,
"my"
:
329
,
"h"
:
40
}]
}
}
,
mounted
(){
this
.
list
.
forEach
(
u
=>
{
if
(
this
.
x
.
indexOf
(
u
.
index
)
<
0
){
this
.
x
.
push
(
u
.
index
)
}
if
(
this
.
y
.
indexOf
(
u
.
my
-
u
.
ty
)
<
0
){
this
.
y
.
push
(
u
.
my
-
u
.
ty
)
}
})
}
}
</
script
>
<
style
lang=
""
scoped
>
</
style
>
\ No newline at end of file
pages/test/example/tree/index.vue
View file @
f2494204
<
template
>
<div
class=
"tree"
>
<TreeGrid
:columns=
"columns"
:items=
"treeData"
>
<TreeGrid
:columns=
"columns"
:items=
"treeData"
:drag=
"true"
>
<template
slot-scope=
"
{row,column,index}" slot="name">
<Icon
type=
"md-folder"
/>
{{
row
.
name
}}
</
template
>
...
...
@@ -29,6 +29,7 @@ export default {
title
:
"名称"
,
tree
:
true
,
slot
:
"name"
},
{
key
:
"status"
,
...
...
plugins/iview.js
View file @
f2494204
...
...
@@ -51,6 +51,8 @@ import NewInputFile from '@/components/page/newInputFile.vue'
import
imgUploadFile
from
'@/components/page/imgUploadFile.vue'
import
files
from
'@/components/page/files.vue'
import
FilesList
from
'@/components/page/filesList.vue'
import
FilesView
from
'@/components/page/filesView.vue'
import
DataGrid
from
'@/components/page/dataGrid.vue'
import
TreeGrid
from
'@/components/page/treeGrid/index.vue'
import
Filed
from
'@/components/page/filed.vue'
...
...
@@ -112,6 +114,7 @@ Vue.component("imgUploadFile", imgUploadFile)
Vue
.
component
(
"InputIcon"
,
InputIcon
)
Vue
.
component
(
"files"
,
files
)
Vue
.
component
(
"FilesList"
,
FilesList
)
Vue
.
component
(
"FilesView"
,
FilesView
)
Vue
.
component
(
"DataGrid"
,
DataGrid
)
Vue
.
component
(
"TreeGrid"
,
TreeGrid
)
Vue
.
component
(
"Filed"
,
Filed
)
...
...
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