mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-14 11:55:34 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2732050e61 | ||
|
|
4e904add32 | ||
|
|
b85ed8405e | ||
|
|
e827deef35 |
2
GITSHA
2
GITSHA
@@ -1 +1 @@
|
||||
3c2c2ca30234f1403b0590c3bd5d63c86c1bd9b4
|
||||
4e904add32bb32432d3453465266b2316632bc24
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
"vue-echarts": "^5.0.0-beta.0",
|
||||
"vue-i18n": "^8.15.5",
|
||||
"vue-json-editor": "^1.4.3",
|
||||
"vue-markdown": "^2.2.4",
|
||||
"vue-moment": "^4.1.0",
|
||||
"vue-password-strength-meter": "^1.7.2",
|
||||
"vue-router": "3.0.6",
|
||||
@@ -92,6 +93,7 @@
|
||||
"eslint": "^5.15.3",
|
||||
"eslint-plugin-vue": "5.2.2",
|
||||
"eslint-plugin-vue-i18n": "^0.3.0",
|
||||
"github-markdown-css": "^5.2.0",
|
||||
"html-webpack-plugin": "3.2.0",
|
||||
"husky": "^4.2.3",
|
||||
"less-loader": "^5.0.0",
|
||||
|
||||
37
src/components/MarkDown/index.vue
Normal file
37
src/components/MarkDown/index.vue
Normal file
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<div class="markdown-body">
|
||||
<VueMarkdown :source="value" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import VueMarkdown from 'vue-markdown'
|
||||
import 'github-markdown-css/github-markdown-light.css'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
VueMarkdown
|
||||
},
|
||||
props: {
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
.markdown-body * {
|
||||
padding: 10px;
|
||||
background-color: #f3f3f3;
|
||||
color: #1a1a1a;
|
||||
font-size: 13px;
|
||||
//& >>> .table * {
|
||||
// background-color: #f3f3f3;
|
||||
//}
|
||||
}
|
||||
</style>
|
||||
@@ -28,3 +28,4 @@ export { default as AssetRelationCard } from './AssetRelationCard'
|
||||
export { default as UserConfirmDialog } from './UserConfirmDialog'
|
||||
export { default as Announcement } from './Announcement'
|
||||
export { default as CronTab } from './CronTab'
|
||||
export { default as MarkDown } from './MarkDown'
|
||||
|
||||
@@ -14,7 +14,7 @@ import { DEFAULT_ORG_ID } from '@/utils/org'
|
||||
const service = axios.create({
|
||||
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
|
||||
// withCredentials: true, // send cookies when cross-domain requests
|
||||
timeout: 60 * 1000 // request timeout
|
||||
timeout: 2 * 60 * 1000 // request timeout
|
||||
})
|
||||
|
||||
function beforeRequestAddToken(config) {
|
||||
|
||||
@@ -25,17 +25,6 @@ export default {
|
||||
]
|
||||
]
|
||||
],
|
||||
fieldsMeta: {
|
||||
FORGOT_PASSWORD_URL: {
|
||||
on: {
|
||||
change([value], updateForm) {
|
||||
if (value && !value.startsWith('http')) {
|
||||
updateForm({ FORGOT_PASSWORD_URL: 'http://' + value })
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
submitMethod() {
|
||||
return 'patch'
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<strong>{{ item.user_display }}</strong> <small class="text-muted">{{ formatTime(item.date_created) }}</small>
|
||||
<br>
|
||||
<small class="text-muted">{{ toSafeLocalDateStr(item.date_created) }}</small>
|
||||
<div style="padding-top: 10px;" v-html="item.body" />
|
||||
<MarkDown :value="item.body" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -68,9 +68,11 @@
|
||||
import IBox from '@/components/IBox'
|
||||
import { formatTime, getDateTimeStamp } from '@/utils'
|
||||
import { toSafeLocalDateStr } from '@/utils/common'
|
||||
import MarkDown from '@/components/MarkDown'
|
||||
|
||||
export default {
|
||||
name: 'Comments',
|
||||
components: { IBox },
|
||||
components: { IBox, MarkDown },
|
||||
props: {
|
||||
object: {
|
||||
type: Object,
|
||||
@@ -105,7 +107,13 @@ export default {
|
||||
return this.object.process_map[this.object.approval_step - 1].assignees.indexOf(this.$store.state.users.profile.id) !== -1
|
||||
},
|
||||
isSelfTicket() {
|
||||
const applicant = this.object.applicant.indexOf('(') > -1 ? this.object.applicant.split('(')[0] : this.object.applicant
|
||||
let applicant
|
||||
if (this.object.applicant.indexOf('(') > -1) {
|
||||
const applicantName = this.object.applicant.split('(')[1]
|
||||
applicant = applicantName.substring(0, applicantName.length - 1)
|
||||
} else {
|
||||
applicant = this.object.applicant
|
||||
}
|
||||
const userName = this.$store.state.users.profile?.username
|
||||
return applicant === userName
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user