完善公共组件
This commit is contained in:
@@ -0,0 +1,61 @@
|
|||||||
|
<template>
|
||||||
|
<el-form-item :label="label" :prop="prop" class="add-form-item form-item-disabled">
|
||||||
|
<el-radio-group :value="value"
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="placeholder"
|
||||||
|
@input="handleChange"
|
||||||
|
>
|
||||||
|
<el-radio v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label">{{ item.value }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "RadioGroupFormItem",
|
||||||
|
props: {
|
||||||
|
label: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
prop: {
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
type: Array,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
placeholder () {
|
||||||
|
return `请选择${this.label}`
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleChange (event) {
|
||||||
|
console.log(event)
|
||||||
|
this.$emit('input', event)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.add-form-item /deep/ .el-radio-group{
|
||||||
|
padding: 0 10px !important;
|
||||||
|
}
|
||||||
|
.add-form-item /deep/ .el-radio{
|
||||||
|
margin-right: 15px !important;
|
||||||
|
}
|
||||||
|
.add-form-item /deep/ .el-radio:last-child {
|
||||||
|
margin-right: 0 !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -23,6 +23,7 @@ export default {
|
|||||||
name: "SelectMultipleFormItem",
|
name: "SelectMultipleFormItem",
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
|
type: [Array, String],
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
prop: {
|
prop: {
|
||||||
@@ -49,21 +50,39 @@ export default {
|
|||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
basicType: 'Array'
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
placeholder () {
|
placeholder () {
|
||||||
return `请选择${this.label}`
|
return `请选择${this.label}`
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
if (this.value && this.value !== '') {
|
if (!this.value) {
|
||||||
return this.value.split(',')
|
|
||||||
} else {
|
|
||||||
return []
|
return []
|
||||||
|
} else {
|
||||||
|
if (this.getType(this.value) === 'Array') {
|
||||||
|
this.basicType = 'Array'
|
||||||
|
return this.value
|
||||||
|
} else if (this.getType(this.value) === 'String'){
|
||||||
|
this.basicType = 'String'
|
||||||
|
return this.value.split(',')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getType (target) {
|
||||||
|
return Object.prototype.toString.call(target).slice(8, -1)
|
||||||
|
},
|
||||||
handleChange (event) {
|
handleChange (event) {
|
||||||
this.$emit('input', event.join(','))
|
if (this.basicType === 'Array') {
|
||||||
|
this.$emit('input', event)
|
||||||
|
} else if (this.basicType === 'String') {
|
||||||
|
this.$emit('input', event.join(','))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,16 +7,21 @@
|
|||||||
clearable
|
clearable
|
||||||
></el-input>
|
></el-input>
|
||||||
<div style="display: flex;justify-content: space-between">
|
<div style="display: flex;justify-content: space-between">
|
||||||
<div style="width: 80%;margin-top: 13px">
|
<div style="margin-top: 13px" :style="{width: view ? '100%' : '80%'}">
|
||||||
<div v-for="file in FileList"
|
<template v-if="FileList.length > 0">
|
||||||
:key="file.id"
|
<div v-for="file in FileList"
|
||||||
@click="onPreview(file)"
|
:key="file.id"
|
||||||
style="color: #409eff;cursor:pointer"
|
@click="onPreview(file)"
|
||||||
class="fileClass">
|
style="color: #409eff;cursor:pointer"
|
||||||
{{ file.name }}
|
class="fileClass">
|
||||||
</div>
|
{{ file.name }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<div v-if="view" style="line-height: 22px">-</div>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 20%;">
|
<div v-if="!view" style="width: 20%;">
|
||||||
<el-button :disabled="disabled"
|
<el-button :disabled="disabled"
|
||||||
type="primary"
|
type="primary"
|
||||||
class="common-button-primary"
|
class="common-button-primary"
|
||||||
@@ -85,6 +90,10 @@ export default {
|
|||||||
size: {
|
size: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 200
|
default: 200
|
||||||
|
},
|
||||||
|
view: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
|
|||||||
@@ -0,0 +1,103 @@
|
|||||||
|
<template>
|
||||||
|
<div class="phoneHistortTable">
|
||||||
|
<el-table
|
||||||
|
height="100%"
|
||||||
|
ref="selection"
|
||||||
|
:data="histortData"
|
||||||
|
tooltip-effect="dark"
|
||||||
|
style="width: 100%"
|
||||||
|
border
|
||||||
|
row-key="id"
|
||||||
|
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}">
|
||||||
|
<el-table-column
|
||||||
|
prop="name"
|
||||||
|
min-width="100"
|
||||||
|
label="任务步骤"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="assignee"
|
||||||
|
min-width="100"
|
||||||
|
label="任务受理人"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="createTime"
|
||||||
|
label="创建时间"
|
||||||
|
min-width="100"
|
||||||
|
align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format('YYYY-MM-DD') : '' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="endTime"
|
||||||
|
label="完成时间"
|
||||||
|
min-width="100"
|
||||||
|
align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.endTime ? $moment(scope.row.endTime).format('YYYY-MM-DD') : '' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="comment"
|
||||||
|
label="流程信息"
|
||||||
|
min-width="100"
|
||||||
|
align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.commentText }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="completeFlag"
|
||||||
|
label="状态"
|
||||||
|
align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.endTime ? '已完成' : scope.row.receiveStatus ? '已接收' : '未完成' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<loading :loading="loading">流程列表加载中</loading>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "phoneApprovalHistory",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
histortData: [],
|
||||||
|
loading: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
prcNum: {
|
||||||
|
type: String
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getHistoryData () {
|
||||||
|
this.$http.get('lawss/activiti/get_list_by_instance', {
|
||||||
|
prcNum: this.prcNum || this.$route.query.prcNum
|
||||||
|
}, {
|
||||||
|
loading: "loading",
|
||||||
|
_this: this
|
||||||
|
}, res => {
|
||||||
|
this.histortData = res
|
||||||
|
}, e => {})
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
this.getHistoryData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.phoneHistortTable{
|
||||||
|
height: 100%;
|
||||||
|
//min-height: calc(100vh - 52px)
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -73,12 +73,14 @@
|
|||||||
}
|
}
|
||||||
.process-title {
|
.process-title {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-left: 10px;
|
//margin-left: 10px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-left: 10px;
|
||||||
.smallText {
|
.smallText {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
|
|||||||
Reference in New Issue
Block a user