分发
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
<div class="table-page-search-submitButtons">
|
||||
<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="download" type="primary" class="opera-btn" @click="distribute">批量分发</a-button>
|
||||
<a-button icon="download" type="primary" class="opera-btn" @click="batchDistribute">批量分发</a-button>
|
||||
<a-button icon="export" type="primary" class="opera-btn" @click="handleExportXls">导出</a-button>
|
||||
</div>
|
||||
</a-form>
|
||||
@@ -175,8 +175,6 @@ export default {
|
||||
upload: 'payDataFile/payDataFile/addMeetingFile', // 资料和会议的上传
|
||||
deleteBatch: 'payDataFile/payDataFile/deleteBatch', // 资料和会议批量删除
|
||||
list: 'payDataFile/payDataFile/list', // 资料列表
|
||||
distribute: 'payDataFile/payDataFile/distribute', // 分发
|
||||
distributeBatch: 'payDataFile/payDataFile/distributes', // 批量分发
|
||||
exportXlsUrl: 'payDataFile/payDataFile/importFile', // 导出
|
||||
treeList: 'payDataDirectory/payDataDirectory/tree', // 资料树
|
||||
treeMeetList: 'payDataDirectory/payDataDirectory/meetingTree' // 会议树
|
||||
@@ -368,6 +366,19 @@ export default {
|
||||
this.$refs.modalDistributeForm.title = '分发'
|
||||
},
|
||||
modalDistributeFormOk() {},
|
||||
// 批量分发
|
||||
batchDistribute() {
|
||||
if (this.selectedRowKeys.length <= 0) {
|
||||
this.$message.warning('请选择一条记录!')
|
||||
return
|
||||
} else {
|
||||
let dataIds = this.selectedDataIds.reduce((item, itemNew)=>{
|
||||
return item + ',' + itemNew
|
||||
})
|
||||
this.$refs.modalDistributeForm.edit({ dataId: dataIds })
|
||||
this.$refs.modalDistributeForm.title = '批量分发'
|
||||
}
|
||||
},
|
||||
// 批量删除
|
||||
batchDel: function () {
|
||||
if (!this.url.deleteBatch) {
|
||||
@@ -384,7 +395,7 @@ export default {
|
||||
ids += this.selectedRowKeys[a] + ',' // 主键id
|
||||
}
|
||||
for (var b = 0; b < this.selectedDataIds.length; b++) {
|
||||
dataIds += this.selectedDataIds[b] + ',' // 主键id
|
||||
dataIds += this.selectedDataIds[b] + ',' // 资料id
|
||||
}
|
||||
|
||||
var that = this
|
||||
|
||||
@@ -52,8 +52,11 @@
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="2">
|
||||
<a-form-item>
|
||||
</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>
|
||||
@@ -86,10 +89,11 @@ export default {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 17 }
|
||||
},
|
||||
fileList: [],
|
||||
list: [],
|
||||
memberList: [],
|
||||
checkedKeys: [],
|
||||
fileList: [], // 文件数据
|
||||
list: [], // 群组名称
|
||||
memberList: [], // 成员树
|
||||
checkedKeys: [], // 已选中的成员数组
|
||||
businessSelectedRowKeys: [],
|
||||
replaceFields: {
|
||||
children: 'children',
|
||||
title: 'contactsName',
|
||||
@@ -107,12 +111,14 @@ export default {
|
||||
},
|
||||
memberName: {
|
||||
rules: [{ required: true, message: '请选择成员' }],
|
||||
validateTrigger: 'blur'
|
||||
validateTrigger: 'blur, change'
|
||||
}
|
||||
},
|
||||
url: {
|
||||
list: 'payCaseCommittee/payCaseCommittee/list', // 分标委列表---群组列表
|
||||
memberList: 'payCaseCommitteeSubitem/payCaseCommitteeSubitem/list' // 群组成员列表
|
||||
memberList: 'payCaseCommitteeSubitem/payCaseCommitteeSubitem/list', // 群组成员列表
|
||||
distribute: 'payDataFile/payDataFile/distribute', // 分发
|
||||
distributeBatch: 'payDataFile/payDataFile/distributes' // 批量分发
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -137,14 +143,11 @@ export default {
|
||||
}
|
||||
},
|
||||
onCheck(checkedKeys) {
|
||||
this.checkKeys = checkedKeys
|
||||
let arr = JSON.parse(JSON.stringify(this.checkKeys))
|
||||
this.model = Object.assign(this.model, {memberName: arr.splice(1).toString()})
|
||||
this.form.setFieldsValue({memberName: arr.splice(1).toString()})
|
||||
console.log(this.model)
|
||||
this.checkedKeys = checkedKeys
|
||||
},
|
||||
edit(record) {
|
||||
this.form.resetFields()
|
||||
console.log(record)
|
||||
this.model = Object.assign({}, record)
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
@@ -157,11 +160,14 @@ export default {
|
||||
this.memberList = []
|
||||
},
|
||||
handleOk() {
|
||||
const that = this
|
||||
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)
|
||||
// 请求分发,或者批量分发接口
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -184,4 +190,9 @@ export default {
|
||||
/deep/.ant-checkbox-group{
|
||||
width: 100%;
|
||||
}
|
||||
.choose-member{
|
||||
/deep/#memberName{
|
||||
display:none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user