[update] 工作组变更--文件维护
This commit is contained in:
@@ -0,0 +1,161 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<page-header-title level-two-title="工作组资料维护" :is-level-one="false"></page-header-title>
|
||||||
|
<a-card :bordered="false">
|
||||||
|
<!-- 查询区域-start -->
|
||||||
|
<div class="table-page-search-wrapper">
|
||||||
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
|
<a-row>
|
||||||
|
<a-col :xxl="4" :xl="10" :lg="12" :md="12" :sm="24">
|
||||||
|
<a-form-item label="文件名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入文件名称" v-model="queryParam.workGroup"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<span class="table-page-search-submitButtons">
|
||||||
|
<a-button type="primary" icon="search" @click="searchQuery">查询</a-button>
|
||||||
|
<a-button icon="reload" @click="searchReset" class="reset-button">重置</a-button>
|
||||||
|
</span>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
<!-- /查询区域-end-->
|
||||||
|
|
||||||
|
<!-- 操作按钮区域-->
|
||||||
|
<div class="table-operator">
|
||||||
|
<a-button type="primary" icon="plus" @click="handleAdd">上传</a-button>
|
||||||
|
<a-button type="danger" icon="delete" @click="batchDel">批量删除</a-button>
|
||||||
|
<a-button type="primary" @click="batchDistribute">批量分发</a-button>
|
||||||
|
<a-button type="primary" icon="export" @click="handleExportXls('工作组来款统计')">导出</a-button>
|
||||||
|
</div>
|
||||||
|
<!-- 操作按钮区域-end-->
|
||||||
|
|
||||||
|
<!-- table表格区域-->
|
||||||
|
<div>
|
||||||
|
<a-table
|
||||||
|
size="middle"
|
||||||
|
ref="table"
|
||||||
|
bordered
|
||||||
|
rowKey="id"
|
||||||
|
:columns="columns"
|
||||||
|
:dataSource="dataSource"
|
||||||
|
:pagination="ipagination"
|
||||||
|
:loading="loading"
|
||||||
|
:scroll="{x: 1100}"
|
||||||
|
@change="handleTableChange"
|
||||||
|
class="j-table-force-nowrap main-table">
|
||||||
|
|
||||||
|
<!-- 项目名称-->
|
||||||
|
<template slot="projectName" slot-scope="text, record">
|
||||||
|
<j-ellipsis :value="text" :length="18" class="primary-color"
|
||||||
|
@click="openDetailModal(record)"></j-ellipsis>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template slot="text" slot-scope="text">
|
||||||
|
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||||
|
<a @click="handleEdit(record)">编辑</a>
|
||||||
|
<a @click="handleDistribute(record)">分发</a>
|
||||||
|
<a @click="handleDelete(record.id)">删除</a>
|
||||||
|
</span>
|
||||||
|
</a-table>
|
||||||
|
</div>
|
||||||
|
</a-card>
|
||||||
|
|
||||||
|
<work-group-file-upload-modal ref="modalForm" @ok="modalFormOk"></work-group-file-upload-modal>
|
||||||
|
<work-group-distribute-module ref="distributeModal" @ok="modalFormOk"></work-group-distribute-module>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { JeroListMixin } from '../../mixins/JeroListMixin'
|
||||||
|
import PageHeaderTitle from '../../components/layouts/PageHeaderTitle'
|
||||||
|
import WorkGroupFileUploadModal from './modules/WorkGroupFileUploadModal'
|
||||||
|
import WorkGroupDistributeModule from './modules/WorkGroupDistributeModule'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'WorkingGroupProjectDataMaintenance',
|
||||||
|
components: { PageHeaderTitle, WorkGroupFileUploadModal, WorkGroupDistributeModule },
|
||||||
|
mixins: [JeroListMixin],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 5 }
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 10 }
|
||||||
|
},
|
||||||
|
url: {
|
||||||
|
list: '',
|
||||||
|
exportXlsUrl: '',
|
||||||
|
delete: '',
|
||||||
|
deleteBatch: ''
|
||||||
|
},
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
dataIndex: '',
|
||||||
|
key: 'rowIndex',
|
||||||
|
width: 100,
|
||||||
|
align: 'center',
|
||||||
|
customRender: function (t, r, index) {
|
||||||
|
return parseInt(index) + 1
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
title: '文件名称',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'workGroup',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
}, {
|
||||||
|
title: '下载次数',
|
||||||
|
align: 'center',
|
||||||
|
width: 160,
|
||||||
|
dataIndex: 'allMoney',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
}, {
|
||||||
|
title: '上传时间',
|
||||||
|
align: 'center',
|
||||||
|
width: 160,
|
||||||
|
dataIndex: 'comeAllMoney',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
}, {
|
||||||
|
title: '上传人',
|
||||||
|
align: 'center',
|
||||||
|
width: 160,
|
||||||
|
dataIndex: 'moneyRate',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
}, {
|
||||||
|
title: '操作',
|
||||||
|
dataIndex: 'action',
|
||||||
|
align: 'center',
|
||||||
|
fixed: 'right',
|
||||||
|
width: 160,
|
||||||
|
scopedSlots: { customRender: 'action' }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 批量分发
|
||||||
|
*/
|
||||||
|
batchDistribute() {
|
||||||
|
this.$refs.distributeModal.edit()
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 分发
|
||||||
|
*/
|
||||||
|
handleDistribute() {
|
||||||
|
this.$refs.distributeModal.edit()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
@import '~@assets/less/common.less';
|
||||||
|
</style>
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
bordered
|
bordered
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:scroll="{x: 1000}"
|
:scroll="{x: 1200}"
|
||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:pagination="ipagination"
|
:pagination="ipagination"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@@ -91,10 +91,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||||
<a @click="goConferenceMaintenance(record)">会议维护</a>
|
<a @click="goFilesMaintenance(record)">文件维护</a>
|
||||||
<a @click="handleEdit(record)">编辑</a>
|
<a @click="goConferenceMaintenance(record)">会议维护</a>
|
||||||
<a @click="handleDelete(record.id)">删除</a>
|
<a @click="copyWorkGroup(record)">复制</a>
|
||||||
</span>
|
<a @click="handleEdit(record)">编辑</a>
|
||||||
|
<a @click="handleDelete(record.id)">删除</a>
|
||||||
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
</div>
|
</div>
|
||||||
<!-- /table表格区域-->
|
<!-- /table表格区域-->
|
||||||
@@ -162,13 +164,23 @@ export default {
|
|||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
width: 180,
|
width: 300,
|
||||||
scopedSlots: { customRender: 'action' }
|
scopedSlots: { customRender: 'action' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/**
|
||||||
|
* 文件维护
|
||||||
|
* @param record
|
||||||
|
*/
|
||||||
|
goFilesMaintenance(record) {
|
||||||
|
console.log(record)
|
||||||
|
this.$router.push({
|
||||||
|
path: '/projectManagement/WorkingGroupProjectDataMaintenance'
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 会议维护
|
* 会议维护
|
||||||
* @param record
|
* @param record
|
||||||
@@ -182,6 +194,10 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 成员维护
|
||||||
|
* @param record
|
||||||
|
*/
|
||||||
goMemberUnitMaintenance(record) {
|
goMemberUnitMaintenance(record) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/projectManagement/WorkingGroupMemberUnitMaintenance',
|
path: '/projectManagement/WorkingGroupMemberUnitMaintenance',
|
||||||
|
|||||||
@@ -0,0 +1,163 @@
|
|||||||
|
<template>
|
||||||
|
<j-modal
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
:visible="visible"
|
||||||
|
:confirmLoading="confirmLoading"
|
||||||
|
switchFullscreen
|
||||||
|
@ok="handleOk"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
cancelText="关闭">
|
||||||
|
<a-spin :spinning="confirmLoading">
|
||||||
|
<a-form :form="form">
|
||||||
|
<a-row>
|
||||||
|
<a-col>
|
||||||
|
<a-form-item label="文件" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-upload :return-id="true"
|
||||||
|
class="no-upload"
|
||||||
|
v-decorator="['dataId', validatorRules.dataId]"
|
||||||
|
:trigger-change="true"></j-upload>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="2"></a-col>
|
||||||
|
<a-col :span="20">
|
||||||
|
<a-form-item label="成员单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-tree
|
||||||
|
:expanded-keys="['0-0']"
|
||||||
|
:tree-data="memberList"
|
||||||
|
:replaceFields="replaceFields"
|
||||||
|
checkable
|
||||||
|
@check="onCheck"/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="4"></a-col>
|
||||||
|
<a-col :span="20">
|
||||||
|
<a-form-item class="choose-member">
|
||||||
|
<a-input v-decorator="['memberName', validatorRules.memberName]"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</a-spin>
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import pick from 'lodash.pick'
|
||||||
|
import { getAction } from '@api/manage'
|
||||||
|
import JUpload from '@comp/jero/JUpload'
|
||||||
|
export default {
|
||||||
|
name: 'WorkGroupDistributeModule',
|
||||||
|
components: { JUpload },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '分发',
|
||||||
|
width: 500,
|
||||||
|
visible: false,
|
||||||
|
confirmLoading: false,
|
||||||
|
form: this.$form.createForm(this),
|
||||||
|
model: {},
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 5 }
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 17 }
|
||||||
|
},
|
||||||
|
memberList: [], // 成员树
|
||||||
|
checkedKeys: [], // 已选中的成员数组
|
||||||
|
businessSelectedRowKeys: [],
|
||||||
|
replaceFields: {
|
||||||
|
children: 'children',
|
||||||
|
title: 'contactsName',
|
||||||
|
value: 'id',
|
||||||
|
key: 'id'
|
||||||
|
},
|
||||||
|
validatorRules: {
|
||||||
|
dataId: {
|
||||||
|
rules: [{ required: true, message: '请重新上传文件' }],
|
||||||
|
validateTrigger: 'change'
|
||||||
|
},
|
||||||
|
memberName: {
|
||||||
|
rules: [{ required: true, message: '请选择成员' }],
|
||||||
|
validateTrigger: 'blur, change'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
url: {
|
||||||
|
memberList: '', // 成员单位列表
|
||||||
|
distribute: '', // 分发
|
||||||
|
distributeBatch: '' // 批量分发
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
select(value) {
|
||||||
|
// 群组value===id去获取成员数据
|
||||||
|
if (value) {
|
||||||
|
getAction(this.url.memberList, { id: value }).then(res=>{
|
||||||
|
if (res.success) {
|
||||||
|
let tempArr = JSON.parse(JSON.stringify(res.result))
|
||||||
|
this.memberList = [ { contactsName: '全选', children: [...tempArr] }]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onCheck(checkedKeys) {
|
||||||
|
this.checkedKeys = checkedKeys
|
||||||
|
},
|
||||||
|
edit(record) {
|
||||||
|
this.form.resetFields()
|
||||||
|
console.log(record)
|
||||||
|
this.model = Object.assign({}, record)
|
||||||
|
this.visible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue(pick(this.model, 'dataId' ))
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.$emit('close')
|
||||||
|
this.visible = false
|
||||||
|
this.memberList = []
|
||||||
|
},
|
||||||
|
handleOk() {
|
||||||
|
let arr = JSON.parse(JSON.stringify(this.checkedKeys))
|
||||||
|
this.model = Object.assign(this.model, {memberName: arr.toString()})
|
||||||
|
this.form.setFieldsValue({memberName: arr.toString()})
|
||||||
|
// 触发表单验证
|
||||||
|
this.form.validateFields((err, values) => {
|
||||||
|
if (!err) {
|
||||||
|
console.log(values)
|
||||||
|
// 请求分发,或者批量分发接口
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.no-upload{
|
||||||
|
/deep/.ant-upload-select-text{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/deep/.ant-form-explain{
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
/deep/.ant-checkbox-group{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.choose-member{
|
||||||
|
/deep/#memberName{
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
<template>
|
||||||
|
<j-modal
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
:visible="visible"
|
||||||
|
:confirmLoading="confirmLoading"
|
||||||
|
switchFullscreen
|
||||||
|
@ok="handleOk"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
cancelText="关闭">
|
||||||
|
<a-spin :spinning="confirmLoading">
|
||||||
|
<a-form :form="form">
|
||||||
|
<a-row>
|
||||||
|
<a-col>
|
||||||
|
<a-form-item label="文件" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-upload file-type="all"
|
||||||
|
file-type-error-message="请上传文件"
|
||||||
|
:multiple="true"
|
||||||
|
:number="10"
|
||||||
|
:return-id="true"
|
||||||
|
v-decorator="['dataId', validatorRules.dataId]"
|
||||||
|
:trigger-change="true"></j-upload>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</a-spin>
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import pick from 'lodash.pick'
|
||||||
|
import { getAction } from '@api/manage'
|
||||||
|
import JUpload from '@comp/jero/JUpload'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'WorkGroupFileUploadModal',
|
||||||
|
components: { JUpload },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '编辑',
|
||||||
|
width: 800,
|
||||||
|
visible: false,
|
||||||
|
confirmLoading: false,
|
||||||
|
form: this.$form.createForm(this),
|
||||||
|
model: {},
|
||||||
|
fileList: [],
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 5 }
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 17 }
|
||||||
|
},
|
||||||
|
validatorRules: {
|
||||||
|
dataId: {
|
||||||
|
rules: [{ required: true, message: '请上传文件' }],
|
||||||
|
validateTrigger: 'change'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
url: {
|
||||||
|
add: '', // 资料和会议的添加 post
|
||||||
|
edit: '', // 资料和会议的编辑 post
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created(){
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add(data) {
|
||||||
|
this.edit({}, data)
|
||||||
|
},
|
||||||
|
edit(record, data) {
|
||||||
|
this.dataType = data // 接收数据类型
|
||||||
|
this.form.resetFields()
|
||||||
|
this.model = Object.assign({}, record)
|
||||||
|
this.visible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue(pick(this.model, 'dataId' ))
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.$emit('close')
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
handleOk() {
|
||||||
|
const that = this
|
||||||
|
// 触发表单验证
|
||||||
|
this.form.validateFields((err, values) => {
|
||||||
|
if (!err) {
|
||||||
|
console.log(values)
|
||||||
|
let httpurl = ''
|
||||||
|
let params = {}
|
||||||
|
if (!this.model.keyId) {
|
||||||
|
httpurl += this.url.add
|
||||||
|
params = {
|
||||||
|
dataId: values.fileId, // 目录id
|
||||||
|
dataType: this.dataType, // 上传类型
|
||||||
|
fileIds: values.dataId // 资料id
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
httpurl += this.url.edit
|
||||||
|
params = {
|
||||||
|
dataId: values.fileId, // 目录id
|
||||||
|
dataType: this.dataType, // 上传类型
|
||||||
|
fileIds: values.dataId, // 资料id
|
||||||
|
keyId: this.record.keyId, // 主键id
|
||||||
|
oldFileId: this.record.dataId // 旧文件id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
getAction(httpurl, params).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
that.$message.success(res.message)
|
||||||
|
that.$emit('ok')
|
||||||
|
that.close()
|
||||||
|
} else {
|
||||||
|
that.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
that.confirmLoading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user