Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Chatopera OpenSource
/
ferry_web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
544c1088
authored
Jul 17, 2020
by
Mr. Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加全局只读。
parent
6bcfa858
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
162 additions
and
156 deletions
src/components/VueFormMaking/App.vue
src/components/VueFormMaking/components/CusDialog.vue
src/components/VueFormMaking/components/FormConfig.vue
src/components/VueFormMaking/components/GenerateForm.vue
src/components/VueFormMaking/components/GenerateFormItem.vue
src/components/VueFormMaking/components/WidgetConfig.vue
src/components/VueFormMaking/components/WidgetForm.vue
src/components/VueFormMaking/components/WidgetFormItem.vue
src/components/VueFormMaking/demo/Home.vue
src/components/VueFormMaking/indexBundle.js
src/components/VueFormMaking/router/LanguageView.vue
src/components/VueFormMaking/router/index.js
src/views/process/list/handle.vue
src/components/VueFormMaking/App.vue
View file @
544c1088
...
@@ -33,20 +33,19 @@
...
@@ -33,20 +33,19 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
Vue
from
'vue'
export
default
{
export
default
{
name
:
'App'
,
name
:
'App'
,
methods
:
{
methods
:
{
handleHome
()
{
handleHome
()
{
this
.
$router
.
push
({
path
:
'/'
})
this
.
$router
.
push
({
path
:
'/'
})
},
},
handleLangCommand
(
command
)
{
handleLangCommand
(
command
)
{
this
.
$router
.
replace
({
name
:
this
.
$route
.
name
,
params
:
{
lang
:
command
}})
this
.
$router
.
replace
({
name
:
this
.
$route
.
name
,
params
:
{
lang
:
command
}})
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
@@ -96,10 +95,6 @@
...
@@ -96,10 +95,6 @@
.action-item
{
.action-item
{
display
:
inline-block
;
display
:
inline-block
;
margin-left
:
15px
;
margin-left
:
15px
;
.el-dropdown{
//
font-size
:
16px
;
//
font-weight
:
500
;
}
.el-dropdown-link{
.el-dropdown-link{
cursor
:
pointer
;
cursor
:
pointer
;
color
:
#fff
;
color
:
#fff
;
...
...
src/components/VueFormMaking/components/CusDialog.vue
View file @
544c1088
...
@@ -30,79 +30,79 @@
...
@@ -30,79 +30,79 @@
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
props
:
{
props
:
{
visible
:
Boolean
,
visible
:
Boolean
,
loadingText
:
{
loadingText
:
{
type
:
String
,
type
:
String
,
default
:
''
default
:
''
},
title
:
{
type
:
String
,
default
:
''
},
width
:
{
type
:
String
,
default
:
'600px'
},
form
:
{
type
:
Boolean
,
default
:
true
},
action
:
{
type
:
Boolean
,
default
:
true
}
},
},
data
()
{
title
:
{
return
{
type
:
String
,
loading
:
false
,
default
:
''
dialogVisible
:
this
.
visible
,
id
:
'dialog_'
+
new
Date
().
getTime
(),
showForm
:
false
}
},
},
computed
:
{
width
:
{
show
()
{
type
:
String
,
if
(
this
.
form
)
{
default
:
'600px'
return
this
.
showForm
},
}
else
{
form
:
{
return
true
type
:
Boolean
,
}
default
:
true
}
},
},
watch
:
{
action
:
{
dialogVisible
(
val
)
{
type
:
Boolean
,
if
(
!
val
)
{
default
:
true
this
.
loading
=
false
}
this
.
$emit
(
'on-close'
)
},
setTimeout
(()
=>
{
data
()
{
this
.
showForm
=
false
return
{
},
300
)
loading
:
false
,
}
else
{
dialogVisible
:
this
.
visible
,
this
.
showForm
=
true
id
:
'dialog_'
+
new
Date
().
getTime
(),
}
showForm
:
false
},
}
visible
(
val
)
{
},
this
.
dialogVisible
=
val
computed
:
{
show
()
{
if
(
this
.
form
)
{
return
this
.
showForm
}
else
{
return
true
}
}
},
watch
:
{
dialogVisible
(
val
)
{
if
(
!
val
)
{
this
.
loading
=
false
this
.
$emit
(
'on-close'
)
setTimeout
(()
=>
{
this
.
showForm
=
false
},
300
)
}
else
{
this
.
showForm
=
true
}
}
},
},
mounted
()
{
visible
(
val
)
{
this
.
dialogVisible
=
val
}
},
mounted
()
{
},
methods
:
{
close
()
{
this
.
dialogVisible
=
false
},
},
methods
:
{
submit
()
{
close
()
{
this
.
loading
=
true
this
.
dialogVisible
=
false
},
submit
()
{
this
.
loading
=
true
this
.
$emit
(
'on-submit'
)
this
.
$emit
(
'on-submit'
)
},
},
end
()
{
end
()
{
this
.
loading
=
false
this
.
loading
=
false
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
...
src/components/VueFormMaking/components/FormConfig.vue
View file @
544c1088
...
@@ -25,8 +25,8 @@
...
@@ -25,8 +25,8 @@
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
/* eslint-disable */
/* eslint-disable */
props
:
[
'data'
]
props
:
[
'data'
]
}
}
</
script
>
</
script
>
src/components/VueFormMaking/components/GenerateForm.vue
View file @
544c1088
...
@@ -32,8 +32,8 @@
...
@@ -32,8 +32,8 @@
:remote=
"remote"
:remote=
"remote"
:rules=
"rules"
:rules=
"rules"
:widget=
"citem"
:widget=
"citem"
@
input-change=
"onInputChange"
:data=
"data"
:data=
"data"
@
input-change=
"onInputChange"
/>
/>
</
template
>
</
template
>
</el-col>
</el-col>
...
@@ -54,6 +54,7 @@
...
@@ -54,6 +54,7 @@
:widget=
"item"
:widget=
"item"
:remote=
"remote"
:remote=
"remote"
:data=
"data"
:data=
"data"
:disabled=
"disabled"
@
input-change=
"onInputChange"
@
input-change=
"onInputChange"
/>
/>
</
template
>
</
template
>
...
@@ -64,15 +65,15 @@
...
@@ -64,15 +65,15 @@
</template>
</template>
<
script
>
<
script
>
import
GenetateFormItem
from
'./GenerateFormItem'
import
GenetateFormItem
from
'./GenerateFormItem'
export
default
{
export
default
{
name
:
'FmGenerateForm'
,
name
:
'FmGenerateForm'
,
components
:
{
components
:
{
GenetateFormItem
GenetateFormItem
},
},
/* eslint-disable */
/* eslint-disable */
props
:
[
'data'
,
'remote'
,
'value'
,
'insite'
],
props
:
[
'data'
,
'remote'
,
'value'
,
'insite'
,
'disabled'
],
data
()
{
data
()
{
return
{
return
{
models
:
{},
models
:
{},
...
...
src/components/VueFormMaking/components/GenerateFormItem.vue
View file @
544c1088
...
@@ -238,14 +238,14 @@
...
@@ -238,14 +238,14 @@
</template>
</template>
<
script
>
<
script
>
import
FmUpload
from
'./Upload'
import
FmUpload
from
'./Upload'
export
default
{
export
default
{
components
:
{
components
:
{
FmUpload
FmUpload
},
},
/* eslint-disable */
/* eslint-disable */
props
:
[
'widget'
,
'models'
,
'rules'
,
'remote'
,
'data'
],
props
:
[
'widget'
,
'models'
,
'rules'
,
'remote'
,
'data'
,
'disabled'
],
data
()
{
data
()
{
return
{
return
{
dataModel
:
this
.
models
[
this
.
widget
.
model
]
dataModel
:
this
.
models
[
this
.
widget
.
model
]
...
@@ -282,12 +282,18 @@
...
@@ -282,12 +282,18 @@
})
})
})
})
}
}
if
(
this
.
widget
.
type
===
'imgupload'
&&
this
.
widget
.
options
.
isQiniu
)
{
if
(
this
.
widget
.
type
===
'imgupload'
&&
this
.
widget
.
options
.
isQiniu
)
{
this
.
remote
[
this
.
widget
.
options
.
tokenFunc
]((
data
)
=>
{
this
.
remote
[
this
.
widget
.
options
.
tokenFunc
]((
data
)
=>
{
this
.
widget
.
options
.
token
=
data
this
.
widget
.
options
.
token
=
data
})
})
}
}
if
(
this
.
disabled
===
undefined
||
this
.
disabled
===
null
)
{
this
.
widget
.
options
.
disabled
=
false
}
else
{
this
.
widget
.
options
.
disabled
=
this
.
disabled
}
},
},
methods
:
{
methods
:
{
}
}
...
...
src/components/VueFormMaking/components/WidgetConfig.vue
View file @
544c1088
...
@@ -389,13 +389,13 @@
...
@@ -389,13 +389,13 @@
</template>
</template>
<
script
>
<
script
>
import
Draggable
from
'vuedraggable'
import
Draggable
from
'vuedraggable'
export
default
{
export
default
{
components
:
{
components
:
{
Draggable
Draggable
},
},
/* eslint-disable */
/* eslint-disable */
props
:
[
'data'
],
props
:
[
'data'
],
data
()
{
data
()
{
return
{
return
{
...
...
src/components/VueFormMaking/components/WidgetForm.vue
View file @
544c1088
...
@@ -35,16 +35,18 @@
...
@@ -35,16 +35,18 @@
@add="handleWidgetColAdd($event, element, colIndex)"
@add="handleWidgetColAdd($event, element, colIndex)"
>
>
<transition-group
name=
"fade"
tag=
"div"
class=
"widget-col-list"
>
<transition-group
name=
"fade"
tag=
"div"
class=
"widget-col-list"
>
<widget-form-item
<template
v-for=
"(el, i) in col.list"
>
v-for=
"(el, i) in col.list"
<widget-form-item
v-if=
"el.key"
v-if=
"el.key"
:key=
"el.key"
:key=
"el.key"
:element=
"el"
:element=
"el"
:select
.
sync=
"selectWidget"
:select
.
sync=
"selectWidget"
:index=
"i"
:index=
"i"
:data=
"col"
:data=
"col"
:data-config=
"data"
:data-config=
"data"
/>
/>
</
template
>
</transition-group>
</transition-group>
</draggable>
</draggable>
...
@@ -78,15 +80,15 @@
...
@@ -78,15 +80,15 @@
</template>
</template>
<
script
>
<
script
>
import
Draggable
from
'vuedraggable'
import
Draggable
from
'vuedraggable'
import
WidgetFormItem
from
'./WidgetFormItem'
import
WidgetFormItem
from
'./WidgetFormItem'
export
default
{
export
default
{
components
:
{
components
:
{
Draggable
,
Draggable
,
WidgetFormItem
WidgetFormItem
},
},
/* eslint-disable */
/* eslint-disable */
props
:
[
'data'
,
'select'
],
props
:
[
'data'
,
'select'
],
data
()
{
data
()
{
return
{
return
{
...
...
src/components/VueFormMaking/components/WidgetFormItem.vue
View file @
544c1088
...
@@ -230,12 +230,12 @@
...
@@ -230,12 +230,12 @@
</template>
</template>
<
script
>
<
script
>
import
FmUpload
from
'./Upload'
import
FmUpload
from
'./Upload'
export
default
{
export
default
{
components
:
{
components
:
{
FmUpload
FmUpload
},
},
/* eslint-disable */
/* eslint-disable */
props
:
[
'element'
,
'select'
,
'index'
,
'data'
,
'dataConfig'
],
props
:
[
'element'
,
'select'
,
'index'
,
'data'
,
'dataConfig'
],
data
()
{
data
()
{
return
{
return
{
...
...
src/components/VueFormMaking/demo/Home.vue
View file @
544c1088
...
@@ -5,8 +5,9 @@
...
@@ -5,8 +5,9 @@
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
mounted
()
{
mounted
()
{
}
}
}
}
</
script
>
</
script
>
src/components/VueFormMaking/indexBundle.js
View file @
544c1088
import
Vue
from
'vue'
import
GenerateForm
from
'./components/GenerateForm.vue'
import
GenerateForm
from
'./components/GenerateForm.vue'
import
'./styles/cover.scss'
import
'./styles/cover.scss'
...
...
src/components/VueFormMaking/router/LanguageView.vue
View file @
544c1088
...
@@ -3,29 +3,29 @@
...
@@ -3,29 +3,29 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
Vue
from
'vue'
import
Vue
from
'vue'
export
default
{
export
default
{
watch
:
{
watch
:
{
'$route.params.lang'
:
function
(
val
)
{
'$route.params.lang'
:
function
(
val
)
{
this
.
loadLanguage
()
}
},
created
()
{
this
.
loadLanguage
()
this
.
loadLanguage
()
},
}
methods
:
{
},
loadLanguage
()
{
created
()
{
if
(
this
.
$route
.
params
.
lang
==
'zh-CN'
)
{
this
.
loadLanguage
()
Vue
.
config
.
lang
=
'zh-CN'
},
localStorage
.
setItem
(
'language'
,
'zh-CN'
)
methods
:
{
}
else
if
(
this
.
$route
.
params
.
lang
==
'en-US'
)
{
loadLanguage
()
{
Vue
.
config
.
lang
=
'en-US'
if
(
this
.
$route
.
params
.
lang
===
'zh-CN'
)
{
localStorage
.
setItem
(
'language'
,
'en-US'
)
Vue
.
config
.
lang
=
'zh-CN'
}
else
{
localStorage
.
setItem
(
'language'
,
'zh-CN'
)
this
.
$router
.
replace
({
name
:
this
.
$route
.
name
,
params
:
{
lang
:
navigator
.
language
==
'zh-CN'
?
'zh-CN'
:
'en-US'
}})
}
else
if
(
this
.
$route
.
params
.
lang
===
'en-US'
)
{
}
Vue
.
config
.
lang
=
'en-US'
localStorage
.
setItem
(
'language'
,
'en-US'
)
}
else
{
this
.
$router
.
replace
({
name
:
this
.
$route
.
name
,
params
:
{
lang
:
navigator
.
language
===
'zh-CN'
?
'zh-CN'
:
'en-US'
}})
}
}
}
}
}
}
}
</
script
>
</
script
>
src/components/VueFormMaking/router/index.js
View file @
544c1088
...
@@ -6,7 +6,7 @@ import LanguageView from './LanguageView.vue'
...
@@ -6,7 +6,7 @@ import LanguageView from './LanguageView.vue'
Vue
.
use
(
Router
)
Vue
.
use
(
Router
)
const
language
=
localStorage
.
getItem
(
'language'
)
||
(
navigator
.
language
==
'zh-CN'
?
'zh-CN'
:
'en-US'
)
const
language
=
localStorage
.
getItem
(
'language'
)
||
(
navigator
.
language
==
=
'zh-CN'
?
'zh-CN'
:
'en-US'
)
export
default
new
Router
({
export
default
new
Router
({
routes
:
[
routes
:
[
...
...
src/views/process/list/handle.vue
View file @
544c1088
...
@@ -50,10 +50,11 @@
...
@@ -50,10 +50,11 @@
:remote=
"remoteFunc"
:remote=
"remoteFunc"
:value=
"tplItem.form_data"
:value=
"tplItem.form_data"
:data=
"tplItem.form_structure"
:data=
"tplItem.form_structure"
:disabled=
"true"
/>
/>
</div>
</div>
<div
v-if=
"processStructureValue.userAuthority"
>
<div
v-if=
"processStructureValue.userAuthority"
>
<
!-- <hr style="background-color: #d9d9d9; border:0; height:1px;"> --
>
<
hr
style=
"background-color: #d9d9d9; border:0; height:1px;"
>
<div
class=
"text item"
style=
"text-align: center;margin-top:18px"
>
<div
class=
"text item"
style=
"text-align: center;margin-top:18px"
>
<
template
v-for=
"(item, index) in processStructureValue.edges"
>
<
template
v-for=
"(item, index) in processStructureValue.edges"
>
<el-button
<el-button
...
@@ -169,10 +170,11 @@ export default {
...
@@ -169,10 +170,11 @@ export default {
// 获取当前展示节点列表
// 获取当前展示节点列表
for
(
var
i
=
0
;
i
<
this
.
processStructureValue
.
nodes
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
processStructureValue
.
nodes
.
length
;
i
++
)
{
if
(
this
.
processStructureValue
.
nodes
[
i
].
id
===
this
.
processStructureValue
.
workOrder
.
current_state
)
{
if
(
this
.
processStructureValue
.
nodes
[
i
].
id
===
this
.
processStructureValue
.
workOrder
.
current_state
)
{
// 当前节点
this
.
nodeStepList
.
push
(
this
.
processStructureValue
.
nodes
[
i
])
this
.
nodeStepList
.
push
(
this
.
processStructureValue
.
nodes
[
i
])
this
.
activeIndex
=
this
.
nodeStepList
.
length
-
1
this
.
activeIndex
=
this
.
nodeStepList
.
length
-
1
if
(
i
===
this
.
processStructureValue
.
nodes
.
length
-
2
)
{
if
(
i
+
1
===
this
.
processStructureValue
.
nodes
.
length
)
{
this
.
activeIndex
=
i
+
1
this
.
activeIndex
=
this
.
nodeStepList
.
length
}
}
}
else
if
(
!
this
.
processStructureValue
.
nodes
[
i
].
isHideNode
)
{
}
else
if
(
!
this
.
processStructureValue
.
nodes
[
i
].
isHideNode
)
{
// 非隐藏节点
// 非隐藏节点
...
@@ -191,7 +193,7 @@ export default {
...
@@ -191,7 +193,7 @@ export default {
flow_properties
:
item
.
flowProperties
===
undefined
?
2
:
parseInt
(
item
.
flowProperties
),
flow_properties
:
item
.
flowProperties
===
undefined
?
2
:
parseInt
(
item
.
flowProperties
),
work_order_id
:
parseInt
(
this
.
$route
.
query
.
workOrderId
)
work_order_id
:
parseInt
(
this
.
$route
.
query
.
workOrderId
)
}).
then
(
response
=>
{
}).
then
(
response
=>
{
if
(
response
.
code
===
1000
00
)
{
if
(
response
.
code
===
2
00
)
{
// this.$router.push({ name: 'upcoming' })
// this.$router.push({ name: 'upcoming' })
window
.
location
.
reload
()
window
.
location
.
reload
()
}
}
...
...
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