资料维护
This commit is contained in:
@@ -34,11 +34,19 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col v-if="!isData" :xl="8" :lg="24" :md="24" :sm="24">
|
<a-col v-if="!isData" :xl="8" :lg="24" :md="24" :sm="24">
|
||||||
<a-form-item label="会议时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="会议时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-range-picker
|
<j-date
|
||||||
format="YYYY-MM-DD HH:mm"
|
format="YYYY-MM-DD"
|
||||||
:show-time="{ format: 'HH:mm:00' }"
|
placeholder="请选择开始日期"
|
||||||
v-model="queryParam.meetingTime"
|
class="query-group-cust"
|
||||||
:trigger-change="true"/>
|
v-model="queryParam.meetingStartTime">
|
||||||
|
</j-date>
|
||||||
|
<span class="query-group-split-cust"></span>
|
||||||
|
<j-date
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
placeholder="请选择结束日期"
|
||||||
|
class="query-group-cust"
|
||||||
|
v-model="queryParam.meetingEndTime">
|
||||||
|
</j-date>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
@@ -49,10 +57,10 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<div class="table-page-search-submitButtons">
|
<div class="table-page-search-submitButtons">
|
||||||
<a-button type="primary" icon="download" class="opera-btn">上传</a-button>
|
<a-button type="primary" icon="download" class="opera-btn" @click="handleAdd()">上传</a-button>
|
||||||
<a-button icon="delete" type="danger" class="opera-btn" @click="batchDel">批量删除</a-button>
|
<a-button icon="delete" type="danger" class="opera-btn" @click="batchDel">批量删除</a-button>
|
||||||
<a-button icon="download" type="primary" class="opera-btn">批量分发</a-button>
|
<a-button icon="download" type="primary" class="opera-btn">批量分发</a-button>
|
||||||
<a-button icon="export" type="primary" class="opera-btn">导出</a-button>
|
<a-button icon="export" type="primary" class="opera-btn" @click="handleExportXls">导出</a-button>
|
||||||
</div>
|
</div>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -70,7 +78,7 @@
|
|||||||
>
|
>
|
||||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||||
<a-button @click="handleEdit(record)" type="primary" style="margin-right:10px">编辑</a-button>
|
<a-button @click="handleEdit(record)" type="primary" style="margin-right:10px">编辑</a-button>
|
||||||
<a-button type="primary" style="margin-right:10px">分发</a-button>
|
<a-button @click="distribute(record)" type="primary" style="margin-right:10px">分发</a-button>
|
||||||
<a-button @click="handleDelete(record.keyId, record.dataId)" type="danger">删除</a-button>
|
<a-button @click="handleDelete(record.keyId, record.dataId)" type="danger">删除</a-button>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
@@ -78,6 +86,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<maintenance-modal ref="modalForm" @ok="modalFormOk"></maintenance-modal>
|
<maintenance-modal ref="modalForm" @ok="modalFormOk"></maintenance-modal>
|
||||||
|
<distribute-modal ref="modalDistributeForm" @ok="modalDistributeFormOk"></distribute-modal>
|
||||||
</a-card>
|
</a-card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -87,10 +96,12 @@ import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
|||||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||||
import IconImg from '@/assets/imgs/icon/icon_committee.png'
|
import IconImg from '@/assets/imgs/icon/icon_committee.png'
|
||||||
import MaintenanceModal from './modules/MaintenanceModal'
|
import MaintenanceModal from './modules/MaintenanceModal'
|
||||||
|
import DistributeModal from './modules/DistributeModal'
|
||||||
|
import JDate from '@comp/tools/JDate'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DataMaintenance',
|
name: 'DataMaintenance',
|
||||||
components: { PageHeaderTitle, MaintenanceModal },
|
components: { PageHeaderTitle, MaintenanceModal, DistributeModal, JDate },
|
||||||
mixins: [JeroListMixin],
|
mixins: [JeroListMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -120,15 +131,13 @@ export default {
|
|||||||
sm: { span: 24 }
|
sm: { span: 24 }
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
add: 'payDataFile/payDataFile/add', // 资料和会议的添加 post
|
|
||||||
edit: 'payDataFile/payDataFile/edit', // 资料和会议的编辑 post
|
|
||||||
delete: 'payDataFile/payDataFile/delete', // 资料和会议通过id删除一项
|
delete: 'payDataFile/payDataFile/delete', // 资料和会议通过id删除一项
|
||||||
upload: 'payDataFile/payDataFile/addMeetingFile', // 资料和会议的上传
|
upload: 'payDataFile/payDataFile/addMeetingFile', // 资料和会议的上传
|
||||||
deleteBatch: 'payDataFile/payDataFile/deleteBatch', // 资料和会议批量删除
|
deleteBatch: 'payDataFile/payDataFile/deleteBatch', // 资料和会议批量删除
|
||||||
list: 'payDataFile/payDataFile/list', // 资料列表
|
list: 'payDataFile/payDataFile/list', // 资料列表
|
||||||
distribute: 'payDataFile/payDataFile/distribute', // 分发
|
distribute: 'payDataFile/payDataFile/distribute', // 分发
|
||||||
distributeBatch: 'payDataFile/payDataFile/distributes', // 批量分发
|
distributeBatch: 'payDataFile/payDataFile/distributes', // 批量分发
|
||||||
export: 'payDataFile/payDataFile/importFile', // 导出
|
exportXlsUrl: 'payDataFile/payDataFile/importFile', // 导出
|
||||||
treeList: 'payDataDirectory/payDataDirectory/tree', // 资料树
|
treeList: 'payDataDirectory/payDataDirectory/tree', // 资料树
|
||||||
treeMeetList: 'payDataDirectory/payDataDirectory/meetingTree' // 会议树
|
treeMeetList: 'payDataDirectory/payDataDirectory/meetingTree' // 会议树
|
||||||
},
|
},
|
||||||
@@ -158,7 +167,10 @@ export default {
|
|||||||
{
|
{
|
||||||
title: '下载次数',
|
title: '下载次数',
|
||||||
dataIndex: 'downLodeTime',
|
dataIndex: 'downLodeTime',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
customRender: function( text ) {
|
||||||
|
return text ? text + ' 次' : 0 + ' 次'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '上传时间',
|
title: '上传时间',
|
||||||
@@ -225,7 +237,10 @@ export default {
|
|||||||
{
|
{
|
||||||
title: '下载次数',
|
title: '下载次数',
|
||||||
dataIndex: 'downLodeTime',
|
dataIndex: 'downLodeTime',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
customRender: function( text ) {
|
||||||
|
return text ? text + ' 次' : 0 + ' 次'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '上传时间',
|
title: '上传时间',
|
||||||
@@ -272,9 +287,6 @@ export default {
|
|||||||
getAction(this.url.treeMeetList).then(res => {
|
getAction(this.url.treeMeetList).then(res => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.treeMeetData = res.result
|
this.treeMeetData = res.result
|
||||||
if (this.treeMeetData && this.treeMeetData.length){
|
|
||||||
this.filters.id = this.treeMeetData[0].id
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -286,6 +298,25 @@ export default {
|
|||||||
})
|
})
|
||||||
this.selectionRows = selectionRows
|
this.selectionRows = selectionRows
|
||||||
},
|
},
|
||||||
|
// 上传
|
||||||
|
handleAdd: function () {
|
||||||
|
const data = this.isData ? '1' : '2'
|
||||||
|
this.$refs.modalForm.add(data)
|
||||||
|
this.$refs.modalForm.title = '上传'
|
||||||
|
},
|
||||||
|
// 编辑
|
||||||
|
handleEdit: function (record) {
|
||||||
|
const data = this.isData ? '1' : '2'
|
||||||
|
this.$refs.modalForm.edit(record, data)
|
||||||
|
this.$refs.modalForm.title = '编辑'
|
||||||
|
this.$refs.modalForm.disableSubmit = false
|
||||||
|
},
|
||||||
|
// 分发
|
||||||
|
distribute(record) {
|
||||||
|
this.$refs.modalForm.edit(record)
|
||||||
|
this.$refs.modalForm.title = '分发'
|
||||||
|
},
|
||||||
|
modalDistributeFormOk() {},
|
||||||
// 批量删除
|
// 批量删除
|
||||||
batchDel: function () {
|
batchDel: function () {
|
||||||
if (!this.url.deleteBatch) {
|
if (!this.url.deleteBatch) {
|
||||||
|
|||||||
@@ -0,0 +1,166 @@
|
|||||||
|
<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">
|
||||||
|
<a-tree-select
|
||||||
|
v-decorator="['id', validatorRules.id]"
|
||||||
|
:replaceFields="replaceFields"
|
||||||
|
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
||||||
|
:tree-data="treeDataEdit"
|
||||||
|
placeholder="请选择目录名称"
|
||||||
|
@select="select"
|
||||||
|
>
|
||||||
|
</a-tree-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<a-row>
|
||||||
|
<a-col>
|
||||||
|
<a-form-item label="文件" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-upload file-type="all" file-type-error-message="请上传文件" :multiple="false" :number="10"
|
||||||
|
:return-id="true"
|
||||||
|
v-decorator="['file', validatorRules.fileId]"
|
||||||
|
: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, postAction } from '@api/manage'
|
||||||
|
import JUpload from '@comp/jero/JUpload'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'DistributeModal',
|
||||||
|
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 }
|
||||||
|
},
|
||||||
|
treeDataEdit: [],
|
||||||
|
replaceFields: {
|
||||||
|
children: 'children',
|
||||||
|
title: 'name',
|
||||||
|
value: 'id',
|
||||||
|
key: 'id'
|
||||||
|
},
|
||||||
|
validatorRules: {
|
||||||
|
id: {
|
||||||
|
rules: [{ required: true, message: '请选择目录名称' }],
|
||||||
|
validateTrigger: 'change'
|
||||||
|
},
|
||||||
|
fileId: {
|
||||||
|
rules: [{ required: true, message: '请上传文件' }],
|
||||||
|
validateTrigger: 'change'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
url: {
|
||||||
|
treeList: 'payDataDirectory/payDataDirectory/tree', // 资料树
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created(){
|
||||||
|
getAction(this.url.treeList).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.treeDataEdit = res.result
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
select(value, node) {
|
||||||
|
if (node.$children.length) { // 点击的是父节点
|
||||||
|
this.model.id = ''
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue(pick(this.model, 'id'))
|
||||||
|
})
|
||||||
|
console.log(this.form.getFieldValue('id'))
|
||||||
|
}
|
||||||
|
},
|
||||||
|
edit(record) {
|
||||||
|
this.form.resetFields()
|
||||||
|
this.model = Object.assign({}, record)
|
||||||
|
this.visible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue(pick(this.model, 'id', 'fileId'))
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.$emit('close')
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
handleOk() {
|
||||||
|
const that = this
|
||||||
|
// 触发表单验证
|
||||||
|
this.form.validateFields((err, values) => {
|
||||||
|
if (!err) {
|
||||||
|
let httpurl = ''
|
||||||
|
let params = {}
|
||||||
|
const formData = Object.assign(this.model, values)
|
||||||
|
if (!this.model.id) {
|
||||||
|
httpurl += this.url.add
|
||||||
|
params = {
|
||||||
|
dataId: this.oldFileId, // 目录id
|
||||||
|
dataType: this.dataType, // 上传类型
|
||||||
|
fileIds: values.file // 资料id
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
httpurl += this.url.edit
|
||||||
|
params = {
|
||||||
|
oldFileId: this.oldFileId,
|
||||||
|
fileId: values.file,
|
||||||
|
id: values.keyId // 主键id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log(values, '============')
|
||||||
|
console.log('表单提交数据', formData)
|
||||||
|
postAction(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>
|
||||||
@@ -13,21 +13,26 @@
|
|||||||
<a-row>
|
<a-row>
|
||||||
<a-col>
|
<a-col>
|
||||||
<a-form-item label="目录名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="目录名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-select placeholder="请选择目录名称"
|
<a-tree-select
|
||||||
v-decorator="['name',validatorRules.name]"
|
v-decorator="['fileId', validatorRules.fileId]"
|
||||||
:maxLength='50'></a-select>
|
:replaceFields="replaceFields"
|
||||||
|
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
||||||
|
:tree-data="treeDataEdit"
|
||||||
|
placeholder="请选择目录名称"
|
||||||
|
@select="select"
|
||||||
|
>
|
||||||
|
</a-tree-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col>
|
<a-col>
|
||||||
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="文件" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-textarea
|
<j-upload file-type="all" file-type-error-message="请上传文件" :multiple="false" :number="10"
|
||||||
placeholder="请输入备注"
|
:return-id="true"
|
||||||
v-decorator="['remarks']"
|
:fileList="fileList"
|
||||||
:auto-size="{ minRows: 3, maxRows: 6 }"
|
v-decorator="['dataId', validatorRules.dataId]"
|
||||||
:maxLength='200'
|
:trigger-change="true"></j-upload>
|
||||||
@change="e => {e.target.value = (e.target.value + '').trim()}"/>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -38,48 +43,82 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import pick from 'lodash.pick'
|
import pick from 'lodash.pick'
|
||||||
import { httpAction } from '@api/manage'
|
import { getAction } from '@api/manage'
|
||||||
|
import JUpload from '@comp/jero/JUpload'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MaintenanceModal',
|
name: 'MaintenanceModal',
|
||||||
|
components: { JUpload },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
width: 800,
|
width: 500,
|
||||||
visible: false,
|
visible: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
form: this.$form.createForm(this),
|
form: this.$form.createForm(this),
|
||||||
model: {},
|
model: {},
|
||||||
|
oldFileId: '', // 旧文件id
|
||||||
|
dataType: '', // 资料类型为1 会议类型为2
|
||||||
|
fileList: [],
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 3 }
|
sm: { span: 5 }
|
||||||
},
|
},
|
||||||
wrapperCol: {
|
wrapperCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 21 }
|
sm: { span: 17 }
|
||||||
|
},
|
||||||
|
treeDataEdit: [],
|
||||||
|
replaceFields: {
|
||||||
|
children: 'children',
|
||||||
|
title: 'name',
|
||||||
|
value: 'id',
|
||||||
|
key: 'id'
|
||||||
},
|
},
|
||||||
validatorRules: {
|
validatorRules: {
|
||||||
name: {
|
fileId: {
|
||||||
rules: [{ required: true, message: '请输入分标委名称' }],
|
rules: [{ required: true, message: '请选择目录名称' }],
|
||||||
validateTrigger: 'blur'
|
validateTrigger: 'change'
|
||||||
|
},
|
||||||
|
dataId: {
|
||||||
|
rules: [{ required: true, message: '请上传文件' }],
|
||||||
|
validateTrigger: 'change'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
add: '/payCaseCommittee/payCaseCommittee/add',
|
treeList: 'payDataDirectory/payDataDirectory/tree', // 资料树
|
||||||
edit: '/payCaseCommittee/payCaseCommittee/edit'
|
add: 'payDataFile/payDataFile/add', // 资料和会议的添加 post
|
||||||
|
edit: 'payDataFile/payDataFile/edit', // 资料和会议的编辑 post
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created(){
|
||||||
|
getAction(this.url.treeList).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.treeDataEdit = res.result
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
add() {
|
select(value, node) {
|
||||||
this.edit({})
|
if (node.$children.length) { // 点击的是父节点
|
||||||
|
this.model.fileId = ''
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue(pick(this.model, 'fileId'))
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
edit(record) {
|
add(data) {
|
||||||
|
this.edit({}, data)
|
||||||
|
},
|
||||||
|
edit(record, data) {
|
||||||
|
this.dataType = data // 接收数据类型
|
||||||
this.form.resetFields()
|
this.form.resetFields()
|
||||||
this.model = Object.assign({}, record)
|
this.model = Object.assign({}, record)
|
||||||
|
this.record = record
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.form.setFieldsValue(pick(this.model, 'name', 'remark'))
|
this.form.setFieldsValue(pick(this.model, 'fileId', 'dataId' ))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
@@ -91,17 +130,27 @@ export default {
|
|||||||
// 触发表单验证
|
// 触发表单验证
|
||||||
this.form.validateFields((err, values) => {
|
this.form.validateFields((err, values) => {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
|
console.log(values)
|
||||||
let httpurl = ''
|
let httpurl = ''
|
||||||
let method = 'post'
|
let params = {}
|
||||||
if (!this.model.id) {
|
if (!this.model.keyId) {
|
||||||
httpurl += this.url.add
|
httpurl += this.url.add
|
||||||
|
params = {
|
||||||
|
dataId: values.fileId, // 目录id
|
||||||
|
dataType: this.dataType, // 上传类型
|
||||||
|
fileIds: values.dataId // 资料id
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
httpurl += this.url.edit
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
console.log(values, '============')
|
getAction(httpurl, params).then((res) => {
|
||||||
const formData = Object.assign(this.model, values)
|
|
||||||
console.log('表单提交数据', formData)
|
|
||||||
httpAction(httpurl, formData, method).then((res) => {
|
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
that.$message.success(res.message)
|
that.$message.success(res.message)
|
||||||
that.$emit('ok')
|
that.$emit('ok')
|
||||||
@@ -117,13 +166,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.close()
|
this.close()
|
||||||
},
|
}
|
||||||
// 下拉框的搜索
|
|
||||||
filterOption(input, option) {
|
|
||||||
return (
|
|
||||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
||||||
)
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user