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