Browse Source

流程管理弹框弹框

master
xuhuajiao 2 years ago
parent
commit
ed0ec177ec
  1. 7
      src/assets/styles/yxk-admin.scss
  2. 252
      src/views/components/archivesDetail/index.vue
  3. 340
      src/views/components/archivesDetail/uploadFile/index.vue
  4. 103
      src/views/system/processManage/runningProcess/module/approvalList/index.vue
  5. 107
      src/views/system/processManage/runningProcess/module/businessDetails/index.vue
  6. 21
      src/views/system/processManage/runningProcess/module/detail.vue
  7. 3
      src/views/system/processManage/runningProcess/module/processImg/index.vue
  8. 106
      src/views/system/processManage/runningProcess/module/taskList/index.vue

7
src/assets/styles/yxk-admin.scss

@ -83,6 +83,13 @@
} }
} }
.detail-tab{
@include row_tab_style;
.tab-nav{
margin: 25px 0 18px 0;
}
}
.category-container{ .category-container{
.elect-cont-left{ .elect-cont-left{
@include category-left-style; @include category-left-style;

252
src/views/components/archivesDetail/index.vue

@ -0,0 +1,252 @@
<template>
<el-dialog class="upload-dialog" :title="detailTitle" :close-on-click-modal="false" :visible.sync="archivesInfoVisible" append-to-body :before-close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<div class="archives-info-wrap">
<!-- tab -->
<ul class="archives-tab">
<li :class="{'active': archivesTabIndex == 0}" @click="changeActiveTab(0)">基本信息</li>
<li v-if="isHasFile" :class="{'active': archivesTabIndex == 1}" @click="changeActiveTab(1)">附件</li>
<li :class="{'active': archivesTabIndex == 2}" @click="changeActiveTab(2)">元数据</li>
</ul>
<!-- 基本信息 -->
<div v-if="archivesTabIndex==0" class="base-info item-content">
<el-row>
<el-col v-for="(item,index) in archivesDetailsData" v-show="index<archivesDetailsData.length-5" :key="index" :span="item.isLine ? 24 : 12" class="base-info-item">
<span>{{ item.fieldCnName }}</span>
<p :style="{ width: ( item.editLength ? item.editLength+'px' : '' ), flex: ( !item.editLength ? 1 : '' )}">{{ item.context }}</p>
</el-col>
</el-row>
<el-row v-if="isDetailsInfo">
<el-col v-for="(item,index) in archivesDetailsData.slice(archivesDetailsData.length-5,archivesDetailsData.length)" :key="'last'+index" :span=" 12" class="base-info-item">
<span>{{ item.fieldCnName }}</span>
<div v-if="item.fieldName === 'folder_location' && item.context" :style="{ width: item.editLength+'px', marginTop:'-6px'}">
<div v-if="item.context.indexOf(',')">
<el-tag
v-for="(val,key) in item.context.split(',')"
:key="key"
:type="val"
effect="dark"
>
{{ val }}
</el-tag>
</div>
<div v-else-if="!item.context.indexOf(',')">
<el-tag effect="dark">{{ item.context }}</el-tag>
</div>
</div>
<div v-else :style="{ width: item.editLength+'px'}" :class="[ (item.fieldName === 'borrow_type') ? 'row-state row-lending' : '' ]">
{{ item.context }}
</div>
</el-col>
</el-row>
</div>
<!-- 附件 -->
<UploadFile v-if="archivesTabIndex==1" ref="uploadFile" class="item-content" :is-upload-detail="false" :category-id="categoryId" :arc-id="arcId" />
<!-- 元数据 -->
<div v-if="archivesTabIndex==2" class="item-content">
<pre v-highlightjs="xml_show">
<code class="highlight_s">
{[xml_show]}
</code>
</pre>
</div>
</div>
</div>
</el-dialog>
</template>
<script>
import { form } from '@crud/crud'
import { FetchArchivesDetails, FetchArchivesMetadata } from '@/api/archivesManage/archivesList'
import UploadFile from './uploadFile/index'
export default {
name: 'ArchivesInfo',
components: { UploadFile },
mixins: [
form({})
],
inject: ['recycleMain'],
props: {
categoryId: {
type: String,
default: function() {
return ''
}
},
arcId: {
type: String,
default: function() {
return ''
}
}
},
data() {
return {
detailTitle: '',
isHasFile: false, // /
isDetailsInfo: false, // 5
isTidOrBorrow: true, // tid/
archivesInfoVisible: false,
archivesTabIndex: 0,
archivesDetailsData: [],
archivesDetailsMetadata: [],
xml_show: null
}
},
mounted() {
},
methods: {
getDetial(rowId) {
const params = {
categoryId: this.categoryId,
archivesId: rowId
}
FetchArchivesDetails(params).then(data => {
this.archivesDetailsData = data
// /
this.archivesDetailsData.forEach(item => {
if (item.fieldName === 'borrow_type') {
if (item.context === 1) {
item.context = '待登记'
} else if (item.context === 2) {
item.context = '待借阅'
} else if (item.context === 3) {
item.context = '待归还'
} else if (item.context === 4 || item.context === '' || item.context === null) {
item.context = '-'
} else if (item.context === -1) {
item.context = '在库'
}
}
})
// - tid/''
if (!this.isTidOrBorrow) {
const indexBorrow = this.archivesDetailsData.findIndex(item => item.fieldName === 'borrow_type')
const indexTid = this.archivesDetailsData.findIndex(item => item.fieldName === 'tid')
this.archivesDetailsData.splice(indexBorrow, 1)
this.archivesDetailsData.splice(indexTid, 1)
}
})
FetchArchivesMetadata(params).then(data => {
this.archivesDetailsMetadata = data
})
},
setXml() {
const xmlstr = this.archivesDetailsMetadata
// console.log('xmlstr:', xmlstr)
// console.log('xmljson:', this.$x2js.xml2js(xmlstr))
// console.log('jsonxml:', this.$x2js.js2xml(this.$x2js.xml2js(xmlstr)))
// this.xml_show = vkbeautify.xml(xmlstr)
this.xml_show = this.showXml(xmlstr)
},
changeActiveTab(index) {
this.archivesTabIndex = index
if (this.archivesTabIndex === 2) {
this.setXml()
}
this.$nextTick(() => {
if (this.$refs.uploadFile) {
this.$refs.uploadFile.tableData = []
this.$refs.uploadFile.getFileList()
}
})
},
// -
handleClose(done) {
this.archivesInfoVisible = false
done()
},
// xml
showXml(str) {
var that = this
var text = str
//
text =
'\n' +
text
.replace(/(<\w+)(\s.*?>)/g, function($0, name, props) {
return name + ' ' + props.replace(/\s+(\w+=)/g, ' $1')
})
.replace(/>\s*?</g, '>\n<')
//
text = text
.replace(/\n/g, '\r')
.replace(/<!--(.+?)-->/g, function($0, text) {
var ret = '<!--' + escape(text) + '-->'
return ret
})
.replace(/\r/g, '\n')
//
var rgx = /\n(<(([^\?]).+?)(?:\s|\s*?>|\s*?(\/)>)(?:.*?(?:(?:(\/)>)|(?:<(\/)\2>)))?)/gm
var nodeStack = []
var output = text.replace(rgx, function(
$0,
all,
name,
isBegin,
isCloseFull1,
isCloseFull2,
isFull1,
isFull2
) {
var isClosed =
isCloseFull1 === '/' ||
isCloseFull2 === '/' ||
isFull1 === '/' ||
isFull2 === '/'
var prefix = ''
if (isBegin === '!') {
prefix = that.getPrefix(nodeStack.length)
} else {
if (isBegin !== '/') {
prefix = that.getPrefix(nodeStack.length)
if (!isClosed) {
nodeStack.push(name)
}
} else {
nodeStack.pop()
prefix = that.getPrefix(nodeStack.length)
}
}
var ret = '\n' + prefix + all
return ret
})
var outputText = output.substring(1)
//
outputText = outputText
.replace(/\n/g, '\r')
.replace(/(\s*)<!--(.+?)-->/g, function($0, prefix, text) {
if (prefix.charAt(0) === '\r') prefix = prefix.substring(1)
text = unescape(text).replace(/\r/g, '\n')
var ret =
'\n' + prefix + '<!--' + text.replace(/^\s*/gm, prefix) + '-->'
return ret
})
outputText = outputText.replace(/\s+$/g, '').replace(/\r/g, '\r\n')
return outputText
},
getPrefix(prefixIndex) {
var span = ' '
var output = []
for (var i = 0; i < prefixIndex; ++i) {
output.push(span)
}
return output.join('')
}
}
}
</script>
<style lang="scss" scoped>
// .base-info .base-info-item span.el-tag{
// width: auto;
// color: #fff;
// }
// ::v-deep .el-dialog .el-dialog__header .el-dialog__headerbtn {
// top: 12px;
// right: -320px;
// }
</style>

340
src/views/components/archivesDetail/uploadFile/index.vue

@ -0,0 +1,340 @@
<template>
<div class="upload-file">
<!-- 上传附件curd -->
<div v-if="isUploadDetail" class="upload-curd">
<div class="upload-btn">
<el-button icon="el-icon-plus" size="small" type="primary">添加</el-button>
<input id="upFile" type="file" name="upFile" @change="changeFile($event)">
</div>
<el-button icon="el-icon-delete" :disabled="selections.length === 0" @click="toDelete(selections)">删除</el-button>
<el-button icon="el-icon-sort" @click="showSort">排序</el-button>
</div>
<!--表格渲染-->
<el-table
ref="table"
:data="tableData"
style="min-width: 100%"
height="calc(100vh - 382px)"
@row-click="clickRowHandler"
@selection-change="selectionChangeHandler"
>
<el-table-column v-if="isUploadDetail" type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="file_name" label="文件名称" show-overflow-tooltip min-width="140" align="center" />
<el-table-column prop="file_type" label="格式" min-width="60" align="center" />
<el-table-column prop="file_size" label="大小" min-width="85" align="center">
<template slot-scope="scope">
{{ (scope.row.file_size / 1024).toFixed(2) + 'kB' }}
</template>
</el-table-column>
<el-table-column prop="file_dpi" label="分辨率" min-width="85" align="center" />
<el-table-column prop="file_thumbnail" label="缩览图" min-width="60" align="center">
<template slot-scope="scope">
<div v-if="scope.row.file_type === 'jpg' || scope.row.file_type === 'jpeg' || scope.row.file_type === 'png' || scope.row.file_type === 'bmp'|| scope.row.file_type === 'gif'">
<img width="60px" height="32px" class="screenshot" :src="baseApi+ '/downloadFile' +scope.row.file_path" :onerror="defaultImg" @click="showCoverPreview(scope.row)">
</div>
<div v-else>
<svg-icon icon-class="fujian" class-name="svg-style" />
</div>
</template>
</el-table-column>
<el-table-column prop="create_time" label="创建时间" min-width="110" align="center" />
<el-table-column v-if="!isUploadDetail && !recycleMain.isRecycle" label="操作" min-width="100" align="center">
<template slot-scope="scope">
<el-button class="file-down iconfont icon-weibiaoti-2" @click="downloadFile(scope.row)">下载</el-button>
</template>
</el-table-column>
</el-table>
<!-- 点击缩略图看大图 -->
<el-dialog class="preview-dialog" :append-to-body="true" :close-on-click-modal="false" :before-close="handleClose" :visible="showCoverVisible" title="查看大图">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog" style="max-height:calc(100vh - 230px); overflow:auto;">
<img style="max-width:100%; object-fit: contain;" :src="previewSrc" :onerror="defaultImg">
</div>
</el-dialog>
<!-- 排序 -->
<el-dialog :close-on-click-modal="false" :append-to-body="true" title="排序" :visible.sync="sortVisible" @opened="opened">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<i class="drag-tip">提示请通过拖动鼠标来调整当前顺序</i>
<el-table :data="sortTableData" class="file-sort" style="width: 100%;max-height: 70vh;" row-key="id">
<el-table-column type="index" label="序号" width="100" align="center" />
<el-table-column prop="file_name" label="文件名称" />
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleSort">保存</el-button>
</div>
</div>
</el-dialog>
<!-- 删除附件 -->
<el-dialog title="删除附件" :append-to-body="true" :close-on-click-modal="false" :visible.sync="deleteVisible" :before-close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<div class="dialog-delt">
<p><span>确定删除已选择的附件吗</span></p>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleDeltConfirm">确定</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import { FetchInitArchiveFilesView, FetchEditFile, FetchDeleteFile, FetchFileSort } from '@/api/archivesManage/archivesList'
import { archivesUpload } from '@/utils/upload'
import { downloadFile, getCurrentTime } from '@/utils/index'
import { mapGetters } from 'vuex'
import { form } from '@crud/crud'
import Sortable from 'sortablejs'
export default {
name: 'UploadFile',
components: {},
mixins: [
form({})
],
inject: ['recycleMain'],
props: {
isUploadDetail: {
type: Boolean,
default: true
},
categoryId: {
type: String,
default: function() {
return ''
}
},
arcId: {
type: String,
default: function() {
return ''
}
}
},
data() {
return {
defaultImg: 'this.src="' + require('@/assets/images/cover-bg.png') + '"',
tableData: [], // list
selections: [], // table -
showCoverVisible: false, // dialog
sortTableData: [], // data
sortVisible: false, // dialog
deleteVisible: false, // dialog
deleteData: [], // data
file: null, // change
fileNames: '', // - name
formatType: '', // - type
postfix: '', // -
fileSize: '', // -
filePath: '', // - path
px: '', // -
nowDate: '', //
previewSrc: '' // src
}
},
computed: {
...mapGetters([
'baseApi'
])
},
watch: {
arcId: function(newValue, oldValue) {
}
},
methods: {
//
async changeFile(e) {
this.file = e.target.files[0]
this.fileSize = this.file.size
this.formatType = this.file.type.substring(0, this.file.type.indexOf('/'))
this.fileNames = this.file.name
this.postfix = this.file.name.substring(
this.fileNames.lastIndexOf('.') + 1,
this.fileNames.length
)
if (this.formatType === 'image') {
const fileBase64 = await this.getBase64(this.file)
const res = await this.getImgPx(fileBase64)
this.px = res.width + 'px*' + res.height + 'px'
} else {
this.px = ''
}
//
archivesUpload(this.baseApi + '/api/archives/uploadFile', this.file, this.categoryId).then(res => {
if (res.data.code === 200) {
this.filePath = res.data.data
this.uploadSave()
}
})
},
// -
uploadSave() {
this.nowDate = getCurrentTime()
const json = {
'file_name': this.fileNames,
'file_size': this.fileSize,
'file_type': this.postfix,
'file_path': this.filePath,
'sequence': null,
'archive_id': this.arcId,
'file_dpi': this.px,
'file_thumbnail': '',
'create_time': this.nowDate,
'id': null
}
const arrayUpload = []
arrayUpload.push(json)
const params = {
'categoryId': this.categoryId,
'jsonString': JSON.stringify(arrayUpload)
}
FetchEditFile(params).then(data => {
this.$message.success('上传附件成功!')
this.crud.refresh()
this.getFileList()
})
},
// base64
getBase64(file) {
const reader = new FileReader()
reader.readAsDataURL(file)
return new Promise((resolve) => {
reader.onload = () => {
resolve(reader.result)
}
})
},
//
getImgPx(img) {
const image = new Image()
image.src = img
return new Promise((resolve) => {
image.onload = () => {
const width = image.width
const height = image.height
resolve({ width, height })
}
})
},
// list
getFileList() {
const params = {
'categoryId': this.categoryId,
'archiveId': this.arcId
}
FetchInitArchiveFilesView(params).then(data => {
this.tableData = data.returnlist
})
},
//
downloadFile(row) {
const url = this.baseApi + '/downloadFile' + row.file_path
fetch(url).then(res => res.blob()).then(blob => {
downloadFile(blob, row.file_name.split('.')[0], row.file_type)
}).catch(() => {
this.$message.error('下载文件失败!')
})
},
//
toDelete(data) {
this.deleteData = data
this.deleteVisible = true
},
//
handleDeltConfirm() {
this.deleteVisible = false
const ids = []
this.deleteData.forEach(val => {
ids.push(val.id)
})
const params = {
'ids': ids,
'categoryId': this.categoryId
}
// fetch
FetchDeleteFile(params).then(res => {
this.crud.delAllLoading = false
this.$message.success('删除成功!')
this.crud.refresh()
this.getFileList()
})
},
// -
rowDrop(className, targetName) {
//
const tbody = document.querySelector('.' + className + ' .el-table__body-wrapper tbody')
const that = this
Sortable.create(tbody, {
//
draggable: '.el-table__row',
onEnd({ newIndex, oldIndex }) {
if (newIndex === oldIndex) return
that[targetName].splice(newIndex, 0, that[targetName].splice(oldIndex, 1)[0])
}
})
},
//
opened() {
this.rowDrop('file-sort', 'sortTableData')
},
showSort() {
this.sortVisible = true
this.sortTableData = JSON.parse(JSON.stringify(this.tableData))
},
// -
handleSort() {
const ids = []
const sequences = []
this.sortTableData.map((value, index) => {
ids.push(value.id)
sequences.push(index + 1)
})
const params = {
'categoryId': this.categoryId,
'ids': ids,
'sequences': sequences
}
FetchFileSort(params).then((res) => {
this.sortVisible = false
this.$message.success('附件排序成功!')
this.crud.refresh()
this.getFileList()
})
},
// table
clickRowHandler(row) {
this.$refs.table.toggleRowSelection(row)
},
// table
selectionChangeHandler(val) {
this.selections = val
},
// dialog - close
handleClose(done) {
this.showCoverVisible = false
done()
},
//
showCoverPreview(row) {
this.showCoverVisible = true
this.previewSrc = this.baseApi + '/downloadFile' + row.file_path
}
}
}
</script>
<style lang="scss" scoped>
.svg-style{
width: 60px;
height: 32px;
}
</style>

103
src/views/system/processManage/runningProcess/module/approvalList/index.vue

@ -1,23 +1,16 @@
<template> <template>
<el-table
:data="tableData"
style="width: 100%"
>
<el-table-column
prop="date"
label="日期"
width="180"
/>
<el-table-column
prop="name"
label="姓名"
width="180"
/>
<el-table-column
prop="address"
label="地址"
/>
<div>
<el-table :data="tableData" style="width: 100%" height="300">
<el-table-column type="index" align="center" width="55" />
<el-table-column prop="name" label="任务名称" />
<el-table-column prop="approver" label="审批人" />
<el-table-column prop="state" label="审批结果" />
<el-table-column prop="opinion" label="审批意见" />
<el-table-column prop="endDate" label="审批时间" />
</el-table> </el-table>
<!-- @size-change="sizeChangeHandler($event)" @current-change="pageChangeHandler" -->
<el-pagination :page-size.sync="page.size" :total="page.total" :current-page.sync="page.page" style="margin-top: 8px;" layout="total, prev, pager, next, sizes" />
</div>
</template> </template>
<script> <script>
@ -25,28 +18,78 @@
export default { export default {
data() { data() {
return { return {
page: {
total: 0,
size: 10,
page: 1
},
tableData: [{ tableData: [{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
state: 1,
name: '任务A',
approver: 'admin',
opinion: '-',
endDate: '2022-10-02 10:23:54'
}, { }, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄'
state: 1,
name: '任务A',
approver: 'admin',
opinion: '-',
endDate: '2022-10-02 10:23:54'
}, { }, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄'
state: 1,
name: '任务A',
approver: 'admin',
opinion: '-',
endDate: '2022-10-02 10:23:54'
}, { }, {
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄'
state: 1,
name: '任务A',
approver: 'admin',
opinion: '-',
endDate: '2022-10-02 10:23:54'
}] }]
} }
},
methods: {
//
sizeChangeHandler(e) {
this.loading = true
this.page.size = e
this.page.page = 1
this.params.size = e
this.params.page = 0
// this.doQuery(this.params)
this.loading = false
},
//
pageChangeHandler(e) {
this.loading = true
this.page.page = e
this.params.page = e - 1
// this.doQuery(this.params)
this.loading = false
}
} }
} }
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.process-state{
width: 48px;
height: 22px;
margin: 0 auto;
font-size: 12px;
text-align: center;
line-height: 22px;
color: #2ECAAC;
border-radius: 3px;
border: 1px solid #B1EBDF;
background-color: #E8F8F5;
&.ing-state{
color: #0348F3;
border-color: #90B0F9;
background-color: #EEF5FE;
}
}
</style> </style>

107
src/views/system/processManage/runningProcess/module/businessDetails/index.vue

@ -1,48 +1,93 @@
<template> <template>
<el-table
:data="tableData"
style="width: 100%"
>
<el-table-column
prop="date"
label="日期"
width="180"
/>
<el-table-column
prop="name"
label="姓名"
width="180"
/>
<el-table-column
prop="address"
label="地址"
/>
<div>
<el-table :data="tableData" style="width: 100%" height="300" @cell-dblclick="tableDoubleClick">
<el-table-column type="selection" align="center" width="55" />
<el-table-column prop="groups" label="所属全宗" />
<el-table-column prop="name" label="门类名称" />
<el-table-column prop="type" label="整理方式" />
<el-table-column prop="number" label="项目号/档号" />
<el-table-column prop="title" label="题名" :show-overflow-tooltip="true" />
</el-table> </el-table>
<!-- @size-change="sizeChangeHandler($event)" @current-change="pageChangeHandler" -->
<el-pagination :page-size.sync="page.size" :total="page.total" :current-page.sync="page.page" style="margin-top: 8px;" layout="total, prev, pager, next, sizes" />
<Detail ref="archivesDetail" />
</div>
</template> </template>
<script> <script>
import Detail from '@/views/components/archivesDetail/index.vue'
export default { export default {
name: 'BusinessDetails',
components: { Detail },
data() { data() {
return { return {
page: {
total: 0,
size: 10,
page: 1
},
tableData: [{ tableData: [{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
groups: '全宗A',
name: '文书档案(文件)',
type: '按件整理',
number: 'DAS-Y-2020-001',
title: '人事劳资文件级文书档案'
}, {
groups: '全宗A',
name: '文书档案(文件)',
type: '按件整理',
number: 'DAS-Y-2020-001',
title: '人事劳资文件级文书档案'
}, { }, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄'
groups: '全宗A',
name: '文书档案(文件)',
type: '按件整理',
number: 'DAS-Y-2020-001',
title: '人事劳资文件级文书档案'
}, { }, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄'
groups: '全宗A',
name: '文书档案(文件)',
type: '按件整理',
number: 'DAS-Y-2020-001',
title: '人事劳资文件级文书档案'
}, { }, {
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄'
groups: '全宗A',
name: '文书档案(文件)',
type: '按件整理',
number: 'DAS-Y-2020-001',
title: '人事劳资文件级文书档案'
}, {
groups: '全宗A',
name: '文书档案(文件)',
type: '按件整理',
number: 'DAS-Y-2020-001',
title: '人事劳资文件级文书档案'
}] }]
} }
},
methods: {
// table -
tableDoubleClick(row) {
this.$refs.archivesDetail.archivesInfoVisible = true
},
//
sizeChangeHandler(e) {
this.loading = true
this.page.size = e
this.page.page = 1
this.params.size = e
this.params.page = 0
// this.doQuery(this.params)
this.loading = false
},
//
pageChangeHandler(e) {
this.loading = true
this.page.page = e
this.params.page = e - 1
// this.doQuery(this.params)
this.loading = false
}
} }
} }

