Browse Source

操作记录

dev
kilo 2 years ago
parent
commit
e999ba77db
  1. 57
      src/views/dashboard/HomePage.vue
  2. 136
      src/views/operationlog/ProcessOperationLogList.vue
  3. 151
      src/views/operationlog/modules/ProcessOperationLogForm.vue
  4. 60
      src/views/operationlog/modules/ProcessOperationLogModal.vue
  5. 83
      src/views/operationlog/modules/ProcessOperationLogModal__Style#Drawer.vue

57
src/views/dashboard/HomePage.vue

@ -5,7 +5,7 @@
<div style="display: flex;align-items: center;justify-content: stretch;width: 100%;height: 50%">
<!--待办任务-->
<div class="top-div ant-col-md-7">
<div class="top-div" style="width: 33%;">
<a-card class="div-card" title="待办" style="overflow: hidden" >
<ul class="ul-li" style="width: 100%; list-style-type:none;padding-left: 0px;" v-show="showDate.showDate">
<!--这里可以用for循环-->
@ -26,13 +26,13 @@
</div>
<!--站内消息-->
<div class="top-div ant-col-md-9" style="margin: 0 2%;">
<div class="top-div" style="width: 33%; margin: 0 0.5%;">
<a-card class="div-card" title="站内消息" style="overflow: hidden">
</a-card>
</div>
<!--登录日志-->
<div class="top-div ant-col-md-7">
<div class="top-div" style="width: 33%;">
<a-card class="div-card" title="登录日志" style="overflow: hidden">
<ul class="ul-li" style="list-style-type:none;padding-left: 0px;">
<!--这里可以用for循环-->
@ -61,52 +61,21 @@
<li @click='processManage' class="ant-col-md-4">
<i class="iconfont icon-lianxiren1-copy" style="font-size: 35px;"></i> &nbsp;&nbsp;&nbsp;流程管理
</li>
<li @click='processManage' class="ant-col-md-4">
<i class="iconfont icon-lianxiren1-copy" style="font-size: 35px;"></i> &nbsp;&nbsp;&nbsp;流程管理
</li>
<li @click='processManage' class="ant-col-md-4">
<i class="iconfont icon-lianxiren1-copy" style="font-size: 35px;"></i> &nbsp;&nbsp;&nbsp;流程管理
</li>
<li @click='processManage' class="ant-col-md-4">
<i class="iconfont icon-lianxiren1-copy" style="font-size: 35px;"></i> &nbsp;&nbsp;&nbsp;流程管理
</li>
<li @click='processManage' class="ant-col-md-4">
<i class="iconfont icon-lianxiren1-copy" style="font-size: 35px;"></i> &nbsp;&nbsp;&nbsp;流程管理
</li>
<li @click='processManage' class="ant-col-md-4">
<i class="iconfont icon-lianxiren1-copy" style="font-size: 35px;"></i> &nbsp;&nbsp;&nbsp;流程管理
<li @click='materialManage' class="ant-col-md-4">
<i class="iconfont icon-lianxiren1-copy" style="font-size: 35px;"></i> &nbsp;&nbsp;&nbsp;物资管理
</li>
<li @click='processManage' class="ant-col-md-4">
<i class="iconfont icon-lianxiren1-copy" style="font-size: 35px;"></i> &nbsp;&nbsp;&nbsp;流程管理
<li @click='statisticalAnalysis' class="ant-col-md-4">
<i class="iconfont icon-lianxiren1-copy" style="font-size: 35px;"></i> &nbsp;&nbsp;&nbsp;统计分析
</li>
<li @click='processManage' class="ant-col-md-4">
<i class="iconfont icon-lianxiren1-copy" style="font-size: 35px;"></i> &nbsp;&nbsp;&nbsp;流程管理
<li @click='dictionaryLibrary' class="ant-col-md-4">
<i class="iconfont icon-lianxiren1-copy" style="font-size: 35px;"></i> &nbsp;&nbsp;&nbsp;标准字典库
</li>
<li @click='processManage' class="ant-col-md-4">
<i class="iconfont icon-lianxiren1-copy" style="font-size: 35px;"></i> &nbsp;&nbsp;&nbsp;流程管理
<li @click='isystemManage' class="ant-col-md-4">
<i class="iconfont icon-lianxiren1-copy" style="font-size: 35px;"></i> &nbsp;&nbsp;&nbsp;系统管理
</li>
<li @click='processManage' class="ant-col-md-4">
<i class="iconfont icon-lianxiren1-copy" style="font-size: 35px;"></i> &nbsp;&nbsp;&nbsp;流程管理
<li @click='statisticalTreatment' class="ant-col-md-4">
<i class="iconfont icon-lianxiren1-copy" style="font-size: 35px;"></i> &nbsp;&nbsp;&nbsp;统计报表
</li>
<!-- <li @click='materialManage' style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">-->
<!-- <i class="iconfont icon-lianxiren1-copy" style="font-size: 35px;margin-right: 6%;"></i>物资管理-->
<!-- </li>-->
<!-- <li @click='statisticalAnalysis' style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">-->
<!-- <i class="iconfont icon-lianxiren1-copy" style="font-size: 35px;margin-right: 6%;"></i>统计分析-->
<!-- </li>-->
<!-- <li @click='dictionaryLibrary' style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">-->
<!-- <i class="iconfont icon-lianxiren1-copy" style="font-size: 35px;margin-right: 6%;"></i>标准字典库-->
<!-- </li>-->
<!-- <li @click='isystemManage' style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">-->
<!-- <i class="iconfont icon-lianxiren1-copy" style="font-size: 35px;margin-right: 6%;"></i>系统管理-->
<!-- </li>-->
<!-- <li @click='statisticalTreatment' style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">-->
<!-- <i class="iconfont icon-lianxiren1-copy" style="font-size: 35px;margin-right: 6%;"></i>统计报表-->
<!-- </li>-->
</ul>
</a-card>
</div>

