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
2395cf89
Commit
2395cf89
authored
Oct 31, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of
http://git.mes123.com/zhouyx/mes-ui
into product
parents
8b9fe315
c624f999
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
539 additions
and
444 deletions
+539
-444
add.vue
pages/technology/details/remind/add.vue
+165
-139
detail.vue
pages/technology/details/remind/detail.vue
+72
-56
edit.vue
pages/technology/details/remind/edit.vue
+117
-86
index.vue
pages/technology/details/remind/index.vue
+185
-163
No files found.
pages/technology/details/remind/add.vue
View file @
2395cf89
This diff is collapsed.
Click to expand it.
pages/technology/details/remind/detail.vue
View file @
2395cf89
<
template
>
<
template
>
<div
class=
"detail"
>
<div
class=
"detail"
>
<Row>
<Row>
<Filed
:span=
"12"
:name=
"l('title')"
>
{{
entity
.
title
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('title')"
>
{{
entity
.
title
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('status')"
><state
code=
"processCase.status"
:value=
"entity.status+''"
type=
"text"
/></Filed>
<Filed
:span=
"12"
:name=
"l('status')"
>
<Filed
:span=
"12"
:name=
"l('creator')"
>
{{
entity
.
creator
}}
</Filed>
<state
code=
"processCase.status"
:value=
"entity.status+''"
type=
"text"
/>
<Filed
:span=
"12"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
</Filed>
<Filed
:span=
"24"
:name=
"l('content')"
>
{{
entity
.
content
}}
</Filed>
<Filed
:span=
"12"
:name=
"l('creator')"
>
{{
entity
.
creator
}}
</Filed>
<Filed
:span=
"24"
:name=
"l('filePath')"
>
<Filed
:span=
"12"
:name=
"l('creationTime')"
>
{{
entity
.
creationTime
}}
</Filed>
<files
ref=
"refFile"
:parms=
"parms"
unClosable
style=
"display:inline"
/></Filed>
<Filed
:span=
"24"
:name=
"l('content')"
>
</Filed>
<div
v-html=
"entity.content"
class=
"tohtml"
></div>
</Filed>
<Filed
:span=
"24"
:name=
"l('filePath')"
>
<files
ref=
"refFile"
:parms=
"parms"
unClosable
style=
"display:inline"
/>
</Filed>
</Filed>
</Row>
</Row>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
"./api"
;
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
"Add"
,
name
:
"Add"
,
data
()
{
data
()
{
return
{
return
{
entity
:
{},
entity
:
{},
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
required
:
true
,
},
message
:
"必填"
,
parms
:
{
trigger
:
"blur"
app
:
"technology"
,
}],
eid
:
""
,
code
:
[{
name
:
""
,
required
:
true
,
field
:
""
,
message
:
"必填"
,
},
trigger
:
"blur"
};
}],
},
},
props
:
{
parms
:
{
eid
:
Number
,
app
:
"technology"
,
},
eid
:
""
,
mounted
()
{
name
:
""
,
if
(
this
.
eid
>
0
)
{
field
:
""
,
this
.
load
(
this
.
eid
);
},
}
};
},
methods
:
{
clickData
(
data
,
liUrl
)
{
window
.
open
(
data
,
"_blank"
);
},
},
load
(
v
)
{
props
:
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
eid
:
Number
,
this
.
entity
=
r
.
result
;
this
.
parms
.
eid
=
r
.
result
.
filePaths
;
this
.
$emit
(
"on-load"
);
});
},
},
handleClose
()
{
mounted
()
{
this
.
$emit
(
"on-close"
);
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
},
},
l
(
key
)
{
methods
:
{
key
=
"remind"
+
"."
+
key
;
clickData
(
data
,
liUrl
)
{
return
this
.
$t
(
key
);
window
.
open
(
data
,
"_blank"
);
},
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
parms
.
eid
=
r
.
result
.
filePaths
;
this
.
$emit
(
"on-load"
);
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
l
(
key
)
{
key
=
"remind"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
if
(
v
>
0
)
{
if
(
v
>
0
)
{
this
.
load
(
v
);
this
.
load
(
v
);
}
}
},
},
},
},
};
};
</
script
>
</
script
>
\ No newline at end of file
pages/technology/details/remind/edit.vue
View file @
2395cf89
<
template
>
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Row>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('title')"
prop=
"title"
style=
"width:95%"
>
<FormItem
:label=
"l('title')"
prop=
"title"
style=
"width:95%"
>
<Input
v-model=
"entity.title"
></Input>
<Input
v-model=
"entity.title"
></Input>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
span=
"12"
>
<Col
span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Select
v-model=
"entity.status"
>
<Select
v-model=
"entity.status"
>
<Option
:value=
"1"
>
启用
</Option>
<Option
:value=
"1"
>
启用
</Option>
<Option
:value=
"0"
>
禁用
</Option>
<Option
:value=
"0"
>
禁用
</Option>
</Select>
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
span=
"24"
>
<Col
span=
"24"
>
<FormItem
:label=
"l('filePath')"
>
<FormItem
:label=
"l('filePath')"
>
<!--
<files
ref=
"refFile"
:parms=
"parms"
files
/>
-->
<!--
<files
ref=
"refFile"
:parms=
"parms"
files
/>
-->
<files
ref=
"refFile"
:parms=
"parms"
files
/>
<files
ref=
"refFile"
:parms=
"parms"
files
/>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
span=
"24"
>
<Col
span=
"24"
>
<FormItem
:label=
"l('content')"
prop=
"content "
>
<FormItem
:label=
"l('content')"
prop=
"content "
>
<Input
v-model=
"entity.content"
type=
"textarea"
:rows=
"5"
></Input
>
<i-quill
v-model=
"entity.content"
:height=
"260"
v-paste=
"handleImg"
border
/
>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
"./api"
;
import
Api
from
"./api"
;
import
iQuill
from
"@/components/quill"
;
export
default
{
export
default
{
name
:
"Edit"
,
name
:
"Edit"
,
data
()
{
components
:
{
return
{
iQuill
entity
:
{},
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
parms
:
{
app
:
"technology"
,
//服务
eid
:
""
,
//记录id
name
:
""
,
//表名process_case
field
:
""
,
//字段名
},
};
},
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
.
parms
.
eid
=
r
.
result
.
filePaths
;
});
},
},
handleSubmit
()
{
data
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
return
{
if
(
v
)
{
entity
:
{},
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
rules
:
{
this
.
entity
.
filePaths
=
this
.
parms
.
eid
;
name
:
[{
}
else
{
required
:
true
,
this
.
entity
.
filePath
=
""
;
message
:
"必填"
,
this
.
entity
.
filePaths
=
""
;
trigger
:
"blur"
}
}],
Api
.
update
(
this
.
entity
)
},
.
then
((
r
)
=>
{
parms
:
{
if
(
r
.
success
)
{
app
:
"technology"
,
//服务
this
.
$Message
.
success
(
"保存成功"
);
eid
:
""
,
//记录id
this
.
$emit
(
"on-ok"
);
name
:
""
,
//表名process_case
}
else
{
field
:
""
,
//字段名
this
.
$Message
.
error
(
"保存失败"
);
},
}
};
})
},
.
catch
((
err
)
=>
{
props
:
{
this
.
$Message
.
error
(
"保存失败"
);
eid
:
Number
,
console
.
warn
(
err
);
});
}
});
},
},
handleClose
()
{
mounted
()
{
this
.
$emit
(
"on-close"
);
if
(
this
.
eid
>
0
)
{
this
.
load
(
this
.
eid
);
}
},
},
l
(
key
)
{
methods
:
{
key
=
"remind"
+
"."
+
key
;
load
(
v
)
{
return
this
.
$t
(
key
);
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
parms
.
eid
=
r
.
result
.
filePaths
;
});
},
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
this
.
$refs
.
refFile
.
nameList
.
length
>
0
)
{
this
.
entity
.
filePaths
=
this
.
parms
.
eid
;
}
else
{
this
.
entity
.
filePath
=
""
;
this
.
entity
.
filePaths
=
""
;
}
Api
.
update
(
this
.
entity
)
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
}
else
{
this
.
$Message
.
error
(
"保存失败"
);
}
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
handleImg
(
e
)
{
let
file
=
null
;
if
(
e
.
clipboardData
&&
e
.
clipboardData
.
items
[
0
]
&&
e
.
clipboardData
.
items
[
0
].
type
&&
e
.
clipboardData
.
items
[
0
].
type
.
indexOf
(
"image"
)
>
-
1
)
{
//这里就是判断是否有粘贴进来的文件且文件为图片格式
file
=
e
.
clipboardData
.
items
[
0
].
getAsFile
();
let
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
file
);
setTimeout
(()
=>
{
var
img
=
'<img src="'
+
reader
.
result
+
'" alt=""/>'
;
this
.
entity
.
content
+=
img
;
},
1000
);
// new R
}
},
l
(
key
)
{
key
=
"remind"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
if
(
v
!=
0
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
this
.
load
(
v
);
}
}
},
},
},
},
};
};
</
script
>
</
script
>
\ No newline at end of file
pages/technology/details/remind/index.vue
View file @
2395cf89
This diff is collapsed.
Click to expand it.
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