21
src/views/system/processManage/runningProcess/module/detail.vue

@ -1,5 +1,5 @@
<template> <template>
<el-dialog class="detail-dialog" :visible.sync="detailVisible" :modal-append-to-body="false" :close-on-click-modal="false" title="流程详情">
<el-dialog class="detail-dialog" :visible.sync="detailVisible" :modal-append-to-body="false" :close-on-click-modal="false" append-to-body title="流程详情">
<div class="setting-dialog"> <div class="setting-dialog">
<div class="detail-info"> <div class="detail-info">
<p><span>流程名称</span>01-归档审批流程</p> <p><span>流程名称</span>01-归档审批流程</p>
@ -25,12 +25,12 @@
</div> </div>
</div> </div>
</el-collapse-transition> </el-collapse-transition>
<div class="detail-tab">
<div class="detail-tab tab-content">
<ul class="tab-nav"> <ul class="tab-nav">
<li :class="{ 'active-tab-nav': activeIndex == 0 }" @click="changeActiveTab(0)">流程示意图</li>
<li :class="{ 'active-tab-nav': activeIndex == 1 }" @click="changeActiveTab(1)">业务详情</li>
<li :class="{ 'active-tab-nav': activeIndex == 2 }" @click="changeActiveTab(2)">任务列表</li>
<li :class="{ 'active-tab-nav': activeIndex == 3 }" @click="changeActiveTab(3)">审批列表</li>
<li :class="{'active-tab-nav': activeIndex == 0 }" @click="changeActiveTab(0)">流程示意图</li>
<li :class="{'active-tab-nav': activeIndex == 1 }" @click="changeActiveTab(1)">业务详情</li>
<li :class="{'active-tab-nav': activeIndex == 2 }" @click="changeActiveTab(2)">任务列表</li>
<li :class="{'active-tab-nav': activeIndex == 3 }" @click="changeActiveTab(3)">审批列表</li>
</ul> </ul>
<component :is="comName" class="component-cont" /> <component :is="comName" class="component-cont" />
</div> </div>
@ -160,13 +160,8 @@ export default {
} }
} }
} }
.tab-nav{
margin: 25px 0 18px 0;
}
.component-cont{
max-height: 344px;
overflow: hidden;
overflow-y: scroll;
::v-deep .el-pagination{
margin: 20px 0 10px 0 !important;
} }
} }
</style> </style>

