文档工具-认证清单维护-批量设置
This commit is contained in:
@@ -3,10 +3,12 @@
|
||||
:title="$t('batSetting')"
|
||||
:width="900"
|
||||
:visible="visible"
|
||||
:confirm-loading="confirmLoading"
|
||||
:maskClosable="false"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
>
|
||||
<a-form-model class="formAdd">
|
||||
<a-form-model class="formAdd" v-model="formInline">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<div class="box-title-text">
|
||||
@@ -14,7 +16,8 @@
|
||||
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi">
|
||||
<j-multi-select-tag class="box-input"
|
||||
<j-dict-select-tag class="box-input"
|
||||
v-model="formInline.dutyTerritory"
|
||||
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
|
||||
:type="'select'"
|
||||
:triggerChange="false" :dictCode="'duty_territory'"/>
|
||||
@@ -33,6 +36,7 @@
|
||||
</div>
|
||||
<a-form-model-item class="itemModel-multi">
|
||||
<j-multi-select-tag class="box-input"
|
||||
v-model="formInline.deliverable"
|
||||
:placeholder="$t('PleaseSelect')+$t('Deliverables')"
|
||||
:type="'select'"
|
||||
:triggerChange="false"/>
|
||||
@@ -50,14 +54,22 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { postAction } from '../../../api/manage'
|
||||
|
||||
export default {
|
||||
name: 'batSetting',
|
||||
props: ['url'],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
formInline: {},
|
||||
rules: {},
|
||||
ids: [],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
edit(data) {
|
||||
@@ -67,10 +79,79 @@ export default {
|
||||
this.formInline = {}
|
||||
})
|
||||
},
|
||||
handleOk() {
|
||||
if (this.formInline.dutyTerritory) {
|
||||
this.handleOnTwo()
|
||||
} else {
|
||||
this.handleOkOne()
|
||||
}
|
||||
},
|
||||
handleOkOne() {
|
||||
let ids = JSON.parse(JSON.stringify(this.ids))
|
||||
let formInline = JSON.parse(JSON.stringify(this.formInline))
|
||||
Object.keys(formInline).forEach(res => {
|
||||
if (formInline[res] instanceof Array) {
|
||||
formInline[res] = formInline[res].join(',')
|
||||
}
|
||||
})
|
||||
let query = {
|
||||
ids: ids.join(','),
|
||||
...formInline
|
||||
}
|
||||
this.confirmLoading = true
|
||||
postAction(this.url.setBatch, query).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
this.$emit('batSettingList')
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleOnTwo() {
|
||||
let _this = this
|
||||
this.$confirm({
|
||||
content: _this.$t('areResponsibilityAreaInformationBatch'),
|
||||
onOk() {
|
||||
let ids = JSON.parse(JSON.stringify(_this.ids))
|
||||
let formInline = JSON.parse(JSON.stringify(_this.formInline))
|
||||
Object.keys(formInline).forEach(res => {
|
||||
if (formInline[res] instanceof Array) {
|
||||
formInline[res] = formInline[res].join(',')
|
||||
}
|
||||
})
|
||||
let query = {
|
||||
ids: ids.join(','),
|
||||
...formInline
|
||||
}
|
||||
_this.confirmLoading = true
|
||||
postAction(_this.url.setBatch, query).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
_this.visible = false
|
||||
_this.confirmLoading = false
|
||||
_this.$emit('batSettingList')
|
||||
} else {
|
||||
_this.$message.warning(res.message)
|
||||
_this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.formInline = {}
|
||||
this.visible = false
|
||||
},
|
||||
handleInput(value) {
|
||||
this.$nextTick(() => {
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$refs.ruleForm.validateField([value])
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
+5
-1
@@ -219,7 +219,7 @@
|
||||
<transfer-list ref="transferListRef"></transfer-list>
|
||||
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
|
||||
<edit-model :url="url" ref="editModelRef" @editModelList="editModelList"></edit-model>
|
||||
<bat-setting :url="url" ref="batSettingRef"></bat-setting>
|
||||
<bat-setting :url="url" ref="batSettingRef" @batSettingList="batSettingList"></bat-setting>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -265,6 +265,7 @@ export default {
|
||||
copyInfo: '/authDummy/authDummyInventoryInfoEO/copyInfoByIds',//复制
|
||||
deleteBatch: '/authDummy/authDummyInventoryInfoEO/deleteBatch',//批量删除
|
||||
editModel: '/authDummy/authDummyInventoryInfoEO/edit',//编辑
|
||||
setBatch: '/authDummy/authDummyInventoryInfoEO/setBatch',//批量设置
|
||||
},
|
||||
queryParam: {},
|
||||
orderByField: '',
|
||||
@@ -521,6 +522,9 @@ export default {
|
||||
editModelList() {
|
||||
this.getList()
|
||||
},
|
||||
batSettingList() {
|
||||
this.getList()
|
||||
},
|
||||
tableOnChange(pagination, filters, sorter) {
|
||||
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
|
||||
if(sorter.columnKey == 'shi4Yong4Fan4Wei2_dictText'){
|
||||
|
||||
Reference in New Issue
Block a user