136
src/views/operationlog/ProcessOperationLogList.vue

@ -0,0 +1,136 @@
<template>
<a-card :bordered="false">
<div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
</a-table>
</div>
<process-operation-log-modal ref="modalForm" @ok="modalFormOk"></process-operation-log-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ProcessOperationLogModal from './modules/ProcessOperationLogModal'
import JSuperQuery from '@/components/jeecg/JSuperQuery.vue'
export default {
name: 'ProcessOperationLogList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ProcessOperationLogModal,
JSuperQuery,
},
data () {
return {
description: '流程操作记录',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'操作人',
align:"center",
dataIndex: 'operator'
},
{
title:'行为',
align:"center",
dataIndex: 'behavior'
},
{
title:'操作时间',
align:"center",
dataIndex: 'operationDate',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/processoperationlog/processOperationLog/list",
delete: "/processoperationlog/processOperationLog/delete",
deleteBatch: "/processoperationlog/processOperationLog/deleteBatch",
exportXlsUrl: "/processoperationlog/processOperationLog/exportXls",
importExcelUrl: "processoperationlog/processOperationLog/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'operator',text:'操作人',dictCode:''})
fieldList.push({type:'string',value:'behavior',text:'行为',dictCode:''})
fieldList.push({type:'date',value:'operationDate',text:'操作时间'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

151
src/views/operationlog/modules/ProcessOperationLogForm.vue

@ -0,0 +1,151 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form :form="form" slot="detail">
<a-row>
<a-col v-if="showFlowSubmitButton" :span="24" style="text-align: center">
<a-button @click="submitForm"> </a-button>
</a-col>
</a-row>
</a-form>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import pick from 'lodash.pick'
import { validateDuplicateValue } from '@/utils/util'
import JFormContainer from '@/components/jeecg/JFormContainer'
export default {
name: 'ProcessOperationLogForm',
components: {
JFormContainer,
},
props: {
//data
formData: {
type: Object,
default: ()=>{},
required: false
},
//true false
formBpm: {
type: Boolean,
default: false,
required: false
},
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
form: this.$form.createForm(this),
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/processoperationlog/processOperationLog/add",
edit: "/processoperationlog/processOperationLog/edit",
queryById: "/processoperationlog/processOperationLog/queryById"
}
}
},
computed: {
formDisabled(){
if(this.formBpm===true){
if(this.formData.disabled===false){
return false
}
return true
}
return this.disabled
},
showFlowSubmitButton(){
if(this.formBpm===true){
if(this.formData.disabled===false){
return true
}
}
return false
}
},
created () {
//data
this.showFlowData();
},
methods: {
add () {
this.edit({});
},
edit (record) {
this.form.resetFields();
this.model = Object.assign({}, record);
this.visible = true;
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'operator','behavior','operationDate'))
})
},
//
showFlowData(){
if(this.formBpm === true){
let params = {id:this.formData.dataId};
getAction(this.url.queryById,params).then((res)=>{
if(res.success){
this.edit (res.result);
}
});
}
},
submitForm () {
const that = this;
//
this.form.validateFields((err, values) => {
if (!err) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
let formData = Object.assign(this.model, values);
console.log("表单提交数据",formData)
httpAction(httpurl,formData,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
popupCallback(row){
this.form.setFieldsValue(pick(row,'operator','behavior','operationDate'))
},
}
}
</script>

60
src/views/operationlog/modules/ProcessOperationLogModal.vue

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<process-operation-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></process-operation-log-form>
</j-modal>
</template>
<script>
import ProcessOperationLogForm from './ProcessOperationLogForm'
export default {
name: 'ProcessOperationLogModal',
components: {
ProcessOperationLogForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

83
src/views/operationlog/modules/ProcessOperationLogModal__Style#Drawer.vue

@ -0,0 +1,83 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
:visible="visible">
<process-operation-log-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></process-operation-log-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import ProcessOperationLogForm from './ProcessOperationLogForm'
export default {
name: 'ProcessOperationLogModal',
components: {
ProcessOperationLogForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>
Loading…
Cancel
Save