3
src/views/system/processManage/runningProcess/module/processImg/index.vue

@ -9,6 +9,9 @@
<style lang='scss' scoped> <style lang='scss' scoped>
.tab-img{ .tab-img{
max-height: 344px;
overflow: hidden;
overflow-y: scroll;
img{ img{
display: block; display: block;
width: 100%; width: 100%;

106
src/views/system/processManage/runningProcess/module/taskList/index.vue

@ -1,23 +1,19 @@
<template> <template>
<el-table
:data="tableData"
style="width: 100%"
>
<el-table-column
prop="date"
label="日期"
width="180"
/>
<el-table-column
prop="name"
label="姓名"
width="180"
/>
<el-table-column
prop="address"
label="地址"
/>
<div>
<el-table :data="tableData" style="width: 100%" height="300">
<el-table-column prop="state" label="状态" align="center" width="90px">
<template slot-scope="scope">
<div :class="scope.row.state ? 'process-state' :'process-state ing-state'">{{ scope.row.state ? '已完成':'进行中' }}</div>
</template>
</el-table-column>
<el-table-column prop="name" label="任务名称" />
<el-table-column prop="operator" label="执行人" />
<el-table-column prop="createDate" label="创建时间" />
<el-table-column prop="endDate" label="完成时间" />
</el-table> </el-table>
<!-- @size-change="sizeChangeHandler($event)" @current-change="pageChangeHandler" -->
<el-pagination :page-size.sync="page.size" :total="page.total" :current-page.sync="page.page" style="margin-top: 8px;" layout="total, prev, pager, next, sizes" />
</div>
</template> </template>
<script> <script>
@ -25,28 +21,78 @@
export default { export default {
data() { data() {
return { return {
page: {
total: 0,
size: 10,
page: 1
},
tableData: [{ tableData: [{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
state: 1,
name: '入管理库流程',
operator: 'admin',
createDate: '2022-10-01 10:23:54',
endDate: '2022-10-02 10:23:54'
}, { }, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄'
state: 1,
name: '入管理库流程',
operator: 'admin',
createDate: '2022-10-01 10:23:54',
endDate: '2022-10-02 10:23:54'
}, { }, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄'
state: 1,
name: '入管理库流程',
operator: 'admin',
createDate: '2022-10-01 10:23:54',
endDate: '2022-10-02 10:23:54'
}, { }, {
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄'
state: 0,
name: '入管理库流程',
operator: 'admin',
createDate: '2022-10-01 10:23:54',
endDate: '-'
}] }]
} }
},
methods: {
//
sizeChangeHandler(e) {
this.loading = true
this.page.size = e
this.page.page = 1
this.params.size = e
this.params.page = 0
// this.doQuery(this.params)
this.loading = false
},
//
pageChangeHandler(e) {
this.loading = true
this.page.page = e
this.params.page = e - 1
// this.doQuery(this.params)
this.loading = false
}
} }
} }
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.process-state{
width: 48px;
height: 22px;
margin: 0 auto;
font-size: 12px;
text-align: center;
line-height: 22px;
color: #2ECAAC;
border-radius: 3px;
border: 1px solid #B1EBDF;
background-color: #E8F8F5;
&.ing-state{
color: #0348F3;
border-color: #90B0F9;
background-color: #EEF5FE;
}
}
</style> </style>
Loading…
Cancel
Save