Browse Source

Merge remote-tracking branch 'origin/master'

zhanglei
God 2 years ago
parent
commit
0ec4c9b5d5
  1. 3
      anrui-system-ui/src/api/Common/Upload.js
  2. 20
      anrui-system-ui/src/components/flow/flowRecord.vue
  3. 217
      anrui-system-ui/src/components/uploadFile/upload.vue
  4. 23
      anrui-system-ui/src/views/flow/doneList.vue
  5. 18
      anrui-system-ui/src/views/flow/havereadList.vue
  6. 20
      anrui-system-ui/src/views/flow/tobereadList.vue
  7. 76
      anrui-system-ui/src/views/flow/todoList.vue

3
anrui-system-ui/src/api/Common/Upload.js

@ -17,6 +17,9 @@ export const upload_frameFile = '/api/portal/v1/appversion/save'
// 移动端管理--上传icon(图标)
export const uploadFileIcon = '/api/portal/file/upload'
// 图片上传
export const uploadImgFile = '/api/portal/file/upload'
// 移除图片
export function deleteFilesOss(data) {
return request({

20
anrui-system-ui/src/components/flow/flowRecord.vue

@ -47,7 +47,8 @@
<div>
<div>
<label style="font-weight: normal">评论时间 </label><label style="color:#8a909c;font-weight: normal">{{ item.processCommentVo.time }}</label><br>
<label style="font-weight: normal">评论内容 </label><label style="color:#8a909c;font-weight: normal">{{ item.processCommentVo.content }}</label>
<label style="font-weight: normal">评论内容 </label><label style="color:#8a909c;font-weight: normal">{{ item.processCommentVo.content }}</label><br>
<label style="font-weight: normal" v-show="item.processCommentVo.fileList.length > 0">评论图片: </label><label style="color:#0294d7;font-weight: normal" v-show="item.processCommentVo.fileList.length > 0" @click="handLook(item.processCommentVo.fileList)">查看</label>
</div>
</div>
</el-card>
@ -58,6 +59,9 @@
</div>
</el-col>
</el-card>
<el-dialog :visible="dialogViseble" append-to-body :before-close="handleClose">
<el-image style="width: 178px;height: 178px" v-for="(item,index) in imgList" :key="index" :src="item" :preview-src-list="imgList"></el-image>
</el-dialog>
</div>
</template>
<script>
@ -83,11 +87,23 @@ export default {
}
},
data() {
return {}
return {
dialogViseble: false,
imgList: []
}
},
created() {
},
methods: {
handLook(value) {
console.log(value)
this.dialogViseble = true
this.imgList = value
},
handleClose() {
this.dialogViseble = false
this.imgList = []
},
setIcon(val) {
if (val) {
return 'el-icon-check'

217
anrui-system-ui/src/components/uploadFile/upload.vue

@ -0,0 +1,217 @@
<template>
<div>
<el-upload ref="imgUpload" v-loading="loadding" class="avatar-uploader" :headers="accessToken" :action="uploadFile" :accept="accept" list-type="picture-card" :file-list="files" :on-remove="removeImage" :on-preview="handlePictureCardPreview" :on-progress="uploadProgrees" :on-error="uploadError" :on-success="uploadImgSuccess_FuJian">
<i class="el-icon-plus avatar-uploader-icon"/>
</el-upload>
<el-dialog :visible.sync="dialogVisible" title="查看图片">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</div>
</template>
<script>
import { uploadImgFile } from '@/api/Common/Upload'
import { getStorage } from '@/utils/auth.js'
export default {
model: {
prop: 'name',
event: 'change'
},
props: {
placeholder: {
type: String,
default: ''
},
bucket: {
type: String,
default: 'abc'
},
//
width: {
type: String,
default: '270px'
},
accept: {
type: String,
default: '.jpg,.jpeg,.png,.JPG,.JPEG,'
},
//
name: {
type: Array,
required: true
},
uploadData: {
type: Object,
default: {}
}
},
data() {
return {
dialogImageUrl: '',
dialogVisible: false,
accessToken: null,
uploadFile: uploadImgFile,
fileList_FuJian: [],
enclosure: '',
file_add: '',
file_catch: '',
files: [],
files_list: [],
filedUrl: '',
// fileUrl: fileUrl,
// showpicture:false,
isview: false,
nameArr: '',
loadding: false
}
},
watch: {
name: {
deep: true,
immediate: true,
handler(newVal, oldVal) {
console.log('aaaa1', newVal)
this.files = newVal
console.log('aaaa2', this.files)
}
}
},
mounted() {
this.$nextTick(() => {
this.Init()
})
},
created() {
this.uploadFile = uploadImgFile //
this.accessToken = {
token: getStorage()
}
},
methods: {
showImg(imgList) {
this.files = imgList
console.log('123123123', this.files)
},
view() {
// window.open(this.filedUrl)
},
//
Init() {
if (this.name !== undefined) {
this.files = []
for (var i = 0; i < this.name.length; i++) {
this.files.push({
name: this.name[i],
url: this.name[i]
})
}
}
},
handlePictureCardPreview(file) {
this.dialogVisible = true
this.dialogImageUrl = file.url
},
// --
uploadImgSuccess_FuJian(response, file, fileList) {
console.log('您选择的file:', file)
if (file.response.code === '200') {
this.loadding = false
//
this.filedUrl = this.fileUrl + file.response.data
// var uid = file.response.data
this.files.push({
name: file.response.data.sourceFileName,
url: file.response.data.fullUrl,
size: file.response.data.size
})
this.$emit('change', this.files)
this.$emit('eett', this.files)
}
},
removeImage(file, ImageFileList) {
this.files.splice(this.files.indexOf(file), 1)
const imgFiles = []
this.files.forEach((o) => {
imgFiles.push(o.url)
})
this.$emit('fileChange', this.files)
},
handleRemove(file, fileList) {
console.log('file:' + JSON.stringify(file))
console.log('fileList:' + JSON.stringify(fileList))
this.enclosure = ''
// 1. id(this.file_add)
this.getNewFileId(fileList)
// 2. id(this.file_catch)
this.getCatchFileId(file)
// 3. id
this.getFileId()
// 4. id
this.$emit('change', this.enclosure)
},
// this.file_add(id)
getNewFileId(fileList) {
// debugger
this.file_add = ''
for (var i = 0; i < fileList.length; i++) {
if (fileList[i].response && fileList[i].response.code === '200') {
this.file_add = this.file_add + fileList[i].response.data + ','
}
}
if (this.file_add !== '') {
this.file_add = this.file_add.substring(0, this.file_add.length - 1)
}
// console.log('1. this.file_add: ' + this.file_add)
},
// this.file_catchid
getCatchFileId(file) {
for (var i = 0; i < this.files_list.length; i++) {
if (this.file_catch !== '') {
// 1. id
if (this.files_list[i].name === file.name) {
// 2. file_catchfils_arry
var fils_arry = this.file_catch.split(',')
// 3. fils_arry this.files_list[i].id
var arry = []
fils_arry.forEach((element) => {
//
if (element !== this.files_list[i].id) {
arry.push(element)
}
})
// 4. file_catch
this.file_catch = arry.join(',')
}
}
}
// console.log('2. this.file_catch:' + this.file_catch)
},
// id
getFileId() {
// console.log('3. this.file_catch:' + this.file_catch + ',this.file_add:' + this.file_add)
if (this.file_catch !== '') {
if (this.file_add !== '') {
this.enclosure = this.file_catch + ',' + this.file_add
} else {
this.enclosure = this.file_catch
}
} else {
this.enclosure = this.file_add
}
},
//
uploadError() {
this.loadding = false
},
uploadProgrees(event, file, fileList) {
if (Number(event.percent) > 0) {
this.loadding = true
}
}
}
}
</script>
<style scoped></style>

23
anrui-system-ui/src/views/flow/doneList.vue

@ -126,8 +126,8 @@
<!-- 审批人员填写评论 -->
<el-dialog title="评论" :visible.sync="commentVisible" width="50%">
<el-input type="textarea" placeholder="请输入内容" v-model="comment.content" :autosize="{ minRows: 4, maxRows: 10}">
</el-input>
<el-input type="textarea" placeholder="请输入内容" v-model="comment.content" :autosize="{ minRows: 4, maxRows: 10}" />
<upload ref="imgUpload" v-model="comment_ImgList" bucket="map" :upload-data="{type:'0001'}"/>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="handleCommentConfirm">确定</el-button>
<el-button size="small" @click="commentVisible = false">取消</el-button>
@ -143,12 +143,16 @@ import { getStorage } from '@/utils/auth'
import { revokeTask, getList, selectUrl, readXml, getFlowViewer, breakProcess, commentSave } from '@/api/flow/todo'
import { flowRecord, revokeProcess } from '@/api/workflow/finished'
import { loginDetails } from '@/api/user'
import upload from '@/components/uploadFile/upload'
// import flow from "@/views/flow/flow";
export default {
name: '',
components: {
pageye, Pagination, flowRecords
pageye,
Pagination,
flowRecords,
upload
},
data() {
return {
@ -166,13 +170,15 @@ export default {
taskName_now: '',
url: '',
commentVisible: false, //
comment_ImgList: [],
comment: {
reviewer: '',
reviewerSid: '',
time: '',
content: '',
processId: '',
processInstSid: ''
processInstSid: '',
fileList: []
},
line_row: {},
loginInfo: {
@ -342,14 +348,21 @@ export default {
time: '',
content: '',
processId: '',
processInstSid: ''
processInstSid: '',
fileList: []
}
this.comment_ImgList = []
},
handleCommentConfirm() {
if (this.comment.content === '') {
this.$message({ showClose: true, type: 'error', message: '请填写评论' })
return
}
if (this.comment_ImgList.length > 0) {
for (var i = 0; i < this.comment_ImgList.length; i++) {
this.comment.fileList.push(this.comment_ImgList[i].url)
}
}
this.comment.reviewer = window.sessionStorage.getItem('name')
this.comment.reviewerSid = window.sessionStorage.getItem('userSid')
this.comment.processId = this.line_row.procInsId

18
anrui-system-ui/src/views/flow/havereadList.vue

@ -98,6 +98,7 @@
<el-dialog title="评论" :visible.sync="commentVisible" width="50%">
<el-input type="textarea" placeholder="请输入内容" v-model="comment.content" :autosize="{ minRows: 4, maxRows: 10}">
</el-input>
<upload ref="imgUpload" v-model="comment_ImgList" bucket="map" :upload-data="{type:'0001'}"/>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="handleCommentConfirm">确定</el-button>
<el-button size="small" @click="commentVisible = false">取消</el-button>
@ -113,13 +114,15 @@ import { getStorage } from '@/utils/auth'
import { selectUrl, readXml, getFlowViewer, commentSave } from '@/api/flow/todo'
import { pagerList } from '@/api/flow/read'
import { flowRecord } from '@/api/workflow/finished'
import upload from '@/components/uploadFile/upload'
export default {
name: '',
components: {
pageye,
Pagination,
flowRecords
flowRecords,
upload
},
data() {
return {
@ -134,13 +137,15 @@ export default {
tableKey: 0,
url: '',
commentVisible: false, //
comment_ImgList: [],
comment: {
reviewer: '',
reviewerSid: '',
time: '',
content: '',
processId: '',
processInstSid: ''
processInstSid: '',
fileList: []
},
line_row: {},
loginInfo: {
@ -264,14 +269,21 @@ export default {
time: '',
content: '',
processId: '',
processInstSid: ''
processInstSid: '',
fileList: []
}
this.comment_ImgList = []
},
handleCommentConfirm() {
if (this.comment.content === '') {
this.$message({ showClose: true, type: 'error', message: '请填写评论' })
return
}
if (this.comment_ImgList.length > 0) {
for (var i = 0; i < this.comment_ImgList.length; i++) {
this.comment.fileList.push(this.comment_ImgList[i].url)
}
}
this.comment.reviewer = window.sessionStorage.getItem('name')
this.comment.reviewerSid = window.sessionStorage.getItem('userSid')
this.comment.processId = this.line_row.procInsId

20
anrui-system-ui/src/views/flow/tobereadList.vue

@ -87,6 +87,7 @@
<el-dialog title="评论" :visible.sync="commentVisible" width="50%">
<el-input type="textarea" placeholder="请输入内容" v-model="comment.content" :autosize="{ minRows: 4, maxRows: 10}">
</el-input>
<upload ref="imgUpload" v-model="comment_ImgList" bucket="map" :upload-data="{type:'0001'}"/>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="handleCommentConfirm">确定</el-button>
<el-button size="small" @click="commentVisible = false">取消</el-button>
@ -102,12 +103,16 @@ import { getStorage } from '@/utils/auth'
import { selectUrl, readXml, getFlowViewer, commentSave } from '@/api/flow/todo'
import { pagerList, changeRead } from '@/api/flow/read'
import { flowRecord } from '@/api/workflow/finished'
import upload from '@/components/uploadFile/upload'
export default {
name: '',
components: {
pageye,
Pagination,
flowRecords
flowRecords,
upload
},
data() {
return {
@ -122,13 +127,15 @@ export default {
tableKey: 0,
url: '',
commentVisible: false, //
comment_ImgList: [],
comment: {
reviewer: '',
reviewerSid: '',
time: '',
content: '',
processId: '',
processInstSid: ''
processInstSid: '',
fileList: []
},
line_row: {},
loginInfo: {
@ -257,14 +264,21 @@ export default {
time: '',
content: '',
processId: '',
processInstSid: ''
processInstSid: '',
fileList: []
}
this.comment_ImgList = []
},
handleCommentConfirm() {
if (this.comment.content === '') {
this.$message({ showClose: true, type: 'error', message: '请填写评论' })
return
}
if (this.comment_ImgList.length > 0) {
for (var i = 0; i < this.comment_ImgList.length; i++) {
this.comment.fileList.push(this.comment_ImgList[i].url)
}
}
this.comment.reviewer = window.sessionStorage.getItem('name')
this.comment.reviewerSid = window.sessionStorage.getItem('userSid')
this.comment.processId = this.line_row.procInsId

76
anrui-system-ui/src/views/flow/todoList.vue

@ -13,13 +13,9 @@
<el-input v-model="listQuery.params.proDefName" placeholder="流程名称" clearable></el-input>
</el-form-item>
<el-form-item label="申请日期">
<el-date-picker v-model="listQuery.params.startDate" type="date" placeholder="选择日期"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"></el-date-picker>
<el-date-picker v-model="listQuery.params.startDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker>
<label></label>
<el-date-picker v-model="listQuery.params.endDate" type="date" placeholder="选择日期"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"></el-date-picker>
<el-date-picker v-model="listQuery.params.endDate" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-button type="primary" @click="handleFilter">查询</el-button>
</el-form>
@ -27,12 +23,10 @@
</div>
<div class="listtop">
<div class="tit">待办任务列表</div>
<pageye v-show="total>0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size"
class="pagination" @pagination="getList"/>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<div class="listcon">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width:100%"
@selection-change="handleSelectionChange">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width:100%" @selection-change="handleSelectionChange">
<el-table-column width="60px" label="序号" type="index" :index="tableKey+1" align="center"/>
<el-table-column width="100px" label="操作" align="center">
<template slot-scope="scope">
@ -84,9 +78,7 @@
</div>
<div class="pages">
<div class="tit"/>
<pagination v-show="total>0" :total="total"
:page.sync="listQuery.current" :limit.sync="listQuery.size"
class="pagination" @pagination="getList"/>
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<!-- Start办理页面 -->
@ -113,6 +105,7 @@
<el-dialog title="评论" :visible.sync="commentVisible" width="50%">
<el-input type="textarea" placeholder="请输入内容" v-model="comment.content" :autosize="{ minRows: 4, maxRows: 10}">
</el-input>
<upload ref="imgUpload" v-model="comment_ImgList" bucket="map" :upload-data="{type:'0001'}"/>
<span slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click="handleCommentConfirm">确定</el-button>
<el-button size="small" @click="commentVisible = false">取消</el-button>
@ -128,11 +121,15 @@ import { getFlowViewer, readXml, breakTask, businessAgree, pagerList, rejectTask
import { getStorage } from '@/utils/auth'
import { flowRecord } from '@/api/workflow/finished'
import { loginDetails } from '@/api/user'
import upload from '@/components/uploadFile/upload'
export default {
name: '',
components: {
pageye, Pagination, flowRecords
pageye,
Pagination,
flowRecords,
upload
},
data() {
return {
@ -140,22 +137,23 @@ export default {
xmlData: '',
dialogHeight: '80%',
centerDialogVisible: false, //
editDialog: false,
flowRecordList: [],
listLoading: false,
total: 0,
dialogList: {},
list: [],
tableKey: 0,
url: '',
editDialog: false,
flowRecordList: [],
listLoading: false,
dialogList: {},
list: [],
tableKey: 0,
url: '',
commentVisible: false, //
comment_ImgList: [],
comment: {
reviewer: '',
reviewerSid: '',
time: '',
content: '',
processId: '',
processInstSid: ''
processInstSid: '',
fileList: []
},
line_row: {},
taskName_now: '',
@ -192,6 +190,7 @@ export default {
listQuery: {
current: 1,
size: 10,
total: 0,
params: {
proDefName: '',
startDate: '',
@ -445,14 +444,21 @@ export default {
time: '',
content: '',
processId: '',
processInstSid: ''
processInstSid: '',
fileList: []
}
this.comment_ImgList = []
},
handleCommentConfirm() {
if (this.comment.content === '') {
this.$message({ showClose: true, type: 'error', message: '请填写评论' })
return
}
if (this.comment_ImgList.length > 0) {
for (var i = 0; i < this.comment_ImgList.length; i++) {
this.comment.fileList.push(this.comment_ImgList[i].url)
}
}
this.comment.reviewer = window.sessionStorage.getItem('name')
this.comment.reviewerSid = window.sessionStorage.getItem('userSid')
this.comment.processId = this.line_row.procInsId
@ -473,7 +479,7 @@ export default {
this.line_row = row
this.getModelDetail(row.deployId)
this.getFlowViewer(row.procInsId)
this.getFlowRecordList(row.procInsId,row.deployId)
this.getFlowRecordList(row.procInsId, row.deployId)
this.editDialog = true
},
/** 流程流转记录 */
@ -493,19 +499,15 @@ export default {
},
getList() {
this.listLoading = true
pagerList({
current: this.listQuery.current,
size: this.listQuery.size,
params: {
proDefName: this.listQuery.params.proDefName,
startDate: this.listQuery.params.startDate,
endDate: this.listQuery.params.endDate,
userSid: this.listQuery.params.userSid
}
}).then((rep) => {
pagerList(this.listQuery).then((rep) => {
this.listLoading = false
this.list = rep.data.records
this.total = rep.data.total
if (rep.succss) {
this.list = rep.data.records
this.listQuery.total = rep.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
handleFilter() {

Loading…
Cancel
Save