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
c57ca226
Commit
c57ca226
authored
Oct 19, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Plain Diff
new
parents
29349b94
687df1cc
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
1404 additions
and
143 deletions
+1404
-143
customProperties.vue
components/page/customProperties.vue
+56
-9
dataGrid.vue
components/page/dataGrid.vue
+44
-7
materiel.vue
components/page/materiel.vue
+1
-0
columnSolt.js
components/page/treeGrid/columnSolt.js
+20
-0
index.vue
components/page/treeGrid/index.vue
+162
-61
index.vue
components/treeGrid/index.vue
+0
-0
slot.js
components/treeGrid/slot.js
+20
-0
zh-CN.js
i18n/locale/zh-CN.js
+23
-1
add.vue
pages/material/add.vue
+48
-36
add.vue
pages/project/project/add.vue
+203
-0
api.js
pages/project/project/api.js
+22
-0
detail.vue
pages/project/project/detail.vue
+70
-0
edit.vue
pages/project/project/edit.vue
+109
-0
index.vue
pages/project/project/index.vue
+341
-2
search.vue
pages/project/project/search.vue
+75
-0
add.vue
pages/technology/details/routingsupporting/add.vue
+94
-19
api.js
pages/technology/details/routingsupporting/api.js
+6
-0
test.vue
pages/test.vue
+7
-7
api.js
pages/test/api.js
+7
-1
index.vue
pages/test/example/table/index.vue
+4
-0
index.vue
pages/test/example/tree/index.vue
+92
-0
No files found.
components/page/customProperties.vue
View file @
c57ca226
<
template
>
<Row>
<Col
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
>
<FormItem
:label=
"li.title+':'"
:prop=
"li.name"
v-if=
"li.field!='name'&&li.field!='code'"
>
<div>
{{
li
.
newConten
}}
</div>
<FormItem
:label=
"li.title + ':'"
:prop=
"li.name"
v-if=
"li.field != 'name' && li.field != 'code'"
>
<div
v-if=
"show"
>
<Input
v-if=
"li.dataType == 0"
v-model=
"li.newConten"
></Input>
<InputNumber
v-if=
"li.dataType == 1 || li.dataType == 2"
v-model=
"entity.json[li.field]"
class=
"w100"
></InputNumber>
<Dictionary
v-if=
"li.dataType == 3"
v-model=
"li.newConten"
:code=
"li.note"
></Dictionary>
<Input
v-if=
"li.dataType == 5"
type=
"textarea"
v-model=
"li.newConten"
></Input>
<DatePicker
v-if=
"li.dataType == 4"
v-model=
"li.newConten"
type=
"date"
:placeholder=
"'选择' + li.title"
></DatePicker>
<InputFile
v-if=
"li.dataType == 6"
v-model=
"li.newConten"
></InputFile>
<InputFile
v-if=
"li.dataType == 7"
v-model=
"li.newConten"
></InputFile>
<Input
v-if=
"li.dataType == 8"
type=
"textarea"
v-model=
"li.newConten"
></Input>
<state
v-if=
"li.unitName && (li.dataType == 1 || li.dataType == 2)"
:value=
"li.unitName"
code=
"material.main.unitName"
type=
"tag"
></state>
</div>
<div
v-else
>
{{
li
.
newConten
}}
</div>
</FormItem>
</Col>
</Row>
...
...
@@ -12,16 +54,22 @@ export default {
data
()
{
return
{
fileds
:
[],
//扩展属性
show
:
false
,
entity
:
{
// json: {},
},
};
},
props
:
[
"materialId"
,
"forItem"
],
props
:
[
"materialId"
,
"forItem"
,
"input"
],
mounted
()
{
if
(
this
.
materialId
)
{
this
.
get
();
}
if
(
this
.
input
)
{
this
.
show
=
true
;
}
else
{
this
.
show
=
false
;
}
},
watch
:
{
materialId
(
v
)
{
...
...
@@ -38,7 +86,6 @@ export default {
},
methods
:
{
get
()
{
this
.
$api
.
get
(
`
${
material
}
/custompropertydefinition/getmaterialdefinitionproperty`
,
...
...
@@ -56,10 +103,10 @@ export default {
return
item
.
fieldType
;
});
this
.
fileds
.
map
((
u
)
=>
{
//
let v = "";
//
if (u.dataType == 1 || u.dataType == 2) {
//
v = 0;
//
}
let
v
=
""
;
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
v
=
0
;
}
// console.log(u);
// this.$set(this.entity.customProperties,u.filed,v)
// console.log(this.forItem);
...
...
components/page/dataGrid.vue
View file @
c57ca226
...
...
@@ -143,8 +143,10 @@
</
template
>
<
script
>
import
ColumnSlot
from
"./treeGrid/columnSolt"
;
export
default
{
name
:
"DataGrid"
,
components
:
{
ColumnSlot
},
data
()
{
return
{
keys
:
""
,
...
...
@@ -155,7 +157,7 @@ export default {
pageIndex
:
1
,
pageSize
:
20
,
sortBy
:
"id"
,
isDesc
:
true
,
isDesc
:
true
,
conditions
:
[],
},
searchConditions
:
this
.
search
,
...
...
@@ -294,15 +296,16 @@ export default {
default
:
""
,
},
},
provide
()
{
return
{
tableRoot
:
this
.
slots
,
};
},
created
()
{
this
.
columns
.
forEach
((
u
)
=>
{
if
(
!
u
.
hide
)
{
u
.
hide
=
false
;
}
});
this
.
columnsCur
=
this
.
$u
.
clone
(
this
.
columns
);
},
mounted
()
{
this
.
initColumns
();
if
(
this
.
data
&&
this
.
data
.
length
>
0
)
{
this
.
list
=
this
.
data
;
return
;
...
...
@@ -350,7 +353,41 @@ export default {
this
.
getRoutingHeaderData
();
this
.
getAllUser
();
//获取所有用户
},
methods
:
{
//列初始化 slot 支持;
slots
()
{
return
this
.
$scopedSlots
;
},
initColumns
()
{
this
.
columns
.
forEach
((
u
)
=>
{
if
(
!
u
.
hide
)
{
u
.
hide
=
false
;
}
});
var
items
=
this
.
$u
.
clone
(
this
.
columns
);
var
soct
=
this
.
$scopedSlots
;
console
.
warn
(
"that.$scopedSlots()"
,
soct
[
"action"
]());
items
.
forEach
((
u
)
=>
{
if
(
u
.
slot
)
{
u
.
render
=
(
h
,
params
)
=>
{
return
h
(
"span"
,
// soct[u.slot]({
// row: params.row,
// column: params.column,
// index: params.index,
// })
params
.
row
.
id
);
};
delete
u
.
slot
;
}
});
this
.
columnsCur
=
items
;
console
.
log
(
"cur"
,
items
,
this
.
columnsCur
);
},
//数据加载
load
()
{
if
(
this
.
action
)
{
...
...
components/page/materiel.vue
View file @
c57ca226
...
...
@@ -217,6 +217,7 @@ export default {
Id
:
this
.
bId
,
})
.
then
((
res
)
=>
{
console
.
log
(
res
)
if
(
res
.
success
)
{
this
.
ids
=
res
.
result
;
let
arr
=
[...
this
.
data
].
filter
((
x
)
=>
...
...
components/page/treeGrid/columnSolt.js
0 → 100644
View file @
c57ca226
export
default
{
name
:
'ColumnSlot'
,
functional
:
true
,
inject
:
[
'tableRoot'
],
props
:
{
row
:
Object
,
index
:
Number
,
column
:
{
type
:
Object
,
default
:
null
}
},
render
:
(
h
,
ctx
)
=>
{
return
h
(
'span'
,
ctx
.
injections
.
tableRoot
()[
ctx
.
props
.
column
.
slot
]({
row
:
ctx
.
props
.
row
,
column
:
ctx
.
props
.
column
,
index
:
ctx
.
props
.
index
}));
}
};
\ No newline at end of file
components/page/treeGrid/index.vue
View file @
c57ca226
...
...
@@ -14,21 +14,21 @@
<table>
<thead>
<tr>
<th
v-for=
"(column,index) in cloneColumns"
:key=
"index"
>
<th
v-for=
"(column,
index) in cloneColumns"
:key=
"index"
>
<label
v-if=
"column.type === 'selection'"
>
<
input
type=
"checkbox"
v-model=
"checks"
@
click=
"handleCheckAll"
/>
全选
<
Checkbox
v-model=
"all"
></Checkbox>
</label>
<label
v-else
>
{{
renderHeader
(
column
,
index
)
}}
<span
class=
"ivu-table-sort"
v-if=
"column.sortable"
>
<Icon
type=
"arrow-up-b"
:class=
"
{
on: column._sortType === 'asc'
}"
:class=
"
{
on: column._sortType === 'asc'
}"
@click.native="handleSort(index, 'asc')"
/>
<Icon
type=
"arrow-down-b"
:class=
"
{
on: column._sortType === 'desc'
}"
:class=
"
{
on: column._sortType === 'desc'
}"
@click.native="handleSort(index, 'desc')"
/>
</span>
...
...
@@ -38,96 +38,168 @@
</thead>
<tbody>
<tr
v-for=
"(item,index) in initItems"
v-for=
"(item,
index) in initItems"
:key=
"item.id"
v-show=
"show(item)"
class=
"treetr"
:class=
"
{'child-tr':item.parent}"
:class=
"
{ 'child-tr': item.parent }"
:draggable="drag"
@dragstart="dragstart($event, index, item)"
@dragover="dragover($event, index, item)"
@drop="dragdrop($event, index, item)"
>
<td
v-for=
"(column,snum) in columns"
:key=
"column.key"
:style=
"tdStyle(column)"
>
<!--
<label>
<input
v-if=
"column.type === 'selection'"
type=
"checkbox"
:value=
"item.id"
v-model=
"checkGroup"
@
click=
"handleCheckClick(item,$event,index)"
/>
</label>
-->
<td
v-for=
"(column, snum) in columns"
:key=
"column.key"
:style=
"tdStyle(column)"
>
<!-- 多选 -->
<label
v-if=
"column.type === 'selection'"
@
click=
"handleCheckClick(item, $event, index)"
>
<Checkbox
v-model=
"item.checked"
></Checkbox>
</label>
<!-- 图标 -->
<div
v-if=
"column.type === 'icon'"
>
<i
class=
"icon-set"
size=
"small"
@
click=
"RowClick(item,
$event,index,
action.text)"
v-for=
"action in
(column.actions)
"
@
click=
"RowClick(item,
$event, index,
action.text)"
v-for=
"action in
column.actions
"
:key=
"action.text"
>
<Icon
:type=
"action.type"
:title=
"action.text"
:style=
"action.style"
/>
<Icon
:type=
"action.type"
:title=
"action.text"
:style=
"action.style"
/>
</i>
</div>
<div
v-if=
"column.type === 'icons'"
>
<Icon
:type=
"item[column.key]"
size=
"20"
/>
</div>
<state
v-if=
"column.code"
:code=
"column.code"
:value=
"item[column.key]"
/>
<state
v-if=
"column.code"
:code=
"column.code"
:value=
"item[column.key]"
/>
<!-- 操作 -->
<div
v-if=
"column.type === 'action'"
class=
"action"
style=
"text-align:left;"
>
<div
v-if=
"column.type === 'action'"
class=
"action"
style=
"text-align: left"
>
<op
v-for=
"action in
(column.actions)
"
v-for=
"action in
column.actions
"
:key=
"action.text"
@
click=
"RowClick(item,
$event,index,
action.text)"
@
click=
"RowClick(item,
$event, index,
action.text)"
:type=
"action.type"
size=
"small"
style=
" margin:0 5px;"
:class=
"action.text=='删除'? 'remove' : (action.text=='新增' ? 'add': (action.text=='编辑' ?'edit':''))"
v-show=
"(item.type=='3'&&action.text=='新增')||(item.children.length>0&&action.text=='删除')?false:true"
>
{{
action
.
text
}}
</op>
style=
"margin: 0 5px"
:class=
"
action.text == '删除'
? 'remove'
: action.text == '新增'
? 'add'
: action.text == '编辑'
? 'edit'
: ''
"
v-show=
"
(item.type == '3' && action.text == '新增') ||
(item.children.length > 0 && action.text == '删除')
? false
: true
"
>
{{
action
.
text
}}
</op
>
</div>
<!-- 类型 -->
<div
v-if=
"column.type === 'menuRender'"
style=
"text-align:
center;
"
>
<div
v-if=
"column.type === 'menuRender'"
style=
"text-align:
center
"
>
<Button
:ghost=
"item[column.key] ==
0 ?false:
true"
:ghost=
"item[column.key] ==
0 ? false :
true"
size=
"small"
:type=
"item[column.key] ==0 ? 'default' :item[column.key] == 1 ? 'info' :item[column.key] == 2?'error':'warning'"
>
{{
item
[
column
.
key
]
==
0
?
'子系统'
:
item
[
column
.
key
]
==
1
?
'目录'
:
item
[
column
.
key
]
==
2
?
'菜单'
:
'按钮'
}}
</Button>
:type=
"
item[column.key] == 0
? 'default'
: item[column.key] == 1
? 'info'
: item[column.key] == 2
? 'error'
: 'warning'
"
>
{{
item
[
column
.
key
]
==
0
?
"子系统"
:
item
[
column
.
key
]
==
1
?
"目录"
:
item
[
column
.
key
]
==
2
?
"菜单"
:
"按钮"
}}
</Button
>
</div>
<!-- 状态 -->
<div
v-if=
"column.type === 'menuIsshow'"
style=
"text-align:
center;
"
>
<div
v-if=
"column.type === 'menuIsshow'"
style=
"text-align:
center
"
>
<Button
:ghost=
"item[column.key] == 1 ? true :false"
:disabled=
"item[column.key] == 1 ? false :true"
:ghost=
"item[column.key] == 1 ? true :
false"
:disabled=
"item[column.key] == 1 ? false :
true"
size=
"small"
:type=
"item[column.key] == 1 ? 'info' :'default'"
>
{{
item
[
column
.
key
]
==
1
?
'显示'
:
'隐藏'
}}
</Button>
:type=
"item[column.key] == 1 ? 'info' : 'default'"
>
{{
item
[
column
.
key
]
==
1
?
"显示"
:
"隐藏"
}}
</Button
>
</div>
<!-- 打开方式 -->
<div
v-if=
"column.type === 'menuTarget'"
>
<span
:style=
"item[column.key] == 0?'color:#006699':item[column.key] == 1?'color:black':''"
>
{{
item
[
column
.
key
]
==
0
?
'本页面'
:
item
[
column
.
key
]
==
1
?
'新页面'
:
''
}}
</span>
:style=
"
item[column.key] == 0
? 'color:#006699'
: item[column.key] == 1
? 'color:black'
: ''
"
>
{{
item
[
column
.
key
]
==
0
?
"本页面"
:
item
[
column
.
key
]
==
1
?
"新页面"
:
""
}}
</span
>
</div>
<!-- 菜单名称、排序、请求地址 -->
<label
@
click=
"toggle(index,item)"
v-if=
"!column.type&&!column.code&&!column.render"
>
<span
v-if=
"snum==iconRow()"
>
<!-- 树图标 -->
<span
@
click=
"toggle(index, item)"
v-if=
"snum == iconRow()"
>
<i
v-html=
"item.spaceHtml"
></i>
<a
v-if=
"item.children&&item.children.length>
0"
>
<a
v-if=
"item.children && item.children.length >
0"
>
<i
class=
"ivu-icon"
:class=
"
{'ivu-icon-ios-arrow-forward':!item.expanded,'ivu-icon-ios-arrow-down':item.expanded }"
>
</i>
</a>
<i
v-else
class=
"ms-tree-space"
></i>
:class=
"
{
'ivu-icon-ios-arrow-forward': !item.expanded,
'ivu-icon-ios-arrow-down': item.expanded,
}"
>
</i>
</a
><i
v-else
class=
"ms-tree-space"
></i>
</span>
{{
renderBody
(
item
,
column
)
}}
<!-- 菜单名称、排序、请求地址 -->
<label
v-if=
"
!column.type && !column.code && !column.render && !column.slot
"
>
{{
renderBody
(
item
,
column
)
}}
</label>
<table-expand
v-if=
"column.render
&&!column.type
"
v-if=
"column.render
&& !column.type && !column.solt
"
:row=
"item"
:column=
"column"
:index=
"snum"
:render=
"column.render"
></table-expand>
<column-slot
v-if=
"column.slot"
:row=
"item"
:column=
"column"
:index=
"snum"
></column-slot>
</td>
</tr>
</tbody>
...
...
@@ -136,9 +208,10 @@
</
template
>
<
script
>
import
TableExpand
from
"./expand"
;
import
ColumnSlot
from
"./columnSolt"
;
export
default
{
name
:
"treeGrid"
,
components
:
{
TableExpand
},
components
:
{
TableExpand
,
ColumnSlot
},
props
:
{
columns
:
Array
,
items
:
{
...
...
@@ -148,10 +221,24 @@ export default {
},
},
iconName
:
false
,
drag
:{
type
:
Boolean
,
default
:
false
},
spaceWidth
:{
type
:
Number
,
default
:
20
}
},
provide
()
{
return
{
tableRoot
:
this
.
slots
,
};
},
data
()
{
return
{
color
:
"#19be6b"
,
all
:
true
,
initItems
:
[],
// 处理后数据数组
cloneColumns
:
[],
// 处理后的表头数据
checkGroup
:
[],
// 复选框数组
...
...
@@ -160,6 +247,7 @@ export default {
tdsWidth
:
0
,
// td总宽
timer
:
false
,
// 控制监听时长
dataLength
:
0
,
// 树形数据长度
dragIndex
:
-
1
,
//拖拽开始的序号
};
},
computed
:
{
...
...
@@ -203,6 +291,7 @@ export default {
},
},
mounted
()
{
console
.
warn
(
"treegrid"
,
this
.
$scopedSlots
);
if
(
this
.
items
)
{
this
.
dataLength
=
this
.
Length
(
this
.
items
);
this
.
initData
(
this
.
deepCopy
(
this
.
items
),
1
,
null
);
...
...
@@ -225,14 +314,30 @@ export default {
})();
},
methods
:
{
slots
()
{
return
this
.
$scopedSlots
;
},
//拖拽
dragstart
(
e
,
index
,
row
)
{
this
.
dragIndex
=
index
;
console
.
log
(
index
)
},
dragover
(
e
,
index
,
row
)
{
e
.
preventDefault
();
},
dragdrop
(
e
,
index
,
row
)
{
event
.
preventDefault
();
this
.
$emit
(
"on-drag-drop"
,
this
.
dragIndex
,
index
,
this
.
initItems
)
},
// 有无多选框折叠位置优化
iconRow
()
{
var
num
=
0
;
for
(
let
i
=
0
,
len
=
this
.
columns
.
length
;
i
<
len
;
i
++
)
{
if
(
this
.
columns
[
i
].
t
ype
==
"selection"
)
{
return
1
;
if
(
this
.
columns
[
i
].
t
ree
)
{
num
=
i
;
}
}
return
0
;
return
num
;
},
// 设置td宽度,td的align
tdStyle
(
column
)
{
...
...
@@ -349,11 +454,7 @@ export default {
// 数据处理 增加自定义属性监听
initData
(
items
,
level
,
parent
)
{
// this.initItems = []
let
spaceHtml
=
""
;
for
(
let
i
=
1
;
i
<
level
;
i
++
)
{
spaceHtml
+=
" <i class='ms-tree-space'></i>"
;
}
let
spaceHtml
=
"<i class='ms-tree-space' style='width:"
+
this
.
spaceWidth
*
level
+
"px'></i>"
;
items
.
forEach
((
item
,
index
)
=>
{
item
=
Object
.
assign
({},
item
,
{
parent
,
...
...
components/treeGrid.vue
→
components/treeGrid
/index
.vue
View file @
c57ca226
File moved
components/treeGrid/slot.js
0 → 100644
View file @
c57ca226
export
default
{
name
:
'TableSlot'
,
functional
:
true
,
inject
:
[
'tableRoot'
],
props
:
{
row
:
Object
,
index
:
Number
,
column
:
{
type
:
Object
,
default
:
null
}
},
render
:
(
h
,
ctx
)
=>
{
return
h
(
'div'
,
ctx
.
injections
.
tableRoot
.
$scopedSlots
[
ctx
.
props
.
column
.
slot
]({
row
:
ctx
.
props
.
row
,
column
:
ctx
.
props
.
column
,
index
:
ctx
.
props
.
index
}));
}
};
\ No newline at end of file
i18n/locale/zh-CN.js
View file @
c57ca226
...
...
@@ -1799,5 +1799,27 @@ export default {
deleterUserId
:
'删除人'
,
dictionaryCode
:
''
,
codeRuleId
:
''
,
},
project_main
:{
creationTime
:
'创建时间'
,
creatorUserId
:
'创建人'
,
lastModificationTime
:
'更新时间'
,
lastModifierUserId
:
'更新人'
,
isDeleted
:
'删除人'
,
deletionTime
:
'删除时间'
,
deleterUserId
:
'删除人'
,
title
:
'标题'
,
note
:
'备注'
,
state
:
'状态'
,
type
:
'分类'
,
picture
:
'图片'
,
attachment
:
'附件'
,
phase
:
'阶段'
,
startDate
:
'开始日期'
,
endDate
:
'结束日期'
,
businessUnits
:
'业务单位'
,
}
}
pages/material/add.vue
View file @
c57ca226
...
...
@@ -2,13 +2,13 @@
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row>
<Col
:span=
"12"
>
<FormItem
:label=
"l('storeTitle')
+
':'"
>
<div>
{{
rootName
}}
</div>
<FormItem
:label=
"l('storeTitle')
+
':'"
>
<div>
{{
rootName
}}
</div>
<!--
<StoreSelect
v-model=
"entity.storeId"
@
on-change=
"storeChange"
></StoreSelect>
-->
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('creator')
+':'"
>
{{
entity
.
creator
}}
</FormItem>
<FormItem
:label=
"l('creator')
+ ':'"
>
{{
entity
.
creator
}}
</FormItem>
</Col>
<Col
:span=
"12"
>
<FormItem
:label=
"l('name')"
prop=
"materialId"
>
...
...
@@ -23,7 +23,10 @@
<Col
:span=
"12"
>
<FormItem
:label=
"l('inputTotal')"
prop=
"total"
>
<InputNumber
v-model=
"entity.total"
style=
"width:280px"
></InputNumber>
<InputNumber
v-model=
"entity.total"
style=
"width: 280px"
></InputNumber>
</FormItem>
</Col>
...
...
@@ -37,15 +40,16 @@
<Divider
orientation=
"left"
>
物料属性
</Divider>
<Col
:span=
"12"
v-if=
"entity.materialId"
>
<FormItem
label=
"名称:"
>
<span>
{{
entity
.
name
}}
</span>
<span>
{{
entity
.
name
}}
</span>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"entity.materialId"
>
<FormItem
label=
"编码:"
>
<span>
{{
entity
.
materialCode
}}
</span>
<span>
{{
entity
.
materialCode
}}
</span>
</FormItem>
</Col>
<Row>
<CustomProperties
:materialId=
"entity.materialId"
:forItem=
"forItem"
:input=
'true'
/>
<!--
<Row>
<Col
v-for=
"li in fileds"
:key=
"li.field"
:span=
"li.span"
>
<FormItem
:label=
"li.title"
:prop=
"li.name"
v-if=
"li.field!='name'&&li.field!='code'"
>
<Input
v-if=
"li.dataType==0"
v-model=
"entity.json[li.field]"
></Input>
...
...
@@ -63,7 +67,7 @@
:placeholder=
"'选择'+li.title"
></DatePicker>
<InputFile
v-if=
"li.dataType==6"
v-model=
"entity.json[li.field]"
></InputFile>
<!--
<files
ref=
"refFile"
:parms=
"parms"
fileFormat
:Photos=
"true"
@
clickItem=
"clickData"
/>
-->
<InputFile
v-if=
"li.dataType==7"
v-model=
"entity.json[li.field]"
></InputFile>
<Input
v-if=
"li.dataType==8"
type=
"textarea"
v-model=
"entity.json[li.field]"
></Input>
<state
...
...
@@ -74,7 +78,7 @@
></state>
</FormItem>
</Col>
</Row>
</Row>
-->
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
...
...
@@ -89,6 +93,7 @@ export default {
data
()
{
return
{
fileds
:
[],
//扩展属性
forItem
:
{},
entity
:
{
name
:
""
,
materialId
:
""
,
...
...
@@ -162,39 +167,46 @@ export default {
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
change
(
e
)
{
// change(e) {
// this.entity.name = e.name;
// this.entity.materialId = e.materialId;
// this.entity.materialCode = e.mmcode;
// this.entity.json.name = e.name;
// this.entity.json.materialCode = e.mmcode;
// Api.getmaterialdefinitionproperty({ materialId: e.materialId }).then(
// (r) => {
// if (r.result) {
// this.fileds = r.result.filter(function (item) {
// item.span = 12;
// if (item.dataType > 4) {
// item.span = 24;
// }
// delete item["id"];
// // return item.fieldType != 1;
// return item.fieldType;
// });
// this.fileds.map((u) => {
// let v = "";
// if (u.dataType == 1 || u.dataType == 2) {
// v = 0;
// }
// // this.$set(this.entity.customProperties,u.filed,v)
// // this.entity[u.field] = "";
// this.entity.json[u.field] = "";
// this.$set(this.entity, u.filed, v);
// });
// }
// }
// );
// },
change
(
e
,
v
)
{
this
.
entity
.
name
=
e
.
name
;
this
.
entity
.
materialId
=
e
.
materialId
;
this
.
entity
.
materialCode
=
e
.
mmcode
;
this
.
entity
.
json
.
name
=
e
.
name
;
this
.
entity
.
json
.
materialCode
=
e
.
mmcode
;
Api
.
getmaterialdefinitionproperty
({
materialId
:
e
.
materialId
}).
then
(
(
r
)
=>
{
if
(
r
.
result
)
{
this
.
fileds
=
r
.
result
.
filter
(
function
(
item
)
{
item
.
span
=
12
;
if
(
item
.
dataType
>
4
)
{
item
.
span
=
24
;
}
delete
item
[
"id"
];
// return item.fieldType != 1;
return
item
.
fieldType
;
});
this
.
fileds
.
map
((
u
)
=>
{
let
v
=
""
;
if
(
u
.
dataType
==
1
||
u
.
dataType
==
2
)
{
v
=
0
;
}
// this.$set(this.entity.customProperties,u.filed,v)
// this.entity[u.field] = "";
this
.
entity
.
json
[
u
.
field
]
=
""
;
this
.
$set
(
this
.
entity
,
u
.
filed
,
v
);
});
}
}
);
this
.
forItem
=
v
;
},
l
(
key
)
{
key
=
"stock"
+
"."
+
key
;
return
this
.
$t
(
key
);
...
...
pages/project/project/add.vue
0 → 100644
View file @
c57ca226
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.creationTime"
></DatePicker>
</FormItem
></Col>
-->
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('creatorUserId')"
prop=
"creatorUserId"
>
<InputNumber
v-model=
"entity.creatorUserId"
></InputNumber>
</FormItem
></Col>
-->
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('lastModificationTime')"
prop=
"lastModificationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.lastModificationTime"
></DatePicker>
</FormItem
></Col>
-->
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('lastModifierUserId')"
prop=
"lastModifierUserId"
>
<InputNumber
v-model=
"entity.lastModifierUserId"
></InputNumber>
</FormItem
></Col>
-->
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('isDeleted')"
prop=
"isDeleted"
>
<InputNumber
v-model=
"entity.isDeleted"
></InputNumber>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('deletionTime')"
prop=
"deletionTime"
>
<DatePicker
type=
"date"
v-model=
"entity.deletionTime"
></DatePicker>
</FormItem
></Col>
-->
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('deleterUserId')"
prop=
"deleterUserId"
>
<InputNumber
v-model=
"entity.deleterUserId"
></InputNumber>
</FormItem
></Col>
-->
<Col
:span=
"12"
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"entity.title"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('state')"
prop=
"state"
>
<Dictionary
code=
"mes.project_main.State"
v-model=
"entity.state"
></Dictionary>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('type')"
prop=
"type"
>
<Dictionary
code=
"mes.project_main.Type"
v-model=
"entity.type"
></Dictionary>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('picture')"
prop=
"picture"
>
<Input
v-model=
"entity.picture"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('attachment')"
prop=
"attachment"
>
<Input
v-model=
"entity.attachment"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('phase')"
prop=
"phase"
>
<Dictionary
code=
"mes.project_main.Phase"
v-model=
"entity.phase"
></Dictionary>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('startDate')"
prop=
"startDate"
>
<DatePicker
type=
"date"
v-model=
"entity.startDate"
></DatePicker>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('endDate')"
prop=
"endDate"
>
<DatePicker
type=
"date"
v-model=
"entity.endDate"
></DatePicker>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('businessUnits')"
prop=
"businessUnits"
>
<Input
v-model=
"entity.businessUnits"
>
</Input>
</FormItem
></Col>
<Col
:span=
"24"
><FormItem
:label=
"l('note')"
prop=
"note"
>
<Input
v-model=
"entity.note"
type=
"textarea"
:rows=
"5"
></Input>
</FormItem
></Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button
>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"Add"
,
data
()
{
return
{
disabled
:
false
,
entity
:
{
// creationTime: null,
creatorUserId
:
this
.
$store
.
state
.
userInfo
.
userId
,
// lastModificationTime: null,
// lastModifierUserId: null,
// isDeleted: null,
// deletionTime: null,
// deleterUserId: null,
title
:
""
,
note
:
""
,
state
:
null
,
type
:
null
,
picture
:
""
,
attachment
:
""
,
phase
:
null
,
startDate
:
null
,
endDate
:
null
,
businessUnits
:
""
,
},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
};
},
props
:
{
v
:
Object
,
eid
:
Number
,
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
},
methods
:
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
create
(
this
.
entity
)
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
entity
.
id
=
0
;
});
},
l
(
key
)
{
key
=
"project_main"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
watch
:
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
},
eid
(
v
)
{
if
(
v
>
0
)
{
this
.
load
(
v
);
}
},
},
};
</
script
>
\ No newline at end of file
pages/project/project/api.js
0 → 100644
View file @
c57ca226
import
Api
from
'@/plugins/request'
export
default
{
index
:
`
${
material
}
/projectmain/paged`
,
paged
(
params
){
return
Api
.
post
(
`
${
material
}
/projectmain/paged`
,
params
);
},
get
(
params
){
return
Api
.
get
(
`
${
material
}
/projectmain/get`
,
params
);
},
create
(
params
){
return
Api
.
post
(
`
${
material
}
/projectmain/create`
,
params
);
},
update
(
params
){
return
Api
.
post
(
`
${
material
}
/projectmain/update`
,
params
);
},
delete
(
id
)
{
return
Api
.
delete
(
`
${
material
}
/projectmain/delete`
,{
params
:{
id
:
id
}});
},
deletes
(
params
)
{
return
Api
.
post
(
`
${
material
}
/projectmain/batchdelete`
,
params
);
}
}
\ No newline at end of file
pages/project/project/detail.vue
0 → 100644
View file @
c57ca226
<
template
>
<div
class=
"detail"
>
<Row>
<Filed
:span=
"12"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creatorUserId')"
>
{{
entity
.
creatorUserId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('lastModificationTime')"
>
{{
entity
.
lastModificationTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('lastModifierUserId')"
>
{{
entity
.
lastModifierUserId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('isDeleted')"
>
{{
entity
.
isDeleted
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('deletionTime')"
>
{{
entity
.
deletionTime
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('deleterUserId')"
>
{{
entity
.
deleterUserId
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('title')"
>
{{
entity
.
title
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('note')"
>
{{
entity
.
note
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('state')"
>
{{
entity
.
state
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('type')"
>
{{
entity
.
type
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('picture')"
>
{{
entity
.
picture
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('attachment')"
>
{{
entity
.
attachment
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('phase')"
>
{{
entity
.
phase
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('startDate')"
>
{{
entity
.
startDate
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('endDate')"
>
{{
entity
.
endDate
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('businessUnits')"
>
{{
entity
.
businessUnits
}}
</Filed>
</Row>
</div>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Add'
,
data
()
{
return
{
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
code
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
}
}
},
props
:
{
eid
:
Number
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
this
.
$emit
(
'on-load'
)
})
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
"project_main"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
},
watch
:
{
eid
(
v
)
{
if
(
v
>
0
)
{
this
.
load
(
v
);
}
}
}
}
</
script
>
\ No newline at end of file
pages/project/project/edit.vue
0 → 100644
View file @
c57ca226
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
><FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.creationTime"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('creatorUserId')"
prop=
"creatorUserId"
>
<InputNumber
v-model=
"entity.creatorUserId"
></InputNumber>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('lastModificationTime')"
prop=
"lastModificationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.lastModificationTime"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('lastModifierUserId')"
prop=
"lastModifierUserId"
>
<InputNumber
v-model=
"entity.lastModifierUserId"
></InputNumber>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('isDeleted')"
prop=
"isDeleted"
>
<InputNumber
v-model=
"entity.isDeleted"
></InputNumber>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('deletionTime')"
prop=
"deletionTime"
>
<DatePicker
type=
"date"
v-model=
"entity.deletionTime"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('deleterUserId')"
prop=
"deleterUserId"
>
<InputNumber
v-model=
"entity.deleterUserId"
></InputNumber>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"entity.title"
>
</Input>
</FormItem></Col>
<Col
:span=
"24"
><FormItem
:label=
"l('note')"
prop=
"note"
>
<Input
v-model=
"entity.note"
type=
"textarea"
:rows=
"5"
></Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('state')"
prop=
"state"
>
<Dictionary
code=
"mes.project_main.State"
v-model=
"entity.state"
></Dictionary>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('type')"
prop=
"type"
>
<Dictionary
code=
"mes.project_main.Type"
v-model=
"entity.type"
></Dictionary>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('picture')"
prop=
"picture"
>
<Input
v-model=
"entity.picture"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('attachment')"
prop=
"attachment"
>
<Input
v-model=
"entity.attachment"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('phase')"
prop=
"phase"
>
<Dictionary
code=
"mes.project_main.Phase"
v-model=
"entity.phase"
></Dictionary>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('startDate')"
prop=
"startDate"
>
<DatePicker
type=
"date"
v-model=
"entity.startDate"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('endDate')"
prop=
"endDate"
>
<DatePicker
type=
"date"
v-model=
"entity.endDate"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('businessUnits')"
prop=
"businessUnits"
>
<Input
v-model=
"entity.businessUnits"
>
</Input>
</FormItem></Col>
</Row>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</Form>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Edit'
,
data
()
{
return
{
disabled
:
false
,
entity
:
{
},
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
}
}
},
props
:
{
eid
:
Number
},
mounted
()
{
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
this
.
entity
=
r
.
result
;
})
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
update
(
this
.
entity
).
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$emit
(
'on-ok'
)
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
}
}).
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
}
})
},
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
"project_main"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
},
watch
:
{
eid
(
v
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
}
}
}
}
</
script
>
\ No newline at end of file
pages/project/project/index.vue
View file @
c57ca226
<
template
>
<div>
我的地盘
</div>
<div>
<DataGrid
:columns=
"columns"
ref=
"grid"
:action=
"action"
:conditions=
"easySearch"
:type=
"typeInfo"
:span=
"6"
><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>
<Button
:icon=
"iconInfo"
shape=
"circle"
:title=
"titleInfo"
@
click=
"changeShwo"
></Button>
</
template
>
<
template
slot=
"card"
slot-scope=
"{ row }"
>
<div
class=
"body-card"
>
<Row
class=
"title-i"
>
<Col
:span=
"12"
>
<Ellipsis
:text=
"row.name"
:length=
"18"
tooltip
/>
</Col>
<Col
:span=
"12"
class=
"btn-click"
>
<Ellipsis
:text=
"row.code"
:length=
"18"
tooltip
/></Col>
</Row>
<Row
class=
"row-down"
:gutter=
"10"
>
<Col
span=
"7"
>
<div
class=
"img-i"
>
<!--
<img
:src=
"downUrl + row.img"
v-if=
"row.img"
/>
-->
<Pictrue
:src=
"row.img"
v-if=
"row.img"
/>
<img
src=
"@/assets/images/files_header.png"
v-else
width=
"100%"
height=
"100%"
/>
</div>
</Col>
<Col
span=
"17"
>
<div
class=
"c"
>
<div>
版本:
{{
row
.
version
}}
</div>
<div>
状态:
<state
code=
"word.document.status"
:value=
"row.status"
/>
</div>
<!--
<div>
创建人:
<User
:value=
"row.creatorUserId"
/>
</div>
-->
<div
class=
"shuo-ming"
>
<span>
文档说明:
</span>
<Ellipsis
:text=
"row.description"
:length=
"12"
tooltip
/>
</div>
</div>
<div
class=
"a-icon"
>
<a
@
click=
"edit(row.id)"
>
<Icon
type=
"md-create"
/>
编辑
</a
>
<a
@
click=
"remove(row.id)"
>
<Icon
type=
"ios-trash"
/>
删除
</a
>
<a
@
click=
"view(row.id)"
>
<Icon
type=
"md-document"
/>
详情
</a>
<!--
<a
@
click=
"sub(row.id)"
v-if=
"row.status == 1 && row.schemaId"
>
<Icon
type=
"md-color-wand"
/>
送审
</a>
-->
</div>
</Col>
</Row>
</div>
</
template
>
</DataGrid>
<Modal
v-model=
"modal"
:title=
"title"
width=
"1200"
footer-hide
>
<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_main 10/16/2020 4:01:23 PM"
,
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"title"
,
value
:
null
},
},
modal
:
false
,
title
:
"新增"
,
detail
:
null
,
curId
:
0
,
columns
:
[
{
type
:
"index"
,
width
:
60
,
align
:
"center"
,
},
{
key
:
"id"
,
title
:
this
.
$t
(
"id"
),
hide
:
true
,
align
:
"left"
,
high
:
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
:
"title"
,
title
:
this
.
l
(
"title"
),
align
:
"left"
,
easy
:
true
,
high
:
true
,
},
{
key
:
"state"
,
title
:
this
.
l
(
"state"
),
align
:
"left"
,
high
:
true
,
code
:
"mes.project_main.State"
,
},
{
key
:
"type"
,
title
:
this
.
l
(
"type"
),
align
:
"left"
,
high
:
true
,
code
:
"mes.project_main.Type"
,
},
{
key
:
"picture"
,
title
:
this
.
l
(
"picture"
),
align
:
"left"
,
high
:
true
},
{
key
:
"attachment"
,
title
:
this
.
l
(
"attachment"
),
align
:
"left"
,
high
:
true
,
},
{
key
:
"phase"
,
title
:
this
.
l
(
"phase"
),
align
:
"left"
,
high
:
true
,
code
:
"mes.project_main.Phase"
,
},
{
key
:
"startDate"
,
title
:
this
.
l
(
"startDate"
),
align
:
"left"
,
high
:
true
,
},
{
key
:
"endDate"
,
title
:
this
.
l
(
"endDate"
),
align
:
"left"
,
high
:
true
},
{
key
:
"businessUnits"
,
title
:
this
.
l
(
"businessUnits"
),
align
:
"left"
,
high
:
true
,
},
{
key
:
"creationTime"
,
title
:
this
.
l
(
"creationTime"
),
align
:
"left"
,
hide
:
false
,
},
{
key
:
"creatorUserId"
,
title
:
this
.
l
(
"creatorUserId"
),
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: '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
)
},
},
"删除"
),
]);
},
},
],
typeInfo
:
"table"
,
iconInfo
:
"md-list"
,
titleInfo
:
"列表模式"
,
};
},
mounted
()
{
console
.
log
(
this
);
},
async
fetch
({
store
,
params
})
{
await
store
.
dispatch
(
"loadDictionary"
);
// 加载数据字典
},
methods
:
{
changeShwo
()
{
//显示模式切换
if
(
this
.
typeInfo
==
"card"
)
{
this
.
typeInfo
=
"table"
;
this
.
iconInfo
=
"md-list"
;
this
.
titleInfo
=
"列表模式"
;
}
else
{
this
.
typeInfo
=
"card"
;
this
.
iconInfo
=
"md-apps"
;
this
.
titleInfo
=
"卡片模式"
;
}
},
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
;
},
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
)
{
let
vkey
=
"project_main"
+
"."
+
key
;
return
this
.
$t
(
vkey
)
||
key
;
},
},
};
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
pages/project/project/search.vue
0 → 100644
View file @
c57ca226
<
template
>
<Form
ref=
"form"
:model=
"condition"
:label-width=
"90"
>
<Row>
<Col
:span=
"12"
:v-if=
"condition.id.show"
><FormItem
:label=
"$t('id')"
prop=
"id"
>
<Input
v-model=
"condition.id.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.creationTime.show"
><FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.creationTime.value"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.creatorUserId.show"
><FormItem
:label=
"l('creatorUserId')"
prop=
"creatorUserId"
>
<Input
v-model=
"condition.creatorUserId.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.lastModificationTime.show"
><FormItem
:label=
"l('lastModificationTime')"
prop=
"lastModificationTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.lastModificationTime.value"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.lastModifierUserId.show"
><FormItem
:label=
"l('lastModifierUserId')"
prop=
"lastModifierUserId"
>
<Input
v-model=
"condition.lastModifierUserId.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.deletionTime.show"
><FormItem
:label=
"l('deletionTime')"
prop=
"deletionTime"
>
<DatePicker
type=
"daterange"
v-model=
"condition.deletionTime.value"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.title.show"
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"condition.title.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"24"
:v-if=
"condition.note.show"
><FormItem
:label=
"l('note')"
prop=
"note"
>
<Input
v-model=
"condition.note.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.state.show"
><FormItem
:label=
"l('state')"
prop=
"state"
>
<Dictionary
code=
"mes.project_main.State"
v-model=
"condition.state.value"
></Dictionary>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.type.show"
><FormItem
:label=
"l('type')"
prop=
"type"
>
<Dictionary
code=
"mes.project_main.Type"
v-model=
"condition.type.value"
></Dictionary>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.picture.show"
><FormItem
:label=
"l('picture')"
prop=
"picture"
>
<Input
v-model=
"condition.picture.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.attachment.show"
><FormItem
:label=
"l('attachment')"
prop=
"attachment"
>
<Input
v-model=
"condition.attachment.value"
>
</Input>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.phase.show"
><FormItem
:label=
"l('phase')"
prop=
"phase"
>
<Dictionary
code=
"mes.project_main.Phase"
v-model=
"condition.phase.value"
></Dictionary>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.startDate.show"
><FormItem
:label=
"l('startDate')"
prop=
"startDate"
>
<DatePicker
type=
"daterange"
v-model=
"condition.startDate.value"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.endDate.show"
><FormItem
:label=
"l('endDate')"
prop=
"endDate"
>
<DatePicker
type=
"daterange"
v-model=
"condition.endDate.value"
></DatePicker>
</FormItem></Col>
<Col
:span=
"12"
:v-if=
"condition.businessUnits.show"
><FormItem
:label=
"l('businessUnits')"
prop=
"businessUnits"
>
<Input
v-model=
"condition.businessUnits.value"
>
</Input>
</FormItem></Col>
</Row>
</Form>
</
template
>
<
script
>
import
Api
from
'./api'
export
default
{
name
:
'Add'
,
data
()
{
return
{
condition
:
{
id
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
creationTime
:{
op
:
"Range"
,
value
:
null
,
show
:
true
},
creatorUserId
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
lastModificationTime
:{
op
:
"Range"
,
value
:
null
,
show
:
true
},
lastModifierUserId
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
deletionTime
:{
op
:
"Range"
,
value
:
null
,
show
:
true
},
title
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
note
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
state
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
type
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
picture
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
attachment
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
phase
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
startDate
:{
op
:
"Range"
,
value
:
null
,
show
:
true
},
endDate
:{
op
:
"Range"
,
value
:
null
,
show
:
true
},
businessUnits
:{
op
:
"Equal"
,
value
:
null
,
show
:
true
},
},
}
},
methods
:
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
},
l
(
key
)
{
key
=
"project_main"
+
"."
+
key
;
return
this
.
$t
(
key
)
}
}
}
</
script
>
\ No newline at end of file
pages/technology/details/routingsupporting/add.vue
View file @
c57ca226
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"
9
0"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"
12
0"
>
<Row>
<!--
<Col
:span=
"12"
>
...
...
@@ -38,10 +38,11 @@
<FormItem
:label=
"l('routingDetailName')"
prop=
"routingDetailId"
>
<Select
v-model=
"entity.routingDetailId"
>
<Option
v-for=
"(item,index) in routingDetailList"
v-for=
"(item,
index) in routingDetailList"
:value=
"item.value"
:key=
"index"
>
{{
item
.
label
}}
</Option>
>
{{
item
.
label
}}
</Option
>
</Select>
</FormItem>
</Col>
...
...
@@ -58,12 +59,31 @@
<Materiel
:bomId=
"productBomId"
v-model=
"entity.materialId"
@
on-change=
"change"
></Materiel>
</FormItem>
-->
<FormItem
:label=
"l('nameMaterial')"
prop=
"materialId"
>
<Materiel
<Select
v-model=
"entity.materialId"
placeholder=
"请选择"
style=
"width: 300px"
>
<Option
v-for=
"(item, index) in listData"
:key=
"index"
:value=
"item.value"
:label=
"item.label"
style=
"display: none"
></Option>
<Tree
key=
"mytree"
:data=
"dataTree"
ref=
"mytree"
:render=
"renderContent"
></Tree>
</Select>
<!--
<Materiel
v-model=
"entity.materialId"
@
on-change=
"change"
:codeRuleType=
"1"
:setType=
"true"
></Materiel>
></Materiel>
-->
</FormItem>
</Col>
<!--
<Col
:span=
"8"
v-if=
"false"
>
...
...
@@ -73,19 +93,22 @@
</Col>
-->
<Col
:span=
"12"
>
<FormItem
:label=
"l('quantity')"
prop=
"quantity"
>
<InputNumber
v-model=
"entity.quantity"
style=
"width:100%"
></InputNumber>
<InputNumber
v-model=
"entity.quantity"
style=
"width: 100%"
></InputNumber>
</FormItem>
</Col>
<Divider
orientation=
"left"
>
物料属性
</Divider>
<Row>
<Col
:span=
"12"
v-if=
"entity.materialId"
>
<FormItem
label=
"名称:"
>
<span>
{{
entity
.
nameMaterial
}}
</span>
<span>
{{
entity
.
nameMaterial
}}
</span>
</FormItem>
</Col>
<Col
:span=
"12"
v-if=
"entity.materialId"
>
<FormItem
label=
"编码:"
>
<span>
{{
entity
.
materialNumber
}}
</span>
<span>
{{
entity
.
materialNumber
}}
</span>
</FormItem>
</Col>
</Row>
...
...
@@ -140,6 +163,8 @@ export default {
data
()
{
return
{
forItem
:
{},
listData
:
[],
dataTree
:
[],
entity
:
{
routingHeaderId
:
null
,
routingDetailId
:
null
,
...
...
@@ -200,11 +225,59 @@ export default {
},
mounted
()
{
this
.
loadDetails
();
this
.
getData
();
},
methods
:
{
// onValue(filed, v) {
// this.$set(this.entity, filed, v);
// },
renderContent
(
h
,
{
root
,
node
,
data
})
{
//渲染树的样式
return
h
(
"span"
,
{
style
:
{
cursor
:
"pointer"
,
},
on
:
{
click
:
()
=>
{
this
.
handleSelect
(
data
);
//手动选择树节点
},
},
},
data
.
title
);
},
handleSelect
(
data
)
{
console
.
log
(
data
);
let
obj
=
{
label
:
data
.
title
,
value
:
data
.
materialId
,
};
this
.
listData
=
[];
this
.
listData
.
push
(
obj
);
this
.
entity
.
materialId
=
this
.
listData
[
0
].
value
;
this
.
entity
.
nameMaterial
=
this
.
listData
[
0
].
label
;
this
.
entity
.
nameMaterial
=
data
.
name
;
this
.
entity
.
materialId
=
data
.
materialId
;
this
.
entity
.
materialNumber
=
data
.
mmcode
;
this
.
entity
.
json
.
nameMaterial
=
data
.
name
;
this
.
entity
.
json
.
materialNumber
=
data
.
mmcode
;
Api
.
getMaterial
({
id
:
data
.
materialId
}).
then
((
r
)
=>
{
if
(
r
.
result
)
{
this
.
forItem
=
r
.
result
;
}
});
},
getData
()
{
Api
.
alltree
({
id
:
this
.
productBomId
}).
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
dataTree
=
r
.
result
;
// this.$Message.success("获取物料成功");
}
else
{
this
.
$Message
.
error
(
"获取物料失败"
);
}
});
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
...
...
@@ -228,15 +301,17 @@ export default {
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
change
(
e
,
v
)
{
this
.
entity
.
nameMaterial
=
e
.
name
;
this
.
entity
.
materialId
=
e
.
materialId
;
this
.
entity
.
materialNumber
=
e
.
mmcode
;
// change(e, v) {
// console.log(e);
// console.log(v);
// this.entity.nameMaterial = e.name;
// this.entity.materialId = e.materialId;
// this.entity.materialNumber = e.mmcode;
this
.
entity
.
json
.
nameMaterial
=
e
.
name
;
this
.
entity
.
json
.
materialNumber
=
e
.
mmcode
;
this
.
forItem
=
v
;
},
//
this.entity.json.nameMaterial = e.name;
//
this.entity.json.materialNumber = e.mmcode;
//
this.forItem = v;
//
},
loadDetails
()
{
//获取工序列表
let
parms
=
{
...
...
pages/technology/details/routingsupporting/api.js
View file @
c57ca226
...
...
@@ -37,4 +37,10 @@ export default {
materiallist
(
params
){
return
Api
.
post
(
`
${
material
}
/material/materiallist`
,
params
);
},
alltree
(
params
){
return
Api
.
post
(
`
${
technologyUrl
}
productinfo/alltree`
,
params
);
//bom树
},
getMaterial
(
params
){
return
Api
.
get
(
`
${
material
}
/material/get`
,
params
);
//bom树
},
}
pages/test.vue
View file @
c57ca226
...
...
@@ -20,14 +20,14 @@
<
template
>
<div
class=
"flex fd test_layout"
>
<div>
<Menu
mode=
"horizontal"
theme=
"light"
active-name=
"0"
>
<Menu
mode=
"horizontal"
theme=
"light"
active-name=
"
a
0"
>
<div
class=
"layout-assistant"
>
<MenuItem
name=
"0"
to=
"/test/example"
>
基础组件
</MenuItem>
<MenuItem
name=
"1"
to=
"/test/user"
>
人员选择
</MenuItem>
<MenuItem
name=
"2"
to=
"/test/com"
>
异步组件
</MenuItem>
<MenuItem
name=
"4"
to=
"/test/resource"
>
资源选择
</MenuItem>
<MenuItem
name=
"3"
to=
"/test/view"
>
详情拖拽排版
</MenuItem>
<MenuItem
name=
"5"
to=
"/test/test1"
>
colum验证
</MenuItem>
<MenuItem
name=
"
a
0"
to=
"/test/example"
>
基础组件
</MenuItem>
<MenuItem
name=
"
a
1"
to=
"/test/user"
>
人员选择
</MenuItem>
<MenuItem
name=
"
a
2"
to=
"/test/com"
>
异步组件
</MenuItem>
<MenuItem
name=
"
a
4"
to=
"/test/resource"
>
资源选择
</MenuItem>
<MenuItem
name=
"
a
3"
to=
"/test/view"
>
详情拖拽排版
</MenuItem>
<MenuItem
name=
"
a
5"
to=
"/test/test1"
>
colum验证
</MenuItem>
</div>
</Menu>
</div>
...
...
pages/test/api.js
View file @
c57ca226
...
...
@@ -13,10 +13,16 @@ export const exampleRouter = [
},
{
route
:
'/test/example/table'
,
title
:
'
treeGrid组件
'
,
title
:
'
表格
'
,
name
:
'components-table'
,
icon
:
'md-aperture'
},
{
route
:
'/test/example/tree'
,
title
:
'树'
,
name
:
'tree'
,
icon
:
'md-aperture'
},
{
route
:
'/test/example/select'
,
title
:
'select组件'
,
...
...
pages/test/example/table/index.vue
View file @
c57ca226
...
...
@@ -21,6 +21,9 @@
</FormItem>
</Form>
</
template
>
<
template
slot-scope=
"{row,column,index}"
slot=
"action"
>
<strong>
aaaa
</strong>
</
template
>
</DataGrid>
</div>
</template>
...
...
@@ -62,6 +65,7 @@ export default {
easy
:
true
,
sortable
:
true
,
high
:
true
,
slot
:
"cardNo"
,
tooltip
:
true
,
},
],
...
...
pages/test/example/tree/index.vue
0 → 100644
View file @
c57ca226
<
template
>
<div
class=
"tree"
>
<TreeGrid
:columns=
"columns"
:items=
"treeData"
>
<template
slot-scope=
"
{row,column,index}" slot="name">
<Icon
type=
"md-folder"
/>
{{
row
.
name
}}
</
template
>
<
template
slot-scope=
"{row,column,index}"
slot=
"action"
>
<strong>
{{
row
.
action
}}
</strong>
</
template
>
</TreeGrid>
<!-- <Input v-model="data" type="textarea" rows="20" placeholder=""></Input> -->
</div>
</template>
<
script
>
import
Mock
from
"mockjs"
;
export
default
{
name
:
""
,
data
()
{
return
{
columns
:
[
{
type
:
"selection"
,
width
:
50
,
align
:
"center"
},
{
key
:
"name"
,
title
:
"名称"
,
tree
:
true
,
slot
:
"name"
},
{
key
:
"status"
,
title
:
"状态"
,
width
:
"100"
},
{
key
:
"action"
,
title
:
"操作"
,
width
:
"100"
,
sortable
:
true
,
slot
:
"action"
},
],
treeData1
:
[],
treeData
:
[
{
action
:
"510000202006085435"
,
name
:
"书加部保处"
,
status
:
0
,
children
:
[
{
action
:
"430000200008054924"
,
name
:
"越组大过越"
,
status
:
0
},
{
action
:
"350000200106195747"
,
name
:
"反走和报山"
,
status
:
1
},
{
action
:
"46000019920810827X"
,
name
:
"强级法量少务持"
,
status
:
1
},
{
action
:
"620000198005286979"
,
name
:
"况题米"
,
status
:
1
},
{
action
:
"440000200901093872"
,
name
:
"又多为"
,
status
:
0
},
],
},
{
action
:
"510000199304272074"
,
name
:
"参什叫"
,
status
:
1
},
{
action
:
"710000199110144186"
,
name
:
"情克应个该农"
,
status
:
1
},
{
action
:
"140000201204175550"
,
name
:
"阶研其交式"
,
status
:
1
},
{
action
:
"500000198710051748"
,
name
:
"议开你集"
,
status
:
1
},
],
data
:
""
,
};
},
mounted
()
{
// this.init();
},
methods
:
{
init
()
{
var
data
=
Mock
.
mock
({
"data|5"
:
[
{
action
:
"@id"
,
name
:
"@ctitle"
,
"status|1"
:
[
0
,
1
],
},
],
});
console
.
warn
(
data
);
this
.
data
=
JSON
.
stringify
(
data
.
data
);
this
.
treeData
=
data
.
data
;
},
},
};
</
script
>
<
style
lang=
"less"
>
</
style
>
\ No newline at end of file
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